commit: e720824ca11a5cf431e860433f899a3a64b898bc Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed Nov 12 05:42:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Nov 12 05:42:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e720824c
net-vpn/tor: add 0.4.8.20 Bug: https://bugs.gentoo.org/965987 Signed-off-by: Sam James <sam <AT> gentoo.org> net-vpn/tor/Manifest | 3 + net-vpn/tor/tor-0.4.8.20.ebuild | 199 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) diff --git a/net-vpn/tor/Manifest b/net-vpn/tor/Manifest index 2053a448ce77..390f55f74b67 100644 --- a/net-vpn/tor/Manifest +++ b/net-vpn/tor/Manifest @@ -10,3 +10,6 @@ DIST tor-0.4.8.18.tar.gz.sha256sum.asc 716 BLAKE2B ae7d0c3bd0e9215047e91fa10de31 DIST tor-0.4.8.19.tar.gz 10160196 BLAKE2B 298612a737a3c035de266549cae911ba709f8c261fe8856f9eff6b7a72b7a71d99e91d1d20dbb6f1c10c9c8d42778423d7a96348303006987dd43fa3888699d8 SHA512 e90375ad6fb1c27638bd36038b0dfe717e2ac6aec55f9ca1cc9e46f574a05246c7645b566e73e5749b99f256b2d77c39b78aa2b63383fda2a730afc9bc723cc9 DIST tor-0.4.8.19.tar.gz.sha256sum 86 BLAKE2B 82420d03401224a116f7c5851571a276bebccfb06400106983356dd5ecfa4c1ba9a30d727a3916004556fbfefc06af877a2d5758ad539cfdfc453837ecb92e9d SHA512 4114338dad76dfcce3f1bf43bdb449077ca5debee7bd729ecda4b9bfe897411ba0c356971c0bca2cb0dd69510e5717cc11cb8316e4179fdbe20477e583e36f20 DIST tor-0.4.8.19.tar.gz.sha256sum.asc 716 BLAKE2B 090e8b16311712a6a79a87a18fdbd42caacb293e6fe6deb9c4925aada029b5a438b69f8e211418c7edf70fa21d0323e4620b9b55ec8f89b8a04edda54a676bc3 SHA512 46ad73a6bb6fa116228eb59cec3825fe43525a249b02ddacd90f3609e07b546f1cc5e972d4b7e62f1aaee49e7e7234ca9da08721586e93fb3640fd655c9e9db3 +DIST tor-0.4.8.20.tar.gz 10662081 BLAKE2B c7618f61ee909b731ca92bc6bda67078396844b08b106754d6cc919073c979294dd24d4a2a64a42237a2d937c7d0e279cf2be2bd3b1d1dc2034dfb35657ff0d2 SHA512 297d7ad8666f3cdac6a522ac31dd514406b28d85fdcfb991358fed3e3486a7237725c19005ef9b7c443fbb84381f159999a568e414f4078a33f63046ce960585 +DIST tor-0.4.8.20.tar.gz.sha256sum 86 BLAKE2B 19208b6bc86161eeabf3960cacb5739c8e1eca088fae3b4b91aa3d9029b3c477d33849fb1327ef80f6fe15232e3f34ad8306c61173597fbe3259d3b72e694d75 SHA512 90d2c7bceec68f65e1f5ac5d5fad7a20b896409e4060efc790b2074f6af830897699ce99ff5d97280b6dc03aca4b43074cdc3d4cf11ba35725f0ae87d5c009fa +DIST tor-0.4.8.20.tar.gz.sha256sum.asc 716 BLAKE2B f2bf5491cc8be6c098dbf9cc8b8de50b76f426fac23660a238150796689b89310a928183b968d88110b4454423cfc572456ef54075cb54082f08f76b369b437b SHA512 623e678e14c97248b5f12d249b787510e10f48f8f7433cbd01b6dcaa78ceb7e929d9dfd30cdb70bd3f12aacf88ef6b3828b685e4e22a2dbf29247015b8329a43 diff --git a/net-vpn/tor/tor-0.4.8.20.ebuild b/net-vpn/tor/tor-0.4.8.20.ebuild new file mode 100644 index 000000000000..507b262a47ff --- /dev/null +++ b/net-vpn/tor/tor-0.4.8.20.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2025 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 ~ppc-macos" + 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:=[-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}" + + 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 +}
