commit: 157e625ff2631552f9db81dcc74baa074518849c Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed Nov 26 07:15:36 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Nov 26 07:15:36 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=157e625f
net-vpn/tor: drop versions Bug: https://bugs.gentoo.org/965987 Signed-off-by: Sam James <sam <AT> gentoo.org> net-vpn/tor/Manifest | 15 -- .../tor/files/tor-0.4.8.20-openrc-startup.patch | 118 ------------ net-vpn/tor/tor-0.4.8.16.ebuild | 199 -------------------- net-vpn/tor/tor-0.4.8.17.ebuild | 199 -------------------- net-vpn/tor/tor-0.4.8.18.ebuild | 199 -------------------- net-vpn/tor/tor-0.4.8.19.ebuild | 199 -------------------- net-vpn/tor/tor-0.4.8.20-r1.ebuild | 202 --------------------- net-vpn/tor/tor-0.4.8.20.ebuild | 201 -------------------- 8 files changed, 1332 deletions(-) diff --git a/net-vpn/tor/Manifest b/net-vpn/tor/Manifest index 91edcd25e34c..2321a714bc4e 100644 --- a/net-vpn/tor/Manifest +++ b/net-vpn/tor/Manifest @@ -1,18 +1,3 @@ -DIST tor-0.4.8.16.tar.gz 9930424 BLAKE2B fdaf3d124d3e1b11589a5219033c8d37d3e6c8986ff60e930d2bf80532dd6be4c7ee1634bd0806bd283a9954e4478f3be7b9b61abd13e3274fef3b8373df1b00 SHA512 4815fe3da63f582e8347ab5c4fcec75816c06e79a3b420ba15a03d6d7f4a12654b771555a9271ea66fb8f4f007e4772224e565ee02b920fed90b3e530a588d94 -DIST tor-0.4.8.16.tar.gz.sha256sum 86 BLAKE2B fed27331bd5119d9913acfdbb290d454ceee9d4c3f633e50e9e590c31a2753a206874e35447e4e54ec1fad323e38e6be8594aa991cb5b4ddf543740a22930c48 SHA512 9f7af97a64948551dffb6e565b8ead1cc7020ca7823bce27da8540eb0b3b4fd27c66709495c3f6e4ef0aa0bdb7854c1b1ed167de3ee8506081ba9ed92a0ea115 -DIST tor-0.4.8.16.tar.gz.sha256sum.asc 716 BLAKE2B 65c903ecb214d1f799cfef780612650a6d70e542007cee26aede1d55bd8bc3b77cc64d805b45824f97b92fef58f628c5d3c0c2a7c2fca82a5f488556763e2527 SHA512 234de1b626a2e9cb7ecc5ea82b609b8962a6b736169180a1412c8232f4eedf6296e637aea6dcdbe69c7f6ef1f63e541686560aad288f74b5e0c5ff32b5d9dbf7 -DIST tor-0.4.8.17.tar.gz 10073355 BLAKE2B 4fbfc7a779b0516702481e7db21c0cec767074157abbd44ee35c525fb145b5d2aabe4c537c726c6569a34af7690dc912fa07b0bb06380476f4c6dbc12ac09e68 SHA512 fef6456a6fdf8c8f47083d477c80ae7f3ced0b36ede71ff1119961c66d51a3ff6305b9dae1c9b3cd4ebd00a386fde5e32cc9927454dd4661eee9665b7cca6872 -DIST tor-0.4.8.17.tar.gz.sha256sum 86 BLAKE2B e95c354ef8ef74506aab3f6ef248ced658c4493ad83dc789ac98ec7660c01e33603c4c32916d93975cc3b273dee50588d005bc37f126b9821103e8cc6e0b45d6 SHA512 0c899909923107c77919b8701dc11949e546c3507e99e88c59bca80f6880918e8ce6bcfdda08123c482043e2e40c6d53d727fac53c177351a283c695435c79be -DIST tor-0.4.8.17.tar.gz.sha256sum.asc 716 BLAKE2B 2a5e4f30108f088dfad97d7208abd305c664018f042a09cd6118316eb5307dcbd9c8d7ba7b504ee4eef6b13a906aaeb73c92f97313ed0a04d2482d4702a28ee3 SHA512 3f266ea8eed0cc47c4a721ad7f986e60a8a259360a202eb28838023a81637cbc7ce558b09703cd04f5de49be5a23b900fe405d8fc03b381300bb03d686b8f5f0 -DIST tor-0.4.8.18.tar.gz 10139317 BLAKE2B 8a2ff369d3b29557a4bb3018dcc5c17b04e459626d23a44bed2968c938a4073ff85c88f734b8f732273197cbb173b70906b4f553db7a432cfbefad73329f6349 SHA512 a652e8945ec4597f03b7c8521492ba8a0395de6de3bd2625163765fd3fd08132a3927fed2804c13ed2e755b9dfa0757186c3009048a70e70e3071d318efa8975 -DIST tor-0.4.8.18.tar.gz.sha256sum 86 BLAKE2B 149d55c27320b545bbeb3833bd41feb6d253e0135010056bf2e48e56d188f90a62ec5ee869482f1bc5e915a1116b511daf7011c293abcefd30eec66d70da8835 SHA512 eadc5afa9e8b9e42e5624e98df2b72b4e1359fe641e547ac6ca3a1b431934c3ad6a4a0885b9853c7f41fa4f5b735c8e84ba920e61eecc89d1f5ad38517fd981b -DIST tor-0.4.8.18.tar.gz.sha256sum.asc 716 BLAKE2B ae7d0c3bd0e9215047e91fa10de31cc2676e8b6fb7f734438e2b5e315fc357ada309633f81eace0ba0acbe80cfc98aeddb3df678776a6f00aa263d801e1d2366 SHA512 3004dc86a926117cc14889b25b89fc89fa12aad34f2654233be89ec4f547fd4f6bf690859ab19112453926fcc5089fc87e1afdbb6fd94795ce880dc3e9ac496e -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 DIST tor-0.4.8.21.tar.gz 10663112 BLAKE2B 1b7d786a7ec5a3e5967d8ce214f8a2aef10f8ba10791bc45d42a322bf4107c0a1962b80368e043ee1b239a8367660fdf810d05f00a010d9e69d024e1042217e8 SHA512 5ba774d1f9b2079bd393323d490edf6e1a6380f5a970f07f87e8cf14522eb994c7137a8c8a7ad551289db0ad9aa3ff0a46d8d55fdcdaea5042d68196cf9399b7 DIST tor-0.4.8.21.tar.gz.sha256sum 86 BLAKE2B 66b55dd5cb8f344f54a6ecd51d71aeadabe2c8825b236bcfa018ac8dd0ca98beee832a85728c3294ae56df529e3058c7c6292613108869131258713f482ae691 SHA512 1b6330dfa3b58e9ea99bbbd9dd76f042a23e5c5c2656704bf2ca80f5e0214427020e8718856359ceca0b7d52e135d315f3ea1e1fb760eac6a7422d721b90b144 DIST tor-0.4.8.21.tar.gz.sha256sum.asc 716 BLAKE2B e4ea78b6ed371728fd8d198bb17041a80f84090fd10851d516463b6515ca6a56f7fe3ec0828a29c98e4ca0a242e71a6737d0719aa33bd4292e87dce1b8a3577f SHA512 7c741f85cf2a1c722ce1c24dfd3f2b6271ef10dfb54bd120c49d229b02ac982c88c8c7a833e4b314e35dcb685ce0ede5adea6284ccc13514fd335b85755e61ee diff --git a/net-vpn/tor/files/tor-0.4.8.20-openrc-startup.patch b/net-vpn/tor/files/tor-0.4.8.20-openrc-startup.patch deleted file mode 100644 index 90172302f616..000000000000 --- a/net-vpn/tor/files/tor-0.4.8.20-openrc-startup.patch +++ /dev/null @@ -1,118 +0,0 @@ -https://bugs.gentoo.org/964340 -https://gitlab.torproject.org/tpo/core/tor/-/issues/41164 -https://gitlab.torproject.org/tpo/core/tor/-/commit/ed28f2a1b3b1d40027a8b8d8b8a3a5d112ae3829 -https://gitlab.torproject.org/tpo/core/tor/-/commit/d2b5942e2820bd1d386e3c1e77a92363b05d28df - -From ed28f2a1b3b1d40027a8b8d8b8a3a5d112ae3829 Mon Sep 17 00:00:00 2001 -From: Jim Newsome <[email protected]> -Date: Mon, 2 Jun 2025 17:09:20 -0500 -Subject: [PATCH] Add tor_pipe_cloexec - ---- - src/lib/fdio/fdio.c | 28 ++++++++++++++++++++++++++++ - src/lib/fdio/fdio.h | 1 + - 2 files changed, 29 insertions(+) - -diff --git a/src/lib/fdio/fdio.c b/src/lib/fdio/fdio.c -index 7e27644067..f132e370d1 100644 ---- a/src/lib/fdio/fdio.c -+++ b/src/lib/fdio/fdio.c -@@ -14,6 +14,9 @@ - #ifdef HAVE_UNISTD_H - #include <unistd.h> - #endif -+#ifdef HAVE_FCNTL_H -+#include <fcntl.h> -+#endif - #ifdef _WIN32 - #include <windows.h> - #endif -@@ -118,3 +121,28 @@ write_all_to_fd_minimal(int fd, const char *buf, size_t count) - } - return 0; - } -+ -+#if defined(HAVE_PIPE2) && defined(O_CLOEXEC) -+int -+tor_pipe_cloexec(int pipefd[2]) -+{ -+ return pipe2(pipefd, O_CLOEXEC); -+} -+#elif defined(HAVE_PIPE) && defined(FD_CLOEXEC) -+int -+tor_pipe_cloexec(int pipefd[2]) -+{ -+ if (pipe(pipefd)) { -+ return -1; -+ } -+ if (fcntl(pipefd[0], F_SETFD, FD_CLOEXEC)) { -+ return -1; -+ } -+ if (fcntl(pipefd[1], F_SETFD, FD_CLOEXEC)) { -+ return -1; -+ } -+ return 0; -+} -+#else -+/* Intentionally leave symbol undefined. */ -+#endif -diff --git a/src/lib/fdio/fdio.h b/src/lib/fdio/fdio.h -index 7551dedb9e..4fd35fda43 100644 ---- a/src/lib/fdio/fdio.h -+++ b/src/lib/fdio/fdio.h -@@ -22,5 +22,6 @@ int tor_fd_setpos(int fd, off_t pos); - int tor_fd_seekend(int fd); - int tor_ftruncate(int fd); - int write_all_to_fd_minimal(int fd, const char *buf, size_t count); -+int tor_pipe_cloexec(int pipefd[2]); - - #endif /* !defined(TOR_FDIO_H) */ --- -GitLab - -From d2b5942e2820bd1d386e3c1e77a92363b05d28df Mon Sep 17 00:00:00 2001 -From: Jim Newsome <[email protected]> -Date: Mon, 2 Jun 2025 17:10:45 -0500 -Subject: [PATCH] start_daemon: open pipe with cloexec - -Fixes #41013 -Fixes #41088 ---- - changes/bug41088 | 4 ++++ - src/lib/process/daemon.c | 3 ++- - 3 files changed, 7 insertions(+), 1 deletion(-) - create mode 100644 changes/bug41088 - -diff --git a/changes/bug41088 b/changes/bug41088 -new file mode 100644 -index 0000000000..7f9c178f97 ---- /dev/null -+++ b/changes/bug41088 -@@ -0,0 +1,4 @@ -+ o Minor bugfixes (bridges, pluggable transport): -+ - Fix a bug causing the initial tor process to hang intead of exiting with -+ RunAsDaemon, when pluggable transports are used. -+ Fixes bug 41088; bugfix on 0.4.9.1-alpha. -diff --git a/src/lib/process/daemon.c b/src/lib/process/daemon.c -index abd1d36576..1bfb162d85 100644 ---- a/src/lib/process/daemon.c -+++ b/src/lib/process/daemon.c -@@ -13,6 +13,7 @@ - - #ifndef _WIN32 - -+#include "lib/fdio/fdio.h" - #include "lib/fs/files.h" - #include "lib/log/log.h" - #include "lib/thread/threads.h" -@@ -63,7 +64,7 @@ start_daemon(void) - return 0; - start_daemon_called = 1; - -- if (pipe(daemon_filedes)) { -+ if (tor_pipe_cloexec(daemon_filedes)) { - /* LCOV_EXCL_START */ - log_err(LD_GENERAL,"pipe failed; exiting. Error was %s", strerror(errno)); - exit(1); // exit ok: during daemonize, pipe failed. --- -GitLab diff --git a/net-vpn/tor/tor-0.4.8.16.ebuild b/net-vpn/tor/tor-0.4.8.16.ebuild deleted file mode 100644 index df22cd918217..000000000000 --- a/net-vpn/tor/tor-0.4.8.16.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{11..13} ) -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-20230727 )" -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 -} diff --git a/net-vpn/tor/tor-0.4.8.17.ebuild b/net-vpn/tor/tor-0.4.8.17.ebuild deleted file mode 100644 index 16d767650a88..000000000000 --- a/net-vpn/tor/tor-0.4.8.17.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# 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 -} diff --git a/net-vpn/tor/tor-0.4.8.18.ebuild b/net-vpn/tor/tor-0.4.8.18.ebuild deleted file mode 100644 index 16d767650a88..000000000000 --- a/net-vpn/tor/tor-0.4.8.18.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# 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 -} diff --git a/net-vpn/tor/tor-0.4.8.19.ebuild b/net-vpn/tor/tor-0.4.8.19.ebuild deleted file mode 100644 index 507b262a47ff..000000000000 --- a/net-vpn/tor/tor-0.4.8.19.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# 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 -} diff --git a/net-vpn/tor/tor-0.4.8.20-r1.ebuild b/net-vpn/tor/tor-0.4.8.20-r1.ebuild deleted file mode 100644 index 717013f6f62f..000000000000 --- a/net-vpn/tor/tor-0.4.8.20-r1.ebuild +++ /dev/null @@ -1,202 +0,0 @@ -# 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 - "${FILESDIR}"/${PN}-0.4.8.20-openrc-startup.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 - - 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 -} diff --git a/net-vpn/tor/tor-0.4.8.20.ebuild b/net-vpn/tor/tor-0.4.8.20.ebuild deleted file mode 100644 index a88b21268baa..000000000000 --- a/net-vpn/tor/tor-0.4.8.20.ebuild +++ /dev/null @@ -1,201 +0,0 @@ -# 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}" - # Already set by default in profiles for our toolchain - export tor_cv_cflags__fcf_protection_full=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 -}
