From 2317da063164c26cbf5c47920b0c86b6f156074d Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 23 Nov 2020 20:42:17 +0100 Subject: [PATCH] tordev: update to 0.4.5.2. Changes in version 0.4.5.2-alpha - 2020-11-23 Tor 0.4.5.2-alpha is the second alpha release in the 0.4.5.x series. It fixes several bugs present in earlier releases, including one that made it impractical to run relays on Windows. It also adds a few small safety features to improve Tor's behavior in the presence of strange compile-time options, misbehaving proxies, and future versions of OpenSSL. o Major bugfixes (relay, windows): - Fix a bug in our implementation of condition variables on Windows. Previously, a relay on Windows would use 100% CPU after running for some time. Because of this change, Tor now require Windows Vista or later to build and run. Fixes bug 30187; bugfix on 0.2.6.3-alpha. (This bug became more serious in 0.3.1.1-alpha with the introduction of consensus diffs.) Patch by Daniel Pinto. o Minor features (compilation): - Disable deprecation warnings when building with OpenSSL 3.0.0 or later. There are a number of APIs newly deprecated in OpenSSL 3.0.0 that Tor still requires. (A later version of Tor will try to stop depending on these APIs.) Closes ticket 40165. o Minor features (protocol, proxy support, defense in depth): - Respond more deliberately to misbehaving proxies that leave leftover data on their connections, so as to make Tor even less likely to allow the proxies to pass their data off as having come from a relay. Closes ticket 40017. o Minor features (safety): - Log a warning at startup if Tor is built with compile-time options that are likely to make it less stable or reliable. Closes ticket 18888. o Minor bugfixes (circuit, handshake): - In the v3 handshaking code, use connection_or_change_state() to change the state. Previously, we changed the state directly, but this did not pass the state change to the pubsub or channel objects, potentially leading to bugs. Fixes bug 32880; bugfix on 0.2.3.6-alpha. Patch by Neel Chauhan. o Minor bugfixes (compilation): - Use the correct 'ranlib' program when building libtor.a. Previously we used the default ranlib, which broke some kinds of cross-compilation. Fixes bug 40172; bugfix on 0.4.5.1-alpha. - Remove a duplicate typedef in metrics_store.c. Fixes bug 40177; bugfix on 0.4.5.1-alpha. - When USDT tracing is enabled, and STAP_PROBEV() is missing, don't attempt to build. Linux supports that macro but not the BSDs. Fixes bug 40174; bugfix on 0.4.5.1-alpha. o Minor bugfixes (configuration): - Exit Tor on a misconfiguration when the Bridge line is configured to use a transport but no corresponding ClientTransportPlugin can be found. Prior to this fix, Tor would attempt to connect to the bridge directly without using the transport, making it easier for adversaries to notice the bridge. Fixes bug 25528; bugfix on 0.2.6.1-alpha. - Fix an issue where an ORPort was compared with other kinds of ports, when it should have been only checked against other ORPorts. This bug would lead to "DirPort auto" getting ignored. Fixes bug 40195; bugfix on 0.4.5.1-alpha. - Fix a bug where a second non-ORPort with a variant family (ex: SocksPort [::1]:9050) would be ignored due to a configuration parsing error. Fixes bug 40183; bugfix on 0.4.5.1-alpha. o Minor bugfixes (crash, relay, signing key): - Avoid assertion failures when we run Tor from the command line with `--key-expiration sign`, but an ORPort is not set. Fixes bug 40015; bugfix on 0.3.2.1-alpha. Patch by Neel Chauhan. o Minor bugfixes (logging): - Remove trailing whitespace from control event log messages. Fixes bug 32178; bugfix on 0.1.1.1-alpha. Based on a patch by Amadeusz Pawlik. - Turn warning-level log message about SENDME failure into a debug- level message. (This event can happen naturally, and is no reason for concern). Fixes bug 40142; bugfix on 0.4.1.1-alpha. o Minor bugfixes (relay, address discovery): - Don't trigger an IP change when no new valid IP can be found. Fixes bug 40071; bugfix on 0.4.5.1-alpha. - When attempting to discover our IP, use a simple test circuit, rather than a descriptor fetch: the same address information is present in NETINFO cells, and is better authenticated there. Fixes bug 40071; bugfix on 0.4.5.1-alpha. o Minor bugfixes (testing): - Fix the `config/parse_tcp_proxy_line` test so that it works correctly on systems where the DNS provider hijacks invalid queries. Fixes part of bug 40179; bugfix on 0.4.3.1-alpha. - Fix unit tests that used newly generated list of routers so that they check them with respect to the date when they were generated, not with respect to the current time. Fixes bug 40187; bugfix on 0.4.5.1-alpha. - Fix our Python reference-implementation for the v3 onion service handshake so that it works correctly with the version of hashlib provided by Python 3.9. Fixes part of bug 40179; bugfix on 0.3.1.6-rc. - Fix the `tortls/openssl/log_one_error` test to work with OpenSSL 3.0.0. Fixes bug 40170; bugfix on 0.2.8.1-alpha. o Removed features (controller): - Remove the "GETINFO network-status" controller command. It has been deprecated since 0.3.1.1-alpha. Closes ticket 22473. --- tor-dev/Makefile | 26 ++++++++++++++++++++++++-- tor-dev/distinfo | 9 +++++---- tor-dev/patches/patch-configure | 15 +++++++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 tor-dev/patches/patch-configure diff --git a/tor-dev/Makefile b/tor-dev/Makefile index c5c254380b..28e5de91b9 100644 --- a/tor-dev/Makefile +++ b/tor-dev/Makefile @@ -1,6 +1,6 @@ # $NetBSD$ -DISTNAME= tor-0.4.4.3-alpha +DISTNAME= tor-0.4.5.2-alpha PKGNAME= ${DISTNAME:S/tor/tordev/:S/-alpha//:S/-rc/rc0/} CATEGORIES= net security MASTER_SITES= https://dist.torproject.org/ @@ -12,7 +12,7 @@ LICENSE= modified-bsd USE_LANGUAGES= c99 USE_PKGLOCALEDIR= yes -USE_TOOLS+= perl:test pkg-config +USE_TOOLS+= perl:test pkg-config bash:test GNU_CONFIGURE= yes CONFIGURE_ARGS+= --localstatedir=${VARBASE} CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASEDIR} @@ -21,6 +21,20 @@ CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/tordev CONFIGURE_ENV+= CPP=${CPP:Q} CONFIGURE_ENV+= CONFDIR=${PKG_SYSCONFDIR} +# as of 0.4.5.2-alpha: +# FAIL: src/test/unittest_part2.sh +# FAIL: src/test/unittest_part8.sh +# FAIL: src/test/test_include.sh +#============================================================================ +#Testsuite summary for tor 0.4.5.2-alpha +#============================================================================ +## TOTAL: 33 +## PASS: 26 +## SKIP: 4 +## XFAIL: 0 +## FAIL: 3 +## XPASS: 0 +## ERROR: 0 TEST_TARGET= check TOR_USER?= tordev @@ -54,6 +68,14 @@ INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples CHECK_PORTABILITY_SKIP+= contrib/* +REPLACE_BASH+= scripts/maint/checkShellScripts.sh +REPLACE_BASH+= scripts/maint/run_check_subsystem_order.sh + +REPLACE_PERL+= scripts/maint/checkOptionDocs.pl.in +REPLACE_PERL+= scripts/maint/checkSpace.pl +REPLACE_PERL+= scripts/maint/checkOptionDocs.pl +REPLACE_PERL+= scripts/coccinelle/test-operator-cleanup + .include "options.mk" .include "../../mk/bsd.prefs.mk" diff --git a/tor-dev/distinfo b/tor-dev/distinfo index 0cacffd3ea..72e5359469 100644 --- a/tor-dev/distinfo +++ b/tor-dev/distinfo @@ -1,8 +1,9 @@ $NetBSD$ -SHA1 (tor-0.4.4.3-alpha.tar.gz) = 4f391b4a3a391c4ae42b3546597945ecc2467b51 -RMD160 (tor-0.4.4.3-alpha.tar.gz) = b517894f605112ad8adf78845a4a6f39617ab936 -SHA512 (tor-0.4.4.3-alpha.tar.gz) = 54753191d17b25966f03f83d210b7a2e433b0810a53c6a6748bcbaa3a4f148f2c75aacdc8d4785d38e250e30559e9f1c490b7bfa1a6b283fa39b2b7fd857e8cc -Size (tor-0.4.4.3-alpha.tar.gz) = 7795304 bytes +SHA1 (tor-0.4.5.2-alpha.tar.gz) = 6cf08dc35864bdd9b46dabe45118d8937f6df8a1 +RMD160 (tor-0.4.5.2-alpha.tar.gz) = 04b2406c7c34b9787239f5b76f5ffc775f673a5d +SHA512 (tor-0.4.5.2-alpha.tar.gz) = ca3f55522b198fd69abc948ef8c9dc14106b7cf6dc38f9308ca7188c713acaa07ac41c532621fc25934bf146721db99d80ca6d0fadf4a5bae7c7931a035341b9 +Size (tor-0.4.5.2-alpha.tar.gz) = 7909432 bytes SHA1 (patch-Makefile.in) = c190295f4702bd1e69531cab1ac61dbab451e48b +SHA1 (patch-configure) = 427005f4fe1b1cc1a40467befec910a02bc5a449 SHA1 (patch-src_app_config_config.c) = bac106e382207cdf22c84a52b45c791de2bdf0f8 diff --git a/tor-dev/patches/patch-configure b/tor-dev/patches/patch-configure new file mode 100644 index 0000000000..61600dc7e3 --- /dev/null +++ b/tor-dev/patches/patch-configure @@ -0,0 +1,15 @@ +$NetBSD$ + +Avoid unportable test(1) operator. + +--- configure.orig 2020-11-21 20:17:08.000000000 +0000 ++++ configure +@@ -10377,7 +10377,7 @@ else + + # This is a kludge to figure out whether compilation failed, or whether + # running the program failed. +- if test "$ac_retval" == "1"; then ++ if test "$ac_retval" = "1"; then + openssl_ver_mismatch=inconclusive + else + openssl_ver_mismatch=yes