mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 10:37:22 -08:00
net-vpn/tor: add 0.4.9.12
Also, follow redirects for SRC_URI and add archive links for sigs too. Bug: https://bugs.gentoo.org/982162 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
DIST tor-0.4.9.11.tar.gz 10859160 BLAKE2B 553f18fdbfade78bf461f6abb44b2876c8ec771ddd005c77027942b396ec76ca6cb71ccae776a89495fb12be03193c4d006d43781ce7e4a15bc91f2486bcd145 SHA512 a9bf90c16998b68ca794dc717abc7bf681dcc2e6f4d1eb57badd0f1a3eb4a84347b2a41758d19dc20913655694ce4898c605c566cdeb8dd71be263a866263bb1
|
||||
DIST tor-0.4.9.11.tar.gz.sha256sum 86 BLAKE2B d4793ae196bcac406ce785b2fc6b2215a37465dca27801e35f190eb652915d3f42a2f1cdd95befed0e9887012f7c77f736270a69f51bce93ed4b2aac1a248832 SHA512 e974523e11c6525b4298d91cb3d8ff3346f9278ffa2b21c19405dba3e2cd0a844b649d3e5552546302cdc38e2c4d7ac13a0a0e3a57001e35a8adcc860f48062a
|
||||
DIST tor-0.4.9.11.tar.gz.sha256sum.asc 716 BLAKE2B a5b6b1ee3bb7bd6eb8087360ca6afb2ff93991f80c4cc7acd8a300a7da9c3dfe8af33fa9bfab671317c56d16d7a6875b61356fce874e90f5682d6344d1d35b7a SHA512 f84dcac1f40313b3e4d5ddfa7f6d06299968de78977c7c9a89e7de6a30402e218cfb0e5a69784078648e6650785651643ee7ca5396970f2794557d582d4d544e
|
||||
DIST tor-0.4.9.12.tar.gz 10961943 BLAKE2B c59d1b90510fee61b9e9167f5d0c45da0018b365e0d90bc36e0ec656ac864ecc77149b0c8860dde53a117f8267c7ba9080849ca4b9d2285cee20c77e0978c359 SHA512 5b83d49b6c87dfaa282b09efc37eb2fe3eeb2d8e830e2578985fee153a00de97283e34a2c804468fab4c8d04cc6cb196f39a68a61ebc470a2a470f9b0817c09c
|
||||
DIST tor-0.4.9.12.tar.gz.sha256sum 86 BLAKE2B 2d405715613f41d750151841336578d591d093d5afd452f33b90be9dd93805f2bd49871aeab4bdad3c675176d0ecfd44270a2f96942897b49405e5079e9aeb37 SHA512 5a3f2c9496358c3bfa539102f28a240cae6f4d78f73c52941677ba0f80b072bb6bc2f096c4c2cc9b82f1ef986a2592825579702671560a7101f1b3272a571807
|
||||
DIST tor-0.4.9.12.tar.gz.sha256sum.asc 716 BLAKE2B e1ba9f8fc4c85b4a0ae5ae28f8a27f5da99e97b5f5610b006fb0c8aefacfe64fd96970ce6ae6a25f17526ed467ed423fb7fe9ff68e2814ee5bd6ffe859e91fdb SHA512 f80eca0063a85ffddcc50562c345bd1e0da5e5b8ee841c002fffb6d93b66e989e58fc26f9094754a234ed757254377f9bf133f112fb99b64cbdc4b44bac101dd
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/torproject.org.asc
|
||||
inherit edo python-any-r1 readme.gentoo-r1 systemd verify-sig
|
||||
|
||||
MY_PV="$(ver_rs 4 -)"
|
||||
MY_PF="${PN}-${MY_PV}"
|
||||
DESCRIPTION="Anonymizing overlay network for TCP"
|
||||
HOMEPAGE="https://www.torproject.org/ https://gitlab.torproject.org/tpo/core/tor/"
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
EGIT_REPO_URI="https://gitlab.torproject.org/tpo/core/tor"
|
||||
inherit autotools git-r3
|
||||
else
|
||||
SRC_URI="
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz
|
||||
verify-sig? (
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum.asc
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz.sha256sum
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz.sha256sum.asc
|
||||
)
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_PF}"
|
||||
|
||||
if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]]; then
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-tor-20250713 )"
|
||||
fi
|
||||
|
||||
# BSD in general, but for PoW, needs --enable-gpl (GPL-3 per --version)
|
||||
# We also already had GPL-2 listed here for the init script, but obviously
|
||||
# that's different from the actual binary.
|
||||
LICENSE="BSD GPL-2 GPL-3"
|
||||
SLOT="0"
|
||||
IUSE="caps doc hardened lzma +man scrypt seccomp selinux +server systemd test zstd"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libevent-2.1.12-r1:=[ssl]
|
||||
>=dev-libs/openssl-1.1.1:=[-bindist(-)]
|
||||
virtual/zlib:=
|
||||
caps? ( sys-libs/libcap )
|
||||
man? ( app-text/asciidoc )
|
||||
lzma? ( app-arch/xz-utils )
|
||||
scrypt? ( app-crypt/libscrypt )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.4.1 )
|
||||
systemd? ( sys-apps/systemd:= )
|
||||
zstd? ( app-arch/zstd:= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
test? (
|
||||
${DEPEND}
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
"
|
||||
RDEPEND+="
|
||||
acct-user/tor
|
||||
acct-group/tor
|
||||
selinux? ( sec-policy/selinux-tor )
|
||||
"
|
||||
BDEPEND+="
|
||||
acct-user/tor
|
||||
acct-group/tor
|
||||
"
|
||||
|
||||
DOCS=()
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.2.7.4-torrc.sample.patch
|
||||
)
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
# test correctly fails because -lnacl fails if not available
|
||||
# https://bugs.gentoo.org/900092
|
||||
crypto_scalarmult_curve25519
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_detached ${MY_PF}.tar.gz.sha256sum{,.asc}
|
||||
verify-sig_verify_unsigned_checksums \
|
||||
${MY_PF}.tar.gz.sha256sum sha256 ${MY_PF}.tar.gz
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Running shellcheck automagically isn't useful for ebuild testing.
|
||||
echo "exit 0" > scripts/maint/checkShellScripts.sh || die
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( README.md ChangeLog ReleaseNotes doc/HACKING )
|
||||
|
||||
export ac_cv_lib_cap_cap_init=$(usex caps)
|
||||
export tor_cv_PYTHON="${EPYTHON}"
|
||||
# Already set by default in profiles for our toolchain
|
||||
export tor_cv_cflags__fcf_protection_full=no
|
||||
export tor_cv_cflags__mbranch_protection_standard=no
|
||||
|
||||
local myeconfargs=(
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
--disable-all-bugs-are-fatal
|
||||
--enable-system-torrc
|
||||
--disable-android
|
||||
--disable-coverage
|
||||
--disable-html-manual
|
||||
--disable-libfuzzer
|
||||
--enable-missing-doc-warnings
|
||||
--disable-module-dirauth
|
||||
--enable-pic
|
||||
--disable-restart-debugging
|
||||
|
||||
# Unless someone asks & has a compelling reason, just always
|
||||
# build in GPL mode for pow, given we don't want yet another USE
|
||||
# flag combination to have to test just for the sake of it.
|
||||
# (PoW requires GPL.)
|
||||
--enable-gpl
|
||||
--enable-module-pow
|
||||
|
||||
$(use_enable hardened gcc-hardening)
|
||||
$(use_enable hardened linker-hardening)
|
||||
$(use_enable man asciidoc)
|
||||
$(use_enable man manpage)
|
||||
$(use_enable lzma)
|
||||
$(use_enable scrypt libscrypt)
|
||||
$(use_enable seccomp)
|
||||
$(use_enable server module-relay)
|
||||
$(use_enable systemd)
|
||||
$(use_enable test unittests)
|
||||
$(use_enable zstd)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local skip_tests=(
|
||||
# Fails in sandbox
|
||||
:sandbox/open_filename
|
||||
:sandbox/openat_filename
|
||||
)
|
||||
|
||||
if use arm ; then
|
||||
skip_tests+=(
|
||||
# bug #920905
|
||||
# https://gitlab.torproject.org/tpo/core/tor/-/issues/40912
|
||||
:sandbox/opendir_dirname
|
||||
:sandbox/openat_filename
|
||||
:sandbox/chmod_filename
|
||||
:sandbox/chown_filename
|
||||
:sandbox/rename_filename
|
||||
)
|
||||
fi
|
||||
|
||||
# The makefile runs these by parallel by chunking them with a script
|
||||
# but that means we lose verbosity and can't skip individual tests easily
|
||||
# either.
|
||||
edo ./src/test/test --verbose "${skip_tests[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
readme.gentoo_create_doc
|
||||
|
||||
newconfd "${FILESDIR}"/tor.confd tor
|
||||
newinitd "${FILESDIR}"/tor.initd-r9 tor
|
||||
systemd_newunit "${FILESDIR}"/tor.service-r1 "${PN}.service"
|
||||
systemd_newunit "${FILESDIR}"/tor_at.service "${PN}@.service"
|
||||
|
||||
keepdir /var/lib/tor
|
||||
|
||||
fperms 750 /var/lib/tor
|
||||
fowners tor:tor /var/lib/tor
|
||||
|
||||
insinto /etc/tor/
|
||||
newins "${FILESDIR}"/torrc-r2 torrc
|
||||
}
|
||||
@@ -17,11 +17,13 @@ if [[ ${PV} == 9999 ]] ; then
|
||||
inherit autotools git-r3
|
||||
else
|
||||
SRC_URI="
|
||||
https://www.torproject.org/dist/${MY_PF}.tar.gz
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz
|
||||
verify-sig? (
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum
|
||||
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum.asc
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz.sha256sum
|
||||
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz.sha256sum.asc
|
||||
)
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user