diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 000000000..ff84c01a3
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,65 @@
+version: '{branch}.{build}'
+skip_tags: true
+image: Visual Studio 2017
+configuration: Release
+platform: x64
+environment:
+ APPVEYOR_SAVE_CACHE_ON_ERROR: true
+ CLCACHE_SERVER: 1
+ PACKAGES: boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
+ PYTHONIOENCODING: utf-8
+cache:
+- C:\tools\vcpkg\installed
+- C:\Users\appveyor\clcache
+init:
+- cmd: set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%
+install:
+- cmd: pip install git+https://github.com/frerich/clcache.git
+# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
+# - cmd: pip install zmq
+- ps: $packages = $env:PACKAGES -Split ' '
+- ps: for ($i=0; $i -lt $packages.length; $i++) {
+ $env:ALL_PACKAGES += $packages[$i] + ":" + $env:PLATFORM + "-windows-static "
+ }
+- cmd: git -C C:\Tools\vcpkg pull # This is a temporary fix, can be removed after appveyor update its image to include Microsoft/vcpkg#4046
+- cmd: C:\Tools\vcpkg\bootstrap-vcpkg.bat
+- cmd: vcpkg remove --recurse --outdated
+- cmd: vcpkg install %ALL_PACKAGES%
+- cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library
+before_build:
+- ps: clcache -M 536870912
+- cmd: python build_msvc\msvc-autogen.py
+- ps: $files = (Get-ChildItem -Recurse | where {$_.extension -eq ".vcxproj"}).FullName
+- ps: for (${i} = 0; ${i} -lt ${files}.length; ${i}++) {
+ ${content} = (Get-Content ${files}[${i}]);
+ ${content} = ${content}.Replace("", "None");
+ ${content} = ${content}.Replace("true", "false");
+ ${content} = ${content}.Replace("NDEBUG;", "");
+ Set-Content ${files}[${i}] ${content};
+ }
+- ps: Start-Process clcache-server
+- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
+build_script:
+- cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
+after_build:
+- ps: fsutil behavior set disablelastaccess 0 # Disable Access time feature on Windows (better performance)
+- ps: clcache -z
+before_test:
+- ps: ${conf_ini} = (Get-Content([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini.in")))
+- ps: ${conf_ini} = ${conf_ini}.Replace("@abs_top_srcdir@", ${env:APPVEYOR_BUILD_FOLDER})
+- ps: ${conf_ini} = ${conf_ini}.Replace("@abs_top_builddir@", ${env:APPVEYOR_BUILD_FOLDER})
+- ps: ${conf_ini} = ${conf_ini}.Replace("@EXEEXT@", ".exe")
+- ps: ${conf_ini} = ${conf_ini}.Replace("@ENABLE_WALLET_TRUE@", "")
+- ps: ${conf_ini} = ${conf_ini}.Replace("@BUILD_BITCOIN_CLI_TRUE@", "")
+- ps: ${conf_ini} = ${conf_ini}.Replace("@BUILD_BITCOIND_TRUE@", "")
+- ps: ${conf_ini} = ${conf_ini}.Replace("@ENABLE_ZMQ_TRUE@", "")
+- ps: ${utf8} = New-Object System.Text.UTF8Encoding ${false}
+- ps: '[IO.File]::WriteAllLines([IO.Path]::Combine(${env:APPVEYOR_BUILD_FOLDER}, "test", "config.ini"), ${conf_ini}, ${utf8})'
+- ps: move "build_msvc\${env:PLATFORM}\${env:CONFIGURATION}\*.exe" src
+test_script:
+- cmd: src\test_bitcoin.exe
+- ps: src\bench_bitcoin.exe -evals=1 -scaling=0
+- ps: python test\util\bitcoin-util-test.py
+- cmd: python test\util\rpcauth-test.py
+- cmd: python test\functional\test_runner.py --force --quiet --combinedlogslen=4000 --exclude wallet_multiwallet
+deploy: off
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..00d5478c4
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,31 @@
+Pull requests without a rationale and clear improvement may be closed
+immediately.
+
+Please provide clear motivation for your patch and explain how it improves
+Bitcoin Core user experience or Bitcoin Core developer experience
+significantly.
+
+* Any test improvements or new tests that improve coverage are always welcome.
+* All other changes should have accompanying unit tests (see `src/test/`) or
+ functional tests (see `test/`). Contributors should note which tests cover
+ modified code. If no tests exist for a region of modified code, new tests
+ should accompany the change.
+* Bug fixes are most welcome when they come with steps to reproduce or an
+ explanation of the potential issue as well as reasoning for the way the bug
+ was fixed.
+* Features are welcome, but might be rejected due to design or scope issues.
+ If a feature is based on a lot of dependencies, contributors should first
+ consider building the system outside of Bitcoin Core, if possible.
+* Refactoring changes are only accepted if they are required for a feature or
+ bug fix or otherwise improve developer experience significantly. For example,
+ most "code style" refactoring changes require a thorough explanation why they
+ are useful, what downsides they have and why they *significantly* improve
+ developer experience or avoid serious programming bugs. Note that code style
+ is often a subjective matter. Unless they are explicitly mentioned to be
+ preferred in the [developer notes](/doc/developer-notes.md), stylistic code
+ changes are usually rejected.
+
+Bitcoin Core has a thorough review process and even the most trivial change
+needs to pass a lot of eyes and requires non-zero or even substantial time
+effort to review. There is a huge lack of active reviewers on the project, so
+patches often sit for a long time.
diff --git a/.travis.yml b/.travis.yml
index 69092e82a..647d11773 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,16 +5,19 @@ language: minimal
cache:
ccache: true
directories:
- - depends/built
- - depends/sdk-sources
- - $HOME/.ccache
+ - depends/built
+ - depends/sdk-sources
+ - $HOME/.ccache
stages:
- lint
- test
env:
global:
- MAKEJOBS=-j3
- - RUN_TESTS=false
+ - RUN_UNIT_TESTS=true
+ - RUN_FUNCTIONAL_TESTS=true
+ - RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
+ - DOCKER_NAME_TAG=ubuntu:18.04
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
- CCACHE_SIZE=100M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
@@ -24,85 +27,111 @@ env:
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
- WINEDEBUG=fixme-all
- DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
- matrix:
-# ARM
- - HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
-# Win32
- - HOST=i686-w64-mingw32 DPKG_ADD_ARCH="i386" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
-# Win64
- - HOST=x86_64-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
-# 32-bit + dash
- - HOST=i686-pc-linux-gnu PACKAGES="g++-multilib python3-zmq" DEP_OPTS="NO_QT=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" CONFIG_SHELL="/bin/dash"
-# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout)
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
-# Qt4 & system libs
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qt4-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev xvfb libqt4-dev" NO_DEPENDS=1 NEED_XVFB=1 RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt4 CPPFLAGS=-DDEBUG_LOCKORDER" DISPLAY=:99.0
-# x86_64 Linux, No wallet
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
-# Cross-Mac
- - HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" OSX_SDK=10.11 GOAL="deploy"
-
before_install:
- - export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
+ - set -o errexit; source .travis/test_03_before_install.sh
install:
- - env | grep -E '^(CCACHE_|WINEDEBUG|DISPLAY|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
- - if [[ $HOST = *-mingw32 ]]; then DOCKER_ADMIN="--cap-add SYS_ADMIN"; fi
- - DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env ubuntu:18.04)
- - DOCKER_EXEC () { docker exec $DOCKER_ID bash -c "cd $PWD && $*"; }
- - if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi
- - travis_retry DOCKER_EXEC apt-get update
- - travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
+ - set -o errexit; source .travis/test_04_install.sh
before_script:
- - mkdir -p depends/SDKs depends/sdk-sources
- - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- - if [[ $HOST = *-mingw32 ]]; then DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\); fi
- - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS; fi
- # Start xvfb if needed, as documented at https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- - if [ "$NEED_XVFB" = 1 ]; then DOCKER_EXEC /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac; fi
+ - set -o errexit; source .travis/test_05_before_script.sh
script:
- - export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
- - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
- - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
- - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi
- - test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh
- - mkdir build && cd build
- - DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - DOCKER_EXEC make distdir VERSION=$HOST
- - cd bitcoin-$HOST
- - DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
- - if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; fi
- - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
- - if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; fi
+ - set -o errexit; source .travis/test_06_script.sh
after_script:
- - echo $TRAVIS_COMMIT_RANGE
- - echo $TRAVIS_COMMIT_LOG
-
+ - echo $TRAVIS_COMMIT_RANGE
+ - echo $TRAVIS_COMMIT_LOG
jobs:
include:
+# lint stage
- stage: lint
+ env:
sudo: false
cache: false
- addons:
- apt:
- packages:
- - python3-pip
- - shellcheck
+ language: python
+ python: '3.6'
install:
- - travis_retry pip3 install flake8 --user
+ - set -o errexit; source .travis/lint_04_install.sh
before_script:
- - git fetch --unshallow
+ - set -o errexit; source .travis/lint_05_before_script.sh
script:
- - if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE; fi
- - test/lint/git-subtree-check.sh src/crypto/ctaes
- - test/lint/git-subtree-check.sh src/secp256k1
- - test/lint/git-subtree-check.sh src/univalue
- - test/lint/git-subtree-check.sh src/leveldb
-# - test/lint/check-doc.py
-# - test/lint/check-rpc-mappings.py .
- - test/lint/lint-all.sh
-# - if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
-# while read LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
-# travis_wait 30 contrib/verify-commits/verify-commits.sh;
-# fi
+ - set -o errexit; source .travis/lint_06_script.sh
+# ARM
+ - stage: test
+ env: >-
+ HOST=arm-linux-gnueabihf
+ PACKAGES="g++-arm-linux-gnueabihf"
+ DEP_OPTS="NO_QT=1"
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="install"
+ # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
+ # This could be removed once the ABI change warning does not show up by default
+ BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
+# Win32
+ - stage: test
+ env: >-
+ HOST=i686-w64-mingw32
+ DPKG_ADD_ARCH="i386"
+ DEP_OPTS="NO_QT=1"
+ PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-reduce-exports"
+# Win64
+ - stage: test
+ env: >-
+ HOST=x86_64-w64-mingw32
+ DEP_OPTS="NO_QT=1"
+ PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-reduce-exports"
+# 32-bit + dash
+ - stage: test
+ env: >-
+ HOST=i686-pc-linux-gnu
+ PACKAGES="g++-multilib python3-zmq"
+ DEP_OPTS="NO_QT=1"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
+ CONFIG_SHELL="/bin/dash"
+# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout)
+ - stage: test
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
+ DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
+# x86_64 Linux (no depends, only system libs)
+ - stage: test
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
+ NO_DEPENDS=1
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
+# x86_64 Linux (sanitizers)
+ - stage: test
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="clang python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
+ NO_DEPENDS=1
+ RUN_BENCH=true
+ RUN_FUNCTIONAL_TESTS=false # Disabled for now, can be combined with the other x86_64 linux NO_DEPENDS job when functional tests pass the sanitizers
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=undefined CC=clang CXX=clang++"
+# x86_64 Linux, No wallet
+ - stage: test
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3-zmq"
+ DEP_OPTS="NO_WALLET=1"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+# Cross-Mac
+ - stage: test
+ env: >-
+ HOST=x86_64-apple-darwin14
+ PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
+ OSX_SDK=10.11
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="all deploy"
+ BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
diff --git a/.travis/README.md b/.travis/README.md
new file mode 100644
index 000000000..21d1b9cc0
--- /dev/null
+++ b/.travis/README.md
@@ -0,0 +1,8 @@
+## travis build scripts
+
+The `.travis` directory contains scripts for each build step in each build stage.
+Currently the travis build defines two stages `lint` and `test`. Each stage has
+it's own [lifecycle](https://docs.travis-ci.com/user/customizing-the-build/#the-build-lifecycle).
+Every script in here is named and numbered according to which stage and lifecycle
+step it belongs to.
+
diff --git a/.travis/lint_04_install.sh b/.travis/lint_04_install.sh
new file mode 100755
index 000000000..792518902
--- /dev/null
+++ b/.travis/lint_04_install.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C
+
+travis_retry pip install codespell==1.13.0
+travis_retry pip install flake8
diff --git a/.travis/lint_05_before_script.sh b/.travis/lint_05_before_script.sh
new file mode 100755
index 000000000..28bcbb47f
--- /dev/null
+++ b/.travis/lint_05_before_script.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C
+
+git fetch --unshallow
diff --git a/.travis/lint_06_script.sh b/.travis/lint_06_script.sh
new file mode 100755
index 000000000..6191d8257
--- /dev/null
+++ b/.travis/lint_06_script.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C
+
+if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
+ test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE
+fi
+
+test/lint/git-subtree-check.sh src/crypto/ctaes
+test/lint/git-subtree-check.sh src/secp256k1
+test/lint/git-subtree-check.sh src/univalue
+test/lint/git-subtree-check.sh src/leveldb
+test/lint/check-doc.py
+test/lint/check-rpc-mappings.py .
+test/lint/lint-all.sh
+
+if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
+ while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
+ travis_wait 50 contrib/verify-commits/verify-commits.py;
+fi
diff --git a/.travis/test_03_before_install.sh b/.travis/test_03_before_install.sh
new file mode 100755
index 000000000..d091a67ca
--- /dev/null
+++ b/.travis/test_03_before_install.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
+export PATH
+
+BEGIN_FOLD () {
+ echo ""
+ CURRENT_FOLD_NAME=$1
+ echo "travis_fold:start:${CURRENT_FOLD_NAME}"
+}
+
+END_FOLD () {
+ RET=$?
+ echo "travis_fold:end:${CURRENT_FOLD_NAME}"
+ if [ $RET != 0 ]; then
+ echo "${CURRENT_FOLD_NAME} failed with status code ${RET}"
+ fi
+}
+
diff --git a/.travis/test_04_install.sh b/.travis/test_04_install.sh
new file mode 100755
index 000000000..ef595287b
--- /dev/null
+++ b/.travis/test_04_install.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+travis_retry docker pull "$DOCKER_NAME_TAG"
+env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
+if [[ $HOST = *-mingw32 ]]; then
+ DOCKER_ADMIN="--cap-add SYS_ADMIN"
+fi
+DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
+
+DOCKER_EXEC () {
+ docker exec $DOCKER_ID bash -c "cd $PWD && $*"
+}
+
+if [ -n "$DPKG_ADD_ARCH" ]; then
+ DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
+fi
+
+travis_retry DOCKER_EXEC apt-get update
+travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
+
diff --git a/.travis/test_05_before_script.sh b/.travis/test_05_before_script.sh
new file mode 100755
index 000000000..70caee979
--- /dev/null
+++ b/.travis/test_05_before_script.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file
+
+mkdir -p depends/SDKs depends/sdk-sources
+
+if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
+ curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
+fi
+if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
+ tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
+fi
+if [[ $HOST = *-mingw32 ]]; then
+ DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
+fi
+if [ -z "$NO_DEPENDS" ]; then
+ DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
+fi
+
diff --git a/.travis/test_06_script.sh b/.travis/test_06_script.sh
new file mode 100755
index 000000000..59cc110db
--- /dev/null
+++ b/.travis/test_06_script.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+TRAVIS_COMMIT_LOG=$(git log --format=fuller -1)
+export TRAVIS_COMMIT_LOG
+
+OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
+BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
+if [ -z "$NO_DEPENDS" ]; then
+ DOCKER_EXEC ccache --max-size=$CCACHE_SIZE
+fi
+
+BEGIN_FOLD autogen
+if [ -n "$CONFIG_SHELL" ]; then
+ DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
+else
+ DOCKER_EXEC ./autogen.sh
+fi
+END_FOLD
+
+mkdir build
+cd build || (echo "could not enter build directory"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+END_FOLD
+
+BEGIN_FOLD distdir
+DOCKER_EXEC make distdir VERSION=$HOST
+END_FOLD
+
+cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+END_FOLD
+
+BEGIN_FOLD build
+DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
+END_FOLD
+
+if [ "$RUN_UNIT_TESTS" = "true" ]; then
+ BEGIN_FOLD unit-tests
+ DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
+ END_FOLD
+fi
+
+if [ "$RUN_BENCH" = "true" ]; then
+ BEGIN_FOLD bench
+ DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001
+ END_FOLD
+fi
+
+if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
+ extended="--extended --exclude feature_pruning"
+fi
+
+if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
+ BEGIN_FOLD functional-tests
+ DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}
+ END_FOLD
+fi
diff --git a/.tx/config b/.tx/config
index 3a7c825a7..c0931c0f3 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
-[bitcoin.qt-translation-016x]
+[bitcoin.qt-translation-017x]
file_filter = src/qt/locale/bitcoin_.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c390595ab..3d5dc3221 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -119,6 +119,8 @@ At this stage one should expect comments and review from other contributors. You
can add more commits to your pull request by committing them locally and pushing
to your fork until you have satisfied all feedback.
+Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NAK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes.
+
Squashing Commits
---------------------------
If your pull request is accepted for merging, you may be asked by a maintainer
@@ -127,10 +129,10 @@ before it will be merged. The basic squashing workflow is shown below.
git checkout your_branch_name
git rebase -i HEAD~n
- # n is normally the number of commits in the pull
- # set commits from 'pick' to 'squash', save and quit
- # on the next screen, edit/refine commit messages
- # save and quit
+ # n is normally the number of commits in the pull request.
+ # Set commits (except the one in the first line) from 'pick' to 'squash', save and quit.
+ # On the next screen, edit/refine commit messages.
+ # Save and quit.
git push -f # (force push to GitHub)
If you have problems with squashing (or other workflows with `git`), you can
diff --git a/Makefile.am b/Makefile.am
index 19b1fc69c..9c39a75e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,8 +42,7 @@ DIST_CONTRIB = $(top_srcdir)/contrib/bitcoin-cli.bash-completion \
$(top_srcdir)/contrib/bitcoin-tx.bash-completion \
$(top_srcdir)/contrib/bitcoind.bash-completion \
$(top_srcdir)/contrib/init \
- $(top_srcdir)/contrib/install_db4.sh \
- $(top_srcdir)/contrib/rpm
+ $(top_srcdir)/contrib/install_db4.sh
DIST_SHARE = \
$(top_srcdir)/share/genbuild.sh \
$(top_srcdir)/share/rpcauth
@@ -96,9 +95,9 @@ $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@
-$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
+$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: all-recursive
$(MKDIR_P) $(@D)
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $@
$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
$(MKDIR_P) $(@D)
@@ -170,7 +169,7 @@ $(BITCOIN_CLI_BIN): FORCE
$(MAKE) -C src $(@F)
if USE_LCOV
-LCOV_FILTER_PATTERN=-p "/usr/include/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"
+LCOV_FILTER_PATTERN=-p "/usr/include/" -p "/usr/lib/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"
baseline.info:
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
@@ -324,4 +323,4 @@ clean-docs:
clean-local: clean-docs
rm -rf coverage_percent.txt test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
- rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache
+ rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
diff --git a/README.md b/README.md
index fd9377824..944969ec1 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,8 @@ Development Status
------
[![Build Status](https://travis-ci.com/BTCPrivate/BTCP-Rebase.svg?branch=master)](https://travis-ci.com/BTCPrivate/BTCP-Rebase)
-This should build on linux and sync the full BTCP mainnet chain. Wallet code and test suite is not fully working yet.
+This Bitcoin Private cryptocurrency daemon and cli tools should build on linux and sync the full BTCP mainnet chain.
+Z addresses, wallet code, and tests are not fully working yet and should be considered unstable.
Build Instructions
-------
@@ -74,3 +75,30 @@ License
Bitcoin Private is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see https://opensource.org/licenses/MIT.
+
+### Automated Testing
+
+Developers are strongly encouraged to write [unit tests](src/test/README.md) for new code, and to
+submit new unit tests for old code. Unit tests can be compiled and run
+(assuming they weren't disabled in configure) with: `make check`. Further details on running
+and extending unit tests can be found in [/src/test/README.md](/src/test/README.md).
+
+There are also [regression and integration tests](/test), written
+in Python, that are run automatically on the build server.
+These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py`
+
+The Travis CI system makes sure that every pull request is built for Windows, Linux, and macOS, and that unit/sanity tests are run automatically.
+
+### Manual Quality Assurance (QA) Testing
+
+Changes should be tested by somebody other than the developer who wrote the
+code. This is especially important for large or high-risk changes. It is useful
+to add a test plan to the pull request description if testing the changes is
+not straightforward.
+
+Translations
+------------
+
+Changes to translations as well as new translations can be submitted to the issue tracker. We
+will be adding transifex support at a later point in time, and for now porting those changes directly
+from Bitcoin Core.
diff --git a/autogen.sh b/autogen.sh
index 27417daf7..0c05626cc 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
set -e
srcdir="$(dirname $0)"
cd "$srcdir"
diff --git a/build-aux/m4/ax_boost_chrono.m4 b/build-aux/m4/ax_boost_chrono.m4
index e9b0f2061..6ea77b9b3 100644
--- a/build-aux/m4/ax_boost_chrono.m4
+++ b/build-aux/m4/ax_boost_chrono.m4
@@ -81,7 +81,6 @@ AC_DEFUN([AX_BOOST_CHRONO],
LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_chrono_lib" = "x"; then
- ax_lib=
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
@@ -106,7 +105,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
fi
if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the boost_chrono library!)
+ AC_MSG_ERROR(Could not find a version of the library!)
fi
if test "x$link_chrono" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
diff --git a/build-aux/m4/ax_boost_program_options.m4 b/build-aux/m4/ax_boost_program_options.m4
deleted file mode 100644
index 2bdb59371..000000000
--- a/build-aux/m4/ax_boost_program_options.m4
+++ /dev/null
@@ -1,108 +0,0 @@
-# ============================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_PROGRAM_OPTIONS
-#
-# DESCRIPTION
-#
-# Test for program options library from the Boost C++ libraries. The macro
-# requires a preceding call to AX_BOOST_BASE. Further documentation is
-# available at .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
-#
-# And sets:
-#
-# HAVE_BOOST_PROGRAM_OPTIONS
-#
-# LICENSE
-#
-# Copyright (c) 2009 Thomas Porschberg
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 24
-
-AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
-[
- AC_ARG_WITH([boost-program-options],
- AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
- [use the program options library from boost - it is possible to specify a certain library for the linker
- e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
- [
- if test "$withval" = "no"; then
- want_boost="no"
- elif test "$withval" = "yes"; then
- want_boost="yes"
- ax_boost_user_program_options_lib=""
- else
- want_boost="yes"
- ax_boost_user_program_options_lib="$withval"
- fi
- ],
- [want_boost="yes"]
- )
-
- if test "x$want_boost" = "xyes"; then
- AC_REQUIRE([AC_PROG_CC])
- export want_boost
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
- LDFLAGS_SAVED="$LDFLAGS"
- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
- export LDFLAGS
- AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
- ax_cv_boost_program_options,
- [AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include
- ]],
- [[boost::program_options::error err("Error message");
- return 0;]])],
- ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
- AC_LANG_POP([C++])
- ])
- if test "$ax_cv_boost_program_options" = yes; then
- AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
- BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
- if test "x$ax_boost_user_program_options_lib" = "x"; then
- for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
- [link_program_options="no"])
- done
- if test "x$link_program_options" != "xyes"; then
- for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
- ax_lib=${libextension}
- AC_CHECK_LIB($ax_lib, exit,
- [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
- [link_program_options="no"])
- done
- fi
- else
- for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
- AC_CHECK_LIB($ax_lib, main,
- [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
- [link_program_options="no"])
- done
- fi
- if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the boost_program_options library!)
- fi
- if test "x$link_program_options" != "xyes"; then
- AC_MSG_ERROR([Could not link against [$ax_lib] !])
- fi
- fi
- CPPFLAGS="$CPPFLAGS_SAVED"
- LDFLAGS="$LDFLAGS_SAVED"
- fi
-])
diff --git a/build-aux/m4/ax_boost_unit_test_framework.m4 b/build-aux/m4/ax_boost_unit_test_framework.m4
index 0cdbe752c..3d8e93e96 100644
--- a/build-aux/m4/ax_boost_unit_test_framework.m4
+++ b/build-aux/m4/ax_boost_unit_test_framework.m4
@@ -76,7 +76,6 @@ AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
saved_ldflags="${LDFLAGS}"
- ax_lib=
for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
if test -r $monitor_library ; then
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a.*$;\1;'`
@@ -125,7 +124,7 @@ AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
done
fi
if test "x$ax_lib" = "x"; then
- AC_MSG_ERROR(Could not find a version of the boost_unit_test_framework library!)
+ AC_MSG_ERROR(Could not find a version of the library!)
fi
if test "x$link_unit_test_framework" != "xyes"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index f41508336..05df8621d 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -53,8 +53,8 @@ dnl CAUTION: Do not use this inside of a conditional.
AC_DEFUN([BITCOIN_QT_INIT],[
dnl enable qt support
AC_ARG_WITH([gui],
- [AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
- [build bitcoin-qt GUI (default=auto, qt5 tried first)])],
+ [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@],
+ [build bitcoin-qt GUI (default=auto)])],
[
bitcoin_qt_want_version=$withval
if test "x$bitcoin_qt_want_version" = xyes; then
@@ -94,18 +94,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
fi
if test "x$use_pkgconfig" = xyes; then
- BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
+ BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG])
else
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
fi
dnl This is ugly and complicated. Yuck. Works as follows:
- dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
- dnl check a header to find out. When Qt is built statically, some plugins must
- dnl be linked into the final binary as well. These plugins have changed between
- dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
- dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
- dnl assumed for windows builds.
+ dnl For Qt5, we can check a header to find out whether Qt is build
+ dnl statically. When Qt is built statically, some plugins must be linked into
+ dnl the final binary as well.
+ dnl With Qt5, languages moved into core and the WindowsIntegration plugin was
+ dnl added.
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
dnl results to QT_LIBS.
BITCOIN_QT_CHECK([
@@ -113,53 +112,40 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
TEMP_CXXFLAGS=$CXXFLAGS
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
- if test "x$bitcoin_qt_got_major_vers" = x5; then
- _BITCOIN_QT_IS_STATIC
- if test "x$bitcoin_cv_static_qt" = xyes; then
- _BITCOIN_QT_FIND_STATIC_PLUGINS
- AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
- AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #ifndef QT_VERSION
- # include
- #endif
- ]],
- [[
- #if QT_VERSION >= 0x050400
- choke
- #endif
- ]])],
- [bitcoin_cv_need_acc_widget=yes],
- [bitcoin_cv_need_acc_widget=no])
- ])
- if test "x$bitcoin_cv_need_acc_widget" = xyes; then
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
- fi
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
- AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
- if test "x$TARGET_OS" = xwindows; then
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
- AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
- elif test "x$TARGET_OS" = xlinux; then
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
- AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
- elif test "x$TARGET_OS" = xdarwin; then
- AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
- AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
- fi
+ _BITCOIN_QT_IS_STATIC
+ if test "x$bitcoin_cv_static_qt" = xyes; then
+ _BITCOIN_QT_FIND_STATIC_PLUGINS
+ AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
+ AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #ifndef QT_VERSION
+ # include
+ #endif
+ ]],
+ [[
+ #if QT_VERSION >= 0x050400
+ choke
+ #endif
+ ]])],
+ [bitcoin_cv_need_acc_widget=yes],
+ [bitcoin_cv_need_acc_widget=no])
+ ])
+ if test "x$bitcoin_cv_need_acc_widget" = xyes; then
+ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
fi
- else
+ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
+ AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
if test "x$TARGET_OS" = xwindows; then
- AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
- _BITCOIN_QT_CHECK_STATIC_PLUGINS([
- Q_IMPORT_PLUGIN(qcncodecs)
- Q_IMPORT_PLUGIN(qjpcodecs)
- Q_IMPORT_PLUGIN(qtwcodecs)
- Q_IMPORT_PLUGIN(qkrcodecs)
- Q_IMPORT_PLUGIN(AccessibleFactory)],
- [-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
+ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
+ AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
+ elif test "x$TARGET_OS" = xlinux; then
+ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
+ AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
+ elif test "x$TARGET_OS" = xdarwin; then
+ AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
+ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
+ AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
fi
fi
CPPFLAGS=$TEMP_CPPFLAGS
@@ -167,9 +153,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
])
if test "x$use_pkgconfig$qt_bin_path" = xyes; then
- if test "x$bitcoin_qt_got_major_vers" = x5; then
- qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
- fi
+ qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
fi
if test "x$use_hardening" != xno; then
@@ -219,11 +203,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
])
fi
- BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
- BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
- BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
- BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
- BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
+ BITCOIN_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path)
+ BITCOIN_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path)
+ BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path)
+ BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
+ BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
case $host in
@@ -262,7 +246,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
],[
bitcoin_enable_qt=no
])
- AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
+ AC_MSG_RESULT([$bitcoin_enable_qt (Qt5)])
AC_SUBST(QT_PIE_FLAGS)
AC_SUBST(QT_INCLUDES)
@@ -272,7 +256,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AC_SUBST(QT_DBUS_LIBS)
AC_SUBST(QT_TEST_INCLUDES)
AC_SUBST(QT_TEST_LIBS)
- AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
+ AC_SUBST(QT_SELECT, qt5)
AC_SUBST(MOC_DEFS)
])
@@ -292,7 +276,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
#endif
]],
[[
- #if QT_VERSION < 0x050000
+ #if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5
choke
#endif
]])],
@@ -300,13 +284,11 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
[bitcoin_cv_qt5=no])
])])
-dnl Internal. Check if the linked version of Qt was built as static libs.
-dnl Requires: Qt5. This check cannot determine if Qt4 is static.
-dnl Requires: INCLUDES and LIBS must be populated as necessary.
-dnl Output: bitcoin_cv_static_qt=yes|no
-dnl Output: Defines QT_STATICPLUGIN if plugins are static.
-AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
- AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
+dnl Internal. Check if the included version of Qt is greater than Qt58.
+dnl Requires: INCLUDES must be populated as necessary.
+dnl Output: bitcoin_cv_qt5=yes|no
+AC_DEFUN([_BITCOIN_QT_CHECK_QT58],[
+ AC_CACHE_CHECK(for > Qt 5.7, bitcoin_cv_qt58,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include
#ifndef QT_VERSION
@@ -314,13 +296,36 @@ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
#endif
]],
[[
- #if !defined(QT_STATIC)
+ #if QT_VERSION_MINOR < 8
choke
#endif
]])],
- [bitcoin_cv_static_qt=yes],
- [bitcoin_cv_static_qt=no])
- ])
+ [bitcoin_cv_qt58=yes],
+ [bitcoin_cv_qt58=no])
+])])
+
+
+dnl Internal. Check if the linked version of Qt was built as static libs.
+dnl Requires: Qt5.
+dnl Requires: INCLUDES and LIBS must be populated as necessary.
+dnl Output: bitcoin_cv_static_qt=yes|no
+dnl Output: Defines QT_STATICPLUGIN if plugins are static.
+AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
+ AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #ifndef QT_VERSION OR QT_VERSION_STR
+ # include
+ #endif
+ ]],
+ [[
+ #if !defined(QT_STATIC)
+ choke
+ #endif
+ ]])],
+ [bitcoin_cv_static_qt=yes],
+ [bitcoin_cv_static_qt=no])
+ ])
if test "x$bitcoin_cv_static_qt" = xyes; then
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
fi
@@ -346,28 +351,36 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
])
dnl Internal. Find paths necessary for linking qt static plugins
-dnl Inputs: bitcoin_qt_got_major_vers. 4 or 5.
dnl Inputs: qt_plugin_path. optional.
dnl Outputs: QT_LIBS is appended
AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
- if test "x$bitcoin_qt_got_major_vers" = x5; then
- if test "x$qt_plugin_path" != x; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
- if test -d "$qt_plugin_path/accessible"; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
- fi
+ if test "x$qt_plugin_path" != x; then
+ QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
+ if test -d "$qt_plugin_path/accessible"; then
+ QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
fi
if test "x$use_pkgconfig" = xyes; then
: dnl
m4_ifdef([PKG_CHECK_MODULES],[
- PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
+ if test x$bitcoin_cv_qt58 = xno; then
+ PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
+ else
+ PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
+ fi
if test "x$TARGET_OS" = xlinux; then
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
fi
elif test "x$TARGET_OS" = xdarwin; then
- PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
+ PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"])
fi
])
else
@@ -380,7 +393,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
#endif
]],
[[
- #if QT_VERSION < 0x050600
+ #if QT_VERSION < 0x050600 || QT_VERSION_MINOR < 6
choke
#endif
]])],
@@ -388,16 +401,21 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
[bitcoin_cv_need_platformsupport=no])
])
if test "x$bitcoin_cv_need_platformsupport" = xyes; then
- BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}PlatformSupport not found)))
+ if test x$bitcoin_cv_qt58 = xno; then
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
+ else
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FontDatabaseSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFontDatabaseSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}EventDispatcherSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXEventDispatcherSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}ThemeSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXThemeSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FbSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFbSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}DeviceDiscoverySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXDeviceDiscoverySupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}AccessibilitySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXAccessibilitySupport not found)))
+ QT_LIBS="$QT_LIBS -lversion -ldwmapi -luxtheme"
+ fi
fi
fi
fi
- else
- if test "x$qt_plugin_path" != x; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
- fi
- fi
+ fi
])
dnl Internal. Find Qt libraries using pkg-config.
@@ -406,38 +424,14 @@ dnl first.
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
dnl first.
dnl Outputs: All necessary QT_* variables are set.
-dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
m4_ifdef([PKG_CHECK_MODULES],[
- auto_priority_version=$1
- if test "x$auto_priority_version" = x; then
- auto_priority_version=qt5
- fi
- if test "x$bitcoin_qt_want_version" = xqt5 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt5 ); then
- QT_LIB_PREFIX=Qt5
- bitcoin_qt_got_major_vers=5
- else
- QT_LIB_PREFIX=Qt
- bitcoin_qt_got_major_vers=4
- fi
+ QT_LIB_PREFIX=Qt5
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
- qt4_modules="QtCore QtGui QtNetwork"
BITCOIN_QT_CHECK([
- if test "x$bitcoin_qt_want_version" = xqt5 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt5 ); then
- PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
- elif test "x$bitcoin_qt_want_version" = xqt4 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt4 ); then
- PKG_CHECK_MODULES([QT4], [$qt4_modules], [QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes], [have_qt=no])
- fi
+ PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
- dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
- if test "x$have_qt" = xno && test "x$bitcoin_qt_want_version" = xauto; then
- if test "x$auto_priority_version" = xqt5; then
- PKG_CHECK_MODULES([QT4], [$qt4_modules], [QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
- else
- PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
- fi
- fi
if test "x$have_qt" != xyes; then
have_qt=no
BITCOIN_QT_FAIL([Qt dependencies not found])
@@ -458,7 +452,6 @@ dnl from the discovered headers.
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
dnl Outputs: All necessary QT_* variables are set.
-dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
TEMP_CPPFLAGS="$CPPFLAGS"
@@ -479,14 +472,9 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
BITCOIN_QT_CHECK([
if test "x$bitcoin_qt_want_version" = xauto; then
_BITCOIN_QT_CHECK_QT5
+ _BITCOIN_QT_CHECK_QT58
fi
- if test "x$bitcoin_cv_qt5" = xyes || test "x$bitcoin_qt_want_version" = xqt5; then
- QT_LIB_PREFIX=Qt5
- bitcoin_qt_got_major_vers=5
- else
- QT_LIB_PREFIX=Qt
- bitcoin_qt_got_major_vers=4
- fi
+ QT_LIB_PREFIX=Qt5
])
BITCOIN_QT_CHECK([
@@ -501,16 +489,19 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
])
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([jpeg_create_decompress] ,[qtjpeg jpeg],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
+ if test x$bitcoin_cv_qt58 = xno; then
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
+ else
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtlibpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre2_match_16], [qtpcre2 libqtpcre2],,AC_MSG_WARN([libqtpcre2 not found. Assuming qt has it built-in])))
+ fi
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng qtharfbuzz harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found)))
- if test "x$bitcoin_qt_got_major_vers" = x5; then
- BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found)))
- fi
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found)))
QT_LIBS="$LIBS"
LIBS="$TEMP_LIBS"
diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore
new file mode 100644
index 000000000..d5aa22c05
--- /dev/null
+++ b/build_msvc/.gitignore
@@ -0,0 +1,11 @@
+# Build directories
+Debug/*
+Release/*
+.vs
+packages/*
+*/Obj
+*/Debug
+*/Release
+*/x64
+*.vcxproj.user
+*.vcxproj
diff --git a/build_msvc/README.md b/build_msvc/README.md
new file mode 100644
index 000000000..5fb08df8d
--- /dev/null
+++ b/build_msvc/README.md
@@ -0,0 +1,56 @@
+Building Bitcoin Core with Visual Studio
+========================================
+
+Introduction
+---------------------
+Solution and project files to build the Bitcoin Core applications (except Qt dependent ones) with Visual Studio 2017 can be found in the build_msvc directory.
+
+Building with Visual Studio is an alternative to the Linux based [cross-compiler build](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md).
+
+Dependencies
+---------------------
+A number of [open source libraries](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) are required in order to be able to build Bitcoin.
+
+Options for installing the dependencies in a Visual Studio compatible manner are:
+
+- Use Microsoft's [vcpkg](https://docs.microsoft.com/en-us/cpp/vcpkg) to download the source packages and build locally. This is the recommended approach.
+- Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files.
+- Use [nuget](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party.
+
+The external dependencies required for the Visual Studio build are (see the [dependencies doc](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) for versions):
+
+- Berkeley DB,
+- OpenSSL,
+- Boost,
+- libevent,
+- ZeroMQ
+
+Additional dependencies required from the [bitcoin-core](https://github.com/bitcoin-core) github repository are:
+- SECP256K1,
+- LevelDB
+
+Building
+---------------------
+The instructions below use vcpkg to install the dependencies.
+
+- Clone and vcpkg from the [github repository](https://github.com/Microsoft/vcpkg) and install as per the instructions in the main README.md.
+- Install the required packages (replace x64 with x86 as required):
+- Install the required dependencies with vcpkg:
+
+```
+ PS >.\vcpkg install boost:x64-windows-static `
+ libevent:x64-windows-static `
+ openssl:x64-windows-static `
+ zeromq:x64-windows-static `
+ berkeleydb:x64-windows-static `
+ secp256k1:x64-windows-static `
+ leveldb:x64-windows-static
+```
+
+- Use Python to generate *.vcxproj from Makefile
+
+```
+ PS >python msvc-autogen.py
+```
+
+- Build in Visual Studio.
\ No newline at end of file
diff --git a/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj b/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj
new file mode 100644
index 000000000..b987a337c
--- /dev/null
+++ b/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj
@@ -0,0 +1,217 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+ 15.0
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}
+ Win32Proj
+ bench_bitcoin
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ static
+
+
+ true
+ static
+
+
+ true
+ static
+
+
+ false
+ static
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ There was an error executing the raw bench header generation task.
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/bitcoin-cli/bitcoin-cli.vcxproj b/build_msvc/bitcoin-cli/bitcoin-cli.vcxproj
new file mode 100644
index 000000000..32f0354fa
--- /dev/null
+++ b/build_msvc/bitcoin-cli/bitcoin-cli.vcxproj
@@ -0,0 +1,180 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+ {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+ 15.0
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}
+ Win32Proj
+ bitcoincli
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
diff --git a/build_msvc/bitcoin-tx/bitcoin-tx.vcxproj b/build_msvc/bitcoin-tx/bitcoin-tx.vcxproj
new file mode 100644
index 000000000..a9fae6b73
--- /dev/null
+++ b/build_msvc/bitcoin-tx/bitcoin-tx.vcxproj
@@ -0,0 +1,180 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+ 15.0
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}
+ Win32Proj
+ bitcointx
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln
new file mode 100644
index 000000000..32068d81f
--- /dev/null
+++ b/build_msvc/bitcoin.sln
@@ -0,0 +1,172 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27130.2027
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_consensus", "libbitcoinconsensus\libbitcoinconsensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libbitcoinconsensus", "testconsensus\testconsensus.vcxproj", "{E78473E9-B850-456C-9120-276301E04C06}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bitcoind", "bitcoind\bitcoind.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_util", "libbitcoin_util\libbitcoin_util.vcxproj", "{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_common", "libbitcoin_common\libbitcoin_common.vcxproj", "{7C87E378-DF58-482E-AA2F-1BC129BC19CE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_crypto", "libbitcoin_crypto\libbitcoin_crypto.vcxproj", "{6190199C-6CF4-4DAD-BFBD-93FA72A760C1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_server", "libbitcoin_server\libbitcoin_server.vcxproj", "{460FEE33-1FE1-483F-B3BF-931FF8E969A5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunivalue", "libunivalue\libunivalue.vcxproj", "{5724BA7D-A09A-4BA8-800B-C4C1561B3D69}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_wallet", "libbitcoin_wallet\libbitcoin_wallet.vcxproj", "{93B86837-B543-48A5-A89B-7C87ABB77DF2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_zmq", "libbitcoin_zmq\libbitcoin_zmq.vcxproj", "{792D487F-F14C-49FC-A9DE-3FC150F31C3F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_bitcoin", "test_bitcoin\test_bitcoin.vcxproj", "{A56B73DB-D46D-4882-8374-1FE3FFA08F07}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_cli", "libbitcoin_cli\libbitcoin_cli.vcxproj", "{0667528C-D734-4009-ADF9-C0D6C4A5A5A6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bitcoin-cli", "bitcoin-cli\bitcoin-cli.vcxproj", "{0B2D7431-F876-4A58-87BF-F748338CD3BF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_bitcoin", "bench_bitcoin\bench_bitcoin.vcxproj", "{1125654E-E1B2-4431-8B5C-62EA9A2FEECB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bitcoin-tx", "bitcoin-tx\bitcoin-tx.vcxproj", "{D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.ActiveCfg = Debug|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.Build.0 = Debug|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x86.ActiveCfg = Debug|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x86.Build.0 = Debug|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.ActiveCfg = Release|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.Build.0 = Release|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x86.ActiveCfg = Release|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x86.Build.0 = Release|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.ActiveCfg = Debug|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.Build.0 = Debug|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x86.ActiveCfg = Debug|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x86.Build.0 = Debug|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.ActiveCfg = Release|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.Build.0 = Release|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x86.ActiveCfg = Release|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x86.Build.0 = Release|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.ActiveCfg = Debug|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.Build.0 = Debug|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x86.ActiveCfg = Debug|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x86.Build.0 = Debug|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.ActiveCfg = Release|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.Build.0 = Release|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x86.ActiveCfg = Release|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x86.Build.0 = Release|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.ActiveCfg = Debug|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.Build.0 = Debug|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x86.ActiveCfg = Debug|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x86.Build.0 = Debug|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.ActiveCfg = Release|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.Build.0 = Release|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x86.ActiveCfg = Release|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x86.Build.0 = Release|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.ActiveCfg = Debug|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.Build.0 = Debug|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x86.ActiveCfg = Debug|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x86.Build.0 = Debug|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.ActiveCfg = Release|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.Build.0 = Release|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x86.ActiveCfg = Release|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x86.Build.0 = Release|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.ActiveCfg = Debug|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.Build.0 = Debug|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x86.ActiveCfg = Debug|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x86.Build.0 = Debug|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.ActiveCfg = Release|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.Build.0 = Release|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x86.ActiveCfg = Release|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x86.Build.0 = Release|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.ActiveCfg = Debug|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.Build.0 = Debug|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x86.ActiveCfg = Debug|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x86.Build.0 = Debug|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.ActiveCfg = Release|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.Build.0 = Release|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x86.ActiveCfg = Release|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x86.Build.0 = Release|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.ActiveCfg = Debug|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.Build.0 = Debug|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x86.ActiveCfg = Debug|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x86.Build.0 = Debug|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.ActiveCfg = Release|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.Build.0 = Release|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x86.ActiveCfg = Release|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x86.Build.0 = Release|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.ActiveCfg = Debug|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.Build.0 = Debug|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x86.ActiveCfg = Debug|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x86.Build.0 = Debug|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.ActiveCfg = Release|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.Build.0 = Release|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x86.ActiveCfg = Release|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x86.Build.0 = Release|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.ActiveCfg = Debug|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.Build.0 = Debug|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x86.ActiveCfg = Debug|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x86.Build.0 = Debug|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.ActiveCfg = Release|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.Build.0 = Release|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x86.ActiveCfg = Release|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x86.Build.0 = Release|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.ActiveCfg = Debug|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.Build.0 = Debug|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x86.ActiveCfg = Debug|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x86.Build.0 = Debug|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.ActiveCfg = Release|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.Build.0 = Release|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x86.ActiveCfg = Release|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x86.Build.0 = Release|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.ActiveCfg = Debug|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.Build.0 = Debug|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x86.ActiveCfg = Debug|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x86.Build.0 = Debug|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.ActiveCfg = Release|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.Build.0 = Release|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x86.ActiveCfg = Release|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x86.Build.0 = Release|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.ActiveCfg = Debug|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.Build.0 = Debug|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x86.ActiveCfg = Debug|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x86.Build.0 = Debug|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.ActiveCfg = Release|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.Build.0 = Release|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x86.ActiveCfg = Release|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x86.Build.0 = Release|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.ActiveCfg = Debug|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.Build.0 = Debug|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x86.ActiveCfg = Debug|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x86.Build.0 = Debug|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.ActiveCfg = Release|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.Build.0 = Release|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x86.ActiveCfg = Release|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x86.Build.0 = Release|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.ActiveCfg = Debug|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.Build.0 = Debug|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x86.ActiveCfg = Debug|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x86.Build.0 = Debug|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.ActiveCfg = Release|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.Build.0 = Release|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x86.ActiveCfg = Release|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4ABD1207-9A90-4EC9-A8EB-203638A2605D}
+ SolutionGuid = {2FB733C9-24CB-4BA5-A26B-F43DAD7996B7}
+ SolutionGuid = {D0CAE2D0-8DB1-4A0B-80EE-800AA6C64323}
+ SolutionGuid = {DA7D16A6-E5F0-45B3-B194-C3FE64F1BFCD}
+ EndGlobalSection
diff --git a/build_msvc/bitcoin_config.h b/build_msvc/bitcoin_config.h
new file mode 100644
index 000000000..4ac27dae3
--- /dev/null
+++ b/build_msvc/bitcoin_config.h
@@ -0,0 +1,424 @@
+#ifndef BITCOIN_BITCOIN_CONFIG_H
+#define BITCOIN_BITCOIN_CONFIG_H
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Version Build */
+#define CLIENT_VERSION_BUILD 0
+
+/* Version is release */
+#define CLIENT_VERSION_IS_RELEASE false
+
+/* Major version */
+#define CLIENT_VERSION_MAJOR 1
+
+/* Minor version */
+#define CLIENT_VERSION_MINOR 17
+
+/* Build revision */
+#define CLIENT_VERSION_REVISION 99
+
+/* Copyright holder(s) before %s replacement */
+#define COPYRIGHT_HOLDERS "The %s developers"
+
+/* Copyright holder(s) */
+#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers"
+
+/* Replacement for %s in copyright holders string */
+#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitcoin Core"
+
+/* Copyright year */
+#define COPYRIGHT_YEAR 2018
+
+/* Define to 1 to enable wallet functions */
+#define ENABLE_WALLET 1
+
+/* Define to 1 to enable ZMQ functions */
+#define ENABLE_ZMQ 1
+
+/* parameter and return value type for __fdelt_chk */
+/* #undef FDELT_TYPE */
+
+/* define if the Boost library is available */
+#define HAVE_BOOST /**/
+
+/* define if the Boost::Chrono library is available */
+#define HAVE_BOOST_CHRONO /**/
+
+/* define if the Boost::Filesystem library is available */
+#define HAVE_BOOST_FILESYSTEM /**/
+
+/* define if the Boost::PROGRAM_OPTIONS library is available */
+#define HAVE_BOOST_PROGRAM_OPTIONS /**/
+
+/* define if the Boost::System library is available */
+#define HAVE_BOOST_SYSTEM /**/
+
+/* define if the Boost::Thread library is available */
+#define HAVE_BOOST_THREAD /**/
+
+/* define if the Boost::Unit_Test_Framework library is available */
+#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BYTESWAP_H */
+
+/* Define this symbol if the consensus lib has been built */
+#define HAVE_CONSENSUS_LIB 1
+
+/* define if the compiler supports basic C++11 syntax */
+#define HAVE_CXX11 1
+
+/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE16TOH 0
+
+/* Define to 1 if you have the declaration of `be32toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE32TOH 0
+
+/* Define to 1 if you have the declaration of `be64toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE64TOH 0
+
+/* Define to 1 if you have the declaration of `bswap_16', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_16 0
+
+/* Define to 1 if you have the declaration of `bswap_32', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_32 0
+
+/* Define to 1 if you have the declaration of `bswap_64', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_64 0
+
+/* Define to 1 if you have the declaration of `daemon', and to 0 if you don't.
+ */
+#define HAVE_DECL_DAEMON 0
+
+/* Define to 1 if you have the declaration of `EVP_MD_CTX_new', and to 0 if
+ you don't. */
+//#define HAVE_DECL_EVP_MD_CTX_NEW 1
+
+/* Define to 1 if you have the declaration of `htobe16', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE16 0
+
+/* Define to 1 if you have the declaration of `htobe32', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE32 0
+
+/* Define to 1 if you have the declaration of `htobe64', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE64 0
+
+/* Define to 1 if you have the declaration of `htole16', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE16 0
+
+/* Define to 1 if you have the declaration of `htole32', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE32 0
+
+/* Define to 1 if you have the declaration of `htole64', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE64 0
+
+/* Define to 1 if you have the declaration of `le16toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE16TOH 0
+
+/* Define to 1 if you have the declaration of `le32toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE32TOH 0
+
+/* Define to 1 if you have the declaration of `le64toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE64TOH 0
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRERROR_R 0
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRNLEN 1
+
+/* Define to 1 if you have the declaration of `__builtin_clz', and to 0 if you
+ don't. */
+//#define HAVE_DECL___BUILTIN_CLZ 1
+
+/* Define to 1 if you have the declaration of `__builtin_clzl', and to 0 if
+ you don't. */
+//#define HAVE_DECL___BUILTIN_CLZL 1
+
+/* Define to 1 if you have the declaration of `__builtin_clzll', and to 0 if
+ you don't. */
+//#define HAVE_DECL___BUILTIN_CLZLL 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ENDIAN_H */
+
+/* Define to 1 if the system has the `dllexport' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_DLLEXPORT 1
+
+/* Define to 1 if the system has the `dllimport' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_DLLIMPORT 1
+
+/* Define to 1 if the system has the `visibility' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
+
+/* Define this symbol if the BSD getentropy system call is available */
+/* #undef HAVE_GETENTROPY */
+
+/* Define this symbol if the BSD getentropy system call is available with
+ sys/random.h */
+/* #undef HAVE_GETENTROPY_RAND */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `advapi32' library (-ladvapi32). */
+#define HAVE_LIBADVAPI32 1
+
+/* Define to 1 if you have the `comctl32' library (-lcomctl32). */
+#define HAVE_LIBCOMCTL32 1
+
+/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */
+#define HAVE_LIBCOMDLG32 1
+
+/* Define to 1 if you have the `crypt32' library (-lcrypt32). */
+#define HAVE_LIBCRYPT32 1
+
+/* Define to 1 if you have the `gdi32' library (-lgdi32). */
+#define HAVE_LIBGDI32 1
+
+/* Define to 1 if you have the `imm32' library (-limm32). */
+#define HAVE_LIBIMM32 1
+
+/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
+#define HAVE_LIBIPHLPAPI 1
+
+/* Define to 1 if you have the `kernel32' library (-lkernel32). */
+#define HAVE_LIBKERNEL32 1
+
+/* Define to 1 if you have the `mingwthrd' library (-lmingwthrd). */
+#define HAVE_LIBMINGWTHRD 1
+
+/* Define to 1 if you have the `mswsock' library (-lmswsock). */
+#define HAVE_LIBMSWSOCK 1
+
+/* Define to 1 if you have the `ole32' library (-lole32). */
+#define HAVE_LIBOLE32 1
+
+/* Define to 1 if you have the `oleaut32' library (-loleaut32). */
+#define HAVE_LIBOLEAUT32 1
+
+/* Define to 1 if you have the `rpcrt4' library (-lrpcrt4). */
+#define HAVE_LIBRPCRT4 1
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+/* #undef HAVE_LIBRT */
+
+/* Define to 1 if you have the `shell32' library (-lshell32). */
+#define HAVE_LIBSHELL32 1
+
+/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */
+#define HAVE_LIBSHLWAPI 1
+
+/* Define to 1 if you have the `ssp' library (-lssp). */
+#define HAVE_LIBSSP 1
+
+/* Define to 1 if you have the `user32' library (-luser32). */
+#define HAVE_LIBUSER32 1
+
+/* Define to 1 if you have the `uuid' library (-luuid). */
+#define HAVE_LIBUUID 1
+
+/* Define to 1 if you have the `winmm' library (-lwinmm). */
+#define HAVE_LIBWINMM 1
+
+/* Define to 1 if you have the `winspool' library (-lwinspool). */
+#define HAVE_LIBWINSPOOL 1
+
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+#define HAVE_LIBWS2_32 1
+
+/* Define to 1 if you have the `z ' library (-lz ). */
+#define HAVE_LIBZ_ 1
+
+/* Define this symbol if you have malloc_info */
+/* #undef HAVE_MALLOC_INFO */
+
+/* Define this symbol if you have mallopt with M_ARENA_MAX */
+/* #undef HAVE_MALLOPT_ARENA_MAX */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_MINIUPNPC_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_MINIWGET_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_UPNPERRORS_H 1
+
+/* Define this symbol if you have MSG_DONTWAIT */
+/* #undef HAVE_MSG_DONTWAIT */
+
+/* Define this symbol if you have MSG_NOSIGNAL */
+/* #undef HAVE_MSG_NOSIGNAL */
+
+/* Define if you have POSIX threads libraries and header files. */
+//#define HAVE_PTHREAD 1
+
+/* Have PTHREAD_PRIO_INHERIT. */
+//#define HAVE_PTHREAD_PRIO_INHERIT 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+/* #undef HAVE_STRERROR_R */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRING_H 1
+
+/* Define this symbol if the BSD sysctl(KERN_ARND) is available */
+/* #undef HAVE_SYSCTL_ARND */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_ENDIAN_H */
+
+/* Define this symbol if the Linux getrandom system call is available */
+/* #undef HAVE_SYS_GETRANDOM */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_PRCTL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_UNISTD_H 1
+
+/* Define if the visibility attribute is supported. */
+#define HAVE_VISIBILITY_ATTRIBUTE 1
+
+/* Define this symbol if boost sleep works */
+/* #undef HAVE_WORKING_BOOST_SLEEP */
+
+/* Define this symbol if boost sleep_for works */
+#define HAVE_WORKING_BOOST_SLEEP_FOR 1
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "Bitcoin Core"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Bitcoin Core 0.17.99"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "bitcoin"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://bitcoincore.org/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.17.99"
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define this symbol if the qt platform is cocoa */
+/* #undef QT_QPA_PLATFORM_COCOA */
+
+/* Define this symbol if the minimal qt platform exists */
+#define QT_QPA_PLATFORM_MINIMAL 1
+
+/* Define this symbol if the qt platform is windows */
+#define QT_QPA_PLATFORM_WINDOWS 1
+
+/* Define this symbol if the qt platform is xcb */
+/* #undef QT_QPA_PLATFORM_XCB */
+
+/* Define this symbol if qt plugins are static */
+#define QT_STATICPLUGIN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+/* #undef STRERROR_R_CHAR_P */
+
+/* Define this symbol to build in assembly routines */
+//#define USE_ASM 1
+
+/* Define this symbol if coverage is enabled */
+/* #undef USE_COVERAGE */
+
+/* Define if dbus support should be compiled in */
+/* #undef USE_DBUS */
+
+/* Define if QR support should be compiled in */
+//#define USE_QRCODE 1
+
+/* UPnP support not compiled if undefined, otherwise value (0 or 1) determines
+ default state */
+//#define USE_UPNP 0
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+#endif //BITCOIN_BITCOIN_CONFIG_H
diff --git a/build_msvc/bitcoind/bitcoind.vcxproj b/build_msvc/bitcoind/bitcoind.vcxproj
new file mode 100644
index 000000000..bb43d9821
--- /dev/null
+++ b/build_msvc/bitcoind/bitcoind.vcxproj
@@ -0,0 +1,185 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}
+ Win32Proj
+ bitcoind
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+
diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj
new file mode 100644
index 000000000..c3c0f665c
--- /dev/null
+++ b/build_msvc/common.init.vcxproj
@@ -0,0 +1,14 @@
+
+
+
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
+
+ $(WindowsTargetPlatformVersion_10).0
+
+ $(WindowsTargetPlatformVersion_10)
+
+
+ Win32
+
+
\ No newline at end of file
diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj
new file mode 100644
index 000000000..3a53f3bad
--- /dev/null
+++ b/build_msvc/common.vcxproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ CopyConfig;
+ $(BuildDependsOn);
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in b/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in
new file mode 100644
index 000000000..b7265054f
--- /dev/null
+++ b/build_msvc/libbitcoin_cli/libbitcoin_cli.vcxproj.in
@@ -0,0 +1,162 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}
+ Win32Proj
+ libbitcoin_cli
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in b/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in
new file mode 100644
index 000000000..42145c15a
--- /dev/null
+++ b/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in
@@ -0,0 +1,174 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}
+ Win32Proj
+ libbitcoin_common
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+
diff --git a/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in b/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in
new file mode 100644
index 000000000..a05125723
--- /dev/null
+++ b/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in
@@ -0,0 +1,157 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}
+ Win32Proj
+ libbitcoin_crypto
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+@SOURCE_FILES@
+
+
+
diff --git a/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj b/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
new file mode 100644
index 000000000..2e8ecb2d2
--- /dev/null
+++ b/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
@@ -0,0 +1,955 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ x86-windows-static
+ x64-windows-static
+ {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}
+
+
+
+ "$(QTDIR)\bincc.exe" -name bitcoin "%(Fullpath)" -o .\GeneratedFiles\qrc_bitcoin.cpp
+ Qt rcc generation for %(Identity)
+ .\GeneratedFiles\qrc_bitcoin.cpp
+ (QTDIR)\bincc.exe
+
+
+ "$(QTDIR)\bincc.exe" -name bitcoin_locale "%(Fullpath)" -o .\GeneratedFiles\qrc_bitcoin_locale.cpp
+ Qt rcc generation for %(Identity)
+ .\GeneratedFiles\qrc_bitcoin_locale.cpp
+ (QTDIR)\bincc.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ Document
+ F:\Dependencies\protobuf-cpp-3.4.1\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe --proto_path=%(RootDir)%(Directory) %(Fullpath) --cpp_out=.\GeneratedFiles
+ ProtoBuf source generation %(RootDir)%(Directory) %(Filename)
+ .\GeneratedFiles\%(Filename).pb.h;.\GeneratedFiles\(%Filename).pb.cc
+ F:\Dependencies\protobuf-cpp-3.4.1\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe
+ false
+ F:\deps\protobuf\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe --proto_path=%(RootDir)%(Directory) %(Fullpath) --cpp_out=.\GeneratedFiles
+ F:\deps\protobuf\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ static
+ ClCompile
+
+
+ true
+ static
+ ClCompile
+
+
+ true
+ static
+ ClCompile
+
+
+ false
+ static
+ ClCompile
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ true
+ false
+ _X86_;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _X86_;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+ There was an error executing the Qt headers moc code generation tasks.
+
+
+
+
+
+
+
+
+ There was an error executing the Qt forms code generation tasks.
+
+
+
+
+
+
+
+
+ There was an error executing the Qt local code generation tasks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in
new file mode 100644
index 000000000..0a165d0b7
--- /dev/null
+++ b/build_msvc/libbitcoin_server/libbitcoin_server.vcxproj.in
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}
+ Win32Proj
+ libbitcoin_server
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)\netrpc.obj
+ $(IntDir)\netrpc.obj
+ $(IntDir)\netrpc.obj
+ $(IntDir)\netrpc.obj
+
+@SOURCE_FILES@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in b/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in
new file mode 100644
index 000000000..dc17c98e9
--- /dev/null
+++ b/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in
@@ -0,0 +1,180 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}
+ Win32Proj
+ libbitcoin_util
+ libbitcoin_util
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ false
+
+
+
+@SOURCE_FILES@
+
+
+
diff --git a/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in b/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in
new file mode 100644
index 000000000..1bb7be6f7
--- /dev/null
+++ b/build_msvc/libbitcoin_wallet/libbitcoin_wallet.vcxproj.in
@@ -0,0 +1,166 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}
+ Win32Proj
+ libbitcoin_wallet
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\wallet;..\..\src\univalue\include;
+ MultiThreadedDebug
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\wallet;..\..\src\univalue\include;
+ MultiThreadedDebug
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\wallet;..\..\src\univalue\include;
+ MultiThreaded
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\wallet;..\..\src\univalue\include;
+ MultiThreaded
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in b/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in
new file mode 100644
index 000000000..e396c1ad0
--- /dev/null
+++ b/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in
@@ -0,0 +1,166 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}
+ Win32Proj
+ libbitcoin_zmq
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
new file mode 100644
index 000000000..0be7e7e43
--- /dev/null
+++ b/build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
@@ -0,0 +1,199 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 15.0
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}
+ Win32Proj
+ bitcoind
+ libbitcoin_consensus
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ ..\..\src;
+ Sync
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ ..\..\src;
+ Sync
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ ..\..\src;
+ Sync
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ ..\..\src;
+ Sync
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/libunivalue/libunivalue.vcxproj b/build_msvc/libunivalue/libunivalue.vcxproj
new file mode 100644
index 000000000..57d469deb
--- /dev/null
+++ b/build_msvc/libunivalue/libunivalue.vcxproj
@@ -0,0 +1,160 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+ 15.0
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}
+ Win32Proj
+ libunivalue
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/msbuild/tasks/hexdump.targets b/build_msvc/msbuild/tasks/hexdump.targets
new file mode 100644
index 000000000..12868a987
--- /dev/null
+++ b/build_msvc/msbuild/tasks/hexdump.targets
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ outFileInfo.LastWriteTime)
+ {
+ using (Stream inStm = File.OpenRead(RawFilePath))
+ {
+ using (StreamWriter sw = new StreamWriter(HeaderFilePath))
+ {
+ sw.WriteLine(SourceHeader);
+ int count = 0;
+ int rawChar = inStm.ReadByte();
+ while(rawChar != -1)
+ {
+ sw.Write("0x{0:x2}, ", rawChar);
+ count++;
+ if(count % 8 == 0)
+ {
+ sw.WriteLine();
+ }
+ rawChar = inStm.ReadByte();
+ }
+ sw.WriteLine(SourceFooter);
+ }
+ }
+ }
+}
+]]>
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py
new file mode 100644
index 000000000..8888487e7
--- /dev/null
+++ b/build_msvc/msvc-autogen.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python3
+
+import os
+import re
+
+SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
+
+libs = [
+ 'libbitcoin_cli',
+ 'libbitcoin_common',
+ 'libbitcoin_crypto',
+ 'libbitcoin_server',
+ 'libbitcoin_util',
+ 'libbitcoin_wallet',
+ 'libbitcoin_zmq',
+]
+
+ignore_list = [
+ 'rpc/net.cpp',
+ 'interfaces/handler.cpp',
+ 'interfaces/node.cpp',
+ 'interfaces/wallet.cpp',
+]
+
+lib_sources = {}
+
+
+def parse_makefile(makefile):
+ with open(makefile, 'r', encoding='utf-8') as file:
+ current_lib = ''
+ for line in file.read().splitlines():
+ if current_lib:
+ source = line.split()[0]
+ if source.endswith('.cpp') and not source.startswith('$') and source not in ignore_list:
+ lib_sources[current_lib].append(source.replace('/', '\\'))
+ if not line.endswith('\\'):
+ current_lib = ''
+ continue
+ for lib in libs:
+ _lib = lib.replace('-', '_')
+ if re.search(_lib + '.*_SOURCES \\= \\\\', line):
+ current_lib = lib
+ lib_sources[current_lib] = []
+ break
+
+
+def main():
+ for makefile_name in os.listdir(SOURCE_DIR):
+ if 'Makefile' in makefile_name:
+ parse_makefile(os.path.join(SOURCE_DIR, makefile_name))
+ for key, value in lib_sources.items():
+ vcxproj_filename = os.path.abspath(os.path.join(os.path.dirname(__file__), key, key + '.vcxproj'))
+ content = ''
+ for source_filename in value:
+ content += ' \n'
+ with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file:
+ with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file:
+ vcxproj_file.write(vcxproj_in_file.read().replace(
+ '@SOURCE_FILES@\n', content))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj
new file mode 100644
index 000000000..b2d4c118f
--- /dev/null
+++ b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj
@@ -0,0 +1,146 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {51201D5E-D939-4854-AE9D-008F03FF518E}
+ Win32Proj
+ test_bitcoinqt
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj
new file mode 100644
index 000000000..444a2ed72
--- /dev/null
+++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj
@@ -0,0 +1,207 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+ 15.0
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}
+ Win32Proj
+ test_bitcoin
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;..\..\src\test;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ false
+ boost_test_exec_monitor-vc140-mt-gd.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;..\..\src\test;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ boost_test_exec_monitor-vc140-mt-gd.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;..\..\src\test;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ boost_test_exec_monitor-vc140-mt.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src;..\..\src\univalue\include;..\..\src\test;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ boost_test_exec_monitor-vc140-mt.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ There was an error executing the JSON test header generation task.
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/testconsensus/testconsensus.cpp b/build_msvc/testconsensus/testconsensus.cpp
new file mode 100644
index 000000000..0068f588c
--- /dev/null
+++ b/build_msvc/testconsensus/testconsensus.cpp
@@ -0,0 +1,50 @@
+#include
+
+// bitcoin includes.
+#include <..\src\script\bitcoinconsensus.h>
+#include <..\src\primitives\transaction.h>
+#include <..\src\script\script.h>
+#include <..\src\streams.h>
+#include <..\src\version.h>
+
+CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, int nValue = 0)
+{
+ CMutableTransaction txSpend;
+ txSpend.nVersion = 1;
+ txSpend.nLockTime = 0;
+ txSpend.vin.resize(1);
+ txSpend.vout.resize(1);
+ txSpend.vin[0].scriptWitness = scriptWitness;
+ txSpend.vin[0].prevout.hash = uint256();
+ txSpend.vin[0].prevout.n = 0;
+ txSpend.vin[0].scriptSig = scriptSig;
+ txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
+ txSpend.vout[0].scriptPubKey = CScript();
+ txSpend.vout[0].nValue = nValue;
+
+ return txSpend;
+}
+
+int main()
+{
+ std::cout << "bitcoinconsensus version: " << bitcoinconsensus_version() << std::endl;
+
+ CScript pubKeyScript;
+ pubKeyScript << OP_1 << OP_0 << OP_1;
+
+ int amount = 0; // 600000000;
+
+ CScript scriptSig;
+ CScriptWitness scriptWitness;
+ CTransaction vanillaSpendTx = BuildSpendingTransaction(scriptSig, scriptWitness, amount);
+ CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
+ stream << vanillaSpendTx;
+
+ bitcoinconsensus_error err;
+ auto op0Result = bitcoinconsensus_verify_script_with_amount(pubKeyScript.data(), pubKeyScript.size(), amount, (const unsigned char*)&stream[0], stream.size(), 0, bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL, &err);
+ std::cout << "Op0 result: " << op0Result << ", error code " << err << std::endl;
+
+ getchar();
+
+ return 0;
+}
diff --git a/build_msvc/testconsensus/testconsensus.vcxproj b/build_msvc/testconsensus/testconsensus.vcxproj
new file mode 100644
index 000000000..d73988df1
--- /dev/null
+++ b/build_msvc/testconsensus/testconsensus.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {E78473E9-B850-456C-9120-276301E04C06}
+ Win32Proj
+ testconsensus
+ test_libbitcoinconsensus
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ static
+
+
+ true
+ static
+
+
+ false
+ static
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\;
+ MultiThreadedDebug
+
+
+ Console
+ true
+ true
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+
+
diff --git a/configure.ac b/configure.ac
index 949bdd538..47333d57e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
-define(_CLIENT_VERSION_MINOR, 16)
+define(_CLIENT_VERSION_MINOR, 17)
define(_CLIENT_VERSION_REVISION, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
@@ -137,6 +137,12 @@ AC_ARG_ENABLE(gui-tests,
[use_gui_tests=$enableval],
[use_gui_tests=$use_tests])
+AC_ARG_WITH([rapidcheck],
+ [AS_HELP_STRING([--with-rapidcheck],
+ [enable RapidCheck property based tests (default is yes if librapidcheck is found)])],
+ [use_rapidcheck=$withval],
+ [use_rapidcheck=auto])
+
AC_ARG_ENABLE(bench,
AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
[use_bench=$enableval],
@@ -261,6 +267,10 @@ AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
if test "x$enable_debug" = xyes; then
+ # Clear default -g -O2 flags
+ if test "x$CXXFLAGS_overridden" = xno; then
+ CXXFLAGS=""
+ fi
# Prefer -Og, fall back to -O0 if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-Og],
@@ -277,6 +287,7 @@ if test "x$enable_debug" = xyes; then
AX_CHECK_PREPROC_FLAG([-DDEBUG],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"]],,[[$CXXFLAG_WERROR]])
AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"]],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-ftrapv],[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"],,[[$CXXFLAG_WERROR]])
fi
if test x$use_sanitizers != x; then
@@ -335,6 +346,8 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
## unknown options if any other warning is produced. Test the -Wfoo case, and
@@ -350,6 +363,9 @@ fi
# be compiled with them, rather that specific objects/libs may use them after checking for runtime
# compatibility.
AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]])
+AX_CHECK_COMPILE_FLAG([-msse4.1],[[SSE41_CXXFLAGS="-msse4.1"]],,[[$CXXFLAG_WERROR]])
+AX_CHECK_COMPILE_FLAG([-mavx -mavx2],[[AVX2_CXXFLAGS="-mavx -mavx2"]],,[[$CXXFLAG_WERROR]])
+AX_CHECK_COMPILE_FLAG([-msse4 -msha],[[SHANI_CXXFLAGS="-msse4 -msha"]],,[[$CXXFLAG_WERROR]])
TEMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
@@ -373,6 +389,53 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
)
CXXFLAGS="$TEMP_CXXFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $SSE41_CXXFLAGS"
+AC_MSG_CHECKING(for SSE4.1 intrinsics)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #include
+ ]],[[
+ __m128i l = _mm_set1_epi32(0);
+ return _mm_extract_epi32(l, 3);
+ ]])],
+ [ AC_MSG_RESULT(yes); enable_sse41=yes; AC_DEFINE(ENABLE_SSE41, 1, [Define this symbol to build code that uses SSE4.1 intrinsics]) ],
+ [ AC_MSG_RESULT(no)]
+)
+CXXFLAGS="$TEMP_CXXFLAGS"
+
+TEMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $AVX2_CXXFLAGS"
+AC_MSG_CHECKING(for AVX2 intrinsics)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #include
+ ]],[[
+ __m256i l = _mm256_set1_epi32(0);
+ return _mm256_extract_epi32(l, 7);
+ ]])],
+ [ AC_MSG_RESULT(yes); enable_avx2=yes; AC_DEFINE(ENABLE_AVX2, 1, [Define this symbol to build code that uses AVX2 intrinsics]) ],
+ [ AC_MSG_RESULT(no)]
+)
+CXXFLAGS="$TEMP_CXXFLAGS"
+
+TEMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $SHANI_CXXFLAGS"
+AC_MSG_CHECKING(for SHA-NI intrinsics)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #include
+ ]],[[
+ __m128i i = _mm_set1_epi32(0);
+ __m128i j = _mm_set1_epi32(1);
+ __m128i k = _mm_set1_epi32(2);
+ return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, i, k), 0);
+ ]])],
+ [ AC_MSG_RESULT(yes); enable_shani=yes; AC_DEFINE(ENABLE_SHANI, 1, [Define this symbol to build code that uses SHA-NI intrinsics]) ],
+ [ AC_MSG_RESULT(no)]
+)
+CXXFLAGS="$TEMP_CXXFLAGS"
+
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_ARG_WITH([utils],
@@ -381,6 +444,18 @@ AC_ARG_WITH([utils],
[build_bitcoin_utils=$withval],
[build_bitcoin_utils=yes])
+AC_ARG_ENABLE([util-cli],
+ [AS_HELP_STRING([--enable-util-cli],
+ [build bitcoin-cli])],
+ [build_bitcoin_cli=$enableval],
+ [build_bitcoin_cli=$build_bitcoin_utils])
+
+AC_ARG_ENABLE([util-tx],
+ [AS_HELP_STRING([--enable-util-tx],
+ [build bitcoin-tx])],
+ [build_bitcoin_tx=$enableval],
+ [build_bitcoin_tx=$build_bitcoin_utils])
+
AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
@@ -401,25 +476,25 @@ case $host in
use_pkgconfig=no
TARGET_OS=windows
- AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing))
- AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing))
+ AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(libmingwthrd missing))
+ AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(libkernel32 missing))
+ AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(libuser32 missing))
+ AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(libgdi32 missing))
+ AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(libcomdlg32 missing))
+ AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(libwinspool missing))
+ AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(libwinmm missing))
+ AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(libshell32 missing))
+ AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(libcomctl32 missing))
+ AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(libole32 missing))
+ AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(liboleaut32 missing))
+ AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(libuuid missing))
+ AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(librpcrt4 missing))
+ AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(libadvapi32 missing))
+ AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(libws2_32 missing))
+ AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(libmswsock missing))
+ AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(libshlwapi missing))
+ AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(libiphlpapi missing))
+ AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(libcrypt32 missing))
# -static is interpreted by libtool, where it has a different meaning.
# In libtool-speak, it's -all-static.
@@ -523,10 +598,17 @@ case $host in
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
OBJCXXFLAGS="$CXXFLAGS"
;;
+ *android*)
+ dnl make sure android stays above linux for hosts like *linux-android*
+ LEVELDB_TARGET_FLAGS="-DOS_ANDROID"
+ ;;
*linux*)
TARGET_OS=linux
LEVELDB_TARGET_FLAGS="-DOS_LINUX"
;;
+ *kfreebsd*)
+ LEVELDB_TARGET_FLAGS="-DOS_KFREEBSD"
+ ;;
*freebsd*)
LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
;;
@@ -536,10 +618,17 @@ case $host in
*netbsd*)
LEVELDB_TARGET_FLAGS="-DOS_NETBSD"
;;
+ *dragonfly*)
+ LEVELDB_TARGET_FLAGS="-DOS_DRAGONFLYBSD"
+ ;;
+ *solaris*)
+ LEVELDB_TARGET_FLAGS="-DOS_SOLARIS"
+ ;;
+ *hpux*)
+ LEVELDB_TARGET_FLAGS="-DOS_HPUX"
+ ;;
*)
- OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
- AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])
- LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}"
+ AC_MSG_ERROR(Cannot build leveldb for $host. Please file a bug report.)
;;
esac
@@ -618,7 +707,7 @@ if test x$use_glibc_compat != xno; then
#glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
#in anyway for back-compat.
- AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(lib missing))
+ AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(librt missing))
#__fdelt_chk's params and return type have changed from long unsigned int to long int.
# See which one is present here.
@@ -633,6 +722,8 @@ if test x$use_glibc_compat != xno; then
[ fdelt_type="long int"])
AC_MSG_RESULT($fdelt_type)
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
+ AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
+ AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
else
AC_SEARCH_LIBS([clock_gettime],[rt])
fi
@@ -680,7 +771,7 @@ if test x$use_hardening != xno; then
case $host in
*mingw*)
- AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(lib missing))
+ AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(libssp missing))
;;
esac
fi
@@ -692,6 +783,10 @@ fi
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
+AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
+ [#include
+ #include ]
+)
AC_CHECK_DECLS([strnlen])
# Check for daemon(3), unrelated to --with-daemon (although used by it)
@@ -800,6 +895,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
[ AC_MSG_RESULT(no)]
)
+AC_MSG_CHECKING(for if type char equals int8_t)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
+ #include ]],
+ [[ static_assert(std::is_same::value, ""); ]])],
+ [ AC_MSG_RESULT(yes); AC_DEFINE(CHAR_EQUALS_INT8, 1,[Define this symbol if type char equals int8_t]) ],
+ [ AC_MSG_RESULT(no)]
+)
+
# Check for reduced exports
if test x$use_reduce_exports = xyes; then
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
@@ -831,9 +934,9 @@ fi
BITCOIN_QT_INIT
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
-BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt5])
+BITCOIN_QT_CONFIGURE([$use_pkgconfig])
-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
+if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnononononono; then
use_boost=no
else
use_boost=yes
@@ -851,7 +954,6 @@ if test x$want_boost = xno; then
fi
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
-AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD
AX_BOOST_CHRONO
@@ -920,7 +1022,7 @@ fi
if test x$use_boost = xyes; then
-BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
+BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
@@ -1022,7 +1124,7 @@ if test x$use_pkgconfig = xyes; then
if test x$use_qr != xno; then
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
fi
- if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
+ if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests != xnonononono; then
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
if test x$TARGET_OS != xwindows; then
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
@@ -1047,7 +1149,7 @@ else
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
- if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
+ if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests != xnonononono; then
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
if test x$TARGET_OS != xwindows; then
@@ -1092,11 +1194,27 @@ AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
])
CXXFLAGS="${save_CXXFLAGS}"
+dnl RapidCheck Property Based Testing
+
+enable_property_tests=no
+if test "x$use_rapidcheck" = xauto; then
+ AC_CHECK_HEADERS([rapidcheck.h], [enable_property_tests=yes])
+elif test "x$use_rapidcheck" != xno; then
+ enable_property_tests=yes
+fi
+
+RAPIDCHECK_LIBS=
+if test "x$enable_property_tests" = xyes; then
+ RAPIDCHECK_LIBS=-lrapidcheck
+fi
+AC_SUBST(RAPIDCHECK_LIBS)
+AM_CONDITIONAL([ENABLE_PROPERTY_TESTS], [test x$enable_property_tests = xyes])
+
dnl univalue check
need_bundled_univalue=yes
-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
+if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnononononono; then
need_bundled_univalue=no
else
@@ -1180,9 +1298,13 @@ AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)
-AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
-AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
-AC_MSG_RESULT($build_bitcoin_utils)
+AC_MSG_CHECKING([whether to build bitcoin-cli])
+AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
+AC_MSG_RESULT($build_bitcoin_cli)
+
+AC_MSG_CHECKING([whether to build bitcoin-tx])
+AM_CONDITIONAL([BUILD_BITCOIN_TX], [test x$build_bitcoin_tx = xyes])
+AC_MSG_RESULT($build_bitcoin_tx)
AC_MSG_CHECKING([whether to build libraries])
AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
@@ -1317,7 +1439,7 @@ else
AC_MSG_RESULT([no])
fi
-if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnononononono; then
+if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnonononononono; then
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
fi
@@ -1335,6 +1457,9 @@ AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
+AM_CONDITIONAL([ENABLE_SSE41],[test x$enable_sse41 = xyes])
+AM_CONDITIONAL([ENABLE_AVX2],[test x$enable_avx2 = xyes])
+AM_CONDITIONAL([ENABLE_SHANI],[test x$enable_shani = xyes])
AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
@@ -1366,6 +1491,7 @@ AC_SUBST(DEBUG_CPPFLAGS)
AC_SUBST(WARN_CXXFLAGS)
AC_SUBST(NOWARN_CXXFLAGS)
AC_SUBST(DEBUG_CXXFLAGS)
+AC_SUBST(COMPAT_LDFLAGS)
AC_SUBST(ERROR_CXXFLAGS)
AC_SUBST(GPROF_CXXFLAGS)
AC_SUBST(GPROF_LDFLAGS)
@@ -1377,6 +1503,9 @@ AC_SUBST(PIE_FLAGS)
AC_SUBST(SANITIZER_CXXFLAGS)
AC_SUBST(SANITIZER_LDFLAGS)
AC_SUBST(SSE42_CXXFLAGS)
+AC_SUBST(SSE41_CXXFLAGS)
+AC_SUBST(AVX2_CXXFLAGS)
+AC_SUBST(SHANI_CXXFLAGS)
AC_SUBST(LIBTOOL_APP_LDFLAGS)
AC_SUBST(USE_UPNP)
AC_SUBST(USE_QRCODE)
@@ -1460,7 +1589,6 @@ echo "Options used to compile and link:"
echo " with wallet = $enable_wallet"
echo " with gui / qt = $bitcoin_enable_qt"
if test x$bitcoin_enable_qt != xno; then
- echo " qt version = $bitcoin_qt_got_major_vers"
echo " with qr = $use_qr"
fi
echo " with zmq = $use_zmq"
diff --git a/contrib/README.md b/contrib/README.md
index a582a724f..891591976 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -21,9 +21,10 @@ Utility to generate the pnSeed[] array that is compiled into the client.
Build Tools and Keys
---------------------
-### [Debian](/contrib/debian) ###
-Contains files used to package bitcoind/bitcoin-qt
-for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
+### Packaging ###
+The [Debian](/contrib/debian) subfolder contains the copyright file.
+
+All other packaging related files can be found in the [bitcoin-core/packaging](https://github.com/bitcoin-core/packaging) repository.
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
Files used during the gitian build process. For more information about gitian, see the [the Bitcoin Core documentation repository](https://github.com/bitcoin-core/docs).
@@ -34,10 +35,7 @@ PGP keys used for signing Bitcoin Core [Gitian release](/doc/release-process.md)
### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.
-### [RPM](/contrib/rpm) ###
-RPM spec file for building bitcoin-core on RPM based distributions.
-
-### [Gitian-build](/contrib/gitian-build.sh) ###
+### [Gitian-build](/contrib/gitian-build.py) ###
Script for running full Gitian builds.
Test and Verify Tools
diff --git a/contrib/debian/README.md b/contrib/debian/README.md
deleted file mode 100644
index fab9cc238..000000000
--- a/contrib/debian/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Debian
-====================
-This directory contains files used to package bitcoind/bitcoin-qt
-for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
-
-## bitcoin: URI support ##
-
-
-bitcoin-qt.desktop (Gnome / Open Desktop)
-To install:
-
- sudo desktop-file-install bitcoin-qt.desktop
- sudo update-desktop-database
-
-If you build yourself, you will either need to modify the paths in
-the .desktop file or copy or symlink your bitcoin-qt binary to `/usr/bin`
-and the `../../share/pixmaps/bitcoin128.png` to `/usr/share/pixmaps`
-
-bitcoin-qt.protocol (KDE)
-
diff --git a/contrib/debian/bitcoin-qt.desktop b/contrib/debian/bitcoin-qt.desktop
deleted file mode 100644
index 8b3122264..000000000
--- a/contrib/debian/bitcoin-qt.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=Bitcoin Core
-Comment=Connect to the Bitcoin P2P Network
-Comment[de]=Verbinde mit dem Bitcoin peer-to-peer Netzwerk
-Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
-Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
-Exec=bitcoin-qt %u
-Terminal=false
-Type=Application
-Icon=bitcoin128
-MimeType=x-scheme-handler/bitcoin;
-Categories=Office;Finance;P2P;Network;Qt;
-StartupWMClass=Bitcoin-qt
diff --git a/contrib/debian/bitcoin-qt.install b/contrib/debian/bitcoin-qt.install
deleted file mode 100644
index e0b32373b..000000000
--- a/contrib/debian/bitcoin-qt.install
+++ /dev/null
@@ -1,6 +0,0 @@
-usr/local/bin/bitcoin-qt usr/bin
-share/pixmaps/bitcoin32.xpm usr/share/pixmaps
-share/pixmaps/bitcoin16.xpm usr/share/pixmaps
-share/pixmaps/bitcoin128.png usr/share/pixmaps
-debian/bitcoin-qt.desktop usr/share/applications
-debian/bitcoin-qt.protocol usr/share/kde4/services/
diff --git a/contrib/debian/bitcoin-qt.lintian-overrides b/contrib/debian/bitcoin-qt.lintian-overrides
deleted file mode 100644
index 7fb230eca..000000000
--- a/contrib/debian/bitcoin-qt.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# Linked code is Expat - only Debian packaging is GPL-2+
-bitcoin-qt: possible-gpl-code-linked-with-openssl
diff --git a/contrib/debian/bitcoin-qt.manpages b/contrib/debian/bitcoin-qt.manpages
deleted file mode 100644
index 9a3cc31c0..000000000
--- a/contrib/debian/bitcoin-qt.manpages
+++ /dev/null
@@ -1 +0,0 @@
-doc/man/bitcoin-qt.1
diff --git a/contrib/debian/bitcoin-qt.protocol b/contrib/debian/bitcoin-qt.protocol
deleted file mode 100644
index 014588d53..000000000
--- a/contrib/debian/bitcoin-qt.protocol
+++ /dev/null
@@ -1,11 +0,0 @@
-[Protocol]
-exec=bitcoin-qt '%u'
-protocol=bitcoin
-input=none
-output=none
-helper=true
-listing=
-reading=false
-writing=false
-makedir=false
-deleting=false
diff --git a/contrib/debian/bitcoin-tx.bash-completion b/contrib/debian/bitcoin-tx.bash-completion
deleted file mode 100644
index 7acb0b0ae..000000000
--- a/contrib/debian/bitcoin-tx.bash-completion
+++ /dev/null
@@ -1 +0,0 @@
-contrib/bitcoin-tx.bash-completion bitcoin-tx
diff --git a/contrib/debian/bitcoin-tx.install b/contrib/debian/bitcoin-tx.install
deleted file mode 100644
index 2c21052a6..000000000
--- a/contrib/debian/bitcoin-tx.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/local/bin/bitcoin-tx usr/bin
diff --git a/contrib/debian/bitcoin-tx.manpages b/contrib/debian/bitcoin-tx.manpages
deleted file mode 100644
index 861d49d07..000000000
--- a/contrib/debian/bitcoin-tx.manpages
+++ /dev/null
@@ -1 +0,0 @@
-doc/man/bitcoin-tx.1
diff --git a/contrib/debian/bitcoind.bash-completion b/contrib/debian/bitcoind.bash-completion
deleted file mode 100644
index 5c69d78fb..000000000
--- a/contrib/debian/bitcoind.bash-completion
+++ /dev/null
@@ -1,2 +0,0 @@
-contrib/bitcoind.bash-completion bitcoind
-contrib/bitcoin-cli.bash-completion bitcoin-cli
diff --git a/contrib/debian/bitcoind.examples b/contrib/debian/bitcoind.examples
deleted file mode 100644
index 4ded67d98..000000000
--- a/contrib/debian/bitcoind.examples
+++ /dev/null
@@ -1 +0,0 @@
-debian/examples/bitcoin.conf
diff --git a/contrib/debian/bitcoind.install b/contrib/debian/bitcoind.install
deleted file mode 100644
index 798ea851f..000000000
--- a/contrib/debian/bitcoind.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/local/bin/bitcoind usr/bin
-usr/local/bin/bitcoin-cli usr/bin
diff --git a/contrib/debian/bitcoind.lintian-overrides b/contrib/debian/bitcoind.lintian-overrides
deleted file mode 100644
index 3f9f140bd..000000000
--- a/contrib/debian/bitcoind.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# Linked code is Expat - only Debian packaging is GPL-2+
-bitcoind: possible-gpl-code-linked-with-openssl
diff --git a/contrib/debian/bitcoind.manpages b/contrib/debian/bitcoind.manpages
deleted file mode 100644
index bab644ece..000000000
--- a/contrib/debian/bitcoind.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-doc/man/bitcoind.1
-doc/man/bitcoin-cli.1
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
deleted file mode 100644
index 33dab9b63..000000000
--- a/contrib/debian/changelog
+++ /dev/null
@@ -1,578 +0,0 @@
-bitcoin (0.14.1-trusty4) trusty; urgency=medium
-
- * Re-enable UPnP support.
-
- -- Matt Corallo (BlueMatt) Fri, 05 May 2017 13:28:00 -0400
-
-bitcoin (0.14.1-trusty3) trusty; urgency=medium
-
- * Build with qt5 if we are on a non-Ubuntu (ie non-Unity) distro.
-
- -- Matt Corallo (BlueMatt) Thu, 04 May 2017 17:13:00 -0400
-
-bitcoin (0.14.1-trusty2) trusty; urgency=medium
-
- * Bump minimum boost version in deps.
-
- -- Matt Corallo (BlueMatt) Thu, 04 May 2017 17:12:00 -0400
-
-bitcoin (0.14.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Sat, 22 Apr 2017 17:10:00 -0400
-
-bitcoin (0.14.0-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Wed, 08 Mar 2017 10:30:00 -0500
-
-bitcoin (0.13.2-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Thu, 05 Jan 2017 09:59:00 -0500
-
-bitcoin (0.13.1-trusty2) trusty; urgency=medium
-
- * Revert to Qt4, due to https://github.com/bitcoin/bitcoin/issues/9038
-
- -- Matt Corallo (BlueMatt) Mon, 31 Oct 2016 11:16:00 -0400
-
-bitcoin (0.13.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
- * Backport updated bitcoin-qt.desktop from upstream master
- * Add zmq dependency
- * Switch to Qt5 (breaks precise, but that was already broken by C++11)
-
- -- Matt Corallo (BlueMatt) Thu, 27 Oct 2016 17:32:00 -0400
-
-bitcoin (0.13.0-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Sun, 04 Sep 2016 22:09:00 -0400
-
-bitcoin (0.12.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Mon, 18 Apr 2016 14:26:00 -0700
-
-bitcoin (0.12.0-trusty6) trusty; urgency=medium
-
- * Fix program-options dep.
-
- -- Matt Corallo (BlueMatt) Fri, 25 Mar 2016 21:41:00 -0700
-
-bitcoin (0.12.0-trusty5) trusty; urgency=medium
-
- * Test explicit --with-gui
-
- -- Matt Corallo (BlueMatt) Tue, 23 Feb 2015 23:25:00 -0800
-
-bitcoin (0.12.0-trusty4) trusty; urgency=medium
-
- * Fix libevent-dev dep.
-
- -- Matt Corallo (BlueMatt) Tue, 23 Feb 2015 23:25:00 -0800
-
-bitcoin (0.12.0-trusty3) trusty; urgency=medium
-
- * Fix precise boost dep.
-
- -- Matt Corallo (BlueMatt) Tue, 23 Feb 2015 19:55:00 -0800
-
-bitcoin (0.12.0-trusty2) trusty; urgency=medium
-
- * Fix libevent dep.
-
- -- Matt Corallo (BlueMatt) Tue, 23 Feb 2015 19:53:00 -0800
-
-bitcoin (0.12.0-trusty1) trusty; urgency=medium
-
- * New upstream release
- * Various updates to contrib/debian were merged, a few were not
-
- -- Matt Corallo (BlueMatt) Tue, 23 Feb 2015 19:29:00 -0800
-
-bitcoin (0.11.2-trusty1) trusty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Fri, 13 Nov 2015 18:39:00 -0800
-
-bitcoin (0.11.1-trusty2) trusty; urgency=low
-
- * Remove minupnpc builddep.
-
- -- Matt Corallo (BlueMatt) Wed, 14 Oct 2015 23:06:00 -1000
-
-bitcoin (0.11.1-trusty1) trusty; urgency=high
-
- * New upstream release.
- * Disable all UPnP support.
-
- -- Matt Corallo (BlueMatt) Wed, 14 Oct 2015 13:57:00 -1000
-
-bitcoin (0.11.0-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Tue, 14 Jul 2015 14:39:00 -1000
-
-bitcoin (0.10.2-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Mon, 29 Jun 2015 17:33:00 -1000
-
-bitcoin (0.10.1-precise3) precise; urgency=medium
-
- * Fix build dep (include python).
-
- -- Matt Corallo (BlueMatt) Tue, 5 May 2015 09:28:00 -1000
-
-bitcoin (0.10.1-precise2) precise; urgency=medium
-
- * Fix miniupnpc dep.
-
- -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:33:00 -1000
-
-bitcoin (0.10.1-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:07:00 -1000
-
-bitcoin (0.10.0-precise1) precise; urgency=medium
-
- * New upstream releases.
-
- -- Matt Corallo (BlueMatt) Wed, 18 Feb 2015 13:22:00 -1000
-
-bitcoin (0.9.4-precise1) precise; urgency=high
-
- * New upstream releases.
-
- -- Matt Corallo (laptop - only while traveling) Mon, 12 Jan 2015 23:30:00 -1000
-
-bitcoin (0.9.3-precise1) precise; urgency=medium
-
- * New upstream releases.
-
- -- Matt Corallo (BlueMatt) Fri, 26 Sep 2014 12:01:00 -0700
-
-bitcoin (0.9.1-precise1) precise; urgency=medium
-
- * New upstream release.
- * Backport pull #4019
-
- -- Matt Corallo Sat, 19 Apr 2014 17:29:00 -0400
-
-bitcoin (0.9.0-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo Thu, 20 Mar 2014 13:10:00 -0400
-
-bitcoin (0.8.6-precise1) precise; urgency=medium
-
- * New upstream release.
- * Make .desktop paths non-fixed (suggested by prusnak@github)
-
- -- Matt Corallo Fri, 13 Dec 2013 13:31:00 -0400
-
-bitcoin (0.8.5-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo Sun, 15 Sep 2013 14:02:00 -0400
-
-bitcoin (0.8.4-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo Wed, 4 Sep 2013 10:25:00 -0400
-
-bitcoin (0.8.3-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Wed, 26 Jun 2013 00:18:00 +0100
-
-bitcoin (0.8.2-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Wed, 29 Mar 2013 23:23:00 +0100
-
-bitcoin (0.8.1-natty3) natty; urgency=low
-
- * New pixmaps
-
- -- Jonas Schnelli Mon, 13 May 2013 16:14:00 +0100
-
-bitcoin (0.8.1-natty2) natty; urgency=low
-
- * Remove dumb broken launcher script
-
- -- Matt Corallo Sun, 24 Mar 2013 20:01:00 -0400
-
-bitcoin (0.8.1-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Tue, 19 Mar 2013 13:03:00 -0400
-
-bitcoin (0.8.0-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Sat, 23 Feb 2013 16:01:00 -0500
-
-bitcoin (0.7.2-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Sat, 15 Dec 2012 10:59:00 -0400
-
-bitcoin (0.7.1-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Wed, 24 Oct 2012 15:06:00 -0400
-
-bitcoin (0.7.0-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Mon, 17 Sep 2012 13:45:00 +0200
-
-bitcoin (0.6.3-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Mon, 25 Jun 2012 23:47:00 +0200
-
-bitcoin (0.6.2-natty1) natty; urgency=low
-
- * Update package description and launch scripts.
-
- -- Matt Corallo Sat, 2 Jun 2012 16:41:00 +0200
-
-bitcoin (0.6.2-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Tue, 8 May 2012 16:27:00 -0500
-
-bitcoin (0.6.1-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Sun, 6 May 2012 20:09:00 -0500
-
-bitcoin (0.6.0-natty0) natty; urgency=low
-
- * New upstream release.
- * Add GNOME/KDE support for bitcoin-qt's bitcoin: URI support.
- Thanks to luke-jr for the KDE .protocol file.
-
- -- Matt Corallo Sat, 31 Mar 2012 15:35:00 -0500
-
-bitcoin (0.5.3-natty1) natty; urgency=low
-
- * Mark for upload to PPA.
-
- -- Matt Corallo Wed, 14 Mar 2012 23:06:00 -0400
-
-bitcoin (0.5.3-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Luke Dashjr Tue, 10 Jan 2012 15:57:00 -0500
-
-bitcoin (0.5.2-natty1) natty; urgency=low
-
- * Remove mentions on anonymity in package descriptions and manpage.
- These should never have been there, bitcoin isnt anonymous without
- a ton of work that virtually no users will ever be willing and
- capable of doing
-
- -- Matt Corallo Sat, 7 Jan 2012 13:37:00 -0500
-
-bitcoin (0.5.2-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Luke Dashjr Fri, 16 Dec 2011 17:57:00 -0500
-
-bitcoin (0.5.1-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Fri, 16 Dec 2011 13:27:00 -0500
-
-bitcoin (0.5.0-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo Mon, 21 Nov 2011 11:32:00 -0500
-
-bitcoin (0.5.0~rc7-natty0) natty; urgency=low
-
- * New upstream release candidate.
-
- -- Matt Corallo Sun, 20 Nov 2011 17:08:00 -0500
-
-bitcoin (0.5.0~rc3-natty0) natty; urgency=low
-
- * New upstream release candidate.
- * Don't set rpcpassword for bitcoin-qt.
-
- -- Matt Corallo Tue, 8 Nov 2011 11:56:00 -0400
-
-bitcoin (0.5.0~rc1-natty1) natty; urgency=low
-
- * Add test_bitcoin to build test
- * Fix clean
- * Remove uneccessary build-dependancies
-
- -- Matt Corallo Wed, 26 Oct 2011 14:37:18 -0400
-
-bitcoin (0.5.0~rc1-natty0) natty; urgency=low
-
- * Mark for natty
- * Fix broken build
- * Fix copyright listing
- * Remove bitcoin: URL handler until bitcoin actually has support for it (Oops)
-
- -- Matt Corallo Wed, 26 Oct 2011 14:37:18 -0400
-
-bitcoin (0.5.0~rc1-2) experimental; urgency=low
-
- * Add bitcoin-qt
-
- -- Matt Corallo Tue, 25 Oct 2011 15:24:18 -0400
-
-bitcoin (0.5.0~rc1-1) experimental; urgency=low
-
- * New upstream prerelease.
- * Add Github as alternate upstream source in watch file.
- * Stop build-depending on libcrypto++-dev, and drop patch 1000:
- Upstream no longer use crypto++.
- * Drop patch 1003: Upstream builds dynamic by default now.
- * Update copyright file: Drop notes on longer included sources.
-
- -- Jonas Smedegaard Fri, 14 Oct 2011 00:16:18 +0200
-
-bitcoin (0.4.0-1) unstable; urgency=low
-
- * New upstream release.
- * Stop repackaging source tarballs: No DFSG-violating stripping left.
- * Update copyright file:
- + Add Github URL to Source.
- * Drop dpkg-source local-options hint: Declared options are default
- since dpkg-source 1.16.1.
- + Add irc URL to Upstream-Contact.
- + Add comment on Bitcoin Developers to catch-all Files section.
- + Add Files sections for newly readded src/cryptopp/* (new custom
- BSD-like license), and newly added doc/build-osx.txt and
- src/makefile.osx (Expat).
- * Bump debhelper compatibility level to 7.
- * Suppress binary icns and gpg files.
- * Enable regression tests:
- + Build-depend on libboost-test-dev.
- + Extend patch 1003 to also dynamically link test binary.
- + Build and invoke test binary unless tests are disabled.
- * Tighten build-dependency on cdbs: Recent version needed to support
- debhelper 7.
- * Relax build-depend unversioned on debhelper: needed version
- satisfied even in oldstable.
- * Stop suppress optional build-dependencies: Satisfied in stable.
- Build-depend on devscripts (enabling copyright-check).
-
- -- Jonas Smedegaard Wed, 05 Oct 2011 01:48:53 +0200
-
-bitcoin (0.3.24~dfsg-1) unstable; urgency=low
-
- * New upstream release.
-
- [ Jonas Smedegaard ]
- * Improve various usage hints:
- + Explicitly mention in long description that bitcoind contains
- daemon and command-line interface.
- + Extend README.Debian with section on lack of GUI, and add primary
- headline.
- + Avoid installing upstream README: contains no parts relevant for
- Debian usage.
- Thanks to richard for suggestions (see bug#629443).
- * Favor final releases over prereleases in rules and watch file.
- Thanks to Jan Dittberner.
- * Track -src (not -linux) tarballs in rules and watch file.
- Thanks to Jan Dittberner.
- * Drop patches 1004 and 1005 (integrated upstream) and simplify
- CXXFLAGS in rules file.
- * Stop stripping no longer included source-less binaries from upstream
- tarballs.
-
- [ Jan Dittberner ]
- * refresh debian/patches/1000_use_system_crypto++.patch
-
- -- Jonas Smedegaard Tue, 19 Jul 2011 15:08:54 +0200
-
-bitcoin (0.3.21~dfsg-2) unstable; urgency=low
-
- * Enable UPNP support:
- + Drop patch 1006.
- + Build-depend on libminiupnpc-dev.
- Thanks to Matt Corallo.
-
- -- Jonas Smedegaard Sat, 28 May 2011 15:52:44 +0200
-
-bitcoin (0.3.21~dfsg-1) unstable; urgency=low
-
- * New upstream release.
- * Refresh patches.
- * Drop patch 1002: no longer needed, as upstream use pkgconfig now.
- * Add patch 1006 to really unset USE_UPNP as aparently intended.
- * Adjust cleanup rule to preserve .gitignore files.
- * Update copyright file:
- + Bump format to draft 174 of DEP-5.
- + Shorten comments.
- * Bump policy compliance to standards-version 3.9.2.
- * Shorten Vcs-Browser paragraph in control file.
- * Fix mention daemon (not CLI tools) in short description.
- * Stop conflicting with or replace bitcoin-cli: Only transitional, no
- longer needed.
- * Link against unversioned berkeleydb. Update NEWS and README.Debian
- accordingly (and improve wording while at it).
- Closes: Bug#621425. Thanks to Ondřej Surý.
- * This release also implicitly updates linkage against libcrypto++,
- which closes: bug#626953, #627024.
- * Disable linkage against not yet Debian packaged MiniUPnP.
- * Silence seemingly harmless noise about unused variables.
-
- -- Jonas Smedegaard Tue, 17 May 2011 15:31:24 +0200
-
-bitcoin (0.3.20.2~dfsg-2) unstable; urgency=medium
-
- * Fix have wrapper script execute real binary (not loop executing
- itself).
- Closes: bug#617290. Thanks to Philippe Gauthier and Etienne Laurin.
- * Set urgency=medium as the only (user-exposed) binary is useless
- without this fix and has been for some time.
-
- -- Jonas Smedegaard Wed, 16 Mar 2011 09:11:06 +0100
-
-bitcoin (0.3.20.2~dfsg-1) unstable; urgency=low
-
- * New upstream release.
- * Fix provide and replace former package name bitcoin-cli.
- Closes: bug#618439. Thanks to Shane Wegner.
-
- -- Jonas Smedegaard Tue, 15 Mar 2011 11:41:43 +0100
-
-bitcoin (0.3.20.01~dfsg-1) unstable; urgency=low
-
- * New upstream release.
-
- [ Micah Anderson ]
- * Add myself as uploader.
-
- [ Jonas Smedegaard ]
- * Add wrapper for bitcoind to ease initial startup.
- * Update patches:
- + Drop patch 2002: Applied upstream.
- + Add patch 1005 to add phtread linker option.
- Closes: bug#615619. Thanks to Shane Wegner.
- + Refresh patches.
- * Extend copyright years in rules file header.
- * Rewrite copyright file using draft svn166 of DEP5 format.
- * Rename binary package to bitcoind (from bincoin-cli).
- Closes: bug#614025. Thanks to Luke-Jr.
-
- -- Jonas Smedegaard Tue, 01 Mar 2011 15:55:04 +0100
-
-bitcoin (0.3.19~dfsg-6) unstable; urgency=low
-
- * Fix override agressive optimizations.
- * Fix tighten build-dependencies to really fit backporting to Lenny:
- + Add fallback build-dependency on libdb4.6++-dev.
- + Tighten unversioned Boost build-dependencies to recent versions,
- To force use of versioned Boost when backporting to Lenny.
- ...needs more love, though: actual build fails.
-
- -- Jonas Smedegaard Mon, 17 Jan 2011 19:48:35 +0100
-
-bitcoin (0.3.19~dfsg-5) unstable; urgency=low
-
- * Fix lower Boost fallback-build-dependencies to 1.35, really
- available in Lenny.
- * Correct comment in rules file regarding reason for versioned Boost
- fallback-build-dependency.
- * Add patch 2002 adding -mt decoration to Boost flags, to ease
- backporting to Lenny.
- * Respect DEB_BUILD_OPTIONS, and suppress arch-specific optimizations:
- + Add patch 1004 to allow overriding optimization flags.
- + Set optimization flags conditionally at build time.
- + Drop patch 2002 unconditionally suppressing arch-optimizations.
-
- -- Jonas Smedegaard Mon, 17 Jan 2011 16:04:48 +0100
-
-bitcoin (0.3.19~dfsg-4) unstable; urgency=low
-
- [ Micah Anderson ]
- * Provide example bitcoin.conf.
- * Add bitcoind(1) and bitcoin.conf(5) man pages.
-
- [ Jonas Smedegaard ]
- * Ease backporting:
- + Suppress optional build-dependencies.
- + Add fallback build-dependencies on the most recent Boost libs
- available in Lenny (where unversioned Boost libs are missing).
- * Add Micah as copyright holder for manpages, licensed as GPL-3+.
- * Bump copyright format to Subversion candidate draft 162 of DEP5.
-
- -- Jonas Smedegaard Mon, 17 Jan 2011 14:00:48 +0100
-
-bitcoin (0.3.19~dfsg-3) unstable; urgency=low
-
- * Document in copyright file files excluded from repackaged source.
- * Update copyright file:
- + Bump DEP5 format hint to Subversion draft rev. 153.
- + Consistently wrap at 72 chars.
- + Refer to GPL-2 file (not GPL symlink).
- * Link against Berkeley DB 4.8 (not 4.7):
- + Build-depend on libdb4.8++-dev (and on on libdb4.7++-dev).
- + Suggest libdb4.8-util and db4.7-util.
- + Add README.Debian note on (untested) upgrade routine.
- + Add NEWS entry on changed db version, referring to README.Debian.
-
- -- Jonas Smedegaard Fri, 07 Jan 2011 22:50:57 +0100
-
-bitcoin (0.3.19~dfsg-2) unstable; urgency=low
-
- * Adjust build options to use optimized miner only for amd64. Fixes
- FTBFS on i386 (and other archs, if compiling anywhere else at all).
- * Avoid static linking.
- * Adjust patch 2001 to avoid only arch-specific optimizations (keep
- -O3).
- * Extend long description to mention disk consumption and initial use
- of IRC.
- All of above changes thanks to Helmuth Grohne.
- * Add lintian override regarding OpenSSL and GPL: Linked code is Expat
- - only Debian packaging is GPL-2+.
-
- -- Jonas Smedegaard Wed, 29 Dec 2010 00:27:54 +0100
-
-bitcoin (0.3.19~dfsg-1) unstable; urgency=low
-
- [ Jonas Smedegaard ]
- * Initial release.
- Closes: bug#578157.
-
- -- Jonas Smedegaard Tue, 28 Dec 2010 15:49:22 +0100
diff --git a/contrib/debian/compat b/contrib/debian/compat
deleted file mode 100644
index 7f8f011eb..000000000
--- a/contrib/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/contrib/debian/control b/contrib/debian/control
deleted file mode 100644
index 0d6ad25e2..000000000
--- a/contrib/debian/control
+++ /dev/null
@@ -1,70 +0,0 @@
-Source: bitcoin
-Section: utils
-Priority: optional
-Maintainer: Matt Corallo
-Uploaders: Matt Corallo
-Build-Depends: debhelper,
- devscripts,
- automake,
- libtool,
- bash-completion,
- libdb4.8++-dev,
- libssl-dev,
- pkg-config,
- libevent-dev,
- libboost-system1.48-dev | libboost-system-dev (>> 1.47),
- libboost-filesystem1.48-dev | libboost-filesystem-dev (>> 1.47),
- libboost-program-options1.48-dev | libboost-program-options-dev (>> 1.47),
- libboost-thread1.48-dev | libboost-thread-dev (>> 1.47),
- libboost-test1.48-dev | libboost-test-dev (>> 1.47),
- libboost-chrono1.48-dev | libboost-chrono-dev (>> 1.47),
- libminiupnpc8-dev | libminiupnpc-dev,
- qt4-qmake, libqt4-dev,
- qttools5-dev-tools, qttools5-dev,
- libqrencode-dev,
- libprotobuf-dev, protobuf-compiler,
- python,
- libzmq3-dev
-Standards-Version: 3.9.2
-Homepage: https://bitcoincore.org/
-Vcs-Git: git://github.com/bitcoin/bitcoin.git
-Vcs-Browser: https://github.com/bitcoin/bitcoin
-
-Package: bitcoind
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer network based digital currency - daemon
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides the daemon, bitcoind, and the CLI tool
- bitcoin-cli to interact with the daemon.
-
-Package: bitcoin-qt
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer network based digital currency - Qt GUI
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
-
-Package: bitcoin-tx
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer digital currency - standalone transaction tool
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides bitcoin-tx, a command-line transaction creation
- tool which can be used without a bitcoin daemon. Some means of
- exchanging minimal transaction data with peers is still required.
diff --git a/contrib/debian/copyright b/contrib/debian/copyright
index 58149d9dd..410752ad6 100644
--- a/contrib/debian/copyright
+++ b/contrib/debian/copyright
@@ -141,7 +141,7 @@ Comment: Site: https://bitcointalk.org/?topic=1756.0
Files: src/qt/res/icons/proxy.png
src/qt/res/src/proxy.svg
Copyright: Cristian Mircea Messel
-Licese: public-domain
+License: public-domain
License: Expat
diff --git a/contrib/debian/gbp.conf b/contrib/debian/gbp.conf
deleted file mode 100644
index a7281f94b..000000000
--- a/contrib/debian/gbp.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration file for git-buildpackage and friends
-
-[DEFAULT]
-pristine-tar = True
-sign-tags = True
diff --git a/contrib/debian/patches/README b/contrib/debian/patches/README
deleted file mode 100644
index 80c158437..000000000
--- a/contrib/debian/patches/README
+++ /dev/null
@@ -1,3 +0,0 @@
-0xxx: Grabbed from upstream development.
-1xxx: Possibly relevant for upstream adoption.
-2xxx: Only relevant for official Debian release.
diff --git a/contrib/debian/patches/series b/contrib/debian/patches/series
deleted file mode 100644
index 8b1378917..000000000
--- a/contrib/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/contrib/debian/rules b/contrib/debian/rules
deleted file mode 100755
index 6885e3852..000000000
--- a/contrib/debian/rules
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/make -f
-# -*- mode: makefile; coding: utf-8 -*-
-
-#DEB_MAKE_CHECK_TARGET = test_bitcoin
-#build/bitcoind::
-# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
-
-%:
- dh --with bash-completion $@
-
-override_dh_auto_clean:
- if [ -f Makefile ]; then $(MAKE) distclean; fi
- rm -rf Makefile.in aclocal.m4 configure src/Makefile.in src/bitcoin-config.h.in src/build-aux src/qt/Makefile.in src/qt/test/Makefile.in src/test/Makefile.in
-
-QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
-
-# Yea, autogen should be run on the source archive, but I like doing git archive
-override_dh_auto_configure:
- ./autogen.sh
- ./configure --with-gui=$(QT)
-
-override_dh_auto_test:
- make check
diff --git a/contrib/debian/source/format b/contrib/debian/source/format
deleted file mode 100644
index 163aaf8d8..000000000
--- a/contrib/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/contrib/debian/watch b/contrib/debian/watch
deleted file mode 100644
index 4d9e0cfa5..000000000
--- a/contrib/debian/watch
+++ /dev/null
@@ -1,5 +0,0 @@
-# Run the "uscan" command to check for upstream updates and more.
-version=3
-# use qa.debian.org redirector; see man uscan
-opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
- http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py
index d544d5c37..abfa5ed5a 100755
--- a/contrib/devtools/circular-dependencies.py
+++ b/contrib/devtools/circular-dependencies.py
@@ -37,7 +37,7 @@ def module_name(path):
# TODO: implement support for multiple include directories
for arg in sorted(files.keys()):
module = files[arg]
- with open(arg, 'r') as f:
+ with open(arg, 'r', encoding="utf8") as f:
for line in f:
match = RE.match(line)
if match:
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py
index 5402870fb..77e845a9b 100755
--- a/contrib/devtools/clang-format-diff.py
+++ b/contrib/devtools/clang-format-diff.py
@@ -152,7 +152,7 @@ def main():
sys.exit(p.returncode)
if not args.i:
- with open(filename) as f:
+ with open(filename, encoding="utf8") as f:
code = f.readlines()
formatted_code = io.StringIO(stdout).readlines()
diff = difflib.unified_diff(code, formatted_code,
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
index 82d3c1968..c5fcddea0 100755
--- a/contrib/devtools/copyright_header.py
+++ b/contrib/devtools/copyright_header.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2016-2017 The Bitcoin Core developers
+# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -146,7 +146,7 @@ def file_has_without_c_style_copyright_for_holder(contents, holder_name):
################################################################################
def read_file(filename):
- return open(os.path.abspath(filename), 'r').read()
+ return open(os.path.abspath(filename), 'r', encoding="utf8").read()
def gather_file_info(filename):
info = {}
@@ -325,13 +325,13 @@ def get_most_recent_git_change_year(filename):
################################################################################
def read_file_lines(filename):
- f = open(os.path.abspath(filename), 'r')
+ f = open(os.path.abspath(filename), 'r', encoding="utf8")
file_lines = f.readlines()
f.close()
return file_lines
def write_file_lines(filename, file_lines):
- f = open(os.path.abspath(filename), 'w')
+ f = open(os.path.abspath(filename), 'w', encoding="utf8")
f.write(''.join(file_lines))
f.close()
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
index 27c80548c..b5de5a395 100755
--- a/contrib/devtools/gen-manpages.sh
+++ b/contrib/devtools/gen-manpages.sh
@@ -1,5 +1,6 @@
-#!/bin/bash
+#!/usr/bin/env bash
+export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
BUILDDIR=${BUILDDIR:-$TOPDIR}
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index 187ef75fb..4e90f85f5 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -191,7 +191,7 @@ def main():
merge_branch = 'pull/'+pull+'/merge'
local_merge_branch = 'pull/'+pull+'/local-merge'
- devnull = open(os.devnull,'w')
+ devnull = open(os.devnull, 'w', encoding="utf8")
try:
subprocess.check_call([GIT,'checkout','-q',branch])
except subprocess.CalledProcessError:
diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py
index a75731ef7..e9481dbbc 100755
--- a/contrib/devtools/optimize-pngs.py
+++ b/contrib/devtools/optimize-pngs.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2014-2017 The Bitcoin Core developers
+# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
@@ -27,7 +27,7 @@ def content_hash(filename):
pngcrush = 'pngcrush'
git = 'git'
folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"]
-basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True).rstrip('\n')
+basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True, encoding='utf8').rstrip('\n')
totalSaveBytes = 0
noHashChange = True
@@ -50,7 +50,7 @@ def content_hash(filename):
sys.exit(0)
#verify
- if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True):
+ if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True, encoding='utf8'):
print("PNG file "+file+" is corrupted after crushing, check out pngcursh version")
sys.exit(1)
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index c9516ef83..57af1c106 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015-2017 The Bitcoin Core developers
+# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
@@ -14,7 +14,7 @@
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
-NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning
+NONFATAL = {} # checks which are non-fatal for now but only generate a warning
def check_ELF_PIE(executable):
'''
@@ -97,7 +97,7 @@ def check_ELF_RELRO(executable):
raise IOError('Error opening file')
for line in stdout.splitlines():
tokens = line.split()
- if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2]):
+ if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]):
have_bindnow = True
return have_gnu_relro and have_bindnow
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index 3a67319ea..c6158c942 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -36,17 +36,18 @@
# (glibc) GLIBC_2_11
#
MAX_VERSIONS = {
-'GCC': (4,4,0),
-'CXXABI': (1,3,3),
-'GLIBCXX': (3,4,13),
-'GLIBC': (2,11)
+'GCC': (4,4,0),
+'CXXABI': (1,3,3),
+'GLIBCXX': (3,4,13),
+'GLIBC': (2,11),
+'LIBATOMIC': (1,0)
}
# See here for a description of _IO_stdin_used:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
# Ignore symbols that are exported as part of every executable
IGNORE_EXPORTS = {
-'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used'
+'_edata', '_end', '__end__', '_init', '__bss_start', '__bss_start__', '_bss_end__', '__bss_end__', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr'
}
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
@@ -59,8 +60,12 @@
'libanl.so.1', # DNS resolve
'libm.so.6', # math library
'librt.so.1', # real-time (clock)
+'libatomic.so.1',
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
'ld-linux.so.2', # 32-bit dynamic linker
+'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker
+'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
+'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker
# bitcoin-qt only
'libX11-xcb.so.1', # part of X11
'libX11.so.6', # part of X11
@@ -69,7 +74,13 @@
'libfreetype.so.6', # font parsing
'libdl.so.2' # programming interface to dynamic linker
}
-
+ARCH_MIN_GLIBC_VER = {
+'80386': (2,1),
+'X86-64': (2,2,5),
+'ARM': (2,4),
+'AArch64':(2,17),
+'RISC-V': (2,27)
+}
class CPPFilt(object):
'''
Demangle C++ symbol names.
@@ -94,23 +105,25 @@ def read_symbols(executable, imports=True):
Parse an ELF executable and return a list of (symbol,version) tuples
for dynamic, imported symbols.
'''
- p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', '-h', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
(stdout, stderr) = p.communicate()
if p.returncode:
raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip()))
syms = []
for line in stdout.splitlines():
line = line.split()
+ if 'Machine:' in line:
+ arch = line[-1]
if len(line)>7 and re.match('[0-9]+:$', line[0]):
(sym, _, version) = line[7].partition('@')
is_import = line[6] == 'UND'
if version.startswith('@'):
version = version[1:]
if is_import == imports:
- syms.append((sym, version))
+ syms.append((sym, version, arch))
return syms
-def check_version(max_versions, version):
+def check_version(max_versions, version, arch):
if '_' in version:
(lib, _, ver) = version.rpartition('_')
else:
@@ -119,7 +132,7 @@ def check_version(max_versions, version):
ver = tuple([int(x) for x in ver.split('.')])
if not lib in max_versions:
return False
- return ver <= max_versions[lib]
+ return ver <= max_versions[lib] or lib == 'GLIBC' and ver <= ARCH_MIN_GLIBC_VER[arch]
def read_libraries(filename):
p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
@@ -142,16 +155,17 @@ def read_libraries(filename):
retval = 0
for filename in sys.argv[1:]:
# Check imported symbols
- for sym,version in read_symbols(filename, True):
- if version and not check_version(MAX_VERSIONS, version):
+ for sym,version,arch in read_symbols(filename, True):
+ if version and not check_version(MAX_VERSIONS, version, arch):
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
retval = 1
# Check exported symbols
- for sym,version in read_symbols(filename, False):
- if sym in IGNORE_EXPORTS:
- continue
- print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
- retval = 1
+ if arch != 'RISC-V':
+ for sym,version,arch in read_symbols(filename, False):
+ if sym in IGNORE_EXPORTS:
+ continue
+ print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
+ retval = 1
# Check dependency libraries
for library_name in read_libraries(filename):
if library_name not in ALLOWED_LIBRARIES:
diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py
index 307e05773..fd374f632 100755
--- a/contrib/devtools/test-security-check.py
+++ b/contrib/devtools/test-security-check.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015-2017 The Bitcoin Core developers
+# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
@@ -9,7 +9,7 @@
import unittest
def write_testcode(filename):
- with open(filename, 'w') as f:
+ with open(filename, 'w', encoding="utf8") as f:
f.write('''
#include
int main()
@@ -32,11 +32,11 @@ def test_ELF(self):
cc = 'gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE NX RELRO Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE RELRO Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE']),
(1, executable+': failed RELRO'))
@@ -49,9 +49,9 @@ def test_32bit_PE(self):
cc = 'i686-w64-mingw32-gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, []),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase']),
(1, executable+': failed DYNAMIC_BASE NX'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase']),
(1, executable+': failed DYNAMIC_BASE'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']),
(0, ''))
@@ -61,9 +61,9 @@ def test_64bit_PE(self):
cc = 'x86_64-w64-mingw32-gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, []), (1, executable+': failed DYNAMIC_BASE NX\n'+executable+': warning HIGH_ENTROPY_VA'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']), (1, executable+': failed DYNAMIC_BASE\n'+executable+': warning HIGH_ENTROPY_VA'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']), (0, executable+': warning HIGH_ENTROPY_VA'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed HIGH_ENTROPY_VA'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va']), (0, ''))
if __name__ == '__main__':
diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index b36e6968b..f0098cfcd 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -30,6 +30,8 @@
LOCALE_DIR = 'src/qt/locale'
# Minimum number of messages for translation to be considered at all
MIN_NUM_MESSAGES = 10
+# Regexp to check for Bitcoin addresses
+ADDRESS_REGEXP = re.compile('([13]|bc1)[a-zA-Z0-9]{30,}')
def check_at_repository_root():
if not os.path.exists('.git'):
@@ -122,6 +124,12 @@ def escape_cdata(text):
text = text.replace('"', '"')
return text
+def contains_bitcoin_addr(text, errors):
+ if text != None and ADDRESS_REGEXP.search(text) != None:
+ errors.append('Translation "%s" contains a bitcoin address. This will be removed.' % (text))
+ return True
+ return False
+
def postprocess_translations(reduce_diff_hacks=False):
print('Checking and postprocessing...')
@@ -160,7 +168,7 @@ def postprocess_translations(reduce_diff_hacks=False):
if translation is None:
continue
errors = []
- valid = check_format_specifiers(source, translation, errors, numerus)
+ valid = check_format_specifiers(source, translation, errors, numerus) and not contains_bitcoin_addr(translation, errors)
for error in errors:
print('%s: %s' % (filename, error))
diff --git a/contrib/filter-lcov.py b/contrib/filter-lcov.py
index 299377d69..df1db76e9 100755
--- a/contrib/filter-lcov.py
+++ b/contrib/filter-lcov.py
@@ -13,8 +13,8 @@
outfile = args.outfile
in_remove = False
-with open(tracefile, 'r') as f:
- with open(outfile, 'w') as wf:
+with open(tracefile, 'r', encoding="utf8") as f:
+ with open(outfile, 'w', encoding="utf8") as wf:
for line in f:
for p in pattern:
if line.startswith("SF:") and p in line:
diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py
new file mode 100755
index 000000000..faf8b014a
--- /dev/null
+++ b/contrib/gitian-build.py
@@ -0,0 +1,231 @@
+#!/usr/bin/env python3
+
+import argparse
+import os
+import subprocess
+import sys
+
+def setup():
+ global args, workdir
+ programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget']
+ if args.kvm:
+ programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils']
+ elif args.docker:
+ dockers = ['docker.io', 'docker-ce']
+ for i in dockers:
+ return_code = subprocess.call(['sudo', 'apt-get', 'install', '-qq', i])
+ if return_code == 0:
+ break
+ if return_code != 0:
+ print('Cannot find any way to install docker', file=sys.stderr)
+ exit(1)
+ else:
+ programs += ['lxc', 'debootstrap']
+ subprocess.check_call(['sudo', 'apt-get', 'install', '-qq'] + programs)
+ if not os.path.isdir('gitian.sigs'):
+ subprocess.check_call(['git', 'clone', 'https://github.com/bitcoin-core/gitian.sigs.git'])
+ if not os.path.isdir('bitcoin-detached-sigs'):
+ subprocess.check_call(['git', 'clone', 'https://github.com/bitcoin-core/bitcoin-detached-sigs.git'])
+ if not os.path.isdir('gitian-builder'):
+ subprocess.check_call(['git', 'clone', 'https://github.com/devrandom/gitian-builder.git'])
+ if not os.path.isdir('bitcoin'):
+ subprocess.check_call(['git', 'clone', 'https://github.com/bitcoin/bitcoin.git'])
+ os.chdir('gitian-builder')
+ make_image_prog = ['bin/make-base-vm', '--suite', 'bionic', '--arch', 'amd64']
+ if args.docker:
+ make_image_prog += ['--docker']
+ elif not args.kvm:
+ make_image_prog += ['--lxc']
+ subprocess.check_call(make_image_prog)
+ os.chdir(workdir)
+ if args.is_bionic and not args.kvm and not args.docker:
+ subprocess.check_call(['sudo', 'sed', '-i', 's/lxcbr0/br0/', '/etc/default/lxc-net'])
+ print('Reboot is required')
+ exit(0)
+
+def build():
+ global args, workdir
+
+ os.makedirs('bitcoin-binaries/' + args.version, exist_ok=True)
+ print('\nBuilding Dependencies\n')
+ os.chdir('gitian-builder')
+ os.makedirs('inputs', exist_ok=True)
+
+ subprocess.check_call(['wget', '-N', '-P', 'inputs', 'http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz'])
+ subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch'])
+ subprocess.check_call(['make', '-C', '../bitcoin/depends', 'download', 'SOURCES_PATH=' + os.getcwd() + '/cache/common'])
+
+ if args.linux:
+ print('\nCompiling ' + args.version + ' Linux')
+ subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'bitcoin='+args.commit, '--url', 'bitcoin='+args.url, '../bitcoin/contrib/gitian-descriptors/gitian-linux.yml'])
+ subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-linux', '--destination', '../gitian.sigs/', '../bitcoin/contrib/gitian-descriptors/gitian-linux.yml'])
+ subprocess.check_call('mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/'+args.version, shell=True)
+
+ if args.windows:
+ print('\nCompiling ' + args.version + ' Windows')
+ subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'bitcoin='+args.commit, '--url', 'bitcoin='+args.url, '../bitcoin/contrib/gitian-descriptors/gitian-win.yml'])
+ subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-win-unsigned', '--destination', '../gitian.sigs/', '../bitcoin/contrib/gitian-descriptors/gitian-win.yml'])
+ subprocess.check_call('mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/', shell=True)
+ subprocess.check_call('mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/'+args.version, shell=True)
+
+ if args.macos:
+ print('\nCompiling ' + args.version + ' MacOS')
+ subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'bitcoin='+args.commit, '--url', 'bitcoin='+args.url, '../bitcoin/contrib/gitian-descriptors/gitian-osx.yml'])
+ subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-unsigned', '--destination', '../gitian.sigs/', '../bitcoin/contrib/gitian-descriptors/gitian-osx.yml'])
+ subprocess.check_call('mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/', shell=True)
+ subprocess.check_call('mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/'+args.version, shell=True)
+
+ os.chdir(workdir)
+
+ if args.commit_files:
+ print('\nCommitting '+args.version+' Unsigned Sigs\n')
+ os.chdir('gitian.sigs')
+ subprocess.check_call(['git', 'add', args.version+'-linux/'+args.signer])
+ subprocess.check_call(['git', 'add', args.version+'-win-unsigned/'+args.signer])
+ subprocess.check_call(['git', 'add', args.version+'-osx-unsigned/'+args.signer])
+ subprocess.check_call(['git', 'commit', '-m', 'Add '+args.version+' unsigned sigs for '+args.signer])
+ os.chdir(workdir)
+
+def sign():
+ global args, workdir
+ os.chdir('gitian-builder')
+
+ if args.windows:
+ print('\nSigning ' + args.version + ' Windows')
+ subprocess.check_call('cp inputs/bitcoin-' + args.version + '-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz', shell=True)
+ subprocess.check_call(['bin/gbuild', '-i', '--commit', 'signature='+args.commit, '../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml'])
+ subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-win-signed', '--destination', '../gitian.sigs/', '../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml'])
+ subprocess.check_call('mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/'+args.version, shell=True)
+ subprocess.check_call('mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/'+args.version, shell=True)
+
+ if args.macos:
+ print('\nSigning ' + args.version + ' MacOS')
+ subprocess.check_call('cp inputs/bitcoin-' + args.version + '-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz', shell=True)
+ subprocess.check_call(['bin/gbuild', '-i', '--commit', 'signature='+args.commit, '../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml'])
+ subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-signed', '--destination', '../gitian.sigs/', '../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml'])
+ subprocess.check_call('mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/'+args.version+'/bitcoin-'+args.version+'-osx.dmg', shell=True)
+
+ os.chdir(workdir)
+
+ if args.commit_files:
+ print('\nCommitting '+args.version+' Signed Sigs\n')
+ os.chdir('gitian.sigs')
+ subprocess.check_call(['git', 'add', args.version+'-win-signed/'+args.signer])
+ subprocess.check_call(['git', 'add', args.version+'-osx-signed/'+args.signer])
+ subprocess.check_call(['git', 'commit', '-a', '-m', 'Add '+args.version+' signed binary sigs for '+args.signer])
+ os.chdir(workdir)
+
+def verify():
+ global args, workdir
+ os.chdir('gitian-builder')
+
+ print('\nVerifying v'+args.version+' Linux\n')
+ subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-linux', '../bitcoin/contrib/gitian-descriptors/gitian-linux.yml'])
+ print('\nVerifying v'+args.version+' Windows\n')
+ subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-win.yml'])
+ print('\nVerifying v'+args.version+' MacOS\n')
+ subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-osx.yml'])
+ print('\nVerifying v'+args.version+' Signed Windows\n')
+ subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-signed', '../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml'])
+ print('\nVerifying v'+args.version+' Signed MacOS\n')
+ subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-signed', '../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml'])
+
+ os.chdir(workdir)
+
+def main():
+ global args, workdir
+
+ parser = argparse.ArgumentParser(usage='%(prog)s [options] signer version')
+ parser.add_argument('-c', '--commit', action='store_true', dest='commit', help='Indicate that the version argument is for a commit or branch')
+ parser.add_argument('-p', '--pull', action='store_true', dest='pull', help='Indicate that the version argument is the number of a github repository pull request')
+ parser.add_argument('-u', '--url', dest='url', default='https://github.com/bitcoin/bitcoin', help='Specify the URL of the repository. Default is %(default)s')
+ parser.add_argument('-v', '--verify', action='store_true', dest='verify', help='Verify the Gitian build')
+ parser.add_argument('-b', '--build', action='store_true', dest='build', help='Do a Gitian build')
+ parser.add_argument('-s', '--sign', action='store_true', dest='sign', help='Make signed binaries for Windows and MacOS')
+ parser.add_argument('-B', '--buildsign', action='store_true', dest='buildsign', help='Build both signed and unsigned binaries')
+ parser.add_argument('-o', '--os', dest='os', default='lwm', help='Specify which Operating Systems the build is for. Default is %(default)s. l for Linux, w for Windows, m for MacOS')
+ parser.add_argument('-j', '--jobs', dest='jobs', default='2', help='Number of processes to use. Default %(default)s')
+ parser.add_argument('-m', '--memory', dest='memory', default='2000', help='Memory to allocate in MiB. Default %(default)s')
+ parser.add_argument('-k', '--kvm', action='store_true', dest='kvm', help='Use KVM instead of LXC')
+ parser.add_argument('-d', '--docker', action='store_true', dest='docker', help='Use Docker instead of LXC')
+ parser.add_argument('-S', '--setup', action='store_true', dest='setup', help='Set up the Gitian building environment. Uses LXC. If you want to use KVM, use the --kvm option. Only works on Debian-based systems (Ubuntu, Debian)')
+ parser.add_argument('-D', '--detach-sign', action='store_true', dest='detach_sign', help='Create the assert file for detached signing. Will not commit anything.')
+ parser.add_argument('-n', '--no-commit', action='store_false', dest='commit_files', help='Do not commit anything to git')
+ parser.add_argument('signer', help='GPG signer to sign each build assert file')
+ parser.add_argument('version', help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified')
+
+ args = parser.parse_args()
+ workdir = os.getcwd()
+
+ args.linux = 'l' in args.os
+ args.windows = 'w' in args.os
+ args.macos = 'm' in args.os
+
+ args.is_bionic = b'bionic' in subprocess.check_output(['lsb_release', '-cs'])
+
+ if args.buildsign:
+ args.build=True
+ args.sign=True
+
+ if args.kvm and args.docker:
+ raise Exception('Error: cannot have both kvm and docker')
+
+ args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign'
+
+ # Set environment variable USE_LXC or USE_DOCKER, let gitian-builder know that we use lxc or docker
+ if args.docker:
+ os.environ['USE_DOCKER'] = '1'
+ elif not args.kvm:
+ os.environ['USE_LXC'] = '1'
+ if not 'GITIAN_HOST_IP' in os.environ.keys():
+ os.environ['GITIAN_HOST_IP'] = '10.0.3.1'
+ if not 'LXC_GUEST_IP' in os.environ.keys():
+ os.environ['LXC_GUEST_IP'] = '10.0.3.5'
+
+ # Disable for MacOS if no SDK found
+ if args.macos and not os.path.isfile('gitian-builder/inputs/MacOSX10.11.sdk.tar.gz'):
+ print('Cannot build for MacOS, SDK does not exist. Will build for other OSes')
+ args.macos = False
+
+ script_name = os.path.basename(sys.argv[0])
+ # Signer and version shouldn't be empty
+ if args.signer == '':
+ print(script_name+': Missing signer.')
+ print('Try '+script_name+' --help for more information')
+ exit(1)
+ if args.version == '':
+ print(script_name+': Missing version.')
+ print('Try '+script_name+' --help for more information')
+ exit(1)
+
+ # Add leading 'v' for tags
+ if args.commit and args.pull:
+ raise Exception('Cannot have both commit and pull')
+ args.commit = ('' if args.commit else 'v') + args.version
+
+ if args.setup:
+ setup()
+
+ os.chdir('bitcoin')
+ if args.pull:
+ subprocess.check_call(['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge'])
+ os.chdir('../gitian-builder/inputs/bitcoin')
+ subprocess.check_call(['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge'])
+ args.commit = subprocess.check_output(['git', 'show', '-s', '--format=%H', 'FETCH_HEAD'], universal_newlines=True, encoding='utf8').strip()
+ args.version = 'pull-' + args.version
+ print(args.commit)
+ subprocess.check_call(['git', 'fetch'])
+ subprocess.check_call(['git', 'checkout', args.commit])
+ os.chdir(workdir)
+
+ if args.build:
+ build()
+
+ if args.sign:
+ sign()
+
+ if args.verify:
+ verify()
+
+if __name__ == '__main__':
+ main()
diff --git a/contrib/gitian-build.sh b/contrib/gitian-build.sh
deleted file mode 100755
index 5a925f228..000000000
--- a/contrib/gitian-build.sh
+++ /dev/null
@@ -1,390 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2016 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-# What to do
-sign=false
-verify=false
-build=false
-
-# Systems to build
-linux=true
-windows=true
-osx=true
-
-# Other Basic variables
-SIGNER=
-VERSION=
-commit=false
-url=https://github.com/bitcoin/bitcoin
-proc=2
-mem=2000
-lxc=true
-osslTarUrl=http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
-osslPatchUrl=https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
-scriptName=$(basename -- "$0")
-signProg="gpg --detach-sign"
-commitFiles=true
-
-# Help Message
-read -d '' usage <<- EOF
-Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version
-
-Run this script from the directory containing the bitcoin, gitian-builder, gitian.sigs, and bitcoin-detached-sigs.
-
-Arguments:
-signer GPG signer to sign each build assert file
-version Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified
-
-Options:
--c|--commit Indicate that the version argument is for a commit or branch
--u|--url Specify the URL of the repository. Default is https://github.com/bitcoin/bitcoin
--v|--verify Verify the Gitian build
--b|--build Do a Gitian build
--s|--sign Make signed binaries for Windows and Mac OSX
--B|--buildsign Build both signed and unsigned binaries
--o|--os Specify which Operating Systems the build is for. Default is lwx. l for linux, w for windows, x for osx
--j Number of processes to use. Default 2
--m Memory to allocate in MiB. Default 2000
---kvm Use KVM instead of LXC
---setup Set up the Gitian building environment. Uses LXC. If you want to use KVM, use the --kvm option. Only works on Debian-based systems (Ubuntu, Debian)
---detach-sign Create the assert file for detached signing. Will not commit anything.
---no-commit Do not commit anything to git
--h|--help Print this help message
-EOF
-
-# Get options and arguments
-while :; do
- case $1 in
- # Verify
- -v|--verify)
- verify=true
- ;;
- # Build
- -b|--build)
- build=true
- ;;
- # Sign binaries
- -s|--sign)
- sign=true
- ;;
- # Build then Sign
- -B|--buildsign)
- sign=true
- build=true
- ;;
- # PGP Signer
- -S|--signer)
- if [ -n "$2" ]
- then
- SIGNER="$2"
- shift
- else
- echo 'Error: "--signer" requires a non-empty argument.'
- exit 1
- fi
- ;;
- # Operating Systems
- -o|--os)
- if [ -n "$2" ]
- then
- linux=false
- windows=false
- osx=false
- if [[ "$2" = *"l"* ]]
- then
- linux=true
- fi
- if [[ "$2" = *"w"* ]]
- then
- windows=true
- fi
- if [[ "$2" = *"x"* ]]
- then
- osx=true
- fi
- shift
- else
- echo 'Error: "--os" requires an argument containing an l (for linux), w (for windows), or x (for Mac OSX)'
- exit 1
- fi
- ;;
- # Help message
- -h|--help)
- echo "$usage"
- exit 0
- ;;
- # Commit or branch
- -c|--commit)
- commit=true
- ;;
- # Number of Processes
- -j)
- if [ -n "$2" ]
- then
- proc=$2
- shift
- else
- echo 'Error: "-j" requires an argument'
- exit 1
- fi
- ;;
- # Memory to allocate
- -m)
- if [ -n "$2" ]
- then
- mem=$2
- shift
- else
- echo 'Error: "-m" requires an argument'
- exit 1
- fi
- ;;
- # URL
- -u)
- if [ -n "$2" ]
- then
- url=$2
- shift
- else
- echo 'Error: "-u" requires an argument'
- exit 1
- fi
- ;;
- # kvm
- --kvm)
- lxc=false
- ;;
- # Detach sign
- --detach-sign)
- signProg="true"
- commitFiles=false
- ;;
- # Commit files
- --no-commit)
- commitFiles=false
- ;;
- # Setup
- --setup)
- setup=true
- ;;
- *) # Default case: If no more options then break out of the loop.
- break
- esac
- shift
-done
-
-# Set up LXC
-if [[ $lxc = true ]]
-then
- export USE_LXC=1
-fi
-
-# Check for OSX SDK
-if [[ ! -e "gitian-builder/inputs/MacOSX10.11.sdk.tar.gz" && $osx == true ]]
-then
- echo "Cannot build for OSX, SDK does not exist. Will build for other OSes"
- osx=false
-fi
-
-# Get signer
-if [[ -n "$1" ]]
-then
- SIGNER="$1"
- shift
-fi
-
-# Get version
-if [[ -n "$1" ]]
-then
- VERSION=$1
- COMMIT=$VERSION
- shift
-fi
-
-# Check that a signer is specified
-if [[ "$SIGNER" == "" ]]
-then
- echo "$scriptName: Missing signer."
- echo "Try $scriptName --help for more information"
- exit 1
-fi
-
-# Check that a version is specified
-if [[ $VERSION == "" ]]
-then
- echo "$scriptName: Missing version."
- echo "Try $scriptName --help for more information"
- exit 1
-fi
-
-# Add a "v" if no -c
-if [[ $commit = false ]]
-then
- COMMIT="v${VERSION}"
-fi
-echo ${COMMIT}
-
-# Setup build environment
-if [[ $setup = true ]]
-then
- sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils
- git clone https://github.com/bitcoin-core/gitian.sigs.git
- git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
- git clone https://github.com/devrandom/gitian-builder.git
- pushd ./gitian-builder
- if [[ -n "$USE_LXC" ]]
- then
- sudo apt-get install lxc
- bin/make-base-vm --suite trusty --arch amd64 --lxc
- else
- bin/make-base-vm --suite trusty --arch amd64
- fi
- popd
-fi
-
-# Set up build
-pushd ./bitcoin
-git fetch
-git checkout ${COMMIT}
-popd
-
-# Build
-if [[ $build = true ]]
-then
- # Make output folder
- mkdir -p ./bitcoin-binaries/${VERSION}
-
- # Build Dependencies
- echo ""
- echo "Building Dependencies"
- echo ""
- pushd ./gitian-builder
- mkdir -p inputs
- wget -N -P inputs $osslPatchUrl
- wget -N -P inputs $osslTarUrl
- make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
-
- # Linux
- if [[ $linux = true ]]
- then
- echo ""
- echo "Compiling ${VERSION} Linux"
- echo ""
- ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
- ./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
- mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION}
- fi
- # Windows
- if [[ $windows = true ]]
- then
- echo ""
- echo "Compiling ${VERSION} Windows"
- echo ""
- ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
- ./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
- mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
- mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION}
- fi
- # Mac OSX
- if [[ $osx = true ]]
- then
- echo ""
- echo "Compiling ${VERSION} Mac OSX"
- echo ""
- ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
- ./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
- mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
- mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION}
- fi
- popd
-
- if [[ $commitFiles = true ]]
- then
- # Commit to gitian.sigs repo
- echo ""
- echo "Committing ${VERSION} Unsigned Sigs"
- echo ""
- pushd gitian.sigs
- git add ${VERSION}-linux/"${SIGNER}"
- git add ${VERSION}-win-unsigned/"${SIGNER}"
- git add ${VERSION}-osx-unsigned/"${SIGNER}"
- git commit -a -m "Add ${VERSION} unsigned sigs for ${SIGNER}"
- popd
- fi
-fi
-
-# Verify the build
-if [[ $verify = true ]]
-then
- # Linux
- pushd ./gitian-builder
- echo ""
- echo "Verifying v${VERSION} Linux"
- echo ""
- ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
- # Windows
- echo ""
- echo "Verifying v${VERSION} Windows"
- echo ""
- ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
- # Mac OSX
- echo ""
- echo "Verifying v${VERSION} Mac OSX"
- echo ""
- ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
- # Signed Windows
- echo ""
- echo "Verifying v${VERSION} Signed Windows"
- echo ""
- ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
- # Signed Mac OSX
- echo ""
- echo "Verifying v${VERSION} Signed Mac OSX"
- echo ""
- ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
- popd
-fi
-
-# Sign binaries
-if [[ $sign = true ]]
-then
-
- pushd ./gitian-builder
- # Sign Windows
- if [[ $windows = true ]]
- then
- echo ""
- echo "Signing ${VERSION} Windows"
- echo ""
- ./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
- ./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
- mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION}
- mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION}
- fi
- # Sign Mac OSX
- if [[ $osx = true ]]
- then
- echo ""
- echo "Signing ${VERSION} Mac OSX"
- echo ""
- ./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
- ./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
- mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg
- fi
- popd
-
- if [[ $commitFiles = true ]]
- then
- # Commit Sigs
- pushd gitian.sigs
- echo ""
- echo "Committing ${VERSION} Signed Sigs"
- echo ""
- git add ${VERSION}-win-signed/"${SIGNER}"
- git add ${VERSION}-osx-signed/"${SIGNER}"
- git commit -a -m "Add ${VERSION} signed binary sigs for ${SIGNER}"
- popd
- fi
-fi
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 3e9ee0495..e97072c80 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,24 +1,28 @@
---
-name: "bitcoin-linux-0.17"
+name: "bitcoin-linux-0.18"
enable_cache: true
suites:
-- "trusty"
+- "bionic"
architectures:
- "amd64"
packages:
- "curl"
- "g++-aarch64-linux-gnu"
-- "g++-4.8-aarch64-linux-gnu"
-- "gcc-4.8-aarch64-linux-gnu"
+- "g++-8-aarch64-linux-gnu"
+- "gcc-8-aarch64-linux-gnu"
- "binutils-aarch64-linux-gnu"
- "g++-arm-linux-gnueabihf"
-- "g++-4.8-arm-linux-gnueabihf"
-- "gcc-4.8-arm-linux-gnueabihf"
+- "g++-8-arm-linux-gnueabihf"
+- "gcc-8-arm-linux-gnueabihf"
- "binutils-arm-linux-gnueabihf"
-- "g++-4.8-multilib"
-- "gcc-4.8-multilib"
+- "g++-riscv64-linux-gnu"
+- "g++-8-riscv64-linux-gnu"
+- "gcc-8-riscv64-linux-gnu"
+- "binutils-riscv64-linux-gnu"
+- "g++-8-multilib"
+- "gcc-8-multilib"
- "binutils-gold"
-- "git-core"
+- "git"
- "pkg-config"
- "autoconf"
- "libtool"
@@ -34,15 +38,16 @@ files: []
script: |
WRAP_DIR=$HOME/wrapped
- HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
+ HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
- FAKETIME_HOST_PROGS=""
+ FAKETIME_HOST_PROGS="gcc g++"
FAKETIME_PROGS="date ar ranlib nm"
HOST_CFLAGS="-O2 -g"
HOST_CXXFLAGS="-O2 -g"
HOST_LDFLAGS=-static-libstdc++
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
@@ -56,7 +61,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@@ -68,12 +73,15 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
- echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
- echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
- echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
- chmod +x ${WRAP_DIR}/${i}-${prog}
+ if which ${i}-${prog}-8
+ then
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog}-8 | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+ chmod +x ${WRAP_DIR}/${i}-${prog}
+ fi
done
done
}
@@ -98,8 +106,8 @@ script: |
for prog in gcc g++; do
rm -f ${WRAP_DIR}/${prog}
cat << EOF > ${WRAP_DIR}/${prog}
- #!/bin/bash
- REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
+ #!/usr/bin/env bash
+ REAL="`which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1`"
for var in "\$@"
do
if [ "\$var" = "-m32" ]; then
@@ -165,17 +173,7 @@ script: |
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security
-
- #TODO: This is a quick hack that disables symbol checking for arm.
- # Instead, we should investigate why these are popping up.
- # For aarch64, we'll need to bump up the min GLIBC version, as the abi
- # support wasn't introduced until 2.17.
- case $i in
- aarch64-*) : ;;
- arm-*) : ;;
- *) make ${MAKEOPTS} -C src check-symbols ;;
- esac
-
+ make ${MAKEOPTS} -C src check-symbols
make install DESTDIR=${INSTALLPATH}
cd installed
find . -name "lib*.la" -delete
@@ -183,6 +181,7 @@ script: |
rm -rf ${DISTNAME}/lib/pkgconfig
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
+ cp ../doc/README.md ${DISTNAME}/
find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
cd ../../
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index f6e9414ab..297a136fa 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,7 +1,7 @@
---
name: "bitcoin-dmg-signer"
suites:
-- "trusty"
+- "bionic"
architectures:
- "amd64"
packages:
@@ -19,7 +19,7 @@ script: |
# Create global faketime wrappers
for prog in ${FAKETIME_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index a84dce3e3..87d8007cc 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -1,15 +1,15 @@
---
-name: "bitcoin-osx-0.17"
+name: "bitcoin-osx-0.18"
enable_cache: true
suites:
-- "trusty"
+- "bionic"
architectures:
- "amd64"
packages:
- "ca-certificates"
- "curl"
- "g++"
-- "git-core"
+- "git"
- "pkg-config"
- "autoconf"
- "librsvg2-bin"
@@ -34,12 +34,13 @@ files:
- "MacOSX10.11.sdk.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
- HOSTS="x86_64-apple-darwin11"
+ HOSTS="x86_64-apple-darwin14"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
@@ -55,7 +56,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@@ -67,7 +68,7 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index 3c1e0214a..045be873e 100644
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -1,11 +1,12 @@
---
name: "bitcoin-win-signer"
suites:
-- "trusty"
+- "bionic"
architectures:
- "amd64"
packages:
-- "libssl-dev"
+# Once osslsigncode supports openssl 1.1, we can change this back to libssl-dev
+- "libssl1.0-dev"
- "autoconf"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 8a87d9175..31b9c309c 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,14 +1,14 @@
---
-name: "bitcoin-win-0.17"
+name: "bitcoin-win-0.18"
enable_cache: true
suites:
-- "trusty"
+- "bionic"
architectures:
- "amd64"
packages:
- "curl"
- "g++"
-- "git-core"
+- "git"
- "pkg-config"
- "autoconf"
- "libtool"
@@ -21,6 +21,7 @@ packages:
- "zip"
- "ca-certificates"
- "python"
+- "rename"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
@@ -29,12 +30,13 @@ script: |
WRAP_DIR=$HOME/wrapped
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
- FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
+ FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
HOST_CFLAGS="-O2 -g"
HOST_CXXFLAGS="-O2 -g"
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
@@ -48,7 +50,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@@ -60,7 +62,7 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
@@ -76,15 +78,15 @@ script: |
for i in $HOSTS; do
mkdir -p ${WRAP_DIR}/${i}
for prog in collect2; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}/${prog}
REAL=$(${i}-gcc -print-prog-name=${prog})
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
chmod +x ${WRAP_DIR}/${i}/${prog}
done
for prog in gcc g++; do
- echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
- echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
diff --git a/contrib/gitian-keys/README.md b/contrib/gitian-keys/README.md
index a9339c8bd..ffe4fb144 100644
--- a/contrib/gitian-keys/README.md
+++ b/contrib/gitian-keys/README.md
@@ -1,9 +1,10 @@
## PGP keys of Gitian builders and Developers
-The keys.txt contains the public keys of Gitian builders and active developers.
+The file `keys.txt` contains fingerprints of the public keys of Gitian builders
+and active developers.
-The keys are mainly used to sign git commits or the build results of Gitian
-builds.
+The associated keys are mainly used to sign git commits or the build results
+of Gitian builds.
The most recent version of each pgp key can be found on most pgp key servers.
diff --git a/contrib/init/README.md b/contrib/init/README.md
index 1a949f3c0..8d3e57c52 100644
--- a/contrib/init/README.md
+++ b/contrib/init/README.md
@@ -5,7 +5,7 @@ Upstart: bitcoind.conf
OpenRC: bitcoind.openrc
bitcoind.openrcconf
CentOS: bitcoind.init
-OS X: org.bitcoin.bitcoind.plist
+macOS: org.bitcoin.bitcoind.plist
```
have been made available to assist packagers in creating node packages here.
diff --git a/contrib/init/bitcoind.init b/contrib/init/bitcoind.init
index db5061874..0c95baf3a 100644
--- a/contrib/init/bitcoind.init
+++ b/contrib/init/bitcoind.init
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# bitcoind The bitcoin core server.
#
diff --git a/contrib/install_db4.sh b/contrib/install_db4.sh
index d315a7d3b..4f74e67f2 100755
--- a/contrib/install_db4.sh
+++ b/contrib/install_db4.sh
@@ -2,6 +2,7 @@
# Install libdb4.8 (Berkeley DB).
+export LC_ALL=C
set -e
if [ -z "${1}" ]; then
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index f8aea2734..b6ead4a16 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -2,7 +2,7 @@
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2017 The Bitcoin Core developers
+# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
@@ -75,7 +75,7 @@ def get_blk_dt(blk_hdr):
# When getting the list of block hashes, undo any byte reversals.
def get_block_hashes(settings):
blkindex = []
- f = open(settings['hashlist'], "r")
+ f = open(settings['hashlist'], "r", encoding="utf8")
for line in f:
line = line.rstrip()
if settings['rev_hash_bytes'] == 'true':
@@ -261,7 +261,7 @@ def run(self):
print("Usage: linearize-data.py CONFIG-FILE")
sys.exit(1)
- f = open(sys.argv[1])
+ f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search('^\s*#', line)
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index 994eeee8a..dab17d278 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -2,7 +2,7 @@
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2017 The Bitcoin Core developers
+# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
@@ -96,7 +96,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
def get_rpc_cookie():
# Open the cookie file
- with open(os.path.join(os.path.expanduser(settings['datadir']), '.cookie'), 'r') as f:
+ with open(os.path.join(os.path.expanduser(settings['datadir']), '.cookie'), 'r', encoding="ascii") as f:
combined = f.readline()
combined_split = combined.split(":")
settings['rpcuser'] = combined_split[0]
@@ -107,7 +107,7 @@ def get_rpc_cookie():
print("Usage: linearize-hashes.py CONFIG-FILE")
sys.exit(1)
- f = open(sys.argv[1])
+ f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search('^\s*#', line)
diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py
index b29fc7176..6fa134972 100755
--- a/contrib/macdeploy/custom_dsstore.py
+++ b/contrib/macdeploy/custom_dsstore.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2013-2016 The Bitcoin Core developers
+# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh
index 91674a92e..f8503e4de 100755
--- a/contrib/macdeploy/detached-sig-apply.sh
+++ b/contrib/macdeploy/detached-sig-apply.sh
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
set -e
UNSIGNED="$1"
diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh
index 3379a4599..5281ebcc4 100755
--- a/contrib/macdeploy/detached-sig-create.sh
+++ b/contrib/macdeploy/detached-sig-create.sh
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
set -e
ROOTDIR=dist
diff --git a/contrib/macdeploy/extract-osx-sdk.sh b/contrib/macdeploy/extract-osx-sdk.sh
index ff9fbd58d..4c175156f 100755
--- a/contrib/macdeploy/extract-osx-sdk.sh
+++ b/contrib/macdeploy/extract-osx-sdk.sh
@@ -1,8 +1,9 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
set -e
INPUTFILE="Xcode_7.3.1.dmg"
diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh
index 642686ac6..4ac7ffbac 100644
--- a/contrib/qos/tc.sh
+++ b/contrib/qos/tc.sh
@@ -2,6 +2,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question
diff --git a/contrib/rpm/README.md b/contrib/rpm/README.md
deleted file mode 100644
index e1e0745fd..000000000
--- a/contrib/rpm/README.md
+++ /dev/null
@@ -1,185 +0,0 @@
-RPM Spec File Notes
--------------------
-
-The RPM spec file provided here is for Bitcoin-Core 0.12.0 and builds on CentOS
-7 with either the CentOS provided OpenSSL library or with LibreSSL as packaged
-at [LibreLAMP.com](https://librelamp.com/). It should hopefully not be too
-difficult to port the RPM spec file to most RPM based Linux distributions.
-
-When porting the spec file to build for a particular distribution, there are
-some important notes.
-
-## Sources
-
-It is considered good form for all sources to reference a URL where the source
-can be downloaded.
-
-Sources 0-9 should be reserved for source code tarballs. `Source0` should
-reference the release tarball available from https://bitcoin.org/bin/ and
-`Source1` should reference the BerkeleyDB source.
-
-Sources 10-99 are for source files that are maintained in the
-[Bitcoin git repository](https://github.com/bitcoin/bitcoin) but are not part of
-the release tarball. Most of these will reside in the `contrib` sub-directory.
-
-Sources 10-19 should be reserved for miscellaneous configuration files.
-Currently only `Source10` is used, for the example `bitcoin.conf` file.
-
-Sources 20-29 should be reserved for man pages. Currently only `Source20`
-through `Source23` are used.
-
-Sources 30-39 should be reserved for SELinux related files. Currently only
-`Source30` through `Source32` are used. Until those files are in a tagged
-release, the full URL specified in the RPM spec file will not work. You can get
-them from the git repository where you retrieved this file.
-
-Sources 100+ are for files that are not source tarballs and are not maintained
-in the bitcoin git repository. At present only an SVG version of the Bitcoin
-icon is used.
-
-## Patches
-
-In general, patches should be avoided. When a packager feels a patch is
-necessary, the packager should bring the problem to the attention of the bitcoin
-developers so that an official fix to the issue can make it into the next
-release.
-
-### Patch0 bitcoin-0.12.0-libressl.patch
-
-This patch is only needed if building against LibreSSL. LibreSSL is not the
-standard TLS library on most Linux distributions. The patch will likely not be
-needed when 0.12.1 is released, a proper fix is already in the Bitcoin git
-master branch.
-
-## BuildRequires
-
-The packages specified in the `BuildRequires` are specified according to the
-package naming convention currently used in CentOS 7 and EPEL for CentOS 7. You
-may need to change some of the package names for other distributions. This is
-most likely to be the case with the Qt packages.
-
-## BerkeleyDB
-
-The `build-unix.md` file recommends building against BerkeleyDB 4.8.30. Even if
-that is the version your Linux distribution ships with, it probably is a good
-idea to build Bitcoin Core against a static version of that library compiled
-according to the instructions in the `build-unix.md` file so that any changes
-the distribution may make in the future will not result in a problem for users.
-
-The problem that can exist, clients built against different versions of
-BerkeleyDB may not be able read each other's `wallet.dat` file which can make it
-difficult for a user to recover from backup in the event of a system failure.
-
-## Graphical User Interface and Qt Version
-
-The RPM spec file will by default build the GUI client linked against the Qt5
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
-
-If you would prefer not to build the GUI at all, you can pass the switch
-`-D '_no_gui 1'` to the `rpmbuild` or `mock` build command.
-
-## Desktop and KDE Files
-
-The desktop and KDE meta files are created in the spec file itself with the
-`cat` command. This is done to allow easy distribution specific changes without
-needing to use any patches. A specific timestamp is given to the files so that
-it does not they do not appear to have been updated every time the package is
-built. If you do make changes to them, you probably should update timestamp
-assigned to them in the `touch` command that specifies the timestamp.
-
-## SVG, PNG, and XPM Icons
-
-The `bitcoin.svg` file is from the source listed as `Source100`. It is used as
-the source for the PNG and XPM files. The generated PNG and XPM files are given
-the same timestamp as the source SVG file as a means of indicating they are
-derived from it.
-
-## Systemd
-
-This spec file assumes the target distribution uses systemd. That really only
-matters for the `bitcoin-server` package. At this point, most RPM based
-distributions that still receive vendor updates do in fact use systemd.
-
-The files to control the service are created in the RPM spec file itself using
-the `cat` command. This is done to make it easy to modify for other
-distributions that may implement things differently without needing to patch
-source. A specific timestamp is given to the files so that they do not appear
-to have been updated every time the package is built. If you do make changes to
-them, you probably should update the timestamp assigned to them in the `touch`
-command that specifies the timestamp.
-
-## SELinux
-
-The `bitcoin-server` package should have SELinux support. How to properly do
-that *may* vary by distribution and version of distribution.
-
-The SELinux stuff in this RPM spec file *should* be correct for CentOS, RHEL,
-and Fedora but it would be a good idea to review it before building the package
-on other distributions.
-
-## Tests
-
-The `%check` section takes a very long time to run. If your build system has a
-time limit for package build, you may need to make an exception for this
-package. On CentOS 7 the `%check` section completes successfully with both
-OpenSSL and LibreSSL, a failure really does mean something is wrong.
-
-## LibreSSL Build Notes
-
-To build against LibreSSL you will need to pass the switch
-`-D '_use_libressl 1'` to the `rpmbuild` or `mock` command or the spec file will
-want the OpenSSL development files.
-
-### LibreSSL and Boost
-
-LibreSSL (and some newer builds of OpenSSL) do not have support for SSLv3. This
-can cause issues with the Boost package if the Boost package has not been
-patched accordingly. On those distributions, you will either need to build
-Bitcoin-Core against OpenSSL or use a patched version of Boost in the build
-system.
-
-As SSLv3 is no longer safe, distributions that have not patched Boost to work
-with TLS libraries that do not support SSLv3 should have bug reports filed
-against the Boost package. This bug report has already been filed for RHEL 7 but
-it may need to be filed for other distributions.
-
-A patch for Boost: https://github.com/boostorg/asio/pull/23/files
-
-## ZeroMQ
-
-At this time, this RPM spec file does not support the ZeroMQ build options. A
-suitable version of ZeroMQ is not available for the platform this spec file was
-developed on (CentOS 7).
-
-## Legacy Credit
-
-This RPM spec file is largely based upon the work of Michael Hampton at
-[Ringing Liberty](https://www.ringingliberty.com/bitcoin/). He has been
-packaging Bitcoin for Fedora at least since 2012.
-
-Most of the differences between his packaging and this package are stylistic in
-nature. The major differences:
-
-1. He builds from a github tagged release rather than a release tarball. This
-should not result in different source code.
-
-2. He does not build BerkeleyDB but instead uses the BerkeleyDB provided by the
-Linux distribution. For the distributions he packages for, they currently all
-use the same version of BerkeleyDB so that difference is *probably* just
-academic.
-
-3. As of his 10.11.2 package he did not allow for building against LibreSSL,
-specifying a build without the Qt GUI, or specifying which version of the Qt
-libraries to use.
-
-4. I renamed the `bitcoin` package that contains the Qt GUI to `bitcoin-core` as
-that appears to be how the general population refers to it, in contrast to
-`bitcoin-xt` or `bitcoin-classic`. I wanted to make sure the general population
-knows what they are getting when installing the GUI package.
-
-As far as minor differences, I generally prefer to assign the file permissions
-in the `%files` portion of an RPM spec file rather than specifying the
-permissions of a file during `%install` and other minor things like that
-are largely just cosmetic.
diff --git a/contrib/rpm/bitcoin-0.12.0-libressl.patch b/contrib/rpm/bitcoin-0.12.0-libressl.patch
deleted file mode 100644
index 555614a06..000000000
--- a/contrib/rpm/bitcoin-0.12.0-libressl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ur bitcoin-0.12.0.orig/src/init.cpp bitcoin-0.12.0/src/init.cpp
---- bitcoin-0.12.0.orig/src/init.cpp 2015-12-31 16:00:00.000000000 -0800
-+++ bitcoin-0.12.0/src/init.cpp 2016-02-23 06:03:47.133227757 -0800
-@@ -1075,7 +1075,7 @@
- if (fPrintToDebugLog)
- OpenDebugLog();
-
--#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-+#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
- LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
- #else
- LogPrintf("Using OpenSSL version %s\n", OpenSSL_version(OPENSSL_VERSION));
-diff -ur bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp bitcoin-0.12.0/src/qt/rpcconsole.cpp
---- bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp 2015-12-31 16:00:00.000000000 -0800
-+++ bitcoin-0.12.0/src/qt/rpcconsole.cpp 2016-02-23 15:09:42.881126841 -0800
-@@ -264,7 +264,7 @@
-
- // set library version labels
-
--#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-+#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
- #else
- ui->openSSLVersion->setText(OpenSSL_version(OPENSSL_VERSION));
diff --git a/contrib/rpm/bitcoin.fc b/contrib/rpm/bitcoin.fc
deleted file mode 100644
index 6f5eef637..000000000
--- a/contrib/rpm/bitcoin.fc
+++ /dev/null
@@ -1,8 +0,0 @@
-/usr/bin/bitcoin-cli -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-/usr/sbin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-/usr/lib(64)?/bitcoin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-
-/etc/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_conf_t,s0)
-/var/lib/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_var_lib_t,s0)
-
-(/var)?/run/bitcoind(/.*)? gen_context(system_u:object_r:bitcoin_var_run_t,s0)
diff --git a/contrib/rpm/bitcoin.if b/contrib/rpm/bitcoin.if
deleted file mode 100644
index b206866cc..000000000
--- a/contrib/rpm/bitcoin.if
+++ /dev/null
@@ -1,157 +0,0 @@
-
-## policy for bitcoin
-
-
-########################################
-##
-## Transition to bitcoin.
-##
-##
-##
-## Domain allowed to transition.
-##
-##
-#
-interface(`bitcoin_domtrans',`
- gen_require(`
- type bitcoin_t, bitcoin_exec_t;
- ')
-
- corecmd_search_bin($1)
- domtrans_pattern($1, bitcoin_exec_t, bitcoin_t)
-')
-
-
-########################################
-##
-## Execute bitcoin server in the bitcoin domain.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`bitcoin_initrc_domtrans',`
- gen_require(`
- type bitcoin_initrc_exec_t;
- ')
-
- init_labeled_script_domtrans($1, bitcoin_initrc_exec_t)
-')
-
-
-########################################
-##
-## Search bitcoin lib directories.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`bitcoin_search_lib',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- allow $1 bitcoin_var_lib_t:dir search_dir_perms;
- files_search_var_lib($1)
-')
-
-########################################
-##
-## Read bitcoin lib files.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`bitcoin_read_lib_files',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- read_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-########################################
-##
-## Manage bitcoin lib files.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`bitcoin_manage_lib_files',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- manage_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-########################################
-##
-## Manage bitcoin lib directories.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`bitcoin_manage_lib_dirs',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- manage_dirs_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-
-########################################
-##
-## All of the rules required to administrate
-## a bitcoin environment
-##
-##
-##
-## Domain allowed access.
-##
-##
-##
-##
-## Role allowed access.
-##
-##
-##
-#
-interface(`bitcoin_admin',`
- gen_require(`
- type bitcoin_t;
- type bitcoin_initrc_exec_t;
- type bitcoin_var_lib_t;
- ')
-
- allow $1 bitcoin_t:process { ptrace signal_perms };
- ps_process_pattern($1, bitcoin_t)
-
- bitcoin_initrc_domtrans($1)
- domain_system_change_exemption($1)
- role_transition $2 bitcoin_initrc_exec_t system_r;
- allow $2 system_r;
-
- files_search_var_lib($1)
- admin_pattern($1, bitcoin_var_lib_t)
-
-')
-
diff --git a/contrib/rpm/bitcoin.spec b/contrib/rpm/bitcoin.spec
deleted file mode 100644
index 1e839ce8c..000000000
--- a/contrib/rpm/bitcoin.spec
+++ /dev/null
@@ -1,445 +0,0 @@
-%define bdbv 4.8.30
-%global selinux_variants mls strict targeted
-
-%if 0%{?_no_gui:1}
-%define _buildqt 0
-%define buildargs --with-gui=no
-%else
-%define _buildqt 1
-%if 0%{?_use_qt4}
-%define buildargs --with-qrencode --with-gui=qt4
-%else
-%define buildargs --with-qrencode --with-gui=qt5
-%endif
-%endif
-
-Name: bitcoin
-Version: 0.12.0
-Release: 2%{?dist}
-Summary: Peer to Peer Cryptographic Currency
-
-Group: Applications/System
-License: MIT
-URL: https://bitcoin.org/
-Source0: https://bitcoin.org/bin/bitcoin-core-%{version}/bitcoin-%{version}.tar.gz
-Source1: http://download.oracle.com/berkeley-db/db-%{bdbv}.NC.tar.gz
-
-Source10: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/debian/examples/bitcoin.conf
-
-#man pages
-Source20: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoind.1
-Source21: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-cli.1
-Source22: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-qt.1
-
-#selinux
-Source30: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.te
-# Source31 - what about bitcoin-tx and bench_bitcoin ???
-Source31: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.fc
-Source32: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.if
-
-Source100: https://upload.wikimedia.org/wikipedia/commons/4/46/Bitcoin.svg
-
-%if 0%{?_use_libressl:1}
-BuildRequires: libressl-devel
-%else
-BuildRequires: openssl-devel
-%endif
-BuildRequires: boost-devel
-BuildRequires: miniupnpc-devel
-BuildRequires: autoconf automake libtool
-BuildRequires: libevent-devel
-
-
-Patch0: bitcoin-0.12.0-libressl.patch
-
-
-%description
-Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
-operate with no central authority or banks; managing transactions and the
-issuing of bitcoins is carried out collectively by the network.
-
-%if %{_buildqt}
-%package core
-Summary: Peer to Peer Cryptographic Currency
-Group: Applications/System
-Obsoletes: %{name} < %{version}-%{release}
-Provides: %{name} = %{version}-%{release}
-%if 0%{?_use_qt4}
-BuildRequires: qt-devel
-%else
-BuildRequires: qt5-qtbase-devel
-# for /usr/bin/lrelease-qt5
-BuildRequires: qt5-linguist
-%endif
-BuildRequires: protobuf-devel
-BuildRequires: qrencode-devel
-BuildRequires: %{_bindir}/desktop-file-validate
-# for icon generation from SVG
-BuildRequires: %{_bindir}/inkscape
-BuildRequires: %{_bindir}/convert
-
-%description core
-Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
-operate with no central authority or banks; managing transactions and the
-issuing of bitcoins is carried out collectively by the network.
-
-This package contains the Qt based graphical client and node. If you are looking
-to run a Bitcoin wallet, this is probably the package you want.
-%endif
-
-
-%package libs
-Summary: Bitcoin shared libraries
-Group: System Environment/Libraries
-
-%description libs
-This package provides the bitcoinconsensus shared libraries. These libraries
-may be used by third party software to provide consensus verification
-functionality.
-
-Unless you know need this package, you probably do not.
-
-%package devel
-Summary: Development files for bitcoin
-Group: Development/Libraries
-Requires: %{name}-libs = %{version}-%{release}
-
-%description devel
-This package contains the header files and static library for the
-bitcoinconsensus shared library. If you are developing or compiling software
-that wants to link against that library, then you need this package installed.
-
-Most people do not need this package installed.
-
-%package server
-Summary: The bitcoin daemon
-Group: System Environment/Daemons
-Requires: bitcoin-utils = %{version}-%{release}
-Requires: selinux-policy policycoreutils-python
-Requires(pre): shadow-utils
-Requires(post): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
-Requires(postun): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
-BuildRequires: systemd
-BuildRequires: checkpolicy
-BuildRequires: %{_datadir}/selinux/devel/Makefile
-
-%description server
-This package provides a stand-alone bitcoin-core daemon. For most users, this
-package is only needed if they need a full-node without the graphical client.
-
-Some third party wallet software will want this package to provide the actual
-bitcoin-core node they use to connect to the network.
-
-If you use the graphical bitcoin-core client then you almost certainly do not
-need this package.
-
-%package utils
-Summary: Bitcoin utilities
-Group: Applications/System
-
-%description utils
-This package provides several command line utilities for interacting with a
-bitcoin-core daemon.
-
-The bitcoin-cli utility allows you to communicate and control a bitcoin daemon
-over RPC, the bitcoin-tx utility allows you to create a custom transaction, and
-the bench_bitcoin utility can be used to perform some benchmarks.
-
-This package contains utilities needed by the bitcoin-server package.
-
-
-%prep
-%setup -q
-%patch0 -p1 -b .libressl
-cp -p %{SOURCE10} ./bitcoin.conf.example
-tar -zxf %{SOURCE1}
-cp -p db-%{bdbv}.NC/LICENSE ./db-%{bdbv}.NC-LICENSE
-mkdir db4 SELinux
-cp -p %{SOURCE30} %{SOURCE31} %{SOURCE32} SELinux/
-
-
-%build
-CWD=`pwd`
-cd db-%{bdbv}.NC/build_unix/
-../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${CWD}/db4
-make install
-cd ../..
-
-./autogen.sh
-%configure LDFLAGS="-L${CWD}/db4/lib/" CPPFLAGS="-I${CWD}/db4/include/" --with-miniupnpc --enable-glibc-back-compat %{buildargs}
-make %{?_smp_mflags}
-
-pushd SELinux
-for selinuxvariant in %{selinux_variants}; do
- make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
- mv bitcoin.pp bitcoin.pp.${selinuxvariant}
- make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
-done
-popd
-
-
-%install
-make install DESTDIR=%{buildroot}
-
-mkdir -p -m755 %{buildroot}%{_sbindir}
-mv %{buildroot}%{_bindir}/bitcoind %{buildroot}%{_sbindir}/bitcoind
-
-# systemd stuff
-mkdir -p %{buildroot}%{_tmpfilesdir}
-cat < %{buildroot}%{_tmpfilesdir}/bitcoin.conf
-d /run/bitcoind 0750 bitcoin bitcoin -
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_tmpfilesdir}/bitcoin.conf
-
-mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
-cat < %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
-# Provide options to the bitcoin daemon here, for example
-# OPTIONS="-testnet -disable-wallet"
-
-OPTIONS=""
-
-# System service defaults.
-# Don't change these unless you know what you're doing.
-CONFIG_FILE="%{_sysconfdir}/bitcoin/bitcoin.conf"
-DATA_DIR="%{_localstatedir}/lib/bitcoin"
-PID_FILE="/run/bitcoind/bitcoind.pid"
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
-
-mkdir -p %{buildroot}%{_unitdir}
-cat < %{buildroot}%{_unitdir}/bitcoin.service
-[Unit]
-Description=Bitcoin daemon
-After=syslog.target network.target
-
-[Service]
-Type=forking
-ExecStart=%{_sbindir}/bitcoind -daemon -conf=\${CONFIG_FILE} -datadir=\${DATA_DIR} -pid=\${PID_FILE} \$OPTIONS
-EnvironmentFile=%{_sysconfdir}/sysconfig/bitcoin
-User=bitcoin
-Group=bitcoin
-
-Restart=on-failure
-PrivateTmp=true
-TimeoutStopSec=120
-TimeoutStartSec=60
-StartLimitInterval=240
-StartLimitBurst=5
-
-[Install]
-WantedBy=multi-user.target
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_unitdir}/bitcoin.service
-#end systemd stuff
-
-mkdir %{buildroot}%{_sysconfdir}/bitcoin
-mkdir -p %{buildroot}%{_localstatedir}/lib/bitcoin
-
-#SELinux
-for selinuxvariant in %{selinux_variants}; do
- install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 SELinux/bitcoin.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/bitcoin.pp
-done
-
-%if %{_buildqt}
-# qt icons
-install -D -p share/pixmaps/bitcoin.ico %{buildroot}%{_datadir}/pixmaps/bitcoin.ico
-install -p share/pixmaps/nsis-header.bmp %{buildroot}%{_datadir}/pixmaps/
-install -p share/pixmaps/nsis-wizard.bmp %{buildroot}%{_datadir}/pixmaps/
-install -p %{SOURCE100} %{buildroot}%{_datadir}/pixmaps/bitcoin.svg
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin16.png -w16 -h16
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin32.png -w32 -h32
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin64.png -w64 -h64
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin128.png -w128 -h128
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin256.png -w256 -h256
-%{_bindir}/convert -resize 16x16 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin16.xpm
-%{_bindir}/convert -resize 32x32 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin32.xpm
-%{_bindir}/convert -resize 64x64 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin64.xpm
-%{_bindir}/convert -resize 128x128 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin128.xpm
-%{_bindir}/convert %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin256.xpm
-touch %{buildroot}%{_datadir}/pixmaps/*.png -r %{SOURCE100}
-touch %{buildroot}%{_datadir}/pixmaps/*.xpm -r %{SOURCE100}
-
-# Desktop File - change the touch timestamp if modifying
-mkdir -p %{buildroot}%{_datadir}/applications
-cat < %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-[Desktop Entry]
-Encoding=UTF-8
-Name=Bitcoin
-Comment=Bitcoin P2P Cryptocurrency
-Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
-Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
-Exec=bitcoin-qt %u
-Terminal=false
-Type=Application
-Icon=bitcoin128
-MimeType=x-scheme-handler/bitcoin;
-Categories=Office;Finance;
-EOF
-# change touch date when modifying desktop
-touch -a -m -t 201511100546 %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-
-# KDE protocol - change the touch timestamp if modifying
-mkdir -p %{buildroot}%{_datadir}/kde4/services
-cat < %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
-[Protocol]
-exec=bitcoin-qt '%u'
-protocol=bitcoin
-input=none
-output=none
-helper=true
-listing=
-reading=false
-writing=false
-makedir=false
-deleting=false
-EOF
-# change touch date when modifying protocol
-touch -a -m -t 201511100546 %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
-%endif
-
-# man pages
-install -D -p %{SOURCE20} %{buildroot}%{_mandir}/man1/bitcoind.1
-install -p %{SOURCE21} %{buildroot}%{_mandir}/man1/bitcoin-cli.1
-%if %{_buildqt}
-install -p %{SOURCE22} %{buildroot}%{_mandir}/man1/bitcoin-qt.1
-%endif
-
-# nuke these, we do extensive testing of binaries in %%check before packaging
-rm -f %{buildroot}%{_bindir}/test_*
-
-%check
-make check
-srcdir=src test/bitcoin-util-test.py
-test/functional/test_runner.py --extended
-
-%post libs -p /sbin/ldconfig
-
-%postun libs -p /sbin/ldconfig
-
-%pre server
-getent group bitcoin >/dev/null || groupadd -r bitcoin
-getent passwd bitcoin >/dev/null ||
- useradd -r -g bitcoin -d /var/lib/bitcoin -s /sbin/nologin \
- -c "Bitcoin wallet server" bitcoin
-exit 0
-
-%post server
-%systemd_post bitcoin.service
-# SELinux
-if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
-for selinuxvariant in %{selinux_variants}; do
- %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/bitcoin.pp &> /dev/null || :
-done
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 7932
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 7933
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 17932
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 17933
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 17443
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 17444
-%{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
-%{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || :
-fi
-
-%posttrans server
-%{_bindir}/systemd-tmpfiles --create
-
-%preun server
-%systemd_preun bitcoin.service
-
-%postun server
-%systemd_postun bitcoin.service
-# SELinux
-if [ $1 -eq 0 ]; then
- if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
- %{_sbindir}/semanage port -d -p tcp 7932
- %{_sbindir}/semanage port -d -p tcp 7933
- %{_sbindir}/semanage port -d -p tcp 17932
- %{_sbindir}/semanage port -d -p tcp 17933
- %{_sbindir}/semanage port -d -p tcp 17443
- %{_sbindir}/semanage port -d -p tcp 17444
- for selinuxvariant in %{selinux_variants}; do
- %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || :
- done
- %{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
- [ -d %{_localstatedir}/lib/bitcoin ] && \
- %{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin &> /dev/null || :
- fi
-fi
-
-%clean
-rm -rf %{buildroot}
-
-%if %{_buildqt}
-%files core
-%defattr(-,root,root,-)
-%license COPYING db-%{bdbv}.NC-LICENSE
-%doc COPYING bitcoin.conf.example doc/README.md doc/bips.md doc/files.md doc/multiwallet-qt.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
-%attr(0755,root,root) %{_bindir}/bitcoin-qt
-%attr(0644,root,root) %{_datadir}/applications/bitcoin-core.desktop
-%attr(0644,root,root) %{_datadir}/kde4/services/bitcoin-core.protocol
-%attr(0644,root,root) %{_datadir}/pixmaps/*.ico
-%attr(0644,root,root) %{_datadir}/pixmaps/*.bmp
-%attr(0644,root,root) %{_datadir}/pixmaps/*.svg
-%attr(0644,root,root) %{_datadir}/pixmaps/*.png
-%attr(0644,root,root) %{_datadir}/pixmaps/*.xpm
-%attr(0644,root,root) %{_mandir}/man1/bitcoin-qt.1*
-%endif
-
-%files libs
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING doc/README.md doc/shared-libraries.md
-%{_libdir}/lib*.so.*
-
-%files devel
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING doc/README.md doc/developer-notes.md doc/shared-libraries.md
-%attr(0644,root,root) %{_includedir}/*.h
-%{_libdir}/*.so
-%{_libdir}/*.a
-%{_libdir}/*.la
-%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
-
-%files server
-%defattr(-,root,root,-)
-%license COPYING db-%{bdbv}.NC-LICENSE
-%doc COPYING bitcoin.conf.example doc/README.md doc/REST-interface.md doc/bips.md doc/dnsseed-policy.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
-%attr(0755,root,root) %{_sbindir}/bitcoind
-%attr(0644,root,root) %{_tmpfilesdir}/bitcoin.conf
-%attr(0644,root,root) %{_unitdir}/bitcoin.service
-%dir %attr(0750,bitcoin,bitcoin) %{_sysconfdir}/bitcoin
-%dir %attr(0750,bitcoin,bitcoin) %{_localstatedir}/lib/bitcoin
-%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/sysconfig/bitcoin
-%attr(0644,root,root) %{_datadir}/selinux/*/*.pp
-%attr(0644,root,root) %{_mandir}/man1/bitcoind.1*
-
-%files utils
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING bitcoin.conf.example doc/README.md
-%attr(0755,root,root) %{_bindir}/bitcoin-cli
-%attr(0755,root,root) %{_bindir}/bitcoin-tx
-%attr(0755,root,root) %{_bindir}/bench_bitcoin
-%attr(0644,root,root) %{_mandir}/man1/bitcoin-cli.1*
-
-
-
-%changelog
-* Fri Jul 20 2018 Jon Layton - 0.12.0-3
-- Adjust ports for Bitcoin Private
-
-* Fri Feb 26 2016 Alice Wonder - 0.12.0-2
-- Rename Qt package from bitcoin to bitcoin-core
-- Make building of the Qt package optional
-- When building the Qt package, default to Qt5 but allow building
-- against Qt4
-- Only run SELinux stuff in post scripts if it is not set to disabled
-
-* Wed Feb 24 2016 Alice Wonder - 0.12.0-1
-- Initial spec file for 0.12.0 release
-
-# This spec file is written from scratch but a lot of the packaging decisions are directly
-# based upon the 0.11.2 package spec file from https://www.ringingliberty.com/bitcoin/
diff --git a/contrib/rpm/bitcoin.te b/contrib/rpm/bitcoin.te
deleted file mode 100644
index d6231c591..000000000
--- a/contrib/rpm/bitcoin.te
+++ /dev/null
@@ -1,81 +0,0 @@
-policy_module(bitcoin, 1.100.1)
-
-########################################
-#
-# Declarations
-#
-
-type bitcoin_t;
-type bitcoin_exec_t;
-init_daemon_domain(bitcoin_t, bitcoin_exec_t)
-
-permissive bitcoin_t;
-
-type bitcoin_initrc_exec_t;
-init_script_file(bitcoin_initrc_exec_t)
-
-type bitcoin_conf_t;
-files_type(bitcoin_conf_t)
-
-type bitcoin_var_lib_t;
-files_type(bitcoin_var_lib_t)
-
-type bitcoin_var_run_t;
-files_type(bitcoin_var_run_t)
-
-type bitcoin_port_t;
-corenet_port(bitcoin_port_t)
-
-########################################
-#
-# bitcoin local policy
-#
-allow bitcoin_t self:process { fork };
-
-allow bitcoin_t self:fifo_file rw_fifo_file_perms;
-allow bitcoin_t self:unix_stream_socket create_stream_socket_perms;
-
-manage_dirs_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
-manage_files_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
-
-manage_dirs_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
-manage_files_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
-files_var_lib_filetrans(bitcoin_t, bitcoin_var_lib_t, { dir file })
-
-manage_dirs_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
-manage_files_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
-
-sysnet_dns_name_resolve(bitcoin_t)
-corenet_all_recvfrom_unlabeled(bitcoin_t)
-
-allow bitcoin_t self:tcp_socket create_stream_socket_perms;
-corenet_tcp_sendrecv_generic_if(bitcoin_t)
-corenet_tcp_sendrecv_generic_node(bitcoin_t)
-corenet_tcp_sendrecv_all_ports(bitcoin_t)
-corenet_tcp_bind_generic_node(bitcoin_t)
-
-gen_require(`
- type bitcoin_port_t;
-')
-allow bitcoin_t bitcoin_port_t:tcp_socket name_bind;
-
-gen_require(`
- type bitcoin_port_t;
-')
-allow bitcoin_t bitcoin_port_t:tcp_socket name_connect;
-
-domain_use_interactive_fds(bitcoin_t)
-
-files_read_etc_files(bitcoin_t)
-
-miscfiles_read_localization(bitcoin_t)
-
-sysnet_dns_name_resolve(bitcoin_t)
-
-allow bitcoin_t bitcoin_exec_t:file execute_no_trans;
-allow bitcoin_t self:process setsched;
-corecmd_exec_ls(bitcoin_t)
-corenet_tcp_connect_http_port(bitcoin_t)
-dev_read_urand(bitcoin_t)
-fs_getattr_xattr_fs(bitcoin_t)
-kernel_read_system_state(bitcoin_t)
diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md
index 6dc277f29..502c20d0d 100644
--- a/contrib/seeds/README.md
+++ b/contrib/seeds/README.md
@@ -4,7 +4,7 @@ Utility to generate the seeds.txt list that is compiled into the client
(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).
Be sure to update `PATTERN_AGENT` in `makeseeds.py` to include the current version,
-and remove old versions as necessary (at a minimum when GetDesireableServiceFlags
+and remove old versions as necessary (at a minimum when GetDesirableServiceFlags
changes its default return value, as those are the services which seeds are added
to addrman with).
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
index 94d66a7f3..b15643956 100755
--- a/contrib/seeds/generate-seeds.py
+++ b/contrib/seeds/generate-seeds.py
@@ -127,10 +127,10 @@ def main():
g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
g.write(' * IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.\n')
g.write(' */\n')
- with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
+ with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_main', 7933)
g.write('\n')
- with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
+ with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_test', 17933)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
index 59044e701..6527deccf 100755
--- a/contrib/seeds/makeseeds.py
+++ b/contrib/seeds/makeseeds.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2013-2017 The Bitcoin Core developers
+# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
@@ -30,7 +30,7 @@
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
-PATTERN_AGENT = re.compile(r"^(/Satoshi:0.13.(1|2|99)/|/Satoshi:0.14.(0|1|2|99)/|/Satoshi:0.15.(0|1|2|99)/)$")
+PATTERN_AGENT = re.compile(r"^(/Satoshi:0.14.(0|1|2|99)/|/Satoshi:0.15.(0|1|2|99)|/Satoshi:0.16.(0|1|2|99)/)$")
def parseline(line):
sline = line.split()
diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt
index 8b1378917..e69de29bb 100644
--- a/contrib/seeds/nodes_main.txt
+++ b/contrib/seeds/nodes_main.txt
@@ -1 +0,0 @@
-
diff --git a/contrib/testgen/README.md b/contrib/testgen/README.md
index 83624f443..580ed541c 100644
--- a/contrib/testgen/README.md
+++ b/contrib/testgen/README.md
@@ -4,5 +4,5 @@ Utilities to generate test vectors for the data-driven Bitcoin tests.
Usage:
- gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
- gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
\ No newline at end of file
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_keys_invalid.json
diff --git a/contrib/testgen/base58.py b/contrib/testgen/base58.py
index 071bc722b..da67cb2d9 100644
--- a/contrib/testgen/base58.py
+++ b/contrib/testgen/base58.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2017 The Bitcoin Core developers
+# Copyright (c) 2012-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
diff --git a/contrib/testgen/gen_base58_test_vectors.py b/contrib/testgen/gen_base58_test_vectors.py
deleted file mode 100755
index de15657d2..000000000
--- a/contrib/testgen/gen_base58_test_vectors.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2012-2017 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Generate valid and invalid base58 address and private key test vectors.
-
-Usage:
- gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
- gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
-'''
-# 2012 Wladimir J. van der Laan
-# Released under MIT License
-import os
-from itertools import islice
-from base58 import b58encode_chk, b58decode_chk, b58chars
-import random
-from binascii import b2a_hex
-
-# key types
-PUBKEY_ADDRESS = 0
-SCRIPT_ADDRESS = 5
-PUBKEY_ADDRESS_TEST = 111
-SCRIPT_ADDRESS_TEST = 196
-PRIVKEY = 128
-PRIVKEY_TEST = 239
-
-metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed']
-# templates for valid sequences
-templates = [
- # prefix, payload_size, suffix, metadata
- # None = N/A
- ((PUBKEY_ADDRESS,), 20, (), (False, False, 'pubkey', None)),
- ((SCRIPT_ADDRESS,), 20, (), (False, False, 'script', None)),
- ((PUBKEY_ADDRESS_TEST,), 20, (), (False, True, 'pubkey', None)),
- ((SCRIPT_ADDRESS_TEST,), 20, (), (False, True, 'script', None)),
- ((PRIVKEY,), 32, (), (True, False, None, False)),
- ((PRIVKEY,), 32, (1,), (True, False, None, True)),
- ((PRIVKEY_TEST,), 32, (), (True, True, None, False)),
- ((PRIVKEY_TEST,), 32, (1,), (True, True, None, True))
-]
-
-def is_valid(v):
- '''Check vector v for validity'''
- result = b58decode_chk(v)
- if result is None:
- return False
- for template in templates:
- prefix = bytearray(template[0])
- suffix = bytearray(template[2])
- if result.startswith(prefix) and result.endswith(suffix):
- if (len(result) - len(prefix) - len(suffix)) == template[1]:
- return True
- return False
-
-def gen_valid_vectors():
- '''Generate valid test vectors'''
- while True:
- for template in templates:
- prefix = bytearray(template[0])
- payload = bytearray(os.urandom(template[1]))
- suffix = bytearray(template[2])
- rv = b58encode_chk(prefix + payload + suffix)
- assert is_valid(rv)
- metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None}
- hexrepr = b2a_hex(payload)
- if isinstance(hexrepr, bytes):
- hexrepr = hexrepr.decode('utf8')
- yield (rv, hexrepr, metadata)
-
-def gen_invalid_vector(template, corrupt_prefix, randomize_payload_size, corrupt_suffix):
- '''Generate possibly invalid vector'''
- if corrupt_prefix:
- prefix = os.urandom(1)
- else:
- prefix = bytearray(template[0])
-
- if randomize_payload_size:
- payload = os.urandom(max(int(random.expovariate(0.5)), 50))
- else:
- payload = os.urandom(template[1])
-
- if corrupt_suffix:
- suffix = os.urandom(len(template[2]))
- else:
- suffix = bytearray(template[2])
-
- return b58encode_chk(prefix + payload + suffix)
-
-def randbool(p = 0.5):
- '''Return True with P(p)'''
- return random.random() < p
-
-def gen_invalid_vectors():
- '''Generate invalid test vectors'''
- # start with some manual edge-cases
- yield "",
- yield "x",
- while True:
- # kinds of invalid vectors:
- # invalid prefix
- # invalid payload length
- # invalid (randomized) suffix (add random data)
- # corrupt checksum
- for template in templates:
- val = gen_invalid_vector(template, randbool(0.2), randbool(0.2), randbool(0.2))
- if random.randint(0,10)<1: # line corruption
- if randbool(): # add random character to end
- val += random.choice(b58chars)
- else: # replace random character in the middle
- n = random.randint(0, len(val))
- val = val[0:n] + random.choice(b58chars) + val[n+1:]
- if not is_valid(val):
- yield val,
-
-if __name__ == '__main__':
- import sys
- import json
- iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors}
- try:
- uiter = iters[sys.argv[1]]
- except IndexError:
- uiter = gen_valid_vectors
- try:
- count = int(sys.argv[2])
- except IndexError:
- count = 0
-
- data = list(islice(uiter(), count))
- json.dump(data, sys.stdout, sort_keys=True, indent=4)
- sys.stdout.write('\n')
-
diff --git a/contrib/testgen/gen_key_io_test_vectors.py b/contrib/testgen/gen_key_io_test_vectors.py
new file mode 100755
index 000000000..a00acb1f4
--- /dev/null
+++ b/contrib/testgen/gen_key_io_test_vectors.py
@@ -0,0 +1,249 @@
+#!/usr/bin/env python3
+# Copyright (c) 2012-2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Generate valid and invalid base58 address and private key test vectors.
+
+Usage:
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_valid.json
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_invalid.json
+'''
+# 2012 Wladimir J. van der Laan
+# Released under MIT License
+import os
+from itertools import islice
+from base58 import b58encode_chk, b58decode_chk, b58chars
+import random
+from binascii import b2a_hex
+from segwit_addr import bech32_encode, decode, convertbits, CHARSET
+
+# key types
+PUBKEY_ADDRESS = 0
+SCRIPT_ADDRESS = 5
+PUBKEY_ADDRESS_TEST = 111
+SCRIPT_ADDRESS_TEST = 196
+PUBKEY_ADDRESS_REGTEST = 111
+SCRIPT_ADDRESS_REGTEST = 196
+PRIVKEY = 128
+PRIVKEY_TEST = 239
+PRIVKEY_REGTEST = 239
+
+# script
+OP_0 = 0x00
+OP_1 = 0x51
+OP_2 = 0x52
+OP_16 = 0x60
+OP_DUP = 0x76
+OP_EQUAL = 0x87
+OP_EQUALVERIFY = 0x88
+OP_HASH160 = 0xa9
+OP_CHECKSIG = 0xac
+pubkey_prefix = (OP_DUP, OP_HASH160, 20)
+pubkey_suffix = (OP_EQUALVERIFY, OP_CHECKSIG)
+script_prefix = (OP_HASH160, 20)
+script_suffix = (OP_EQUAL,)
+p2wpkh_prefix = (OP_0, 20)
+p2wsh_prefix = (OP_0, 32)
+
+metadata_keys = ['isPrivkey', 'chain', 'isCompressed', 'tryCaseFlip']
+# templates for valid sequences
+templates = [
+ # prefix, payload_size, suffix, metadata, output_prefix, output_suffix
+ # None = N/A
+ ((PUBKEY_ADDRESS,), 20, (), (False, 'main', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS,), 20, (), (False, 'main', None, None), script_prefix, script_suffix),
+ ((PUBKEY_ADDRESS_TEST,), 20, (), (False, 'test', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS_TEST,), 20, (), (False, 'test', None, None), script_prefix, script_suffix),
+ ((PUBKEY_ADDRESS_REGTEST,), 20, (), (False, 'regtest', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS_REGTEST,), 20, (), (False, 'regtest', None, None), script_prefix, script_suffix),
+ ((PRIVKEY,), 32, (), (True, 'main', False, None), (), ()),
+ ((PRIVKEY,), 32, (1,), (True, 'main', True, None), (), ()),
+ ((PRIVKEY_TEST,), 32, (), (True, 'test', False, None), (), ()),
+ ((PRIVKEY_TEST,), 32, (1,), (True, 'test', True, None), (), ()),
+ ((PRIVKEY_REGTEST,), 32, (), (True, 'regtest', False, None), (), ()),
+ ((PRIVKEY_REGTEST,), 32, (1,), (True, 'regtest', True, None), (), ())
+]
+# templates for valid bech32 sequences
+bech32_templates = [
+ # hrp, version, witprog_size, metadata, output_prefix
+ ('bc', 0, 20, (False, 'main', None, True), p2wpkh_prefix),
+ ('bc', 0, 32, (False, 'main', None, True), p2wsh_prefix),
+ ('bc', 1, 2, (False, 'main', None, True), (OP_1, 2)),
+ ('tb', 0, 20, (False, 'test', None, True), p2wpkh_prefix),
+ ('tb', 0, 32, (False, 'test', None, True), p2wsh_prefix),
+ ('tb', 2, 16, (False, 'test', None, True), (OP_2, 16)),
+ ('bcrt', 0, 20, (False, 'regtest', None, True), p2wpkh_prefix),
+ ('bcrt', 0, 32, (False, 'regtest', None, True), p2wsh_prefix),
+ ('bcrt', 16, 40, (False, 'regtest', None, True), (OP_16, 40))
+]
+# templates for invalid bech32 sequences
+bech32_ng_templates = [
+ # hrp, version, witprog_size, invalid_bech32, invalid_checksum, invalid_char
+ ('tc', 0, 20, False, False, False),
+ ('tb', 17, 32, False, False, False),
+ ('bcrt', 3, 1, False, False, False),
+ ('bc', 15, 41, False, False, False),
+ ('tb', 0, 16, False, False, False),
+ ('bcrt', 0, 32, True, False, False),
+ ('bc', 0, 16, True, False, False),
+ ('tb', 0, 32, False, True, False),
+ ('bcrt', 0, 20, False, False, True)
+]
+
+def is_valid(v):
+ '''Check vector v for validity'''
+ if len(set(v) - set(b58chars)) > 0:
+ return is_valid_bech32(v)
+ result = b58decode_chk(v)
+ if result is None:
+ return is_valid_bech32(v)
+ for template in templates:
+ prefix = bytearray(template[0])
+ suffix = bytearray(template[2])
+ if result.startswith(prefix) and result.endswith(suffix):
+ if (len(result) - len(prefix) - len(suffix)) == template[1]:
+ return True
+ return is_valid_bech32(v)
+
+def is_valid_bech32(v):
+ '''Check vector v for bech32 validity'''
+ for hrp in ['bc', 'tb', 'bcrt']:
+ if decode(hrp, v) != (None, None):
+ return True
+ return False
+
+def gen_valid_base58_vector(template):
+ '''Generate valid base58 vector'''
+ prefix = bytearray(template[0])
+ payload = bytearray(os.urandom(template[1]))
+ suffix = bytearray(template[2])
+ dst_prefix = bytearray(template[4])
+ dst_suffix = bytearray(template[5])
+ rv = b58encode_chk(prefix + payload + suffix)
+ return rv, dst_prefix + payload + dst_suffix
+
+def gen_valid_bech32_vector(template):
+ '''Generate valid bech32 vector'''
+ hrp = template[0]
+ witver = template[1]
+ witprog = bytearray(os.urandom(template[2]))
+ dst_prefix = bytearray(template[4])
+ rv = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5))
+ return rv, dst_prefix + witprog
+
+def gen_valid_vectors():
+ '''Generate valid test vectors'''
+ glist = [gen_valid_base58_vector, gen_valid_bech32_vector]
+ tlist = [templates, bech32_templates]
+ while True:
+ for template, valid_vector_generator in [(t, g) for g, l in zip(glist, tlist) for t in l]:
+ rv, payload = valid_vector_generator(template)
+ assert is_valid(rv)
+ metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None}
+ hexrepr = b2a_hex(payload)
+ if isinstance(hexrepr, bytes):
+ hexrepr = hexrepr.decode('utf8')
+ yield (rv, hexrepr, metadata)
+
+def gen_invalid_base58_vector(template):
+ '''Generate possibly invalid vector'''
+ # kinds of invalid vectors:
+ # invalid prefix
+ # invalid payload length
+ # invalid (randomized) suffix (add random data)
+ # corrupt checksum
+ corrupt_prefix = randbool(0.2)
+ randomize_payload_size = randbool(0.2)
+ corrupt_suffix = randbool(0.2)
+
+ if corrupt_prefix:
+ prefix = os.urandom(1)
+ else:
+ prefix = bytearray(template[0])
+
+ if randomize_payload_size:
+ payload = os.urandom(max(int(random.expovariate(0.5)), 50))
+ else:
+ payload = os.urandom(template[1])
+
+ if corrupt_suffix:
+ suffix = os.urandom(len(template[2]))
+ else:
+ suffix = bytearray(template[2])
+
+ val = b58encode_chk(prefix + payload + suffix)
+ if random.randint(0,10)<1: # line corruption
+ if randbool(): # add random character to end
+ val += random.choice(b58chars)
+ else: # replace random character in the middle
+ n = random.randint(0, len(val))
+ val = val[0:n] + random.choice(b58chars) + val[n+1:]
+
+ return val
+
+def gen_invalid_bech32_vector(template):
+ '''Generate possibly invalid bech32 vector'''
+ no_data = randbool(0.1)
+ to_upper = randbool(0.1)
+ hrp = template[0]
+ witver = template[1]
+ witprog = bytearray(os.urandom(template[2]))
+
+ if no_data:
+ rv = bech32_encode(hrp, [])
+ else:
+ data = [witver] + convertbits(witprog, 8, 5)
+ if template[3] and not no_data:
+ if template[2] % 5 in {2, 4}:
+ data[-1] |= 1
+ else:
+ data.append(0)
+ rv = bech32_encode(hrp, data)
+
+ if template[4]:
+ i = len(rv) - random.randrange(1, 7)
+ rv = rv[:i] + random.choice(CHARSET.replace(rv[i], '')) + rv[i + 1:]
+ if template[5]:
+ i = len(hrp) + 1 + random.randrange(0, len(rv) - len(hrp) - 4)
+ rv = rv[:i] + rv[i:i + 4].upper() + rv[i + 4:]
+
+ if to_upper:
+ rv = rv.swapcase()
+
+ return rv
+
+def randbool(p = 0.5):
+ '''Return True with P(p)'''
+ return random.random() < p
+
+def gen_invalid_vectors():
+ '''Generate invalid test vectors'''
+ # start with some manual edge-cases
+ yield "",
+ yield "x",
+ glist = [gen_invalid_base58_vector, gen_invalid_bech32_vector]
+ tlist = [templates, bech32_ng_templates]
+ while True:
+ for template, invalid_vector_generator in [(t, g) for g, l in zip(glist, tlist) for t in l]:
+ val = invalid_vector_generator(template)
+ if not is_valid(val):
+ yield val,
+
+if __name__ == '__main__':
+ import sys
+ import json
+ iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors}
+ try:
+ uiter = iters[sys.argv[1]]
+ except IndexError:
+ uiter = gen_valid_vectors
+ try:
+ count = int(sys.argv[2])
+ except IndexError:
+ count = 0
+
+ data = list(islice(uiter(), count))
+ json.dump(data, sys.stdout, sort_keys=True, indent=4)
+ sys.stdout.write('\n')
+
diff --git a/contrib/verify-commits/README.md b/contrib/verify-commits/README.md
index fa492fdd2..aa805ad1b 100644
--- a/contrib/verify-commits/README.md
+++ b/contrib/verify-commits/README.md
@@ -7,18 +7,18 @@ are PGP signed (nearly always merge commits), as well as a script to verify
commits against a trusted keys list.
-Using verify-commits.sh safely
+Using verify-commits.py safely
------------------------------
Remember that you can't use an untrusted script to verify itself. This means
-that checking out code, then running `verify-commits.sh` against `HEAD` is
-_not_ safe, because the version of `verify-commits.sh` that you just ran could
+that checking out code, then running `verify-commits.py` against `HEAD` is
+_not_ safe, because the version of `verify-commits.py` that you just ran could
be backdoored. Instead, you need to use a trusted version of verify-commits
prior to checkout to make sure you're checking out only code signed by trusted
keys:
git fetch origin && \
- ./contrib/verify-commits/verify-commits.sh origin/master && \
+ ./contrib/verify-commits/verify-commits.py origin/master && \
git checkout origin/master
Note that the above isn't a good UI/UX yet, and needs significant improvements
@@ -42,6 +42,6 @@ said key. In order to avoid bumping the root-of-trust `trusted-git-root`
file, individual commits which were signed by such a key can be added to the
`allow-revsig-commits` file. That way, the PGP signatures are still verified
but no new commits can be signed by any expired/revoked key. To easily build a
-list of commits which need to be added, verify-commits.sh can be edited to test
+list of commits which need to be added, verify-commits.py can be edited to test
each commit with BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG set to both 1 and 0, and
those which need it set to 1 printed.
diff --git a/contrib/verify-commits/allow-incorrect-sha512-commits b/contrib/verify-commits/allow-incorrect-sha512-commits
new file mode 100644
index 000000000..c572806f2
--- /dev/null
+++ b/contrib/verify-commits/allow-incorrect-sha512-commits
@@ -0,0 +1,2 @@
+f8feaa4636260b599294c7285bcf1c8b7737f74e
+8040ae6fc576e9504186f2ae3ff2c8125de1095c
diff --git a/contrib/verify-commits/allow-unclean-merge-commits b/contrib/verify-commits/allow-unclean-merge-commits
new file mode 100644
index 000000000..7aab274b9
--- /dev/null
+++ b/contrib/verify-commits/allow-unclean-merge-commits
@@ -0,0 +1,4 @@
+6052d509105790a26b3ad5df43dd61e7f1b24a12
+3798e5de334c3deb5f71302b782f6b8fbd5087f1
+326ffed09bfcc209a2efd6a2ebc69edf6bd200b5
+97d83739db0631be5d4ba86af3616014652c00ec
diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh
index 16d41d726..7a10ba7d7 100755
--- a/contrib/verify-commits/gpg.sh
+++ b/contrib/verify-commits/gpg.sh
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
INPUT=$(cat /dev/stdin)
VALID=false
REVSIG=false
diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh
index c21febb9e..4db4a9085 100755
--- a/contrib/verify-commits/pre-push-hook.sh
+++ b/contrib/verify-commits/pre-push-hook.sh
@@ -1,8 +1,9 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then
exit 0
fi
@@ -12,9 +13,9 @@ while read LINE; do
if [ "$4" != "refs/heads/master" ]; then
continue
fi
- if ! ./contrib/verify-commits/verify-commits.sh $3 > /dev/null 2>&1; then
+ if ! ./contrib/verify-commits/verify-commits.py $3 > /dev/null 2>&1; then
echo "ERROR: A commit is not signed, can't push"
- ./contrib/verify-commits/verify-commits.sh
+ ./contrib/verify-commits/verify-commits.py
exit 1
fi
done < /dev/stdin
diff --git a/contrib/verify-commits/verify-commits.py b/contrib/verify-commits/verify-commits.py
new file mode 100755
index 000000000..544f4dc48
--- /dev/null
+++ b/contrib/verify-commits/verify-commits.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python3
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+"""Verify commits against a trusted keys list."""
+import argparse
+import hashlib
+import os
+import subprocess
+import sys
+import time
+
+GIT = os.getenv('GIT', 'git')
+
+def tree_sha512sum(commit='HEAD'):
+ """Calculate the Tree-sha512 for the commit.
+
+ This is copied from github-merge.py."""
+
+ # request metadata for entire tree, recursively
+ files = []
+ blob_by_name = {}
+ for line in subprocess.check_output([GIT, 'ls-tree', '--full-tree', '-r', commit]).splitlines():
+ name_sep = line.index(b'\t')
+ metadata = line[:name_sep].split() # perms, 'blob', blobid
+ assert metadata[1] == b'blob'
+ name = line[name_sep + 1:]
+ files.append(name)
+ blob_by_name[name] = metadata[2]
+
+ files.sort()
+ # open connection to git-cat-file in batch mode to request data for all blobs
+ # this is much faster than launching it per file
+ p = subprocess.Popen([GIT, 'cat-file', '--batch'], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+ overall = hashlib.sha512()
+ for f in files:
+ blob = blob_by_name[f]
+ # request blob
+ p.stdin.write(blob + b'\n')
+ p.stdin.flush()
+ # read header: blob, "blob", size
+ reply = p.stdout.readline().split()
+ assert reply[0] == blob and reply[1] == b'blob'
+ size = int(reply[2])
+ # hash the blob data
+ intern = hashlib.sha512()
+ ptr = 0
+ while ptr < size:
+ bs = min(65536, size - ptr)
+ piece = p.stdout.read(bs)
+ if len(piece) == bs:
+ intern.update(piece)
+ else:
+ raise IOError('Premature EOF reading git cat-file output')
+ ptr += bs
+ dig = intern.hexdigest()
+ assert p.stdout.read(1) == b'\n' # ignore LF that follows blob data
+ # update overall hash with file hash
+ overall.update(dig.encode("utf-8"))
+ overall.update(" ".encode("utf-8"))
+ overall.update(f)
+ overall.update("\n".encode("utf-8"))
+ p.stdin.close()
+ if p.wait():
+ raise IOError('Non-zero return value executing git cat-file')
+ return overall.hexdigest()
+
+def main():
+ # Parse arguments
+ parser = argparse.ArgumentParser(usage='%(prog)s [options] [commit id]')
+ parser.add_argument('--disable-tree-check', action='store_false', dest='verify_tree', help='disable SHA-512 tree check')
+ parser.add_argument('--clean-merge', type=float, dest='clean_merge', default=float('inf'), help='Only check clean merge after days ago (default: %(default)s)', metavar='NUMBER')
+ parser.add_argument('commit', nargs='?', default='HEAD', help='Check clean merge up to commit ')
+ args = parser.parse_args()
+
+ # get directory of this program and read data files
+ dirname = os.path.dirname(os.path.abspath(__file__))
+ print("Using verify-commits data from " + dirname)
+ verified_root = open(dirname + "/trusted-git-root", "r", encoding="utf8").read().splitlines()[0]
+ verified_sha512_root = open(dirname + "/trusted-sha512-root-commit", "r", encoding="utf8").read().splitlines()[0]
+ revsig_allowed = open(dirname + "/allow-revsig-commits", "r", encoding="utf-8").read().splitlines()
+ unclean_merge_allowed = open(dirname + "/allow-unclean-merge-commits", "r", encoding="utf-8").read().splitlines()
+ incorrect_sha512_allowed = open(dirname + "/allow-incorrect-sha512-commits", "r", encoding="utf-8").read().splitlines()
+
+ # Set commit and branch and set variables
+ current_commit = args.commit
+ if ' ' in current_commit:
+ print("Commit must not contain spaces", file=sys.stderr)
+ sys.exit(1)
+ verify_tree = args.verify_tree
+ no_sha1 = True
+ prev_commit = ""
+ initial_commit = current_commit
+ branch = subprocess.check_output([GIT, 'show', '-s', '--format=%H', initial_commit], universal_newlines=True, encoding='utf8').splitlines()[0]
+
+ # Iterate through commits
+ while True:
+ if current_commit == verified_root:
+ print('There is a valid path from "{}" to {} where all commits are signed!'.format(initial_commit, verified_root))
+ sys.exit(0)
+ if current_commit == verified_sha512_root:
+ if verify_tree:
+ print("All Tree-SHA512s matched up to {}".format(verified_sha512_root), file=sys.stderr)
+ verify_tree = False
+ no_sha1 = False
+
+ os.environ['BITCOIN_VERIFY_COMMITS_ALLOW_SHA1'] = "0" if no_sha1 else "1"
+ os.environ['BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG'] = "1" if current_commit in revsig_allowed else "0"
+
+ # Check that the commit (and parents) was signed with a trusted key
+ if subprocess.call([GIT, '-c', 'gpg.program={}/gpg.sh'.format(dirname), 'verify-commit', current_commit], stdout=subprocess.DEVNULL):
+ if prev_commit != "":
+ print("No parent of {} was signed with a trusted key!".format(prev_commit), file=sys.stderr)
+ print("Parents are:", file=sys.stderr)
+ parents = subprocess.check_output([GIT, 'show', '-s', '--format=format:%P', prev_commit], universal_newlines=True, encoding='utf8').splitlines()[0].split(' ')
+ for parent in parents:
+ subprocess.call([GIT, 'show', '-s', parent], stdout=sys.stderr)
+ else:
+ print("{} was not signed with a trusted key!".format(current_commit), file=sys.stderr)
+ sys.exit(1)
+
+ # Check the Tree-SHA512
+ if (verify_tree or prev_commit == "") and current_commit not in incorrect_sha512_allowed:
+ tree_hash = tree_sha512sum(current_commit)
+ if ("Tree-SHA512: {}".format(tree_hash)) not in subprocess.check_output([GIT, 'show', '-s', '--format=format:%B', current_commit], universal_newlines=True, encoding='utf8').splitlines():
+ print("Tree-SHA512 did not match for commit " + current_commit, file=sys.stderr)
+ sys.exit(1)
+
+ # Merge commits should only have two parents
+ parents = subprocess.check_output([GIT, 'show', '-s', '--format=format:%P', current_commit], universal_newlines=True, encoding='utf8').splitlines()[0].split(' ')
+ if len(parents) > 2:
+ print("Commit {} is an octopus merge".format(current_commit), file=sys.stderr)
+ sys.exit(1)
+
+ # Check that the merge commit is clean
+ commit_time = int(subprocess.check_output([GIT, 'show', '-s', '--format=format:%ct', current_commit], universal_newlines=True, encoding='utf8').splitlines()[0])
+ check_merge = commit_time > time.time() - args.clean_merge * 24 * 60 * 60 # Only check commits in clean_merge days
+ allow_unclean = current_commit in unclean_merge_allowed
+ if len(parents) == 2 and check_merge and not allow_unclean:
+ current_tree = subprocess.check_output([GIT, 'show', '--format=%T', current_commit], universal_newlines=True, encoding='utf8').splitlines()[0]
+ subprocess.call([GIT, 'checkout', '--force', '--quiet', parents[0]])
+ subprocess.call([GIT, 'merge', '--no-ff', '--quiet', parents[1]], stdout=subprocess.DEVNULL)
+ recreated_tree = subprocess.check_output([GIT, 'show', '--format=format:%T', 'HEAD'], universal_newlines=True, encoding='utf8').splitlines()[0]
+ if current_tree != recreated_tree:
+ print("Merge commit {} is not clean".format(current_commit), file=sys.stderr)
+ subprocess.call([GIT, 'diff', current_commit])
+ subprocess.call([GIT, 'checkout', '--force', '--quiet', branch])
+ sys.exit(1)
+ subprocess.call([GIT, 'checkout', '--force', '--quiet', branch])
+
+ prev_commit = current_commit
+ current_commit = parents[0]
+
+if __name__ == '__main__':
+ main()
diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh
deleted file mode 100755
index 6415eea4d..000000000
--- a/contrib/verify-commits/verify-commits.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2014-2016 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-DIR=$(dirname "$0")
-[ "/${DIR#/}" != "$DIR" ] && DIR=$(dirname "$(pwd)/$0")
-
-echo "Using verify-commits data from ${DIR}"
-
-VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
-VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit")
-REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits")
-
-HAVE_GNU_SHA512=1
-[ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0
-
-if [ x"$1" = "x" ]; then
- CURRENT_COMMIT="HEAD"
-else
- CURRENT_COMMIT="$1"
-fi
-
-if [ "${CURRENT_COMMIT#* }" != "$CURRENT_COMMIT" ]; then
- echo "Commit must not contain spaces?" > /dev/stderr
- exit 1
-fi
-
-VERIFY_TREE=0
-if [ x"$2" = "x--tree-checks" ]; then
- VERIFY_TREE=1
-fi
-
-NO_SHA1=1
-PREV_COMMIT=""
-INITIAL_COMMIT="${CURRENT_COMMIT}"
-
-BRANCH="$(git rev-parse --abbrev-ref HEAD)"
-
-while true; do
- if [ "$CURRENT_COMMIT" = $VERIFIED_ROOT ]; then
- echo "There is a valid path from \"$INITIAL_COMMIT\" to $VERIFIED_ROOT where all commits are signed!"
- exit 0
- fi
-
- if [ "$CURRENT_COMMIT" = $VERIFIED_SHA512_ROOT ]; then
- if [ "$VERIFY_TREE" = "1" ]; then
- echo "All Tree-SHA512s matched up to $VERIFIED_SHA512_ROOT" > /dev/stderr
- fi
- VERIFY_TREE=0
- NO_SHA1=0
- fi
-
- if [ "$NO_SHA1" = "1" ]; then
- export BITCOIN_VERIFY_COMMITS_ALLOW_SHA1=0
- else
- export BITCOIN_VERIFY_COMMITS_ALLOW_SHA1=1
- fi
-
- if [ "${REVSIG_ALLOWED#*$CURRENT_COMMIT}" != "$REVSIG_ALLOWED" ]; then
- export BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG=1
- else
- export BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG=0
- fi
-
- if ! git -c "gpg.program=${DIR}/gpg.sh" verify-commit "$CURRENT_COMMIT" > /dev/null; then
- if [ "$PREV_COMMIT" != "" ]; then
- echo "No parent of $PREV_COMMIT was signed with a trusted key!" > /dev/stderr
- echo "Parents are:" > /dev/stderr
- PARENTS=$(git show -s --format=format:%P $PREV_COMMIT)
- for PARENT in $PARENTS; do
- git show -s $PARENT > /dev/stderr
- done
- else
- echo "$CURRENT_COMMIT was not signed with a trusted key!" > /dev/stderr
- fi
- exit 1
- fi
-
- # We always verify the top of the tree
- if [ "$VERIFY_TREE" = 1 -o "$PREV_COMMIT" = "" ]; then
- IFS_CACHE="$IFS"
- IFS='
-'
- for LINE in $(git ls-tree --full-tree -r "$CURRENT_COMMIT"); do
- case "$LINE" in
- "12"*)
- echo "Repo contains symlinks" > /dev/stderr
- IFS="$IFS_CACHE"
- exit 1
- ;;
- esac
- done
- IFS="$IFS_CACHE"
-
- FILE_HASHES=""
- for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do
- if [ "$HAVE_GNU_SHA512" = 1 ]; then
- HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | sha512sum | { read FIRST _; echo $FIRST; } )
- else
- HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | shasum -a 512 | { read FIRST _; echo $FIRST; } )
- fi
- [ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"'
-'
- FILE_HASHES="$FILE_HASHES$HASH $FILE"
- done
-
- if [ "$HAVE_GNU_SHA512" = 1 ]; then
- TREE_HASH="$(echo "$FILE_HASHES" | sha512sum)"
- else
- TREE_HASH="$(echo "$FILE_HASHES" | shasum -a 512)"
- fi
- HASH_MATCHES=0
- MSG="$(git show -s --format=format:%B "$CURRENT_COMMIT" | tail -n1)"
-
- case "$MSG -" in
- "Tree-SHA512: $TREE_HASH")
- HASH_MATCHES=1;;
- esac
-
- if [ "$HASH_MATCHES" = "0" ]; then
- echo "Tree-SHA512 did not match for commit $CURRENT_COMMIT" > /dev/stderr
- exit 1
- fi
- fi
-
- PARENTS=$(git show -s --format=format:%P "$CURRENT_COMMIT")
- PARENT1=${PARENTS%% *}
- PARENT2=""
- if [ "x$PARENT1" != "x$PARENTS" ]; then
- PARENTX=${PARENTS#* }
- PARENT2=${PARENTX%% *}
- if [ "x$PARENT2" != "x$PARENTX" ]; then
- echo "Commit $CURRENT_COMMIT is an octopus merge" > /dev/stderr
- exit 1
- fi
- fi
- if [ "x$PARENT2" != "x" ]; then
- CURRENT_TREE="$(git show --format="%T" "$CURRENT_COMMIT")"
- git checkout --force --quiet "$PARENT1"
- git merge --no-ff --quiet "$PARENT2" >/dev/null
- RECREATED_TREE="$(git show --format="%T" HEAD)"
- if [ "$CURRENT_TREE" != "$RECREATED_TREE" ]; then
- echo "Merge commit $CURRENT_COMMIT is not clean" > /dev/stderr
- git diff "$CURRENT_COMMIT"
- git checkout --force --quiet "$BRANCH"
- exit 1
- fi
- git checkout --force --quiet "$BRANCH"
- fi
- PREV_COMMIT="$CURRENT_COMMIT"
- CURRENT_COMMIT="$PARENT1"
-done
diff --git a/contrib/verifybinaries/verify.sh b/contrib/verifybinaries/verify.sh
index e0266bf08..fc7492ad3 100755
--- a/contrib/verifybinaries/verify.sh
+++ b/contrib/verifybinaries/verify.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,6 +11,7 @@
### The script returns 0 if everything passes the checks. It returns 1 if either the
### signature check or the hash check doesn't pass. If an error occurs the return value is 2
+export LC_ALL=C
function clean_up {
for file in $*
do
diff --git a/contrib/windeploy/detached-sig-create.sh b/contrib/windeploy/detached-sig-create.sh
index bf4978d14..15f8108cf 100755
--- a/contrib/windeploy/detached-sig-create.sh
+++ b/contrib/windeploy/detached-sig-create.sh
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
if [ -z "$OSSLSIGNCODE" ]; then
OSSLSIGNCODE=osslsigncode
fi
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
index a21ce8897..fa08d70d8 100644
--- a/contrib/zmq/zmq_sub.py
+++ b/contrib/zmq/zmq_sub.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2014-2017 The Bitcoin Core developers
+# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -30,7 +30,7 @@
import struct
import sys
-if not (sys.version_info.major >= 3 and sys.version_info.minor >= 5):
+if (sys.version_info.major, sys.version_info.minor) < (3, 5):
print("This example only works with Python 3.5 and greater")
sys.exit(1)
diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py
index edf607e29..8367c40c8 100644
--- a/contrib/zmq/zmq_sub3.4.py
+++ b/contrib/zmq/zmq_sub3.4.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2014-2017 The Bitcoin Core developers
+# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -34,7 +34,7 @@
import struct
import sys
-if not (sys.version_info.major >= 3 and sys.version_info.minor >= 4):
+if (sys.version_info.major, sys.version_info.minor) < (3, 4):
print("This example only works with Python 3.4 and greater")
sys.exit(1)
diff --git a/depends/.gitignore b/depends/.gitignore
index 3cb4b9ac1..72734102c 100644
--- a/depends/.gitignore
+++ b/depends/.gitignore
@@ -8,3 +8,5 @@ i686*
mips*
arm*
aarch64*
+riscv32*
+riscv64*
diff --git a/depends/Makefile b/depends/Makefile
index 39632557f..14199decf 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -5,6 +5,7 @@ WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?=
+RAPIDCHECK ?=
NO_WALLET ?=
NO_UPNP ?=
PRIORITY_DOWNLOAD_PATH ?= https://z.cash/depends-sources
@@ -15,7 +16,7 @@ HOST ?= $(BUILD)
PATCHES_PATH = $(BASEDIR)/patches
BASEDIR = $(CURDIR)
HASH_LENGTH:=11
-DOWNLOAD_CONNECT_TIMEOUT:=10
+DOWNLOAD_CONNECT_TIMEOUT:=30
DOWNLOAD_RETRIES:=3
CRATE_REGISTRY:=vendored-sources
HOST_ID_SALT ?= salt
@@ -96,6 +97,8 @@ qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch
wallet_packages_$(NO_WALLET) = $(wallet_packages)
upnp_packages_$(NO_UPNP) = $(upnp_packages)
+rapidcheck_packages_$(RAPIDCHECK) = $(rapidcheck_packages)
+
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(rust_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
@@ -103,6 +106,10 @@ ifneq ($(qt_packages_),)
native_packages += $(qt_native_packages)
endif
+ifeq ($(rapidcheck_packages_),)
+packages += $(rapidcheck_packages)
+endif
+
all_packages = $(packages) $(native_packages)
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk cargo-checksum.sh
@@ -170,7 +177,7 @@ $(host_prefix)/share/config.site: check-packages
check-packages: check-sources
clean-all: clean
- @rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64*
+ @rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64* riscv32* riscv64*
clean:
@rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD)
@@ -181,7 +188,7 @@ install: check-packages $(host_prefix)/share/config.site
download-one: check-sources $(all_sources)
download-osx:
- @$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
+ @$(MAKE) -s HOST=x86_64-apple-darwin14 download-one
download-linux:
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
download-win:
diff --git a/depends/README.md b/depends/README.md
index 99eef1952..693bc3619 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -22,49 +22,67 @@ Common `host-platform-triplets` for cross compilation are:
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
-- `x86_64-apple-darwin11` for MacOSX
+- `x86_64-apple-darwin14` for macOS
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
+- `riscv32-linux-gnu` for Linux RISC-V 32 bit
+- `riscv64-linux-gnu` for Linux RISC-V 64 bit
No other options are needed, the paths are automatically configured.
-Install the required dependencies: Ubuntu & Debian
---------------------------------------------------
+### Install the required dependencies: Ubuntu & Debian
-For macOS cross compilation:
+#### For macOS cross compilation
sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python-setuptools
-For Win32/Win64 cross compilation:
+#### For Win32/Win64 cross compilation
- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)
-For linux (including i386, ARM) cross compilation:
+#### For linux (including i386, ARM) cross compilation
- sudo apt-get install curl g++-aarch64-linux-gnu g++-4.8-aarch64-linux-gnu gcc-4.8-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf gcc-4.8-arm-linux-gnueabihf binutils-arm-linux-gnueabihf g++-4.8-multilib gcc-4.8-multilib binutils-gold bsdmainutils
+Common linux dependencies:
+ sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3
-Dependency Options:
+For linux ARM cross compilation:
+
+ sudo apt-get install g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
+
+For linux AARCH64 cross compilation:
+
+ sudo apt-get install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
+
+For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
+
+ sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
+
+RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken `test_bitcoin` executable (see https://github.com/bitcoin/bitcoin/pull/13543),
+this is apparently fixed in gcc-8.1.0.
+
+### Dependency Options
The following can be set when running make: make FOO=bar
SOURCES_PATH: downloaded sources will be placed here
BASE_CACHE: built packages will be placed here
- SDK_PATH: Path where sdk's can be found (used by OSX)
+ SDK_PATH: Path where sdk's can be found (used by macOS)
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
NO_QT: Don't download/build/cache qt and its dependencies
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
DEBUG: disable some optimizations and enable more runtime checking
+ RAPIDCHECK: build rapidcheck (experimental)
HOST_ID_SALT: Optional salt to use when generating host package ids
BUILD_ID_SALT: Optional salt to use when generating build package ids
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to bitcoin's configure. In this case, `--disable-wallet`.
-Additional targets:
+### Additional targets
download: run 'make download' to fetch all sources without building them
- download-osx: run 'make download-osx' to fetch all sources needed for osx builds
+ download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
download-win: run 'make download-win' to fetch all sources needed for win builds
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
diff --git a/depends/config.guess b/depends/config.guess
index 9baaa270b..2b79f6d83 100755
--- a/depends/config.guess
+++ b/depends/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-01-26'
+timestamp='2018-07-06'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -101,12 +101,12 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && e
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
+case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
@@ -237,7 +237,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "$machine-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -894,8 +894,8 @@ EOF
# other systems with GNU libc and userland
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- i*86:Minix:*:*)
- echo "$UNAME_MACHINE"-pc-minix
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1469,7 +1469,7 @@ EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-functions 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/depends/config.site.in b/depends/config.site.in
index 8444dc26f..b7a5e795c 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -61,9 +61,12 @@ fi
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
-CC="@CC@"
-CXX="@CXX@"
-OBJC="${CC}"
+if test -n "@CC@" -a -z "${CC}"; then
+ CC="@CC@"
+fi
+if test -n "@CXX@" -a -z "${CXX}"; then
+ CXX="@CXX@"
+fi
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
if test -n "@AR@"; then
diff --git a/depends/config.sub b/depends/config.sub
index 818892c1c..c95acc681 100755
--- a/depends/config.sub
+++ b/depends/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-01-15'
+timestamp='2018-07-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -110,131 +110,455 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | cloudabi*-eabi* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
- if [ "$basic_machine" != "$1" ]
- then os=`echo "$1" | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read -r field1 field2 field3 field4 <&2
+ exit 1
;;
- -lynx*)
- os=-lynxos
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -ptx*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
+ | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
+ | harris | dolphin | highlevel | gould | cbm | ns | masscomp \
+ | apple | axis | knuth | cray | microblaze* \
+ | sim | cisco | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=unicosmp
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-unknown
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
@@ -249,12 +573,12 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
@@ -293,6 +617,7 @@ case $basic_machine in
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
+ | nfp \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
@@ -300,7 +625,7 @@ case $basic_machine in
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
- | riscv32 | riscv64 \
+ | riscv | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -331,20 +656,23 @@ case $basic_machine in
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
;;
+ m9s12z | m68hcs12z | hcs12z | s12z)
+ basic_machine=s12z-unknown
+ os=${os:-none}
+ ;;
ms1)
basic_machine=mt-unknown
;;
-
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
xscaleeb)
basic_machine=armeb-unknown
@@ -360,11 +688,6 @@ case $basic_machine in
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
- exit 1
- ;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
@@ -378,7 +701,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -419,6 +742,7 @@ case $basic_machine in
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
+ | nfp-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
@@ -428,7 +752,7 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
- | riscv32-* | riscv64-* \
+ | riscv-* | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
@@ -456,92 +780,40 @@ case $basic_machine in
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-pc
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
abacus)
basic_machine=abacus-unknown
;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
asmjs)
basic_machine=asmjs-unknown
;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
blackfin-*)
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
+ os=linux
;;
bluegene*)
basic_machine=powerpc-ibm
- os=-cnk
+ os=cnk
;;
c54x-*)
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
@@ -554,43 +826,31 @@ case $basic_machine in
;;
c90)
basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
+ os=${os:-unicos}
;;
convex-c1)
basic_machine=c1-convex
- os=-bsd
+ os=bsd
;;
convex-c2)
basic_machine=c2-convex
- os=-bsd
+ os=bsd
;;
convex-c32)
basic_machine=c32-convex
- os=-bsd
+ os=bsd
;;
convex-c34)
basic_machine=c34-convex
- os=-bsd
+ os=bsd
;;
convex-c38)
basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
+ os=bsd
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
- os=-elf
+ os=${os:-elf}
;;
crds | unos)
basic_machine=m68k-crds
@@ -603,7 +863,7 @@ case $basic_machine in
;;
crx)
basic_machine=crx-unknown
- os=-elf
+ os=${os:-elf}
;;
da30 | da30-*)
basic_machine=m68k-da30
@@ -613,35 +873,23 @@ case $basic_machine in
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
- os=-tops10
+ os=tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
- os=-tops20
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
- os=-bosx
+ os=${os:-bosx}
;;
dpx2*)
basic_machine=m68k-bull
- os=-sysv3
+ os=sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
@@ -651,20 +899,12 @@ case $basic_machine in
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe"
;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=${os:-bsd}
;;
fx2800)
basic_machine=i860-alliant
@@ -672,45 +912,13 @@ case $basic_machine in
genix)
basic_machine=ns32k-ns
;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
+ os=hiuxwe2
;;
hp300-*)
basic_machine=m68k-hp
;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
@@ -740,95 +948,55 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ os=sysv32
;;
i*86v4*)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ os=sysv4
;;
i*86v)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ os=sysv
;;
i*86sol2)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
+ os=solaris2
;;
- vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ basic_machine=j90-cray
+ os=${os:-unicos}
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
m68knommu-*)
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
+ os=linux
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
basic_machine=m68000-convergent
;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
- os=-mint
+ os=mint
;;
mips3*-*)
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
@@ -836,98 +1004,26 @@ case $basic_machine in
mips3*)
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
ms1-*)
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
news-3600 | risc-news)
basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
+ os=newsos
;;
next | m*-next)
basic_machine=m68k-next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
basic_machine=np1-gould
;;
@@ -948,38 +1044,18 @@ case $basic_machine in
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
- os=-proelf
+ os=proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
+ os=hiuxwe2
;;
parisc-*)
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
+ os=linux
;;
pbd)
basic_machine=sparc-tti
@@ -1049,22 +1125,6 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
rm[46]00)
basic_machine=mips-siemens
;;
@@ -1077,10 +1137,6 @@ case $basic_machine in
s390x | s390x-*)
basic_machine=s390x-ibm
;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
@@ -1089,11 +1145,7 @@ case $basic_machine in
;;
sde)
basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ os=${os:-elf}
;;
sequent)
basic_machine=i386-sequent
@@ -1103,11 +1155,7 @@ case $basic_machine in
;;
simso-wrs)
basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+ os=vxworks
;;
spur)
basic_machine=spur-unknown
@@ -1115,44 +1163,12 @@ case $basic_machine in
st2000)
basic_machine=m68k-tandem
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
strongarm-* | thumb-*)
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
@@ -1162,25 +1178,9 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
tile*)
basic_machine=$basic_machine-unknown
- os=-linux-gnu
+ os=linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1188,80 +1188,32 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
w65*)
basic_machine=w65-wdc
- os=-none
+ os=none
;;
w89k-*)
basic_machine=hppa1.1-winbond
- os=-proelf
+ os=proelf
;;
x64)
basic_machine=x86_64-pc
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
none)
basic_machine=none-none
- os=-none
+ os=${os:-none}
;;
# Here we handle the default manufacturer of certain CPU types. It is in
@@ -1334,198 +1286,245 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
# First match some system type aliases that might get confused
# with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
;;
- -solaris1 | -solaris1.*)
+ solaris1 | solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -solaris)
- os=-solaris2
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# es1800 is here to avoid being matched by es* (a different OS)
- -es1800*)
- os=-ose
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
;;
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*)
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
+ qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
;;
- -nto*)
+ nto-qnx*)
+ ;;
+ nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -xray | -os68k* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynx*)
+ os=lynxos
;;
- -mac*)
+ mac*)
os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ opened*)
+ os=openedition
;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ os400*)
+ os=os400
;;
- -sunos5*)
+ sunos5*)
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -sunos6*)
+ sunos6*)
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
+ wince*)
+ os=wince
;;
- -utek*)
- os=-bsd
+ utek*)
+ os=bsd
;;
- -dynix*)
- os=-bsd
+ dynix*)
+ os=bsd
;;
- -acis*)
- os=-aos
+ acis*)
+ os=aos
;;
- -atheos*)
- os=-atheos
+ atheos*)
+ os=atheos
;;
- -syllable*)
- os=-syllable
+ syllable*)
+ os=syllable
;;
- -386bsd)
- os=-bsd
+ 386bsd)
+ os=bsd
;;
- -ctix* | -uts*)
- os=-sysv
+ ctix* | uts*)
+ os=sysv
;;
- -nova*)
- os=-rtmk-nova
+ nova*)
+ os=rtmk-nova
;;
- -ns2)
- os=-nextstep2
+ ns2)
+ os=nextstep2
;;
- -nsk*)
- os=-nsk
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- -tpf*)
- os=-tpf
+ tpf*)
+ os=tpf
;;
- -triton*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -oss*)
- os=-sysv3
+ oss*)
+ os=sysv3
;;
- -svr4*)
- os=-sysv4
+ svr4*)
+ os=sysv4
;;
- -svr3)
- os=-sysv3
+ svr3)
+ os=sysv3
;;
- -sysvr4)
- os=-sysv4
+ sysvr4)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ # This must come after sysvr4.
+ sysv*)
;;
- -ose*)
- os=-ose
+ ose*)
+ os=ose
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -zvmoe)
- os=-zvmoe
+ zvmoe)
+ os=zvmoe
;;
- -dicos*)
- os=-dicos
+ dicos*)
+ os=dicos
;;
- -pikeos*)
+ pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
case $basic_machine in
arm*)
- os=-eabi
+ os=eabi
;;
*)
- os=-elf
+ os=elf
;;
esac
;;
- -nacl*)
+ nacl*)
;;
- -ios)
+ ios)
;;
- -none)
+ none)
+ ;;
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
@@ -1544,173 +1543,179 @@ else
case $basic_machine in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
pru-*)
- os=-elf
+ os=elf
;;
*-be)
- os=-beos
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
*-next)
- os=-nextstep
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
@@ -1721,67 +1726,70 @@ vendor=unknown
case $basic_machine in
*-unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
@@ -1789,11 +1797,11 @@ case $basic_machine in
;;
esac
-echo "$basic_machine$os"
+echo "$basic_machine-$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-functions 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/depends/description.md b/depends/description.md
index 74f9ef3f2..9fc7093be 100644
--- a/depends/description.md
+++ b/depends/description.md
@@ -7,7 +7,7 @@ In theory, binaries for any target OS/architecture can be created, from a
builder running any OS/architecture. In practice, build-side tools must be
specified when the defaults don't fit, and packages must be amended to work
on new hosts. For now, a build architecture of x86_64 is assumed, either on
-Linux or OSX.
+Linux or macOS.
### No reliance on timestamps
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index 4e58bec74..a1c943d60 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -1,4 +1,4 @@
-OSX_MIN_VERSION=10.8
+OSX_MIN_VERSION=10.10
OSX_SDK_VERSION=10.11
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
LD64_VERSION=253.9
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index bf773ccd1..61806c750 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -19,7 +19,7 @@ $(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
-$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
+$(package)_config_libraries=chrono,filesystem,system,thread,test
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
$(package)_cxxflags_linux=-fPIC
endef
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
index 76b025c46..41e02e203 100644
--- a/depends/packages/freetype.mk
+++ b/depends/packages/freetype.mk
@@ -5,7 +5,7 @@ $(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
define $(package)_set_vars
- $(package)_config_opts=--without-zlib --without-png --disable-static
+ $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static
$(package)_config_opts_linux=--with-pic
endef
diff --git a/depends/packages/libICE.mk b/depends/packages/libICE.mk
deleted file mode 100644
index fc60323b1..000000000
--- a/depends/packages/libICE.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=libICE
-$(package)_version=1.0.9
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
-$(package)_dependencies=xtrans xproto
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/depends/packages/libSM.mk b/depends/packages/libSM.mk
deleted file mode 100644
index 0f9307ca7..000000000
--- a/depends/packages/libSM.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=libSM
-$(package)_version=1.2.2
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
-$(package)_dependencies=xtrans xproto libICE
-
-define $(package)_set_vars
- $(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk
index 178d592ee..298616bea 100644
--- a/depends/packages/libX11.mk
+++ b/depends/packages/libX11.mk
@@ -10,6 +10,10 @@ $(package)_config_opts=--disable-xkb --disable-static
$(package)_config_opts_linux=--with-pic
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk
index e87df2e4d..304494e3c 100644
--- a/depends/packages/libXau.mk
+++ b/depends/packages/libXau.mk
@@ -10,6 +10,10 @@ define $(package)_set_vars
$(package)_config_opts_linux=--with-pic
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk
index 4db836066..c0565dd67 100644
--- a/depends/packages/libXext.mk
+++ b/depends/packages/libXext.mk
@@ -9,6 +9,10 @@ define $(package)_set_vars
$(package)_config_opts=--disable-static
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk
index 28f2bd6f2..3f346d972 100644
--- a/depends/packages/libxcb.mk
+++ b/depends/packages/libxcb.mk
@@ -10,6 +10,7 @@ $(package)_config_opts=--disable-static
endef
define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux &&\
sed "s/pthread-stubs//" -i configure
endef
diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 37f0c28a5..db47113b2 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -52,6 +52,8 @@ $(package)_config_opts_aarch64_linux=linux-generic64
$(package)_config_opts_mipsel_linux=linux-generic32
$(package)_config_opts_mips_linux=linux-generic32
$(package)_config_opts_powerpc_linux=linux-generic32
+$(package)_config_opts_riscv32_linux=linux-generic32
+$(package)_config_opts_riscv64_linux=linux-generic64
$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
$(package)_config_opts_x86_64_mingw32=mingw64
$(package)_config_opts_i686_mingw32=mingw
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 3ea164ebc..edb509490 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -9,8 +9,9 @@ packages:=boost openssl libevent zeromq $(zcash_packages) googletest
qt_native_packages = native_protobuf
qt_packages = qrencode protobuf zlib
-qt_x86_64_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
-qt_i686_linux_packages:=$(qt_x86_64_linux_packages)
+qt_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
+
+rapidcheck_packages = rapidcheck
qt_darwin_packages=qt
qt_mingw32_packages=qt
diff --git a/depends/packages/protobuf.mk b/depends/packages/protobuf.mk
index 54d3fd924..d201d1183 100644
--- a/depends/packages/protobuf.mk
+++ b/depends/packages/protobuf.mk
@@ -11,6 +11,11 @@ define $(package)_set_vars
$(package)_config_opts_linux=--with-pic
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . &&\
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub gtest/build-aux
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk
index 44fdf1c29..313e4adf2 100644
--- a/depends/packages/qrencode.mk
+++ b/depends/packages/qrencode.mk
@@ -9,6 +9,10 @@ $(package)_config_opts=--disable-shared -without-tools --disable-sdltest
$(package)_config_opts_linux=--with-pic
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 745c9e115..dc1d17cd5 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -1,22 +1,20 @@
PACKAGE=qt
-$(package)_version=5.7.1
-$(package)_download_path=http://download.qt.io/official_releases/qt/5.7/$($(package)_version)/submodules
-$(package)_suffix=opensource-src-$($(package)_version).tar.gz
+$(package)_version=5.9.6
+$(package)_download_path=https://download.qt.io/official_releases/qt/5.9/$($(package)_version)/submodules
+$(package)_suffix=opensource-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
-$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
+$(package)_sha256_hash=eed620cb268b199bd83b3fc6a471c51d51e1dc2dbb5374fc97a0cc75facbe36f
$(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
-$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch
-$(package)_patches+=fix_qt_pkgconfig.patch fix-cocoahelpers-macos.patch qfixed-coretext.patch
+$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
-$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
-
+$(package)_qttranslations_sha256_hash=9822084f8e2d2939ba39f4af4c0c2320e45d5996762a9423f833055607604ed8
$(package)_qttools_file_name=qttools-$($(package)_suffix)
-$(package)_qttools_sha256_hash=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
+$(package)_qttools_sha256_hash=50e75417ec0c74bb8b1989d1d8e981ee83690dce7dfc0c2169f7c00f397e5117
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -29,25 +27,18 @@ $(package)_config_opts += -c++std c++11
$(package)_config_opts += -confirm-license
$(package)_config_opts += -dbus-runtime
$(package)_config_opts += -hostprefix $(build_prefix)
-$(package)_config_opts += -no-alsa
-$(package)_config_opts += -no-audio-backend
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
-$(package)_config_opts += -no-feature-style-windowsmobile
-$(package)_config_opts += -no-feature-style-windowsce
$(package)_config_opts += -no-freetype
$(package)_config_opts += -no-gif
$(package)_config_opts += -no-glib
-$(package)_config_opts += -no-gstreamer
$(package)_config_opts += -no-icu
$(package)_config_opts += -no-iconv
$(package)_config_opts += -no-kms
$(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libudev
-$(package)_config_opts += -no-mitshm
$(package)_config_opts += -no-mtdev
-$(package)_config_opts += -no-pulseaudio
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-qml-debug
@@ -62,7 +53,6 @@ $(package)_config_opts += -no-sql-sqlite
$(package)_config_opts += -no-sql-sqlite2
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -no-xinput2
-$(package)_config_opts += -no-xrender
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -opensource
@@ -74,13 +64,15 @@ $(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-libjpeg
$(package)_config_opts += -qt-pcre
+$(package)_config_opts += -qt-harfbuzz
$(package)_config_opts += -system-zlib
-$(package)_config_opts += -reduce-exports
$(package)_config_opts += -static
$(package)_config_opts += -silent
$(package)_config_opts += -v
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printdialog
+$(package)_config_opts += -no-feature-concurrent
+$(package)_config_opts += -no-feature-xml
ifneq ($(build_os),darwin)
$(package)_config_opts_darwin = -xplatform macx-clang-linux
@@ -92,16 +84,20 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION)
endif
-$(package)_config_opts_linux = -qt-xkbcommon
+$(package)_config_opts_linux = -qt-xkbcommon-x11
$(package)_config_opts_linux += -qt-xcb
$(package)_config_opts_linux += -system-freetype
-$(package)_config_opts_linux += -no-sm
+$(package)_config_opts_linux += -no-feature-sessionmanager
$(package)_config_opts_linux += -fontconfig
$(package)_config_opts_linux += -no-opengl
-$(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host)
+$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
+$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
+$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
+$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
$(package)_build_env = QT_RCC_TEST=1
+$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1
endef
define $(package)_fetch_cmds
@@ -124,11 +120,11 @@ define $(package)_extract_cmds
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
-
define $(package)_preprocess_cmds
+ sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
- sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
+ sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \
sed -i.old 's/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0)/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft)/' qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm && \
@@ -137,19 +133,22 @@ define $(package)_preprocess_cmds
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
- patch -p1 < $($(package)_patch_dir)/mingw-uuidof.patch && \
- patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
- patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
- patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
- patch -p1 < $($(package)_patch_dir)/fix-cocoahelpers-macos.patch && \
- patch -p1 < $($(package)_patch_dir)/qfixed-coretext.patch && \
+ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
+ sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
+ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\
+ patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
+ patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\
+ patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch &&\
+ patch -p1 -i $($(package)_patch_dir)/xkb-default.patch &&\
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch &&\
+ echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
+ echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
-
endef
define $(package)_config_cmds
@@ -161,19 +160,22 @@ define $(package)_config_cmds
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
$(MAKE) sub-src-clean && \
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
- cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
- cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
+ cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \
+ cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && \
+ cd ../lupdate/ && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../..
endef
define $(package)_build_cmds
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
$(MAKE) -C ../qttools/src/linguist/lrelease && \
+ $(MAKE) -C ../qttools/src/linguist/lupdate && \
$(MAKE) -C ../qttranslations
endef
define $(package)_stage_cmds
- $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
+ $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
+ $(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \
if `test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \
cp qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a $($(package)_staging_prefix_dir)/lib; \
diff --git a/depends/packages/rapidcheck.mk b/depends/packages/rapidcheck.mk
new file mode 100644
index 000000000..19cf1cae2
--- /dev/null
+++ b/depends/packages/rapidcheck.mk
@@ -0,0 +1,18 @@
+package=rapidcheck
+$(package)_version=10fc0cb
+$(package)_download_path=https://github.com/MarcoFalke/rapidcheck/archive
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=9640926223c00af45bce4c7df8b756b5458a89b2ba74cfe3e404467f13ce26df
+
+define $(package)_config_cmds
+ cmake -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true .
+endef
+
+define $(package)_build_cmds
+ $(MAKE) && \
+ mkdir -p $($(package)_staging_dir)$(host_prefix)/include && \
+ cp -a include/* $($(package)_staging_dir)$(host_prefix)/include/ && \
+ cp -a extras/boost_test/include/rapidcheck/* $($(package)_staging_dir)$(host_prefix)/include/rapidcheck/ && \
+ mkdir -p $($(package)_staging_dir)$(host_prefix)/lib && \
+ cp -a librapidcheck.a $($(package)_staging_dir)$(host_prefix)/lib/
+endef
diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk
index 98a11eb49..7065237bd 100644
--- a/depends/packages/xextproto.mk
+++ b/depends/packages/xextproto.mk
@@ -4,6 +4,10 @@ $(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_set_vars
$(package)_config_opts=--disable-shared
endef
diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk
index 50a90b268..5328ec848 100644
--- a/depends/packages/xproto.mk
+++ b/depends/packages/xproto.mk
@@ -8,6 +8,10 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk
index 99eefa6d5..c313b1f60 100644
--- a/depends/packages/xtrans.mk
+++ b/depends/packages/xtrans.mk
@@ -9,6 +9,10 @@ define $(package)_set_vars
$(package)_config_opts_linux=--with-pic --disable-static
endef
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
define $(package)_config_cmds
$($(package)_autoconf)
endef
diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk
index cde523370..c9068e83a 100644
--- a/depends/packages/zeromq.mk
+++ b/depends/packages/zeromq.mk
@@ -1,19 +1,20 @@
package=zeromq
-$(package)_version=4.2.3
+$(package)_version=4.2.5
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=8f1e2b2aade4dbfde98d82366d61baef2f62e812530160d2e6d0a5bb24e40bc0
+$(package)_sha256_hash=cc9090ba35713d59bb2f7d7965f877036c49c5558ea0c290b0dcc6f2a17e489f
$(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch
define $(package)_set_vars
- $(package)_config_opts=--without-docs --disable-shared --without-libsodium --disable-curve --disable-curve-keygen --disable-perf
+ $(package)_config_opts=--without-docs --disable-shared --without-libsodium --disable-curve --disable-curve-keygen --disable-perf --disable-Werror
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags=-std=c++11
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/0001-fix-build-with-older-mingw64.patch && \
- patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch
+ patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch && \
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
endef
define $(package)_config_cmds
diff --git a/depends/patches/qt/fix-cocoahelpers-macos.patch b/depends/patches/qt/fix-cocoahelpers-macos.patch
deleted file mode 100644
index 1b43a9eff..000000000
--- a/depends/patches/qt/fix-cocoahelpers-macos.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 0707260a4f8e64dfadf1df5f935e74cabb7c7d27 Mon Sep 17 00:00:00 2001
-From: Jake Petroules
-Date: Sun, 1 Oct 2017 21:48:17 -0700
-Subject: [PATCH] Fix build error with macOS 10.13 SDK
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Several of these variables/macros are no longer defined. We didn't
-validate the preconditions on iOS, tvOS, or watchOS, so no
-need to bother validating them on macOS either. Nor did we check the
-OSStatus result on any platform anyways.
-
-Task-number: QTBUG-63401
-Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3
-(cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b)
-Reviewed-by: Timur Pocheptsov
-Reviewed-by: Tor Arne Vestbø
----
- src/plugins/platforms/cocoa/qcocoahelpers.h | 2 +-
- src/plugins/platforms/cocoa/qcocoahelpers.mm | 13 +------------
- 2 files changed, 2 insertions(+), 13 deletions(-)
-
-diff --git old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
-index bbb3793..74371d5 100644
---- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
-+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
-@@ -80,7 +80,7 @@ QColor qt_mac_toQColor(CGColorRef color);
- // Creates a mutable shape, it's the caller's responsibility to release.
- HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion);
-
--OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
-+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
-
- NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
- NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
-diff --git old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
-index cd73148..3f8429e 100644
---- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
-+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
-@@ -544,15 +544,8 @@ NSRect qt_mac_flipRect(const QRect &rect)
- return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
- }
-
--OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
-+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
- {
-- // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
-- OSStatus err = noErr;
--
-- require_action(inContext != NULL, InvalidContext, err = paramErr);
-- require_action(inBounds != NULL, InvalidBounds, err = paramErr);
-- require_action(inImage != NULL, InvalidImage, err = paramErr);
--
- CGContextSaveGState( inContext );
- CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
- CGContextScaleCTM(inContext, 1, -1);
-@@ -560,10 +553,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm
- CGContextDrawImage(inContext, *inBounds, inImage);
-
- CGContextRestoreGState(inContext);
--InvalidImage:
--InvalidBounds:
--InvalidContext:
-- return err;
- }
-
- Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
---
-2.7.4
diff --git a/depends/patches/qt/fix-xcb-include-order.patch b/depends/patches/qt/fix-xcb-include-order.patch
deleted file mode 100644
index ec2bc17d9..000000000
--- a/depends/patches/qt/fix-xcb-include-order.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- old/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17
-+++ new/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17
-@@ -76,8 +76,6 @@
-
- DEFINES += $$QMAKE_DEFINES_XCB
- LIBS += $$QMAKE_LIBS_XCB
--QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
--QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB
-
- CONFIG += qpa/genericunixfontdatabase
-
-@@ -89,7 +87,8 @@
- contains(QT_CONFIG, xcb-qt) {
- DEFINES += XCB_USE_RENDER
- XCB_DIR = ../../../3rdparty/xcb
-- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
-+ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
-+ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
- LIBS += -lxcb -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix()
- } else {
- LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xinerama
---- old/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
-+++ new/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
-@@ -9,7 +9,8 @@
-
- XCB_DIR = ../../../../3rdparty/xcb
-
--INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
-+QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude
-+QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude
-
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB
---- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
-+++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
-@@ -6,6 +6,13 @@
- qxcbmain.cpp
- OTHER_FILES += xcb.json README
-
-+contains(QT_CONFIG, xcb-qt) {
-+ DEFINES += XCB_USE_RENDER
-+ XCB_DIR = ../../../3rdparty/xcb
-+ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
-+ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
-+}
-+
- PLUGIN_TYPE = platforms
- PLUGIN_CLASS_NAME = QXcbIntegrationPlugin
- !equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
diff --git a/depends/patches/qt/fix_configure_mac.patch b/depends/patches/qt/fix_configure_mac.patch
new file mode 100644
index 000000000..0d7dd647d
--- /dev/null
+++ b/depends/patches/qt/fix_configure_mac.patch
@@ -0,0 +1,50 @@
+--- old/qtbase/mkspecs/features/mac/sdk.prf 2018-02-08 10:24:48.000000000 -0800
++++ new/qtbase/mkspecs/features/mac/sdk.prf 2018-03-23 10:38:56.000000000 -0700
+@@ -8,21 +8,21 @@
+ defineReplace(xcodeSDKInfo) {
+ info = $$1
+ equals(info, "Path"): \
+- info = --show-sdk-path
++ infoarg = --show-sdk-path
+ equals(info, "PlatformPath"): \
+- info = --show-sdk-platform-path
++ infoarg = --show-sdk-platform-path
+ equals(info, "SDKVersion"): \
+- info = --show-sdk-version
++ infoarg = --show-sdk-version
+ sdk = $$2
+ isEmpty(sdk): \
+ sdk = $$QMAKE_MAC_SDK
+
+ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
+- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
++ QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null")
+ # --show-sdk-platform-path won't work for Command Line Tools; this is fine
+ # only used by the XCTest backend to testlib
+- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
+- error("Could not resolve SDK $$info for \'$$sdk\'")
++ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \
++ error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg")
+ cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
+ }
+
+--- old/qtbase/configure 2018-02-08 10:24:48.000000000 -0800
++++ new/qtbase/configure 2018-03-23 05:42:29.000000000 -0700
+@@ -232,8 +232,13 @@
+
+ sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
+ if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
+- sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
+- if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
++ sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1")
++
++ echo "sysroot pre-configured as $sysroot";
++ if [ -z "$sysroot" ]; then
++ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
++ if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
++ fi
+
+ case "$sdk" in
+ macosx*)
+
+
diff --git a/depends/patches/qt/fix_no_printer.patch b/depends/patches/qt/fix_no_printer.patch
new file mode 100644
index 000000000..f868ca257
--- /dev/null
+++ b/depends/patches/qt/fix_no_printer.patch
@@ -0,0 +1,19 @@
+--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
++++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+@@ -52,6 +52,7 @@
+ //
+
+ #include
++#include
+
+ #ifndef QT_NO_PRINTER
+
+--- x/qtbase/src/plugins/plugins.pro
++++ y/qtbase/src/plugins/plugins.pro
+@@ -8,6 +8,3 @@ qtHaveModule(gui) {
+ qtConfig(imageformatplugin): SUBDIRS *= imageformats
+ !android:qtConfig(library): SUBDIRS *= generic
+ }
+-
+-!winrt:qtHaveModule(printsupport): \
+- SUBDIRS += printsupport
diff --git a/depends/patches/qt/fix_rcc_determinism.patch b/depends/patches/qt/fix_rcc_determinism.patch
new file mode 100644
index 000000000..c1b07fe23
--- /dev/null
+++ b/depends/patches/qt/fix_rcc_determinism.patch
@@ -0,0 +1,15 @@
+--- old/qtbase/src/tools/rcc/rcc.cpp
++++ new/qtbase/src/tools/rcc/rcc.cpp
+@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
+ if (lib.formatVersion() >= 2) {
+ // last modified time stamp
+ const QDateTime lastModified = m_fileInfo.lastModified();
+- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
++ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
++ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
++ if (sourceDate != 0)
++ lastmod = sourceDate;
++ lib.writeNumber8(lastmod);
+ if (text || pass1)
+ lib.writeChar('\n');
+ }
diff --git a/depends/patches/qt/fix_riscv64_arch.patch b/depends/patches/qt/fix_riscv64_arch.patch
new file mode 100644
index 000000000..e7f29f01f
--- /dev/null
+++ b/depends/patches/qt/fix_riscv64_arch.patch
@@ -0,0 +1,14 @@
+diff --git a/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h b/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
+index 20bfd36..93729fa 100644
+--- a/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
++++ b/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
+@@ -65,7 +65,8 @@
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+ defined(_MIPS_ARCH_MIPS32R2) || \
+- defined(__AARCH64EL__)
++ defined(__AARCH64EL__) || defined(__aarch64__) || \
++ defined(__riscv)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
+ #if defined(_WIN32)
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
index ca70d30b1..337d0eb9c 100644
--- a/depends/patches/qt/mac-qmake.conf
+++ b/depends/patches/qt/mac-qmake.conf
@@ -14,6 +14,7 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
QMAKE_MAC_SDK.macosx.platform_name = macosx
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
+QMAKE_APPLE_DEVICE_ARCHS=x86_64
!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
diff --git a/depends/patches/qt/mingw-uuidof.patch b/depends/patches/qt/mingw-uuidof.patch
deleted file mode 100644
index fb21923c8..000000000
--- a/depends/patches/qt/mingw-uuidof.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- old/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
-+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
-@@ -77,7 +77,7 @@
- #include
- #include
- #include
--#ifndef Q_OS_WINCE
-+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
- # include
- #endif
-
-@@ -814,7 +814,7 @@
- HWND_MESSAGE, NULL, static_cast(GetModuleHandle(0)), NULL);
- }
-
--#ifndef Q_OS_WINCE
-+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
- // Re-engineered from the inline function _com_error::ErrorMessage().
- // We cannot use it directly since it uses swprintf_s(), which is not
- // present in the MSVCRT.DLL found on Windows XP (QTBUG-35617).
-@@ -833,7 +833,7 @@
- return QString::asprintf("IDispatch error #%u", uint(wCode));
- return QString::asprintf("Unknown error 0x0%x", uint(comError.Error()));
- }
--#endif // !Q_OS_WINCE
-+#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
-
- /*!
- \brief Common COM error strings.
-@@ -901,12 +901,12 @@
- default:
- break;
- }
--#ifndef Q_OS_WINCE
-+#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
- _com_error error(hr);
- result += QByteArrayLiteral(" (");
- result += errorMessageFromComError(error);
- result += ')';
--#endif // !Q_OS_WINCE
-+#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
- return result;
- }
-
diff --git a/depends/patches/qt/pidlist_absolute.patch b/depends/patches/qt/pidlist_absolute.patch
deleted file mode 100644
index c79282417..000000000
--- a/depends/patches/qt/pidlist_absolute.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
---- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h
-+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
-@@ -136,10 +136,18 @@
- inline void init();
-
- typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
-+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
-+ typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, ITEMIDLIST **);
-+#else
- typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
-+#endif
- typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
- typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
-+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
-+ typedef HRESULT (WINAPI *SHCreateItemFromIDList)(const ITEMIDLIST *, REFIID, void **);
-+#else
- typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
-+#endif
-
- SHCreateItemFromParsingName sHCreateItemFromParsingName;
- SHGetKnownFolderIDList sHGetKnownFolderIDList;
-diff -dur old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
---- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
-+++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
-@@ -1016,7 +1016,11 @@
- qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
- return Q_NULLPTR;
- }
-+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
-+ ITEMIDLIST *idList;
-+#else
- PIDLIST_ABSOLUTE idList;
-+#endif
- HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
- if (FAILED(hr)) {
- qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
diff --git a/depends/patches/qt/qfixed-coretext.patch b/depends/patches/qt/qfixed-coretext.patch
deleted file mode 100644
index aa56f1e1d..000000000
--- a/depends/patches/qt/qfixed-coretext.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 Mon Sep 17 00:00:00 2001
-From: Gabriel de Dietrich
-Date: Fri, 30 Mar 2018 11:58:16 -0700
-Subject: [PATCH] QCoreTextFontEngine: Fix build with Xcode 9.3
-
-Apple LLVM version 9.1.0 (clang-902.0.39.1)
-
-Error message:
-
-.../qfontengine_coretext.mm:827:20: error: qualified reference to
- 'QFixed' is a constructor name rather than a type in this context
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
-
-Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043
-Reviewed-by: Konstantin Ritt
----
- src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-index 25ff69d877d..98b753eff96 100644
---- old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-+++ new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
-@@ -824,7 +824,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl
-
- QFixed QCoreTextFontEngine::emSquareSize() const
- {
-- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
-+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
- }
-
- QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
---
-2.16.3
\ No newline at end of file
diff --git a/depends/patches/qt/xkb-default.patch b/depends/patches/qt/xkb-default.patch
new file mode 100644
index 000000000..165abf3e2
--- /dev/null
+++ b/depends/patches/qt/xkb-default.patch
@@ -0,0 +1,26 @@
+--- old/qtbase/src/gui/configure.pri 2018-06-06 17:28:10.000000000 -0400
++++ new/qtbase/src/gui/configure.pri 2018-08-17 18:43:01.589384567 -0400
+@@ -43,18 +43,11 @@
+ }
+
+ defineTest(qtConfTest_xkbConfigRoot) {
+- qtConfTest_getPkgConfigVariable($${1}): return(true)
+-
+- for (dir, $$list("/usr/share/X11/xkb", "/usr/local/share/X11/xkb")) {
+- exists($$dir) {
+- $${1}.value = $$dir
+- export($${1}.value)
+- $${1}.cache += value
+- export($${1}.cache)
+- return(true)
+- }
+- }
+- return(false)
++ $${1}.value = "/usr/share/X11/xkb"
++ export($${1}.value)
++ $${1}.cache += value
++ export($${1}.cache)
++ return(true)
+ }
+
+ defineTest(qtConfTest_qpaDefaultPlatform) {
diff --git a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch b/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
index a6c508fb8..b911ac567 100644
--- a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
+++ b/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
@@ -1,6 +1,6 @@
-From 1a159c128c69a42d90819375c06a39994f3fbfc1 Mon Sep 17 00:00:00 2001
-From: Cory Fields
-Date: Tue, 28 Nov 2017 20:33:25 -0500
+From f6866b0f166ad168618aae64c7fbee8775d3eb23 Mon Sep 17 00:00:00 2001
+From: mruddy <6440430+mruddy@users.noreply.github.com>
+Date: Sat, 30 Jun 2018 09:44:58 -0400
Subject: [PATCH] fix build with older mingw64
---
@@ -8,10 +8,10 @@ Subject: [PATCH] fix build with older mingw64
1 file changed, 7 insertions(+)
diff --git a/src/windows.hpp b/src/windows.hpp
-index 99e889d..e69038e 100644
+index 6c3839fd..2c32ec79 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
-@@ -55,6 +55,13 @@
+@@ -58,6 +58,13 @@
#include
#include
#include
@@ -23,8 +23,8 @@ index 99e889d..e69038e 100644
+#include
+#endif
#include
-
+
#if !defined __MINGW32__
---
-2.7.4
+--
+2.17.1
diff --git a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch b/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
index d220b54f3..022e31197 100644
--- a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
+++ b/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
@@ -1,6 +1,6 @@
-From 6e6b47d5ab381c3df3b30bb0b0a6cf210dfb1eba Mon Sep 17 00:00:00 2001
-From: Cory Fields
-Date: Mon, 5 Mar 2018 14:22:05 -0500
+From c9bbdd6581d07acfe8971e4bcebe278a3676cf03 Mon Sep 17 00:00:00 2001
+From: mruddy <6440430+mruddy@users.noreply.github.com>
+Date: Sat, 30 Jun 2018 09:57:18 -0400
Subject: [PATCH] disable pthread_set_name_np
pthread_set_name_np adds a Glibc requirement on >= 2.12.
@@ -9,21 +9,21 @@ pthread_set_name_np adds a Glibc requirement on >= 2.12.
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/thread.cpp b/src/thread.cpp
-index 4fc59c3e..c3fdfd46 100644
+index a1086b0c..9943f354 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
-@@ -220,7 +220,7 @@ void zmq::thread_t::setThreadName(const char *name_)
+@@ -307,7 +307,7 @@ void zmq::thread_t::setThreadName (const char *name_)
*/
if (!name_)
return;
-
+#if 0
#if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
- int rc = pthread_setname_np(name_);
- if(rc) return;
-@@ -233,6 +233,8 @@ void zmq::thread_t::setThreadName(const char *name_)
+ int rc = pthread_setname_np (name_);
+ if (rc)
+@@ -323,6 +323,8 @@ void zmq::thread_t::setThreadName (const char *name_)
#elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
- pthread_set_name_np(descriptor, name_);
+ pthread_set_name_np (descriptor, name_);
#endif
+#endif
+ return;
@@ -31,5 +31,5 @@ index 4fc59c3e..c3fdfd46 100644
#endif
--
-2.11.1
+2.17.1
diff --git a/doc/README.md b/doc/README.md
index ddb239f60..b3f875c4a 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -9,7 +9,7 @@ To download Bitcoin Core, visit [bitcoincore.org](https://bitcoincore.org/en/rel
Running
---------------------
-The following are some helpful notes on how to run Bitcoin on your native platform.
+The following are some helpful notes on how to run Bitcoin Core on your native platform.
### Unix
@@ -22,9 +22,9 @@ Unpack the files into a directory and run:
Unpack the files into a directory, and then run bitcoin-qt.exe.
-### OS X
+### macOS
-Drag Bitcoin-Core to your applications folder, and then run Bitcoin-Core.
+Drag Bitcoin Core to your applications folder, and then run Bitcoin Core.
### Need Help?
@@ -35,10 +35,10 @@ for help and more information.
Building
---------------------
-The following are developer notes on how to build Bitcoin on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
+The following are developer notes on how to build Bitcoin Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
- [Dependencies](dependencies.md)
-- [OS X Build Notes](build-osx.md)
+- [macOS Build Notes](build-osx.md)
- [Unix Build Notes](build-unix.md)
- [Windows Build Notes](build-windows.md)
- [OpenBSD Build Notes](build-openbsd.md)
@@ -75,6 +75,7 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th
- [Tor Support](tor.md)
- [Init Scripts (systemd/upstart/openrc)](init.md)
- [ZMQ](zmq.md)
+- [PSBT support](psbt.md)
License
---------------------
diff --git a/doc/README_osx.md b/doc/README_osx.md
index 975be4be9..739e22d63 100644
--- a/doc/README_osx.md
+++ b/doc/README_osx.md
@@ -1,12 +1,12 @@
-Deterministic OS X DMG Notes.
+Deterministic macOS DMG Notes.
-Working OS X DMGs are created in Linux by combining a recent clang,
+Working macOS DMGs are created in Linux by combining a recent clang,
the Apple binutils (ld, ar, etc) and DMG authoring tools.
Apple uses clang extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use
of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary
-when building for OS X.
+when building for macOS.
Apple's version of binutils (called cctools) contains lots of functionality
missing in the FSF's binutils. In addition to extra linker options for
@@ -38,7 +38,7 @@ Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1
Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file.
To create a tarball suitable for Gitian input, there are two options:
-Using Mac OS X, you can mount the dmg, and then create it with:
+Using macOS, you can mount the dmg, and then create it with:
```
$ hdiutil attach Xcode_7.3.1.dmg
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk
@@ -81,7 +81,7 @@ Background images and other features can be added to DMG files by inserting a
.DS_Store before creation. This is generated by the script
contrib/macdeploy/custom_dsstore.py.
-As of OS X Mavericks (10.9), using an Apple-blessed key to sign binaries is a
+As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a
requirement in order to satisfy the new Gatekeeper requirements. Because this
private key cannot be shared, we'll have to be a bit creative in order for the
build process to remain somewhat deterministic. Here's how it works:
diff --git a/doc/benchmarking.md b/doc/benchmarking.md
index 99d36cb22..48f81cf6c 100644
--- a/doc/benchmarking.md
+++ b/doc/benchmarking.md
@@ -2,7 +2,7 @@ Benchmarking
============
Bitcoin Core has an internal benchmarking framework, with benchmarks
-for cryptographic algorithms such as SHA1, SHA256, SHA512 and RIPEMD160. As well as the rolling bloom filter.
+for cryptographic algorithms (e.g. SHA1, SHA256, SHA512, RIPEMD160), as well as the rolling bloom filter.
Running
---------------------
diff --git a/doc/bips.md b/doc/bips.md
index 272cf4de2..76edc94c2 100644
--- a/doc/bips.md
+++ b/doc/bips.md
@@ -1,4 +1,4 @@
-BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):
+BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.17.0**):
* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575))
* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)).
@@ -13,7 +13,7 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):
* [`BIP 32`](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki): Hierarchical Deterministic Wallets has been implemented since **v0.13.0** ([PR #8035](https://github.com/bitcoin/bitcoin/pull/8035)).
* [`BIP 34`](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki): The rule that requires blocks to contain their height (number) in the coinbase input, and the introduction of version 2 blocks has been implemented since **v0.7.0**. The rule took effect for version 2 blocks as of *block 224413* (March 5th 2013), and version 1 blocks are no longer allowed since *block 227931* (March 25th 2013) ([PR #1526](https://github.com/bitcoin/bitcoin/pull/1526)).
* [`BIP 35`](https://github.com/bitcoin/bips/blob/master/bip-0035.mediawiki): The 'mempool' protocol message (and the protocol version bump to 60002) has been implemented since **v0.7.0** ([PR #1641](https://github.com/bitcoin/bitcoin/pull/1641)).
-* [`BIP 37`](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial merkle trees for blocks, and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/bitcoin/bitcoin/pull/1795)).
+* [`BIP 37`](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial Merkle trees for blocks, and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/bitcoin/bitcoin/pull/1795)).
* [`BIP 42`](https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki): The bug that would have caused the subsidy schedule to resume after block 13440000 was fixed in **v0.9.2** ([PR #3842](https://github.com/bitcoin/bitcoin/pull/3842)).
* [`BIP 61`](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/bitcoin/bitcoin/pull/3185)). Starting *v0.17.0*, whether to send reject messages can be configured with the `-enablebip61` option.
* [`BIP 65`](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki): The CHECKLOCKTIMEVERIFY softfork was merged in **v0.12.0** ([PR #6351](https://github.com/bitcoin/bitcoin/pull/6351)), and backported to **v0.11.2** and **v0.10.4**. Mempool-only CLTV was added in [PR #6124](https://github.com/bitcoin/bitcoin/pull/6124).
@@ -35,4 +35,5 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):
* [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)).
* [`BIP 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): NODE_NETWORK_LIMITED service bit [signaling only] is supported as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)).
* [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)).
+* [`BIP 174`](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki): RPCs to operate on Partially Signed Bitcoin Transactions (PSBT) are present as of **v0.17.0** ([PR 13557](https://github.com/bitcoin/bitcoin/pull/13557)).
* [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)).
diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md
new file mode 100644
index 000000000..48746ce0c
--- /dev/null
+++ b/doc/build-freebsd.md
@@ -0,0 +1,46 @@
+FreeBSD build guide
+======================
+(updated for FreeBSD 11.1)
+
+This guide describes how to build bitcoind and command-line utilities on FreeBSD.
+
+This guide does not contain instructions for building the GUI.
+
+## Preparation
+
+You will need the following dependencies, which can be installed as root via pkg:
+
+```
+pkg install autoconf automake boost-libs git gmake libevent libtool openssl pkgconf
+```
+
+For the wallet (optional):
+```
+./contrib/install_db4.sh `pwd`
+export BDB_PREFIX="$PWD/db4"
+```
+
+See [dependencies.md](dependencies.md) for a complete overview.
+
+Download the source code:
+```
+git clone https://github.com/bitcoin/bitcoin
+```
+
+## Building Bitcoin Core
+
+**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
+
+```
+./autogen.sh
+
+./configure # to build with wallet OR
+./configure --disable-wallet # to build without wallet
+
+gmake
+```
+
+*Note on debugging*: The version of `gdb` installed by default is [ancient and considered harmful](https://wiki.freebsd.org/GdbRetirement).
+It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package `gdb` and
+use the versioned gdb command (e.g. `gdb7111`).
+
diff --git a/doc/build-osx.md b/doc/build-osx.md
index e52a770ce..1fa01d0d6 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -1,11 +1,11 @@
-Mac OS X Build Instructions and Notes
+macOS Build Instructions and Notes
====================================
The commands in this guide should be executed in a Terminal application.
The built-in one is located in `/Applications/Utilities/Terminal.app`.
Preparation
-----------
-Install the OS X command line tools:
+Install the macOS command line tools:
`xcode-select --install`
@@ -24,8 +24,6 @@ If you want to build the disk image with `make deploy` (.dmg / optional), you ne
brew install librsvg
-NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
-
Berkeley DB
-----------
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
@@ -43,14 +41,14 @@ from the root of the repository.
Build Bitcoin Core
------------------------
-1. Clone the bitcoin source code and cd into `bitcoin`
+1. Clone the Bitcoin Core source code and cd into `bitcoin`
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
-2. Build bitcoin-core:
+2. Build Bitcoin Core:
- Configure and build the headless bitcoin binaries as well as the GUI (if Qt is found).
+ Configure and build the headless Bitcoin Core binaries as well as the GUI (if Qt is found).
You can disable the GUI build by passing `--without-gui` to configure.
@@ -66,12 +64,23 @@ Build Bitcoin Core
make deploy
+Disable-wallet mode
+--------------------
+When the intention is to run only a P2P node without a wallet, Bitcoin Core may be compiled in
+disable-wallet mode with:
+
+ ./configure --disable-wallet
+
+In this case there is no dependency on Berkeley DB 4.8.
+
+Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call.
+
Running
-------
Bitcoin Core is now available at `./src/bitcoind`
-Before running, it's recommended you create an RPC configuration file.
+Before running, it's recommended that you create an RPC configuration file.
echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
@@ -93,6 +102,6 @@ Other commands:
Notes
-----
-* Tested on OS X 10.8 through 10.13 on 64-bit Intel processors only.
+* Tested on OS X 10.10 Yosemite through macOS 10.13 High Sierra on 64-bit Intel processors only.
* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)
diff --git a/doc/build-unix.md b/doc/build-unix.md
index 2d10484a6..87dade42a 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -2,12 +2,11 @@ UNIX BUILD NOTES
====================
Some notes on how to build Bitcoin Core in Unix.
-(For BSD specific instructions, see [build-openbsd.md](build-openbsd.md) and/or
-[build-netbsd.md](build-netbsd.md))
+(For BSD specific instructions, see `build-*bsd.md` in this directory.)
Note
---------------------
-Always use absolute paths to configure and compile bitcoin and the dependencies,
+Always use absolute paths to configure and compile Bitcoin Core and the dependencies,
for example, when specifying the path of the dependency:
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
@@ -48,7 +47,7 @@ Optional dependencies:
protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled)
libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled)
univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure)
- libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.x)
+ libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.0.0)
For the versions used, see [dependencies.md](dependencies.md)
@@ -71,19 +70,11 @@ tuned to conserve memory with additional CXXFLAGS:
Build requirements:
- sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3
+ sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
-Options when installing required Boost library files:
+Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
-1. On at least Ubuntu 14.04+ and Debian 7+ there are generic names for the
-individual boost development packages, so the following can be used to only
-install necessary parts of boost:
-
- sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
-
-2. If that doesn't work, you can install all boost development packages with:
-
- sudo apt-get install libboost-all-dev
+ sudo apt-get install libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
BerkeleyDB is required for the wallet.
@@ -106,25 +97,20 @@ Optional (see --with-miniupnpc and --enable-upnp-default):
sudo apt-get install libminiupnpc-dev
-ZMQ dependencies (provides ZMQ API 4.x):
+ZMQ dependencies (provides ZMQ API):
sudo apt-get install libzmq3-dev
-#### Dependencies for the GUI
+GUI dependencies:
-If you want to build Bitcoin-Qt, make sure that the required packages for Qt development
-are installed. Either Qt 5 or Qt 4 are necessary to build the GUI.
-If both Qt 4 and Qt 5 are installed, Qt 5 will be used. Pass `--with-gui=qt4` to configure to choose Qt4.
+If you want to build bitcoin-qt, make sure that the required packages for Qt development
+are installed. Qt 5 is necessary to build the GUI.
To build without GUI pass `--without-gui`.
-To build with Qt 5 (recommended) you need the following:
+To build with Qt 5 you need the following:
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
-Alternatively, to build with Qt 4 you need the following:
-
- sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
-
libqrencode (optional) can be installed with:
sudo apt-get install libqrencode-dev
@@ -145,7 +131,7 @@ Optional:
sudo dnf install miniupnpc-devel
-To build with Qt 5 (recommended) you need the following:
+To build with Qt 5 you need the following:
sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel
@@ -196,7 +182,7 @@ If you need to build Boost yourself:
Security
--------
-To help make your bitcoin installation more secure by making certain attacks impossible to
+To help make your Bitcoin Core installation more secure by making certain attacks impossible to
exploit even if a vulnerability is found, binaries are hardened by default.
This can be disabled with:
@@ -212,7 +198,7 @@ Hardening enables the following features:
Build position independent code to take advantage of Address Space Layout Randomization
offered by some kernels. Attackers who can cause execution of code at an arbitrary memory
location are thwarted if they don't know where anything useful is located.
- The stack and heap are randomly located by default but this allows the code section to be
+ The stack and heap are randomly located by default, but this allows the code section to be
randomly located as well.
On an AMD64 processor where a library was not compiled with -fPIC, this will cause an error
@@ -228,8 +214,8 @@ Hardening enables the following features:
ET_DYN
* Non-executable Stack
- If the stack is executable then trivial stack based buffer overflow exploits are possible if
- vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack
+ If the stack is executable then trivial stack-based buffer overflow exploits are possible if
+ vulnerable buffers are found. By default, Bitcoin Core should be built with a non-executable stack,
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
and uses a compiler extension which requires an executable stack, it will silently build an
executable without the non-executable stack protection.
@@ -237,7 +223,7 @@ Hardening enables the following features:
To verify that the stack is non-executable after compiling use:
`scanelf -e ./bitcoin`
- the output should contain:
+ The output should contain:
STK/REL/PTL
RW- R-- RW-
@@ -245,15 +231,14 @@ Hardening enables the following features:
Disable-wallet mode
--------------------
-When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in
+When the intention is to run only a P2P node without a wallet, Bitcoin Core may be compiled in
disable-wallet mode with:
./configure --disable-wallet
In this case there is no dependency on Berkeley DB 4.8.
-Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC
-call not `getwork`.
+Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call.
Additional Configure Flags
--------------------------
@@ -297,39 +282,9 @@ To build executables for ARM:
cd depends
make HOST=arm-linux-gnueabihf NO_QT=1
cd ..
+ ./autogen.sh
./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++
make
For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory.
-
-Building on FreeBSD
---------------------
-
-(Updated as of FreeBSD 11.0)
-
-Clang is installed by default as `cc` compiler, this makes it easier to get
-started than on [OpenBSD](build-openbsd.md). Installing dependencies:
-
- pkg install autoconf automake libtool pkgconf
- pkg install boost-libs openssl libevent
- pkg install gmake
-
-You need to use GNU make (`gmake`) instead of `make`.
-(`libressl` instead of `openssl` will also work)
-
-For the wallet (optional):
-
- ./contrib/install_db4.sh `pwd`
- setenv BDB_PREFIX $PWD/db4
-
-Then build using:
-
- ./autogen.sh
- ./configure --disable-wallet # OR
- ./configure BDB_CFLAGS="-I${BDB_PREFIX}/include" BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx"
- gmake
-
-*Note on debugging*: The version of `gdb` installed by default is [ancient and considered harmful](https://wiki.freebsd.org/GdbRetirement).
-It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package `gdb` and
-use the versioned gdb command e.g. `gdb7111`.
diff --git a/doc/build-windows.md b/doc/build-windows.md
index 935e29ce1..8c4b79beb 100644
--- a/doc/build-windows.md
+++ b/doc/build-windows.md
@@ -10,7 +10,7 @@ and is the platform used to build the Bitcoin Core Windows release binaries.
* On Windows using [Windows
Subsystem for Linux (WSL)](https://msdn.microsoft.com/commandline/wsl/about) and the Mingw-w64 cross compiler tool chain.
-Other options which may work but which have not been extensively tested are (please contribute instructions):
+Other options which may work, but which have not been extensively tested are (please contribute instructions):
* On Windows using a POSIX compatibility layer application such as [cygwin](http://www.cygwin.com/) or [msys2](http://www.msys2.org/).
* On Windows using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com).
@@ -46,7 +46,7 @@ To install WSL on Windows 10 with Fall Creators Update installed (version >= 162
After the bash shell is active, you can follow the instructions below, starting
with the "Cross-compilation" section. Compiling the 64-bit version is
-recommended but it is possible to compile the 32-bit version.
+recommended, but it is possible to compile the 32-bit version.
Cross-compilation for Ubuntu and Windows Subsystem for Linux
------------------------------------------------------------
@@ -77,7 +77,7 @@ Ubuntu Bionic 18.04 [1](#footnote1):
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
-Once the tool chain is installed the build steps are common:
+Once the toolchain is installed the build steps are common:
Note that for WSL the Bitcoin Core source path MUST be somewhere in the default mount file system, for
example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail.
@@ -133,7 +133,7 @@ Installation
-------------
After building using the Windows subsystem it can be useful to copy the compiled
-executables to a directory on the windows drive in the same directory structure
+executables to a directory on the Windows drive in the same directory structure
as they appear in the release `.zip` archive. This can be done in the following
way. This will install to `c:\workspace\bitcoin`, for example:
@@ -146,5 +146,5 @@ Footnotes
compiler options to allow a choice between either posix or win32 threads. The default option is win32 threads which is the more
efficient since it will result in binary code that links directly with the Windows kernel32.lib. Unfortunately, the headers
required to support win32 threads conflict with some of the classes in the C++11 standard library in particular std::mutex.
-It's not possible to build the bitcoin code using the win32 version of the Mingw-w64 cross compilers (at least not without
-modifying headers in the bitcoin source code).
+It's not possible to build the Bitcoin Core code using the win32 version of the Mingw-w64 cross compilers (at least not without
+modifying headers in the Bitcoin Core source code).
diff --git a/doc/dependencies.md b/doc/dependencies.md
index 7aa96c4c9..d777aaf66 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -6,25 +6,25 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html) |
| --- | --- | --- | --- | --- | --- |
| Berkeley DB | [4.8.30](http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
-| Boost | [1.64.0](http://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
-| Clang | | [3.3+](http://llvm.org/releases/download.html) (C++11 support) | | | |
+| Boost | [1.64.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
+| Clang | | [3.3+](https://llvm.org/releases/download.html) (C++11 support) | | | |
| D-Bus | [1.10.18](https://cgit.freedesktop.org/dbus/dbus/tree/NEWS?h=dbus-1.10) | | No | Yes | |
| Expat | [2.2.5](https://libexpat.github.io/) | | No | Yes | |
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
| FreeType | [2.7.1](http://download.savannah.gnu.org/releases/freetype) | | No | | |
-| GCC | | [4.8+](https://gcc.gnu.org/) | | | |
+| GCC | | [4.8+](https://gcc.gnu.org/) (C++11 support) | | | |
| HarfBuzz-NG | | | | | |
| libevent | [2.1.8-stable](https://github.com/libevent/libevent/releases) | 2.0.22 | No | | |
-| libjpeg | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L75) |
-| libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L74) |
+| libjpeg | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L65) |
+| libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L64) |
| MiniUPnPc | [2.0.20180203](http://miniupnp.free.fr/files) | | No | | |
| OpenSSL | [1.0.1k](https://www.openssl.org/source) | | Yes | | |
-| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L76) |
-| protobuf | [2.6.3](https://github.com/google/protobuf/releases) | | No | | |
+| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L66) |
+| protobuf | [2.6.1](https://github.com/google/protobuf/releases) | | No | | |
| Python (tests) | | [3.4](https://www.python.org/downloads) | | | |
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
-| Qt | [5.7.1](https://download.qt.io/official_releases/qt/) | 4.7+ | No | | |
-| XCB | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L94) (Linux only) |
-| xkbcommon | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L93) (Linux only) |
-| ZeroMQ | [4.2.3](https://github.com/zeromq/libzmq/releases) | | No | | |
-| zlib | [1.2.11](http://zlib.net/) | | | | No |
+| Qt | [5.9.6](https://download.qt.io/official_releases/qt/) | 5.x | No | | |
+| XCB | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L87) (Linux only) |
+| xkbcommon | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L86) (Linux only) |
+| ZeroMQ | [4.2.5](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | |
+| zlib | [1.2.11](https://zlib.net/) | | | | No |
diff --git a/doc/descriptors.md b/doc/descriptors.md
new file mode 100644
index 000000000..c23ac06e8
--- /dev/null
+++ b/doc/descriptors.md
@@ -0,0 +1,124 @@
+# Support for Output Descriptors in Bitcoin Core
+
+Since Bitcoin Core v0.17, there is support for Output Descriptors in the
+`scantxoutset` RPC call. This is a simple language which can be used to
+describe collections of output scripts.
+
+This document describes the language. For the specifics on usage for scanning
+the UTXO set, see the `scantxoutset` RPC help.
+
+## Features
+
+Output descriptors currently support:
+- Pay-to-pubkey scripts (P2PK), through the `pk` function.
+- Pay-to-pubkey-hash scripts (P2PKH), through the `pkh` function.
+- Pay-to-witness-pubkey-hash scripts (P2WPKH), through the `wpkh` function.
+- Pay-to-script-hash scripts (P2SH), through the `sh` function.
+- Pay-to-witness-script-hash scripts (P2WSH), through the `wsh` function.
+- Multisig scripts, through the `multi` function.
+- Any type of supported address through the `addr` function.
+- Raw hex scripts through the `raw` function.
+- Public keys (compressed and uncompressed) in hex notation, or BIP32 extended pubkeys with derivation paths.
+
+## Examples
+
+- `pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` represents a P2PK output.
+- `pkh(02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5)` represents a P2PKH output.
+- `wpkh(02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9)` represents a P2WPKH output.
+- `sh(wpkh(03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556))` represents a P2SH-P2WPKH output.
+- `combo(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)` represents a P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH output.
+- `sh(wsh(pkh(02e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13)))` represents a (overly complicated) P2SH-P2WSH-P2PKH output.
+- `multi(1,022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4,025cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc)` represents a bare *1-of-2* multisig.
+- `sh(multi(2,022f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01,03acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe))` represents a P2SH *2-of-2* multisig.
+- `wsh(multi(2,03a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7,03774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb,03d01115d548e7561b15c38f004d734633687cf4419620095bc5b0f47070afe85a))` represents a P2WSH *2-of-3* multisig.
+- `sh(wsh(multi(1,03f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8,03499fdf9e895e719cfd64e67f07d38e3226aa7b63678949e6e49b241a60e823e4,02d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e)))` represents a P2SH-P2WSH *1-of-3* multisig.
+- `pk(xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8)` refers to a single P2PK output, using the public key part from the specified xpub.
+- `pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1'/2)` refers to a single P2PKH output, using child key *1'/2* of the specified xpub.
+- `wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/0/*))` refers to a chain of *1-of-2* P2WSH multisig outputs, using public keys taken from two HD chains with corresponding derivation paths.
+
+## Reference
+
+Descriptors consist of several types of expressions. The top level expression is always a `SCRIPT`.
+
+`SCRIPT` expressions:
+- `sh(SCRIPT)` (top level only): P2SH embed the argument.
+- `wsh(SCRIPT)` (not inside another 'wsh'): P2WSH embed the argument.
+- `pk(KEY)` (anywhere): P2PK output for the given public key.
+- `pkh(KEY)` (anywhere): P2PKH output for the given public key (use `addr` if you only know the pubkey hash).
+- `wpkh(KEY)` (not inside `wsh`): P2WPKH output for the given compressed pubkey.
+- `combo(KEY)` (top level only): an alias for the collection of `pk(KEY)` and `pkh(KEY)`. If the key is compressed, it also includes `wpkh(KEY)` and `sh(wpkh(KEY))`.
+- `multi(k,KEY_1,KEY_2,...,KEY_n)` (anywhere): k-of-n multisig script.
+- `addr(ADDR)` (top level only): the script which ADDR expands to.
+- `raw(HEX)` (top level only): the script whose hex encoding is HEX.
+
+`KEY` expressions:
+- Hex encoded public keys (66 characters starting with `02` or `03`, or 130 characters starting with `04`).
+ - Inside `wpkh` and `wsh`, only compressed public keys are permitted.
+- [WIF](https://en.bitcoin.it/wiki/Wallet_import_format) encoded private keys may be specified instead of the corresponding public key, with the same meaning.
+-`xpub` encoded extended public key or `xprv` encoded private key (as defined in [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)).
+ - Followed by zero or more `/NUM` unhardened and `/NUM'` hardened BIP32 derivation steps.
+ - Optionally followed by a single `/*` or `/*'` final step to denote all (direct) unhardened or hardened children.
+ - The usage of hardened derivation steps requires providing the private key.
+ - Instead of a `'`, the suffix `h` can be used to denote hardened derivation.
+
+`ADDR` expressions are any type of supported address:
+- P2PKH addresses (base58, of the form `1...`). Note that P2PKH addresses in descriptors cannot be used for P2PK outputs (use the `pk` function instead).
+- P2SH addresses (base58, of the form `3...`, defined in [BIP 13](https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki)).
+- Segwit addresses (bech32, of the form `bc1...`, defined in [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)).
+
+## Explanation
+
+### Single-key scripts
+
+Many single-key constructions are used in practice, generally including
+P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH. Many more combinations are
+imaginable, though they may not be optimal: P2SH-P2PK, P2SH-P2PKH,
+P2WSH-P2PK, P2WSH-P2PKH, P2SH-P2WSH-P2PK, P2SH-P2WSH-P2PKH.
+
+To describe these, we model these as functions. The functions `pk`
+(P2PK), `pkh` (P2PKH) and `wpkh` (P2WPKH) take as input a public key in
+hexadecimal notation (which will be extended later), and return the
+corresponding *scriptPubKey*. The functions `sh` (P2SH) and `wsh` (P2WSH)
+take as input a script, and return the script describing P2SH and P2WSH
+outputs with the input as embedded script. The names of the functions do
+not contain "p2" for brevity.
+
+### Multisig
+
+Several pieces of software use multi-signature (multisig) scripts based
+on Bitcoin's OP_CHECKMULTISIG opcode. To support these, we introduce the
+`multi(k,key_1,key_2,...,key_n)` function. It represents a *k-of-n*
+multisig policy, where any *k* out of the *n* provided public keys must
+sign.
+
+### BIP32 derived keys and chains
+
+Most modern wallet software and hardware uses keys that are derived using
+BIP32 ("HD keys"). We support these directly by permitting strings
+consisting of an extended public key (commonly referred to as an *xpub*)
+plus derivation path anywhere a public key is expected. The derivation
+path consists of a sequence of 0 or more integers (in the range
+*0..231-1*) each optionally followed by `'` or `h`, and
+separated by `/` characters. The string may optionally end with the
+literal `/*` or `/*'` (or `/*h`) to refer to all unhardened or hardened
+child keys instead.
+
+Whenever a public key is described using a hardened derivation step, the
+script cannot be computed without access to the corresponding private
+key.
+
+### Including private keys
+
+Often it is useful to communicate a description of scripts along with the
+necessary private keys. For this reason, anywhere a public key or xpub is
+supported, a private key in WIF format or xprv may be provided instead.
+This is useful when private keys are necessary for hardened derivation
+steps, or for dumping wallet descriptors including private key material.
+
+### Compatibility with old wallets
+
+In order to easily represent the sets of scripts currently supported by
+existing Bitcoin Core wallets, a convenience function `combo` is
+provided, which takes as input a public key, and constructs the P2PK,
+P2PKH, P2WPKH, and P2SH-P2WPH scripts for that key. In case the key is
+uncompressed, it only constructs P2PK and P2PKH.
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 9a5991e42..1d68d1f91 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -5,8 +5,10 @@ Developer Notes
**Table of Contents**
- [Developer Notes](#developer-notes)
- - [Coding Style](#coding-style)
+ - [Coding Style (General)](#coding-style-general)
+ - [Coding Style (C++)](#coding-style-c)
- [Doxygen comments](#doxygen-comments)
+ - [Coding Style (Python)](#coding-style-python)
- [Development tips and tricks](#development-tips-and-tricks)
- [Compiling for debugging](#compiling-for-debugging)
- [Compiling for gprof profiling](#compiling-for-gprof-profiling)
@@ -35,8 +37,8 @@ Developer Notes
-Coding Style
----------------
+Coding Style (General)
+----------------------
Various coding styles have been used during the history of the codebase,
and the result is not very consistent. However, we're now trying to converge to
@@ -46,6 +48,9 @@ commits.
Do not submit patches solely to modify the style of existing code.
+Coding Style (C++)
+------------------
+
- **Indentation and whitespace rules** as specified in
[src/.clang-format](/src/.clang-format). You can use the provided
[clang-format-diff script](/contrib/devtools/README.md#clang-format-diffpy)
@@ -174,6 +179,11 @@ but if possible use one of the above styles.
Documentation can be generated with `make docs` and cleaned up with `make clean-docs`.
+Coding Style (Python)
+---------------------
+
+Refer to [/test/functional/README.md#style-guidelines](/test/functional/README.md#style-guidelines).
+
Development tips and tricks
---------------------------
@@ -247,7 +257,7 @@ make cov
**Sanitizers**
-Bitcoin can be compiled with various "sanitizers" enabled, which add
+Bitcoin Core can be compiled with various "sanitizers" enabled, which add
instrumentation for issues regarding things like memory safety, thread race
conditions, or undefined behavior. This is controlled with the
`--with-sanitizers` configure flag, which should be a comma separated list of
@@ -429,6 +439,11 @@ General C++
- *Rationale*: This avoids memory and resource leaks, and ensures exception safety
+- Use `MakeUnique()` to construct objects owned by `unique_ptr`s
+
+ - *Rationale*: `MakeUnique` is concise and ensures exception safety in complex expressions.
+ `MakeUnique` is a temporary project local implementation of `std::make_unique` (C++14).
+
C++ data structures
--------------------
@@ -499,7 +514,35 @@ Strings and formatting
- Use `ParseInt32`, `ParseInt64`, `ParseUInt32`, `ParseUInt64`, `ParseDouble` from `utilstrencodings.h` for number parsing
- - *Rationale*: These functions do overflow checking, and avoid pesky locale issues
+ - *Rationale*: These functions do overflow checking, and avoid pesky locale issues.
+
+- Avoid using locale dependent functions if possible. You can use the provided
+ [`lint-locale-dependence.sh`](/test/lint/lint-locale-dependence.sh)
+ to check for accidental use of locale dependent functions.
+
+ - *Rationale*: Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix.
+
+ - These functions are known to be locale dependent:
+ `alphasort`, `asctime`, `asprintf`, `atof`, `atoi`, `atol`, `atoll`, `atoq`,
+ `btowc`, `ctime`, `dprintf`, `fgetwc`, `fgetws`, `fprintf`, `fputwc`,
+ `fputws`, `fscanf`, `fwprintf`, `getdate`, `getwc`, `getwchar`, `isalnum`,
+ `isalpha`, `isblank`, `iscntrl`, `isdigit`, `isgraph`, `islower`, `isprint`,
+ `ispunct`, `isspace`, `isupper`, `iswalnum`, `iswalpha`, `iswblank`,
+ `iswcntrl`, `iswctype`, `iswdigit`, `iswgraph`, `iswlower`, `iswprint`,
+ `iswpunct`, `iswspace`, `iswupper`, `iswxdigit`, `isxdigit`, `mblen`,
+ `mbrlen`, `mbrtowc`, `mbsinit`, `mbsnrtowcs`, `mbsrtowcs`, `mbstowcs`,
+ `mbtowc`, `mktime`, `putwc`, `putwchar`, `scanf`, `snprintf`, `sprintf`,
+ `sscanf`, `stoi`, `stol`, `stoll`, `strcasecmp`, `strcasestr`, `strcoll`,
+ `strfmon`, `strftime`, `strncasecmp`, `strptime`, `strtod`, `strtof`,
+ `strtoimax`, `strtol`, `strtold`, `strtoll`, `strtoq`, `strtoul`,
+ `strtoull`, `strtoumax`, `strtouq`, `strxfrm`, `swprintf`, `tolower`,
+ `toupper`, `towctrans`, `towlower`, `towupper`, `ungetwc`, `vasprintf`,
+ `vdprintf`, `versionsort`, `vfprintf`, `vfscanf`, `vfwprintf`, `vprintf`,
+ `vscanf`, `vsnprintf`, `vsprintf`, `vsscanf`, `vswprintf`, `vwprintf`,
+ `wcrtomb`, `wcscasecmp`, `wcscoll`, `wcsftime`, `wcsncasecmp`, `wcsnrtombs`,
+ `wcsrtombs`, `wcstod`, `wcstof`, `wcstoimax`, `wcstol`, `wcstold`,
+ `wcstoll`, `wcstombs`, `wcstoul`, `wcstoull`, `wcstoumax`, `wcswidth`,
+ `wcsxfrm`, `wctob`, `wctomb`, `wctrans`, `wctype`, `wcwidth`, `wprintf`
- For `strprintf`, `LogPrint`, `LogPrintf` formatting characters don't need size specifiers
@@ -567,6 +610,12 @@ Source code organization
- *Rationale*: Shorter and simpler header files are easier to read, and reduce compile time
+- Use only the lowercase alphanumerics (`a-z0-9`), underscore (`_`) and hyphen (`-`) in source code filenames.
+
+ - *Rationale*: `grep`:ing and auto-completing filenames is easier when using a consistent
+ naming pattern. Potential problems when building on case-insensitive filesystems are
+ avoided when using only lowercase characters in source code filenames.
+
- Every `.cpp` and `.h` file should `#include` every header file it directly uses classes, functions or other
definitions from, even if those headers are already included indirectly through other headers.
@@ -594,8 +643,8 @@ namespace {
- *Rationale*: Avoids confusion about the namespace context
-- Prefer `#include ` bracket syntax instead of
- `#include "primitives/transactions.h"` quote syntax when possible.
+- Use `#include ` bracket syntax instead of
+ `#include "primitives/transactions.h"` quote syntax.
- *Rationale*: Bracket syntax is less ambiguous because the preprocessor
searches a fixed list of include directories without taking location of the
@@ -656,10 +705,10 @@ Current subtrees include:
- Upstream at https://github.com/google/leveldb ; Maintained by Google, but
open important PRs to Core to avoid delay.
- **Note**: Follow the instructions in [Upgrading LevelDB](#upgrading-leveldb) when
- merging upstream changes to the leveldb subtree.
+ merging upstream changes to the LevelDB subtree.
- src/libsecp256k1
- - Upstream at https://github.com/bitcoin-core/secp256k1/ ; actively maintaned by Core contributors.
+ - Upstream at https://github.com/bitcoin-core/secp256k1/ ; actively maintained by Core contributors.
- src/crypto/ctaes
- Upstream at https://github.com/bitcoin-core/ctaes ; actively maintained by Core contributors.
diff --git a/doc/init.md b/doc/init.md
index ffd13ae1f..5778b09d0 100644
--- a/doc/init.md
+++ b/doc/init.md
@@ -15,14 +15,14 @@ Service User
All three Linux startup configurations assume the existence of a "bitcoin" user
and group. They must be created before attempting to use these scripts.
-The OS X configuration assumes bitcoind will be set up for the current user.
+The macOS configuration assumes bitcoind will be set up for the current user.
Configuration
---------------------------------
At a bare minimum, bitcoind requires that the rpcpassword setting be set
when running as a daemon. If the configuration file does not exist or this
-setting is not set, bitcoind will shutdown promptly after startup.
+setting is not set, bitcoind will shut down promptly after startup.
This password does not have to be remembered or typed as it is mostly used
as a fixed token that bitcoind and client programs read from the configuration
@@ -44,7 +44,7 @@ This allows for running bitcoind without having to do any manual configuration.
relative to the data directory. `wallet` *only* supports relative paths.
For an example configuration file that describes the configuration settings,
-see `contrib/debian/examples/bitcoin.conf`.
+see `share/examples/bitcoin.conf`.
Paths
---------------------------------
@@ -65,7 +65,7 @@ reasons to make the configuration file and data directory only readable by the
bitcoin user and group. Access to bitcoin-cli and other bitcoind rpc clients
can then be controlled by group membership.
-### Mac OS X
+### macOS
Binary: `/usr/local/bin/bitcoind`
Configuration file: `~/Library/Application Support/Bitcoin/bitcoin.conf`
@@ -111,7 +111,7 @@ Using this script, you can adjust the path and flags to the bitcoind program by
setting the BITCOIND and FLAGS environment variables in the file
/etc/sysconfig/bitcoind. You can also use the DAEMONOPTS environment variable here.
-### Mac OS X
+### macOS
Copy org.bitcoin.bitcoind.plist into ~/Library/LaunchAgents. Load the launch agent by
running `launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist`.
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 08ff4d6ac..9b36319e6 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -8,6 +8,10 @@ if ENABLE_QT
dist_man1_MANS+=bitcoin-qt.1
endif
-if BUILD_BITCOIN_UTILS
- dist_man1_MANS+=bitcoin-cli.1 bitcoin-tx.1
+if BUILD_BITCOIN_CLI
+ dist_man1_MANS+=bitcoin-cli.1
+endif
+
+if BUILD_BITCOIN_TX
+ dist_man1_MANS+=bitcoin-tx.1
endif
diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1
index 0f3000f4c..bf24d929b 100644
--- a/doc/man/bitcoin-cli.1
+++ b/doc/man/bitcoin-cli.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH BITCOIN-CLI "1" "January 2018" "bitcoin-cli v0.16.99.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
+.TH BITCOIN-CLI "1" "July 2018" "bitcoin-cli v0.16.99.0" "User Commands"
.SH NAME
bitcoin-cli \- manual page for bitcoin-cli v0.16.99.0
.SH DESCRIPTION
@@ -20,7 +20,8 @@ This help message
.HP
\fB\-conf=\fR
.IP
-Specify configuration file (default: bitcoin.conf)
+Specify configuration file. Relative paths will be prefixed by datadir
+location. (default: bitcoin.conf)
.HP
\fB\-datadir=\fR
.IP
@@ -33,47 +34,52 @@ server\-side RPC calls, the results of \fB\-getinfo\fR is the result of
multiple non\-atomic requests. Some entries in the result may
represent results from different states (e.g. wallet balance may
be as of a different block from the chain state reported)
-.PP
-Chain selection options:
-.HP
-\fB\-testnet\fR
-.IP
-Use the test chain
-.HP
-\fB\-regtest\fR
-.IP
-Enter regression test mode, which uses a special chain in which blocks
-can be solved instantly. This is intended for regression testing
-tools and app development.
.HP
\fB\-named\fR
.IP
Pass named instead of positional arguments (default: false)
.HP
+\fB\-rpcclienttimeout=\fR
+.IP
+Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
+900)
+.HP
\fB\-rpcconnect=\fR
.IP
Send commands to node running on (default: 127.0.0.1)
.HP
-\fB\-rpcport=\fR
+\fB\-rpccookiefile=\fR
.IP
-Connect to JSON\-RPC on (default: 7932 or testnet: 17932)
+Location of the auth cookie. Relative paths will be prefixed by a
+net\-specific datadir location. (default: data dir)
.HP
-\fB\-rpcwait\fR
+\fB\-rpcpassword=\fR
.IP
-Wait for RPC server to start
+Password for JSON\-RPC connections
+.HP
+\fB\-rpcport=\fR
+.IP
+Connect to JSON\-RPC on (default: 8332 or testnet: 18332)
.HP
\fB\-rpcuser=\fR
.IP
Username for JSON\-RPC connections
.HP
-\fB\-rpcpassword=\fR
+\fB\-rpcwait\fR
.IP
-Password for JSON\-RPC connections
+Wait for RPC server to start
.HP
-\fB\-rpcclienttimeout=\fR
+\fB\-rpcwallet=\fR
.IP
-Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
-900)
+Send RPC for non\-default wallet on RPC server (needs to exactly match
+corresponding \fB\-wallet\fR option passed to bitcoind)
+.HP
+\fB\-stdin\fR
+.IP
+Read extra arguments from standard input, one per line until EOF/Ctrl\-D
+(recommended for sensitive information such as passphrases).
+When combined with \fB\-stdinrpcpass\fR, the first line from standard
+input is used for the RPC password.
.HP
\fB\-stdinrpcpass\fR
.TP
@@ -83,18 +89,15 @@ When combined
with \fB\-stdin\fR, the first line from standard input is used for the
RPC password.
.HP
-\fB\-stdin\fR
+\fB\-version\fR
.IP
-Read extra arguments from standard input, one per line until EOF/Ctrl\-D
-(recommended for sensitive information such as passphrases).
-When combined with \fB\-stdinrpcpass\fR, the first line from standard
-input is used for the RPC password.
+Print version and exit
+.PP
+Chain selection options:
.HP
-\fB\-rpcwallet=\fR
+\fB\-testnet\fR
.IP
-Send RPC for non\-default wallet on RPC server (argument is wallet
-filename in bitcoind directory, required if bitcoind/\-Qt runs
-with multiple wallets)
+Use the test chain
.SH COPYRIGHT
Copyright (C) 2009-2018 The Bitcoin Core developers
diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1
index ae429653c..f518f91ad 100644
--- a/doc/man/bitcoin-qt.1
+++ b/doc/man/bitcoin-qt.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH BITCOIN-QT "1" "January 2018" "bitcoin-qt v0.16.99.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
+.TH BITCOIN-QT "1" "July 2018" "bitcoin-qt v0.16.99.0" "User Commands"
.SH NAME
bitcoin-qt \- manual page for bitcoin-qt v0.16.99.0
.SH DESCRIPTION
@@ -13,20 +13,11 @@ bitcoin\-qt [command\-line options]
.IP
Print this help message and exit
.HP
-\fB\-version\fR
-.IP
-Print version and exit
-.HP
\fB\-alertnotify=\fR
.IP
Execute command when a relevant alert is received or we see a really
long fork (%s in cmd is replaced by message)
.HP
-\fB\-blocknotify=\fR
-.IP
-Execute command when the best block changes (%s in cmd is replaced by
-block hash)
-.HP
\fB\-assumevalid=\fR
.IP
If this block is in the chain assume that it and its ancestors are valid
@@ -36,9 +27,28 @@ default:
testnet:
0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1)
.HP
+\fB\-blocknotify=\fR
+.IP
+Execute command when the best block changes (%s in cmd is replaced by
+block hash)
+.HP
+\fB\-blockreconstructionextratxn=\fR
+.IP
+Extra transactions to keep in memory for compact block reconstructions
+(default: 100)
+.HP
+\fB\-blocksdir=\fR
+.IP
+Specify blocks directory (default: /blocks)
+.HP
\fB\-conf=\fR
.IP
-Specify configuration file (default: bitcoin.conf)
+Specify configuration file. Relative paths will be prefixed by datadir
+location. (default: bitcoin.conf)
+.HP
+\fB\-daemon\fR
+.IP
+Run in the background as a daemon and accept commands
.HP
\fB\-datadir=\fR
.IP
@@ -48,45 +58,46 @@ Specify data directory
.IP
Set database cache size in megabytes (4 to 16384, default: 450)
.HP
-\fB\-loadblock=\fR
+\fB\-debuglogfile=\fR
.IP
-Imports blocks from external blk000??.dat file on startup
+Specify location of debug log file. Relative paths will be prefixed by a
+net\-specific datadir location. (0 to disable; default: debug.log)
.HP
-\fB\-debuglogfile=\fR
+\fB\-includeconf=\fR
.IP
-Specify location of debug log file: this can be an absolute path or a
-path relative to the data directory (default: debug.log)
+Specify additional configuration file, relative to the \fB\-datadir\fR path
+(only useable from configuration file, not command line)
.HP
-\fB\-maxorphantx=\fR
+\fB\-loadblock=\fR
.IP
-Keep at most unconnectable transactions in memory (default: 100)
+Imports blocks from external blk000??.dat file on startup
.HP
\fB\-maxmempool=\fR
.IP
Keep the transaction memory pool below megabytes (default: 300)
.HP
+\fB\-maxorphantx=\fR
+.IP
+Keep at most unconnectable transactions in memory (default: 100)
+.HP
\fB\-mempoolexpiry=\fR
.IP
Do not keep transactions in the mempool longer than hours (default:
336)
.HP
-\fB\-persistmempool\fR
-.IP
-Whether to save the mempool on shutdown and load on restart (default: 1)
-.HP
-\fB\-blockreconstructionextratxn=\fR
-.IP
-Extra transactions to keep in memory for compact block reconstructions
-(default: 100)
-.HP
\fB\-par=\fR
.IP
-Set the number of script verification threads (\fB\-6\fR to 16, 0 = auto, <0 =
+Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
+\fB\-persistmempool\fR
+.IP
+Whether to save the mempool on shutdown and load on restart (default: 1)
+.HP
\fB\-pid=\fR
.IP
-Specify pid file (default: bitcoind.pid)
+Specify pid file. Relative paths will be prefixed by a net\-specific
+datadir location. (default: bitcoind.pid)
.HP
\fB\-prune=\fR
.IP
@@ -100,14 +111,14 @@ setting requires re\-downloading the entire blockchain. (default:
>550 = automatically prune block files to stay under the
specified target size in MiB)
.HP
-\fB\-reindex\-chainstate\fR
-.IP
-Rebuild chain state from the currently indexed blocks
-.HP
\fB\-reindex\fR
.IP
Rebuild chain state and block index from the blk*.dat files on disk
.HP
+\fB\-reindex\-chainstate\fR
+.IP
+Rebuild chain state from the currently indexed blocks
+.HP
\fB\-sysperms\fR
.IP
Create new files with system default permissions, instead of umask 077
@@ -117,13 +128,18 @@ Create new files with system default permissions, instead of umask 077
.IP
Maintain a full transaction index, used by the getrawtransaction rpc
call (default: 0)
+.HP
+\fB\-version\fR
+.IP
+Print version and exit
.PP
Connection options:
.HP
\fB\-addnode=\fR
.IP
Add a node to connect to and attempt to keep the connection open (see
-the `addnode` RPC command help for more info)
+the `addnode` RPC command help for more info). This option can be
+specified multiple times to add multiple nodes.
.HP
\fB\-banscore=\fR
.IP
@@ -141,9 +157,10 @@ for IPv6
.HP
\fB\-connect=\fR
.IP
-Connect only to the specified node(s); \fB\-connect\fR=\fI\,0\/\fR disables automatic
+Connect only to the specified node; \fB\-connect\fR=\fI\,0\/\fR disables automatic
connections (the rules for this peer are the same as for
-\fB\-addnode\fR)
+\fB\-addnode\fR). This option can be specified multiple times to connect
+to multiple nodes.
.HP
\fB\-discover\fR
.IP
@@ -159,6 +176,10 @@ Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (def
Query for peer addresses via DNS lookup, if low on addresses (default: 1
unless \fB\-connect\fR used)
.HP
+\fB\-enablebip61\fR
+.IP
+Send reject messages per BIP61 (default: 1)
+.HP
\fB\-externalip=\fR
.IP
Specify your own public address
@@ -193,6 +214,11 @@ Maximum allowed median peer time offset adjustment. Local perspective of
time may be influenced by peers forward or backward by this
amount. (default: 4200 seconds)
.HP
+\fB\-maxuploadtarget=\fR
+.IP
+Tries to keep outbound traffic under the given target (in MiB per 24h),
+0 = no limit (default: 0)
+.HP
\fB\-onion=\fR
.IP
Use separate SOCKS5 proxy to reach peers via Tor hidden services
@@ -200,17 +226,20 @@ Use separate SOCKS5 proxy to reach peers via Tor hidden services
.HP
\fB\-onlynet=\fR
.IP
-Only connect to nodes in network (ipv4, ipv6 or onion)
-.HP
-\fB\-permitbaremultisig\fR
-.IP
-Relay non\-P2SH multisig (default: 1)
+Make outgoing connections only through network (ipv4, ipv6 or
+onion). Incoming connections are not affected by this option.
+This option can be specified multiple times to allow multiple
+networks.
.HP
\fB\-peerbloomfilters\fR
.IP
Support filtering of blocks and transaction with bloom filters (default:
1)
.HP
+\fB\-permitbaremultisig\fR
+.IP
+Relay non\-P2SH multisig (default: 1)
+.HP
\fB\-port=\fR
.IP
Listen for connections on (default: 7933 or testnet: 17933)
@@ -226,7 +255,9 @@ stream isolation (default: 1)
.HP
\fB\-seednode=\fR
.IP
-Connect to a node to retrieve peer addresses, and disconnect
+Connect to a node to retrieve peer addresses, and disconnect. This
+option can be specified multiple times to connect to multiple
+nodes.
.HP
\fB\-timeout=\fR
.IP
@@ -257,11 +288,6 @@ CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple
times. Whitelisted peers cannot be DoS banned and their
transactions are always relayed, even if they are already in the
mempool, useful e.g. for a gateway
-.HP
-\fB\-maxuploadtarget=\fR
-.IP
-Tries to keep outbound traffic under the given target (in MiB per 24h),
-0 = no limit (default: 0)
.PP
Wallet options:
.HP
@@ -270,6 +296,14 @@ Wallet options:
What type of addresses to use ("legacy", "p2sh\-segwit", or "bech32",
default: "p2sh\-segwit")
.HP
+\fB\-avoidpartialspends\fR
+.IP
+Group outputs by address, selecting all or none, instead of selecting on
+a per\-output basis. Privacy is improved as an address is only
+used once (unless someone sends to it after spending from it),
+but may result in slightly higher fees as suboptimal coin
+selection may result due to the added limitation (default: 0)
+.HP
\fB\-changetype\fR
.IP
What type of change to use ("legacy", "p2sh\-segwit", or "bech32").
@@ -281,22 +315,22 @@ sending to a native segwit address)
.IP
Do not load the wallet and disable wallet RPC calls
.HP
-\fB\-keypool=\fR
+\fB\-discardfee=\fR
.IP
-Set key pool size to (default: 1000)
+The fee rate (in BTC/kB) that indicates your tolerance for discarding
+change by adding it to the fee (default: 0.0001). Note: An output
+is discarded if it is dust at this rate, but we will always
+discard up to the dust relay fee and a discard fee above that is
+limited by the fee estimate for the longest target
.HP
\fB\-fallbackfee=\fR
.IP
A fee rate (in BTC/kB) that will be used when fee estimation has
insufficient data (default: 0.0002)
.HP
-\fB\-discardfee=\fR
+\fB\-keypool=\fR
.IP
-The fee rate (in BTC/kB) that indicates your tolerance for discarding
-change by adding it to the fee (default: 0.0001). Note: An output
-is discarded if it is dust at this rate, but we will always
-discard up to the dust relay fee and a discard fee above that is
-limited by the fee estimate for the longest target
+Set key pool size to (default: 1000)
.HP
\fB\-mintxfee=\fR
.IP
@@ -324,17 +358,18 @@ Spend unconfirmed change when sending transactions (default: 1)
If paytxfee is not set, include enough fee so transactions begin
confirmation on average within n blocks (default: 6)
.HP
-\fB\-walletrbf\fR
-.IP
-Send transactions with full\-RBF opt\-in enabled (RPC only, default: 0)
-.HP
\fB\-upgradewallet\fR
.IP
Upgrade wallet to latest format on startup
.HP
-\fB\-wallet=\fR
+\fB\-wallet=\fR
.IP
-Specify wallet file (within data directory) (default: wallet.dat)
+Specify wallet database path. Can be specified multiple times to load
+multiple wallets. Path is interpreted relative to if
+it is not absolute, and will be created if it does not exist (as
+a directory containing a wallet.dat file and log files). For
+backwards compatibility this will also accept names of existing
+data files in .)
.HP
\fB\-walletbroadcast\fR
.IP
@@ -350,6 +385,10 @@ exists, otherwise )
Execute command when a wallet transaction changes (%s in cmd is replaced
by TxID)
.HP
+\fB\-walletrbf\fR
+.IP
+Send transactions with full\-RBF opt\-in enabled (RPC only, default: 0)
+.HP
\fB\-zapwallettxes=\fR
.IP
Delete all wallet transactions and only recover those parts of the
@@ -377,10 +416,6 @@ Enable publish raw transaction in
.PP
Debugging/Testing options:
.HP
-\fB\-uacomment=\fR
-.IP
-Append comment to the user agent string
-.HP
\fB\-debug=\fR
.IP
Output debugging information (default: 0, supplying is
@@ -416,11 +451,16 @@ transaction; setting this too low may abort large transactions
.HP
\fB\-printtoconsole\fR
.IP
-Send trace/debug info to console instead of debug.log file
+Send trace/debug info to console (default: 1 when no \fB\-daemon\fR. To disable
+logging to file, set debuglogfile=0)
.HP
\fB\-shrinkdebugfile\fR
.IP
Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
+.HP
+\fB\-uacomment=\fR
+.IP
+Append comment to the user agent string
.PP
Chain selection options:
.HP
@@ -453,15 +493,15 @@ Enable transaction replacement in the memory pool (default: 1)
Fees (in BTC/kB) smaller than this are considered zero fee for relaying,
mining and transaction creation (default: 0.00001)
.HP
-\fB\-whitelistrelay\fR
-.IP
-Accept relayed transactions received from whitelisted peers even when
-not relaying transactions (default: 1)
-.HP
\fB\-whitelistforcerelay\fR
.IP
Force relay of transactions from whitelisted peers even if they violate
local relay policy (default: 1)
+.HP
+\fB\-whitelistrelay\fR
+.IP
+Accept relayed transactions received from whitelisted peers even when
+not relaying transactions (default: 1)
.PP
Block creation options:
.HP
@@ -469,11 +509,6 @@ Block creation options:
.IP
Set maximum BIP141 block weight (default: 3996000)
.HP
-\fB\-blockmaxsize=\fR
-.IP
-Set maximum BIP141 block weight to this * 4. Deprecated, use
-blockmaxweight
-.HP
\fB\-blockmintxfee=\fR
.IP
Set lowest fee rate (in BTC/kB) for transactions to be included in block
@@ -481,14 +516,26 @@ creation. (default: 0.00001)
.PP
RPC server options:
.HP
-\fB\-server\fR
-.IP
-Accept command line and JSON\-RPC commands
-.HP
\fB\-rest\fR
.IP
Accept public REST requests (default: 0)
.HP
+\fB\-rpcallowip=\fR
+.IP
+Allow JSON\-RPC connections from specified source. Valid for are a
+single IP (e.g. 1.2.3.4), a network/netmask (e.g.
+1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This
+option can be specified multiple times
+.HP
+\fB\-rpcauth=\fR
+.IP
+Username and hashed password for JSON\-RPC connections. The field
+ comes in the format: :$. A
+canonical python script is included in share/rpcauth. The client
+then connects normally using the
+rpcuser=/rpcpassword= pair of arguments. This
+option can be specified multiple times
+.HP
\fB\-rpcbind=\fR[:port]
.IP
Bind to given address to listen for JSON\-RPC connections. This option is
@@ -500,37 +547,18 @@ option can be specified multiple times (default: 127.0.0.1 and
.HP
\fB\-rpccookiefile=\fR
.IP
-Location of the auth cookie (default: data dir)
-.HP
-\fB\-rpcuser=\fR
-.IP
-Username for JSON\-RPC connections
+Location of the auth cookie. Relative paths will be prefixed by a
+net\-specific datadir location. (default: data dir)
.HP
\fB\-rpcpassword=\fR
.IP
Password for JSON\-RPC connections
.HP
-\fB\-rpcauth=\fR
-.IP
-Username and hashed password for JSON\-RPC connections. The field
- comes in the format: :$. A
-canonical python script is included in share/rpcuser. The client
-then connects normally using the
-rpcuser=/rpcpassword= pair of arguments. This
-option can be specified multiple times
-.HP
\fB\-rpcport=\fR
.IP
Listen for JSON\-RPC connections on (default: 7932 or testnet:
17932)
.HP
-\fB\-rpcallowip=\fR
-.IP
-Allow JSON\-RPC connections from specified source. Valid for are a
-single IP (e.g. 1.2.3.4), a network/netmask (e.g.
-1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This
-option can be specified multiple times
-.HP
\fB\-rpcserialversion\fR
.IP
Sets the serialization of raw transaction or block hex returned in
@@ -539,6 +567,14 @@ non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1)
\fB\-rpcthreads=\fR
.IP
Set the number of threads to service RPC calls (default: 4)
+.HP
+\fB\-rpcuser=\fR