Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Tor to 0.4.0.5 #534

Merged
merged 6 commits into from Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -80,7 +80,8 @@ src/tor.timestamp*

# Compilation and Qt preprocessor part
*.qm
Makefile
/Makefile
/src/Makefile
zcoin-qt
Zcoin-Qt.app

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -1151,7 +1151,7 @@ if test x$need_bundled_univalue = xyes; then
fi

AX_SUBDIRS_CONFIGURE([src/secp256k1], [[--disable-shared], [--with-pic], [--with-bignum=no], [--enable-module-recovery], [--enable-experimental], [--enable-module-ecdh]])
AX_SUBDIRS_CONFIGURE([src/tor], [[--disable-unittests], [--disable-system-torrc], [--disable-systemd], [--disable-lzma], [--disable-zstd], [--disable-asciidoc]])
AX_SUBDIRS_CONFIGURE([src/tor], [[--disable-system-torrc], [--disable-systemd], [--disable-lzma], [--disable-zstd], [--disable-asciidoc]])


AC_OUTPUT
Expand Down
42 changes: 34 additions & 8 deletions src/Makefile.am
Expand Up @@ -19,19 +19,45 @@ else
LIBUNIVALUE = $(UNIVALUE_LIBS)
endif

TOR_LIBS = tor/src/or/libtor.a \
tor/src/common/libor.a \
tor/src/common/libor-ctime.a \
tor/src/common/libor-crypto.a \
tor/src/common/libor-event.a \
TOR_LIBS = tor/src/core/libtor-app.a \
tor/src/lib/libtor-meminfo.a \
tor/src/lib/libtor-term.a \
tor/src/lib/libtor-osinfo.a \
tor/src/lib/libtor-geoip.a \
tor/src/lib/libtor-math.a \
tor/src/lib/libtor-tls.a \
tor/src/lib/libtor-process.a \
tor/src/lib/libtor-evloop.a \
tor/src/lib/libtor-thread.a \
tor/src/lib/libtor-compress.a \
tor/src/lib/libtor-net.a \
tor/src/lib/libtor-buf.a \
tor/src/lib/libtor-time.a \
tor/src/lib/libtor-err.a \
tor/src/lib/libtor-log.a \
tor/src/lib/libtor-version.a \
tor/src/lib/libtor-container.a \
tor/src/lib/libtor-crypt-ops.a \
tor/src/lib/libtor-fs.a \
tor/src/lib/libtor-fdio.a \
tor/src/lib/libtor-sandbox.a \
tor/src/lib/libtor-memarea.a \
tor/src/lib/libtor-intmath.a \
tor/src/lib/libtor-encoding.a \
tor/src/lib/libtor-smartlist-core.a \
tor/src/lib/libtor-lock.a \
tor/src/lib/libtor-wallclock.a \
tor/src/lib/libtor-string.a \
tor/src/lib/libtor-malloc.a \
tor/src/lib/libtor-ctime.a \
tor/src/trunnel/libor-trunnel.a \
tor/src/common/libcurve25519_donna.a \
tor/src/lib/libcurve25519_donna.a \
tor/src/ext/ed25519/donna/libed25519_donna.a \
tor/src/ext/ed25519/ref10/libed25519_ref10.a \
tor/src/ext/keccak-tiny/libkeccak-tiny.a

tor.timestamp: $(wildcard tor/src/or/*.c) $(wildcard tor/src/or/*.h) \
$(wildcard tor/src/common/*.c) $(wildcard tor/src/common/*.h) \
tor.timestamp: $(wildcard tor/src/core/or/*.c) $(wildcard tor/src/core/or/*.h) \
$(wildcard tor/src/lib/*.c) $(wildcard tor/src/lib/*.h) \
$(wildcard tor/src/trunnel/*.c) $(wildcard tor/src/trunnel/*.h) \
$(wildcard tor/src/ext/*.c) $(wildcard tor/src/ext/*.h)
@rm -f tor.timestamp.tmp
Expand Down
38 changes: 32 additions & 6 deletions src/Makefile.qt.include
Expand Up @@ -489,13 +489,39 @@ if ENABLE_ZMQ
qt_zcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif

qt_zcoin_qt_LDADD += tor/src/or/libtor.a \
tor/src/common/libor.a \
tor/src/common/libor-ctime.a \
tor/src/common/libor-crypto.a \
tor/src/common/libor-event.a \
qt_zcoin_qt_LDADD += tor/src/core/libtor-app.a \
tor/src/lib/libtor-meminfo.a \
tor/src/lib/libtor-term.a \
tor/src/lib/libtor-osinfo.a \
tor/src/lib/libtor-geoip.a \
tor/src/lib/libtor-math.a \
tor/src/lib/libtor-tls.a \
tor/src/lib/libtor-process.a \
tor/src/lib/libtor-evloop.a \
tor/src/lib/libtor-thread.a \
tor/src/lib/libtor-compress.a \
tor/src/lib/libtor-net.a \
tor/src/lib/libtor-buf.a \
tor/src/lib/libtor-time.a \
tor/src/lib/libtor-err.a \
tor/src/lib/libtor-log.a \
tor/src/lib/libtor-version.a \
tor/src/lib/libtor-container.a \
tor/src/lib/libtor-crypt-ops.a \
tor/src/lib/libtor-fs.a \
tor/src/lib/libtor-fdio.a \
tor/src/lib/libtor-sandbox.a \
tor/src/lib/libtor-memarea.a \
tor/src/lib/libtor-intmath.a \
tor/src/lib/libtor-encoding.a \
tor/src/lib/libtor-smartlist-core.a \
tor/src/lib/libtor-lock.a \
tor/src/lib/libtor-wallclock.a \
tor/src/lib/libtor-string.a \
tor/src/lib/libtor-malloc.a \
tor/src/lib/libtor-ctime.a \
tor/src/trunnel/libor-trunnel.a \
tor/src/common/libcurve25519_donna.a \
tor/src/lib/libcurve25519_donna.a \
tor/src/ext/ed25519/donna/libed25519_donna.a \
tor/src/ext/ed25519/ref10/libed25519_ref10.a \
tor/src/ext/keccak-tiny/libkeccak-tiny.a
Expand Down
41 changes: 33 additions & 8 deletions src/Makefile.test.include
Expand Up @@ -131,17 +131,42 @@ BITCOIN_TESTS += \
wallet/test/txbuilder_tests.cpp
endif

test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) tor/src/or/libtor.a \
tor/src/common/libor.a \
tor/src/common/libor-ctime.a \
tor/src/common/libor-crypto.a \
tor/src/common/libor-event.a \
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) tor/src/core/libtor-app.a \
tor/src/lib/libtor-meminfo.a \
tor/src/lib/libtor-term.a \
tor/src/lib/libtor-osinfo.a \
tor/src/lib/libtor-geoip.a \
tor/src/lib/libtor-math.a \
tor/src/lib/libtor-tls.a \
tor/src/lib/libtor-process.a \
tor/src/lib/libtor-evloop.a \
tor/src/lib/libtor-thread.a \
tor/src/lib/libtor-compress.a \
tor/src/lib/libtor-net.a \
tor/src/lib/libtor-buf.a \
tor/src/lib/libtor-time.a \
tor/src/lib/libtor-err.a \
tor/src/lib/libtor-log.a \
tor/src/lib/libtor-version.a \
tor/src/lib/libtor-container.a \
tor/src/lib/libtor-crypt-ops.a \
tor/src/lib/libtor-fs.a \
tor/src/lib/libtor-fdio.a \
tor/src/lib/libtor-sandbox.a \
tor/src/lib/libtor-memarea.a \
tor/src/lib/libtor-intmath.a \
tor/src/lib/libtor-encoding.a \
tor/src/lib/libtor-smartlist-core.a \
tor/src/lib/libtor-lock.a \
tor/src/lib/libtor-wallclock.a \
tor/src/lib/libtor-string.a \
tor/src/lib/libtor-malloc.a \
tor/src/lib/libtor-ctime.a \
tor/src/trunnel/libor-trunnel.a \
tor/src/common/libcurve25519_donna.a \
tor/src/lib/libcurve25519_donna.a \
tor/src/ext/ed25519/donna/libed25519_donna.a \
tor/src/ext/ed25519/ref10/libed25519_ref10.a \
tor/src/ext/keccak-tiny/libkeccak-tiny.a $(ZLIB_LIBS) -lz

tor/src/ext/keccak-tiny/libkeccak-tiny.a
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)

Expand Down
4 changes: 0 additions & 4 deletions src/init.cpp
Expand Up @@ -122,10 +122,6 @@ extern CTxMemPool stempool;

namespace fs = boost::filesystem;

extern const char tor_git_revision[];
const char tor_git_revision[] = "";


extern "C" {
int tor_main(int argc, char *argv[]);
void tor_cleanup(void);
Expand Down
73 changes: 66 additions & 7 deletions src/tor/.appveyor.yml
Expand Up @@ -2,16 +2,47 @@ version: 1.0.{build}

clone_depth: 50

# Appveyor images are named after the Visual Studio version they contain.
# But we compile using MinGW, not Visual Studio.
# We use these images because they have different Windows versions.
image:
# Windows Server 2016
- Visual Studio 2017
# Windows Server 2012 R2
- Visual Studio 2015

environment:
compiler: mingw

matrix:
- target: i686-w64-mingw32
compiler_path: mingw32
openssl_path: /c/OpenSSL-Win32
mingw_prefix: mingw-w64-i686
hardening:
- target: x86_64-w64-mingw32
compiler_path: mingw64
openssl_path: /c/OpenSSL-Win64
mingw_prefix: mingw-w64-x86_64
# hardening doesn't work with mingw-w64-x86_64-gcc, because it's gcc 8
hardening: --disable-gcc-hardening

matrix:
# Don't keep building failing jobs
fast_finish: true
# Skip the 32-bit Windows Server 2016 job, and the 64-bit Windows Server
# 2012 R2 job, to speed up the build.
# The environment variables must be listed without the 'environment' tag.
exclude:
- image: Visual Studio 2017
target: i686-w64-mingw32
compiler_path: mingw32
mingw_prefix: mingw-w64-i686
hardening:
- image: Visual Studio 2015
target: x86_64-w64-mingw32
compiler_path: mingw64
mingw_prefix: mingw-w64-x86_64
# hardening doesn't work with mingw-w64-x86_64-gcc, because it's gcc 8
hardening: --disable-gcc-hardening

install:
- ps: >-
Expand All @@ -26,11 +57,17 @@ install:
{
Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args
}
Execute-Command "C:\msys64\usr\bin\pacman" -Sy --noconfirm openssl-devel openssl libevent-devel libevent mingw-w64-i686-libevent mingw-w64-x86_64-libevent mingw-w64-i686-openssl mingw-w64-x86_64-openssl mingw-w64-i686-zstd mingw-w64-x86_64-zstd
<# mingw packages start with ${env:mingw_prefix}
# unprefixed packages are from MSYS2, which is like Cygwin. Avoid them.
#
# Use pacman --debug to show package downloads and install locations
#>
Execute-Command "C:\msys64\usr\bin\pacman" -Sy --verbose --needed --noconfirm ${env:mingw_prefix}-libevent ${env:mingw_prefix}-pkg-config ${env:mingw_prefix}-xz ${env:mingw_prefix}-zstd ;

build_script:
- ps: >-
if ($env:compiler -eq "mingw") {
<# use the MSYS2 compiler and user binaries to build and install #>
$oldpath = ${env:Path} -split ';'
$buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath
$env:Path = @($buildpath) -join ';'
Expand All @@ -39,24 +76,46 @@ build_script:
Execute-Bash 'autoreconf -i'
mkdir "${env:build}"
Set-Location "${env:build}"
Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings --with-openssl-dir=${env:openssl_path}"
Execute-Bash "which ${env:target}-gcc"
Execute-Bash "${env:target}-gcc --version"
<# compile for mingw
# mingw zstd doesn't come with a pkg-config file, so we manually
# configure its flags. liblzma just works.
#>
Execute-Bash "ZSTD_CFLAGS='-L/${env:compiler_path}/include' ZSTD_LIBS='-L/${env:compiler_path}/lib -lzstd' ../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --with-openssl-dir=/${env:compiler_path} --disable-asciidoc --enable-fatal-warnings ${env:hardening}"
Execute-Bash "V=1 make -j2"
Execute-Bash "V=1 make -j2 install"
}

test_script:
- ps: >-
if ($env:compiler -eq "mingw") {
<# use the MSYS2 compiler binaries to make check #>
$oldpath = ${env:Path} -split ';'
$buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath
$env:Path = $buildpath -join ';'
Set-Location "${env:build}"
Copy-Item "C:/msys64/${env:compiler_path}/bin/libssp-0.dll" -Destination "${env:build}/src/test"
Copy-Item "C:/msys64/${env:compiler_path}/bin/zlib1.dll" -Destination "${env:build}/src/test"
Execute-Bash "VERBOSE=1 make -j2 check"
}

on_success:
- cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci success
on_finish:
- ps: >-
if ($env:compiler -eq "mingw") {
<# use the MSYS2 user binaries to archive failures #>
$oldpath = ${env:Path} -split ';'
$buildpath = @("C:\msys64\usr\bin") + $oldpath
$env:Path = @($buildpath) -join ';'
Set-Location "${env:build}"
<# store logs as appveyor artifacts: see the artifacts tab #>
Execute-Bash "7z a logs.zip config.log || true"
Execute-Bash "7z a logs.zip test-suite.log || true"
Execute-Bash "appveyor PushArtifact logs.zip || true"
Execute-Bash "tail -1000 config.log || true"
Execute-Bash "cat test-suite.log || true"
}

# notify the IRC channel of any failures
on_failure:
- cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci failure