diff --git a/net-vpn/tor/patches/disable_tests_that_hang.diff b/net-vpn/tor/patches/disable_tests_that_hang.diff new file mode 100644 index 000000000..9c6b5d09a --- /dev/null +++ b/net-vpn/tor/patches/disable_tests_that_hang.diff @@ -0,0 +1,25 @@ +diff --git a/src/test/include.am b/src/test/include.am +index 2765cf2..db3e717 100644 +--- a/src/test/include.am ++++ b/src/test/include.am +@@ -13,12 +13,6 @@ TESTS_ENVIRONMENT = \ + TESTSCRIPTS = \ + src/test/fuzz_static_testcases.sh \ + src/test/test_zero_length_keys.sh \ +- src/test/test_workqueue_cancel.sh \ +- src/test/test_workqueue_efd.sh \ +- src/test/test_workqueue_efd2.sh \ +- src/test/test_workqueue_pipe.sh \ +- src/test/test_workqueue_pipe2.sh \ +- src/test/test_workqueue_socketpair.sh \ + src/test/test_switch_id.sh \ + src/test/test_cmdline.sh \ + src/test/test_parseconf.sh \ +@@ -55,7 +49,6 @@ TESTSCRIPTS += \ + endif + + TESTS += src/test/test-slow src/test/test-memwipe \ +- src/test/test_workqueue \ + src/test/test_keygen.sh \ + src/test/test_key_expiration.sh \ + src/test/test-timers \ diff --git a/net-vpn/tor/patches/tor-0.4.6.8.patchset b/net-vpn/tor/patches/tor-0.4.7.13.patchset similarity index 100% rename from net-vpn/tor/patches/tor-0.4.6.8.patchset rename to net-vpn/tor/patches/tor-0.4.7.13.patchset diff --git a/net-vpn/tor/tor-0.4.6.8.recipe b/net-vpn/tor/tor-0.4.7.13.recipe similarity index 54% rename from net-vpn/tor/tor-0.4.6.8.recipe rename to net-vpn/tor/tor-0.4.7.13.recipe index c41f6994c..91863131d 100644 --- a/net-vpn/tor/tor-0.4.6.8.recipe +++ b/net-vpn/tor/tor-0.4.7.13.recipe @@ -4,25 +4,29 @@ their privacy and security on the Internet. It also enables software \ developers to create new communication tools with built-in privacy features. \ Tor provides the foundation for a range of applications that allow \ organizations and individuals to share information over public networks \ -without compromising their privacy." +without compromising their privacy.\ + +Note: if a file named \"~/config/settings/tor_proxy_autostart\" exists, tor will start at boot." HOMEPAGE="https://www.torproject.org/" -COPYRIGHT="2007-2021 The Tor Project, Inc. +COPYRIGHT="2007-2023 The Tor Project, Inc. 2004-2006 Nick Mathewson 2001-2006 Roger Dingledine" LICENSE="Tor" -REVISION="2" +REVISION="1" SOURCE_URI="https://dist.torproject.org/tor-$portVersion.tar.gz" -CHECKSUM_SHA256="15ce1a37b4cc175b07761e00acdcfa2c08f0d23d6c3ab9c97c464bd38cc5476a" -PATCHES="tor-$portVersion.patchset" +CHECKSUM_SHA256="2079172cce034556f110048e26083ce9bea751f3154b0ad2809751815b11ea9d" +PATCHES=" + tor-$portVersion.patchset + disable_tests_that_hang.diff + " ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" +if [ "$targetArchitecture" = x86_gcc2 ]; then + SECONDARY_ARCHITECTURES="x86" +fi -# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. -commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then - commandSuffix= commandBinDir=$prefix/bin fi @@ -35,11 +39,11 @@ USER_SETTINGS_FILES=" PROVIDES=" tor$secondaryArchSuffix = $portVersion - cmd:tor$commandSuffix - cmd:tor_gencert$commandSuffix - cmd:tor_print_ed_signing_cert$commandSuffix - cmd:tor_resolve$commandSuffix - cmd:torify$commandSuffix + cmd:tor + cmd:tor_gencert + cmd:tor_print_ed_signing_cert + cmd:tor_resolve + cmd:torify " REQUIRES=" haiku$secondaryArchSuffix @@ -63,14 +67,18 @@ BUILD_REQUIRES=" " BUILD_PREREQUIRES=" cmd:aclocal - cmd:autoconf + cmd:autoreconf cmd:automake cmd:gcc$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix " +TEST_REQUIRES=" + cmd:perl + cmd:python3 + " + defineDebugInfoPackage tor$secondaryArchSuffix \ "$commandBinDir"/tor \ "$commandBinDir"/tor-gencert \ @@ -83,11 +91,13 @@ BUILD() autoreconf -vfi - runConfigure --omit-dirs "binDir sbinDir" \ - ./configure \ + runConfigure --omit-dirs "binDir" ./configure \ --bindir="$commandBinDir" \ - --sbindir="$commandBinDir" \ - --disable-gcc-hardening + --disable-asciidoc \ + --disable-dependency-tracking \ + --disable-gcc-hardening \ + --enable-lzma \ + --enable-zstd make $jobArgs } @@ -95,9 +105,39 @@ BUILD() INSTALL() { make install + + # Install a "tor proxy service". It will only autostart at boot if the user creates a + # "~/config/settings/tor_proxy_autostart" file. + + mkdir -p $dataDir/user_launch + + echo "target desktop { + service tor_proxy { + launch /bin/tor + if file_exists ~/config/settings/tor_proxy_autostart + no_safemode + legacy + initial_volumes_mounted + } +} +" > $dataDir/user_launch/tor_proxy } TEST() { - make check + # Notes: + # See "disable_tests_that_hang.diff" on PATCHES. + # + # Also, around 19 test actually crash. So to avoid having to manually close those + # crash dialogs, you might want to configure Debugger's default action to "kill". + # + # See https://git.haiku-os.org/haiku/commit/?id=1b744548e0a31d725a147cfeadf3eeb30a4eb84c + # + # Something like the following should work (replace $portVersion as needed): + # + # executable_actions { + # /sources/tor-$portVersion/src/test/* kill + #} + # + make $jobArgs check }