From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A78BF15814C for ; Fri, 3 Nov 2023 15:39:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C75362BC01C; Fri, 3 Nov 2023 15:39:16 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AEC582BC01D for ; Fri, 3 Nov 2023 15:39:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB555335D3C for ; Fri, 3 Nov 2023 15:39:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 030F1AB5 for ; Fri, 3 Nov 2023 15:39:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1699025906.9b0f69c9bf89f33e458a0d6e07fa11b847742666.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/tor/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-vpn/tor/Manifest net-vpn/tor/tor-0.4.8.8.ebuild X-VCS-Directories: net-vpn/tor/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9b0f69c9bf89f33e458a0d6e07fa11b847742666 X-VCS-Branch: master Date: Fri, 3 Nov 2023 15:39:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ce7ea76f-1a80-4aac-85bb-c013548643de X-Archives-Hash: a9ba25a4177ffefd7b69e3f19f264890 commit: 9b0f69c9bf89f33e458a0d6e07fa11b847742666 Author: Sam James gentoo org> AuthorDate: Fri Nov 3 15:38:04 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Nov 3 15:38:26 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b0f69c9 net-vpn/tor: add 0.4.8.8 Bug: https://bugs.gentoo.org/916759 Signed-off-by: Sam James gentoo.org> net-vpn/tor/Manifest | 3 + net-vpn/tor/tor-0.4.8.8.ebuild | 177 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/net-vpn/tor/Manifest b/net-vpn/tor/Manifest index 28a85bb9a811..9f085ac4c9ae 100644 --- a/net-vpn/tor/Manifest +++ b/net-vpn/tor/Manifest @@ -16,3 +16,6 @@ DIST tor-0.4.8.6.tar.gz.sha256sum.asc 716 BLAKE2B 9a26c070f23d3e89467105ed195bc7 DIST tor-0.4.8.7.tar.gz 8322562 BLAKE2B 4d0cde752a729c64e380663e4438398fe768a8657e9aa3246bdf0ec9a4b4e01e277cb594ae0cb44cc66ea8c6080f2e58c6daf1bf01dc51b678d228e8e38fc971 SHA512 49f2abc495bf5594eee52aff11926094ef14c519cacb87787067657d0a230603208b9fe2f5758c1dab52b71cab45712ebe758deb1ebf217805074e445be380c5 DIST tor-0.4.8.7.tar.gz.sha256sum 85 BLAKE2B d52ba96072b94775ce6d5cb3e31590af5d78cb63aa5c9097ebe526addd850aae54cdd21a49822e41444144b0cb0d7709492f7c42f53873706a4b09d844ad92ce SHA512 84fac135d0df1b5534bb0a93d91cb6696c27fe5e2932e52e0766257d60ae3898b0a5d333247d3f2ba54d9bc3861f1746782cb39569bbb581c6ecb07360eda9a5 DIST tor-0.4.8.7.tar.gz.sha256sum.asc 716 BLAKE2B 90f80d3f07de27a6a08899a71d838add4b8ca00356080d9fd140d7cb420bb6b08dc50576b16c846306cf126c87c4e2ca2e2ca6321774a4ea2275544edb9302f2 SHA512 7ac05ee67ea4b60e0e2cfe7c47278a1928d8694675ec485e5baa8ba1dbb6ea9398e7b848921ee14dc13b1e6b7d429070c71e0ee04b557ab1c45ac28239112c84 +DIST tor-0.4.8.8.tar.gz 8261891 BLAKE2B 24dda7589d8c1318d008d69d1a2ecb65a0c80ee05cfca9f9a420784ff99b35645450c8330a23919f24068b7218e267a773292d5d7031f6a2c402fe2354a9a3f3 SHA512 780c507ea3aaa66dafb5cd34551009979c6621217acb3c1b11727b5f5d7fb0edd08d7e79b9991014a95a185f4ee6fdd53098d2df587e3d801fb2d5100b9b6e23 +DIST tor-0.4.8.8.tar.gz.sha256sum 85 BLAKE2B 697788e84f977ceaef05aca7bbf1385e6d40b80f1ec2c3ae024bffc87f507c34be5f3f5f62271c10b1e9aa8ed5fe64daa108e93d2bfa3f67f69e0409e41ab1a0 SHA512 65e7ae7ed136bb5e8abaa580658149b91f53befa452c3f1b8529630726890dba8ac13f123f0dbcf60d42ada7832529338d4f3c9c8ddcba4852a1ac8e9febd90d +DIST tor-0.4.8.8.tar.gz.sha256sum.asc 716 BLAKE2B 09c6b9d011dd21dee6b6e6ef28a4714c5c93873fcad6fa6b92a074319c2de79c0082252867fd68e40f0a54d7986c42fe5272033059114415c59ed278eb5731ae SHA512 110194accefcfd9e988ae577c63b5b8608a17399fd2420d6b51febf86ec57c9651c58fa316e1c42c2fb94dbf2e3110bfd09f2407347bea76b1fae757b71ba134 diff --git a/net-vpn/tor/tor-0.4.8.8.ebuild b/net-vpn/tor/tor-0.4.8.8.ebuild new file mode 100644 index 000000000000..009e202668a5 --- /dev/null +++ b/net-vpn/tor/tor-0.4.8.8.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +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 lzma +man scrypt seccomp selinux +server systemd tor-hardening test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + >=dev-libs/libevent-2.1.12-r1:=[ssl] + dev-libs/openssl:=[-bindist(-)] + sys-libs/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:= ) +" +RDEPEND=" + acct-user/tor + acct-group/tor + ${DEPEND} + selinux? ( sec-policy/selinux-tor ) +" +DEPEND+=" + test? ( + ${DEPEND} + ${PYTHON_DEPS} + ) +" + +DOCS=() + +PATCHES=( + "${FILESDIR}"/${PN}-0.2.7.4-torrc.sample.patch +) + +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 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 tor-hardening gcc-hardening) + $(use_enable tor-hardening linker-hardening) + $(use_enable test unittests) + $(use_enable zstd) + ) + + econf "${myeconfargs[@]}" +} + +src_test() { + local skip_tests=( + # Fails in sandbox + :sandbox/open_filename + :sandbox/openat_filename + ) + + # 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 +}