summaryrefslogtreecommitdiff
path: root/net-vpn/tor
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-05 11:30:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-05 11:30:40 +0100
commit3023707d355581e5dc6945aa9c8f4d59e508a8b5 (patch)
tree5bf569d557ba145002d922f72eadde17410572d4 /net-vpn/tor
parent4e777c0133d093c9c8b992c92e0f244e2055bf71 (diff)
gentoo auto-resync : 05:05:2023 - 11:30:40
Diffstat (limited to 'net-vpn/tor')
-rw-r--r--net-vpn/tor/Manifest3
-rw-r--r--net-vpn/tor/tor-0.4.7.13-r1.ebuild8
-rw-r--r--net-vpn/tor/tor-9999.ebuild162
3 files changed, 172 insertions, 1 deletions
diff --git a/net-vpn/tor/Manifest b/net-vpn/tor/Manifest
index 6e5995cfc50b..baa719ba7c2e 100644
--- a/net-vpn/tor/Manifest
+++ b/net-vpn/tor/Manifest
@@ -8,5 +8,6 @@ AUX torrc-r2 136 BLAKE2B 022636974f24bc630657a67fe95805b1d647a5d18cce3dbc6fd42e9
DIST tor-0.4.7.13.tar.gz 8031948 BLAKE2B 338a0a541423f27f594a091307b5edeafc9826bb651c2bd050f3282c9355d9d43d1ef4791f3c98a37dc4c0f64bc40925ea1c1e32cbdff78b1a7308df501f279a SHA512 0900416887afbb24f7b72e6ef181b7b01308d1bb35c37736f3b13e06810a07febf9f47fadd9ff6c0e73204d93b49545e4e2516906eb3ba74398ad2b299f530be
DIST tor-0.4.7.13.tar.gz.sha256sum 86 BLAKE2B 339db9869bfe485cbd328fe942cc23e60c08ad67fc2d9e7927ed3c9f3b606192e5efac34013c5bf0b0e8b26e957dcf8b586e1cc0a0c27756b8b3d823af37fdee SHA512 ec1d19fa662255df5dd575ba943f4ccb30d9dfa49ff656cdfa73df2d24248b52a3bfd715f4d3efe11d8129968b0e06e3c75e8d82416e1807020ebf65f65401a0
DIST tor-0.4.7.13.tar.gz.sha256sum.asc 716 BLAKE2B 968a3852293ab9bcadac626862c9dc360b17de5afd00af7c46358fa2adfc03b55c02dfe029e9427efba999f553489a04388b395e8fb8fe16325e0895663c2deb SHA512 eb78e8369941d8de833e3616a9a1c1e59b0d3dde918353e2f4fa5eb5da09f038238c46f5e180844bd3cba1211a9daa6d60e9ddb5690998e27a6b7d1616aa20cc
-EBUILD tor-0.4.7.13-r1.ebuild 3400 BLAKE2B 12368e0a7ff80d524cd8469dcceb7ffafb48735ccfcc02a1cfb40282148481fe53cbd5536602b7fe73cd1ecc28ba54d10029ebf21205e51b99c9a5e6dd4187d1 SHA512 db21220ff6b74c37725ea93e0d3ebc7665a456886bf6674a54de81fc8530e3c0bbbd7acad8ad5f9c3ccc2599e35ba8788f29b1b4faed235aa3b15a96dcb89fa1
+EBUILD tor-0.4.7.13-r1.ebuild 3763 BLAKE2B 8e0354a43ee6bf557a42125628fd8d7a59acfb20517123b2fc74636e1ee997de344fe428e5d77a80653528143b5856e3bdab6504c4f6ba8fa05ca2e9ea0ab64b SHA512 b1c31ce455a005d2bfd46459fc5dff837413e06b3f675a6398d4540ac46605d6547609c93db9a94bf8be99aed74884fec65f685430a35f82e06f13ec7db4eff1
+EBUILD tor-9999.ebuild 3921 BLAKE2B 13bd019576ff4dda1c80dca076ca97d3870d97c3cf04d3511bc1ead967145a561db28be178bffd65502dab461897ce5836e5398ea01657cb74507acec471e09b SHA512 4d6efbbab5d19672c8a54643e161948bf3be6b3084b0143bc79acad94157d96c35e01dd68f77f7b4220e15b9431254da0791dac9c3709c3bcebf79c276bdd796
MISC metadata.xml 645 BLAKE2B a7f450c6cfb9a605f7021cbe533ec64ff0926c9877bef7aace8ce1770a8ec552255b5c54ac80035646c3515d7d0b778100573897068d0905a56f7b860c8de21b SHA512 e5724033912b73ab8abe1b47e74578c8fe4bf6e341b8e7d7434d69071508cd1f35d97f4c7ade9787ae0ded6660cf0a5477d3c7462ed13832693bfd6205f0f0f1
diff --git a/net-vpn/tor/tor-0.4.7.13-r1.ebuild b/net-vpn/tor/tor-0.4.7.13-r1.ebuild
index c0799853f0f6..2efaf6e602af 100644
--- a/net-vpn/tor/tor-0.4.7.13-r1.ebuild
+++ b/net-vpn/tor/tor-0.4.7.13-r1.ebuild
@@ -106,7 +106,15 @@ src_configure() {
--disable-module-dirauth
--enable-pic
--disable-restart-debugging
+
+ # This option is enabled by default upstream w/ zstd, surprisingly.
+ # zstd upstream says this shouldn't be relied upon and it may
+ # break API & ABI at any point, so Tor tries to fake static-linking
+ # to make it work, but then requires a rebuild on any new zstd version
+ # even when its standard ABI hasn't changed.
+ # See bug #727406 and bug #905708.
--disable-zstd-advanced-apis
+
$(use_enable man asciidoc)
$(use_enable man manpage)
$(use_enable lzma)
diff --git a/net-vpn/tor/tor-9999.ebuild b/net-vpn/tor/tor-9999.ebuild
new file mode 100644
index 000000000000..0e36a664f706
--- /dev/null
+++ b/net-vpn/tor/tor-9999.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/torproject.org.asc
+inherit 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-20220216 )"
+fi
+
+LICENSE="BSD GPL-2"
+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]
+ sys-libs/zlib
+ caps? ( sys-libs/libcap )
+ man? ( app-text/asciidoc )
+ dev-libs/openssl:=[-bindist(-)]
+ 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
+
+ # This option is enabled by default upstream w/ zstd, surprisingly.
+ # zstd upstream says this shouldn't be relied upon and it may
+ # break API & ABI at any point, so Tor tries to fake static-linking
+ # to make it work, but then requires a rebuild on any new zstd version
+ # even when its standard ABI hasn't changed.
+ # See bug #727406 and bug #905708.
+ --disable-zstd-advanced-apis
+
+ $(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_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
+}