mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-vpn/tor: add 0.4.9.6
Bug: https://bugs.gentoo.org/971568 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -4,3 +4,6 @@ DIST tor-0.4.8.22.tar.gz.sha256sum.asc 716 BLAKE2B 8e6d8f305bdeb7d8e67d35447440f
|
||||
DIST tor-0.4.9.5.tar.gz 10810648 BLAKE2B 9540662fcd0e62612e6dab9c0dc9e61f29b71c0ffbe0d9799ac9f6ba4f5966244f3372f90860122bdea26d7b61dc57acdfdcb2c98876b003d6fdce2d011c7318 SHA512 194c7750dbbe4021d00e5fa4c820ac8728e32ffe2ba4d86baef55719f4ec5437ec76989b69bc1027dcf419310d414eda2e750df14df52a77098b585fcd9ffb16
|
||||
DIST tor-0.4.9.5.tar.gz.sha256sum 85 BLAKE2B 64f3bcb998198b36e0f6c8984dc1005d10d666f70b6c8296664f80ef19892d700f237517bd4a2c0859d962e27c23944660e4b0c4afa57eec27d2f50c7c695f35 SHA512 5c35242a8a6162f19d719229f22215f54f06d27fa4bd592119d9b17449a40ac88bada016e9d76c90f2005f429e1402b74869570ad6367a65037786fa355cd605
|
||||
DIST tor-0.4.9.5.tar.gz.sha256sum.asc 716 BLAKE2B cdd5632a1e4aec718b4deabab1b1455b0498fe6f14d82402bb859bd5a42d1be93cdf37dbe61aa4c47573d942efe140ab23567643fe303eaadec22be1da42133b SHA512 1a1764e58e19a3df94e5a5f0e704f89f0b5e192c5279286df820cda75e4d61ff5fa65bf1842b907c55347e5c391ad4ef39b61f34bb8679bdddb47d88328d05a3
|
||||
DIST tor-0.4.9.6.tar.gz 10759319 BLAKE2B 93c4a338e892fdc451826fc5be2fa193aec582257b33b5cbb100f3f2ea2ecec182f56fa80e071e0a64fc81fb3a673d27521807071be85917a6490932659d8ebf SHA512 506ea2de742f1ab0580aa0e1b71d0e1180e8efdbb6c5f77ede273b8ccd2238b7a6ee3d78af1740ff507f14a25e75dccaa4f0deccc9fbee4ff68a162665cb8c23
|
||||
DIST tor-0.4.9.6.tar.gz.sha256sum 85 BLAKE2B dbc0aebd5bd6a0922e916263258a5989a0020c4d83e77f295c1ea501459cf046138a64f307a13a3d1a2ddc39dea0ef39568a786ad9bf5bc084e9d59df4d80798 SHA512 0e5bbfe5d1175c0bd386fbd64dee6762fa46ecf12a01f62883ea5b8ba783d37d61414436f5a22d278379b761d5f32098a0e7e692d31d98a30134957dc80ff698
|
||||
DIST tor-0.4.9.6.tar.gz.sha256sum.asc 716 BLAKE2B d2468d406429cb4dce18f1012b5f42fee10c8664020ef0b61f0c029ecce7b181afea2088736b1fbc537a118c0790138e89f20f9d66e0579a5ca7ae2ac6d132d3 SHA512 37d1adda3d36d8fb5fe88f150f5bc19d4cf837270fe8cc5776d1e3361fd1d97747ea229ce6486bb04ca2dbd0544fdf189ba1cd5a1eb97c550e8d07752232897b
|
||||
|
||||
202
net-vpn/tor/tor-0.4.9.6.ebuild
Normal file
202
net-vpn/tor/tor-0.4.9.6.ebuild
Normal file
@@ -0,0 +1,202 @@
|
||||
# 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://www.torproject.org/dist/${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
|
||||
)
|
||||
"
|
||||
|
||||
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_dounit "${FILESDIR}"/tor.service
|
||||
|
||||
keepdir /var/lib/tor
|
||||
|
||||
fperms 750 /var/lib/tor
|
||||
fowners tor:tor /var/lib/tor
|
||||
|
||||
insinto /etc/tor/
|
||||
newins "${FILESDIR}"/torrc-r2 torrc
|
||||
}
|
||||
Reference in New Issue
Block a user