Browse Source

tor: Update from 0.3.4.9 to 0.3.5.7

android-5
Fredrik Fornwall 6 years ago
parent
commit
e9ebb3c46f
  1. 4
      packages/tor/build.sh
  2. 26
      packages/tor/src-app-main-main.c.patch
  3. 14
      packages/tor/src-common-compat_openssl.h.patch
  4. 13
      packages/tor/src-common-crypto_openssl_mgt.h.patch
  5. 11
      packages/tor/src-common-crypto_rand.c.patch
  6. 24
      packages/tor/src-feature-relay-dns.c.patch

4
packages/tor/build.sh

@ -1,8 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://www.torproject.org
TERMUX_PKG_DESCRIPTION="The Onion Router anonymizing overlay network"
TERMUX_PKG_DEPENDS="libevent, openssl, liblzma"
TERMUX_PKG_VERSION=0.3.4.9
TERMUX_PKG_SHA256=1a171081f02b9a6ff9e28c0898defb7670e5bbb3bdbcaddfcf4e4304aedd164a
TERMUX_PKG_VERSION=0.3.5.7
TERMUX_PKG_SHA256=1b0887fc21ac535befea7243c5d5f1e31394d7458d64b30807a3e98cca0d839e
TERMUX_PKG_SRCURL=https://www.torproject.org/dist/tor-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-zstd --disable-unittests"
TERMUX_PKG_CONFFILES="etc/tor/torrc"

26
packages/tor/fix-hardcoded-paths.patch → packages/tor/src-app-main-main.c.patch

@ -1,19 +1,7 @@
diff -uNr tor-0.3.1.8/src/or/dns.c tor-0.3.1.8.mod/src/or/dns.c
--- tor-0.3.1.8/src/or/dns.c 2017-06-19 18:56:51.000000000 +0300
+++ tor-0.3.1.8.mod/src/or/dns.c 2017-11-10 18:05:46.220054396 +0200
@@ -1349,7 +1349,7 @@
conf_fname = options->ServerDNSResolvConfFile;
#ifndef _WIN32
if (!conf_fname)
- conf_fname = "/etc/resolv.conf";
+ conf_fname = "@TERMUX_PREFIX@/etc/resolv.conf";
#endif
flags = DNS_OPTIONS_ALL;
diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
--- tor-0.3.1.8/src/or/main.c 2017-09-29 01:52:51.000000000 +0300
+++ tor-0.3.1.8.mod/src/or/main.c 2017-11-10 18:02:56.257471811 +0200
@@ -3472,7 +3472,7 @@
diff -u -r ../tor-0.3.5.7/src/app/main/main.c ./src/app/main/main.c
--- ../tor-0.3.5.7/src/app/main/main.c 2018-12-18 18:56:22.000000000 +0000
+++ ./src/app/main/main.c 2019-01-10 20:29:38.187975263 +0000
@@ -1044,7 +1044,7 @@
OPEN("/dev/srandom");
OPEN("/dev/urandom");
OPEN("/dev/random");
@ -22,7 +10,7 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
OPEN("/proc/meminfo");
if (options->BridgeAuthoritativeDir)
@@ -3485,7 +3485,7 @@
@@ -1057,7 +1057,7 @@
sandbox_cfg_allow_open_filename(&cfg,
tor_strdup(options->ServerDNSResolvConfFile));
else
@ -31,7 +19,7 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
for (i = 0; i < 2; ++i) {
if (get_torrc_fname(i)) {
@@ -3631,7 +3631,7 @@
@@ -1223,7 +1223,7 @@
OPEN_DATADIR_SUFFIX("hashed-fingerprint", ".tmp");
OPEN_DATADIR_SUFFIX("router-stability", ".tmp");
@ -39,4 +27,4 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
+ OPEN("@TERMUX_PREFIX@/etc/resolv.conf");
RENAME_SUFFIX("fingerprint", ".tmp");
RENAME_SUFFIX2("keys", "secret_onion_key_ntor", ".tmp");
RENAME_KEYDIR_SUFFIX("secret_onion_key_ntor", ".tmp");

14
packages/tor/src-common-compat_openssl.h.patch

@ -1,14 +0,0 @@
diff -u -r ../tor-0.3.4.8/src/common/compat_openssl.h ./src/common/compat_openssl.h
--- ../tor-0.3.4.8/src/common/compat_openssl.h 2018-06-15 21:20:53.000000000 +0000
+++ ./src/common/compat_openssl.h 2018-09-12 04:22:24.387770893 +0000
@@ -28,10 +28,6 @@
#define OPENSSL_1_1_API
#endif /* OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) && ... */
-#ifndef OPENSSL_VERSION
-#define OPENSSL_VERSION SSLEAY_VERSION
-#endif
-
#ifndef OPENSSL_1_1_API
#define OpenSSL_version(v) SSLeay_version(v)
#define OpenSSL_version_num() SSLeay()

13
packages/tor/src-common-crypto_openssl_mgt.h.patch

@ -1,13 +0,0 @@
diff -u -r ../tor-0.3.3.9/src/common/crypto_openssl_mgt.h ./src/common/crypto_openssl_mgt.h
--- ../tor-0.3.3.9/src/common/crypto_openssl_mgt.h 2018-07-13 18:25:23.000000000 +0000
+++ ./src/common/crypto_openssl_mgt.h 2018-08-23 22:30:55.658879513 +0000
@@ -50,8 +50,7 @@
#define OPENSSL_V_SERIES(a,b,c) \
OPENSSL_VER((a),(b),(c),0,0)
-#ifdef ANDROID
-/* Android's OpenSSL seems to have removed all of its Engine support. */
+#ifdef OPENSSL_NO_ENGINE
#define DISABLE_ENGINES
#endif

11
packages/tor/src-common-crypto_rand.c.patch

@ -1,11 +0,0 @@
diff -u -r ../tor-0.3.4.8/src/common/crypto_rand.c ./src/common/crypto_rand.c
--- ../tor-0.3.4.8/src/common/crypto_rand.c 2018-06-15 21:20:53.000000000 +0000
+++ ./src/common/crypto_rand.c 2018-09-12 04:25:23.741656806 +0000
@@ -33,6 +33,7 @@
DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/rand.h>
+#include <openssl/sha.h>
ENABLE_GCC_WARNING(redundant-decls)
#if __GNUC__ && GCC_VERSION >= 402

24
packages/tor/src-feature-relay-dns.c.patch

@ -0,0 +1,24 @@
diff -u -r ../tor-0.3.5.7/src/feature/relay/dns.c ./src/feature/relay/dns.c
--- ../tor-0.3.5.7/src/feature/relay/dns.c 2019-01-04 02:34:43.000000000 +0000
+++ ./src/feature/relay/dns.c 2019-01-10 20:30:51.361418430 +0000
@@ -1377,7 +1377,7 @@
conf_fname = options->ServerDNSResolvConfFile;
#ifndef _WIN32
if (!conf_fname)
- conf_fname = "/etc/resolv.conf";
+ conf_fname = "@TERMUX_PREFIX@/etc/resolv.conf";
#endif
flags = DNS_OPTIONS_ALL;
@@ -1408,9 +1408,9 @@
#if defined(DNS_OPTION_HOSTSFILE) && defined(USE_LIBSECCOMP)
if (flags & DNS_OPTION_HOSTSFILE) {
flags ^= DNS_OPTION_HOSTSFILE;
- log_debug(LD_FS, "Loading /etc/hosts");
+ log_debug(LD_FS, "Loading @TERMUX_PREFIX@/etc/hosts");
evdns_base_load_hosts(the_evdns_base,
- sandbox_intern_string("/etc/hosts"));
+ sandbox_intern_string("@TERMUX_PREFIX@/etc/hosts"));
}
#endif /* defined(DNS_OPTION_HOSTSFILE) && defined(USE_LIBSECCOMP) */
log_info(LD_EXIT, "Parsing resolver configuration in '%s'", conf_fname);
Loading…
Cancel
Save