diff --git a/.gitignore b/.gitignore
index 55f5c799a..f595388db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -138,6 +138,7 @@ qa/pull-tester/run-bitcoind-for-test.sh
qa/pull-tester/tests-config.sh
qa/pull-tester/cache/*
qa/pull-tester/test.*/*
+cache/*
!src/leveldb*/Makefile
diff --git a/.python-version b/.python-version
new file mode 100644
index 000000000..c49282585
--- /dev/null
+++ b/.python-version
@@ -0,0 +1 @@
+3.5.6
diff --git a/.travis.yml b/.travis.yml
index 4f2f05075..36ff52a90 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,23 +1,45 @@
-sudo: required
-dist: trusty
-
-#workaround for https://github.com/travis-ci/travis-ci/issues/5227
-addons:
- hostname: vitae-tester
+# The test build matrix (stage: test) is constructed to test a wide range of
+# configurations, rather than a single pass/fail. This helps to catch build
+# failures and logic errors that present on platforms other than the ones the
+# author has tested.
+#
+# Some builders use the dependency-generator in `./depends`, rather than using
+# apt-get to install build dependencies. This guarantees that the tester is
+# using the same versions as Gitian, so the build results are nearly identical
+# to what would be found in a final release.
+#
+# In order to avoid rebuilding all dependencies for each build, the binaries
+# are cached and re-used when possible. Changes in the dependency-generator
+# will trigger cache-invalidation and rebuilds as necessary.
+#
+# These caches can be manually removed if necessary. This is one of the very
+# few manual operations that is possible with Travis, and it can be done by a
+# PIVX GitHub member via the Travis web interface [0].
+#
+# Travis CI uploads the cache after the script phase of the build [1].
+# However, the build is terminated without saving the chache if it takes over
+# 50 minutes [2]. Thus, if we spent too much time in early build stages, fail
+# with an error and save the cache.
+#
+# [0] https://travis-ci.org/pivx-project/pivx/caches
+# [1] https://docs.travis-ci.com/user/caching/#build-phases
+# [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts
+dist: xenial
os: linux
language: generic
cache:
directories:
- - depends/built
- - depends/sdk-sources
- - $HOME/.ccache
+ - $TRAVIS_BUILD_DIR/depends/built
+ - $TRAVIS_BUILD_DIR/depends/sdk-sources
+ - $HOME/.ccache
+stages:
+ - lint
+ - test
env:
global:
- MAKEJOBS=-j3
- RUN_TESTS=false
- - CHECK_DOC=0
- - CHECK_LOGPRINT=0
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
- CCACHE_SIZE=100M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
@@ -26,23 +48,8 @@ env:
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
- PYTHON_DEBUG=1
- WINEDEBUG=fixme-all
- matrix:
-# ARM
- - HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" CHECK_DOC=1 CHECK_LOGPRINT=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 wine1.6 bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
-# 32-bit + dash
- - HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc 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++" USE_SHELL="/bin/dash" PYZMQ=true
-# Win64
- - HOST=x86_64-w64-mingw32 DPKG_ADD_ARCH="i386" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine1.6 bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
-# vitaed
- - HOST=x86_64-unknown-linux-gnu PACKAGES="bc python3-zmq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER" PYZMQ=true
-
-# 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" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.11 GOAL="deploy"
-
+ - DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
+ - CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. Please manually re-run this job by using the travis restart button or asking a bitcoin maintainer to restart. The next run should not time out because the build cache has been saved."
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
install:
@@ -53,30 +60,154 @@ install:
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
before_script:
- unset CC; unset CXX
- - if [ "$CHECK_DOC" = 1 ]; then contrib/devtools/check-doc.py; fi
- - if [ "$CHECK_LOGPRINT" = 1 ]; then contrib/devtools/logprint-scanner.py; fi
- 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
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
script:
- - export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
- - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
- - 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"
- - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
- - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
- - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - make distdir PACKAGE=bitcoin VERSION=$HOST
- - cd bitcoin-$HOST
- - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
- - if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
- #- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.py --coverage; fi
+ - export CONTINUE=1
+ - if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long
+ - if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
+ - if [ $SECONDS -gt 1500 ]; then export CONTINUE=0; fi # Likely the build took very long; The tests take about 1000s, so we should abort if we have less than 50*60-1000=2000s left
+ - if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
after_script:
- - echo $TRAVIS_COMMIT_RANGE
- - echo $TRAVIS_COMMIT_LOG
-notifications:
- slack:
- secure: w22XjHoG/3xplxWzddS9Ma7i99Q/hq4FA3Q56xS+RtO2vlFgDT+eDzCppstdx96mn2/4e+/V1aiQ4E6GVEvJMeldqSUhPv9OBnKR0KJVAOwu4haNXt+0ZeQFt8lIndKB5cMVyOJkoq6peGoHNXslClM0lGuBn7g7VC2QPQYNWrJNrrGL7IiVb6fNOIKHWcC4URkzSvXAhO/WIqSSlmKxAAx0B2oEsM8LhdAbcjbp7Sm7zH87TIVGBZ7iTVuMc6B9+SfClbE8bBuRtvjTX57Q4UUZzn0zDtKdPdCte0oXdaQF4RdVim9mDodBGIpDo+avW4WL7EE+AK33fs94pwH5bu0LEandR/aeEvVpbSpQ2XsEKSe+6woizgl5i4GXFVZduJF62y/o1f+S/zC3qW9lIEEpiZc4PpX7pDy30X3p6S5nMrW7T/zNh+SjLhS1VP6XKdQtpD3WRCY4GKZYammZhk5RbOy3jTXAahIXuttWdhl/Q3Rb5VqfFJWlrG/qQXt73qOk2/DgJnABxXE6gnWO4MpHAq+kdomNR+nod4HeXI3DOk1wRuQRVoW1rSjiqQd6Db+TP56RKYgt4M4csOD0DG9G+W0AOtZkuKHTeoEtmQfkKFPZLYAQumv41cDN2UE9gKIECmvJSevj4sMCDTWtozKWqay/W4n2+cmhbzmGflY=
+ - echo $TRAVIS_COMMIT_RANGE
+ - echo $TRAVIS_COMMIT_LOG
+jobs:
+ include:
+
+ - stage: lint
+ name: 'lint'
+ env:
+ cache: false
+ language: python
+ python: '3.5' # Oldest supported version according to doc/dependencies.md
+ install:
+ - travis_retry pip3 install python3-flake8 --user
+ before_script:
+ - git fetch --unshallow
+ script:
+ - set -o errexit; source .travis/lint_06_script.sh
+
+ - stage: test
+ name: 'ARM 32-bit [GOAL: install] [no unit or functional tests]'
+ env: >-
+ HOST=arm-linux-gnueabihf
+ PACKAGES="python3 g++-arm-linux-gnueabihf"
+ 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"
+
+ - stage: test
+ name: 'ARM 64-bit [GOAL:install] [no unit or functional tests]'
+ env: >-
+ HOST=aarch64-linux-gnu
+ PACKAGES="python3 g++-aarch64-linux-gnu"
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+
+ - stage: test
+ name: 'Win32 [GOAL: deploy] [no functional tests]'
+ env: >-
+ HOST=i686-w64-mingw32
+ DPKG_ADD_ARCH="i386"
+ PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="deploy"
+ BITCOIN_CONFIG="--enable-reduce-exports"
+
+ - stage: test
+ name: 'Win64 [GOAL: deploy] [no functional tests]'
+ env: >-
+ HOST=x86_64-w64-mingw32
+ PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="deploy"
+ BITCOIN_CONFIG="--enable-reduce-exports"
+
+ - stage: test
+ name: '32-bit + dash [GOAL: install] [no gui]'
+ env: >-
+ HOST=i686-pc-linux-gnu
+ PACKAGES="g++-multilib python3-zmq"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
+ CONFIG_SHELL="/bin/dash"
+
+ - stage: test
+ name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout]'
+ 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"
+ RUN_FUNCTIONAL_TESTS=true
+ #TEST_RUNNER_EXTRA="--coverage --extended" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports"
+
+ - stage: test
+ name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ DOCKER_NAME_TAG=ubuntu:14.04
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev"
+ NO_DEPENDS=1
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no"
+
+ - stage: test
+ name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs]'
+ env: >-
+ HOST=x86_64-unknown-linux-gnu
+ DOCKER_NAME_TAG=ubuntu:16.04
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl-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 libgmp-dev"
+ NO_DEPENDS=1
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --disable-hardening --disable-asm"
+
+ - stage: test
+ name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs]'
+ 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-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev"
+ NO_DEPENDS=1
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
+
+# - stage: test
+# name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address]'
+# 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-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev"
+# NO_DEPENDS=1
+# RUN_UNIT_TESTS=false
+# RUN_FUNCTIONAL_TESTS=false
+# RUN_BENCH=true
+# 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++"
+
+# - stage: test
+# name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
+# 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"
+
+ - stage: test
+ name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'
+ env: >-
+ HOST=x86_64-apple-darwin14
+ PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
+ OSX_SDK=10.11
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="deploy"
+ BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
diff --git a/.travis/lint_04_install.sh b/.travis/lint_04_install.sh
new file mode 100755
index 000000000..9a22773e5
--- /dev/null
+++ b/.travis/lint_04_install.sh
@@ -0,0 +1,15 @@
+#!/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==3.5.0
+travis_retry pip install vulture==0.29
+
+SHELLCHECK_VERSION=v0.6.0
+curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
+export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
diff --git a/.travis/test_03_before_install.sh b/.travis/test_03_before_install.sh
new file mode 100755
index 000000000..3c9fcf3f9
--- /dev/null
+++ b/.travis/test_03_before_install.sh
@@ -0,0 +1,27 @@
+#!/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")
+# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers.
+PATH=$PATH:/usr/lib/llvm-6.0/bin/
+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..ce6248a4f
--- /dev/null
+++ b/.travis/test_04_install.sh
@@ -0,0 +1,28 @@
+#!/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 '^(BITCOIN_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
+if [[ $HOST = *-mingw32 ]]; then
+ DOCKER_ADMIN="--cap-add SYS_ADMIN"
+elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
+ DOCKER_ADMIN="--cap-add SYS_PTRACE"
+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_06_script_a.sh b/.travis/test_06_script_a.sh
new file mode 100755
index 000000000..bba5b0c91
--- /dev/null
+++ b/.travis/test_06_script_a.sh
@@ -0,0 +1,50 @@
+#!/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 "pivx-$HOST" || (echo "could not enter distdir pivx-$HOST"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+END_FOLD
+
+set -o errtrace
+trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
+
+BEGIN_FOLD build
+DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
+END_FOLD
+
+cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)
diff --git a/.travis/test_06_script_b.sh b/.travis/test_06_script_b.sh
new file mode 100755
index 000000000..6c01f9fdb
--- /dev/null
+++ b/.travis/test_06_script_b.sh
@@ -0,0 +1,23 @@
+#!/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
+
+cd "build/pivx-$HOST" || (echo "could not enter distdir build/pivx-$HOST"; exit 1)
+
+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_FUNCTIONAL_TESTS" = "true" ]; then
+ BEGIN_FOLD functional-tests
+ DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 ${TEST_RUNNER_EXTRA}
+ END_FOLD
+fi
+
+cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..f3c37596c
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,544 @@
+cmake_minimum_required(VERSION 3.10)
+project(PIVX)
+
+set(BDB_VER "4.8.30")
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/contrib/cmake")
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
+include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
+
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ message(STATUS "Compiling on macOS")
+ list(APPEND CMAKE_PREFIX_PATH /usr/local/opt/qt5)
+ list(APPEND CMAKE_PREFIX_PATH /usr/local/opt/openssl)
+ list(APPEND CMAKE_PREFIX_PATH /usr/local/Cellar/berkeley-db@4)
+ set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl/")
+ set(ENV{CPPFLAGS} "-I${OPENSSL_ROOT_DIR}/include")
+ set(ENV{LDFLAGS} "-L${OPENSSL_ROOT_DIR}/lib")
+ set(BerkeleyDB_ROOT_DIR "/usr/local/Cellar/berkeley-db@4/${BDB_VER}/")
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ file(READ "/proc/version" _SYS_VERSION)
+ string(REGEX MATCH "Microsoft" _SYSTEM_VERSION_PARSED "${_SYS_VERSION}")
+ if(${_SYSTEM_VERSION_PARSED} MATCHES "Microsoft")
+ message(STATUS "Compiling on WSL")
+ set(ENV{triple} x86_64-w64-mingw32)
+ set(ENV{target} Windows)
+ execute_process(
+ COMMAND make HOST=x86_64-w64-mingw32 -j16
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/depends
+ )
+ file(REMOVE ${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}/CMakeCXXCompiler.cmake)
+ file(REMOVE ${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}/CMakeCCompiler.cmake)
+ set(CMAKE_C_COMPILER /usr/bin/$ENV{triple}-gcc)
+ set(CMAKE_CXX_COMPILER /usr/bin/$ENV{triple}-g++)
+ set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple})
+ set(BOOST_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}/include/)
+ set(BOOST_LIBRARYDIR ${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}/lib)
+ set(Boost_USE_STATIC_RUNTIME ON)
+ set(Boost_THREADAPI "win32")
+ else()
+ message(STATUS "Compiling on Linux")
+ list(APPEND CMAKE_PREFIX_PATH /usr/lib/x86_64-linux-gnu/cmake/Qt5)
+ set(Qt5core_DIR "/usr/lib/x86_64-linux-gnu/cmake/Qt5/QtCore")
+ include_directories("/usr/include")
+ include_directories("/usr/include/x86_64-linux-gnu")
+ add_definitions("-D__BYTE_ORDER -D__LITTLE_ENDIAN")
+ endif()
+endif()
+
+# Find Dependencies
+find_package(BerkeleyDB ${BDB_VER} REQUIRED)
+if (BerkeleyDB_FOUND)
+ if(NOT ${BerkeleyDB_VERSION} MATCHES "${BDB_VER}")
+ message(WARNING "BerkeleyDB version other than ${BDB_VER} found!")
+ set(BDB_CONFIGURE_FLAGS "--with-incompatible-bdb")
+ endif()
+ include_directories( ${BerkeleyDB_INCLUDE_DIRS} )
+ link_directories( ${BerkeleyDB_ROOT_DIR}/lib )
+endif ()
+
+find_package(OpenSSL REQUIRED)
+if (OPENSSL_FOUND)
+ message(STATUS "Found OpenSSL (${OPENSSL_VERSION}): ${OPENSSL_LIBRARIES}")
+ include_directories( ${OPENSSL_INCLUDE_DIR} )
+endif()
+
+find_package(LibEvent REQUIRED)
+if (LibEvent_FOUND)
+ include_directories ( ${LibEvent_INCLUDE_DIR} )
+ link_directories ( ${LibEvent_LIBRARY_DIRS} )
+endif()
+
+find_package(GMP)
+if (GMP_FOUND)
+ include_directories ( ${GMP_INCLUDE_DIR} )
+ link_directories ( ${GMP_LIBRARY_DIRS} )
+else()
+ message(WARNING "GMP not found, falling back to OpenSSL for bignum!")
+ set(BIGNUM_CONFIGURE_FLAGS "--with-zerocoin-bignum=openssl")
+endif()
+
+find_package(ZMQ)
+if (ZMQ_Found)
+ include_directories ( ${ZMQ_INCLUDE_DIR} )
+ link_directories ( ${ZMQ_LIB_DIRS} )
+endif()
+
+find_package(Boost COMPONENTS system filesystem thread program_options REQUIRED)
+include_directories( ${Boost_INCLUDE_DIRS} )
+link_directories ( ${Boost_LIBRARY_DIRS} )
+
+# run autogen.sh if missing header files from configure on Linux/Mac
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/configure")
+else()
+ execute_process(
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/autogen.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+endif()
+
+# run configure if pivx_config.h doesn't exist
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/config/pivx-config.h")
+else()
+ execute_process(
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/configure ${BDB_CONFIGURE_FLAGS} ${BIGNUM_CONFIGURE_FLAGS}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+endif()
+add_definitions(-DHAVE_CONFIG_H)
+
+ExternalProject_Add (
+ libunivalue
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/univalue
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND make
+ BUILD_IN_SOURCE 1
+ INSTALL_COMMAND ""
+ )
+
+ExternalProject_Add (
+ libsecp256k1
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/secp256k1
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND make
+ BUILD_IN_SOURCE 1
+ INSTALL_COMMAND ""
+)
+
+link_directories(
+ ${CMAKE_SOURCE_DIR}/src/univalue/.libs
+ ${CMAKE_SOURCE_DIR}/src/secp256k1/.libs
+)
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/compat
+ ${CMAKE_SOURCE_DIR}/src/config
+ ${CMAKE_SOURCE_DIR}/src/obj
+ ${CMAKE_SOURCE_DIR}/src/leveldb
+ ${CMAKE_SOURCE_DIR}/src/leveldb/include
+ ${CMAKE_SOURCE_DIR}/src/leveldb/helpers/memenv
+ ${CMAKE_SOURCE_DIR}/src/secp256k1
+ ${CMAKE_SOURCE_DIR}/src/secp256k1/include
+ ${CMAKE_SOURCE_DIR}/src/univalue/include
+)
+
+set(libleveldb_a_headers
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/config/pivx-config.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/atomic_pointer.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_example.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_posix.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/win/stdint.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_win.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/thread_annotations.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/db.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/options.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/comparator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/filter_policy.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/slice.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/table_builder.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/env.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/c.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/iterator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/cache.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/dumpfile.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/table.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/write_batch.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/include/leveldb/status.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/log_format.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/memtable.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/version_set.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/write_batch_internal.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/filename.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/version_edit.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/dbformat.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/builder.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/log_writer.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/db_iter.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/skiplist.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/db_impl.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/table_cache.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/snapshot.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/log_reader.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/filter_block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/block_builder.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/two_level_iterator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/merger.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/format.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/iterator_wrapper.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/crc32c.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/env_posix_test_helper.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/arena.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/random.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/posix_logger.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/hash.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/histogram.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/coding.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/testutil.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/mutexlock.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/logging.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/testharness.h
+ )
+
+set(libleveldb_a_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/builder.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/c.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/dbformat.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/db_impl.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/db_iter.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/dumpfile.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/filename.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/log_reader.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/log_writer.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/memtable.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/repair.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/table_cache.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/version_edit.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/version_set.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/db/write_batch.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/block_builder.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/filter_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/format.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/iterator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/merger.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/table_builder.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/table.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/table/two_level_iterator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/arena.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/bloom.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/cache.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/coding.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/comparator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/crc32c.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/env.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/env_posix.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/filter_policy.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/hash.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/histogram.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/logging.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/options.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/status.cc
+ )
+
+set(libleveldb_cpp_flags)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ set(libleveldb_cpp_flags -DOS_WINDOWS -DLEVELDB_PLATFORM_WINDOWS -DWINVER=0x0500 -D__USE_MINGW_ANSI_STDIO=1)
+ list(APPEND libleveldb_a_sources ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/util/env_win.cc)
+ list(APPEND libleveldb_a_srouces ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_win.cc)
+else()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(libleveldb_cpp_flags -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX)
+ else()
+ set(libleveldb_cpp_flags -DOS_LINUX -DLEVELDB_PLATFORM_POSIX)
+ endif()
+ list(APPEND libleveldb_a_sources ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_posix.cc)
+endif()
+
+add_library(leveldb STATIC ${libleveldb_a_headers} ${libleveldb_a_sources})
+target_compile_definitions(leveldb PUBLIC ${libleveldb_cpp_flags} -DLEVELDB_ATOMIC_PRESENT -D__STDC_LIMIT_MACROS)
+target_compile_options(leveldb PUBLIC -I${CMAKE_CURRENT_SOURCE_DIR}/src/compat)
+
+set(libmemenv_a_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/helpers/memenv/memenv.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/helpers/memenv/memenv.h
+ )
+add_library(memenv STATIC ${libmemenv_a_sources})
+target_compile_definitions(memenv PUBLIC ${libleveldb_cpp_flags})
+
+set(libleveldb_sse42_a_sources ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb/port/port_posix_sse.cc)
+add_library(leveldb_sse42 ${libleveldb_sse42_a_sources})
+
+link_directories ( ${CMAKE_CURRENT_SOURCE_DIR}/src/leveldb )
+
+file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h)
+file(GLOB CRYPTO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/*.h)
+file(GLOB PRIMITIVE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/primitives/*.h)
+file(GLOB ZMQ_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/zmq/*.h)
+file(GLOB SCRIPT_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/script/*.h)
+file(GLOB RPC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/rpc/*.h)
+file(GLOB COMPAT_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/compat/*.h)
+
+source_group("BitcoinHeaders" FILES
+ ${HEADERS}
+ ${CRYPTO_HEADERS}
+ ${PRIMITIVE_HEADERS}
+ ${ZMQ_HEADERS}
+ ${SCRIPT_HEADERS}
+ ${RPC_HEADERS}
+ ${COMPAT_HEADERS}
+ ./src/support/cleanse.h
+ )
+
+set(SERVER_SOURCES
+ ./src/addrman.cpp
+ ./src/alert.cpp
+ ./src/bloom.cpp
+ ./src/blocksignature.cpp
+ ./src/chain.cpp
+ ./src/checkpoints.cpp
+ ./src/httprpc.cpp
+ ./src/httpserver.cpp
+ ./src/init.cpp
+ ./src/leveldbwrapper.cpp
+ ./src/main.cpp
+ ./src/merkleblock.cpp
+ ./src/miner.cpp
+ ./src/net.cpp
+ ./src/noui.cpp
+ ./src/pow.cpp
+ ./src/rest.cpp
+ ./src/rpc/blockchain.cpp
+ ./src/rpc/masternode.cpp
+ ./src/rpc/budget.cpp
+ ./src/rpc/mining.cpp
+ ./src/rpc/misc.cpp
+ ./src/rpc/net.cpp
+ ./src/rpc/rawtransaction.cpp
+ ./src/rpc/server.cpp
+ ./src/script/sigcache.cpp
+ ./src/sporkdb.cpp
+ ./src/timedata.cpp
+ ./src/torcontrol.cpp
+ ./src/txdb.cpp
+ ./src/txmempool.cpp
+ ./src/validationinterface.cpp
+ ./src/zpivchain.cpp
+ )
+add_library(SERVER_A STATIC ${BitcoinHeaders} ${SERVER_SOURCES})
+
+if (ZMQ_FOUND)
+ set(ZMQ_SOURCES
+ ./src/zmq/zmqabstractnotifier.cpp
+ ./src/zmq/zmqnotificationinterface.cpp
+ ./src/zmq/zmqpublishnotifier.cpp
+ )
+ add_library(ZMQ_A STATIC ${BitcoinHeaders} ${ZMQ_SOURCES})
+endif()
+
+set(WALLET_SOURCES
+ ./src/activemasternode.cpp
+ ./src/bip38.cpp
+ ./src/denomination_functions.cpp
+ ./src/obfuscation.cpp
+ ./src/obfuscation-relay.cpp
+ ./src/wallet/db.cpp
+ ./src/crypter.cpp
+ ./src/swifttx.cpp
+ ./src/masternode.cpp
+ ./src/masternode-budget.cpp
+ ./src/masternode-payments.cpp
+ ./src/masternode-sync.cpp
+ ./src/masternodeconfig.cpp
+ ./src/masternodeman.cpp
+ ./src/zpiv/mintpool.cpp
+ ./src/wallet/rpcdump.cpp
+ ./src/zpiv/deterministicmint.cpp
+ ./src/zpiv/zerocoin.cpp
+ ./src/wallet/rpcwallet.cpp
+ ./src/kernel.cpp
+ ./src/wallet/wallet.cpp
+ ./src/wallet/wallet_ismine.cpp
+ ./src/wallet/walletdb.cpp
+ ./src/zpiv/zpivwallet.cpp
+ ./src/zpiv/zpivtracker.cpp
+ ./src/zpiv/zpivmodule.cpp
+ ./src/stakeinput.cpp
+ ./src/genwit.cpp
+ ./src/lightzpivthread.cpp
+ )
+add_library(WALLET_A STATIC ${BitcoinHeaders} ${WALLET_SOURCES})
+
+set(BITCOIN_CRYPTO_SOURCES
+ ./src/crypto/sha1.cpp
+ ./src/crypto/sha256.cpp
+ ./src/crypto/sha512.cpp
+ ./src/crypto/hmac_sha256.cpp
+ ./src/crypto/rfc6979_hmac_sha256.cpp
+ ./src/crypto/hmac_sha512.cpp
+ ./src/crypto/scrypt.cpp
+ ./src/crypto/ripemd160.cpp
+ ./src/crypto/aes_helper.c
+ ./src/crypto/blake.c
+ ./src/crypto/bmw.c
+ ./src/crypto/groestl.c
+ ./src/crypto/jh.c
+ ./src/crypto/keccak.c
+ ./src/crypto/skein.c
+ ./src/crypto/common.h
+ ./src/crypto/sha256.h
+ ./src/crypto/sha512.h
+ ./src/crypto/hmac_sha256.h
+ ./src/crypto/rfc6979_hmac_sha256.h
+ ./src/crypto/hmac_sha512.h
+ ./src/crypto/scrypt.h
+ ./src/crypto/sha1.h
+ ./src/crypto/ripemd160.h
+ ./src/crypto/sph_blake.h
+ ./src/crypto/sph_bmw.h
+ ./src/crypto/sph_groestl.h
+ ./src/crypto/sph_jh.h
+ ./src/crypto/sph_keccak.h
+ ./src/crypto/sph_skein.h
+ ./src/crypto/sph_types.h
+ )
+add_library(BITCOIN_CRYPTO_A STATIC ${BITCOIN_CRYPTO_SOURCES})
+
+set(ZEROCOIN_SOURCES
+ ./src/libzerocoin/Accumulator.h
+ ./src/libzerocoin/AccumulatorProofOfKnowledge.h
+ ./src/libzerocoin/bignum.h
+ ./src/libzerocoin/bignum.cpp
+ ./src/libzerocoin/Coin.h
+ ./src/libzerocoin/CoinSpend.h
+ ./src/libzerocoin/Commitment.h
+ ./src/libzerocoin/Denominations.h
+ ./src/libzerocoin/ParamGeneration.h
+ ./src/libzerocoin/Params.h
+ ./src/libzerocoin/SerialNumberSignatureOfKnowledge.h
+ ./src/libzerocoin/SpendType.h
+ ./src/libzerocoin/ZerocoinDefines.h
+ ./src/libzerocoin/Accumulator.cpp
+ ./src/libzerocoin/AccumulatorProofOfKnowledge.cpp
+ ./src/libzerocoin/Coin.cpp
+ ./src/libzerocoin/Denominations.cpp
+ ./src/libzerocoin/CoinSpend.cpp
+ ./src/libzerocoin/Commitment.cpp
+ ./src/libzerocoin/ParamGeneration.cpp
+ ./src/libzerocoin/Params.cpp
+ ./src/libzerocoin/SerialNumberSignatureOfKnowledge.cpp
+ )
+if(GMP_FOUND)
+ list(APPEND ZEROCOIN_SOURCES ./src/libzerocoin/bignum_gmp.cpp)
+else()
+ list(APPEND ZEROCOIN_SOURCES ./src/libzerocoin/bignum_openssl.cpp)
+endif()
+add_library(ZEROCOIN_A STATIC ${ZEROCOIN_SOURCES})
+
+set(COMMON_SOURCES
+ ./src/zpiv/accumulators.cpp
+ ./src/zpiv/accumulatorcheckpoints.cpp
+ ./src/zpiv/accumulatormap.cpp
+ ./src/zpiv/witness.cpp
+ ./src/allocators.cpp
+ ./src/amount.cpp
+ ./src/base58.cpp
+ ./src/bip38.cpp
+ ./src/chainparams.cpp
+ ./src/coins.cpp
+ ./src/compressor.cpp
+ ./src/primitives/block.cpp
+ ./src/zpiv/deterministicmint.cpp
+ ./src/primitives/transaction.cpp
+ ./src/zpiv/zerocoin.cpp
+ ./src/core_read.cpp
+ ./src/core_write.cpp
+ ./src/hash.cpp
+ ./src/invalid.cpp
+ ./src/key.cpp
+ ./src/keystore.cpp
+ ./src/netbase.cpp
+ ./src/protocol.cpp
+ ./src/pubkey.cpp
+ ./src/scheduler.cpp
+ ./src/script/interpreter.cpp
+ ./src/script/script.cpp
+ ./src/script/sign.cpp
+ ./src/script/standard.cpp
+ ./src/script/script_error.cpp
+ ./src/spork.cpp
+ ./src/sporkdb.cpp
+ )
+add_library(COMMON_A STATIC ${BitcoinHeaders} ${COMMON_SOURCES})
+
+set(UTIL_SOURCES
+ ./src/allocators.cpp
+ ./src/compat/strnlen.cpp
+ ./src/compat/glibc_sanity.cpp
+ ./src/compat/glibcxx_sanity.cpp
+ ./src/chainparamsbase.cpp
+ ./src/clientversion.cpp
+ ./src/random.cpp
+ ./src/rpc/protocol.cpp
+ ./src/sync.cpp
+ ./src/uint256.cpp
+ ./src/util.cpp
+ ./src/utilstrencodings.cpp
+ ./src/utilmoneystr.cpp
+ ./src/utiltime.cpp
+ ./src/support/cleanse.cpp
+ )
+add_library(UTIL_A STATIC ${BitcoinHeaders} ${UTIL_SOURCES})
+
+set(CLI_SOURCES ./src/rpc/client.cpp)
+add_library(CLI_A STATIC ${BitcoinHeaders} ${CLI_SOURCES})
+
+add_executable(pivx-cli ${CMAKE_CURRENT_SOURCE_DIR}/src/pivx-cli.cpp)
+add_dependencies(pivx-cli libunivalue)
+target_link_libraries(pivx-cli
+ CLI_A
+ univalue
+ UTIL_A
+ BITCOIN_CRYPTO_A
+ ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBEVENT_LIB}
+ )
+
+add_executable(pivx-tx ${CMAKE_CURRENT_SOURCE_DIR}/src/pivx-tx.cpp)
+add_dependencies(pivx-tx libunivalue libsecp256k1)
+target_link_libraries(pivx-tx
+ univalue
+ COMMON_A
+ ZEROCOIN_A
+ UTIL_A
+ BITCOIN_CRYPTO_A
+ secp256k1
+ ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBEVENT_LIB}
+ )
+if(GMP_FOUND)
+ target_link_libraries(pivx-tx ${GMP_LIBRARY})
+endif()
+
+add_executable(pivxd ${CMAKE_CURRENT_SOURCE_DIR}/src/pivxd.cpp)
+add_dependencies(pivxd libunivalue libsecp256k1 leveldb leveldb_sse42 memenv)
+target_link_libraries(pivxd
+ SERVER_A
+ COMMON_A
+ univalue
+ ZEROCOIN_A
+ UTIL_A
+ WALLET_A
+ BITCOIN_CRYPTO_A
+ leveldb leveldb_sse42 memenv secp256k1
+ ${BerkeleyDB_LIBRARIES} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${LIBEVENT_LIB} miniupnpc pthread
+ )
+if(GMP_FOUND)
+ target_link_libraries(pivxd ${GMP_LIBRARY})
+endif()
+if(ZMQ_FOUND)
+ target_link_libraries(pivxd ZMQ_A ${ZMQ_LIB})
+endif ()
+
+
+add_subdirectory(src/qt)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5b36d2386..3def8a90a 100755
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -24,9 +24,9 @@ facilitates social contribution, easy testing and peer review.
To contribute a patch, the workflow is as follows:
- - Fork repository
- - Create topic branch
- - Commit patches
+ 1. Fork repository
+ 2. Create topic branch
+ 3. Commit patches
The project coding conventions in the [developer notes](doc/developer-notes.md)
must be adhered to.
@@ -40,12 +40,14 @@ Commit messages should be verbose by default consisting of a short subject line
paragraph(s), unless the title alone is self-explanatory (like "Corrected typo
in init.cpp") in which case a single title line is sufficient. Commit messages should be
helpful to people reading your code in the future, so explain the reasoning for
-your decisions. Further explanation [here](http://chris.beams.io/posts/git-commit/).
+your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/).
-If a particular commit references another issue, please add the reference, for
-example `refs #1234`, or `fixes #4321`. Using the `fixes` or `closes` keywords
+If a particular commit references another issue, please add the reference. For
+example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords
will cause the corresponding issue to be closed when the pull request is merged.
+Commit messages should never contain any `@` mentions.
+
Please refer to the [Git manual](https://git-scm.com/doc) for more information
about Git.
@@ -81,7 +83,11 @@ Examples:
Qt: Add feed bump button
Trivial: Fix typo in init.cpp
-If a pull request is specifically not to be considered for merging (yet) please
+Note that translations should not be submitted as pull requests, please see
+[Translation Process](https://github.com/VitaeTeam/Vitae/blob/master/doc/translation_process.md)
+for more information on helping with translations.
+
+If a pull request is not to be considered for merging (yet), please
prefix the title with [WIP] or use [Tasks Lists](https://help.github.com/articles/basic-writing-and-formatting-syntax/#task-lists)
in the body of the pull request to indicate tasks are pending.
@@ -94,6 +100,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
@@ -102,12 +110,16 @@ 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)
+Please update the resulting commit message if needed, it should read as a
+coherent message. In most cases this means that you should not just list the
+interim commits.
+
If you have problems with squashing (or other workflows with `git`), you can
alternatively enable "Allow edits from maintainers" in the right GitHub
sidebar and ask for help in the pull request.
@@ -120,11 +132,37 @@ the respective change set.
The length of time required for peer review is unpredictable and will vary from
pull request to pull request.
+Rebasing Pull Requests
+-------------------------
+It may become necessary for a pull request to be rebased after other pull requests have been
+merged. This is typically due to mutually exclusive changes (conflicts) between your pull
+request and the current `master` branch.
+
+When a rebase is needed, a comment will be added to the pull request indicating this need.
+Rather than simply merge the `master` branch into your pull request (which results in an
+ugly and confusing merge commit), it is better to use git's rebase feature. The basic
+workflow is as follows:
+
+ # replace 'origin' with the remote name for the main project repo in the example
+ git checkout your_branch_name
+ git fetch origin
+ git pull --rebase origin master
+
+This will "rewind" your branch commits, pull any new commits from `master`, then attempt to
+re-apply your commits on top of the new HEAD. If any conflicts are found, the process will
+pause and allow you to resolve any conflicts. Once conflicts have been resolved:
+
+ git rebase --continue
+
+Repeat as necessary until there are no more conflicts and your git tree is in a clean state.
+The final step is to push your rebased branch back up to github:
+
+ git push -f # force pushes the branch to github
Pull Request Philosophy
-----------------------
-Patch sets should always be focused. For example, a pull request could add a
+Patchsets should always be focused. For example, a pull request could add a
feature, fix a bug, or refactor code; but not a mixture. Please also avoid super
pull requests which attempt to do too much, are overly large, or overly complex
as this makes review difficult.
@@ -148,10 +186,18 @@ There are three categories of refactoring, code only moves, code style fixes,
code refactoring. In general refactoring pull requests should not mix these
three kinds of activity in order to make refactoring pull requests easy to
review and uncontroversial. In all cases, refactoring PRs must not change the
-behavior of code within the pull request (bugs must be preserved as is).
+behaviour of code within the pull request (bugs must be preserved as is).
Project maintainers aim for a quick turnaround on refactoring pull requests, so
-where possible keep them short, un-complex and easy to verify.
+where possible keep them short, uncomplex and easy to verify.
+
+Pull requests that refactor the code should not be made by new contributors. It
+requires a certain level of experience to know where the code belongs and to
+understand the full ramification (including rebase effort of open pull requests).
+
+Trivial pull requests or pull requests that refactor the code with no clear
+benefits may be immediately closed by the maintainers to reduce unnecessary
+workload on reviewing.
"Decision Making" Process
@@ -169,9 +215,9 @@ judge the general consensus of contributors.
In general, all pull requests must:
- - have a clear use case, fix a demonstrable bug or serve the greater good of
+ - Have a clear use case, fix a demonstrable bug or serve the greater good of
the project (for example refactoring for modularisation);
- - be well peer reviewed;
+ - Be well peer reviewed;
- follow code style guidelines;
Patches that change VITAE consensus rules are considerably more involved than
@@ -185,13 +231,16 @@ patches because of increased peer review and consensus building requirements.
Anyone may participate in peer review which is expressed by comments in the pull
request. Typically reviewers will review the code for obvious errors, as well as
-test out the patch set and opine on the technical merits of the patch. Project
+test out the patchset and opine on the technical merits of the patch. Project
maintainers take into account the peer review when determining if there is
consensus to merge a pull request (remember that discussions may have been
-spread out over GitHub, forums, email, and Slack discussions). The following
+spread out over GitHub, forums, email, and Discord discussions). The following
language is used within pull-request comments:
- - ACK means "I have tested the code and I agree it should be merged";
+ - (t)ACK means "I have tested the code and I agree it should be merged", involving
+ change-specific manual testing in addition to running the unit and functional
+ tests, and in case it is not obvious how the manual testing was done, it should
+ be described;
- NACK means "I disagree this should be merged", and must be accompanied by
sound technical justification (or in certain cases of copyright/patent/licensing
issues, legal justification). NACKs without accompanying reasoning may be
@@ -209,13 +258,13 @@ that have demonstrated a deeper commitment and understanding towards the project
(over time) or have clear domain expertise may naturally have more weight, as
one would expect in all walks of life.
-Where a patch set affects consensus critical code, the bar will be set much
+Where a patchset affects consensus critical code, the bar will be set much
higher in terms of discussion and peer review requirements, keeping in mind that
mistakes could be very costly to the wider community. This includes refactoring
of consensus critical code.
-Where a patch set proposes to change the VITAE consensus, it must have been
-discussed extensively on the forums and Slack, be accompanied by a widely
+Where a patchset proposes to change the VITAE consensus, it must have been
+discussed extensively on the forums and Discord, be accompanied by a widely
discussed Proposal and have a generally widely perceived technical consensus of being
a worthwhile change based on the judgement of the maintainers.
@@ -237,7 +286,7 @@ about:
that personally, though! Instead, take another critical look at what you are suggesting
and see if it: changes too much, is too broad, doesn't adhere to the
[developer notes](doc/developer-notes.md), is dangerous or insecure, is messily written, etc.
- Identify and address any of the issues you find. Then ask e.g. on Slack if someone could give
+ Identify and address any of the issues you find. Then ask e.g. on Discord if someone could give
their opinion on the concept itself.
- It may be because your code is too complex for all but a few people. And those people
may not have realized your pull request even exists. A great way to find people who
@@ -245,7 +294,7 @@ about:
[Git Blame feature](https://help.github.com/articles/tracing-changes-in-a-file/). Simply
find the person touching the code you are touching before you and see if you can find
them and give them a nudge. Don't be incessant about the nudging though.
- - Finally, if all else fails, ask on Slack or elsewhere for someone to give your pull request
+ - Finally, if all else fails, ask on Discord or elsewhere for someone to give your pull request
a look. If you think you've been waiting an unreasonably long amount of time (month+) for
no particular reason (few lines changed, etc), this is totally fine. Try to return the favor
when someone else is asking for feedback on their code, and universe balances out.
diff --git a/COPYING b/COPYING
index 37e25c91d..f4097346d 100755
--- a/COPYING
+++ b/COPYING
@@ -1,7 +1,7 @@
Copyright (c) 2009-2015 Bitcoin Developers
Copyright (c) 2014-2015 Dash Developers
-Copyright (c) 2015-2017 The PIVX developers
-Copyright (c) 2018-2018 VITAE Developers
+Copyright (c) 2015-2019 The PIVX developers
+Copyright (c) 2018-2020 VITAE Developers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Makefile.am b/Makefile.am
index f9fd315c1..e044c2427 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,11 +32,15 @@ OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
-WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
+WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/pivx.ico \
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
$(top_srcdir)/doc/README_windows.txt
+LINUX_PACKAGING = $(top_srcdir)/share/pixmaps/pivx16.xpm \
+ $(top_srcdir)/share/pixmaps/pivx32.xpm \
+ $(top_srcdir)/share/pixmaps/pivx128.png
+
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
$(OSX_DSSTORE_GEN) \
@@ -160,6 +164,7 @@ $(BITCOIN_CLI_BIN): FORCE
$(MAKE) -C src $(@F)
if USE_LCOV
+LCOV_FILTER_PATTERN=-p "/usr/include/" -p "/usr/lib/" -p "src/leveldb/" -p "src/univalue" -p "src/secp256k1"
baseline.info:
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
@@ -215,11 +220,55 @@ endif
dist_noinst_SCRIPTS = autogen.sh
-EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
+EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(LINUX_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
+
+EXTRA_DIST += \
+ test/functional
+
+EXTRA_DIST += \
+ test/util/bitcoin-util-test.py \
+ test/util/data/bitcoin-util-test.json \
+ test/util/data/blanktxv1.hex \
+ test/util/data/blanktxv1.json \
+ test/util/data/tt-delin1-out.hex \
+ test/util/data/tt-delin1-out.json \
+ test/util/data/tt-delout1-out.hex \
+ test/util/data/tt-delout1-out.json \
+ test/util/data/tt-locktime317000-out.hex \
+ test/util/data/tt-locktime317000-out.json \
+ test/util/data/tx394b54bb.hex \
+ test/util/data/txcreate1.hex \
+ test/util/data/txcreate1.json \
+ test/util/data/txcreate2.hex \
+ test/util/data/txcreate2.json \
+ test/util/data/txcreatescript1.hex \
+ test/util/data/txcreatescript1.json \
+ test/util/data/txcreatesign.hex \
+ test/util/data/txcreatesign.json \
+ test/util/rpcauth-test.py
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
.INTERMEDIATE: $(COVERAGE_INFO)
-clean-local:
- rm -rf test_vitae.coverage/ total.coverage/ $(OSX_APP)
+DISTCHECK_CONFIGURE_FLAGS = --enable-man
+
+doc/doxygen/.stamp: doc/Doxyfile FORCE
+ $(MKDIR_P) $(@D)
+ $(DOXYGEN) $^
+ $(AM_V_at) touch $@
+
+if HAVE_DOXYGEN
+docs: doc/doxygen/.stamp
+else
+docs:
+ @echo "error: doxygen not found"
+endif
+
+clean-docs:
+ rm -rf doc/doxygen
+
+clean-local: clean-docs
+ rm -rf coverage_percent.txt test_vitae.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
+ rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
+
diff --git a/README.md b/README.md
index 7d303ad70..f0dc46d33 100755
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ More information at [vitaetoken.io](http://www.vitaetoken.io)
### PoW Rewards Breakdown
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index debb20207..561427185 100755
--- 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 vitae-qt GUI (default=auto, qt5 tried first)])],
+ [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@],
+ [build vitae-qt GUI (default=auto)])],
[
bitcoin_qt_want_version=$withval
if test x$bitcoin_qt_want_version = xyes; then
@@ -93,19 +93,18 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
use_pkgconfig=yes
fi
- if test x$use_pkgconfig = xyes; then
- BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
+ if test "x$use_pkgconfig" = xyes; then
+ 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,56 +112,48 @@ 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
- TEMP_CPPFLAGS="$TEMP_CPPFLAGS -DHAVE_QT5"
- _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 ]],[[
+ _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;
+ 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
- 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_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
- 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(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
fi
CPPFLAGS=$TEMP_CPPFLAGS
CXXFLAGS=$TEMP_CXXFLAGS
])
- 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
+ if test "x$use_pkgconfig$qt_bin_path" = xyes; then
+ qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
fi
if test x$use_hardening != xno; then
@@ -202,11 +193,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
@@ -245,7 +236,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)
@@ -255,7 +246,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)
])
@@ -282,7 +273,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
])])
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: 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.
@@ -325,52 +316,50 @@ 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$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"])
+ 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$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
- ])
- else
- if test x$TARGET_OS = xwindows; then
- AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[#include ]],[[
+ elif test "x$TARGET_OS" = xdarwin; then
+ PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
+ fi
+ ])
+ else
+ if test "x$TARGET_OS" = xwindows; then
+ AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #ifndef QT_VERSION
+ # include
+ #endif
+ ]],
+ [[
#if QT_VERSION < 0x050600
- choke;
+ choke
#endif
- ]])],
- [bitcoin_cv_need_platformsupport=yes],
- [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_PREFIXPlatformSupport not found)))
- fi
+ ]])],
+ [bitcoin_cv_need_platformsupport=yes],
+ [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)))
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.
@@ -379,39 +368,15 @@ 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([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; 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([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; 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([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
- else
- PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; 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
+ if test "x$have_qt" != xyes; then
have_qt=no
BITCOIN_QT_FAIL([Qt dependencies not found])
fi
@@ -431,7 +396,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"
@@ -453,13 +417,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
if test x$bitcoin_qt_want_version = xauto; then
_BITCOIN_QT_CHECK_QT5
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([
@@ -478,12 +436,10 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
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])))
- BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
- BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
- BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork 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_PREFIXWidgets not found)))
- fi
+ 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)))
+ 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-aux/m4/gmp.m4 b/build-aux/m4/gmp.m4
new file mode 100755
index 000000000..2fef793a9
--- /dev/null
+++ b/build-aux/m4/gmp.m4
@@ -0,0 +1,16 @@
+dnl Copyright (c) 2018 The PIVX Core developers
+dnl Distributed under the MIT software license, see the accompanying
+dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+dnl
+AC_DEFUN([GMP_CHECK],[
+if test x"$has_gmp" != x"yes"; then
+ AC_CHECK_HEADER(gmp.h,[
+ AC_CHECK_LIB(gmp, __gmpz_init,[
+ has_gmp=yes;
+ LIBS="$LIBS -lgmp";
+ AC_DEFINE(HAVE_LIBGMP, 1, [Define this symbol if libgmp is installed])
+ ])
+ ])
+fi
+])
diff --git a/configure.ac b/configure.ac
index 6b5a2aac7..aa400119e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,12 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
+
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 4)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_IS_RELEASE, true)
-define(_COPYRIGHT_YEAR, 2019)
+define(_COPYRIGHT_YEAR, 2020)
AC_INIT([Vitae Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.vitaetoken.io],[vitae])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/vitae-config.h])
@@ -74,8 +75,8 @@ AC_PATH_TOOL(RANLIB, ranlib)
AC_PATH_TOOL(STRIP, strip)
AC_PATH_TOOL(GCOV, gcov)
AC_PATH_PROG(LCOV, lcov)
-AC_PATH_PROG(JAVA, java)
-AC_PATH_PROGS([PYTHON], [python3 python2.7 python2 python])
+dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md
+AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python])
AC_PATH_PROG(GENHTML, genhtml)
AC_PATH_PROG([GIT], [git])
AC_PATH_PROG(CCACHE,ccache)
@@ -84,6 +85,11 @@ AC_PATH_PROG(HEXDUMP,hexdump)
AC_PATH_TOOL(READELF, readelf)
AC_PATH_TOOL(CPPFILT, c++filt)
AC_PATH_TOOL(OBJCOPY, objcopy)
+AC_PATH_PROG(DOXYGEN, doxygen)
+if test -z "$DOXYGEN"; then
+ AC_MSG_WARN([Doxygen not found])
+fi
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
@@ -163,6 +169,12 @@ AC_ARG_ENABLE([zmq],
[use_zmq=$enableval],
[use_zmq=yes])
+AC_ARG_WITH([zerocoin-bignum],
+ [AS_HELP_STRING([--with-zerocoin-bignum=gmp|openssl|auto],
+ [Specify Bignum Implementation. Default is auto])],
+ [req_bignum=$withval],
+ [req_bignum=auto])
+
AC_ARG_WITH([system-univalue],
[AS_HELP_STRING([--with-system-univalue],
[Build with system UniValue (default is no)])],
@@ -195,7 +207,35 @@ fi
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter"
fi
-CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
+
+# Check for optional instruction set support. Enabling these does _not_ imply that all code will
+# 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]])
+
+TEMP_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
+AC_MSG_CHECKING(for assembler crc32 support)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include
+ #if defined(_MSC_VER)
+ #include
+ #elif defined(__GNUC__) && defined(__SSE4_2__)
+ #include
+ #endif
+ ]],[[
+ uint64_t l = 0;
+ l = _mm_crc32_u8(l, 0);
+ l = _mm_crc32_u32(l, 0);
+ l = _mm_crc32_u64(l, 0);
+ return l;
+ ]])],
+ [ AC_MSG_RESULT(yes); enable_hwcrc32=yes],
+ [ AC_MSG_RESULT(no)]
+)
+CXXFLAGS="$TEMP_CXXFLAGS"
+
+CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_ARG_WITH([utils],
[AS_HELP_STRING([--with-utils],
@@ -260,7 +300,7 @@ case $host in
fi
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
- LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE"
+ LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -w"
fi
@@ -282,7 +322,7 @@ case $host in
;;
*darwin*)
TARGET_OS=darwin
- LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
+ LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port)
@@ -344,12 +384,22 @@ case $host in
fi
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
- CPPFLAGS="$CPPFLAGS -DMAC_OSX"
+ CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
;;
*linux*)
TARGET_OS=linux
+ LEVELDB_TARGET_FLAGS="-DOS_LINUX"
+ ;;
+ *freebsd*)
+ LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
+ ;;
+ *openbsd*)
+ LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
;;
*)
+ 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}"
;;
esac
@@ -443,7 +493,15 @@ 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
+if test x$TARGET_OS != xwindows; then
+ # All windows code is PIC, forcing it on just adds useless compile warnings
+ AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"])
fi
if test x$use_hardening != xno; then
@@ -561,7 +619,7 @@ 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 = xnononono; then
use_boost=no
@@ -793,10 +851,10 @@ else
fi
AC_CHECK_LIB([crypto],[RAND_egd],[],[
- AC_ARG_WITH([libressl],
- [AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
- [AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
- [AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
+ AC_ARG_WITH([unsupported-ssl],
+ [AS_HELP_STRING([--with-unsupported-ssl],[Build with system SSL (default is no; DANGEROUS; NOT SUPPORTED; You should use OpenSSL 1.0)])],
+ [AC_MSG_WARN([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility! Use '--with-unsupported-ssl' if you don't care])],
+ [AC_MSG_ERROR([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility! Use '--with-unsupported-ssl' if you don't care])]
)
])
@@ -884,6 +942,32 @@ if test "x$use_ccache" = "xyes"; then
AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"])
fi
+dnl bignum value
+set_bignum=$req_bignum
+case $req_bignum in
+auto)
+ GMP_CHECK
+ if test x"$has_gmp" != x"yes"; then
+ AC_MSG_ERROR([gmp bignum automatically selected but libgmp is not available. Use depends,
+ install libgmp or select an other bignum implementation (ONLY gmp is fully SUPPORTED)])
+ else
+ set_bignum=gmp
+ fi
+ ;;
+gmp)
+ GMP_CHECK
+ if test x"$has_gmp" != x"yes"; then
+ AC_MSG_ERROR([gmp bignum explicitly requested but libgmp is not available])
+ fi
+ ;;
+openssl)
+ AC_MSG_WARN([openssl bignum explicitly requested. This is DEPRECATED.])
+ ;;
+*)
+ AC_MSG_ERROR([invalid bignum implementation selection])
+ ;;
+esac
+
dnl enable wallet
AC_MSG_CHECKING([if wallet should be enabled])
if test x$enable_wallet != xno; then
@@ -963,6 +1047,22 @@ fi
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
+# select bignum implementation
+case $set_bignum in
+gmp)
+ AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation])
+ ;;
+openssl)
+ AC_DEFINE(USE_NUM_OPENSSL, 1, [Define this symbol to use openssl implementation])
+ ;;
+*)
+ AC_MSG_ERROR([invalid bignum implementation])
+ ;;
+esac
+
+AM_CONDITIONAL([USE_NUM_GMP], [test "x$set_bignum" = "xgmp"])
+AM_CONDITIONAL([USE_NUM_OPENSSL], [test "x$set_bignum" = "xopenssl"])
+
AC_MSG_CHECKING([whether to build test_vitae])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])
@@ -996,6 +1096,7 @@ AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AM_CONDITIONAL([USE_LIBSECP256K1],[test x$use_libsecp256k1 = xyes])
+AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
@@ -1015,6 +1116,14 @@ AC_SUBST(BITCOIN_CLI_NAME)
AC_SUBST(BITCOIN_TX_NAME)
AC_SUBST(RELDFLAGS)
+AC_SUBST(COMPAT_LDFLAGS)
+AC_SUBST(ERROR_CXXFLAGS)
+AC_SUBST(HARDENED_CXXFLAGS)
+AC_SUBST(HARDENED_CPPFLAGS)
+AC_SUBST(HARDENED_LDFLAGS)
+AC_SUBST(PIC_FLAGS)
+AC_SUBST(PIE_FLAGS)
+AC_SUBST(SSE42_CXXFLAGS)
AC_SUBST(LIBTOOL_APP_LDFLAGS)
AC_SUBST(USE_UPNP)
AC_SUBST(USE_QRCODE)
@@ -1033,10 +1142,15 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
+AC_SUBST(USE_NUM_GMP)
+AC_SUBST(USE_NUM_OPENSSL)
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
-AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
-AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
+AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
+AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
+AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
+AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
+AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
dnl boost's m4 checks do something really nasty: they export these vars. As a
dnl result, they leak into secp256k1's configure and crazy things happen.
@@ -1065,7 +1179,7 @@ if test x$system_univalue = xno; then
AC_CONFIG_SUBDIRS([src/univalue])
fi
-ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
+ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-module-recovery"
AC_CONFIG_SUBDIRS([src/secp256k1])
AC_OUTPUT
@@ -1086,7 +1200,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/cmake/FindBerkeleyDB.cmake b/contrib/cmake/FindBerkeleyDB.cmake
new file mode 100644
index 000000000..1b5188cf2
--- /dev/null
+++ b/contrib/cmake/FindBerkeleyDB.cmake
@@ -0,0 +1,146 @@
+# Author: sum01
+# Git: https://github.com/sum01/FindBerkeleyDB
+# Read the README.md for the full info.
+
+# Allow user to pass a path instead of guessing
+if(BerkeleyDB_ROOT_DIR)
+ set(_BERKELEYDB_PATHS "${BerkeleyDB_ROOT_DIR}")
+elseif(CMAKE_SYSTEM_NAME MATCHES ".*[wW]indows.*")
+ # MATCHES is used to work on any devies with windows in the name
+ # Shameless copy-paste from FindOpenSSL.cmake v3.8
+ file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
+ list(APPEND _BERKELEYDB_HINTS "${_programfiles}")
+
+ # There's actually production release and version numbers in the file path.
+ # For example, if they're on v6.2.32: C:/Program Files/Oracle/Berkeley DB 12cR1 6.2.32/
+ # But this still works to find it, so I'm guessing it can accept partial path matches.
+
+ foreach(_TARGET_BERKELEYDB_PATH "Oracle/Berkeley DB" "Berkeley DB")
+ list(APPEND _BERKELEYDB_PATHS
+ "${_programfiles}/${_TARGET_BERKELEYDB_PATH}"
+ "C:/Program Files (x86)/${_TARGET_BERKELEYDB_PATH}"
+ "C:/Program Files/${_TARGET_BERKELEYDB_PATH}"
+ "C:/${_TARGET_BERKELEYDB_PATH}"
+ )
+ endforeach()
+else()
+ # Paths for anything other than Windows
+ # Cellar/berkeley-db is for macOS from homebrew installation
+ list(APPEND _BERKELEYDB_PATHS
+ "/usr/local/Cellar/berkeley-db@4"
+ "/usr/local/Cellar/berkeley-db"
+ "/opt"
+ "/opt/local"
+ "/usr/local"
+ )
+endif()
+
+# Find includes path
+find_path(BerkeleyDB_INCLUDE_DIRS
+ db_cxx.h
+ PATHS "${_BERKELEYDB_PATHS}"
+ PATH_SUFFIXES "include" "includes"
+ )
+
+# Checks if the version file exists, save the version file to a var, and fail if there's no version file
+if(BerkeleyDB_INCLUDE_DIRS)
+ # Read the version file db.h into a variable
+ file(READ "${BerkeleyDB_INCLUDE_DIRS}/db.h" _BERKELEYDB_DB_HEADER)
+ # Parse the DB version into variables to be used in the lib names
+ string(REGEX REPLACE ".*DB_VERSION_MAJOR ([0-9]+).*" "\\1" BerkeleyDB_VERSION_MAJOR "${_BERKELEYDB_DB_HEADER}")
+ string(REGEX REPLACE ".*DB_VERSION_MINOR ([0-9]+).*" "\\1" BerkeleyDB_VERSION_MINOR "${_BERKELEYDB_DB_HEADER}")
+ # Patch version example on non-crypto installs: x.x.xNC
+ string(REGEX REPLACE ".*DB_VERSION_PATCH ([0-9]+(NC)?).*" "\\1" BerkeleyDB_VERSION_PATCH "${_BERKELEYDB_DB_HEADER}")
+else()
+ if(BerkeleyDB_FIND_REQUIRED)
+ # If the find_package(BerkeleyDB REQUIRED) was used, fail since we couldn't find the header
+ message(FATAL_ERROR "Failed to find Berkeley DB's header file \"db.h\"! Try setting \"BerkeleyDB_ROOT_DIR\" when initiating Cmake.")
+ elseif(NOT BerkeleyDB_FIND_QUIETLY)
+ message(WARNING "Failed to find Berkeley DB's header file \"db.h\"! Try setting \"BerkeleyDB_ROOT_DIR\" when initiating Cmake.")
+ endif()
+ # Set some garbage values to the versions since we didn't find a file to read
+ set(BerkeleyDB_VERSION_MAJOR "0")
+ set(BerkeleyDB_VERSION_MINOR "0")
+ set(BerkeleyDB_VERSION_PATCH "0")
+endif()
+
+# The actual returned/output version variable (the others can be used if needed)
+set(BerkeleyDB_VERSION "${BerkeleyDB_VERSION_MAJOR}.${BerkeleyDB_VERSION_MINOR}.${BerkeleyDB_VERSION_PATCH}")
+
+# Finds the target library for berkeley db, since they all follow the same naming conventions
+macro(findpackage_berkeleydb_get_lib _BERKELEYDB_OUTPUT_VARNAME _TARGET_BERKELEYDB_LIB)
+ # Different systems sometimes have a version in the lib name...
+ # and some have a dash or underscore before the versions.
+ # CMake recommends to put unversioned names before versioned names
+ find_library(${_BERKELEYDB_OUTPUT_VARNAME}
+ NAMES
+ "${_TARGET_BERKELEYDB_LIB}"
+ "lib${_TARGET_BERKELEYDB_LIB}"
+ "lib${_TARGET_BERKELEYDB_LIB}${BerkeleyDB_VERSION_MAJOR}.${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}-${BerkeleyDB_VERSION_MAJOR}.${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}_${BerkeleyDB_VERSION_MAJOR}.${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}${BerkeleyDB_VERSION_MAJOR}${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}-${BerkeleyDB_VERSION_MAJOR}${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}_${BerkeleyDB_VERSION_MAJOR}${BerkeleyDB_VERSION_MINOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}${BerkeleyDB_VERSION_MAJOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}-${BerkeleyDB_VERSION_MAJOR}"
+ "lib${_TARGET_BERKELEYDB_LIB}_${BerkeleyDB_VERSION_MAJOR}"
+ HINTS ${_BERKELEYDB_HINTS}
+ PATH_SUFFIXES "lib" "lib64" "libs" "libs64"
+ PATHS ${_BERKELEYDB_PATHS}
+ )
+ # If the library was found, add it to our list of libraries
+ if(${_BERKELEYDB_OUTPUT_VARNAME})
+ # If found, append to our libraries variable
+ # The ${{}} is because the first expands to target the real variable, the second expands the variable's contents...
+ # and the real variable's contents is the path to the lib. Thus, it appends the path of the lib to BerkeleyDB_LIBRARIES.
+ list(APPEND BerkeleyDB_LIBRARIES "${${_BERKELEYDB_OUTPUT_VARNAME}}")
+ endif()
+endmacro()
+
+# Find and set the paths of the specific library to the variable
+findpackage_berkeleydb_get_lib(BerkeleyDB_LIBRARY "db")
+# NOTE: Windows doesn't have a db_cxx lib, but instead compiles the cxx code into the "db" lib
+findpackage_berkeleydb_get_lib(BerkeleyDB_Cxx_LIBRARY "db_cxx")
+# NOTE: I don't think Linux/Unix gets an SQL lib
+findpackage_berkeleydb_get_lib(BerkeleyDB_Sql_LIBRARY "db_sql")
+findpackage_berkeleydb_get_lib(BerkeleyDB_Stl_LIBRARY "db_stl")
+
+# Needed for find_package_handle_standard_args()
+include(FindPackageHandleStandardArgs)
+# Fails if required vars aren't found, or if the version doesn't meet specifications.
+find_package_handle_standard_args(BerkeleyDB
+ FOUND_VAR BerkeleyDB_FOUND
+ REQUIRED_VARS
+ BerkeleyDB_INCLUDE_DIRS
+ BerkeleyDB_LIBRARY
+ VERSION_VAR BerkeleyDB_VERSION
+ )
+
+# Create an imported lib for easy linking by external projects
+if(BerkeleyDB_FOUND AND BerkeleyDB_LIBRARIES AND NOT TARGET Oracle::BerkeleyDB)
+ add_library(Oracle::BerkeleyDB UNKNOWN IMPORTED)
+ set_target_properties(Oracle::BerkeleyDB PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${BerkeleyDB_INCLUDE_DIRS}"
+ IMPORTED_LOCATION "${BerkeleyDB_LIBRARY}"
+ INTERFACE_LINK_LIBRARIES "${BerkeleyDB_LIBRARIES}"
+ )
+endif()
+
+# Only show the includes path and libraries in the GUI if they click "advanced".
+# Does nothing when using the CLI
+mark_as_advanced(FORCE
+ BerkeleyDB_INCLUDE_DIRS
+ BerkeleyDB_LIBRARIES
+ BerkeleyDB_LIBRARY
+ BerkeleyDB_Cxx_LIBRARY
+ BerkeleyDB_Sql_LIBRARY
+ BerkeleyDB_Stl_LIBRARY
+ )
+
+include(FindPackageMessage)
+# A message that tells the user what includes/libs were found, and obeys the QUIET command.
+find_package_message(BerkeleyDB
+ "Found BerkeleyDB libraries: ${BerkeleyDB_LIBRARIES}"
+ "[${BerkeleyDB_LIBRARIES}[${BerkeleyDB_INCLUDE_DIRS}]]"
+ )
diff --git a/contrib/cmake/FindGMP.cmake b/contrib/cmake/FindGMP.cmake
new file mode 100644
index 000000000..ee39ba114
--- /dev/null
+++ b/contrib/cmake/FindGMP.cmake
@@ -0,0 +1,33 @@
+# - Find GMP
+# This module defines
+# GMP_INCLUDE_DIR, where to find GMP headers
+# GMP_LIBRARY, LibEvent libraries
+# GMP_FOUND, If false, do not try to use GMP
+
+set(GMP_PREFIX "" CACHE PATH "path ")
+
+find_path(GMP_INCLUDE_DIR gmp.h gmpxx.h
+ PATHS ${GMP_PREFIX}/include /usr/include /usr/local/include )
+
+find_library(GMP_LIBRARY NAMES gmp libgmp
+ PATHS ${GMP_PREFIX}/lib /usr/lib /usr/local/lib)
+
+if(GMP_INCLUDE_DIR AND GMP_LIBRARY)
+ get_filename_component(GMP_LIBRARY_DIR ${GMP_LIBRARY} PATH)
+ set(GMP_FOUND TRUE)
+endif()
+
+if(GMP_FOUND)
+ if(NOT GMP_FIND_QUIETLY)
+ MESSAGE(STATUS "Found GMP: ${GMP_LIBRARY}")
+ endif()
+elseif(GMP_FOUND)
+ if(GMP_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find GMP")
+ endif()
+endif()
+
+mark_as_advanced(
+ GMP_LIB
+ GMP_INCLUDE_DIR
+)
diff --git a/contrib/cmake/FindLibEvent.cmake b/contrib/cmake/FindLibEvent.cmake
new file mode 100644
index 000000000..d0ffdf0ad
--- /dev/null
+++ b/contrib/cmake/FindLibEvent.cmake
@@ -0,0 +1,44 @@
+# - Find LibEvent (a cross event library)
+# This module defines
+# LIBEVENT_INCLUDE_DIR, where to find LibEvent headers
+# LIBEVENT_LIB, LibEvent libraries
+# LibEvent_FOUND, If false, do not try to use libevent
+
+if(($ENV{triple}) AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}"))
+ set(LIBEVENT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}/include")
+ set(LIBEVENT_LIB "${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}/lib/libevent.a")
+ set(LIBEVENT_PTHREAD_LIB "${CMAKE_CURRENT_SOURCE_DIR}/depends/$ENV{triple}/lib/libevent.a")
+else()
+ set(LibEvent_EXTRA_PREFIXES /usr/local /opt/local "$ENV{HOME}")
+ foreach(prefix ${LibEvent_EXTRA_PREFIXES})
+ list(APPEND LibEvent_INCLUDE_PATHS "${prefix}/include")
+ list(APPEND LibEvent_LIB_PATHS "${prefix}/lib")
+ endforeach()
+
+ find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
+ find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
+ find_library(LIBEVENT_PTHREAD_LIB NAMES event_pthreads PATHS ${LibEvent_LIB_PATHS})
+endif()
+
+if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR AND LIBEVENT_PTHREAD_LIB)
+ set(LibEvent_FOUND TRUE)
+ set(LIBEVENT_LIB ${LIBEVENT_LIB} ${LIBEVENT_PTHREAD_LIB})
+else ()
+ set(LibEvent_FOUND FALSE)
+endif ()
+
+if (LibEvent_FOUND)
+ if (NOT LibEvent_FIND_QUIETLY)
+ message(STATUS "Found libevent: ${LIBEVENT_LIB}")
+ endif ()
+else ()
+ if (LibEvent_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find libevent and libevent_pthread.")
+ endif ()
+ message(STATUS "libevent and libevent_pthread NOT found.")
+endif ()
+
+mark_as_advanced(
+ LIBEVENT_LIB
+ LIBEVENT_INCLUDE_DIR
+)
diff --git a/contrib/cmake/FindQrcode.cmake b/contrib/cmake/FindQrcode.cmake
new file mode 100644
index 000000000..702d0d10f
--- /dev/null
+++ b/contrib/cmake/FindQrcode.cmake
@@ -0,0 +1,37 @@
+# - Find Qrcode
+# This module defines
+# QRCODE_INCLUDE_DIR, where to find libqrencode headers
+# QRCODE_LIB, libqrencode libraries
+# QRCODE_FOUND, If false, do not try to use libqrencode
+
+set(QRCODE_EXTRA_PREFIXES /usr/local /opt/local "$ENV{HOME}")
+foreach(prefix ${ZMQ_EXTRA_PREFIXES})
+ list(APPEND QRCODE_INCLUDE_PATHS "${prefix}/include")
+ list(APPEND QRCODE_LIB_PATHS "${prefix}/lib")
+endforeach()
+
+find_path(QRCODE_INCLUDE_DIR qrencode.h PATHS ${QRCODE_INCLUDE_PATHS})
+find_library(QRCODE_LIB NAMES qrencode PATHS ${QRCODE_LIB_PATHS})
+
+if (QRCODE_LIB AND QRCODE_INCLUDE_DIR)
+ set(QRCODE_FOUND TRUE)
+else ()
+ set(QRCODE_FOUND FALSE)
+endif ()
+
+if (QRCODE_FOUND)
+ if (NOT QRCODE_FIND_QUIETLY)
+ message(STATUS "Found libqrencode: ${QRCODE_LIB}")
+ include_directories(${QRCODE_INCLUDE_DIR})
+ endif ()
+else ()
+ if (QRCODE_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find libqrencode.")
+ endif ()
+ message(STATUS "libqrencode NOT found.")
+endif ()
+
+mark_as_advanced(
+ QRCODE_LIB
+ QRCODE_INCLUDE_DIR
+)
diff --git a/contrib/cmake/FindZMQ.cmake b/contrib/cmake/FindZMQ.cmake
new file mode 100644
index 000000000..84b02736d
--- /dev/null
+++ b/contrib/cmake/FindZMQ.cmake
@@ -0,0 +1,37 @@
+# - Find ZeroMQ
+# This module defines
+# ZMQ_INCLUDE_DIR, where to find ZMQ headers
+# ZMQ_LIB, ZMQ libraries
+# ZMQ_FOUND, If false, do not try to use ZeroMQ
+
+set(ZMQ_EXTRA_PREFIXES /usr/local /opt/local "$ENV{HOME}")
+foreach(prefix ${ZMQ_EXTRA_PREFIXES})
+ list(APPEND ZMQ_INCLUDE_PATHS "${prefix}/include")
+ list(APPEND ZMQ_LIB_PATHS "${prefix}/lib")
+endforeach()
+
+find_path(ZMQ_INCLUDE_DIR zmq.h PATHS ${ZMQ_INCLUDE_PATHS})
+find_library(ZMQ_LIB NAMES zmq PATHS ${ZMQ_LIB_PATHS})
+
+if (ZMQ_LIB AND ZMQ_INCLUDE_DIR)
+ set(ZMQ_FOUND TRUE)
+else ()
+ set(ZMQ_FOUND FALSE)
+endif ()
+
+if (ZMQ_FOUND)
+ if (NOT ZMQ_FIND_QUIETLY)
+ message(STATUS "Found ZeroMQ: ${ZMQ_LIB}")
+ include_directories(${ZMQ_INCLUDE_DIR})
+ endif ()
+else ()
+ if (ZMQ_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find ZeroMQ.")
+ endif ()
+ message(STATUS "ZeroMQ NOT found.")
+endif ()
+
+mark_as_advanced(
+ ZMQ_LIB
+ ZMQ_INCLUDE_DIR
+)
diff --git a/contrib/debian/README.md b/contrib/debian/README.md
old mode 100755
new mode 100644
index 0e77ad7d1..c0e3eb3ff
--- a/contrib/debian/README.md
+++ b/contrib/debian/README.md
@@ -14,7 +14,7 @@ To install:
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 vitaeqt binary to `/usr/bin`
+the .desktop file or copy or symlink your vitae-qt binary to `/usr/bin`
and the `../../share/pixmaps/vitae128.png` to `/usr/share/pixmaps`
vitae-qt.protocol (KDE)
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
old mode 100755
new mode 100644
index 316eac897..c8d2b44bc
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,417 +1,5 @@
-bitcoin (0.9.3-precise1) precise; urgency=medium
+pivx (3.2.0-trusty1) trusty; urgency=medium
- * New upstream releases.
+ * PIVX Core v3.2.0 (trusty).
- -- 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 vitae.conf.
- * Add bitcoind(1) and vitae.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
+ -- Fuzzbawls Fri, 12 Apr 2019 12:01:00 -0700
diff --git a/contrib/debian/control b/contrib/debian/control
index 1851b1d9a..2350814b6 100755
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -1,26 +1,32 @@
Source: vitae
Section: utils
Priority: optional
-Maintainer: Jonas Smedegaard ***TODO***
-Uploaders: Micah Anderson ***TODO***
+Maintainer: Fuzzbawls
+Uploaders: Fuzzbawls
Build-Depends: debhelper,
devscripts,
automake,
libtool,
bash-completion,
- libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
libdb4.8++-dev,
- libssl-dev,
+ libssl1.0-dev | libssl-dev,
pkg-config,
- libminiupnpc8-dev,
- libboost-filesystem-dev (>> 1.35) | libboost-filesystem1.35-dev,
- libboost-program-options-dev (>> 1.35) | libboost-program-options1.35-dev,
- libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev,
- libboost-test-dev (>> 1.35) | libboost-test1.35-dev,
- qt4-qmake,
- libqt4-dev,
+ libevent-dev,
+ libgmp-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,
+ xvfb,
+ qtbase5-dev, qttools5-dev-tools, qttools5-dev,
libqrencode-dev,
- libprotobuf-dev, protobuf-compiler
+ libprotobuf-dev, protobuf-compiler,
+ python,
+ libzmq3-dev,
+ dh-systemd
Standards-Version: 3.9.2
Homepage: http://www.vitae.org
Vcs-Git: git://github.com/VITAE-Project/VITAE.git
@@ -37,7 +43,7 @@ Description: peer-to-peer network based digital currency - daemon
check for double-spending.
.
Full transaction history is stored locally at each client. This
- requires 1+ GB of space, slowly growing.
+ requires 10+ GB of space, slowly growing.
.
This package provides the daemon, vitaed, and the CLI tool
vitae-cli to interact with the daemon.
@@ -53,6 +59,6 @@ Description: peer-to-peer network based digital currency - Qt GUI
check for double-spending.
.
Full transaction history is stored locally at each client. This
- requires 1+ GB of space, slowly growing.
+ requires 10+ GB of space, slowly growing.
.
This package provides Vitae-Qt, a GUI for VITAE based on Qt.
diff --git a/contrib/debian/examples/vitae.conf b/contrib/debian/examples/vitae.conf
index 4f7e76781..452052e38 100755
--- a/contrib/debian/examples/vitae.conf
+++ b/contrib/debian/examples/vitae.conf
@@ -1,7 +1,7 @@
##
## vitae.conf configuration file. Lines beginning with # are comments.
##
-
+
# Network-related settings:
# Run on the test network instead of the real vitae network.
@@ -85,16 +85,6 @@
# running on another host using this option:
#rpcconnect=127.0.0.1
-# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
-# with Vitae -server or vitaed
-#rpcssl=1
-
-# OpenSSL settings used when rpcssl=1
-#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
-#rpcsslcertificatechainfile=server.cert
-#rpcsslprivatekeyfile=server.pem
-
-
# Miscellaneous options
# Pre-generate this many public/private key pairs, so wallet backups will be valid for
diff --git a/contrib/debian/manpages/pivx-qt.1 b/contrib/debian/manpages/pivx-qt.1
deleted file mode 100755
index 27c68a306..000000000
--- a/contrib/debian/manpages/pivx-qt.1
+++ /dev/null
@@ -1,203 +0,0 @@
-.TH VITAE-QT "1" "February 2017" "vitae-qt 1"
-.SH NAME
-vitae-qt \- peer-to-peer network based digital currency
-.SH DESCRIPTION
-.SS "Usage:"
-.IP
-vitae\-qt [command\-line options]
-.SH OPTIONS
-.TP
-\-?
-This help message
-.TP
-\fB\-conf=\fR
-Specify configuration file (default: vitae.conf)
-.TP
-\fB\-pid=\fR
-Specify pid file (default: vitaed.pid)
-.TP
-\fB\-gen\fR
-Generate coins
-.TP
-\fB\-gen\fR=\fI0\fR
-Don't generate coins
-.TP
-\fB\-datadir=\fR
-Specify data directory
-.TP
-\fB\-dbcache=\fR
-Set database cache size in megabytes (default: 25)
-.TP
-\fB\-timeout=\fR
-Specify connection timeout in milliseconds (default: 5000)
-.TP
-\fB\-proxy=\fR
-Connect through SOCKS5 proxy
-.TP
-\fB\-tor=\fR
-Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
-.TP
-\fB\-dns\fR
-Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR
-.TP
-\fB\-port=\fR
-Listen for connections on (default: 51472 or testnet: 51474)
-.TP
-\fB\-maxconnections=\fR
-Maintain at most connections to peers (default: 125)
-.TP
-\fB\-addnode=\fR
-Add a node to connect to and attempt to keep the connection open
-.TP
-\fB\-connect=\fR
-Connect only to the specified node(s)
-.TP
-\fB\-seednode=\fR
-Connect to a node to retrieve peer addresses, and disconnect
-.TP
-\fB\-externalip=\fR
-Specify your own public address
-.TP
-\fB\-onlynet=\fR
-Only connect to nodes in network (IPv4, IPv6 or Tor)
-.TP
-\fB\-discover\fR
-Discover own IP address (default: 1 when listening and no \fB\-externalip\fR)
-.TP
-\fB\-checkpoints\fR
-Only accept block chain matching built\-in checkpoints (default: 1)
-.TP
-\fB\-listen\fR
-Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
-.TP
-\fB\-bind=\fR
-Bind to given address and always listen on it. Use [host]:port notation for IPv6
-.TP
-\fB\-dnsseed\fR
-Find peers using DNS lookup (default: 1 unless \fB\-connect\fR)
-.TP
-\fB\-banscore=\fR
-Threshold for disconnecting misbehaving peers (default: 100)
-.TP
-\fB\-bantime=\fR
-Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
-.TP
-\fB\-maxreceivebuffer=\fR
-Maximum per\-connection receive buffer, *1000 bytes (default: 5000)
-.TP
-\fB\-maxsendbuffer=\fR
-Maximum per\-connection send buffer, *1000 bytes (default: 1000)
-.TP
-\fB\-upnp\fR
-Use UPnP to map the listening port (default: 1 when listening)
-.TP
-\fB\-paytxfee=\fR
-Fee per KB to add to transactions you send
-.TP
-\fB\-server\fR
-Accept command line and JSON\-RPC commands
-.TP
-\fB\-testnet\fR
-Use the test network
-.TP
-\fB\-debug\fR
-Output extra debugging information. Implies all other \fB\-debug\fR* options
-.TP
-\fB\-debugnet\fR
-Output extra network debugging information
-.TP
-\fB\-logtimestamps\fR
-Prepend debug output with timestamp
-.TP
-\fB\-shrinkdebugfile\fR
-Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
-.TP
-\fB\-printtoconsole\fR
-Send trace/debug info to console instead of debug.log file
-.TP
-\fB\-rpcuser=\fR
-Username for JSON\-RPC connections
-.TP
-\fB\-rpcpassword=\fR
-Password for JSON\-RPC connections
-.TP
-\fB\-rpcport=\fR
-Listen for JSON\-RPC connections on (default: 51473 or testnet: 51475)
-.TP
-\fB\-rpcallowip=\fR
-Allow JSON\-RPC connections from specified IP address
-.TP
-\fB\-rpcthreads=\fR
-Set the number of threads to service RPC calls (default: 4)
-.TP
-\fB\-blocknotify=\fR
-Execute command when the best block changes (%s in cmd is replaced by block hash)
-.TP
-\fB\-walletnotify=\fR
-Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
-.TP
-\fB\-alertnotify=\fR
-Execute command when a relevant alert is received (%s in cmd is replaced by message)
-.TP
-\fB\-upgradewallet\fR
-Upgrade wallet to latest format
-.TP
-\fB\-keypool=\fR
-Set key pool size to (default: 100)
-.TP
-\fB\-rescan\fR
-Rescan the block chain for missing wallet transactions
-.TP
-\fB\-salvagewallet\fR
-Attempt to recover private keys from a corrupt wallet.dat
-.TP
-\fB\-checkblocks=\fR
-How many blocks to check at startup (default: 288, 0 = all)
-.TP
-\fB\-checklevel=\fR
-How thorough the block verification is (0\-4, default: 3)
-.TP
-\fB\-txindex\fR
-Maintain a full transaction index (default: 0)
-.TP
-\fB\-loadblock=\fR
-Imports blocks from external blk000??.dat file
-.TP
-\fB\-reindex\fR
-Rebuild block chain index from current blk000??.dat files
-.TP
-\fB\-par=\fR
-Set the number of script verification threads (1\-16, 0=auto, default: 0)
-.SS "Block creation options:"
-.TP
-\fB\-blockminsize=\fR
-Set minimum block size in bytes (default: 0)
-.TP
-\fB\-blockmaxsize=\fR
-Set maximum block size in bytes (default: 250000)
-.HP
-\fB\-blockprioritysize=\fR Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
-.PP
-SSL options: (see the Bitcoin Wiki for SSL setup instructions)
-.TP
-\fB\-rpcssl\fR
-Use OpenSSL (https) for JSON\-RPC connections
-.TP
-\fB\-rpcsslcertificatechainfile=\fR
-Server certificate file (default: server.cert)
-.TP
-\fB\-rpcsslprivatekeyfile=\fR
-Server private key (default: server.pem)
-.TP
-\fB\-rpcsslciphers=\fR
-Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
-.SS "UI options:"
-.TP
-\fB\-lang=\fR
-Set language, for example "de_DE" (default: system locale)
-.TP
-\fB\-min\fR
-Start minimized
-.TP
-\fB\-splash\fR
-Show splash screen on startup (default: 1)
diff --git a/contrib/debian/manpages/pivx.conf.5 b/contrib/debian/manpages/pivx.conf.5
deleted file mode 100755
index c64a5b618..000000000
--- a/contrib/debian/manpages/pivx.conf.5
+++ /dev/null
@@ -1,89 +0,0 @@
-.TH VITAE.CONF "5" "January 2011" "vitae.conf 3.19"
-.SH NAME
-vitae.conf \- vitae configuration file
-.SH SYNOPSIS
-All command-line options (except for '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
-.TP
-The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
-.TP
-The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, vitaed(1) will look for a file named vitae.conf(5) in the vitae data directory, but both the data directory and the configuration file path may be changed using the '\-datadir' and '\-conf' command-line arguments.
-.SH LOCATION
-vitae.conf should be located in $HOME/.vitae
-.SH NETWORK-RELATED SETTINGS
-.TP
-.TP
-\fBtestnet=\fR[\fI'1'\fR|\fI'0'\fR]
-Enable or disable run on the test network instead of the real *vitae* network.
-.TP
-\fBproxy=\fR\fI'127.0.0.1:9050'\fR
-Connect via a socks4 proxy.
-.TP
-\fBaddnode=\fR\fI'10.0.0.2:51472'\fR
-Use as many *addnode=* settings as you like to connect to specific peers.
-.TP
-\fBconnect=\fR\fI'10.0.0.1:51472'\fR
-Use as many *connect=* settings as you like to connect ONLY to specific peers.
-.TP
-\fRmaxconnections=\fR\fI'value'\fR
-Maximum number of inbound+outbound connections.
-.SH JSON-RPC OPTIONS
-.TP
-\fBserver=\fR[\fI'1'\fR|\fI'0'\fR]
-Tells *vitae* to accept or not accept JSON-RPC commands.
-.TP
-\fBrpcuser=\fR\fI'username'\fR
-You must set *rpcuser* to secure the JSON-RPC api.
-.TP
-\fBrpcpassword=\fR\fI'password'\fR
-You must set *rpcpassword* to secure the JSON-RPC api.
-.TP
-\fBrpcallowip=\fR\fI'192.168.1.*'\fR
-By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
-.TP
-\fBrpcport=\fR\fI'51473'\fR
-Listen for RPC connections on this TCP port.
-.TP
-\fBrpcconnect=\fR\fI'127.0.0.1'\fR
-You can use *vitae* or *vitaed(1)* to send commands to *vitae*/*vitaed(1)* running on another host using this option.
-.TP
-\fBrpcssl=\fR\fI'1'\fR
-Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *vitae* '\-server' or *vitaed(1)*. Example of OpenSSL settings used when *rpcssl*='1':
-.TP
-\fB\-rpcsslciphers=\fR
-Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
-.TP
-\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
-.TP
-\fBrpcsslprivatekeyfile=\fR\fI'server.pem'\fR
-.TP
-.SH MISCELLANEOUS OPTIONS
-.TP
-\fBgen=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable attempt to generate VITs.
-.TP
-\fB4way=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable use SSE instructions to try to generate VITs faster.
-.TP
-\fBkeypool=\fR\fI'100'\fR
-Pre-generate this many public/private key pairs, so wallet backups will be valid for both prior transactions and several dozen future transactions.
-.TP
-\fBpaytxfee=\fR\fI'0.00'\fR
-Pay an optional transaction fee every time you send VITs. Transactions with fees are more likely than free transactions to be included in generated blocks, so may be validated sooner.
-.TP
-\fBallowreceivebyip=\fR\fI'1'\fR
-Allow direct connections for the 'pay via IP address' feature.
-.TP
-.SH USER INTERFACE OPTIONS
-.TP
-\fBmin=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable start vitaed minimized.
-.TP
-\fBminimizetotray=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable minimize to the system tray.
-.SH "SEE ALSO"
-vitaed(1)
-.SH AUTHOR
-This manual page was written by Micah Anderson for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
-
-On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
-
diff --git a/contrib/debian/manpages/pivxd.1 b/contrib/debian/manpages/pivxd.1
deleted file mode 100755
index 24e587c63..000000000
--- a/contrib/debian/manpages/pivxd.1
+++ /dev/null
@@ -1,209 +0,0 @@
-.TH VITD "1" "February 2017" "vitaed 2.1.4.1"
-.SH NAME
-VITAE \- peer-to-peer network based digital currency
-.SH SYNOPSIS
-vitaed [options] [params]
-.TP
-vitaed [options] help \- Get help for a command
-.SH DESCRIPTION
-This manual page documents the vitaed program. VITAE is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
-
-VITAE can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the VITAE system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
-
-.SH OPTIONS
-.TP
-\fB\-conf=\fR
-Specify configuration file (default: vitae.conf)
-.TP
-\fB\-gen\fR
-Generate coins
-.TP
-\fB\-gen\fR=\fI0\fR
-Don't generate coins
-.TP
-\fB\-min\fR
-Start minimized
-.TP
-\fB\-datadir=\fR
-Specify data directory
-.TP
-\fB\-proxy=\fR
-Connect through SOCKS5 proxy
-.TP
-\fB\-addnode=\fR
-Add a node to connect to
-.TP
-\fB\-connect=\fR
-Connect only to the specified node
-.TP
-\fB\-paytxfee=\fR
-Fee per KB to add to transactions you send
-.TP
-\fB\-server\fR
-Accept command line and JSON\-RPC commands
-.TP
-\fB\-daemon\fR
-Run in the background as a daemon and accept commands
-.TP
-\fB\-testnet\fR
-Use the test network
-.TP
-\fB\-rpcuser=\fR
-Username for JSON\-RPC connections
-.TP
-\fB\-rpcpassword=\fR
-Password for JSON\-RPC connections
-.TP
-\fB\-rpcport=\fR
-Listen for JSON\-RPC connections on
-.TP
-\fB\-rpcallowip=\fR
-Allow JSON\-RPC connections from specified IP address
-.TP
-\fB\-rpcconnect=\fR
-Send commands to node running on
-.PP
-SSL options: (see the Bitcoin Wiki for SSL setup instructions)
-.TP
-\fB\-rpcssl\fR=\fI1\fR
-Use OpenSSL (https) for JSON\-RPC connections
-.TP
-\fB\-rpcsslcertificatchainfile=\fR
-Server certificate file (default: server.cert)
-.TP
-\fB\-rpcsslprivatekeyfile=\fR
-Server private key (default: server.pem)
-.TP
-\fB\-rpcsslciphers=\fR
-Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
-.TP
-\-?
-This help message
-.SH COMMANDS
-.TP
-\fBbackupwallet 'destination'\fR
-Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename.
-.TP
-\fBgetaccount 'vitaeaddress'\fR
-Returns the account associated with the given address.
-.TP
-\fBsetaccount 'vitaeaddress' ['account']\fR
-Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
-.TP
-\fBgetaccountaddress 'account'\fR
-Returns a new vitae address for 'account'.
-.TP
-\fBgetaddressesbyaccount 'account'\fR
-Returns the list of addresses associated with the given 'account'.
-.TP
-\fBgetbalance 'account'\fR
-Returns the server's available balance, or the balance for 'account'.
-.TP
-\fBgetblockcount\fR
-Returns the number of blocks in the longest block chain.
-.TP
-\fBgetblocknumber\fR
-Returns the block number of the latest block in the longest block chain.
-.TP
-\fBgetconnectioncount\fR
-Returns the number of connections to other nodes.
-.TP
-\fBgetdifficulty\fR
-Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
-.TP
-\fBgetgenerate\fR
-Returns boolean true if server is trying to generate VITAE, false otherwise.
-.TP
-\fBsetgenerate 'generate' ['genproclimit']\fR
-Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
-.TP
-\fBgethashespersec\fR
-Returns a recent hashes per second performance measurement while generating.
-.TP
-\fBgetinfo\fR
-Returns an object containing server information.
-.TP
-\fBgetnewaddress 'account'\fR
-Returns a new vitae address for receiving payments. If 'account' is specified (recommended), it is added to the address book so payments received with the address will be credited to 'account'.
-.TP
-\fBgetreceivedbyaccount 'account' ['minconf=1']\fR
-Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
-.TP
-\fBgetreceivedbyaddress 'vitaeaddress' ['minconf=1']\fR
-Returns the total amount received by 'vitaeaddress' in transactions with at least ['minconf'] confirmations.
-.TP
-\fBgettransaction 'txid'\fR
-Returns information about a specific transaction, given hexadecimal transaction ID.
-.TP
-\fBgetwork 'data'\fR
-If 'data' is specified, tries to solve the block and returns true if it was successful. If 'data' is not specified, returns formatted hash 'data' to work on:
-
- "midstate" : precomputed hash state after hashing the first half of the data.
- "data" : block data.
- "hash1" : formatted hash buffer for second hash.
- "target" : little endian hash target.
-.TP
-\fBhelp 'command'\fR
-List commands, or get help for a command.
-.TP
-\fBlistaccounts ['minconf=1']\fR
-List accounts and their current balances.
- *note: requires vitae 1.0.2.1 or later.
-.TP
-\fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
-['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
-
- "account" : the account of the receiving address.
- "amount" : total amount received by the address.
- "confirmations" : number of confirmations of the most recent transaction included.
-.TP
-\fBlistreceivedbyaddress ['minconf=1'] ['includeempty=false']\fR
-['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
-
- "address" : receiving address.
- "account" : the account of the receiving address.
- "amount" : total amount received by the address.
- "confirmations" : number of confirmations of the most recent transaction included.
-.TP
-\fBlisttransactions 'account' ['count=10']\fR
-Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
-
- "category" : will be generate, send, receive, or move.
- "amount" : amount of transaction.
- "fee" : Fee (if any) paid (only for send transactions).
- "confirmations" : number of confirmations (only for generate/send/receive).
- "txid" : transaction ID (only for generate/send/receive).
- "otheraccount" : account funds were moved to or from (only for move).
- "message" : message associated with transaction (only for send).
- "to" : message-to associated with transaction (only for send).
-
- *note: requires vitae 1.0.2.1 or later.
-.TP
-\fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
-Moves funds between accounts.
-.TP
-\fBsendfrom* <'account'> <'vitaeaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
-Sends amount from account's balance to 'vitaeaddress'. This method will fail if there is less than amount VITAE with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
-.TP
-\fBsendtoaddress 'vitaeaddress' 'amount' ['comment'] ['comment-to']\fR
-Sends amount from the server's available balance to 'vitaeaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
-.TP
-\fBstop\fR
-Stops the vitae server.
-.TP
-\fBvalidateaddress 'vitaeaddress'\fR
-Checks that 'vitaeaddress' looks like a proper VITAE address. Returns an object containing:
-
- "isvalid" : true or false.
- "ismine" : true if the address is in the server's wallet.
- "address" : vitaeaddress.
-
- *note: ismine and address are only returned if the address is valid.
-
-.SH "SEE ALSO"
-vitae.conf(5)
-.SH AUTHOR
-This manual page was written by Micah Anderson for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
-
-On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
-
diff --git a/contrib/debian/pivx-qt.desktop b/contrib/debian/pivx-qt.desktop
old mode 100755
new mode 100644
index d38c2a135..88ac3499a
--- a/contrib/debian/pivx-qt.desktop
+++ b/contrib/debian/pivx-qt.desktop
@@ -1,12 +1,13 @@
[Desktop Entry]
-Encoding=UTF-8
-Name=VITAE
-Comment=VITAE P2P Cryptocurrency
-Comment[fr]=VITAE, monnaie virtuelle cryptographique pair à pair
-Comment[tr]=VITAE, eşten eşe kriptografik sanal para birimi
-Exec=vitae-qt %u
+Version=1.0
+Name=PIVX Core
+Comment=PIVX P2P Cryptocurrency
+Comment[fr]=PIVX, monnaie virtuelle cryptographique pair à pair
+Comment[tr]=PIVX, eşten eşe kriptografik sanal para birimi
+Exec=pivx-qt %u
Terminal=false
Type=Application
-Icon=vitae128
-MimeType=x-scheme-handler/vitae;
+Icon=pivx128
+MimeType=x-scheme-handler/pivx;
Categories=Office;Finance;
+StartupWMClass=Pivx-qt
diff --git a/contrib/debian/pivx-qt.install b/contrib/debian/pivx-qt.install
old mode 100755
new mode 100644
index 2c418b5d9..e0e1ef9ce
--- a/contrib/debian/pivx-qt.install
+++ b/contrib/debian/pivx-qt.install
@@ -1,6 +1,6 @@
-usr/local/bin/vitae-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/vitae-qt.desktop usr/share/applications
-debian/vitae-qt.protocol usr/share/kde4/services/
+usr/local/bin/pivx-qt usr/bin
+share/pixmaps/pivx32.xpm usr/share/pixmaps
+share/pixmaps/pivx16.xpm usr/share/pixmaps
+share/pixmaps/pivx128.png usr/share/pixmaps
+debian/pivx-qt.desktop usr/share/applications
+debian/pivx-qt.protocol usr/share/kde4/services/
diff --git a/contrib/debian/pivx-qt.manpages b/contrib/debian/pivx-qt.manpages
new file mode 100644
index 000000000..9d24ea2a7
--- /dev/null
+++ b/contrib/debian/pivx-qt.manpages
@@ -0,0 +1 @@
+doc/man/pivx-qt.1
diff --git a/contrib/debian/pivxd.bash-completion b/contrib/debian/pivxd.bash-completion
old mode 100755
new mode 100644
index 7f1fc1c0f..53abdf226
--- a/contrib/debian/pivxd.bash-completion
+++ b/contrib/debian/pivxd.bash-completion
@@ -1 +1,2 @@
-contrib/vitaed.bash-completion vitaed
+contrib/pivxd.bash-completion pivxd
+contrib/pivx-cli.bash-completion pivx-cli
diff --git a/contrib/debian/pivxd.install b/contrib/debian/pivxd.install
old mode 100755
new mode 100644
index 634fa855f..4d848b643
--- a/contrib/debian/pivxd.install
+++ b/contrib/debian/pivxd.install
@@ -1,2 +1,3 @@
-usr/local/bin/vitaed usr/bin
-usr/local/bin/vitae-cli usr/bin
+usr/local/bin/pivxd usr/bin
+usr/local/bin/pivx-cli usr/bin
+debian/examples/pivx.conf etc/pivx
diff --git a/contrib/debian/pivxd.manpages b/contrib/debian/pivxd.manpages
old mode 100755
new mode 100644
index ac842106c..87128f24c
--- a/contrib/debian/pivxd.manpages
+++ b/contrib/debian/pivxd.manpages
@@ -1,2 +1,2 @@
-debian/manpages/vitaed.1
-debian/manpages/vitae.conf.5
+doc/man/pivxd.1
+doc/man/pivx-cli.1
diff --git a/contrib/debian/pivxd.postinst b/contrib/debian/pivxd.postinst
new file mode 100644
index 000000000..c76afa777
--- /dev/null
+++ b/contrib/debian/pivxd.postinst
@@ -0,0 +1,28 @@
+
+#!/bin/sh
+
+# setup pivx account, homedir etc
+
+set -e
+
+BCUSER="pivx"
+BCHOME="/var/lib/pivx"
+
+if [ "$1" = "configure" ]; then
+ # Add pivx user/group - this will gracefully abort if the user already exists.
+ # A homedir is never created.
+ set +e
+ adduser --system --home "${BCHOME}" --no-create-home --group "${BCUSER}" 2>/dev/null
+ set -e
+
+ # If the homedir does not already exist, create it with proper
+ # ownership and permissions.
+ if [ ! -d "${BCHOME}" ]; then
+ mkdir -m 0750 -p "${BCHOME}"
+ chown "${BCUSER}:${BCUSER}" "${BCHOME}"
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/pivxd.postrm b/contrib/debian/pivxd.postrm
new file mode 100644
index 000000000..f287afd17
--- /dev/null
+++ b/contrib/debian/pivxd.postrm
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# setup pivx account, homedir etc
+
+set -e
+
+BCUSER="pivx"
+BCHOME="/var/lib/pivx"
+
+if [ "$1" = "purge" ]; then
+
+ # The pivx user is left in place for now - This is to ensure that a new user
+ # will not inherit the users UID/GID and inadvertently gain access to wallets etc
+
+ # The homedir is also left intact to ensure that we don't accidentally delete a
+ # wallet or something equally important
+
+ echo
+ echo "#"
+ echo "# The pivx user (${BCUSER}) and data dir (${BCHOME})"
+ echo "# were left intact."
+ echo "#"
+ echo "# Make sure to check \"${BCHOME}\" for wallets and other"
+ echo "# important bits."
+ echo "#"
+ echo "# After backing up all vital data, cleanup can be completed"
+ echo "# by running: sudo userdel -r ${BCUSER}"
+ echo "#"
+ echo
+
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/pivxd.service b/contrib/debian/pivxd.service
new file mode 100644
index 000000000..0864f7806
--- /dev/null
+++ b/contrib/debian/pivxd.service
@@ -0,0 +1,45 @@
+# It is not recommended to modify this file in-place, because it will
+# be overwritten during package upgrades. If you want to add further
+# options or overwrite existing ones then use
+# $ systemctl edit pivxd.service
+# See "man systemd.service" for details.
+
+# Note that almost all daemon options could be specified in
+# /etc/pivx/pivx.conf
+
+[Unit]
+Description=PIVX daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/pivxd -daemon -datadir=/var/lib/pivx -conf=/etc/pivx/pivx.conf -pid=/run/pivxd/pivxd.pid
+# Creates /run/pivxd owned by pivx
+RuntimeDirectory=pivxd
+User=pivx
+Type=forking
+PIDFile=/run/pivxd/pivxd.pid
+Restart=on-failure
+
+# Hardening measures
+####################
+
+# Provide a private /tmp and /var/tmp.
+PrivateTmp=true
+
+# Mount /usr, /boot/ and /etc read-only for the process.
+ProtectSystem=full
+
+# Disallow the process and all of its children to gain
+# new privileges through execve().
+NoNewPrivileges=true
+
+# Use a new /dev namespace only populated with API pseudo devices
+# such as /dev/null, /dev/zero and /dev/random.
+PrivateDevices=true
+
+# Deny the creation of writable and executable memory mappings.
+# Commented out as it's not supported on Debian 8 or Ubuntu 16.04 LTS
+#MemoryDenyWriteExecute=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/debian/rules b/contrib/debian/rules
index f1c29d618..21e07c82f 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -18,7 +18,21 @@ override_dh_auto_clean:
# Yea, autogen should be run on the source archive, but I like doing git archive
override_dh_auto_configure:
./autogen.sh
- ./configure
+ ./configure --with-gui=qt5
override_dh_auto_test:
make check
+
+# No SysV or Upstart init scripts included
+override_dh_installinit:
+ dh_installinit \
+ --noscripts
+
+# Don’t enable service by default
+override_dh_systemd_enable:
+ dh_systemd_enable \
+ --no-enable
+
+# Restart after upgrade
+override_dh_systemd_start:
+ dh_systemd_start \
diff --git a/contrib/debian/watch b/contrib/debian/watch
index c96d2f8e7..56e2099ae 100755
--- a/contrib/debian/watch
+++ b/contrib/debian/watch
@@ -1,7 +1,5 @@
# 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/;s/\-src//,dversionmangle=s/~dfsg\d*// \
- http://sf.net/bitcoin/bitcoin-(\d.*)-linux\.tar\.gz debian
opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
- http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
+ http://githubredir.debian.net/github/pivx-project/pivx v(.*).tar.gz
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
index 7609ee859..31088d4da 100755
--- a/contrib/devtools/README.md
+++ b/contrib/devtools/README.md
@@ -1,5 +1,5 @@
Contents
-===========
+========
This directory contains tools for developers working on this repository.
check-doc.py
@@ -8,6 +8,93 @@ check-doc.py
Check if all command line args are documented. The return value indicates the
number of undocumented args.
+clang-format-diff.py
+===================
+
+A script to format unified git diffs according to [.clang-format](../../src/.clang-format).
+
+Requires `clang-format`, installed e.g. via `brew install clang-format` on macOS.
+
+For instance, to format the last commit with 0 lines of context,
+the script should be called from the git root folder as follows.
+
+```
+git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
+```
+
+copyright\_header.py
+====================
+
+Provides utilities for managing copyright headers of `The VITAE
+developers` in repository source files. It has three subcommands:
+
+```
+$ ./copyright_header.py report [verbose]
+$ ./copyright_header.py update
+$ ./copyright_header.py insert
+```
+Running these subcommands without arguments displays a usage string.
+
+copyright\_header.py report \ [verbose]
+---------------------------------------------------------
+
+Produces a report of all copyright header notices found inside the source files
+of a repository. Useful to quickly visualize the state of the headers.
+Specifying `verbose` will list the full filenames of files of each category.
+
+copyright\_header.py update \ [verbose]
+---------------------------------------------------------
+Updates all the copyright headers of `The VITAE developers` which were
+changed in a year more recent than is listed. For example:
+```
+// Copyright (c) - The VITAE developers
+```
+will be updated to:
+```
+// Copyright (c) - The VITAE developers
+```
+where `` is obtained from the `git log` history.
+
+This subcommand also handles copyright headers that have only a single year. In
+those cases:
+```
+// Copyright (c) The VITAE developers
+```
+will be updated to:
+```
+// Copyright (c) - The VITAE developers
+```
+where the update is appropriate.
+
+copyright\_header.py insert \
+------------------------------------
+Inserts a copyright header for `The VITAE developers` at the top of the
+file in either Python or C++ style as determined by the file extension. If the
+file is a Python file and it has `#!` starting the first line, the header is
+inserted in the line below it.
+
+The copyright dates will be set to be `-` where
+`` is according to the `git log` history. If
+`` is equal to ``, it will be set as a single
+year rather than two hyphenated years.
+
+If the file already has a copyright for `The VITAE developers`, the
+script will exit.
+
+gen-manpages.sh
+===============
+
+A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
+This requires help2man which can be found at: https://www.gnu.org/software/help2man/
+
+With in-tree builds this tool can be run from any directory within the
+repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
+example:
+
+```bash
+BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
+```
+
github-merge.py
===============
@@ -40,43 +127,44 @@ Configuring the github-merge tool for the VITAE repository is done in the follow
git config githubmerge.repository VITAE-Project/VITAE
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
- git config --global user.signingkey mykeyid (if you want to GPG sign)
-
-optimize-pngs.py
-================
-
-A script to optimize png files in the VITAE
-repository (requires pngcrush).
+ git config --global user.signingkey mykeyid
-fix-copyright-headers.py
-===========================
+Authentication (optional)
+--------------------------
-Every year newly updated files need to have its copyright headers updated to reflect the current year.
-If you run this script from src/ it will automatically update the year on the copyright header for all
-.cpp and .h files if these have a git commit from the current year.
+The API request limit for unauthenticated requests is quite low, but the
+limit for authenticated requests is much higher. If you start running
+into rate limiting errors it can be useful to set an authentication token
+so that the script can authenticate requests.
-For example a file changed in 2014 (with 2014 being the current year):
-```// Copyright (c) 2009-2013 The Bitcoin developers```
+- First, go to [Personal access tokens](https://github.com/settings/tokens).
+- Click 'Generate new token'.
+- Fill in an arbitrary token description. No further privileges are needed.
+- Click the `Generate token` button at the bottom of the form.
+- Copy the generated token (should be a hexadecimal string)
-would be changed to:
-```// Copyright (c) 2009-2014 The Bitcoin developers```
+Then do:
-logprint-scanner.py
-===================
-LogPrint and LogPrintf are known to throw exceptions when the number of arguments supplied to the
-LogPrint(f) function is not the same as the number of format specifiers.
+ git config --global user.ghtoken "pasted token"
-Ideally, the presentation of this mismatch would be at compile-time, but instead it is at run-time.
+Create and verify timestamps of merge commits
+---------------------------------------------
+To create or verify timestamps on the merge commits, install the OpenTimestamps
+client via `pip3 install opentimestamps-client`. Then, dowload the gpg wrapper
+`ots-git-gpg-wrapper.sh` and set it as git's `gpg.program`. See
+[the ots git integration documentation](https://github.com/opentimestamps/opentimestamps-client/blob/master/doc/git-integration.md#usage)
+for further details.
-This script scans the src/ directory recursively and looks in each .cpp/.h file and identifies all
-errorneous LogPrint(f) calls where the number of arguments do not match.
+optimize-pngs.py
+================
-The filename and line number of the errorneous occurence is given.
+A script to optimize png files in the VITAE
+repository (requires pngcrush).
-The script returns with the number of erroneous occurences as an error code to help facilitate
-integration with a continuous integration system.
+security-check.py and test-security-check.py
+============================================
-The script can be ran from any working directory inside the git repository.
+Perform basic ELF security checks on a series of executables.
symbol-check.py
===============
@@ -87,7 +175,7 @@ still compatible with the minimum supported Linux distribution versions.
Example usage after a gitian build:
- find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
+ find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py
If only supported symbols are used the return value will be 0 and the output will be empty.
@@ -109,3 +197,14 @@ It will do the following automatically:
- add missing translations to the build system (TODO)
See doc/translation-process.md for more information.
+
+circular-dependencies.py
+========================
+
+Run this script from the root of the source tree (`src/`) to find circular dependencies in the source code.
+This looks only at which files include other files, treating the `.cpp` and `.h` file as one unit.
+
+Example usage:
+
+ cd .../src
+ ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}
diff --git a/contrib/devtools/check-doc.py b/contrib/devtools/check-doc.py
index ea77e9884..bf117e5c3 100755
--- a/contrib/devtools/check-doc.py
+++ b/contrib/devtools/check-doc.py
@@ -1,44 +1,47 @@
-#!/usr/bin/env python
-# Copyright (c) 2015-2016 The Bitcoin Core developers
+#!/usr/bin/env python3
+# 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.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
+
Author: @MarcoFalke
'''
from subprocess import check_output
import re
+import sys
FOLDER_GREP = 'src'
FOLDER_TEST = 'src/test/'
-CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/%s' % FOLDER_GREP
-CMD_GREP_ARGS = r"egrep -r -I '(map(Multi)?Args(\.count\(|\[)|Get(Bool)?Arg\()\"\-[^\"]+?\"' %s | grep -v '%s'" % (CMD_ROOT_DIR, FOLDER_TEST)
-CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' %s" % (CMD_ROOT_DIR)
+CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_GREP)
+CMD_GREP_ARGS = r"egrep -r -I '(map(Multi)?Args(\.count\(|\[)|Get(Bool)?Arg\()\"\-[^\"]+?\"' {} | grep -v '{}'".format(CMD_ROOT_DIR, FOLDER_TEST)
+CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' {}".format(CMD_ROOT_DIR)
REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
# list unsupported, deprecated and duplicate args as they need no documentation
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags', '-blockminsize', '-sendfreetransactions', '-checklevel', '-liquidityprovider', '-anonymizevitaeamount'])
def main():
- used = check_output(CMD_GREP_ARGS, shell=True)
- docd = check_output(CMD_GREP_DOCS, shell=True)
-
- args_used = set(re.findall(REGEX_ARG,used))
- args_docd = set(re.findall(REGEX_DOC,docd)).union(SET_DOC_OPTIONAL)
- args_need_doc = args_used.difference(args_docd)
- args_unknown = args_docd.difference(args_used)
-
- print "Args used : %s" % len(args_used)
- print "Args documented : %s" % len(args_docd)
- print "Args undocumented: %s" % len(args_need_doc)
- print args_need_doc
- print "Args unknown : %s" % len(args_unknown)
- print args_unknown
-
- exit(len(args_need_doc))
+ used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True)
+ docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True)
+
+ args_used = set(re.findall(re.compile(REGEX_ARG), used))
+ args_docd = set(re.findall(re.compile(REGEX_DOC), docd)).union(SET_DOC_OPTIONAL)
+ args_need_doc = args_used.difference(args_docd)
+ args_unknown = args_docd.difference(args_used)
+
+ print("Args used : {}".format(len(args_used)))
+ print("Args documented : {}".format(len(args_docd)))
+ print("Args undocumented: {}".format(len(args_need_doc)))
+ print(args_need_doc)
+ print("Args unknown : {}".format(len(args_unknown)))
+ print(args_unknown)
+
+ sys.exit(len(args_need_doc))
+
if __name__ == "__main__":
main()
diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py
new file mode 100755
index 000000000..73d82eb25
--- /dev/null
+++ b/contrib/devtools/circular-dependencies.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python3
+
+import sys
+import re
+
+MAPPING = {
+ 'core_read.cpp': 'core_io.cpp',
+ 'core_write.cpp': 'core_io.cpp',
+}
+
+# Directories with header-based modules, where the assumption that .cpp files
+# define functions and variables declared in corresponding .h files is
+# incorrect.
+HEADER_MODULE_PATHS = [
+ 'interfaces/'
+]
+
+def module_name(path):
+ if path in MAPPING:
+ path = MAPPING[path]
+ if any(path.startswith(dirpath) for dirpath in HEADER_MODULE_PATHS):
+ return path
+ if path.endswith(".h"):
+ return path[:-2]
+ if path.endswith(".c"):
+ return path[:-2]
+ if path.endswith(".cpp"):
+ return path[:-4]
+ return None
+
+files = dict()
+deps = dict()
+
+RE = re.compile("^#include \"(.*)\"")
+
+# Iterate over files, and create list of modules
+for arg in sys.argv[1:]:
+ module = module_name(arg)
+ if module is None:
+ print("Ignoring file %s (does not constitute module)\n" % arg)
+ else:
+ files[arg] = module
+ deps[module] = set()
+
+# Iterate again, and build list of direct dependencies for each module
+# TODO: implement support for multiple include directories
+for arg in sorted(files.keys()):
+ module = files[arg]
+ with open(arg, 'r', encoding="utf8") as f:
+ for line in f:
+ match = RE.match(line)
+ if match:
+ include = match.group(1)
+ included_module = module_name(include)
+ if included_module is not None and included_module in deps and included_module != module:
+ deps[module].add(included_module)
+
+# Loop to find the shortest (remaining) circular dependency
+have_cycle = False
+while True:
+ shortest_cycle = None
+ for module in sorted(deps.keys()):
+ # Build the transitive closure of dependencies of module
+ closure = dict()
+ for dep in deps[module]:
+ closure[dep] = []
+ while True:
+ old_size = len(closure)
+ old_closure_keys = sorted(closure.keys())
+ for src in old_closure_keys:
+ for dep in deps[src]:
+ if dep not in closure:
+ closure[dep] = closure[src] + [src]
+ if len(closure) == old_size:
+ break
+ # If module is in its own transitive closure, it's a circular dependency; check if it is the shortest
+ if module in closure and (shortest_cycle is None or len(closure[module]) + 1 < len(shortest_cycle)):
+ shortest_cycle = [module] + closure[module]
+ if shortest_cycle is None:
+ break
+ # We have the shortest circular dependency; report it
+ module = shortest_cycle[0]
+ print("Circular dependency: %s" % (" -> ".join(shortest_cycle + [module])))
+ # And then break the dependency to avoid repeating in other cycles
+ deps[shortest_cycle[-1]] = deps[shortest_cycle[-1]] - set([module])
+ have_cycle = True
+
+sys.exit(1 if have_cycle else 0)
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py
new file mode 100644
index 000000000..f322b3a88
--- /dev/null
+++ b/contrib/devtools/clang-format-diff.py
@@ -0,0 +1,166 @@
+#!/usr/bin/env python3
+#
+#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License.
+#
+# ============================================================
+#
+# University of Illinois/NCSA
+# Open Source License
+#
+# Copyright (c) 2007-2015 University of Illinois at Urbana-Champaign.
+# All rights reserved.
+#
+# Developed by:
+#
+# LLVM Team
+#
+# University of Illinois at Urbana-Champaign
+#
+# http://llvm.org
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal with
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+# of the Software, and to permit persons to whom the Software is furnished to do
+# so, subject to the following conditions:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimers.
+#
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimers in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of the LLVM Team, University of Illinois at
+# Urbana-Champaign, nor the names of its contributors may be used to
+# endorse or promote products derived from this Software without specific
+# prior written permission.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+# SOFTWARE.
+#
+# ============================================================
+#
+#===------------------------------------------------------------------------===#
+
+r"""
+ClangFormat Diff Reformatter
+============================
+
+This script reads input from a unified diff and reformats all the changed
+lines. This is useful to reformat all the lines touched by a specific patch.
+Example usage for git/svn users:
+
+ git diff -U0 HEAD^ | clang-format-diff.py -p1 -i
+ svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
+
+"""
+
+import argparse
+import difflib
+import io
+import re
+import subprocess
+import sys
+
+
+# Change this to the full path if clang-format is not on the path.
+binary = 'clang-format'
+
+
+def main():
+ parser = argparse.ArgumentParser(description=
+ 'Reformat changed lines in diff. Without -i '
+ 'option just output the diff that would be '
+ 'introduced.')
+ parser.add_argument('-i', action='store_true', default=False,
+ help='apply edits to files instead of displaying a diff')
+ parser.add_argument('-p', metavar='NUM', default=0,
+ help='strip the smallest prefix containing P slashes')
+ parser.add_argument('-regex', metavar='PATTERN', default=None,
+ help='custom pattern selecting file paths to reformat '
+ '(case sensitive, overrides -iregex)')
+ parser.add_argument('-iregex', metavar='PATTERN', default=
+ r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto'
+ r'|protodevel|java)',
+ help='custom pattern selecting file paths to reformat '
+ '(case insensitive, overridden by -regex)')
+ parser.add_argument('-sort-includes', action='store_true', default=False,
+ help='let clang-format sort include blocks')
+ parser.add_argument('-v', '--verbose', action='store_true',
+ help='be more verbose, ineffective without -i')
+ args = parser.parse_args()
+
+ # Extract changed lines for each file.
+ filename = None
+ lines_by_file = {}
+ for line in sys.stdin:
+ match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
+ if match:
+ filename = match.group(2)
+ if filename is None:
+ continue
+
+ if args.regex is not None:
+ if not re.match('^%s$' % args.regex, filename):
+ continue
+ else:
+ if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
+ continue
+
+ match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
+ if match:
+ start_line = int(match.group(1))
+ line_count = 1
+ if match.group(3):
+ line_count = int(match.group(3))
+ if line_count == 0:
+ continue
+ end_line = start_line + line_count - 1
+ lines_by_file.setdefault(filename, []).extend(
+ ['-lines', str(start_line) + ':' + str(end_line)])
+
+ # Reformat files containing changes in place.
+ for filename, lines in lines_by_file.items():
+ if args.i and args.verbose:
+ print('Formatting {}'.format(filename))
+ command = [binary, filename]
+ if args.i:
+ command.append('-i')
+ if args.sort_includes:
+ command.append('-sort-includes')
+ command.extend(lines)
+ command.extend(['-style=file', '-fallback-style=none'])
+ p = subprocess.Popen(command,
+ stdout=subprocess.PIPE,
+ stderr=None,
+ stdin=subprocess.PIPE,
+ universal_newlines=True)
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ sys.exit(p.returncode)
+
+ if not args.i:
+ with open(filename, encoding="utf8") as f:
+ code = f.readlines()
+ formatted_code = io.StringIO(stdout).readlines()
+ diff = difflib.unified_diff(code, formatted_code,
+ filename, filename,
+ '(before formatting)', '(after formatting)')
+ diff_string = ''.join(diff)
+ if len(diff_string) > 0:
+ sys.stdout.write(diff_string)
+
+if __name__ == '__main__':
+ main()
diff --git a/contrib/devtools/commit-script-check.sh b/contrib/devtools/commit-script-check.sh
new file mode 100644
index 000000000..1c9dbc7f6
--- /dev/null
+++ b/contrib/devtools/commit-script-check.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copyright (c) 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.
+
+# This simple script checks for commits beginning with: scripted-diff:
+# If found, looks for a script between the lines -BEGIN VERIFY SCRIPT- and
+# -END VERIFY SCRIPT-. If no ending is found, it reads until the end of the
+# commit message.
+
+# The resulting script should exactly transform the previous commit into the current
+# one. Any remaining diff signals an error.
+
+if test "x$1" = "x"; then
+ echo "Usage: $0 ..."
+ exit 1
+fi
+
+RET=0
+PREV_BRANCH=`git name-rev --name-only HEAD`
+PREV_HEAD=`git rev-parse HEAD`
+for i in `git rev-list --reverse $1`; do
+ if git rev-list -n 1 --pretty="%s" $i | grep -q "^scripted-diff:"; then
+ git checkout --quiet $i^ || exit
+ SCRIPT="`git rev-list --format=%b -n1 $i | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d'`"
+ if test "x$SCRIPT" = "x"; then
+ echo "Error: missing script for: $i"
+ echo "Failed"
+ RET=1
+ else
+ echo "Running script for: $i"
+ echo "$SCRIPT"
+ eval "$SCRIPT"
+ git --no-pager diff --exit-code $i && echo "OK" || (echo "Failed"; false) || RET=1
+ fi
+ git reset --quiet --hard HEAD
+ else
+ if git rev-list "--format=%b" -n1 $i | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
+ echo "Error: script block marker but no scripted-diff in title"
+ echo "Failed"
+ RET=1
+ fi
+ fi
+done
+git checkout --quiet $PREV_BRANCH 2>/dev/null || git checkout --quiet $PREV_HEAD
+exit $RET
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
new file mode 100644
index 000000000..e5cc02032
--- /dev/null
+++ b/contrib/devtools/copyright_header.py
@@ -0,0 +1,620 @@
+#!/usr/bin/env python3
+# Copyright (c) 2016-2018 The Bitcoin Core developers
+# Copyright (c) 2018 The PIVX developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+import re
+import fnmatch
+import sys
+import subprocess
+import datetime
+import os
+
+################################################################################
+# file filtering
+################################################################################
+
+EXCLUDE = [
+ # auto generated:
+ 'src/qt/pivxstrings.cpp',
+ 'src/chainparamsseeds.h',
+ # other external copyrights:
+ 'src/tinyformat.h',
+ 'src/crypto/scrypt.cpp',
+ 'test/functional/test_framework/bignum.py',
+ # python init:
+ '*__init__.py',
+]
+EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE]))
+
+EXCLUDE_DIRS = [
+ # git subtrees
+ "src/crypto/ctaes/",
+ "src/leveldb/",
+ "src/secp256k1/",
+ "src/univalue/",
+]
+
+INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.py']
+INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE]))
+
+def applies_to_file(filename):
+ for excluded_dir in EXCLUDE_DIRS:
+ if filename.startswith(excluded_dir):
+ return False
+ return ((EXCLUDE_COMPILED.match(filename) is None) and
+ (INCLUDE_COMPILED.match(filename) is not None))
+
+################################################################################
+# obtain list of files in repo according to INCLUDE and EXCLUDE
+################################################################################
+
+GIT_LS_CMD = 'git ls-files --full-name'.split(' ')
+GIT_TOPLEVEL_CMD = 'git rev-parse --show-toplevel'.split(' ')
+
+def call_git_ls(base_directory):
+ out = subprocess.check_output([*GIT_LS_CMD, base_directory])
+ return [f for f in out.decode("utf-8").split('\n') if f != '']
+
+def call_git_toplevel():
+ "Returns the absolute path to the project root"
+ return subprocess.check_output(GIT_TOPLEVEL_CMD).strip().decode("utf-8")
+
+def get_filenames_to_examine(base_directory):
+ "Returns an array of absolute paths to any project files in the base_directory that pass the include/exclude filters"
+ root = call_git_toplevel()
+ filenames = call_git_ls(base_directory)
+ return sorted([os.path.join(root, filename) for filename in filenames if
+ applies_to_file(filename)])
+
+################################################################################
+# define and compile regexes for the patterns we are looking for
+################################################################################
+
+
+COPYRIGHT_WITH_C = 'Copyright \(c\)'
+COPYRIGHT_WITHOUT_C = 'Copyright'
+ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C)
+
+YEAR = "20[0-9][0-9]"
+YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
+YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR)
+ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST)
+ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE,
+ ANY_YEAR_STYLE))
+
+ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE)
+
+def compile_copyright_regex(copyright_style, year_style, name):
+ return re.compile('%s %s,? %s' % (copyright_style, year_style, name))
+
+EXPECTED_HOLDER_NAMES = [
+ "Satoshi Nakamoto\n",
+ "The Bitcoin Core developers\n",
+ "The Bitcoin Core developers \n",
+ "Bitcoin Core Developers\n",
+ "the Bitcoin Core developers\n",
+ "The Bitcoin developers\n",
+ "The LevelDB Authors\. All rights reserved\.\n",
+ "BitPay Inc\.\n",
+ "BitPay, Inc\.\n",
+ "University of Illinois at Urbana-Champaign\.\n",
+ "MarcoFalke\n",
+ "Pieter Wuille\n",
+ "Pieter Wuille +\*\n",
+ "Pieter Wuille, Gregory Maxwell +\*\n",
+ "Pieter Wuille, Andrew Poelstra +\*\n",
+ "Ian Miers, Christina Garman and Matthew Green\n",
+ "Andrew Poelstra +\*\n",
+ "Wladimir J. van der Laan\n",
+ "Jeff Garzik\n",
+ "Diederik Huys, Pieter Wuille +\*\n",
+ "Thomas Daede, Cory Fields +\*\n",
+ "Jan-Klaas Kollhof\n",
+ "Sam Rushing\n",
+ "ArtForz -- public domain half-a-node\n",
+ " Projet RNRT SAPHIR\n",
+ "The Zcash developers\n",
+ "The Dash developers\n",
+ "The Dash Developers\n",
+ "The Dash Core developers\n",
+ "The PIVX developers\n",
+ "The PPCoin developers\n",
+]
+
+DOMINANT_STYLE_COMPILED = {}
+YEAR_LIST_STYLE_COMPILED = {}
+WITHOUT_C_STYLE_COMPILED = {}
+
+for holder_name in EXPECTED_HOLDER_NAMES:
+ DOMINANT_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name))
+ YEAR_LIST_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name))
+ WITHOUT_C_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE,
+ holder_name))
+
+################################################################################
+# search file contents for copyright message of particular category
+################################################################################
+
+def get_count_of_copyrights_of_any_style_any_holder(contents):
+ return len(ANY_COPYRIGHT_COMPILED.findall(contents))
+
+def file_has_dominant_style_copyright_for_holder(contents, holder_name):
+ match = DOMINANT_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+def file_has_year_list_style_copyright_for_holder(contents, holder_name):
+ match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+def file_has_without_c_style_copyright_for_holder(contents, holder_name):
+ match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+################################################################################
+# get file info
+################################################################################
+
+def read_file(filename):
+ return open(filename, 'r', encoding="utf8").read()
+
+def gather_file_info(filename):
+ info = {}
+ info['filename'] = filename
+ c = read_file(filename)
+ info['contents'] = c
+
+ info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c)
+
+ info['classified_copyrights'] = 0
+ info['dominant_style'] = {}
+ info['year_list_style'] = {}
+ info['without_c_style'] = {}
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ has_dominant_style = (
+ file_has_dominant_style_copyright_for_holder(c, holder_name))
+ has_year_list_style = (
+ file_has_year_list_style_copyright_for_holder(c, holder_name))
+ has_without_c_style = (
+ file_has_without_c_style_copyright_for_holder(c, holder_name))
+ info['dominant_style'][holder_name] = has_dominant_style
+ info['year_list_style'][holder_name] = has_year_list_style
+ info['without_c_style'][holder_name] = has_without_c_style
+ if has_dominant_style or has_year_list_style or has_without_c_style:
+ info['classified_copyrights'] = info['classified_copyrights'] + 1
+ return info
+
+################################################################################
+# report execution
+################################################################################
+
+SEPARATOR = '-'.join(['' for _ in range(80)])
+
+def print_filenames(filenames, verbose):
+ if not verbose:
+ return
+ for filename in filenames:
+ print("\t%s" % filename)
+
+def print_report(file_infos, verbose):
+ print(SEPARATOR)
+ examined = [i['filename'] for i in file_infos]
+ print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" %
+ len(examined))
+ print_filenames(examined, verbose)
+
+ print(SEPARATOR)
+ print('')
+ zero_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 0]
+ print("%4d with zero copyrights" % len(zero_copyrights))
+ print_filenames(zero_copyrights, verbose)
+ one_copyright = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 1]
+ print("%4d with one copyright" % len(one_copyright))
+ print_filenames(one_copyright, verbose)
+ two_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 2]
+ print("%4d with two copyrights" % len(two_copyrights))
+ print_filenames(two_copyrights, verbose)
+ three_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 3]
+ print("%4d with three copyrights" % len(three_copyrights))
+ print_filenames(three_copyrights, verbose)
+ four_or_more_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] >= 4]
+ print("%4d with four or more copyrights" % len(four_or_more_copyrights))
+ print_filenames(four_or_more_copyrights, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with dominant style:\ne.g. "Copyright (c)" and '
+ '"" or "-":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ dominant_style = [i['filename'] for i in file_infos if
+ i['dominant_style'][holder_name]]
+ if len(dominant_style) > 0:
+ print("%4d with '%s'" % (len(dominant_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(dominant_style, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with year list style:\ne.g. "Copyright (c)" and '
+ '", , ...":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ year_list_style = [i['filename'] for i in file_infos if
+ i['year_list_style'][holder_name]]
+ if len(year_list_style) > 0:
+ print("%4d with '%s'" % (len(year_list_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(year_list_style, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "" or '
+ '"-":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ without_c_style = [i['filename'] for i in file_infos if
+ i['without_c_style'][holder_name]]
+ if len(without_c_style) > 0:
+ print("%4d with '%s'" % (len(without_c_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(without_c_style, verbose)
+
+ print('')
+ print(SEPARATOR)
+
+ unclassified_copyrights = [i['filename'] for i in file_infos if
+ i['classified_copyrights'] < i['all_copyrights']]
+ print("%d with unexpected copyright holder names" %
+ len(unclassified_copyrights))
+ print_filenames(unclassified_copyrights, verbose)
+ print(SEPARATOR)
+
+def exec_report(base_directory, verbose):
+ filenames = get_filenames_to_examine(base_directory)
+ file_infos = [gather_file_info(f) for f in filenames]
+ print_report(file_infos, verbose)
+
+################################################################################
+# report cmd
+################################################################################
+
+REPORT_USAGE = """
+Produces a report of all copyright header notices found inside the source files
+of a repository.
+
+Usage:
+ $ ./copyright_header.py report [verbose]
+
+Arguments:
+ - The base directory of a bitcoin source code repository.
+ [verbose] - Includes a list of every file of each subcategory in the report.
+"""
+
+def report_cmd(argv):
+ if len(argv) == 2:
+ sys.exit(REPORT_USAGE)
+
+ base_directory = argv[2]
+ if not os.path.exists(base_directory):
+ sys.exit("*** bad : %s" % base_directory)
+
+ if len(argv) == 3:
+ verbose = False
+ elif argv[3] == 'verbose':
+ verbose = True
+ else:
+ sys.exit("*** unknown argument: %s" % argv[2])
+
+ exec_report(base_directory, verbose)
+
+################################################################################
+# query git for year of last change
+################################################################################
+
+GIT_LOG_CMD = "git log --pretty=format:%%ai %s"
+
+def call_git_log(filename):
+ out = subprocess.check_output((GIT_LOG_CMD % filename).split(' '))
+ return out.decode("utf-8").split('\n')
+
+def get_git_change_years(filename):
+ git_log_lines = call_git_log(filename)
+ if len(git_log_lines) == 0:
+ return [datetime.date.today().year]
+ # timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600"
+ return [line.split(' ')[0].split('-')[0] for line in git_log_lines]
+
+def get_most_recent_git_change_year(filename):
+ return max(get_git_change_years(filename))
+
+################################################################################
+# read and write to file
+################################################################################
+
+def read_file_lines(filename):
+ f = open(filename, 'r', encoding="utf8")
+ file_lines = f.readlines()
+ f.close()
+ return file_lines
+
+def write_file_lines(filename, file_lines):
+ f = open(filename, 'w', encoding="utf8")
+ f.write(''.join(file_lines))
+ f.close()
+
+################################################################################
+# update header years execution
+################################################################################
+
+COPYRIGHT = 'Copyright \(c\)'
+YEAR = "20[0-9][0-9]"
+YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
+HOLDER = 'The PIVX developers'
+UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER]))
+
+def get_updatable_copyright_line(file_lines):
+ index = 0
+ for line in file_lines:
+ if UPDATEABLE_LINE_COMPILED.search(line) is not None:
+ return index, line
+ index = index + 1
+ return None, None
+
+def parse_year_range(year_range):
+ year_split = year_range.split('-')
+ start_year = year_split[0]
+ if len(year_split) == 1:
+ return start_year, start_year
+ return start_year, year_split[1]
+
+def year_range_to_str(start_year, end_year):
+ if start_year == end_year:
+ return start_year
+ return "%s-%s" % (start_year, end_year)
+
+def create_updated_copyright_line(line, last_git_change_year):
+ copyright_splitter = 'Copyright (c) '
+ copyright_split = line.split(copyright_splitter)
+ # Preserve characters on line that are ahead of the start of the copyright
+ # notice - they are part of the comment block and vary from file-to-file.
+ before_copyright = copyright_split[0]
+ after_copyright = copyright_split[1]
+
+ space_split = after_copyright.split(' ')
+ year_range = space_split[0]
+ start_year, end_year = parse_year_range(year_range)
+ if end_year == last_git_change_year:
+ return line
+ return (before_copyright + copyright_splitter +
+ year_range_to_str(start_year, last_git_change_year) + ' ' +
+ ' '.join(space_split[1:]))
+
+def update_updatable_copyright(filename):
+ file_lines = read_file_lines(filename)
+ index, line = get_updatable_copyright_line(file_lines)
+ if not line:
+ print_file_action_message(filename, "No updatable copyright.")
+ return
+ last_git_change_year = get_most_recent_git_change_year(filename)
+ new_line = create_updated_copyright_line(line, last_git_change_year)
+ if line == new_line:
+ print_file_action_message(filename, "Copyright up-to-date.")
+ return
+ file_lines[index] = new_line
+ write_file_lines(filename, file_lines)
+ print_file_action_message(filename,
+ "Copyright updated! -> %s" % last_git_change_year)
+
+def exec_update_header_year(base_directory):
+ for filename in get_filenames_to_examine(base_directory):
+ update_updatable_copyright(filename)
+
+################################################################################
+# update cmd
+################################################################################
+
+UPDATE_USAGE = """
+Updates all the copyright headers of "The PIVX developers" which were
+changed in a year more recent than is listed. For example:
+
+// Copyright (c) - The PIVX developers
+
+will be updated to:
+
+// Copyright (c) - The PIVX developers
+
+where is obtained from the 'git log' history.
+
+This subcommand also handles copyright headers that have only a single year. In those cases:
+
+// Copyright (c) The PIVX developers
+
+will be updated to:
+
+// Copyright (c) - The PIVX developers
+
+where the update is appropriate.
+
+Usage:
+ $ ./copyright_header.py update
+
+Arguments:
+ - The base directory of a pivx source code repository.
+"""
+
+def print_file_action_message(filename, action):
+ print("%-52s %s" % (filename, action))
+
+def update_cmd(argv):
+ if len(argv) != 3:
+ sys.exit(UPDATE_USAGE)
+
+ base_directory = argv[2]
+ if not os.path.exists(base_directory):
+ sys.exit("*** bad base_directory: %s" % base_directory)
+ exec_update_header_year(base_directory)
+
+################################################################################
+# inserted copyright header format
+################################################################################
+
+def get_header_lines(header, start_year, end_year):
+ lines = header.split('\n')[1:-1]
+ lines[0] = lines[0] % year_range_to_str(start_year, end_year)
+ return [line + '\n' for line in lines]
+
+CPP_HEADER = '''
+// Copyright (c) %s The PIVX developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+
+def get_cpp_header_lines_to_insert(start_year, end_year):
+ return reversed(get_header_lines(CPP_HEADER, start_year, end_year))
+
+PYTHON_HEADER = '''
+# Copyright (c) %s The PIVX developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+
+def get_python_header_lines_to_insert(start_year, end_year):
+ return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year))
+
+################################################################################
+# query git for year of last change
+################################################################################
+
+def get_git_change_year_range(filename):
+ years = get_git_change_years(filename)
+ return min(years), max(years)
+
+################################################################################
+# check for existing core copyright
+################################################################################
+
+def file_already_has_core_copyright(file_lines):
+ index, _ = get_updatable_copyright_line(file_lines)
+ return index is not None
+
+################################################################################
+# insert header execution
+################################################################################
+
+def file_has_hashbang(file_lines):
+ if len(file_lines) < 1:
+ return False
+ if len(file_lines[0]) <= 2:
+ return False
+ return file_lines[0][:2] == '#!'
+
+def insert_python_header(filename, file_lines, start_year, end_year):
+ if file_has_hashbang(file_lines):
+ insert_idx = 1
+ else:
+ insert_idx = 0
+ header_lines = get_python_header_lines_to_insert(start_year, end_year)
+ for line in header_lines:
+ file_lines.insert(insert_idx, line)
+ write_file_lines(filename, file_lines)
+
+def insert_cpp_header(filename, file_lines, start_year, end_year):
+ header_lines = get_cpp_header_lines_to_insert(start_year, end_year)
+ for line in header_lines:
+ file_lines.insert(0, line)
+ write_file_lines(filename, file_lines)
+
+def exec_insert_header(filename, style):
+ file_lines = read_file_lines(filename)
+ if file_already_has_core_copyright(file_lines):
+ sys.exit('*** %s already has a copyright by The PIVX developers'
+ % (filename))
+ start_year, end_year = get_git_change_year_range(filename)
+ if style == 'python':
+ insert_python_header(filename, file_lines, start_year, end_year)
+ else:
+ insert_cpp_header(filename, file_lines, start_year, end_year)
+
+################################################################################
+# insert cmd
+################################################################################
+
+INSERT_USAGE = """
+Inserts a copyright header for "The PIVX developers" at the top of the
+file in either Python or C++ style as determined by the file extension. If the
+file is a Python file and it has a '#!' starting the first line, the header is
+inserted in the line below it.
+
+The copyright dates will be set to be:
+
+"-"
+
+where is according to the 'git log' history. If
+ is equal to , the date will be set to be:
+
+""
+
+If the file already has a copyright for "The PIVX developers", the
+script will exit.
+
+Usage:
+ $ ./copyright_header.py insert
+
+Arguments:
+ - A source file in the bitcoin repository.
+"""
+
+def insert_cmd(argv):
+ if len(argv) != 3:
+ sys.exit(INSERT_USAGE)
+
+ filename = argv[2]
+ if not os.path.isfile(filename):
+ sys.exit("*** bad filename: %s" % filename)
+ _, extension = os.path.splitext(filename)
+ if extension not in ['.h', '.cpp', '.cc', '.c', '.py']:
+ sys.exit("*** cannot insert for file extension %s" % extension)
+
+ if extension == '.py':
+ style = 'python'
+ else:
+ style = 'cpp'
+ exec_insert_header(filename, style)
+
+################################################################################
+# UI
+################################################################################
+
+USAGE = """
+copyright_header.py - utilities for managing copyright headers of 'The Bitcoin
+Core developers' in repository source files.
+
+Usage:
+ $ ./copyright_header
+
+Subcommands:
+ report
+ update
+ insert
+
+To see subcommand usage, run them without arguments.
+"""
+
+SUBCOMMANDS = ['report', 'update', 'insert']
+
+if __name__ == "__main__":
+ if len(sys.argv) == 1:
+ sys.exit(USAGE)
+ subcommand = sys.argv[1]
+ if subcommand not in SUBCOMMANDS:
+ sys.exit(USAGE)
+ if subcommand == 'report':
+ report_cmd(sys.argv)
+ elif subcommand == 'update':
+ update_cmd(sys.argv)
+ elif subcommand == 'insert':
+ insert_cmd(sys.argv)
diff --git a/contrib/devtools/fix-copyright-headers.py b/contrib/devtools/fix-copyright-headers.py
deleted file mode 100755
index 52fdc9914..000000000
--- a/contrib/devtools/fix-copyright-headers.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-'''
-Run this script inside of src/ and it will look for all the files
-that were changed this year that still have the last year in the
-copyright headers, and it will fix the headers on that file using
-a perl regex one liner.
-
-For example: if it finds something like this and we're in 2014
-
-// Copyright (c) 2009-2013 The Bitcoin developers
-
-it will change it to
-
-// Copyright (c) 2009-2014 The Bitcoin developers
-
-It will do this for all the files in the folder and its children.
-
-Author: @gubatron
-'''
-import os
-import time
-
-year = time.gmtime()[0]
-last_year = year - 1
-command = "perl -pi -e 's/%s The Bitcoin/%s The Bitcoin/' %s"
-listFilesCommand = "find . | grep %s"
-
-extensions = [".cpp",".h"]
-
-def getLastGitModifiedDate(filePath):
- gitGetLastCommitDateCommand = "git log " + filePath +" | grep Date | head -n 1"
- p = os.popen(gitGetLastCommitDateCommand)
- result = ""
- for l in p:
- result = l
- break
- result = result.replace("\n","")
- return result
-
-n=1
-for extension in extensions:
- foundFiles = os.popen(listFilesCommand % extension)
- for filePath in foundFiles:
- filePath = filePath[1:-1]
- if filePath.endswith(extension):
- filePath = os.getcwd() + filePath
- modifiedTime = getLastGitModifiedDate(filePath)
- if len(modifiedTime) > 0 and str(year) in modifiedTime:
- print n,"Last Git Modified: ", modifiedTime, " - ", filePath
- os.popen(command % (last_year,year,filePath))
- n = n + 1
-
-
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
new file mode 100644
index 000000000..2068e5cbb
--- /dev/null
+++ b/contrib/devtools/gen-manpages.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+export LC_ALL=C
+TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
+BUILDDIR=${BUILDDIR:-$TOPDIR}
+
+BINDIR=${BINDIR:-$BUILDDIR/src}
+MANDIR=${MANDIR:-$TOPDIR/doc/man}
+
+BITCOIND=${BITCOIND:-$BINDIR/pivxd}
+BITCOINCLI=${BITCOINCLI:-$BINDIR/pivx-cli}
+BITCOINTX=${BITCOINTX:-$BINDIR/pivx-tx}
+BITCOINQT=${BITCOINQT:-$BINDIR/qt/pivx-qt}
+
+[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
+
+# The autodetected version git tag can screw up manpage output a little bit
+BTCVER=($($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
+
+# Create a footer file with copyright content.
+# This gets autodetected fine for bitcoind if --version-string is not set,
+# but has different outcomes for bitcoin-qt and bitcoin-cli.
+echo "[COPYRIGHT]" > footer.h2m
+$BITCOIND --version | sed -n '1!p' >> footer.h2m
+
+for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $BITCOINQT; do
+ cmdname="${cmd##*/}"
+ help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
+ sed -i "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
+done
+
+rm -f footer.h2m
diff --git a/contrib/devtools/git-subtree-check.sh b/contrib/devtools/git-subtree-check.sh
new file mode 100755
index 000000000..85e8b841b
--- /dev/null
+++ b/contrib/devtools/git-subtree-check.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+# Copyright (c) 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
+DIR="$1"
+COMMIT="$2"
+if [ -z "$COMMIT" ]; then
+ COMMIT=HEAD
+fi
+
+# Taken from git-subtree (Copyright (C) 2009 Avery Pennarun )
+find_latest_squash()
+{
+ dir="$1"
+ sq=
+ main=
+ sub=
+ git log --grep="^git-subtree-dir: $dir/*\$" \
+ --pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" |
+ while read a b _; do
+ case "$a" in
+ START) sq="$b" ;;
+ git-subtree-mainline:) main="$b" ;;
+ git-subtree-split:) sub="$b" ;;
+ END)
+ if [ -n "$sub" ]; then
+ if [ -n "$main" ]; then
+ # a rejoin commit?
+ # Pretend its sub was a squash.
+ sq="$sub"
+ fi
+ echo "$sq" "$sub"
+ break
+ fi
+ sq=
+ main=
+ sub=
+ ;;
+ esac
+ done
+}
+
+# find latest subtree update
+latest_squash="$(find_latest_squash "$DIR")"
+if [ -z "$latest_squash" ]; then
+ echo "ERROR: $DIR is not a subtree" >&2
+ exit 2
+fi
+set $latest_squash
+old=$1
+rev=$2
+
+# get the tree in the current commit
+tree_actual=$(git ls-tree -d "$COMMIT" "$DIR" | head -n 1)
+if [ -z "$tree_actual" ]; then
+ echo "FAIL: subtree directory $DIR not found in $COMMIT" >&2
+ exit 1
+fi
+set $tree_actual
+tree_actual_type=$2
+tree_actual_tree=$3
+echo "$DIR in $COMMIT currently refers to $tree_actual_type $tree_actual_tree"
+if [ "d$tree_actual_type" != "dtree" ]; then
+ echo "FAIL: subtree directory $DIR is not a tree in $COMMIT" >&2
+ exit 1
+fi
+
+# get the tree at the time of the last subtree update
+tree_commit=$(git show -s --format="%T" $old)
+echo "$DIR in $COMMIT was last updated in commit $old (tree $tree_commit)"
+
+# ... and compare the actual tree with it
+if [ "$tree_actual_tree" != "$tree_commit" ]; then
+ git diff $tree_commit $tree_actual_tree >&2
+ echo "FAIL: subtree directory was touched without subtree merge" >&2
+ exit 1
+fi
+
+# get the tree in the subtree commit referred to
+if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then
+ echo "subtree commit $rev unavailable: cannot compare" >&2
+ exit
+fi
+tree_subtree=$(git show -s --format="%T" $rev)
+echo "$DIR in $COMMIT was last updated to upstream commit $rev (tree $tree_subtree)"
+
+# ... and compare the actual tree with it
+if [ "$tree_actual_tree" != "$tree_subtree" ]; then
+ echo "FAIL: subtree update commit differs from upstream tree!" >&2
+ exit 1
+fi
+
+echo "GOOD"
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index e58cc527d..78ac671bf 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2016 The Bitcoin Core developers
+# Copyright (c) 2016-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.
@@ -14,17 +14,16 @@
# In case of a clean merge that is accepted by the user, the local branch with
# name $BRANCH is overwritten with the merged result, and optionally pushed.
-from __future__ import division,print_function,unicode_literals
import os
from sys import stdin,stdout,stderr
import argparse
import hashlib
import subprocess
-import json,codecs
-try:
- from urllib.request import Request,urlopen
-except:
- from urllib2 import Request,urlopen
+import sys
+import json
+import codecs
+from urllib.request import Request, urlopen
+from urllib.error import HTTPError
# External tools (can be overridden using environment)
GIT = os.getenv('GIT','git')
@@ -33,11 +32,15 @@
# OS specific configuration for terminal attributes
ATTR_RESET = ''
ATTR_PR = ''
-COMMIT_FORMAT = '%h %s (%an)%d'
+ATTR_NAME = ''
+ATTR_WARN = ''
+COMMIT_FORMAT = '%H %s (%an)%d'
if os.name == 'posix': # if posix, assume we can use basic terminal escapes
ATTR_RESET = '\033[0m'
ATTR_PR = '\033[1;36m'
- COMMIT_FORMAT = '%C(bold blue)%h%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
+ ATTR_NAME = '\033[0;36m'
+ ATTR_WARN = '\033[1;31m'
+ COMMIT_FORMAT = '%C(bold blue)%H%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
def git_config_get(option, default=None):
'''
@@ -45,24 +48,61 @@ def git_config_get(option, default=None):
'''
try:
return subprocess.check_output([GIT,'config','--get',option]).rstrip().decode('utf-8')
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
return default
-def retrieve_pr_info(repo,pull):
+def get_response(req_url, ghtoken):
+ req = Request(req_url)
+ if ghtoken is not None:
+ req.add_header('Authorization', 'token ' + ghtoken)
+ return urlopen(req)
+
+def retrieve_json(req_url, ghtoken, use_pagination=False):
'''
- Retrieve pull request information from github.
- Return None if no title can be found, or an error happens.
+ Retrieve json from github.
+ Return None if an error happens.
'''
try:
- req = Request("https://api.github.com/repos/"+repo+"/pulls/"+pull)
- result = urlopen(req)
reader = codecs.getreader('utf-8')
- obj = json.load(reader(result))
+ if not use_pagination:
+ return json.load(reader(get_response(req_url, ghtoken)))
+
+ obj = []
+ page_num = 1
+ while True:
+ req_url_page = '{}?page={}'.format(req_url, page_num)
+ result = get_response(req_url_page, ghtoken)
+ obj.extend(json.load(reader(result)))
+
+ link = result.headers.get('link', None)
+ if link is not None:
+ link_next = [l for l in link.split(',') if 'rel="next"' in l]
+ if len(link_next) > 0:
+ page_num = int(link_next[0][link_next[0].find("page=")+5:link_next[0].find(">")])
+ continue
+ break
return obj
+ except HTTPError as e:
+ error_message = e.read()
+ print('Warning: unable to retrieve pull information from github: %s' % e)
+ print('Detailed error: %s' % error_message)
+ return None
except Exception as e:
print('Warning: unable to retrieve pull information from github: %s' % e)
return None
+def retrieve_pr_info(repo,pull,ghtoken):
+ req_url = "https://api.github.com/repos/"+repo+"/pulls/"+pull
+ return retrieve_json(req_url,ghtoken)
+
+def retrieve_pr_comments(repo,pull,ghtoken):
+ req_url = "https://api.github.com/repos/"+repo+"/issues/"+pull+"/comments"
+ return retrieve_json(req_url,ghtoken,use_pagination=True)
+
+def retrieve_pr_reviews(repo,pull,ghtoken):
+ req_url = "https://api.github.com/repos/"+repo+"/pulls/"+pull+"/reviews"
+ return retrieve_json(req_url,ghtoken,use_pagination=True)
+
def ask_prompt(text):
print(text,end=" ",file=stderr)
stderr.flush()
@@ -127,12 +167,44 @@ def tree_sha512sum(commit='HEAD'):
raise IOError('Non-zero return value executing git cat-file')
return overall.hexdigest()
+def get_acks_from_comments(head_commit, comments):
+ # Look for abbreviated commit id, because not everyone wants to type/paste
+ # the whole thing and the chance of collisions within a PR is small enough
+ head_abbrev = head_commit[0:6]
+ acks = []
+ for c in comments:
+ review = [l for l in c['body'].split('\r\n') if 'ACK' in l and head_abbrev in l]
+ if review:
+ acks.append((c['user']['login'], review[0]))
+ return acks
+
+def make_acks_message(head_commit, acks):
+ if acks:
+ ack_str ='\n\nACKs for top commit:\n'.format(head_commit)
+ for name, msg in acks:
+ ack_str += ' {}:\n'.format(name)
+ ack_str += ' {}\n'.format(msg)
+ else:
+ ack_str ='\n\nTop commit has no ACKs.\n'
+ return ack_str
+
+def print_merge_details(pull, title, branch, base_branch, head_branch, acks):
+ print('%s#%s%s %s %sinto %s%s' % (ATTR_RESET+ATTR_PR,pull,ATTR_RESET,title,ATTR_RESET+ATTR_PR,branch,ATTR_RESET))
+ subprocess.check_call([GIT,'log','--graph','--topo-order','--pretty=format:'+COMMIT_FORMAT,base_branch+'..'+head_branch])
+ if acks is not None:
+ if acks:
+ print('{}ACKs:{}'.format(ATTR_PR, ATTR_RESET))
+ for (name, message) in acks:
+ print('* {} {}({}){}'.format(message, ATTR_NAME, name, ATTR_RESET))
+ else:
+ print('{}Top commit has no ACKs!{}'.format(ATTR_WARN, ATTR_RESET))
def parse_arguments():
epilog = '''
In addition, you can set the following git configuration variables:
githubmerge.repository (mandatory),
user.signingkey (mandatory),
+ user.ghtoken (default: none).
githubmerge.host (default: git@github.com),
githubmerge.branch (no default),
githubmerge.testcmd (default: none).
@@ -151,27 +223,32 @@ def main():
host = git_config_get('githubmerge.host','git@github.com')
opt_branch = git_config_get('githubmerge.branch',None)
testcmd = git_config_get('githubmerge.testcmd')
+ ghtoken = git_config_get('user.ghtoken')
signingkey = git_config_get('user.signingkey')
if repo is None:
print("ERROR: No repository configured. Use this command to set:", file=stderr)
print("git config githubmerge.repository /", file=stderr)
- exit(1)
+ sys.exit(1)
if signingkey is None:
print("ERROR: No GPG signing key set. Set one using:",file=stderr)
print("git config --global user.signingkey ",file=stderr)
- exit(1)
+ sys.exit(1)
- host_repo = host+":"+repo # shortcut for push/pull target
+ if host.startswith(('https:','http:')):
+ host_repo = host+"/"+repo+".git"
+ else:
+ host_repo = host+":"+repo
# Extract settings from command line
args = parse_arguments()
pull = str(args.pull[0])
# Receive pull information from github
- info = retrieve_pr_info(repo,pull)
+ info = retrieve_pr_info(repo,pull,ghtoken)
if info is None:
- exit(1)
- title = info['title']
+ sys.exit(1)
+ title = info['title'].strip()
+ body = info['body'].strip()
# precedence order for destination branch argument:
# - command line argument
# - githubmerge.branch setting
@@ -185,32 +262,30 @@ 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 as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot check out branch %s." % (branch), file=stderr)
- exit(3)
+ sys.exit(3)
try:
- subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/pull/'+pull+'/*:refs/heads/pull/'+pull+'/*'])
- except subprocess.CalledProcessError as e:
- print("ERROR: Cannot find pull request #%s on %s." % (pull,host_repo), file=stderr)
- exit(3)
+ subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/pull/'+pull+'/*:refs/heads/pull/'+pull+'/*',
+ '+refs/heads/'+branch+':refs/heads/'+base_branch])
+ except subprocess.CalledProcessError:
+ print("ERROR: Cannot find pull request #%s or branch %s on %s." % (pull,branch,host_repo), file=stderr)
+ sys.exit(3)
try:
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+head_branch], stdout=devnull, stderr=stdout)
- except subprocess.CalledProcessError as e:
+ head_commit = subprocess.check_output([GIT,'log','-1','--pretty=format:%H',head_branch]).decode('utf-8')
+ assert len(head_commit) == 40
+ except subprocess.CalledProcessError:
print("ERROR: Cannot find head of pull request #%s on %s." % (pull,host_repo), file=stderr)
- exit(3)
+ sys.exit(3)
try:
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+merge_branch], stdout=devnull, stderr=stdout)
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot find merge of pull request #%s on %s." % (pull,host_repo), file=stderr)
- exit(3)
- try:
- subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/heads/'+branch+':refs/heads/'+base_branch])
- except subprocess.CalledProcessError as e:
- print("ERROR: Cannot find branch %s on %s." % (branch,host_repo), file=stderr)
- exit(3)
+ sys.exit(3)
subprocess.check_call([GIT,'checkout','-q',base_branch])
subprocess.call([GIT,'branch','-q','-D',local_merge_branch], stderr=devnull)
subprocess.check_call([GIT,'checkout','-q','-b',local_merge_branch])
@@ -225,46 +300,40 @@ def main():
else:
firstline = 'Merge #%s' % (pull,)
message = firstline + '\n\n'
- message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
+ message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%H %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
+ message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n'
try:
- subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
- except subprocess.CalledProcessError as e:
+ subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','--no-gpg-sign','-m',message.encode('utf-8'),head_branch])
+ except subprocess.CalledProcessError:
print("ERROR: Cannot be merged cleanly.",file=stderr)
subprocess.check_call([GIT,'merge','--abort'])
- exit(4)
+ sys.exit(4)
logmsg = subprocess.check_output([GIT,'log','--pretty=format:%s','-n','1']).decode('utf-8')
if logmsg.rstrip() != firstline.rstrip():
print("ERROR: Creating merge failed (already merged?).",file=stderr)
- exit(4)
+ sys.exit(4)
symlink_files = get_symlink_files()
for f in symlink_files:
print("ERROR: File %s was a symlink" % f)
if len(symlink_files) > 0:
- exit(4)
+ sys.exit(4)
- # Put tree SHA512 into the message
+ # Compute SHA512 of git tree (to be able to detect changes before sign-off)
try:
first_sha512 = tree_sha512sum()
- message += '\n\nTree-SHA512: ' + first_sha512
- except subprocess.CalledProcessError as e:
- printf("ERROR: Unable to compute tree hash")
- exit(4)
- try:
- subprocess.check_call([GIT,'commit','--amend','-m',message.encode('utf-8')])
- except subprocess.CalledProcessError as e:
- printf("ERROR: Cannot update message.",file=stderr)
- exit(4)
+ except subprocess.CalledProcessError:
+ print("ERROR: Unable to compute tree hash")
+ sys.exit(4)
- print('%s#%s%s %s %sinto %s%s' % (ATTR_RESET+ATTR_PR,pull,ATTR_RESET,title,ATTR_RESET+ATTR_PR,branch,ATTR_RESET))
- subprocess.check_call([GIT,'log','--graph','--topo-order','--pretty=format:'+COMMIT_FORMAT,base_branch+'..'+head_branch])
+ print_merge_details(pull, title, branch, base_branch, head_branch, None)
print()
# Run test command if configured.
if testcmd:
if subprocess.call(testcmd,shell=True):
print("ERROR: Running %s failed." % testcmd,file=stderr)
- exit(5)
+ sys.exit(5)
# Show the created merge.
diff = subprocess.check_output([GIT,'diff',merge_branch+'..'+local_merge_branch])
@@ -275,13 +344,7 @@ def main():
if reply.lower() == 'ignore':
print("Difference with github ignored.",file=stderr)
else:
- exit(6)
- reply = ask_prompt("Press 'd' to accept the diff.")
- if reply.lower() == 'd':
- print("Diff accepted.",file=stderr)
- else:
- print("ERROR: Diff rejected.",file=stderr)
- exit(6)
+ sys.exit(6)
else:
# Verify the result manually.
print("Dropping you on a shell so you can try building/testing the merged source.",file=stderr)
@@ -290,29 +353,41 @@ def main():
if os.path.isfile('/etc/debian_version'): # Show pull number on Debian default prompt
os.putenv('debian_chroot',pull)
subprocess.call([BASH,'-i'])
- reply = ask_prompt("Type 'm' to accept the merge.")
- if reply.lower() == 'm':
- print("Merge accepted.",file=stderr)
- else:
- print("ERROR: Merge rejected.",file=stderr)
- exit(7)
second_sha512 = tree_sha512sum()
if first_sha512 != second_sha512:
print("ERROR: Tree hash changed unexpectedly",file=stderr)
- exit(8)
+ sys.exit(8)
+
+ # Retrieve PR comments and ACKs and add to commit message, store ACKs to print them with commit
+ # description
+ comments = retrieve_pr_comments(repo,pull,ghtoken) + retrieve_pr_reviews(repo,pull,ghtoken)
+ if comments is None:
+ print("ERROR: Could not fetch PR comments and reviews",file=stderr)
+ sys.exit(1)
+ acks = get_acks_from_comments(head_commit=head_commit, comments=comments)
+ message += make_acks_message(head_commit=head_commit, acks=acks)
+ # end message with SHA512 tree hash, then update message
+ message += '\n\nTree-SHA512: ' + first_sha512
+ try:
+ subprocess.check_call([GIT,'commit','--amend','--no-gpg-sign','-m',message.encode('utf-8')])
+ except subprocess.CalledProcessError:
+ print("ERROR: Cannot update message.", file=stderr)
+ sys.exit(4)
# Sign the merge commit.
- reply = ask_prompt("Type 's' to sign off on the merge.")
- if reply == 's':
- try:
- subprocess.check_call([GIT,'commit','-q','--gpg-sign','--amend','--no-edit'])
- except subprocess.CalledProcessError as e:
- print("Error signing, exiting.",file=stderr)
- exit(1)
- else:
- print("Not signing off on merge, exiting.",file=stderr)
- exit(1)
+ print_merge_details(pull, title, branch, base_branch, head_branch, acks)
+ while True:
+ reply = ask_prompt("Type 's' to sign off on the above merge, or 'x' to reject and exit.").lower()
+ if reply == 's':
+ try:
+ subprocess.check_call([GIT,'commit','-q','--gpg-sign','--amend','--no-edit'])
+ break
+ except subprocess.CalledProcessError:
+ print("Error while signing, asking again.",file=stderr)
+ elif reply == 'x':
+ print("Not signing off on merge, exiting.",file=stderr)
+ sys.exit(1)
# Put the result in branch.
subprocess.check_call([GIT,'checkout','-q',branch])
@@ -326,9 +401,13 @@ def main():
subprocess.call([GIT,'branch','-q','-D',local_merge_branch],stderr=devnull)
# Push the result.
- reply = ask_prompt("Type 'push' to push the result to %s, branch %s." % (host_repo,branch))
- if reply.lower() == 'push':
- subprocess.check_call([GIT,'push',host_repo,'refs/heads/'+branch])
+ while True:
+ reply = ask_prompt("Type 'push' to push the result to %s, branch %s, or 'x' to exit without pushing." % (host_repo,branch)).lower()
+ if reply == 'push':
+ subprocess.check_call([GIT,'push',host_repo,'refs/heads/'+branch])
+ break
+ elif reply == 'x':
+ sys.exit(1)
if __name__ == '__main__':
main()
diff --git a/contrib/devtools/lint-whitespace.sh b/contrib/devtools/lint-whitespace.sh
new file mode 100755
index 000000000..beb7ec42f
--- /dev/null
+++ b/contrib/devtools/lint-whitespace.sh
@@ -0,0 +1,113 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 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.
+#
+# Check for new lines in diff that introduce trailing whitespace.
+
+# We can't run this check unless we know the commit range for the PR.
+
+export LC_ALL=C
+while getopts "?" opt; do
+ case $opt in
+ ?)
+ echo "Usage: .lint-whitespace.sh [N]"
+ echo " TRAVIS_COMMIT_RANGE='' .lint-whitespace.sh"
+ echo " .lint-whitespace.sh -?"
+ echo "Checks unstaged changes, the previous N commits, or a commit range."
+ echo "TRAVIS_COMMIT_RANGE='47ba2c3...ee50c9e' .lint-whitespace.sh"
+ exit 0
+ ;;
+ esac
+done
+
+if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
+ if [ "$1" ]; then
+ TRAVIS_COMMIT_RANGE="HEAD~$1...HEAD"
+ else
+ TRAVIS_COMMIT_RANGE="HEAD"
+ fi
+fi
+
+showdiff() {
+ if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then
+ echo "Failed to get a diff"
+ exit 1
+ fi
+}
+
+showcodediff() {
+ if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- *.cpp *.h *.md *.py *.sh ":(exclude)src/leveldb/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/"; then
+ echo "Failed to get a diff"
+ exit 1
+ fi
+}
+
+RET=0
+
+# Check if trailing whitespace was found in the diff.
+if showdiff | grep -E -q '^\+.*\s+$'; then
+ echo "This diff appears to have added new lines with trailing whitespace."
+ echo "The following changes were suspected:"
+ FILENAME=""
+ SEEN=0
+ SEENLN=0
+ while read -r line; do
+ if [[ "$line" =~ ^diff ]]; then
+ FILENAME="$line"
+ SEEN=0
+ elif [[ "$line" =~ ^@@ ]]; then
+ LINENUMBER="$line"
+ SEENLN=0
+ else
+ if [ "$SEEN" -eq 0 ]; then
+ # The first time a file is seen with trailing whitespace, we print the
+ # filename (preceded by a newline).
+ echo
+ echo "$FILENAME"
+ SEEN=1
+ fi
+ if [ "$SEENLN" -eq 0 ]; then
+ echo "$LINENUMBER"
+ SEENLN=1
+ fi
+ echo "$line"
+ fi
+ done < <(showdiff | grep -E '^(diff --git |@@|\+.*\s+$)')
+ RET=1
+fi
+
+# Check if tab characters were found in the diff.
+if showcodediff | perl -nle '$MATCH++ if m{^\+.*\t}; END{exit 1 unless $MATCH>0}' > /dev/null; then
+ echo "This diff appears to have added new lines with tab characters instead of spaces."
+ echo "The following changes were suspected:"
+ FILENAME=""
+ SEEN=0
+ SEENLN=0
+ while read -r line; do
+ if [[ "$line" =~ ^diff ]]; then
+ FILENAME="$line"
+ SEEN=0
+ elif [[ "$line" =~ ^@@ ]]; then
+ LINENUMBER="$line"
+ SEENLN=0
+ else
+ if [ "$SEEN" -eq 0 ]; then
+ # The first time a file is seen with a tab character, we print the
+ # filename (preceded by a newline).
+ echo
+ echo "$FILENAME"
+ SEEN=1
+ fi
+ if [ "$SEENLN" -eq 0 ]; then
+ echo "$LINENUMBER"
+ SEENLN=1
+ fi
+ echo "$line"
+ fi
+ done < <(showcodediff | perl -nle 'print if m{^(diff --git |@@|\+.*\t)}')
+ RET=1
+fi
+
+exit $RET
diff --git a/contrib/devtools/logprint-scanner.py b/contrib/devtools/logprint-scanner.py
index 03249c56b..a93d6474a 100755
--- a/contrib/devtools/logprint-scanner.py
+++ b/contrib/devtools/logprint-scanner.py
@@ -1,4 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+# Copyright (c) 2017-2018 The PIVX developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
import os, sys
from subprocess import check_output
@@ -23,14 +27,14 @@ def countRelevantCommas(line):
return numRelevantCommas
if __name__ == "__main__":
- out = check_output(["git", "rev-parse", "--show-toplevel"])
+ out = check_output("git rev-parse --show-toplevel", shell=True, universal_newlines=True)
srcDir = out.rstrip() + "/src/"
filelist = [os.path.join(dp, f) for dp, dn, filenames in os.walk(srcDir) for f in filenames if os.path.splitext(f)[1] == '.cpp' or os.path.splitext(f)[1] == '.h' ]
incorrectInstanceCounter = 0
- for file in filelist:
- f = open(file,"r")
+ for file in filelist:
+ f = open(file,"r", encoding="utf-8")
data = f.read()
rows = data.split("\n")
count = 0
@@ -73,12 +77,12 @@ def countRelevantCommas(line):
numPercents = tempLine.count('%') - numExtraPercents - 2*tempLine.count('%%')
if numPercents != numCommas:
- print "Incorrect number of arguments for LogPrint(f) statement found."
+ print("Incorrect number of arguments for LogPrint(f) statement found.")
print(str(file) + ":" + str(lineCounter - tempCount))
- print "Line = " + tempLine
+ print("Line = " + tempLine)
print("numRelevantCommas = " + str(numCommas) + ", numRelevantPercents = " + str(numPercents))
- print ""
-
+ print("")
+
incorrectInstanceCounter += 1
# Done with this multiline, clear tempLine
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
new file mode 100755
index 000000000..44b7f6c7c
--- /dev/null
+++ b/contrib/devtools/security-check.py
@@ -0,0 +1,215 @@
+#!/usr/bin/env python3
+# 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.
+'''
+Perform basic ELF security checks on a series of executables.
+Exit status will be 0 if successful, and the program will be silent.
+Otherwise the exit status will be 1 and it will log which executables failed which checks.
+Needs `readelf` (for ELF) and `objdump` (for PE).
+'''
+import subprocess
+import sys
+import os
+
+READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
+OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
+NONFATAL = {} # checks which are non-fatal for now but only generate a warning
+
+def check_ELF_PIE(executable):
+ '''
+ Check for position independent executable (PIE), allowing for address space randomization.
+ '''
+ p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+
+ ok = False
+ for line in stdout.splitlines():
+ line = line.split()
+ if len(line)>=2 and line[0] == 'Type:' and line[1] == 'DYN':
+ ok = True
+ return ok
+
+def get_ELF_program_headers(executable):
+ '''Return type and flags for ELF program headers'''
+ p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ in_headers = False
+ count = 0
+ headers = []
+ for line in stdout.splitlines():
+ if line.startswith('Program Headers:'):
+ in_headers = True
+ if line == '':
+ in_headers = False
+ if in_headers:
+ if count == 1: # header line
+ ofs_typ = line.find('Type')
+ ofs_offset = line.find('Offset')
+ ofs_flags = line.find('Flg')
+ ofs_align = line.find('Align')
+ if ofs_typ == -1 or ofs_offset == -1 or ofs_flags == -1 or ofs_align == -1:
+ raise ValueError('Cannot parse elfread -lW output')
+ elif count > 1:
+ typ = line[ofs_typ:ofs_offset].rstrip()
+ flags = line[ofs_flags:ofs_align].rstrip()
+ headers.append((typ, flags))
+ count += 1
+ return headers
+
+def check_ELF_NX(executable):
+ '''
+ Check that no sections are writable and executable (including the stack)
+ '''
+ have_wx = False
+ have_gnu_stack = False
+ for (typ, flags) in get_ELF_program_headers(executable):
+ if typ == 'GNU_STACK':
+ have_gnu_stack = True
+ if 'W' in flags and 'E' in flags: # section is both writable and executable
+ have_wx = True
+ return have_gnu_stack and not have_wx
+
+def check_ELF_RELRO(executable):
+ '''
+ Check for read-only relocations.
+ GNU_RELRO program header must exist
+ Dynamic section must have BIND_NOW flag
+ '''
+ have_gnu_relro = False
+ for (typ, flags) in get_ELF_program_headers(executable):
+ # Note: not checking flags == 'R': here as linkers set the permission differently
+ # This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions.
+ # However, the dynamic linker need to write to this area so these are RW.
+ # Glibc itself takes care of mprotecting this area R after relocations are finished.
+ # See also https://marc.info/?l=binutils&m=1498883354122353
+ if typ == 'GNU_RELRO':
+ have_gnu_relro = True
+
+ have_bindnow = False
+ p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ 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:]):
+ have_bindnow = True
+ return have_gnu_relro and have_bindnow
+
+def check_ELF_Canary(executable):
+ '''
+ Check for use of stack canary
+ '''
+ p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ ok = False
+ for line in stdout.splitlines():
+ if '__stack_chk_fail' in line:
+ ok = True
+ return ok
+
+def get_PE_dll_characteristics(executable):
+ '''
+ Get PE DllCharacteristics bits.
+ Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
+ and bits is the DllCharacteristics value.
+ '''
+ p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ arch = ''
+ bits = 0
+ for line in stdout.splitlines():
+ tokens = line.split()
+ if len(tokens)>=2 and tokens[0] == 'architecture:':
+ arch = tokens[1].rstrip(',')
+ if len(tokens)>=2 and tokens[0] == 'DllCharacteristics':
+ bits = int(tokens[1],16)
+ return (arch,bits)
+
+IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020
+IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040
+IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100
+
+def check_PE_DYNAMIC_BASE(executable):
+ '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
+ return (bits & reqbits) == reqbits
+
+# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE
+# to have secure ASLR.
+def check_PE_HIGH_ENTROPY_VA(executable):
+ '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ if arch == 'i386:x86-64':
+ reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
+ else: # Unnecessary on 32-bit
+ assert(arch == 'i386')
+ reqbits = 0
+ return (bits & reqbits) == reqbits
+
+def check_PE_NX(executable):
+ '''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
+
+CHECKS = {
+'ELF': [
+ ('PIE', check_ELF_PIE),
+ ('NX', check_ELF_NX),
+ ('RELRO', check_ELF_RELRO),
+ ('Canary', check_ELF_Canary)
+],
+'PE': [
+ ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE),
+ ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
+ ('NX', check_PE_NX)
+]
+}
+
+def identify_executable(executable):
+ with open(filename, 'rb') as f:
+ magic = f.read(4)
+ if magic.startswith(b'MZ'):
+ return 'PE'
+ elif magic.startswith(b'\x7fELF'):
+ return 'ELF'
+ return None
+
+if __name__ == '__main__':
+ retval = 0
+ for filename in sys.argv[1:]:
+ try:
+ etype = identify_executable(filename)
+ if etype is None:
+ print('%s: unknown format' % filename)
+ retval = 1
+ continue
+
+ failed = []
+ warning = []
+ for (name, func) in CHECKS[etype]:
+ if not func(filename):
+ if name in NONFATAL:
+ warning.append(name)
+ else:
+ failed.append(name)
+ if failed:
+ print('%s: failed %s' % (filename, ' '.join(failed)))
+ retval = 1
+ if warning:
+ print('%s: warning %s' % (filename, ' '.join(warning)))
+ except IOError:
+ print('%s: cannot open' % filename)
+ retval = 1
+ sys.exit(retval)
+
diff --git a/contrib/devtools/split-debug.sh.in b/contrib/devtools/split-debug.sh.in
index deda49cc5..92b72b144 100755
--- a/contrib/devtools/split-debug.sh.in
+++ b/contrib/devtools/split-debug.sh.in
@@ -1,5 +1,5 @@
#!/bin/sh
-
+set -e
if [ $# -ne 3 ];
then echo "usage: $0 "
fi
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index ea8bcb560..326707d6c 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -9,7 +9,7 @@
Example usage:
- find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
+ find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py
'''
from __future__ import division, print_function, unicode_literals
import subprocess
diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index cd1f69fe9..7ed1ec118 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,6 @@
TODO:
- auto-add new translations to the build system according to the translation process
'''
-from __future__ import division, print_function
import subprocess
import re
import sys
@@ -36,12 +35,12 @@ def check_at_repository_root():
if not os.path.exists('.git'):
print('No .git directory found')
print('Execute this script at the root of the repository', file=sys.stderr)
- exit(1)
+ sys.exit(1)
def fetch_all_translations():
if subprocess.call([TX, 'pull', '-f', '-a']):
print('Error while fetching translations', file=sys.stderr)
- exit(1)
+ sys.exit(1)
def find_format_specifiers(s):
'''Find all format specifiers in a string.'''
@@ -208,3 +207,4 @@ def postprocess_translations(reduce_diff_hacks=False):
check_at_repository_root()
fetch_all_translations()
postprocess_translations()
+
diff --git a/contrib/filter-lcov.py b/contrib/filter-lcov.py
new file mode 100755
index 000000000..a89dbc77a
--- /dev/null
+++ b/contrib/filter-lcov.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import argparse
+
+parser = argparse.ArgumentParser(description='Remove the coverage data from a tracefile for all files matching the pattern.')
+parser.add_argument('--pattern', '-p', action='append', help='the pattern of files to remove', required=True)
+parser.add_argument('tracefile', help='the tracefile to remove the coverage data from')
+parser.add_argument('outfile', help='filename for the output to be written to')
+
+args = parser.parse_args()
+tracefile = args.tracefile
+pattern = args.pattern
+outfile = args.outfile
+
+in_remove = False
+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:
+ in_remove = True
+ if not in_remove:
+ wf.write(line)
+ if line == 'end_of_record\n':
+ in_remove = False
diff --git a/contrib/gitian-descriptors/gitian-aarch64.yml b/contrib/gitian-descriptors/gitian-aarch64.yml
index e1217f67b..e0f3046e0 100755
--- a/contrib/gitian-descriptors/gitian-aarch64.yml
+++ b/contrib/gitian-descriptors/gitian-aarch64.yml
@@ -1,5 +1,5 @@
---
-name: "vitae-aarch64-3.1"
+name: "vitae-aarch64-3.2"
enable_cache: true
suites:
- "xenial"
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 6aebc631a..42842992d 100755
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,6 +1,7 @@
---
-name: "vitae-linux-3.1"
+name: "vitae-linux-3.4"
enable_cache: true
+distro: "ubuntu"
suites:
- "trusty"
architectures:
@@ -26,13 +27,13 @@ packages:
- "faketime"
- "bsdmainutils"
- "ca-certificates"
-- "python"
-reference_datetime: "2015-06-01 00:00:00"
+- "python3"
remotes:
- "url": "https://github.com/vitae-project/vitae.git"
"dir": "vitae"
files: []
script: |
+ set -e -o pipefail
WRAP_DIR=$HOME/wrapped
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf"
@@ -163,8 +164,9 @@ script: |
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
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 \;
+ find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
+ #find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../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 97ce8d746..aa7e5091f 100755
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,5 +1,6 @@
---
name: "vitae-dmg-signer"
+distro: "ubuntu"
suites:
- "trusty"
architectures:
@@ -12,6 +13,8 @@ remotes:
files:
- "vitae-osx-unsigned.tar.gz"
script: |
+ set -e -o pipefail
+
WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR}
export PATH=`pwd`:$PATH
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 89017adc0..fbe48defc 100755
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -1,6 +1,7 @@
---
-name: "vitae-osx-3.1"
+name: "vitae-osx-3.4"
enable_cache: true
+distro: "ubuntu"
suites:
- "trusty"
architectures:
@@ -23,9 +24,9 @@ packages:
- "libcap-dev"
- "libz-dev"
- "libbz2-dev"
-- "python"
-- "python-dev"
-- "python-setuptools"
+- "python3"
+- "python3-dev"
+- "python3-setuptools"
- "fonts-tuffy"
remotes:
- "url": "https://github.com/vitae-project/vitae.git"
@@ -33,6 +34,8 @@ remotes:
files:
- "MacOSX10.11.sdk.tar.gz"
script: |
+ set -e -o pipefail
+
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin11"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index 0abf391da..2d704bcde 100755
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -1,5 +1,6 @@
---
name: "vitae-win-signer"
+distro: "ubuntu"
suites:
- "trusty"
architectures:
@@ -15,6 +16,8 @@ files:
- "osslsigncode-Backports-to-1.7.1.patch"
- "vitae-win-unsigned.tar.gz"
script: |
+ set -e -o pipefail
+
BUILD_DIR=`pwd`
SIGDIR=${BUILD_DIR}/signature/win
UNSIGNED_DIR=${BUILD_DIR}/unsigned
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index cc8e94388..233311e3a 100755
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,6 +1,7 @@
---
-name: "vitae-win-3.1"
+name: "vitae-win-3.4"
enable_cache: true
+distro: "ubuntu"
suites:
- "trusty"
architectures:
@@ -20,12 +21,15 @@ packages:
- "nsis"
- "zip"
- "ca-certificates"
-- "python"
+- "python3"
+- "rename"
remotes:
- "url": "https://github.com/vitae-project/vitae.git"
"dir": "vitae"
files: []
script: |
+ set -e -o pipefail
+
WRAP_DIR=$HOME/wrapped
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
diff --git a/contrib/install_db4.sh b/contrib/install_db4.sh
new file mode 100755
index 000000000..890af5c69
--- /dev/null
+++ b/contrib/install_db4.sh
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+# Install libdb4.8 (Berkeley DB).
+
+export LC_ALL=C
+set -e
+
+if [ -z "${1}" ]; then
+ echo "Usage: $0 [ ...]"
+ echo
+ echo "Must specify a single argument: the directory in which db4 will be built."
+ echo "This is probably \`pwd\` if you're at the root of the pivx repository."
+ exit 1
+fi
+
+expand_path() {
+ echo "$(cd "${1}" && pwd -P)"
+}
+
+BDB_PREFIX="$(expand_path ${1})/db4"; shift;
+BDB_VERSION='db-4.8.30.NC'
+BDB_HASH='12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef'
+BDB_URL="https://download.oracle.com/berkeley-db/${BDB_VERSION}.tar.gz"
+
+check_exists() {
+ which "$1" >/dev/null 2>&1
+}
+
+sha256_check() {
+ # Args:
+ #
+ if check_exists sha256sum; then
+ echo "${1} ${2}" | sha256sum -c
+ elif check_exists sha256; then
+ if [ "$(uname)" = "FreeBSD" ]; then
+ sha256 -c "${1}" "${2}"
+ else
+ echo "${1} ${2}" | sha256 -c
+ fi
+ else
+ echo "${1} ${2}" | shasum -a 256 -c
+ fi
+}
+
+http_get() {
+ # Args:
+ #
+ # It's acceptable that we don't require SSL here because we manually verify
+ # content hashes below.
+ #
+ if [ -f "${2}" ]; then
+ echo "File ${2} already exists; not downloading again"
+ elif check_exists curl; then
+ curl --insecure --retry 5 "${1}" -o "${2}"
+ else
+ wget --no-check-certificate "${1}" -O "${2}"
+ fi
+
+ sha256_check "${3}" "${2}"
+}
+
+mkdir -p "${BDB_PREFIX}"
+http_get "${BDB_URL}" "${BDB_VERSION}.tar.gz" "${BDB_HASH}"
+tar -xzvf ${BDB_VERSION}.tar.gz -C "$BDB_PREFIX"
+cd "${BDB_PREFIX}/${BDB_VERSION}/"
+
+# Apply a patch necessary when building with clang and c++11 (see https://community.oracle.com/thread/3952592)
+CLANG_CXX11_PATCH_URL='https://gist.githubusercontent.com/LnL7/5153b251fd525fe15de69b67e63a6075/raw/7778e9364679093a32dec2908656738e16b6bdcb/clang.patch'
+CLANG_CXX11_PATCH_HASH='7a9a47b03fd5fb93a16ef42235fa9512db9b0829cfc3bdf90edd3ec1f44d637c'
+http_get "${CLANG_CXX11_PATCH_URL}" clang.patch "${CLANG_CXX11_PATCH_HASH}"
+patch -p2 < clang.patch
+
+# The packaged config.guess and config.sub are ancient (2009) and can cause build issues.
+# Replace them with modern versions.
+# See https://github.com/bitcoin/bitcoin/issues/16064
+CONFIG_GUESS_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=55eaf3e779455c4e5cc9f82efb5278be8f8f900b'
+CONFIG_GUESS_HASH='2d1ff7bca773d2ec3c6217118129220fa72d8adda67c7d2bf79994b3129232c1'
+CONFIG_SUB_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=55eaf3e779455c4e5cc9f82efb5278be8f8f900b'
+CONFIG_SUB_HASH='3a4befde9bcdf0fdb2763fc1bfa74e8696df94e1ad7aac8042d133c8ff1d2e32'
+
+rm -f "dist/config.guess"
+rm -f "dist/config.sub"
+
+http_get "${CONFIG_GUESS_URL}" dist/config.guess "${CONFIG_GUESS_HASH}"
+http_get "${CONFIG_SUB_URL}" dist/config.sub "${CONFIG_SUB_HASH}"
+
+cd build_unix/
+
+"${BDB_PREFIX}/${BDB_VERSION}/dist/configure" \
+ --enable-cxx --disable-shared --disable-replication --with-pic --prefix="${BDB_PREFIX}" \
+ "${@}"
+
+make install
+
+echo
+echo "db4 build complete."
+echo
+echo 'When compiling pivxd, run `./configure` in the following way:'
+echo
+echo " export BDB_PREFIX='${BDB_PREFIX}'"
+echo ' ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...'
diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py
index ad4bdba46..655c661cd 100755
--- a/contrib/macdeploy/custom_dsstore.py
+++ b/contrib/macdeploy/custom_dsstore.py
@@ -14,7 +14,7 @@
ds = DSStore.open(output_file, 'w+')
ds['.']['bwsp'] = {
'ShowStatusBar': False,
- 'WindowBounds': b'{{300, 280}, {500, 343}}',
+ 'WindowBounds': '{{300, 280}, {500, 343}}',
'ContainerShowSidebar': False,
'SidebarWidth': 0,
'ShowTabView': False,
diff --git a/contrib/pivxd.bash-completion b/contrib/pivxd.bash-completion
index 68424e472..47cdf371a 100755
--- a/contrib/pivxd.bash-completion
+++ b/contrib/pivxd.bash-completion
@@ -96,7 +96,7 @@ _vitaed() {
esac
case "$cur" in
- -conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
+ -conf=*|-pid=*|-loadblock=*|-wallet=*)
cur="${cur#*=}"
_filedir
return 0
diff --git a/contrib/rpm/README.md b/contrib/rpm/README.md
new file mode 100644
index 000000000..e1e0745fd
--- /dev/null
+++ b/contrib/rpm/README.md
@@ -0,0 +1,185 @@
+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/pivx.fc b/contrib/rpm/pivx.fc
new file mode 100644
index 000000000..0e3450782
--- /dev/null
+++ b/contrib/rpm/pivx.fc
@@ -0,0 +1,8 @@
+/usr/bin/pivx-cli -- gen_context(system_u:object_r:pivx_exec_t,s0)
+/usr/sbin/pivxd -- gen_context(system_u:object_r:pivx_exec_t,s0)
+/usr/lib(64)?/pivx/pivxd -- gen_context(system_u:object_r:pivx_exec_t,s0)
+
+/etc/pivx(/.*)? gen_context(system_u:object_r:pivx_conf_t,s0)
+/var/lib/pivx(/.*)? gen_context(system_u:object_r:pivx_var_lib_t,s0)
+
+(/var)?/run/pivxd(/.*)? gen_context(system_u:object_r:pivx_var_run_t,s0)
diff --git a/contrib/rpm/pivx.if b/contrib/rpm/pivx.if
new file mode 100644
index 000000000..70a065bf2
--- /dev/null
+++ b/contrib/rpm/pivx.if
@@ -0,0 +1,157 @@
+
+## policy for pivx
+
+
+########################################
+##
+## Transition to pivx.
+##
+##
+##
+## Domain allowed to transition.
+##
+##
+#
+interface(`pivx_domtrans',`
+ gen_require(`
+ type pivx_t, pivx_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, pivx_exec_t, pivx_t)
+')
+
+
+########################################
+##
+## Execute pivx server in the pivx domain.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`pivx_initrc_domtrans',`
+ gen_require(`
+ type pivx_initrc_exec_t;
+ ')
+
+ init_labeled_script_domtrans($1, pivx_initrc_exec_t)
+')
+
+
+########################################
+##
+## Search pivx lib directories.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`pivx_search_lib',`
+ gen_require(`
+ type pivx_var_lib_t;
+ ')
+
+ allow $1 pivx_var_lib_t:dir search_dir_perms;
+ files_search_var_lib($1)
+')
+
+########################################
+##
+## Read pivx lib files.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`pivx_read_lib_files',`
+ gen_require(`
+ type pivx_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ read_files_pattern($1, pivx_var_lib_t, pivx_var_lib_t)
+')
+
+########################################
+##
+## Manage pivx lib files.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`pivx_manage_lib_files',`
+ gen_require(`
+ type pivx_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_files_pattern($1, pivx_var_lib_t, pivx_var_lib_t)
+')
+
+########################################
+##
+## Manage pivx lib directories.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`pivx_manage_lib_dirs',`
+ gen_require(`
+ type pivx_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_dirs_pattern($1, pivx_var_lib_t, pivx_var_lib_t)
+')
+
+
+########################################
+##
+## All of the rules required to administrate
+## a pivx environment
+##
+##
+##
+## Domain allowed access.
+##
+##
+##
+##
+## Role allowed access.
+##
+##
+##
+#
+interface(`pivx_admin',`
+ gen_require(`
+ type pivx_t;
+ type pivx_initrc_exec_t;
+ type pivx_var_lib_t;
+ ')
+
+ allow $1 pivx_t:process { ptrace signal_perms };
+ ps_process_pattern($1, pivx_t)
+
+ pivx_initrc_domtrans($1)
+ domain_system_change_exemption($1)
+ role_transition $2 pivx_initrc_exec_t system_r;
+ allow $2 system_r;
+
+ files_search_var_lib($1)
+ admin_pattern($1, pivx_var_lib_t)
+
+')
+
diff --git a/contrib/rpm/pivx.spec b/contrib/rpm/pivx.spec
new file mode 100644
index 000000000..e49e20c12
--- /dev/null
+++ b/contrib/rpm/pivx.spec
@@ -0,0 +1,442 @@
+%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: pivx
+Version: 0.12.0
+Release: 2%{?dist}
+Summary: Peer to Peer Cryptographic Currency
+
+Group: Applications/System
+License: MIT
+URL: https://pivx.org/
+Source0: https://pivx.org/bin/pivx-core-%{version}/pivx-%{version}.tar.gz
+Source1: http://download.oracle.com/berkeley-db/db-%{bdbv}.NC.tar.gz
+
+Source10: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/contrib/debian/examples/pivx.conf
+
+#man pages
+Source20: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/doc/man/pivxd.1
+Source21: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/doc/man/pivx-cli.1
+Source22: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/doc/man/pivx-qt.1
+
+#selinux
+Source30: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/contrib/rpm/pivx.te
+# Source31 - what about pivx-tx and bench_pivx ???
+Source31: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/contrib/rpm/pivx.fc
+Source32: https://raw.githubusercontent.com/pivx-project/pivx/v%{version}/contrib/rpm/pivx.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: pivx-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 pivxs 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 pivxs 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 pivxconsensus 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 pivx
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+This package contains the header files and static library for the
+pivxconsensus 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 pivx daemon
+Group: System Environment/Daemons
+Requires: pivx-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 pivx-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
+pivx-core node they use to connect to the network.
+
+If you use the graphical pivx-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
+pivx-core daemon.
+
+The pivx-cli utility allows you to communicate and control a pivx daemon
+over RPC, the pivx-tx utility allows you to create a custom transaction, and
+the bench_pivx utility can be used to perform some benchmarks.
+
+This package contains utilities needed by the pivx-server package.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .libressl
+cp -p %{SOURCE10} ./pivx.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 pivx.pp pivx.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}/pivxd %{buildroot}%{_sbindir}/pivxd
+
+# systemd stuff
+mkdir -p %{buildroot}%{_tmpfilesdir}
+cat < %{buildroot}%{_tmpfilesdir}/pivx.conf
+d /run/pivxd 0750 pivx pivx -
+EOF
+touch -a -m -t 201504280000 %{buildroot}%{_tmpfilesdir}/pivx.conf
+
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+cat < %{buildroot}%{_sysconfdir}/sysconfig/pivx
+# Provide options to the pivx 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}/pivx/pivx.conf"
+DATA_DIR="%{_localstatedir}/lib/pivx"
+PID_FILE="/run/pivxd/pivxd.pid"
+EOF
+touch -a -m -t 201504280000 %{buildroot}%{_sysconfdir}/sysconfig/pivx
+
+mkdir -p %{buildroot}%{_unitdir}
+cat < %{buildroot}%{_unitdir}/pivx.service
+[Unit]
+Description=Bitcoin daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=%{_sbindir}/pivxd -daemon -conf=\${CONFIG_FILE} -datadir=\${DATA_DIR} -pid=\${PID_FILE} \$OPTIONS
+EnvironmentFile=%{_sysconfdir}/sysconfig/pivx
+User=pivx
+Group=pivx
+
+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}/pivx.service
+#end systemd stuff
+
+mkdir %{buildroot}%{_sysconfdir}/pivx
+mkdir -p %{buildroot}%{_localstatedir}/lib/pivx
+
+#SELinux
+for selinuxvariant in %{selinux_variants}; do
+ install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
+ install -p -m 644 SELinux/pivx.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/pivx.pp
+done
+
+%if %{_buildqt}
+# qt icons
+install -D -p share/pixmaps/pivx.ico %{buildroot}%{_datadir}/pixmaps/pivx.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/pivx.svg
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/pivx16.png -w16 -h16
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/pivx32.png -w32 -h32
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/pivx64.png -w64 -h64
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/pivx128.png -w128 -h128
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/pivx256.png -w256 -h256
+%{_bindir}/convert -resize 16x16 %{buildroot}%{_datadir}/pixmaps/pivx256.png %{buildroot}%{_datadir}/pixmaps/pivx16.xpm
+%{_bindir}/convert -resize 32x32 %{buildroot}%{_datadir}/pixmaps/pivx256.png %{buildroot}%{_datadir}/pixmaps/pivx32.xpm
+%{_bindir}/convert -resize 64x64 %{buildroot}%{_datadir}/pixmaps/pivx256.png %{buildroot}%{_datadir}/pixmaps/pivx64.xpm
+%{_bindir}/convert -resize 128x128 %{buildroot}%{_datadir}/pixmaps/pivx256.png %{buildroot}%{_datadir}/pixmaps/pivx128.xpm
+%{_bindir}/convert %{buildroot}%{_datadir}/pixmaps/pivx256.png %{buildroot}%{_datadir}/pixmaps/pivx256.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/pivx-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=pivx-qt %u
+Terminal=false
+Type=Application
+Icon=pivx128
+MimeType=x-scheme-handler/pivx;
+Categories=Office;Finance;
+EOF
+# change touch date when modifying desktop
+touch -a -m -t 201511100546 %{buildroot}%{_datadir}/applications/pivx-core.desktop
+%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/pivx-core.desktop
+
+# KDE protocol - change the touch timestamp if modifying
+mkdir -p %{buildroot}%{_datadir}/kde4/services
+cat < %{buildroot}%{_datadir}/kde4/services/pivx-core.protocol
+[Protocol]
+exec=pivx-qt '%u'
+protocol=pivx
+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/pivx-core.protocol
+%endif
+
+# man pages
+install -D -p %{SOURCE20} %{buildroot}%{_mandir}/man1/pivxd.1
+install -p %{SOURCE21} %{buildroot}%{_mandir}/man1/pivx-cli.1
+%if %{_buildqt}
+install -p %{SOURCE22} %{buildroot}%{_mandir}/man1/pivx-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/pivx-util-test.py
+test/functional/test_runner.py --extended
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+%pre server
+getent group pivx >/dev/null || groupadd -r pivx
+getent passwd pivx >/dev/null ||
+ useradd -r -g pivx -d /var/lib/pivx -s /sbin/nologin \
+ -c "Bitcoin wallet server" pivx
+exit 0
+
+%post server
+%systemd_post pivx.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}/pivx.pp &> /dev/null || :
+done
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 8332
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 8333
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 18332
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 18333
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 18443
+%{_sbindir}/semanage port -a -t pivx_port_t -p tcp 18444
+%{_sbindir}/fixfiles -R pivx-server restore &> /dev/null || :
+%{_sbindir}/restorecon -R %{_localstatedir}/lib/pivx || :
+fi
+
+%posttrans server
+%{_bindir}/systemd-tmpfiles --create
+
+%preun server
+%systemd_preun pivx.service
+
+%postun server
+%systemd_postun pivx.service
+# SELinux
+if [ $1 -eq 0 ]; then
+ if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
+ %{_sbindir}/semanage port -d -p tcp 8332
+ %{_sbindir}/semanage port -d -p tcp 8333
+ %{_sbindir}/semanage port -d -p tcp 18332
+ %{_sbindir}/semanage port -d -p tcp 18333
+ %{_sbindir}/semanage port -d -p tcp 18443
+ %{_sbindir}/semanage port -d -p tcp 18444
+ for selinuxvariant in %{selinux_variants}; do
+ %{_sbindir}/semodule -s ${selinuxvariant} -r pivx &> /dev/null || :
+ done
+ %{_sbindir}/fixfiles -R pivx-server restore &> /dev/null || :
+ [ -d %{_localstatedir}/lib/pivx ] && \
+ %{_sbindir}/restorecon -R %{_localstatedir}/lib/pivx &> /dev/null || :
+ fi
+fi
+
+%clean
+rm -rf %{buildroot}
+
+%if %{_buildqt}
+%files core
+%defattr(-,root,root,-)
+%license COPYING db-%{bdbv}.NC-LICENSE
+%doc COPYING pivx.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}/pivx-qt
+%attr(0644,root,root) %{_datadir}/applications/pivx-core.desktop
+%attr(0644,root,root) %{_datadir}/kde4/services/pivx-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/pivx-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 pivx.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}/pivxd
+%attr(0644,root,root) %{_tmpfilesdir}/pivx.conf
+%attr(0644,root,root) %{_unitdir}/pivx.service
+%dir %attr(0750,pivx,pivx) %{_sysconfdir}/pivx
+%dir %attr(0750,pivx,pivx) %{_localstatedir}/lib/pivx
+%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/sysconfig/pivx
+%attr(0644,root,root) %{_datadir}/selinux/*/*.pp
+%attr(0644,root,root) %{_mandir}/man1/pivxd.1*
+
+%files utils
+%defattr(-,root,root,-)
+%license COPYING
+%doc COPYING pivx.conf.example doc/README.md
+%attr(0755,root,root) %{_bindir}/pivx-cli
+%attr(0755,root,root) %{_bindir}/pivx-tx
+%attr(0755,root,root) %{_bindir}/bench_pivx
+%attr(0644,root,root) %{_mandir}/man1/pivx-cli.1*
+
+
+
+%changelog
+* Fri Feb 26 2016 Alice Wonder - 0.12.0-2
+- Rename Qt package from pivx to pivx-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/pivx/
diff --git a/contrib/rpm/pivx.te b/contrib/rpm/pivx.te
new file mode 100644
index 000000000..13ad5467f
--- /dev/null
+++ b/contrib/rpm/pivx.te
@@ -0,0 +1,81 @@
+policy_module(pivx, 1.100.1)
+
+########################################
+#
+# Declarations
+#
+
+type pivx_t;
+type pivx_exec_t;
+init_daemon_domain(pivx_t, pivx_exec_t)
+
+permissive pivx_t;
+
+type pivx_initrc_exec_t;
+init_script_file(pivx_initrc_exec_t)
+
+type pivx_conf_t;
+files_type(pivx_conf_t)
+
+type pivx_var_lib_t;
+files_type(pivx_var_lib_t)
+
+type pivx_var_run_t;
+files_type(pivx_var_run_t)
+
+type pivx_port_t;
+corenet_port(pivx_port_t)
+
+########################################
+#
+# pivx local policy
+#
+allow pivx_t self:process { fork };
+
+allow pivx_t self:fifo_file rw_fifo_file_perms;
+allow pivx_t self:unix_stream_socket create_stream_socket_perms;
+
+manage_dirs_pattern(pivx_t, pivx_conf_t, pivx_conf_t)
+manage_files_pattern(pivx_t, pivx_conf_t, pivx_conf_t)
+
+manage_dirs_pattern(pivx_t, pivx_var_lib_t, pivx_var_lib_t)
+manage_files_pattern(pivx_t, pivx_var_lib_t, pivx_var_lib_t)
+files_var_lib_filetrans(pivx_t, pivx_var_lib_t, { dir file })
+
+manage_dirs_pattern(pivx_t, pivx_var_run_t, pivx_var_run_t)
+manage_files_pattern(pivx_t, pivx_var_run_t, pivx_var_run_t)
+
+sysnet_dns_name_resolve(pivx_t)
+corenet_all_recvfrom_unlabeled(pivx_t)
+
+allow pivx_t self:tcp_socket create_stream_socket_perms;
+corenet_tcp_sendrecv_generic_if(pivx_t)
+corenet_tcp_sendrecv_generic_node(pivx_t)
+corenet_tcp_sendrecv_all_ports(pivx_t)
+corenet_tcp_bind_generic_node(pivx_t)
+
+gen_require(`
+ type pivx_port_t;
+')
+allow pivx_t pivx_port_t:tcp_socket name_bind;
+
+gen_require(`
+ type pivx_port_t;
+')
+allow pivx_t pivx_port_t:tcp_socket name_connect;
+
+domain_use_interactive_fds(pivx_t)
+
+files_read_etc_files(pivx_t)
+
+miscfiles_read_localization(pivx_t)
+
+sysnet_dns_name_resolve(pivx_t)
+
+allow pivx_t pivx_exec_t:file execute_no_trans;
+allow pivx_t self:process setsched;
+corecmd_exec_ls(pivx_t)
+corenet_tcp_connect_http_port(pivx_t)
+dev_read_urand(pivx_t)
+fs_getattr_xattr_fs(pivx_t)
+kernel_read_system_state(pivx_t)
diff --git a/depends/Makefile b/depends/Makefile
index 0ddd348e5..26ce307d2 100755
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -5,6 +5,7 @@ BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?=
NO_WALLET ?=
+NO_ZMQ ?=
NO_UPNP ?=
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
@@ -13,7 +14,7 @@ HOST ?= $(BUILD)
PATCHES_PATH = $(BASEDIR)/patches
BASEDIR = $(CURDIR)
HASH_LENGTH:=11
-DOWNLOAD_CONNECT_TIMEOUT:=10
+DOWNLOAD_CONNECT_TIMEOUT:=30
DOWNLOAD_RETRIES:=3
HOST_ID_SALT ?= salt
BUILD_ID_SALT ?= salt
@@ -92,6 +93,7 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages)
wallet_packages_$(NO_WALLET) = $(wallet_packages)
upnp_packages_$(NO_UPNP) = $(upnp_packages)
+zmq_packages_$(NO_ZMQ) = $(zmq_packages)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
@@ -100,6 +102,10 @@ ifneq ($(qt_packages_),)
native_packages += $(qt_native_packages)
endif
+ifneq ($(zmq_packages_),)
+packages += $(zmq_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
@@ -136,6 +142,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
-e 's|@no_qt@|$(NO_QT)|' \
+ -e 's|@no_zmq@|$(NO_ZMQ)|' \
-e 's|@no_wallet@|$(NO_WALLET)|' \
-e 's|@no_upnp@|$(NO_UPNP)|' \
-e 's|@debug@|$(DEBUG)|' \
@@ -179,4 +186,6 @@ download-win:
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
download: download-osx download-linux download-win
-.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources
+$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
+
+.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources
diff --git a/depends/README.md b/depends/README.md
index 99eef1952..139fe32fb 100755
--- a/depends/README.md
+++ b/depends/README.md
@@ -33,7 +33,7 @@ Install the required dependencies: Ubuntu & Debian
For macOS cross compilation:
- sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python-setuptools
+ sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools
For Win32/Win64 cross compilation:
@@ -43,6 +43,10 @@ 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
+ 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_vitae` 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
@@ -52,6 +56,7 @@ The following can be set when running make: make FOO=bar
SDK_PATH: Path where sdk's can be found (used by OSX)
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_ZMQ: Don't download/build/cache packages needed for enabling zeromq
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
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
index 27f550ab0..c7671c154 100755
--- a/depends/builders/darwin.mk
+++ b/depends/builders/darwin.mk
@@ -1,13 +1,13 @@
-build_darwin_CC: = $(shell xcrun -f clang)
-build_darwin_CXX: = $(shell xcrun -f clang++)
-build_darwin_AR: = $(shell xcrun -f ar)
-build_darwin_RANLIB: = $(shell xcrun -f ranlib)
-build_darwin_STRIP: = $(shell xcrun -f strip)
-build_darwin_OTOOL: = $(shell xcrun -f otool)
-build_darwin_NM: = $(shell xcrun -f nm)
+build_darwin_CC:=$(shell xcrun -f clang)
+build_darwin_CXX:=$(shell xcrun -f clang++)
+build_darwin_AR:=$(shell xcrun -f ar)
+build_darwin_RANLIB:=$(shell xcrun -f ranlib)
+build_darwin_STRIP:=$(shell xcrun -f strip)
+build_darwin_OTOOL:=$(shell xcrun -f otool)
+build_darwin_NM:=$(shell xcrun -f nm)
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
-build_darwin_SHA256SUM = shasum -a 256
-build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
+build_darwin_SHA256SUM=shasum -a 256
+build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
#darwin host on darwin builder. overrides darwin host preferences.
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)
diff --git a/depends/config.site.in b/depends/config.site.in
index 0a4a9c327..e63375206 100755
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -33,6 +33,10 @@ if test -z $with_gui && test -n "@no_qt@"; then
with_gui=no
fi
+if test -z $enable_zmq && test -n "@no_zmq@"; then
+ enable_zmq=no
+fi
+
if test x@host_os@ = xdarwin; then
BREW=no
PORT=no
@@ -61,11 +65,13 @@ fi
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
-CC="@CC@"
-CXX="@CXX@"
-OBJC="${CC}"
-CCACHE=$depends_prefix/native/bin/ccache
-PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
+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/python3/dist-packages:$PYTHONPATH
if test -n "@AR@"; then
AR=@AR@
diff --git a/depends/funcs.mk b/depends/funcs.mk
index 15e404e42..8f03c5f37 100755
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -76,8 +76,9 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
#default commands
+# The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
-$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
+$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source)
$(1)_preprocess_cmds ?=
$(1)_build_cmds ?=
$(1)_config_cmds ?=
@@ -170,15 +171,15 @@ $($(1)_extracted): | $($(1)_fetched)
$(AT)mkdir -p $$(@D)
$(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1))
$(AT)touch $$@
-$($(1)_preprocessed): | $($(1)_dependencies) $($(1)_extracted)
+$($(1)_preprocessed): | $($(1)_extracted)
$(AT)echo Preprocessing $(1)...
$(AT)mkdir -p $$(@D) $($(1)_patch_dir)
$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
$(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
$(AT)touch $$@
-$($(1)_configured): | $($(1)_preprocessed)
+$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
$(AT)echo Configuring $(1)...
- $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); )
+ $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); )
$(AT)mkdir -p $$(@D)
$(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1))
$(AT)touch $$@
@@ -213,6 +214,14 @@ $(1): | $($(1)_cached_checksum)
endef
+stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
+
+define ext_add_stages
+$(foreach stage,$(stages),
+ $(1)_$(stage): $($(1)_$(stage))
+ .PHONY: $(1)_$(stage))
+endef
+
# These functions create the build targets for each package. They must be
# broken down into small steps so that each part is done for all packages
# before moving on to the next step. Otherwise, a package's info
diff --git a/depends/packages.md b/depends/packages.md
index 7c8036250..7d2bd4670 100755
--- a/depends/packages.md
+++ b/depends/packages.md
@@ -14,8 +14,9 @@ Each package is required to define at least these variables:
placeholder such as 1.0 can be used.
$(package)_download_path:
- Location of the upstream source, without the file-name. Usually http or
- ftp.
+ Location of the upstream source, without the file-name. Usually http, https
+ or ftp. Secure transmission options like https should be preferred if
+ available.
$(package)_file_name:
The upstream source filename available at the download path.
diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
index 6c9876c2c..6cdb79592 100755
--- a/depends/packages/bdb.mk
+++ b/depends/packages/bdb.mk
@@ -1,6 +1,6 @@
package=bdb
$(package)_version=4.8.30
-$(package)_download_path=http://download.oracle.com/berkeley-db
+$(package)_download_path=https://download.oracle.com/berkeley-db
$(package)_file_name=db-$($(package)_version).NC.tar.gz
$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
$(package)_build_subdir=build_unix
@@ -10,6 +10,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags=-std=c++11
+$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
endef
define $(package)_preprocess_cmds
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index bf773ccd1..a7226ad7e 100755
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -15,6 +15,10 @@ $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win3
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
+$(package)_config_opts_s390x_linux=address-model=64
+$(package)_config_opts_sparc64_linux=address-model=64
+$(package)_config_opts_alpha_linux=address-model=64
+$(package)_config_opts_m68k_linux=address-model=32
$(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk
index 7f484724a..8d06882cd 100755
--- a/depends/packages/expat.mk
+++ b/depends/packages/expat.mk
@@ -1,11 +1,11 @@
package=expat
-$(package)_version=2.2.1
-$(package)_download_path=https://downloads.sourceforge.net/project/expat/expat/$($(package)_version)
+$(package)_version=2.2.6
+$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=1868cadae4c82a018e361e2b2091de103cd820aaacb0d6cfa49bd2cd83978885
+$(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
define $(package)_set_vars
-$(package)_config_opts=--disable-static
+$(package)_config_opts=--disable-static --without-docbook
endef
define $(package)_config_cmds
diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk
index 12695db4b..d0996b453 100755
--- a/depends/packages/fontconfig.mk
+++ b/depends/packages/fontconfig.mk
@@ -1,6 +1,6 @@
package=fontconfig
$(package)_version=2.12.1
-$(package)_download_path=http://www.freedesktop.org/software/fontconfig/release/
+$(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3
$(package)_dependencies=freetype expat
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
index 76b025c46..55303caa9 100755
--- a/depends/packages/freetype.mk
+++ b/depends/packages/freetype.mk
@@ -1,6 +1,6 @@
package=freetype
$(package)_version=2.7.1
-$(package)_download_path=http://download.savannah.gnu.org/releases/$(package)
+$(package)_download_path=https://download.savannah.gnu.org/releases/$(package)
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk
index 178d592ee..7c86e62bc 100755
--- a/depends/packages/libX11.mk
+++ b/depends/packages/libX11.mk
@@ -1,6 +1,6 @@
package=libX11
$(package)_version=1.6.2
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
$(package)_dependencies=libxcb xtrans xextproto xproto
diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk
index e87df2e4d..69b937aa2 100755
--- a/depends/packages/libXau.mk
+++ b/depends/packages/libXau.mk
@@ -1,6 +1,6 @@
package=libXau
$(package)_version=1.0.8
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2
$(package)_dependencies=xproto
diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk
index 4db836066..931f3aa1a 100755
--- a/depends/packages/libXext.mk
+++ b/depends/packages/libXext.mk
@@ -1,6 +1,6 @@
package=libXext
$(package)_version=1.3.2
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0
$(package)_dependencies=xproto xextproto libX11 libXau
diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk
index 28f2bd6f2..2d6be4dbb 100755
--- a/depends/packages/libxcb.mk
+++ b/depends/packages/libxcb.mk
@@ -1,6 +1,6 @@
package=libxcb
$(package)_version=1.10
-$(package)_download_path=http://xcb.freedesktop.org/dist
+$(package)_download_path=https://xcb.freedesktop.org/dist
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
$(package)_dependencies=xcb_proto libXau xproto
diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
index 1bb8cb5d2..012d3da11 100755
--- a/depends/packages/miniupnpc.mk
+++ b/depends/packages/miniupnpc.mk
@@ -1,6 +1,6 @@
package=miniupnpc
-$(package)_version=2.0.20170509
-$(package)_download_path=http://miniupnp.free.fr/files
+$(package)_version=2.0.20180203
+$(package)_download_path=https://miniupnp.tuxfamily.org/files/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk
index 3c6e8900f..fff9cb127 100755
--- a/depends/packages/native_biplist.mk
+++ b/depends/packages/native_biplist.mk
@@ -2,19 +2,14 @@ package=native_biplist
$(package)_version=0.9
$(package)_download_path=https://pypi.python.org/packages/source/b/biplist
$(package)_file_name=biplist-$($(package)_version).tar.gz
-$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
-$(package)_patches=sorted_list.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/sorted_list.patch
-endef
+$(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6
+$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
define $(package)_build_cmds
- python setup.py build
+ python3 setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk
index 44d238cc4..a065256c1 100755
--- a/depends/packages/native_cctools.mk
+++ b/depends/packages/native_cctools.mk
@@ -5,7 +5,7 @@ $(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a
$(package)_build_subdir=cctools
$(package)_clang_version=3.7.1
-$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version)
+$(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version)
$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
$(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9
@@ -22,12 +22,12 @@ define $(package)_extract_cmds
echo "$($(package)_clang_sha256_hash) $($(package)_source_dir)/$($(package)_clang_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
- tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \
+ tar --no-same-owner --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \
rm -f toolchain/lib/libc++abi.so* && \
echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
chmod +x toolchain/bin/$(host)-dsymutil && \
- tar --strip-components=1 -xf $($(package)_source)
+ tar --no-same-owner --strip-components=1 -xf $($(package)_source)
endef
define $(package)_set_vars
diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk
index cf694edb3..8243458ec 100755
--- a/depends/packages/native_cdrkit.mk
+++ b/depends/packages/native_cdrkit.mk
@@ -1,6 +1,6 @@
package=native_cdrkit
$(package)_version=1.1.11
-$(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c
+$(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c
$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
$(package)_patches=cdrkit-deterministic.patch
diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk
index 116fa25d3..f99b689ec 100755
--- a/depends/packages/native_ds_store.mk
+++ b/depends/packages/native_ds_store.mk
@@ -3,14 +3,14 @@ $(package)_version=1.1.2
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_file_name=v$($(package)_version).tar.gz
$(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
+$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
$(package)_dependencies=native_biplist
define $(package)_build_cmds
- python setup.py build
+ python3 setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk
index 488ec8b59..76e771383 100755
--- a/depends/packages/native_mac_alias.mk
+++ b/depends/packages/native_mac_alias.mk
@@ -2,19 +2,14 @@ package=native_mac_alias
$(package)_version=2.0.6
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_file_name=v$($(package)_version).tar.gz
-$(package)_sha256_hash=78a3332d9a597eebf09ae652d38ad1e263b28db5c2e6dd725fad357b03b77371
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
-$(package)_patches=python3.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/python3.patch
-endef
+$(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838
+$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
define $(package)_build_cmds
- python setup.py build
+ python3 setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk
index ce50b366f..1de8c37d3 100755
--- a/depends/packages/native_protobuf.mk
+++ b/depends/packages/native_protobuf.mk
@@ -5,7 +5,7 @@ $(package)_file_name=protobuf-$($(package)_version).tar.bz2
$(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910
define $(package)_set_vars
-$(package)_config_opts=--disable-shared
+$(package)_config_opts=--disable-shared --without-zlib
endef
define $(package)_config_cmds
diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 5ee9f17a6..aa19b3a1b 100755
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -51,6 +51,13 @@ $(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_powerpc64le_linux=linux-generic64
+$(package)_config_opts_sparc64_linux=linux-generic64
+$(package)_config_opts_s390x_linux=linux-generic64
+$(package)_config_opts_alpha_linux=linux-generic64
+$(package)_config_opts_m68k_linux=linux-generic32
$(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 11c2e55b3..3b4548f26 100755
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -1,5 +1,4 @@
-packages:=boost openssl libevent zeromq
-native_packages := native_ccache
+packages:=boost openssl libevent gmp
qt_native_packages = native_protobuf
qt_packages = qrencode protobuf zlib
@@ -14,6 +13,8 @@ qt_mingw32_packages=qt
wallet_packages=bdb
+zmq_packages=zeromq
+
upnp_packages=miniupnpc
darwin_native_packages = native_biplist native_ds_store native_mac_alias
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index cd0d6cca4..212853266 100755
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -1,21 +1,20 @@
PACKAGE=qt
-$(package)_version=5.7.1
-$(package)_download_path=https://download.qt.io/archive/qt/5.7/$($(package)_version)/submodules
-$(package)_suffix=opensource-src-$($(package)_version).tar.gz
+$(package)_version=5.9.7
+$(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=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00
$(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 aarch32-qmake.conf aarch64-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.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 fix_s390x_powerpc_mips_mipsel_architectures.patch xkb-default.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
-$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
-
+$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
$(package)_qttools_file_name=qttools-$($(package)_suffix)
-$(package)_qttools_sha256_hash=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
+$(package)_qttools_sha256_hash=d62e0f70d99645d6704dbb8976fb2222443061743689943d40970c52c49367a1
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -28,8 +27,7 @@ $(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-compile-examples
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
@@ -78,8 +76,21 @@ $(package)_config_opts += -reduce-exports
$(package)_config_opts += -static
$(package)_config_opts += -silent
$(package)_config_opts += -v
+$(package)_config_opts += -no-feature-dial
+$(package)_config_opts += -no-feature-ftp
+$(package)_config_opts += -no-feature-lcdnumber
+$(package)_config_opts += -no-feature-pdf
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printdialog
+$(package)_config_opts += -no-feature-concurrent
+$(package)_config_opts += -no-feature-sql
+$(package)_config_opts += -no-feature-statemachine
+$(package)_config_opts += -no-feature-syntaxhighlighter
+$(package)_config_opts += -no-feature-textbrowser
+$(package)_config_opts += -no-feature-textodfwriter
+$(package)_config_opts += -no-feature-udpsocket
+$(package)_config_opts += -no-feature-wizard
+$(package)_config_opts += -no-feature-xml
ifneq ($(build_os),darwin)
$(package)_config_opts_darwin = -xplatform macx-clang-linux
@@ -100,6 +111,15 @@ $(package)_config_opts_linux += -no-opengl
$(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host)
$(package)_config_opts_aarch64_linux = -platform linux-g++ -xplatform $(host)
$(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 pivx-linux-g++
+$(package)_config_opts_s390x_linux += -platform linux-g++ -xplatform linux-g++-64
+$(package)_config_opts_powerpc_linux += -platform linux-g++ -xplatform linux-g++-32
+$(package)_config_opts_powerpc64le_linux += -platform linux-g++ -xplatform linux-g++-64
+$(package)_config_opts_sparc64_linux += -platform linux-g++ -xplatform linux-g++-64
+$(package)_config_opts_alpha_linux += -platform linux-g++ -xplatform linux-g++-64
+$(package)_config_opts_m68k_linux += -platform linux-g++ -xplatform linux-g++-32
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
$(package)_build_env = QT_RCC_TEST=1
endef
@@ -117,11 +137,11 @@ define $(package)_extract_cmds
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
mkdir qtbase && \
- tar --strip-components=1 -xf $($(package)_source) -C qtbase && \
+ tar --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
mkdir qttranslations && \
- tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
+ tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
mkdir qttools && \
- tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
+ tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
@@ -130,7 +150,7 @@ define $(package)_preprocess_cmds
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|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 -e 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' -e 's|/bin/pwd|pwd|' qtbase/configure && \
sed -i.old 's/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0)/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft)/' qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
@@ -150,6 +170,10 @@ define $(package)_preprocess_cmds
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 &&\
+ patch -p1 -i $($(package)_patch_dir)/fix_s390x_powerpc_mips_mipsel_architectures.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
diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk
index 0c7c958d6..44110394b 100755
--- a/depends/packages/xcb_proto.mk
+++ b/depends/packages/xcb_proto.mk
@@ -1,6 +1,6 @@
package=xcb_proto
$(package)_version=1.10
-$(package)_download_path=http://xcb.freedesktop.org/dist
+$(package)_download_path=https://xcb.freedesktop.org/dist
$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2
$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05
diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk
index 65b6489c3..4adc03092 100755
--- a/depends/packages/xextproto.mk
+++ b/depends/packages/xextproto.mk
@@ -1,6 +1,6 @@
package=xextproto
$(package)_version=7.3.0
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0
$(package)_patches=fix_aarch64_build.patch
diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk
index 50a90b268..52fe253c7 100755
--- a/depends/packages/xproto.mk
+++ b/depends/packages/xproto.mk
@@ -1,6 +1,6 @@
package=xproto
$(package)_version=7.0.26
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk
index 99eefa6d5..5919c55a0 100755
--- a/depends/packages/xtrans.mk
+++ b/depends/packages/xtrans.mk
@@ -1,6 +1,6 @@
package=xtrans
$(package)_version=1.3.4
-$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a
$(package)_dependencies=
diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk
index 3f97221e1..991a4ae53 100755
--- a/depends/packages/zeromq.mk
+++ b/depends/packages/zeromq.mk
@@ -1,9 +1,9 @@
package=zeromq
-$(package)_version=4.2.2
+$(package)_version=4.3.1
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=5b23f4ca9ef545d5bd3af55d305765e3ee06b986263b31967435d285a3e6df6b
-$(package)_patches=0001-fix-build-with-older-mingw64.patch
+$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb
+$(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
diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk
index 589490800..1600b11a0 100755
--- a/depends/packages/zlib.mk
+++ b/depends/packages/zlib.mk
@@ -1,6 +1,6 @@
package=zlib
$(package)_version=1.2.11
-$(package)_download_path=http://www.zlib.net
+$(package)_download_path=https://www.zlib.net
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
diff --git a/depends/patches/qt/fix_s390x_powerpc_mips_mipsel_architectures.patch b/depends/patches/qt/fix_s390x_powerpc_mips_mipsel_architectures.patch
new file mode 100644
index 000000000..57328cfe8
--- /dev/null
+++ b/depends/patches/qt/fix_s390x_powerpc_mips_mipsel_architectures.patch
@@ -0,0 +1,17 @@
+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 93729fae..398988c8 100644
+--- a/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
++++ b/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
+@@ -60,9 +60,9 @@
+ #if defined(_M_X64) || defined(__x86_64__) || \
+ defined(__ARMEL__) || defined(__avr32__) || _M_ARM_FP || \
+ defined(__hppa__) || defined(__ia64__) || \
+- defined(__mips__) || \
+- defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+- defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
++ defined(__mips__) || defined(__mipsel__) || defined(__i386__) || \
++ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__powerpc64el__) || defined(__ppc64el__) || \
++ defined(__sparc__) || defined(__sparc) || defined(__s390__) || defined(__s390x__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+ defined(_MIPS_ARCH_MIPS32R2) || \
+ defined(__AARCH64EL__) || defined(__aarch64__) || \
diff --git a/doc/Doxyfile b/doc/Doxyfile
old mode 100755
new mode 100644
index 03186faf2..0a055f917
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -1,106 +1,122 @@
-# Doxyfile 1.7.4
-
-# !!! Invoke doxygen from project root using:
-# doxygen doc/Doxyfile
+# Doxyfile 1.8.12
# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
#
-# All text after a hash (#) is considered a comment and will be ignored
+# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
-PROJECT_NAME = VITAE
+PROJECT_NAME = "PIVX Core"
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
-PROJECT_NUMBER = 2.3.99
+PROJECT_NUMBER = 4.4.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "P2P Digital Currency"
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
PROJECT_LOGO = doc/bitcoin_logo_doxygen.png
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc/doxygen
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
CREATE_SUBDIRS = NO
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
+# The default value is: YES.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
@@ -112,11 +128,12 @@ ABBREVIATE_BRIEF = "The $name class" \
represents \
a \
an \
- the
+ the
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# doxygen will generate a detailed section even if there is only a brief
# description.
+# The default value is: NO.
ALWAYS_DETAILED_SEC = NO
@@ -124,521 +141,679 @@ ALWAYS_DETAILED_SEC = NO
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
+# The default value is: NO.
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
FULL_PATH_NAMES = YES
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
JAVADOC_AUTOBRIEF = YES
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
QT_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
MULTILINE_CPP_IS_BRIEF = NO
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 8
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n in the value part of an alias to insert newlines.
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
ALIASES =
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_FOR_C = NO
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
OPTIMIZE_FOR_FORTRAN = NO
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
OPTIMIZE_OUTPUT_VHDL = NO
# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
EXTENSION_MAPPING =
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 0.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 0
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
+# The default value is: NO.
CPP_CLI_SUPPORT = NO
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
SIP_SUPPORT = NO
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
+# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
SUBGROUPING = YES
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
INLINE_GROUPED_CLASSES = NO
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
EXTRACT_ALL = YES
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
EXTRACT_PRIVATE = YES
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
EXTRACT_STATIC = NO
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
EXTRACT_LOCAL_METHODS = NO
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
CASE_SENSE_NAMES = NO
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
SHOW_INCLUDE_FILES = YES
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
FORCE_LOCAL_INCLUDES = NO
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
SORT_MEMBER_DOCS = YES
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
SORT_BRIEF_DOCS = NO
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
SORT_MEMBERS_CTORS_1ST = NO
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
SORT_GROUP_NAMES = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
SORT_BY_SCOPE_NAME = NO
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
STRICT_PROTO_MATCHING = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if ... \endif and \cond
+# ... \endcond blocks.
ENABLED_SECTIONS =
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
SHOW_USED_FILES = YES
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
SHOW_FILES = YES
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
LAYOUT_FILE =
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
WARN_IF_UNDOCUMENTED = YES
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
WARN_IF_DOC_ERROR = YES
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
WARN_NO_PARAMDOC = NO
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
WARN_FORMAT = "$file:$line: $text"
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
WARN_LOGFILE =
#---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
INPUT = src
# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
FILE_PATTERNS = *.c \
*.cc \
@@ -673,29 +848,37 @@ FILE_PATTERNS = *.c \
*.vhd \
*.vhdl
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
RECURSIVE = YES
-# The EXCLUDE tag can be used to specify files and/or directories that should
+# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
-EXCLUDE = src/leveldb src/json src/test /src/qt/test
+EXCLUDE = src/leveldb \
+ src/json \
+ src/test \
+ src/qt/test
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
+# The default value is: NO.
EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS =
@@ -704,735 +887,1131 @@ EXCLUDE_PATTERNS =
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS = boost google
+EXCLUDE_SYMBOLS = boost \
+ google
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
EXAMPLE_PATTERNS = *
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
+# by executing (via popen()) the command:
+#
+#
+#
+# where is the value of the INPUT_FILTER tag, and is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
FILTER_SOURCE_FILES = NO
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
FILTER_SOURCE_PATTERNS =
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
#---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
SOURCE_BROWSER = YES
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
STRIP_CODE_COMMENTS = YES
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
REFERENCED_BY_RELATION = NO
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
REFERENCES_RELATION = NO
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
REFERENCES_LINK_SOURCE = YES
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
USE_HTAGS = NO
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
ALPHABETICAL_INDEX = YES
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
COLS_IN_ALPHA_INDEX = 5
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX =
#---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES =
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_HUE = 220
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_SAT = 100
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_TIMESTAMP = YES
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_SECTIONS = NO
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_DOCSET = NO
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_FEEDNAME = "Doxygen generated docs"
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_BUNDLE_ID = io.pivx.PIVX
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_ID = io.pivx.PIVX
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_PUBLISHER_NAME = Publisher
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
TOC_EXPAND = NO
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_QHP = NO
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE =
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE = org.doxygen.Project
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_VIRTUAL_FOLDER = doc
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME =
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-#
-# Qt Help Project / Custom Filters.
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-#
-# Qt Help Project / Filter Attributes.
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION =
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_ECLIPSEHELP = NO
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
ECLIPSE_DOC_ID = org.doxygen.Project
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
DISABLE_INDEX = NO
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_TREEVIEW = NO
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
-USE_INLINE_TREES = NO
+ENUM_VALUES_PER_LINE = 4
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
TREEVIEW_WIDTH = 250
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
EXT_LINKS_IN_WINDOW = NO
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
FORMULA_FONTSIZE = 10
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
FORMULA_TRANSPARENT = YES
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
USE_MATHJAX = NO
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use + S
+# (what the is depends on the OS and browser, but it is typically
+# , /