diff --git a/.gitattributes b/.gitattributes index 26d7549356a24..c9cf4a7d9cd03 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -src/version.cpp export-subst +src/clientversion.cpp export-subst diff --git a/.gitignore b/.gitignore index 66b8164320a1c..7557ba9900161 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,47 @@ +*.sublime-project +*.sublime-workspace +todo.txt +reset-files.bash + *.tar.gz *.exe src/dash src/dashd src/dash-cli +src/dash-tx src/test/test_dash src/qt/test/test_dash-qt +# autoreconf Makefile.in aclocal.m4 autom4te.cache/ +build-aux/config.guess +build-aux/config.sub +build-aux/depcomp +build-aux/install-sh +build-aux/ltmain.sh +build-aux/m4/libtool.m4 +build-aux/m4/lt~obsolete.m4 +build-aux/m4/ltoptions.m4 +build-aux/m4/ltsugar.m4 +build-aux/m4/ltversion.m4 +build-aux/missing +build-aux/compile +build-aux/test-driver config.log config.status configure -src/dash-config.h -src/dash-config.h.in -src/build-aux/ -src/stamp-h1 +libtool +src/config/dash-config.h +src/config/dash-config.h.in +src/config/stamp-h1 share/setup.nsi share/qt/Info.plist +src/univalue/gen + src/qt/*.moc src/qt/moc_*.cpp src/qt/forms/ui_*.h @@ -28,11 +50,13 @@ src/qt/test/moc*.cpp .deps .dirstamp +.libs .*.swp *.*~* *.bak *.rej *.orig +*.pyc *.o *.o-* *.patch @@ -48,6 +72,10 @@ src/qt/test/moc*.cpp *.json.h *.raw.h +#libtool object files +*.lo +*.la + # Compilation and Qt preprocessor part *.qm Makefile @@ -57,17 +85,13 @@ Dash-Qt.app # Unit-tests Makefile.test dash-qt_test +src/test/buildenv.py # Resources cpp qrc_*.cpp # Qt creator *.pro.user -darkcoi*.config -*.creator -*.creator.user -darkcoi*.files -darkcoi*.includes # Mac specific .DS_Store @@ -85,9 +109,12 @@ linux-coverage-build linux-build win32-build qa/pull-tester/run-bitcoind-for-test.sh -qa/pull-tester/build-tests.sh +qa/pull-tester/tests-config.sh +qa/pull-tester/cache/* +qa/pull-tester/test.*/* !src/leveldb*/Makefile .cproject .project +/doc/doxygen/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000..6cc24facfd14b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,66 @@ +# errata: +# - A travis bug causes caches to trample eachother when using the same +# compiler key (which we don't use anyway). This is worked around for now by +# replacing the "compilers" with a build name prefixed by the no-op ":" +# command. See: https://github.com/travis-ci/casher/issues/6 + +os: linux +language: cpp +env: + global: + - MAKEJOBS=-j3 + - RUN_TESTS=false + - CCACHE_SIZE=100M + - CCACHE_TEMPDIR=/tmp/.ccache-temp + - CCACHE_COMPRESS=1 + - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out + - SDK_URL=https://bitcoincore.org/depends-sources/sdks +cache: + apt: true + directories: + - depends/built + - depends/sdk-sources + - $HOME/.ccache +matrix: + fast_finish: true + include: + - compiler: ": ARM" + env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" + - compiler: ": dashd" + env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER" + - compiler: ": No wallet" + env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" + - compiler: ": 32-bit + dash" + env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash" + - compiler: ": Cross-Mac" + env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy" + - compiler: ": Win64" + env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" + - compiler: ": Win32" + env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" +install: + - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi + - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi +before_script: + - unset CC; unset CXX + - mkdir -p depends/SDKs depends/sdk-sources + - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $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: + - 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 + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi + - 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=dash VERSION=$HOST + - cd dash-$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 check; fi + - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi +after_script: + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi diff --git a/.tx/config b/.tx/config index 7fea3a3ad649f..c8b4b405cf700 100644 --- a/.tx/config +++ b/.tx/config @@ -1,8 +1,7 @@ [main] host = https://www.transifex.com -[dash.tx] +[dash.qt-translation-010x] file_filter = src/qt/locale/dash_.ts source_file = src/qt/locale/dash_en.ts source_lang = en -type = QT diff --git a/Makefile.am b/Makefile.am index ae9478660ed67..e5de3ac819387 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ -ACLOCAL_AMFLAGS = -I src/m4 +ACLOCAL_AMFLAGS = -I build-aux/m4 SUBDIRS = src -.PHONY: deploy +.PHONY: deploy FORCE GZIP_ENV="-9n" @@ -26,7 +26,9 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ $(top_srcdir)/contrib/macdeploy/background.png \ - $(top_srcdir)/contrib/macdeploy/DS_Store + $(top_srcdir)/contrib/macdeploy/DS_Store \ + $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \ + $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ leveldb_baseline.info test_dash_filtered.info total_coverage.info \ @@ -35,7 +37,8 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ dist-hook: -$(MAKE) -C $(top_distdir)/src/leveldb clean - -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf - + -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean + -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - distcheck-hook: $(MKDIR_P) $(top_distdir)/_build/src/leveldb @@ -45,7 +48,7 @@ distcheck-hook: distcleancheck: @: -$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN) +$(BITCOIN_WIN_INSTALLER): all-recursive $(MKDIR_P) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release @@ -53,8 +56,8 @@ $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN) @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ echo error: could not build $@ -$(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN): - make -C $(dir $@) $(notdir $@) +$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE + $(MAKE) -C src $(patsubst src/%,%,$@) $(OSX_APP)/Contents/PkgInfo: $(MKDIR_P) $(@D) @@ -82,16 +85,32 @@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lp if BUILD_DARWIN $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) - $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 + $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 +deploydir: $(OSX_DMG) else -$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) - INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2 - $(MKDIR_P) dist/.background - $(INSTALL) contrib/macdeploy/background.png dist/.background - $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store - cd dist; $(LN_S) /Applications Applications - $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Dash-Qt" -no-pad -r -apple -o $@ dist +APP_DIST_DIR=$(top_builddir)/dist +APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/background.png $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications + +$(APP_DIST_DIR)/Applications: + @rm -f $@ + @cd $(@D); $(LN_S) /Applications $(@F) + +$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt + +$(OSX_DMG): $(APP_DIST_EXTRAS) + $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Dash-Qt" -no-pad -r -apple -o $@ dist + +$(APP_DIST_DIR)/.background/background.png: + $(MKDIR_P) $(@D) + $(INSTALL) $(top_srcdir)/contrib/macdeploy/background.png $@ +$(APP_DIST_DIR)/.DS_Store: + $(INSTALL) $(top_srcdir)/contrib/macdeploy/DS_Store $@ + +$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING) + INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2 + +deploydir: $(APP_DIST_EXTRAS) endif if TARGET_DARWIN @@ -102,6 +121,15 @@ if TARGET_WINDOWS deploy: $(BITCOIN_WIN_INSTALLER) endif +$(BITCOIN_QT_BIN): FORCE + $(MAKE) -C src qt/$(@F) + +$(BITCOIND_BIN): FORCE + $(MAKE) -C src $(@F) + +$(BITCOIN_CLI_BIN): FORCE + $(MAKE) -C src $(@F) + if USE_LCOV baseline.info: @@ -159,10 +187,10 @@ endif if USE_COMPARISON_TOOL check-local: $(MKDIR_P) qa/tmp - @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) + @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1 endif -EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) +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) CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) diff --git a/README.md b/README.md index df09e878160c2..3178aa4849da3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Dash Core staging tree 0.11 +Dash Core staging tree 0.12 =============================== -http://www.dashpay.io +https://www.dashpay.io Copyright (c) 2009-2015 Bitcoin Core Developers @@ -18,7 +18,7 @@ are carried out collectively by the network. Dash Core is the name of open source software which enables the use of this currency. For more information, as well as an immediately useable, binary version of -the Dash Core software, see http://www.dashpay.io/downloads. +the Dash Core software, see https://www.dashpay.io/downloads. License @@ -27,25 +27,66 @@ License Dash Core is released under the terms of the MIT license. See [COPYING](COPYING) for more information or see http://opensource.org/licenses/MIT. +Development process +------------------- -Building process ------------------ +Developers work in their own trees, then submit pull requests when they think +their feature or bug fix is ready. -**compiling Dash from git** +If it is a simple/trivial/non-controversial change, then one of the Dash +development team members simply pulls it. -Use the autogen script to prepare the build environment. +If it is a *more complicated or potentially controversial* change, then the patch +submitter will be asked to start a discussion (if they haven't already) on the +[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev) - ./autogen.sh - ./configure - make +The patch will be accepted if there is broad consensus that it is a good thing. +Developers should expect to rework and resubmit patches if the code doesn't +match the project's coding conventions (see [doc/coding.md](doc/coding.md)) or are +controversial. -**precompiled binaries** +The `master` branch is regularly built and tested, but is not guaranteed to be +completely stable. [Tags](https://github.com/dashpay/dash/tags) are created +regularly to indicate new official, stable release versions of Dash. ***TODO*** -Precompiled binaries are available at github, see -https://github.com/dashproject/dash-binaries +Testing +------- + +Testing and code review is the bottleneck for development; we get more pull +requests than we can review and test on short notice. Please be patient and help out by testing +other people's pull requests, and remember this is a security-critical project where any mistake might cost people +lots of money. + +### Automated Testing + +Developers are strongly encouraged to write unit tests for new code, and to +submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: `make check` + +Every pull request is built for both Windows and Linux on a dedicated server, +and unit and sanity tests are automatically run. The binaries produced may be +used for manual QA testing — a link to them will appear in a comment on the +pull request posted by [DashPullTester](https://github.com/dashpay/PullTester). See https://github.com/TheBlueMatt/test-scripts +for the build/test scripts. ***TODO*** + +### Manual Quality Assurance (QA) Testing + +Large changes should have a test plan, and should be tested by somebody other +than the developer who wrote the code. +See https://github.com/dashpay/QA/ for how to create a test plan. ***TODO*** + +Translations +------------ + +Changes to translations as well as new translations can be submitted to +[Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/dash/). + +Translations are periodically pulled from Transifex and merged into the git repository. See the +[translation process](doc/translation_process.md) for details on how this works. -Always verify the signatures and checksums. +**Important**: We do not accept translation changes as GitHub pull requests because the next +pull from Transifex would automatically overwrite them again. +Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/dash-translators). ***TODO*** Development tips and tricks --------------------------- @@ -58,7 +99,7 @@ CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need. **debug.log** If the code is behaving strangely, take a look in the debug.log file in the data directory; -error and debugging message are written there. +error and debugging messages are written there. The -debug=... command-line option controls debugging; running with just -debug will turn on all categories (and give you a very large debug.log file). @@ -68,16 +109,16 @@ to see it. **testnet and regtest modes** -Run with the -testnet option to run with "play dashs" on the test network, if you +Run with the -testnet option to run with "play dash" on the test network, if you are testing multi-machine code that needs to operate across the internet. If you are testing something that can run on one machine, run with the -regtest option. -In regression test mode blocks can be created on-demand; see qa/rpc-tests/ for tests +In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests that run in -regtest mode. **DEBUG_LOCKORDER** Dash Core is a multithreaded application, and deadlocks or other multithreading bugs can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure -CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of what locks -are held, and adds warning to the debug.log file if inconsistencies are detected. +CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of which locks +are held, and adds warnings to the debug.log file if inconsistencies are detected. diff --git a/autogen.sh b/autogen.sh index 5b883a6a4c070..3e26a183059c0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,4 +2,8 @@ set -e srcdir="$(dirname $0)" cd "$srcdir" -autoreconf --install --force +if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then + LIBTOOLIZE="${GLIBTOOLIZE}" + export LIBTOOLIZE +fi +autoreconf --install --force --warnings=all diff --git a/src/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4 similarity index 100% rename from src/m4/ax_boost_base.m4 rename to build-aux/m4/ax_boost_base.m4 diff --git a/src/m4/ax_boost_chrono.m4 b/build-aux/m4/ax_boost_chrono.m4 similarity index 100% rename from src/m4/ax_boost_chrono.m4 rename to build-aux/m4/ax_boost_chrono.m4 diff --git a/src/m4/ax_boost_filesystem.m4 b/build-aux/m4/ax_boost_filesystem.m4 similarity index 100% rename from src/m4/ax_boost_filesystem.m4 rename to build-aux/m4/ax_boost_filesystem.m4 diff --git a/src/m4/ax_boost_program_options.m4 b/build-aux/m4/ax_boost_program_options.m4 similarity index 100% rename from src/m4/ax_boost_program_options.m4 rename to build-aux/m4/ax_boost_program_options.m4 diff --git a/src/m4/ax_boost_system.m4 b/build-aux/m4/ax_boost_system.m4 similarity index 100% rename from src/m4/ax_boost_system.m4 rename to build-aux/m4/ax_boost_system.m4 diff --git a/src/m4/ax_boost_thread.m4 b/build-aux/m4/ax_boost_thread.m4 similarity index 100% rename from src/m4/ax_boost_thread.m4 rename to build-aux/m4/ax_boost_thread.m4 diff --git a/src/m4/ax_boost_unit_test_framework.m4 b/build-aux/m4/ax_boost_unit_test_framework.m4 similarity index 100% rename from src/m4/ax_boost_unit_test_framework.m4 rename to build-aux/m4/ax_boost_unit_test_framework.m4 diff --git a/src/m4/ax_check_compile_flag.m4 b/build-aux/m4/ax_check_compile_flag.m4 similarity index 100% rename from src/m4/ax_check_compile_flag.m4 rename to build-aux/m4/ax_check_compile_flag.m4 diff --git a/src/m4/ax_check_link_flag.m4 b/build-aux/m4/ax_check_link_flag.m4 similarity index 100% rename from src/m4/ax_check_link_flag.m4 rename to build-aux/m4/ax_check_link_flag.m4 diff --git a/src/m4/ax_check_preproc_flag.m4 b/build-aux/m4/ax_check_preproc_flag.m4 similarity index 100% rename from src/m4/ax_check_preproc_flag.m4 rename to build-aux/m4/ax_check_preproc_flag.m4 diff --git a/build-aux/m4/ax_gcc_func_attribute.m4 b/build-aux/m4/ax_gcc_func_attribute.m4 new file mode 100644 index 0000000000000..275ca63a2c217 --- /dev/null +++ b/build-aux/m4/ax_gcc_func_attribute.m4 @@ -0,0 +1,217 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE) +# +# DESCRIPTION +# +# This macro checks if the compiler supports one of GCC's function +# attributes; many other compilers also provide function attributes with +# the same syntax. Compiler warnings are used to detect supported +# attributes as unsupported ones are ignored by default so quieting +# warnings when using this macro will yield false positives. +# +# The ATTRIBUTE parameter holds the name of the attribute to be checked. +# +# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_. +# +# The macro caches its result in the ax_cv_have_func_attribute_ +# variable. +# +# The macro currently supports the following function attributes: +# +# alias +# aligned +# alloc_size +# always_inline +# artificial +# cold +# const +# constructor +# deprecated +# destructor +# dllexport +# dllimport +# error +# externally_visible +# flatten +# format +# format_arg +# gnu_inline +# hot +# ifunc +# leaf +# malloc +# noclone +# noinline +# nonnull +# noreturn +# nothrow +# optimize +# pure +# unused +# used +# visibility +# warning +# warn_unused_result +# weak +# weakref +# +# Unsuppored function attributes will be tested with a prototype returning +# an int and not accepting any arguments and the result of the check might +# be wrong or meaningless so use with care. +# +# LICENSE +# +# Copyright (c) 2013 Gabriele Svelto +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 2 + +AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ + AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1]) + + AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + m4_case([$1], + [alias], [ + int foo( void ) { return 0; } + int bar( void ) __attribute__(($1("foo"))); + ], + [aligned], [ + int foo( void ) __attribute__(($1(32))); + ], + [alloc_size], [ + void *foo(int a) __attribute__(($1(1))); + ], + [always_inline], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [artificial], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [cold], [ + int foo( void ) __attribute__(($1)); + ], + [const], [ + int foo( void ) __attribute__(($1)); + ], + [constructor], [ + int foo( void ) __attribute__(($1)); + ], + [deprecated], [ + int foo( void ) __attribute__(($1(""))); + ], + [destructor], [ + int foo( void ) __attribute__(($1)); + ], + [dllexport], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [dllimport], [ + int foo( void ) __attribute__(($1)); + ], + [error], [ + int foo( void ) __attribute__(($1(""))); + ], + [externally_visible], [ + int foo( void ) __attribute__(($1)); + ], + [flatten], [ + int foo( void ) __attribute__(($1)); + ], + [format], [ + int foo(const char *p, ...) __attribute__(($1(printf, 1, 2))); + ], + [format_arg], [ + char *foo(const char *p) __attribute__(($1(1))); + ], + [gnu_inline], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [hot], [ + int foo( void ) __attribute__(($1)); + ], + [ifunc], [ + int my_foo( void ) { return 0; } + static int (*resolve_foo(void))(void) { return my_foo; } + int foo( void ) __attribute__(($1("resolve_foo"))); + ], + [leaf], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [malloc], [ + void *foo( void ) __attribute__(($1)); + ], + [noclone], [ + int foo( void ) __attribute__(($1)); + ], + [noinline], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [nonnull], [ + int foo(char *p) __attribute__(($1(1))); + ], + [noreturn], [ + void foo( void ) __attribute__(($1)); + ], + [nothrow], [ + int foo( void ) __attribute__(($1)); + ], + [optimize], [ + __attribute__(($1(3))) int foo( void ) { return 0; } + ], + [pure], [ + int foo( void ) __attribute__(($1)); + ], + [unused], [ + int foo( void ) __attribute__(($1)); + ], + [used], [ + int foo( void ) __attribute__(($1)); + ], + [visibility], [ + int foo_def( void ) __attribute__(($1("default"))); + int foo_hid( void ) __attribute__(($1("hidden"))); + ], + [warning], [ + int foo( void ) __attribute__(($1(""))); + ], + [warn_unused_result], [ + int foo( void ) __attribute__(($1)); + ], + [weak], [ + int foo( void ) __attribute__(($1)); + ], + [weakref], [ + static int foo( void ) { return 0; } + static int bar( void ) __attribute__(($1("foo"))); + ], + [ + m4_warn([syntax], [Unsupported attribute $1, the test may fail]) + int foo( void ) __attribute__(($1)); + ] + )], []) + ], + dnl GCC doesn't exit with an error if an unknown attribute is + dnl provided but only outputs a warning, so accept the attribute + dnl only if no warning were issued. + [AS_IF([test -s conftest.err], + [AS_VAR_SET([ac_var], [no])], + [AS_VAR_SET([ac_var], [yes])])], + [AS_VAR_SET([ac_var], [no])]) + ]) + + AS_IF([test yes = AS_VAR_GET([ac_var])], + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1, + [Define to 1 if the system has the `$1' function attribute])], []) + + AS_VAR_POPDEF([ac_var]) +]) diff --git a/src/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4 similarity index 100% rename from src/m4/ax_pthread.m4 rename to build-aux/m4/ax_pthread.m4 diff --git a/src/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 similarity index 82% rename from src/m4/bitcoin_find_bdb48.m4 rename to build-aux/m4/bitcoin_find_bdb48.m4 index 72ec49b63530f..f3b14461eb9e8 100644 --- a/src/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/bitcoin_find_bdb48.m4 @@ -12,29 +12,29 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ done for searchpath in $bdbdirlist ''; do test -n "${searchpath}" && searchpath="${searchpath}/" - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <${searchpath}db_cxx.h> - ],[ + ]],[[ #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) #error "failed to find bdb 4.8+" #endif - ],[ + ]])],[ if test "x$bdbpath" = "xX"; then bdbpath="${searchpath}" fi ],[ continue ]) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <${searchpath}db_cxx.h> - ],[ + ]],[[ #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) #error "failed to find bdb 4.8" #endif - ],[ + ]])],[ bdb48path="${searchpath}" break - ]) + ],[]) done if test "x$bdbpath" = "xX"; then AC_MSG_RESULT([no]) @@ -44,7 +44,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!]) ],[ - AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)]) + AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)]) ]) else BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx) @@ -60,7 +60,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ ]) done if test "x$BDB_LIBS" = "x"; then - AC_MSG_ERROR(libdb_cxx missing) + AC_MSG_ERROR([libdb_cxx missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) fi AC_SUBST(BDB_LIBS) ]) diff --git a/src/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 similarity index 76% rename from src/m4/bitcoin_qt.m4 rename to build-aux/m4/bitcoin_qt.m4 index 19775182d6067..d709c78533d30 100644 --- a/src/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -48,8 +48,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], - [with GUI (no|qt4|qt5|auto. default is auto, qt4 tried first.)])], + [AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@], + [build dash-qt GUI (default=auto, qt4 tried first)])], [ bitcoin_qt_want_version=$withval if test x$bitcoin_qt_want_version = xyes; then @@ -62,6 +62,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[ AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) + AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], []) AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], []) AC_ARG_WITH([qtdbus], @@ -69,6 +70,8 @@ AC_DEFUN([BITCOIN_QT_INIT],[ [enable DBus support (default is yes if qt is enabled and QtDBus is found)])], [use_dbus=$withval], [use_dbus=auto]) + + AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) ]) dnl Find the appropriate version of Qt libraries and includes. @@ -81,19 +84,75 @@ dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test AC_DEFUN([BITCOIN_QT_CONFIGURE],[ use_pkgconfig=$1 - if test x$use_pkgconfig == x; then + if test x$use_pkgconfig = x; then use_pkgconfig=yes fi if test x$use_pkgconfig = xyes; then - if test x$PKG_CONFIG == x; then - AC_MSG_ERROR(pkg-config not found.) - fi BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])]) 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 _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the + dnl results to QT_LIBS. + BITCOIN_QT_CHECK([ + TEMP_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$QT_INCLUDES + if test x$bitcoin_qt_got_major_vers = x5; then + _BITCOIN_QT_IS_STATIC + if test x$bitcoin_cv_static_qt = xyes; then + AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) + 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/platforms" + fi + if test x$use_pkgconfig = xyes; then + PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"]) + fi + _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) + 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 + PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"]) + _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 + if test x$use_pkgconfig = xyes; then + PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"]) + fi + 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 + else + if test x$TARGET_OS = xwindows; then + AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) + 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 + _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]) + fi + fi + CPPFLAGS=$TEMP_CPPFLAGS + ]) + 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`" @@ -106,7 +165,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ 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) - MOC_DEFS='-DHAVE_CONFIG_H -I$(top_srcdir)/src' + MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)' case $host in *darwin*) BITCOIN_QT_CHECK([ @@ -137,7 +196,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.") fi - if test x$LUPDATE == x; then + if test x$LUPDATE = x; then AC_MSG_WARN("lupdate is required to update qt translations") fi ],[ @@ -165,17 +224,17 @@ dnl Requires: INCLUDES must be populated as necessary. dnl Output: bitcoin_cv_qt5=yes|no AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[ - AC_TRY_COMPILE( - [#include ], - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[ #if QT_VERSION < 0x050000 choke me #else return 0; #endif - ], - bitcoin_cv_qt5=yes, - bitcoin_cv_qt5=no) + ]])], + [bitcoin_cv_qt5=yes], + [bitcoin_cv_qt5=no]) ])]) dnl Internal. Check if the linked version of Qt was built as static libs. @@ -185,15 +244,15 @@ dnl Output: bitcoin_cv_static_qt=yes|no dnl Output: Defines QT_STATICPLUGIN if plugins are static. AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ - AC_TRY_COMPILE( - [#include ], - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[ #if defined(QT_STATIC) return 0; #else choke me #endif - ], + ]])], [bitcoin_cv_static_qt=yes], [bitcoin_cv_static_qt=no]) ]) @@ -211,13 +270,13 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[ AC_MSG_CHECKING(for static Qt plugins: $2) CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS" LIBS="$2 $QT_LIBS $LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #define QT_STATICPLUGIN #include - $1], - [return 0;], + $1]], + [[return 0;]])], [AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"], - [AC_MSG_RESULT(no)]; BITCOIN_QT_FAIL(Could not resolve: $2)) + [AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)]) LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" ]) @@ -232,10 +291,10 @@ 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 + 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 + 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 @@ -245,14 +304,14 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[ 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 + 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 + 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 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$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then if test x$auto_priority_version = x$qt5; 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 @@ -299,7 +358,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 + 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 @@ -313,62 +372,25 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ if test x$qt_lib_path != x; then LIBS="$LIBS -L$qt_lib_path" fi - if test x$qt_plugin_path != x; then - LIBS="$LIBS -L$qt_plugin_path/accessible" - if test x$bitcoin_qt_got_major_vers == x5; then - LIBS="$LIBS -L$qt_plugin_path/platforms" - else - LIBS="$LIBS -L$qt_plugin_path/codecs" - fi - fi - if test x$TARGET_OS == xwindows; then + if test x$TARGET_OS = xwindows; then AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found)) fi ]) - BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,BITCOIN_QT_FAIL(zlib not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,BITCOIN_QT_FAIL(png not found))) + BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in]))) + BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in]))) + BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in]))) + BITCOIN_QT_CHECK(AC_CHECK_LIB([pcre16] ,[main],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in]))) 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 + 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 QT_LIBS="$LIBS" LIBS="$TEMP_LIBS" - 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 all non-pkg-config builds. - dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the - dnl results to QT_LIBS. - BITCOIN_QT_CHECK([ - if test x$bitcoin_qt_got_major_vers == x5; then - _BITCOIN_QT_IS_STATIC - if test x$bitcoin_cv_static_qt == xyes; then - AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) - _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) - if test x$TARGET_OS == xwindows; then - _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows]) - fi - fi - else - 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]) - fi - ]) - BITCOIN_QT_CHECK([ LIBS= if test x$qt_lib_path != x; then diff --git a/src/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4 similarity index 100% rename from src/m4/bitcoin_subdir_to_include.m4 rename to build-aux/m4/bitcoin_subdir_to_include.m4 diff --git a/configure.ac b/configure.ac index 624bef4ae3c18..9f91a764b887f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,47 +1,78 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 11) -define(_CLIENT_VERSION_REVISION, 2) -define(_CLIENT_VERSION_BUILD, 23) +define(_CLIENT_VERSION_MINOR, 12) +define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_BUILD, 43) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2015) AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash]) -AC_CONFIG_AUX_DIR([src/build-aux]) -AC_CONFIG_MACRO_DIR([src/m4]) +AC_CONFIG_SRCDIR([src/main.cpp]) +AC_CONFIG_HEADERS([src/config/dash-config.h]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([build-aux/m4]) + AC_CANONICAL_HOST + AH_TOP([#ifndef DASH_CONFIG_H]) AH_TOP([#define DASH_CONFIG_H]) AH_BOTTOM([#endif //DASH_CONFIG_H]) -# This m4 will only be used if a system copy cannot be found. This is helpful -# on systems where autotools are installed but the pkg-config macros are not in -# a default location. It is currently used for building on OSX where autotools -# are preinstalled but pkg-config comes from macports or homebrew. It should -# probably be removed when building on <= 10.6 is no longer supported. -m4_include([pkg.m4]) - dnl faketime breaks configure and is only needed for make. Disable it here. unset FAKETIME +dnl Automake init set-up and checks +AM_INIT_AUTOMAKE([no-define subdir-objects foreign]) + +dnl faketime messes with timestamps and causes configure to be re-run. +dnl --disable-maintainer-mode can be used to bypass this. +AM_MAINTAINER_MODE([enable]) + +dnl make the compilation flags quiet unless V=1 is used +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl Compiler checks (here before libtool). if test "x${CXXFLAGS+set}" = "xset"; then CXXFLAGS_overridden=yes else CXXFLAGS_overridden=no fi +AC_PROG_CXX +m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX]) -dnl ============================================================== -dnl Setup for automake -dnl ============================================================== +dnl By default, libtool for mingw refuses to link static libs into a dll for +dnl fear of mixing pic/non-pic objects, and import/export complications. Since +dnl we have those under control, re-enable that functionality. +case $host in + *mingw*) + lt_cv_deplibs_check_method="pass_all" + ;; +esac +dnl Libtool init checks. +LT_INIT([pic-only]) -AM_INIT_AUTOMAKE([no-define subdir-objects foreign]) +dnl Check/return PATH for base programs. +AC_PATH_TOOL(AR, ar) +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_PROG(GENHTML, genhtml) +AC_PATH_PROG([GIT], [git]) +AC_PATH_PROG(CCACHE,ccache) +AC_PATH_PROG(XGETTEXT,xgettext) +AC_PATH_PROG(HEXDUMP,hexdump) -dnl faketime messes with timestamps and causes configure to be re-run. -dnl --disable-maintainer-mode can be used to bypass this. -AM_MAINTAINER_MODE([enable]) +# This m4 will only be used if a system copy cannot be found. This is helpful +# on systems where autotools are installed but the pkg-config macros are not in +# a default location. It is currently used for building on OSX where autotools +# are preinstalled but pkg-config comes from macports or homebrew. It should +# probably be removed when building on <= 10.6 is no longer supported. +m4_include([pkg.m4]) -dnl make the compilation flags quiet unless V=1 is used -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +dnl pkg-config check. +PKG_PROG_PKG_CONFIG # Enable wallet AC_ARG_ENABLE([wallet], @@ -89,6 +120,12 @@ AC_ARG_ENABLE([hardening], [use_hardening=$enableval], [use_hardening=yes]) +AC_ARG_ENABLE([reduce-exports], + [AS_HELP_STRING([--enable-reduce-exports], + [attempt to reduce exported symbols in the resulting executables (default is yes)])], + [use_reduce_exports=$enableval], + [use_reduce_exports=auto]) + AC_ARG_ENABLE([ccache], [AS_HELP_STRING([--enable-ccache], [use ccache for building (default is yes if ccache is found)])], @@ -109,34 +146,6 @@ AC_ARG_ENABLE([glibc-back-compat], AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], []) - -AC_CONFIG_SRCDIR([src]) -AC_CONFIG_HEADERS([src/dash-config.h]) - -dnl Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXXCPP -AC_PROG_INSTALL -AC_PROG_OBJC -AC_PROG_LN_S -m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX]) -AC_PROG_MKDIR_P -AC_PROG_SED -AC_PATH_TOOL(AR, ar) -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_PROG(GENHTML, genhtml) -AC_PATH_PROG([GIT], [git]) -AC_PATH_PROG(CCACHE,ccache) -AC_PATH_PROG(XGETTEXT,xgettext) -AC_PATH_PROG(HEXDUMP,hexdump) -PKG_PROG_PKG_CONFIG - # Enable debug AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], @@ -162,6 +171,24 @@ if test "x$CXXFLAGS_overridden" = "xno"; then fi CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" +AC_ARG_WITH([utils], + [AS_HELP_STRING([--with-utils], + [build dash-cli dash-tx (default=yes)])], + [build_bitcoin_utils=$withval], + [build_bitcoin_utils=yes]) + +AC_ARG_WITH([libs], + [AS_HELP_STRING([--with-libs], + [build libraries (default=yes)])], + [build_bitcoin_libs=$withval], + [build_bitcoin_libs=yes]) + +AC_ARG_WITH([daemon], + [AS_HELP_STRING([--with-daemon], + [build dashd daemon (default=yes)])], + [build_bitcoind=$withval], + [build_bitcoind=yes]) + AC_LANG_PUSH([C++]) use_pkgconfig=yes @@ -192,9 +219,9 @@ case $host in AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing)) AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing)) - AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"]) - AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"]) - AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"]) + # -static is interpreted by libtool, where it has a different meaning. + # In libtool-speak, it's -all-static. + AX_CHECK_LINK_FLAG([[-static]],[LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"]) AC_PATH_PROG([MAKENSIS], [makensis], none) if test x$MAKENSIS = xnone; then @@ -217,6 +244,15 @@ case $host in *) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;; esac AC_SUBST(WINDOWS_BITS) + + dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. + dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override + dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are + dnl also overridden to prevent their insertion later. + dnl This should only affect dll's. + archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" + postdeps_CXX= + ;; *darwin*) TARGET_OS=darwin @@ -226,13 +262,17 @@ case $host in AC_CHECK_PROG([PORT],port, port) if test x$PORT = xport; then dnl add default macports paths - CPPFLAGS="$CPPFLAGS -isystem /opt/local/include -I/opt/local/include/db48" - LIBS="$LIBS -L/opt/local/lib -L/opt/local/lib/db48" + CPPFLAGS="$CPPFLAGS -isystem /opt/local/include" + LIBS="$LIBS -L/opt/local/lib" + if test -d /opt/local/include/db48; then + CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48" + LIBS="$LIBS -L/opt/local/lib/db48" + fi fi AC_CHECK_PROG([BREW],brew, brew) if test x$BREW = xbrew; then - dnl These Homebrew packages may be bottled, meaning that they won't be found + dnl These Homebrew packages may be keg-only, meaning that they won't be found dnl in expected paths because they may conflict with system files. Ask dnl Homebrew where each one is located, then adjust paths accordingly. dnl It's safe to add these paths even if the functionality is disabled by @@ -242,14 +282,16 @@ case $host in bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null` qt5_prefix=`$BREW --prefix qt5 2>/dev/null` if test x$openssl_prefix != x; then - export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH fi if test x$bdb_prefix != x; then CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include" LIBS="$LIBS -L$bdb_prefix/lib" fi if test x$qt5_prefix != x; then - export PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH fi fi else @@ -261,12 +303,22 @@ case $host in AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool) AC_PATH_TOOL([OTOOL], [otool], otool) AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage) + + dnl libtool will try to strip the static lib, which is a problem for + dnl cross-builds because strip attempts to call a hard-coded ld, + dnl which may not exist in the path. Stripping the .a is not + dnl necessary, so just disable it. + old_striplib= ;; esac fi + AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"]) CPPFLAGS="$CPPFLAGS -DMAC_OSX" ;; + *linux*) + TARGET_OS=linux + ;; *) ;; esac @@ -276,7 +328,7 @@ if test x$use_comparison_tool != xno; then fi if test x$use_comparison_tool_reorg_tests != xno; then - if test x$use_comparison_tool == x; then + if test x$use_comparison_tool = x; then AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified") fi AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1) @@ -284,20 +336,20 @@ else AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0) fi -if test x$use_lcov == xyes; then - if test x$LCOV == x; then +if test x$use_lcov = xyes; then + if test x$LCOV = x; then AC_MSG_ERROR("lcov testing requested but lcov not found") fi - if test x$GCOV == x; then + if test x$GCOV = x; then AC_MSG_ERROR("lcov testing requested but gcov not found") fi - if test x$JAVA == x; then + if test x$JAVA = x; then AC_MSG_ERROR("lcov testing requested but java not found") fi - if test x$GENHTML == x; then + if test x$GENHTML = x; then AC_MSG_ERROR("lcov testing requested but genhtml not found") fi - if test x$use_comparison_tool == x; then + if test x$use_comparison_tool = x; then AC_MSG_ERROR("lcov testing requested but comparison tool was not specified") fi LCOV="$LCOV --gcov-tool=$GCOV" @@ -310,7 +362,6 @@ AC_C_BIGENDIAN([AC_MSG_ERROR("Big Endian not supported")]) dnl Check for pthread compile/link requirements AX_PTHREAD -INCLUDES="$INCLUDES $PTHREAD_CFLAGS" # The following macro will add the necessary defines to dash-config.h, but # they also need to be passed down to any subprojects. Pull the results out of @@ -333,17 +384,21 @@ fi AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) +AX_GCC_FUNC_ATTRIBUTE([visibility]) +AX_GCC_FUNC_ATTRIBUTE([dllexport]) +AX_GCC_FUNC_ATTRIBUTE([dllimport]) + if test x$use_glibc_compat != xno; then #__fdelt_chk's params and return type have changed from long unsigned int to long int. # See which one is present here. AC_MSG_CHECKING(__fdelt_chk type) - AC_TRY_COMPILE([#ifdef _FORTIFY_SOURCE + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE #undef _FORTIFY_SOURCE #endif #define _FORTIFY_SOURCE 2 #include - extern "C" long unsigned int __fdelt_warn(long unsigned int);],[], + extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])], [ fdelt_type="long unsigned int"], [ fdelt_type="long int"]) AC_MSG_RESULT($fdelt_type) @@ -367,6 +422,17 @@ if test x$use_hardening != xno; then AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) + if test x$TARGET_OS != xwindows; then + # All windows code is PIC, forcing it on just adds useless compile warnings + AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) + AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) + fi + + case $host in + *mingw*) + AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(lib missing)) + ;; + esac CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS" CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS" @@ -379,16 +445,57 @@ if test x$TARGET_OS = xdarwin; then AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) fi -AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h]) +AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) +AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])]) +AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])]) + +AC_CHECK_DECLS([strnlen]) + +AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, htobe64],,, + [#if HAVE_ENDIAN_H + #include + #endif]) dnl Check for MSG_NOSIGNAL AC_MSG_CHECKING(for MSG_NOSIGNAL) -AC_TRY_COMPILE([#include ], - [ int f = MSG_NOSIGNAL; ], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[ int f = MSG_NOSIGNAL; ]])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ], [ AC_MSG_RESULT(no)] ) +AC_SEARCH_LIBS([clock_gettime],[rt]) + +AC_MSG_CHECKING([for visibility attribute]) +AC_LINK_IFELSE([AC_LANG_SOURCE([ + int foo_def( void ) __attribute__((visibility("default"))); + int main(){} + ])], + [ + AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.]) + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT(no) + if test x$use_reduce_exports = xyes; then + AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduced-exports.]) + fi + AC_MSG_WARN([Cannot find a working visibility attribute. Disabling reduced exports.]) + use_reduce_exports=no + ] +) + +if test x$use_reduce_exports != xno; then + AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"], + [ + if test x$use_reduce_exports = xyes; then + AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduced-exports.]) + fi + AC_MSG_WARN([Cannot set default symbol visibility. Disabling reduced exports.]) + use_reduce_exports=no + ]) +fi + LEVELDB_CPPFLAGS= LIBLEVELDB= LIBMEMENV= @@ -406,11 +513,24 @@ dnl Check for libminiupnpc (optional) if test x$use_upnp != xno; then AC_CHECK_HEADERS( [miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], - [AC_CHECK_LIB([miniupnpc], [main],, [have_miniupnpc=no])], + [AC_CHECK_LIB([miniupnpc], [main],[MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])], [have_miniupnpc=no] ) fi +BITCOIN_QT_INIT + +dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus +BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4]) + +if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then + use_boost=no +else + use_boost=yes +fi + +if test x$use_boost = xyes; then + dnl Check for boost libs AX_BOOST_BASE AX_BOOST_SYSTEM @@ -419,6 +539,44 @@ AX_BOOST_PROGRAM_OPTIONS AX_BOOST_THREAD AX_BOOST_CHRONO + +if test x$use_reduce_exports != xno; then + AC_MSG_CHECKING([for working boost reduced exports]) + TEMP_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + ]], [[ + #if BOOST_VERSION >= 104900 + // Everything is okay + #else + # error Boost version is too old + #endif + ]])],[ + AC_MSG_RESULT(yes) + ],[: + if test x$use_reduce_exports = xauto; then + use_reduce_exports=no + else + if test x$use_reduce_exports = xyes; then + AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduced-exports.]) + fi + fi + AC_MSG_RESULT(no) + AC_MSG_WARN([boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.]) + ]) + CPPFLAGS="$TEMP_CPPFLAGS" +fi + +elif test x$use_reduce_exports = xauto; then + use_reduce_exports=yes +fi + +if test x$use_reduce_exports != xno; then + CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS" + AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"]) +fi + if test x$use_tests = xyes; then if test x$HEXDUMP = x; then @@ -426,6 +584,8 @@ if test x$use_tests = xyes; then fi + if test x$use_boost = xyes; then + AX_BOOST_UNIT_TEST_FRAMEWORK dnl Determine if -DBOOST_TEST_DYN_LINK is needed @@ -445,10 +605,13 @@ if test x$use_tests = xyes; then [AC_MSG_RESULT(no)]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" + + fi fi +if test x$use_boost = xyes; then + BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB" -BOOST_INCLUDES="$BOOST_CPPFLAGS" dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if @@ -457,23 +620,20 @@ dnl after 1.56. dnl If neither is available, abort. dnl If sleep_for is used, boost_chrono becomes a requirement. if test x$ax_cv_boost_chrono = xyes; then -dnl Allow passing extra needed dependency libraries for boost-chrono from static gitian build -BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS" - TEMP_LIBS="$LIBS" -LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB" +LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include - ],[ + ]],[[ #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); #else choke me #endif - ], + ]])], [boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB"; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])], [boost_sleep=no]) @@ -483,20 +643,20 @@ fi if test x$boost_sleep != xyes; then TEMP_LIBS="$LIBS" -LIBS="$LIBS $BOOST_LIBS" +LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include - ],[ + ]],[[ #if BOOST_VERSION <= 105600 boost::this_thread::sleep(boost::posix_time::milliseconds(0)); #else choke me #endif - ], + ]])], [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])], [boost_sleep=no]) LIBS="$TEMP_LIBS" @@ -507,23 +667,11 @@ if test x$boost_sleep != xyes; then AC_MSG_ERROR(No working boost sleep implementation found.) fi -AC_ARG_WITH([cli], - [AS_HELP_STRING([--with-cli], - [with CLI (default is yes)])], - [build_bitcoin_cli=$withval], - [build_bitcoin_cli=yes]) - -AC_ARG_WITH([daemon], - [AS_HELP_STRING([--with-daemon], - [with daemon (default is yes)])], - [build_bitcoind=$withval], - [build_bitcoind=yes]) - -BITCOIN_QT_INIT +fi if test x$use_pkgconfig = xyes; then - if test x$PKG_CONFIG == x; then + if test x"$PKG_CONFIG" = "x"; then AC_MSG_ERROR(pkg-config not found.) fi @@ -531,8 +679,8 @@ if test x$use_pkgconfig = xyes; then m4_ifdef( [PKG_CHECK_MODULES], [ - PKG_CHECK_MODULES([SSL], [libssl], [INCLUDES="$INCLUDES $SSL_CFLAGS"; LIBS="$LIBS $SSL_LIBS"], [AC_MSG_ERROR(openssl not found.)]) - PKG_CHECK_MODULES([CRYPTO], [libcrypto], [INCLUDES="$INCLUDES $CRYPTO_CFLAGS"; LIBS="$LIBS $CRYPTO_LIBS"], [AC_MSG_ERROR(libcrypto not found.)]) + PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)]) + PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)]) BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])]) if test x$use_qr != xno; then BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) @@ -541,30 +689,50 @@ if test x$use_pkgconfig = xyes; then ) else AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing)) - AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR(libcrypto missing)) + AC_CHECK_LIB([crypto], [main],CRYPTO_LIBS=-lcrypto, AC_MSG_ERROR(libcrypto missing)) AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),) - AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR(libssl missing)) + AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing)) - BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],,BITCOIN_QT_FAIL(libprotobuf not found))) + BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found))) if test x$use_qr != xno; then - BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no])]) + BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])]) BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)]) fi 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!])] + ) +]) + +CFLAGS_TEMP="$CFLAGS" +LIBS_TEMP="$LIBS" +CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS" +LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS" +AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),) +CFLAGS="$CFLAGS_TEMP" +LIBS="$LIBS_TEMP" + BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path) AC_MSG_CHECKING([whether to build dashd]) AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes]) AC_MSG_RESULT($build_bitcoind) -AC_MSG_CHECKING([whether to build dash-cli]) -AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes]) -AC_MSG_RESULT($build_bitcoin_cli) +AC_MSG_CHECKING([whether to build utils (dash-cli dash-tx)]) +AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes]) +AC_MSG_RESULT($build_bitcoin_utils) -dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus -BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4]) +AC_MSG_CHECKING([whether to build libraries]) +AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes]) +if test x$build_bitcoin_libs = xyes; then + AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built]) +fi +AC_MSG_RESULT($build_bitcoin_libs) AC_LANG_POP @@ -583,6 +751,9 @@ if test "x$use_ccache" != "xno"; then fi AC_MSG_RESULT($use_ccache) fi +if test "x$use_ccache" = "xyes"; then + AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"]) +fi dnl enable wallet AC_MSG_CHECKING([if wallet should be enabled]) @@ -614,7 +785,7 @@ else AC_MSG_RESULT($use_upnp_default) AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state]) if test x$TARGET_OS = xwindows; then - CPPFLAGS="$CPPFLAGS -DMINIUPNP_STATICLIB" + MINIUPNPC_CPPFLAGS="-DSTATICLIB -DMINIUPNP_STATICLIB" fi else AC_MSG_RESULT(no) @@ -634,7 +805,7 @@ if test x$bitcoin_enable_qt != xno; then dnl enable qr support AC_MSG_CHECKING([whether to build GUI with support for QR codes]) if test x$have_qrencode = xno; then - if test x$use_qr == xyes; then + if test x$use_qr = xyes; then AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode") fi AC_MSG_RESULT(no) @@ -648,7 +819,7 @@ if test x$bitcoin_enable_qt != xno; then fi fi - if test x$XGETTEXT == x; then + if test x$XGETTEXT = x; then AC_MSG_WARN("xgettext is required to update qt translations") fi @@ -669,19 +840,30 @@ else AC_MSG_RESULT([no]) fi -if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then - AC_MSG_ERROR([No targets! Please specify at least one of: --enable-cli --enable-daemon --enable-gui or --enable-tests]) +AC_MSG_CHECKING([whether to reduce exports]) +if test x$use_reduce_exports != xno; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then + AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests]) fi AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) -AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes]) +AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) +AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes]) +AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes]) +AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes]) AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) -AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes]) +AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes]) 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]) AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version]) AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version]) @@ -696,17 +878,57 @@ AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) - +AC_SUBST(RELDFLAGS) +AC_SUBST(LIBTOOL_APP_LDFLAGS) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) -AC_SUBST(INCLUDES) AC_SUBST(BOOST_LIBS) AC_SUBST(TESTDEFS) AC_SUBST(LEVELDB_TARGET_FLAGS) AC_SUBST(BUILD_TEST) AC_SUBST(BUILD_QT) AC_SUBST(BUILD_TEST_QT) -AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile src/qt/Makefile src/qt/test/Makefile share/setup.nsi share/qt/Info.plist]) +AC_SUBST(MINIUPNPC_CPPFLAGS) +AC_SUBST(MINIUPNPC_LIBS) +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/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh]) +AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh]) + +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. +dnl Until this is fixed upstream and we've synced, we'll just un-export them. +CPPFLAGS_TEMP="$CPPFLAGS" +unset CPPFLAGS +CPPFLAGS="$CPPFLAGS_TEMP" + +LDFLAGS_TEMP="$LDFLAGS" +unset LDFLAGS +LDFLAGS="$LDFLAGS_TEMP" + +LIBS_TEMP="$LIBS" +unset LIBS +LIBS="$LIBS_TEMP" + +PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" +unset PKG_CONFIG_PATH +PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP" + +PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR" +unset PKG_CONFIG_LIBDIR +PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP" + +ac_configure_args="${ac_configure_args} --disable-shared --with-pic" +AC_CONFIG_SUBDIRS([src/secp256k1]) + AC_OUTPUT + +dnl Taken from https://wiki.debian.org/RpathIssue +case $host in + *-*-linux-gnu) + AC_MSG_RESULT([Fixing libtool for -rpath problems.]) + sed < libtool > libtool-2 \ + 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' + mv libtool-2 libtool + chmod 755 libtool + ;; +esac diff --git a/contrib/README.md b/contrib/README.md index 92d0a343dbce2..dae975e9efc2c 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -19,13 +19,9 @@ Contains the script `github-merge.sh` for merging github pull requests securely ### [Linearize](/contrib/linearize) ### Construct a linear, no-fork, best version of the blockchain. -### [PyMiner](/contrib/pyminer) ### - -This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow. The purpose is to provide a reference implementation of a miner, for study. - ### [Qos](/contrib/qos) ### -A Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. +A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. ### [Seeds](/contrib/seeds) ### Utility to generate the pnSeed[] array that is compiled into the client. diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py index dcdea86bdc499..38c0f69e4da77 100644 --- a/contrib/bitrpc/bitrpc.py +++ b/contrib/bitrpc/bitrpc.py @@ -22,6 +22,18 @@ print access.backupwallet(path) except: print "\n---An error occurred---\n" + +elif cmd == "encryptwallet": + try: + pwd = getpass.getpass(prompt="Enter passphrase: ") + pwd2 = getpass.getpass(prompt="Repeat passphrase: ") + if pwd == pwd2: + access.encryptwallet(pwd) + print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n" + else: + print "\n---Passphrases do not match---\n" + except: + print "\n---An error occurred---\n" elif cmd == "getaccount": try: diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro index 3f8f2f5c0eda5..01aad71ff2fd0 100644 --- a/contrib/dash-qt.pro +++ b/contrib/dash-qt.pro @@ -1,342 +1,664 @@ -# lupdate-qt4 ./dash-qt.pro -ts ../src/qt/locale/dash_en.ts +###################################################################### +# Automatically generated by qmake (2.01a) ?? ??? 17 02:23:35 2015 +###################################################################### -HEADERS += \ - ../src/activemasternode.h \ - ../src/addrman.h \ - ../src/alert.h \ - ../src/allocators.h \ - ../src/base58.h \ - ../src/bignum.h \ - ../src/dash-config.h \ - ../src/bloom.h \ - ../src/chainparams.h \ - ../src/checkpoints.h \ - ../src/checkqueue.h \ - ../src/clientversion.h \ - ../src/coincontrol.h \ - ../src/coins.h \ - ../src/compat.h \ - ../src/core.h \ - ../src/crypter.h \ - ../src/darksend.h \ - ../src/db.h \ - ../src/hash.h \ - ../src/init.h \ - ../src/instantx.h \ - ../src/keepass.h \ - ../src/key.h \ - ../src/keystore.h \ - ../src/leveldbwrapper.h \ - ../src/limitedmap.h \ - ../src/main.h \ - ../src/masternode.h \ - ../src/masternodeconfig.h \ - ../src/miner.h \ - ../src/mruset.h \ - ../src/net.h \ - ../src/netbase.h \ - ../src/noui.h \ - ../src/protocol.h \ - ../src/rpcclient.h \ - ../src/rpcprotocol.h \ - ../src/rpcserver.h \ - ../src/script.h \ - ../src/serialize.h \ - ../src/sph_blake.h \ - ../src/sph_bmw.h \ - ../src/sph_cubehash.h \ - ../src/sph_echo.h \ - ../src/sph_groestl.h \ - ../src/sph_jh.h \ - ../src/sph_keccak.h \ - ../src/sph_luffa.h \ - ../src/sph_shavite.h \ - ../src/sph_simd.h \ - ../src/sph_skein.h \ - ../src/sph_types.h \ - ../src/sync.h \ - ../src/threadsafety.h \ - ../src/tinyformat.h \ - ../src/txdb.h \ - ../src/txmempool.h \ - ../src/ui_interface.h \ - ../src/uint256.h \ - ../src/util.h \ - ../src/version.h \ - ../src/wallet.h \ - ../src/walletdb.h \ - ../src/qt/addressbookpage.h \ - ../src/qt/addresstablemodel.h \ - ../src/qt/askpassphrasedialog.h \ - ../src/qt/bitcoinaddressvalidator.h \ - ../src/qt/bitcoinamountfield.h \ - ../src/qt/bitcoingui.h \ - ../src/qt/bitcoinunits.h \ - ../src/qt/clientmodel.h \ - ../src/qt/coincontroldialog.h \ - ../src/qt/coincontroltreewidget.h \ - ../src/qt/csvmodelwriter.h \ - ../src/qt/darksendconfig.h \ - ../src/qt/editaddressdialog.h \ - ../src/qt/guiconstants.h \ - ../src/qt/guiutil.h \ - ../src/qt/intro.h \ - ../src/qt/macdockiconhandler.h \ - ../src/qt/macnotificationhandler.h \ - ../src/qt/monitoreddatamapper.h \ - ../src/qt/notificator.h \ - ../src/qt/openuridialog.h \ - ../src/qt/optionsdialog.h \ - ../src/qt/optionsmodel.h \ - ../src/qt/overviewpage.h \ - ../src/qt/paymentrequest.pb.h \ - ../src/qt/paymentrequestplus.h \ - ../src/qt/paymentserver.h \ - ../src/qt/qvalidatedlineedit.h \ - ../src/qt/qvaluecombobox.h \ - ../src/qt/receivecoinsdialog.h \ - ../src/qt/receiverequestdialog.h \ - ../src/qt/recentrequeststablemodel.h \ - ../src/qt/rpcconsole.h \ - ../src/qt/sendcoinsdialog.h \ - ../src/qt/sendcoinsentry.h \ - ../src/qt/signverifymessagedialog.h \ - ../src/qt/splashscreen.h \ - ../src/qt/trafficgraphwidget.h \ - ../src/qt/transactiondesc.h \ - ../src/qt/transactiondescdialog.h \ - ../src/qt/transactionfilterproxy.h \ - ../src/qt/transactionrecord.h \ - ../src/qt/transactiontablemodel.h \ - ../src/qt/transactionview.h \ - ../src/qt/utilitydialog.h \ - ../src/qt/walletframe.h \ - ../src/qt/walletmodel.h \ - ../src/qt/walletmodeltransaction.h \ - ../src/qt/walletview.h \ - ../src/qt/winshutdownmonitor.h \ - ../src/qt/test/paymentrequestdata.h \ - ../src/qt/test/paymentservertests.h \ - ../src/qt/test/uritests.h +TEMPLATE = app +TARGET = +DEPENDPATH += . \ + src \ + src/compat \ + src/config \ + src/crypto \ + src/json \ + src/obj \ + src/primitives \ + src/qt \ + src/script \ + src/test \ + src/univalue \ + src/leveldb/db \ + src/leveldb/issues \ + src/leveldb/port \ + src/leveldb/table \ + src/leveldb/util \ + src/qt/forms \ + src/qt/locale \ + src/qt/test \ + src/secp256k1/include \ + src/secp256k1/src \ + src/test/data \ + src/leveldb/doc/bench \ + src/leveldb/helpers/memenv \ + src/leveldb/include/leveldb \ + src/leveldb/port/win \ + src/secp256k1/src/java +INCLUDEPATH += . \ + src \ + src/config \ + src/leveldb/port/win \ + src/crypto \ + src/primitives \ + src/script \ + src/obj \ + src/univalue \ + src/json \ + src/compat \ + src/secp256k1/include \ + src/leveldb/helpers/memenv \ + src/qt \ + src/qt/forms \ + src/test/data \ + src/test \ + src/qt/test \ + src/secp256k1/src \ + src/secp256k1/src/java -SOURCES += \ - ../src/activemasternode.cpp \ - ../src/addrman.cpp \ - ../src/aes_helper.c \ - ../src/alert.cpp \ - ../src/allocators.cpp \ - ../src/base58.cpp \ - ../src/blake.c \ - ../src/bloom.cpp \ - ../src/bmw.c \ - ../src/chainparams.cpp \ - ../src/checkpoints.cpp \ - ../src/coins.cpp \ - ../src/core.cpp \ - ../src/crypter.cpp \ - ../src/cubehash.c \ - ../src/dash-cli.cpp \ - ../src/dashd.cpp \ - ../src/darksend.cpp \ - ../src/db.cpp \ - ../src/echo.c \ - ../src/groestl.c \ - ../src/hash.cpp \ - ../src/init.cpp \ - ../src/instantx.cpp \ - ../src/jh.c \ - ../src/keccak.c \ - ../src/keepass.cpp \ - ../src/key.cpp \ - ../src/keystore.cpp \ - ../src/leveldbwrapper.cpp \ - ../src/luffa.c \ - ../src/main.cpp \ - ../src/masternode.cpp \ - ../src/masternodeconfig.cpp \ - ../src/miner.cpp \ - ../src/net.cpp \ - ../src/netbase.cpp \ - ../src/noui.cpp \ - ../src/protocol.cpp \ - ../src/rpcblockchain.cpp \ - ../src/rpcclient.cpp \ - ../src/rpcdarksend.cpp \ - ../src/rpcdump.cpp \ - ../src/rpcmining.cpp \ - ../src/rpcmisc.cpp \ - ../src/rpcnet.cpp \ - ../src/rpcprotocol.cpp \ - ../src/rpcrawtransaction.cpp \ - ../src/rpcserver.cpp \ - ../src/rpcwallet.cpp \ - ../src/script.cpp \ - ../src/shavite.c \ - ../src/simd.c \ - ../src/skein.c \ - ../src/sync.cpp \ - ../src/txdb.cpp \ - ../src/txmempool.cpp \ - ../src/util.cpp \ - ../src/version.cpp \ - ../src/wallet.cpp \ - ../src/walletdb.cpp \ - ../src/test/Checkpoints_tests.cpp \ - ../src/test/DoS_tests.cpp \ - ../src/test/accounting_tests.cpp \ - ../src/test/alert_tests.cpp \ - ../src/test/allocator_tests.cpp \ - ../src/test/base32_tests.cpp \ - ../src/test/base58_tests.cpp \ - ../src/test/base64_tests.cpp \ - ../src/test/bignum_tests.cpp \ - ../src/test/bip32_tests.cpp \ - ../src/test/bloom_tests.cpp \ - ../src/test/canonical_tests.cpp \ - ../src/test/checkblock_tests.cpp \ - ../src/test/compress_tests.cpp \ - ../src/test/getarg_tests.cpp \ - ../src/test/hash_tests.cpp \ - ../src/test/hmac_tests.cpp \ - ../src/test/key_tests.cpp \ - ../src/test/main_tests.cpp \ - ../src/test/miner_tests.cpp \ - ../src/test/mruset_tests.cpp \ - ../src/test/multisig_tests.cpp \ - ../src/test/netbase_tests.cpp \ - ../src/test/pmt_tests.cpp \ - ../src/test/rpc_tests.cpp \ - ../src/test/rpc_wallet_tests.cpp \ - ../src/test/script_P2SH_tests.cpp \ - ../src/test/script_tests.cpp \ - ../src/test/scriptnum_tests.cpp \ - ../src/test/serialize_tests.cpp \ - ../src/test/sighash_tests.cpp \ - ../src/test/sigopcount_tests.cpp \ - ../src/test/test_dash.cpp \ - ../src/test/transaction_tests.cpp \ - ../src/test/uint256_tests.cpp \ - ../src/test/util_tests.cpp \ - ../src/test/wallet_tests.cpp \ - ../src/qt/addressbookpage.cpp \ - ../src/qt/addresstablemodel.cpp \ - ../src/qt/askpassphrasedialog.cpp \ - ../src/qt/bitcoinaddressvalidator.cpp \ - ../src/qt/bitcoinamountfield.cpp \ - ../src/qt/bitcoingui.cpp \ - ../src/qt/dashstrings.cpp \ - ../src/qt/bitcoinunits.cpp \ - ../src/qt/clientmodel.cpp \ - ../src/qt/coincontroldialog.cpp \ - ../src/qt/coincontroltreewidget.cpp \ - ../src/qt/csvmodelwriter.cpp \ - ../src/qt/dash.cpp \ - ../src/qt/darksendconfig.cpp \ - ../src/qt/editaddressdialog.cpp \ - ../src/qt/guiutil.cpp \ - ../src/qt/intro.cpp \ - ../src/qt/moc_addressbookpage.cpp \ - ../src/qt/moc_addresstablemodel.cpp \ - ../src/qt/moc_askpassphrasedialog.cpp \ - ../src/qt/moc_bitcoinaddressvalidator.cpp \ - ../src/qt/moc_bitcoinamountfield.cpp \ - ../src/qt/moc_bitcoingui.cpp \ - ../src/qt/moc_bitcoinunits.cpp \ - ../src/qt/moc_clientmodel.cpp \ - ../src/qt/moc_coincontroldialog.cpp \ - ../src/qt/moc_coincontroltreewidget.cpp \ - ../src/qt/moc_csvmodelwriter.cpp \ - ../src/qt/moc_darksendconfig.cpp \ - ../src/qt/moc_editaddressdialog.cpp \ - ../src/qt/moc_guiutil.cpp \ - ../src/qt/moc_intro.cpp \ - ../src/qt/moc_macdockiconhandler.cpp \ - ../src/qt/moc_macnotificationhandler.cpp \ - ../src/qt/moc_monitoreddatamapper.cpp \ - ../src/qt/moc_notificator.cpp \ - ../src/qt/moc_openuridialog.cpp \ - ../src/qt/moc_optionsdialog.cpp \ - ../src/qt/moc_optionsmodel.cpp \ - ../src/qt/moc_overviewpage.cpp \ - ../src/qt/moc_paymentserver.cpp \ - ../src/qt/moc_qvalidatedlineedit.cpp \ - ../src/qt/moc_qvaluecombobox.cpp \ - ../src/qt/moc_receivecoinsdialog.cpp \ - ../src/qt/moc_receiverequestdialog.cpp \ - ../src/qt/moc_recentrequeststablemodel.cpp \ - ../src/qt/moc_rpcconsole.cpp \ - ../src/qt/moc_sendcoinsdialog.cpp \ - ../src/qt/moc_sendcoinsentry.cpp \ - ../src/qt/moc_signverifymessagedialog.cpp \ - ../src/qt/moc_splashscreen.cpp \ - ../src/qt/moc_trafficgraphwidget.cpp \ - ../src/qt/moc_transactiondesc.cpp \ - ../src/qt/moc_transactiondescdialog.cpp \ - ../src/qt/moc_transactionfilterproxy.cpp \ - ../src/qt/moc_transactiontablemodel.cpp \ - ../src/qt/moc_transactionview.cpp \ - ../src/qt/moc_utilitydialog.cpp \ - ../src/qt/moc_walletframe.cpp \ - ../src/qt/moc_walletmodel.cpp \ - ../src/qt/moc_walletview.cpp \ - ../src/qt/monitoreddatamapper.cpp \ - ../src/qt/notificator.cpp \ - ../src/qt/openuridialog.cpp \ - ../src/qt/optionsdialog.cpp \ - ../src/qt/optionsmodel.cpp \ - ../src/qt/overviewpage.cpp \ - ../src/qt/paymentrequest.pb.cc \ - ../src/qt/paymentrequestplus.cpp \ - ../src/qt/paymentserver.cpp \ - ../src/qt/qrc_dash.cpp \ - ../src/qt/qvalidatedlineedit.cpp \ - ../src/qt/qvaluecombobox.cpp \ - ../src/qt/receivecoinsdialog.cpp \ - ../src/qt/receiverequestdialog.cpp \ - ../src/qt/recentrequeststablemodel.cpp \ - ../src/qt/rpcconsole.cpp \ - ../src/qt/sendcoinsdialog.cpp \ - ../src/qt/sendcoinsentry.cpp \ - ../src/qt/signverifymessagedialog.cpp \ - ../src/qt/splashscreen.cpp \ - ../src/qt/trafficgraphwidget.cpp \ - ../src/qt/transactiondesc.cpp \ - ../src/qt/transactiondescdialog.cpp \ - ../src/qt/transactionfilterproxy.cpp \ - ../src/qt/transactionrecord.cpp \ - ../src/qt/transactiontablemodel.cpp \ - ../src/qt/transactionview.cpp \ - ../src/qt/utilitydialog.cpp \ - ../src/qt/walletframe.cpp \ - ../src/qt/walletmodel.cpp \ - ../src/qt/walletmodeltransaction.cpp \ - ../src/qt/walletview.cpp \ - ../src/qt/winshutdownmonitor.cpp \ - ../src/qt/test/moc_paymentservertests.cpp \ - ../src/qt/test/moc_uritests.cpp \ - ../src/qt/test/paymentservertests.cpp \ - ../src/qt/test/test_main.cpp \ - ../src/qt/test/uritests.cpp - -FORMS += \ - ../src/qt/forms/aboutdialog.ui \ - ../src/qt/forms/addressbookpage.ui \ - ../src/qt/forms/askpassphrasedialog.ui \ - ../src/qt/forms/coincontroldialog.ui \ - ../src/qt/forms/darksendconfig.ui \ - ../src/qt/forms/editaddressdialog.ui \ - ../src/qt/forms/helpmessagedialog.ui \ - ../src/qt/forms/intro.ui \ - ../src/qt/forms/openuridialog.ui \ - ../src/qt/forms/optionsdialog.ui \ - ../src/qt/forms/overviewpage.ui \ - ../src/qt/forms/receivecoinsdialog.ui \ - ../src/qt/forms/receiverequestdialog.ui \ - ../src/qt/forms/rpcconsole.ui \ - ../src/qt/forms/sendcoinsdialog.ui \ - ../src/qt/forms/sendcoinsentry.ui \ - ../src/qt/forms/signverifymessagedialog.ui \ - ../src/qt/forms/transactiondescdialog.ui - -RESOURCES += \ - ../src/qt/dash.qrc +# Input +HEADERS += src/activemasternode.h \ + src/addrman.h \ + src/alert.h \ + src/allocators.h \ + src/amount.h \ + src/base58.h \ + src/bloom.h \ + src/chain.h \ + src/chainparams.h \ + src/chainparamsbase.h \ + src/chainparamsseeds.h \ + src/checkpoints.h \ + src/checkqueue.h \ + src/clientversion.h \ + src/coincontrol.h \ + src/coins.h \ + src/compat.h \ + src/compressor.h \ + src/core_io.h \ + src/crypter.h \ + src/darksend-relay.h \ + src/darksend.h \ + src/db.h \ + src/eccryptoverify.h \ + src/ecwrapper.h \ + src/hash.h \ + src/init.h \ + src/instantx.h \ + src/keepass.h \ + src/key.h \ + src/keystore.h \ + src/leveldbwrapper.h \ + src/limitedmap.h \ + src/main.h \ + src/masternode-payments.h \ + src/masternode.h \ + src/masternodeconfig.h \ + src/masternodeman.h \ + src/merkleblock.h \ + src/miner.h \ + src/mruset.h \ + src/net.h \ + src/netbase.h \ + src/noui.h \ + src/pow.h \ + src/protocol.h \ + src/pubkey.h \ + src/random.h \ + src/rpcclient.h \ + src/rpcprotocol.h \ + src/rpcserver.h \ + src/serialize.h \ + src/spork.h \ + src/streams.h \ + src/sync.h \ + src/threadsafety.h \ + src/timedata.h \ + src/tinyformat.h \ + src/txdb.h \ + src/txmempool.h \ + src/ui_interface.h \ + src/uint256.h \ + src/undo.h \ + src/util.h \ + src/utilmoneystr.h \ + src/utilstrencodings.h \ + src/utiltime.h \ + src/version.h \ + src/wallet.h \ + src/wallet_ismine.h \ + src/walletdb.h \ + src/compat/sanity.h \ + src/config/dash-config.h \ + src/crypto/common.h \ + src/crypto/hmac_sha256.h \ + src/crypto/hmac_sha512.h \ + src/crypto/rfc6979_hmac_sha256.h \ + src/crypto/ripemd160.h \ + src/crypto/sha1.h \ + src/crypto/sha256.h \ + src/crypto/sha512.h \ + src/crypto/sph_blake.h \ + src/crypto/sph_bmw.h \ + src/crypto/sph_cubehash.h \ + src/crypto/sph_echo.h \ + src/crypto/sph_groestl.h \ + src/crypto/sph_jh.h \ + src/crypto/sph_keccak.h \ + src/crypto/sph_luffa.h \ + src/crypto/sph_shavite.h \ + src/crypto/sph_simd.h \ + src/crypto/sph_skein.h \ + src/crypto/sph_types.h \ + src/json/json_spirit.h \ + src/json/json_spirit_error_position.h \ + src/json/json_spirit_reader.h \ + src/json/json_spirit_reader_template.h \ + src/json/json_spirit_stream_reader.h \ + src/json/json_spirit_utils.h \ + src/json/json_spirit_value.h \ + src/json/json_spirit_writer.h \ + src/json/json_spirit_writer_template.h \ + src/obj/build.h \ + src/primitives/block.h \ + src/primitives/transaction.h \ + src/qt/addressbookpage.h \ + src/qt/addresstablemodel.h \ + src/qt/askpassphrasedialog.h \ + src/qt/bitcoinaddressvalidator.h \ + src/qt/bitcoinamountfield.h \ + src/qt/bitcoingui.h \ + src/qt/bitcoinunits.h \ + src/qt/clientmodel.h \ + src/qt/coincontroldialog.h \ + src/qt/coincontroltreewidget.h \ + src/qt/csvmodelwriter.h \ + src/qt/darksendconfig.h \ + src/qt/editaddressdialog.h \ + src/qt/guiconstants.h \ + src/qt/guiutil.h \ + src/qt/intro.h \ + src/qt/macdockiconhandler.h \ + src/qt/macnotificationhandler.h \ + src/qt/networkstyle.h \ + src/qt/notificator.h \ + src/qt/openuridialog.h \ + src/qt/optionsdialog.h \ + src/qt/optionsmodel.h \ + src/qt/overviewpage.h \ + src/qt/paymentrequest.pb.h \ + src/qt/paymentrequestplus.h \ + src/qt/paymentserver.h \ + src/qt/peertablemodel.h \ + src/qt/qvalidatedlineedit.h \ + src/qt/qvaluecombobox.h \ + src/qt/receivecoinsdialog.h \ + src/qt/receiverequestdialog.h \ + src/qt/recentrequeststablemodel.h \ + src/qt/rpcconsole.h \ + src/qt/sendcoinsdialog.h \ + src/qt/sendcoinsentry.h \ + src/qt/signverifymessagedialog.h \ + src/qt/splashscreen.h \ + src/qt/trafficgraphwidget.h \ + src/qt/transactiondesc.h \ + src/qt/transactiondescdialog.h \ + src/qt/transactionfilterproxy.h \ + src/qt/transactionrecord.h \ + src/qt/transactiontablemodel.h \ + src/qt/transactionview.h \ + src/qt/utilitydialog.h \ + src/qt/walletframe.h \ + src/qt/walletmodel.h \ + src/qt/walletmodeltransaction.h \ + src/qt/walletview.h \ + src/qt/winshutdownmonitor.h \ + src/script/bitcoinconsensus.h \ + src/script/interpreter.h \ + src/script/script.h \ + src/script/script_error.h \ + src/script/sigcache.h \ + src/script/sign.h \ + src/script/standard.h \ + src/test/bignum.h \ + src/univalue/univalue.h \ + src/univalue/univalue_escapes.h \ + src/leveldb/db/builder.h \ + src/leveldb/db/db_impl.h \ + src/leveldb/db/db_iter.h \ + src/leveldb/db/dbformat.h \ + src/leveldb/db/filename.h \ + src/leveldb/db/log_format.h \ + src/leveldb/db/log_reader.h \ + src/leveldb/db/log_writer.h \ + src/leveldb/db/memtable.h \ + src/leveldb/db/skiplist.h \ + src/leveldb/db/snapshot.h \ + src/leveldb/db/table_cache.h \ + src/leveldb/db/version_edit.h \ + src/leveldb/db/version_set.h \ + src/leveldb/db/write_batch_internal.h \ + src/leveldb/port/atomic_pointer.h \ + src/leveldb/port/port.h \ + src/leveldb/port/port_example.h \ + src/leveldb/port/port_posix.h \ + src/leveldb/port/port_win.h \ + src/leveldb/port/thread_annotations.h \ + src/leveldb/table/block.h \ + src/leveldb/table/block_builder.h \ + src/leveldb/table/filter_block.h \ + src/leveldb/table/format.h \ + src/leveldb/table/iterator_wrapper.h \ + src/leveldb/table/merger.h \ + src/leveldb/table/two_level_iterator.h \ + src/leveldb/util/arena.h \ + src/leveldb/util/coding.h \ + src/leveldb/util/crc32c.h \ + src/leveldb/util/hash.h \ + src/leveldb/util/histogram.h \ + src/leveldb/util/logging.h \ + src/leveldb/util/mutexlock.h \ + src/leveldb/util/posix_logger.h \ + src/leveldb/util/random.h \ + src/leveldb/util/testharness.h \ + src/leveldb/util/testutil.h \ + src/qt/forms/ui_aboutdialog.h \ + src/qt/test/paymentrequestdata.h \ + src/qt/test/paymentservertests.h \ + src/qt/test/uritests.h \ + src/secp256k1/include/secp256k1.h \ + src/secp256k1/src/ecdsa.h \ + src/secp256k1/src/ecdsa_impl.h \ + src/secp256k1/src/eckey.h \ + src/secp256k1/src/eckey_impl.h \ + src/secp256k1/src/ecmult.h \ + src/secp256k1/src/ecmult_gen.h \ + src/secp256k1/src/ecmult_gen_impl.h \ + src/secp256k1/src/ecmult_impl.h \ + src/secp256k1/src/field.h \ + src/secp256k1/src/field_10x26.h \ + src/secp256k1/src/field_10x26_impl.h \ + src/secp256k1/src/field_5x52.h \ + src/secp256k1/src/field_5x52_asm_impl.h \ + src/secp256k1/src/field_5x52_impl.h \ + src/secp256k1/src/field_5x52_int128_impl.h \ + src/secp256k1/src/field_gmp.h \ + src/secp256k1/src/field_gmp_impl.h \ + src/secp256k1/src/field_impl.h \ + src/secp256k1/src/group.h \ + src/secp256k1/src/group_impl.h \ + src/secp256k1/src/libsecp256k1-config.h \ + src/secp256k1/src/num.h \ + src/secp256k1/src/num_gmp.h \ + src/secp256k1/src/num_gmp_impl.h \ + src/secp256k1/src/num_impl.h \ + src/secp256k1/src/scalar.h \ + src/secp256k1/src/scalar_4x64.h \ + src/secp256k1/src/scalar_4x64_impl.h \ + src/secp256k1/src/scalar_8x32.h \ + src/secp256k1/src/scalar_8x32_impl.h \ + src/secp256k1/src/scalar_impl.h \ + src/secp256k1/src/testrand.h \ + src/secp256k1/src/testrand_impl.h \ + src/secp256k1/src/util.h \ + src/test/data/alertTests.raw.h \ + src/test/data/base58_encode_decode.json.h \ + src/test/data/base58_keys_invalid.json.h \ + src/test/data/base58_keys_valid.json.h \ + src/test/data/script_invalid.json.h \ + src/test/data/script_valid.json.h \ + src/test/data/sig_canonical.json.h \ + src/test/data/sig_noncanonical.json.h \ + src/test/data/sighash.json.h \ + src/test/data/tx_invalid.json.h \ + src/test/data/tx_valid.json.h \ + src/leveldb/helpers/memenv/memenv.h \ + src/leveldb/include/leveldb/c.h \ + src/leveldb/include/leveldb/cache.h \ + src/leveldb/include/leveldb/comparator.h \ + src/leveldb/include/leveldb/db.h \ + src/leveldb/include/leveldb/dumpfile.h \ + src/leveldb/include/leveldb/env.h \ + src/leveldb/include/leveldb/filter_policy.h \ + src/leveldb/include/leveldb/iterator.h \ + src/leveldb/include/leveldb/options.h \ + src/leveldb/include/leveldb/slice.h \ + src/leveldb/include/leveldb/status.h \ + src/leveldb/include/leveldb/table.h \ + src/leveldb/include/leveldb/table_builder.h \ + src/leveldb/include/leveldb/write_batch.h \ + src/leveldb/port/win/stdint.h \ + src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h \ + src/crypto/aes_helper.c \ + src/qt/bitcoinamountfield.moc \ + src/qt/dash.moc \ + src/qt/intro.moc \ + src/qt/overviewpage.moc \ + src/qt/rpcconsole.moc \ + src/secp256k1/src/secp256k1.c +FORMS += src/qt/forms/addressbookpage.ui \ + src/qt/forms/askpassphrasedialog.ui \ + src/qt/forms/coincontroldialog.ui \ + src/qt/forms/darksendconfig.ui \ + src/qt/forms/editaddressdialog.ui \ + src/qt/forms/helpmessagedialog.ui \ + src/qt/forms/intro.ui \ + src/qt/forms/openuridialog.ui \ + src/qt/forms/optionsdialog.ui \ + src/qt/forms/overviewpage.ui \ + src/qt/forms/receivecoinsdialog.ui \ + src/qt/forms/receiverequestdialog.ui \ + src/qt/forms/rpcconsole.ui \ + src/qt/forms/sendcoinsdialog.ui \ + src/qt/forms/sendcoinsentry.ui \ + src/qt/forms/signverifymessagedialog.ui \ + src/qt/forms/transactiondescdialog.ui +SOURCES += src/activemasternode.cpp \ + src/addrman.cpp \ + src/alert.cpp \ + src/allocators.cpp \ + src/amount.cpp \ + src/base58.cpp \ + src/bloom.cpp \ + src/chain.cpp \ + src/chainparams.cpp \ + src/chainparamsbase.cpp \ + src/checkpoints.cpp \ + src/clientversion.cpp \ + src/coins.cpp \ + src/compressor.cpp \ + src/core_read.cpp \ + src/core_write.cpp \ + src/crypter.cpp \ + src/darksend-relay.cpp \ + src/darksend.cpp \ + src/dash-cli.cpp \ + src/dash-tx.cpp \ + src/dashd.cpp \ + src/db.cpp \ + src/eccryptoverify.cpp \ + src/ecwrapper.cpp \ + src/hash.cpp \ + src/init.cpp \ + src/instantx.cpp \ + src/keepass.cpp \ + src/key.cpp \ + src/keystore.cpp \ + src/leveldbwrapper.cpp \ + src/main.cpp \ + src/masternode-payments.cpp \ + src/masternode.cpp \ + src/masternodeconfig.cpp \ + src/masternodeman.cpp \ + src/merkleblock.cpp \ + src/miner.cpp \ + src/net.cpp \ + src/netbase.cpp \ + src/noui.cpp \ + src/pow.cpp \ + src/protocol.cpp \ + src/pubkey.cpp \ + src/random.cpp \ + src/rest.cpp \ + src/rpcblockchain.cpp \ + src/rpcclient.cpp \ + src/rpcmasternode.cpp \ + src/rpcmasternode-budget.cpp \ + src/rpcdump.cpp \ + src/rpcmining.cpp \ + src/rpcmisc.cpp \ + src/rpcnet.cpp \ + src/rpcprotocol.cpp \ + src/rpcrawtransaction.cpp \ + src/rpcserver.cpp \ + src/rpcwallet.cpp \ + src/spork.cpp \ + src/sync.cpp \ + src/timedata.cpp \ + src/txdb.cpp \ + src/txmempool.cpp \ + src/uint256.cpp \ + src/util.cpp \ + src/utilmoneystr.cpp \ + src/utilstrencodings.cpp \ + src/utiltime.cpp \ + src/wallet.cpp \ + src/wallet_ismine.cpp \ + src/walletdb.cpp \ + src/compat/glibc_compat.cpp \ + src/compat/glibc_sanity.cpp \ + src/compat/glibcxx_compat.cpp \ + src/compat/glibcxx_sanity.cpp \ + src/compat/strnlen.cpp \ + src/crypto/aes_helper.c \ + src/crypto/blake.c \ + src/crypto/bmw.c \ + src/crypto/cubehash.c \ + src/crypto/echo.c \ + src/crypto/groestl.c \ + src/crypto/hmac_sha256.cpp \ + src/crypto/hmac_sha512.cpp \ + src/crypto/jh.c \ + src/crypto/keccak.c \ + src/crypto/luffa.c \ + src/crypto/rfc6979_hmac_sha256.cpp \ + src/crypto/ripemd160.cpp \ + src/crypto/sha1.cpp \ + src/crypto/sha256.cpp \ + src/crypto/sha512.cpp \ + src/crypto/shavite.c \ + src/crypto/simd.c \ + src/crypto/skein.c \ + src/json/json_spirit_reader.cpp \ + src/json/json_spirit_value.cpp \ + src/json/json_spirit_writer.cpp \ + src/primitives/block.cpp \ + src/primitives/transaction.cpp \ + src/qt/addressbookpage.cpp \ + src/qt/addresstablemodel.cpp \ + src/qt/askpassphrasedialog.cpp \ + src/qt/bitcoinaddressvalidator.cpp \ + src/qt/bitcoinamountfield.cpp \ + src/qt/bitcoingui.cpp \ + src/qt/bitcoinunits.cpp \ + src/qt/clientmodel.cpp \ + src/qt/coincontroldialog.cpp \ + src/qt/coincontroltreewidget.cpp \ + src/qt/csvmodelwriter.cpp \ + src/qt/darksendconfig.cpp \ + src/qt/dash.cpp \ + src/qt/dashstrings.cpp \ + src/qt/editaddressdialog.cpp \ + src/qt/guiutil.cpp \ + src/qt/intro.cpp \ + src/qt/networkstyle.cpp \ + src/qt/notificator.cpp \ + src/qt/openuridialog.cpp \ + src/qt/optionsdialog.cpp \ + src/qt/optionsmodel.cpp \ + src/qt/overviewpage.cpp \ + src/qt/paymentrequest.pb.cc \ + src/qt/paymentrequestplus.cpp \ + src/qt/paymentserver.cpp \ + src/qt/peertablemodel.cpp \ + src/qt/qvalidatedlineedit.cpp \ + src/qt/qvaluecombobox.cpp \ + src/qt/receivecoinsdialog.cpp \ + src/qt/receiverequestdialog.cpp \ + src/qt/recentrequeststablemodel.cpp \ + src/qt/rpcconsole.cpp \ + src/qt/sendcoinsdialog.cpp \ + src/qt/sendcoinsentry.cpp \ + src/qt/signverifymessagedialog.cpp \ + src/qt/splashscreen.cpp \ + src/qt/trafficgraphwidget.cpp \ + src/qt/transactiondesc.cpp \ + src/qt/transactiondescdialog.cpp \ + src/qt/transactionfilterproxy.cpp \ + src/qt/transactionrecord.cpp \ + src/qt/transactiontablemodel.cpp \ + src/qt/transactionview.cpp \ + src/qt/utilitydialog.cpp \ + src/qt/walletframe.cpp \ + src/qt/walletmodel.cpp \ + src/qt/walletmodeltransaction.cpp \ + src/qt/walletview.cpp \ + src/qt/winshutdownmonitor.cpp \ + src/script/bitcoinconsensus.cpp \ + src/script/interpreter.cpp \ + src/script/script.cpp \ + src/script/script_error.cpp \ + src/script/sigcache.cpp \ + src/script/sign.cpp \ + src/script/standard.cpp \ + src/test/accounting_tests.cpp \ + src/test/alert_tests.cpp \ + src/test/allocator_tests.cpp \ + src/test/base32_tests.cpp \ + src/test/base58_tests.cpp \ + src/test/base64_tests.cpp \ + src/test/bip32_tests.cpp \ + src/test/bloom_tests.cpp \ + src/test/checkblock_tests.cpp \ + src/test/Checkpoints_tests.cpp \ + src/test/coins_tests.cpp \ + src/test/compress_tests.cpp \ + src/test/crypto_tests.cpp \ + src/test/DoS_tests.cpp \ + src/test/getarg_tests.cpp \ + src/test/hash_tests.cpp \ + src/test/key_tests.cpp \ + src/test/main_tests.cpp \ + src/test/mempool_tests.cpp \ + src/test/miner_tests.cpp \ + src/test/mruset_tests.cpp \ + src/test/multisig_tests.cpp \ + src/test/netbase_tests.cpp \ + src/test/pmt_tests.cpp \ + src/test/rpc_tests.cpp \ + src/test/rpc_wallet_tests.cpp \ + src/test/sanity_tests.cpp \ + src/test/script_P2SH_tests.cpp \ + src/test/script_tests.cpp \ + src/test/scriptnum_tests.cpp \ + src/test/serialize_tests.cpp \ + src/test/sighash_tests.cpp \ + src/test/sigopcount_tests.cpp \ + src/test/skiplist_tests.cpp \ + src/test/test_dash.cpp \ + src/test/timedata_tests.cpp \ + src/test/transaction_tests.cpp \ + src/test/uint256_tests.cpp \ + src/test/univalue_tests.cpp \ + src/test/util_tests.cpp \ + src/test/wallet_tests.cpp \ + src/univalue/gen.cpp \ + src/univalue/univalue.cpp \ + src/univalue/univalue_read.cpp \ + src/univalue/univalue_write.cpp \ + src/leveldb/db/autocompact_test.cc \ + src/leveldb/db/builder.cc \ + src/leveldb/db/c.cc \ + src/leveldb/db/c_test.c \ + src/leveldb/db/corruption_test.cc \ + src/leveldb/db/db_bench.cc \ + src/leveldb/db/db_impl.cc \ + src/leveldb/db/db_iter.cc \ + src/leveldb/db/db_test.cc \ + src/leveldb/db/dbformat.cc \ + src/leveldb/db/dbformat_test.cc \ + src/leveldb/db/dumpfile.cc \ + src/leveldb/db/filename.cc \ + src/leveldb/db/filename_test.cc \ + src/leveldb/db/leveldb_main.cc \ + src/leveldb/db/log_reader.cc \ + src/leveldb/db/log_test.cc \ + src/leveldb/db/log_writer.cc \ + src/leveldb/db/memtable.cc \ + src/leveldb/db/repair.cc \ + src/leveldb/db/skiplist_test.cc \ + src/leveldb/db/table_cache.cc \ + src/leveldb/db/version_edit.cc \ + src/leveldb/db/version_edit_test.cc \ + src/leveldb/db/version_set.cc \ + src/leveldb/db/version_set_test.cc \ + src/leveldb/db/write_batch.cc \ + src/leveldb/db/write_batch_test.cc \ + src/leveldb/issues/issue178_test.cc \ + src/leveldb/issues/issue200_test.cc \ + src/leveldb/port/port_posix.cc \ + src/leveldb/port/port_win.cc \ + src/leveldb/table/block.cc \ + src/leveldb/table/block_builder.cc \ + src/leveldb/table/filter_block.cc \ + src/leveldb/table/filter_block_test.cc \ + src/leveldb/table/format.cc \ + src/leveldb/table/iterator.cc \ + src/leveldb/table/merger.cc \ + src/leveldb/table/table.cc \ + src/leveldb/table/table_builder.cc \ + src/leveldb/table/table_test.cc \ + src/leveldb/table/two_level_iterator.cc \ + src/leveldb/util/arena.cc \ + src/leveldb/util/arena_test.cc \ + src/leveldb/util/bloom.cc \ + src/leveldb/util/bloom_test.cc \ + src/leveldb/util/cache.cc \ + src/leveldb/util/cache_test.cc \ + src/leveldb/util/coding.cc \ + src/leveldb/util/coding_test.cc \ + src/leveldb/util/comparator.cc \ + src/leveldb/util/crc32c.cc \ + src/leveldb/util/crc32c_test.cc \ + src/leveldb/util/env.cc \ + src/leveldb/util/env_posix.cc \ + src/leveldb/util/env_test.cc \ + src/leveldb/util/env_win.cc \ + src/leveldb/util/filter_policy.cc \ + src/leveldb/util/hash.cc \ + src/leveldb/util/hash_test.cc \ + src/leveldb/util/histogram.cc \ + src/leveldb/util/logging.cc \ + src/leveldb/util/options.cc \ + src/leveldb/util/status.cc \ + src/leveldb/util/testharness.cc \ + src/leveldb/util/testutil.cc \ + src/qt/test/paymentservertests.cpp \ + src/qt/test/test_main.cpp \ + src/qt/test/uritests.cpp \ + src/secp256k1/src/bench_inv.c \ + src/secp256k1/src/bench_sign.c \ + src/secp256k1/src/bench_verify.c \ + src/secp256k1/src/secp256k1.c \ + src/secp256k1/src/tests.c \ + src/leveldb/doc/bench/db_bench_sqlite3.cc \ + src/leveldb/doc/bench/db_bench_tree_db.cc \ + src/leveldb/helpers/memenv/memenv.cc \ + src/leveldb/helpers/memenv/memenv_test.cc \ + src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c +RESOURCES += src/qt/dash.qrc src/qt/dash_locale.qrc +TRANSLATIONS += src/qt/locale/dash_bar.ts \ + src/qt/locale/dash_bg.ts \ + src/qt/locale/dash_ca.ts \ + src/qt/locale/dash_cmn.ts \ + src/qt/locale/dash_cs.ts \ + src/qt/locale/dash_da.ts \ + src/qt/locale/dash_de.ts \ + src/qt/locale/dash_el.ts \ + src/qt/locale/dash_en.ts \ + src/qt/locale/dash_eo.ts \ + src/qt/locale/dash_es.ts \ + src/qt/locale/dash_fi.ts \ + src/qt/locale/dash_fr.ts \ + src/qt/locale/dash_hu_HU.ts \ + src/qt/locale/dash_it.ts \ + src/qt/locale/dash_lv_LV.ts \ + src/qt/locale/dash_nb.ts \ + src/qt/locale/dash_nl.ts \ + src/qt/locale/dash_pl.ts \ + src/qt/locale/dash_pt.ts \ + src/qt/locale/dash_pt_BR.ts \ + src/qt/locale/dash_ru.ts \ + src/qt/locale/dash_sk.ts \ + src/qt/locale/dash_sv.ts \ + src/qt/locale/dash_tr.ts \ + src/qt/locale/dash_vi.ts \ + src/qt/locale/dash_zh_CN.ts \ + src/qt/locale/dash_zh_HK.ts diff --git a/contrib/bitcoind.bash-completion b/contrib/dashd.bash-completion similarity index 73% rename from contrib/bitcoind.bash-completion rename to contrib/dashd.bash-completion index 03ef173c09eba..11a4dc9e7c3b5 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/dashd.bash-completion @@ -1,12 +1,12 @@ -# bash programmable completion for bitcoind(1) and bitcoin-cli(1) +# bash programmable completion for dashd(1) and dash-cli(1) # Copyright (c) 2012,2014 Christian von Roques # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -have bitcoind && { +have dashd && { -# call $bitcoind for RPC -_bitcoin_rpc() { +# call $dashd for RPC +_dash_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -16,29 +16,33 @@ _bitcoin_rpc() { ;; esac done - $bitcoind "${rpcargs[@]}" "$@" + $dashd "${rpcargs[@]}" "$@" } -# Add bitcoin accounts to COMPREPLY -_bitcoin_accounts() { +# Add dash accounts to COMPREPLY +_dash_accounts() { local accounts - accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}') + accounts=$(_dash_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}') COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_bitcoind() { +_dashd() { local cur prev words=() cword - local bitcoind + local dashd - # save and use original argument to invoke bitcoind - # bitcoind might not be in $PATH - bitcoind="$1" + # save and use original argument to invoke dashd + # dashd might not be in $PATH + dashd="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword if ((cword > 4)); then case ${words[cword-4]} in + listtransactions) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; signrawtransaction) COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) return 0 @@ -49,10 +53,10 @@ _bitcoind() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _bitcoin_accounts + _dash_accounts return 0 ;; - gettxout|importprivkey) + getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -65,12 +69,12 @@ _bitcoind() { COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) return 0 ;; - getblock|getrawtransaction|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) + getblock|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; move|setaccount) - _bitcoin_accounts + _dash_accounts return 0 ;; esac @@ -86,7 +90,7 @@ _bitcoind() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _bitcoin_accounts + _dash_accounts return 0 ;; esac @@ -110,12 +114,12 @@ _bitcoind() { # only parse --help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($dashd --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_bitcoin_rpc help 2>/dev/null | awk '{ print $1; }') + commands=$(_dash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -129,7 +133,7 @@ _bitcoind() { esac } -complete -F _bitcoind bitcoind bitcoin-cli +complete -F _dashd dashd dash-cli } # Local variables: diff --git a/contrib/debian/changelog b/contrib/debian/changelog index df7a2837ea4f5..f31f23871144a 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,3 +1,9 @@ +bitcoin (0.9.3-precise1) precise; urgency=medium + + * New upstream releases. + + -- Matt Corallo (BlueMatt) Fri, 26 Sep 2014 12:01:00 -0700 + bitcoin (0.9.1-precise1) precise; urgency=medium * New upstream release. diff --git a/contrib/debian/control b/contrib/debian/control index 9b6df8e717516..72cfb9747cb13 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -1,11 +1,12 @@ -Source: bitcoin +Source: dash Section: utils Priority: optional -Maintainer: Jonas Smedegaard -Uploaders: Micah Anderson +Maintainer: Jonas Smedegaard ***TODO*** +Uploaders: Micah Anderson ***TODO*** Build-Depends: debhelper, devscripts, automake, + libtool, bash-completion, libboost-system-dev (>> 1.35) | libboost-system1.35-dev, libdb4.8++-dev, @@ -21,38 +22,37 @@ Build-Depends: debhelper, libqrencode-dev, libprotobuf-dev, protobuf-compiler Standards-Version: 3.9.2 -Homepage: http://www.bitcoin.org/ -Vcs-Git: git://github.com/bitcoin/bitcoin.git -Vcs-Browser: http://github.com/bitcoin/bitcoin +Homepage: http://www.dashpay.io/ +Vcs-Git: git://github.com/dashpay/dash.git +Vcs-Browser: http://github.com/dashpay/dash -Package: bitcoind +Package: dashd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: peer-to-peer network based digital currency - daemon - Bitcoin is a free open source peer-to-peer electronic cash system that + Dash is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending. . Full transaction history is stored locally at each client. This - requires 20+ GB of space, slowly growing. + requires 1+ GB of space, slowly growing. . + This package provides the daemon, dashd, and the CLI tool + dash-cli to interact with the daemon. - This package provides the daemon, bitcoind, and the CLI tool - bitcoin-cli to interact with the daemon. - -Package: bitcoin-qt +Package: dash-qt Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: peer-to-peer network based digital currency - Qt GUI - Bitcoin is a free open source peer-to-peer electronic cash system that + Dash is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending. . Full transaction history is stored locally at each client. This - requires 20+ GB of space, slowly growing. + requires 1+ GB of space, slowly growing. . - This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt. + This package provides Dash-Qt, a GUI for Dash based on Qt. diff --git a/contrib/debian/copyright b/contrib/debian/copyright index a6ee201991cc4..b45222e5d30fd 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -2,8 +2,7 @@ Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: Bitcoin Upstream-Contact: Satoshi Nakamoto irc://#bitcoin@freenode.net -Source: http://sourceforge.net/projects/bitcoin/files/ - https://github.com/bitcoin/bitcoin +Source: https://github.com/bitcoin/bitcoin Files: * Copyright: 2009-2012, Bitcoin Core Developers diff --git a/contrib/debian/dash-qt.install b/contrib/debian/dash-qt.install index c034a13668aa8..4c10ef60d9d65 100644 --- a/contrib/debian/dash-qt.install +++ b/contrib/debian/dash-qt.install @@ -1,6 +1,6 @@ usr/local/bin/dash-qt usr/bin -share/pixmaps/dash32.xpm usr/share/pixmaps -share/pixmaps/dash16.xpm usr/share/pixmaps -share/pixmaps/dash128.png usr/share/pixmaps +share/pixmaps/bitcoin32.xpm usr/share/pixmaps +share/pixmaps/bitcoin16.xpm usr/share/pixmaps +share/pixmaps/bitcoin128.png usr/share/pixmaps debian/dash-qt.desktop usr/share/applications debian/dash-qt.protocol usr/share/kde4/services/ diff --git a/contrib/debian/examples/dash.conf b/contrib/debian/examples/dash.conf index c09570bb3e576..be781d1bb1e81 100644 --- a/contrib/debian/examples/dash.conf +++ b/contrib/debian/examples/dash.conf @@ -1,79 +1,110 @@ -# dash.conf configuration file. Lines beginning with # are comments. - - +## +## dash.conf configuration file. Lines beginning with # are comments. +## + # Network-related settings: # Run on the test network instead of the real dash network. -#testnet=1 +#testnet=0 -# Connect via a socks4 proxy +# Run a regression test network +#regtest=0 + +# Connect via a SOCKS5 proxy #proxy=127.0.0.1:9050 +############################################################## +## Quick Primer on addnode vs connect ## +## Let's say for instance you use addnode=4.2.2.4 ## +## addnode will connect you to and tell you about the ## +## nodes connected to 4.2.2.4. In addition it will tell ## +## the other nodes connected to it that you exist so ## +## they can connect to you. ## +## connect will not do the above when you 'connect' to it. ## +## It will *only* connect you to 4.2.2.4 and no one else.## +## ## +## So if you're behind a firewall, or have other problems ## +## finding nodes, add some using 'addnode'. ## +## ## +## If you want to stay private, use 'connect' to only ## +## connect to "trusted" nodes. ## +## ## +## If you run multiple nodes on a LAN, there's no need for ## +## all of them to open lots of connections. Instead ## +## 'connect' them all to one node that is port forwarded ## +## and has lots of connections. ## +## Thanks goes to [Noodle] on Freenode. ## +############################################################## + # Use as many addnode= settings as you like to connect to specific peers #addnode=69.164.218.197 #addnode=10.0.0.2:9999 -# ... or use as many connect= settings as you like to connect ONLY -# to specific peers: +# Alternatively use as many connect= settings as you like to connect ONLY to specific peers #connect=69.164.218.197 #connect=10.0.0.1:9999 +# Listening mode, enabled by default except when 'connect' is being used +#listen=1 + # Maximum number of inbound+outbound connections. #maxconnections= - +# # JSON-RPC options (for controlling a running Dash/dashd process) +# -# server=1 tells Dash to accept JSON-RPC commands. -#server=1 +# server=1 tells Dash-QT and dashd to accept JSON-RPC commands +#server=0 # You must set rpcuser and rpcpassword to secure the JSON-RPC api #rpcuser=Ulysseys -#rpcpassword=YourSuperGreatPasswordNumber_385593 +#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593 + +# How many seconds dash will wait for a complete RPC HTTP request. +# after the HTTP connection is established. +#rpctimeout=30 -# 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): -#rpcallowip=10.1.1.34 -#rpcallowip=192.168.1.* +# By default, only RPC connections from localhost are allowed. +# Specify as many rpcallowip= settings as you like to allow connections from other hosts, +# either as a single IPv4/IPv6 or with a subnet specification. + +# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED, +# because the rpcpassword is transmitted over the network unencrypted. + +# server=1 tells Dash-QT to accept JSON-RPC commands. +# it is also read by dashd to determine if RPC should be enabled +#rpcallowip=10.1.1.34/255.255.255.0 +#rpcallowip=1.2.3.4/24 +#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96 # Listen for RPC connections on this TCP port: -rpcport=9998 +#rpcport=9998 # You can use Dash or dashd to send commands to Dash/dashd # running on another host using this option: -rpcconnect=127.0.0.1 +#rpcconnect=127.0.0.1 # Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate # with Dash -server or dashd #rpcssl=1 # OpenSSL settings used when rpcssl=1 -rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH -rpcsslcertificatechainfile=server.cert -rpcsslprivatekeyfile=server.pem +#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH +#rpcsslcertificatechainfile=server.cert +#rpcsslprivatekeyfile=server.pem # Miscellaneous options -# Set gen=1 to attempt to generate dashs -gen=0 - -# Use SSE instructions to try to generate dashs faster. -#4way=1 - # Pre-generate this many public/private key pairs, so wallet backups will be valid for # both prior transactions and several dozen future transactions. -keypool=100 +#keypool=100 # Pay an optional transaction fee every time you send dashs. Transactions with fees # are more likely than free transactions to be included in generated blocks, so may # be validated sooner. -paytxfee=0.00 - -# Allow direct connections for the 'pay via IP address' feature. -#allowreceivebyip=1 - +#paytxfee=0.00 # User interface options diff --git a/contrib/debian/manpages/dash-qt.1 b/contrib/debian/manpages/dash-qt.1 index 1e619fa5864ff..dc9381f8ad892 100644 --- a/contrib/debian/manpages/dash-qt.1 +++ b/contrib/debian/manpages/dash-qt.1 @@ -1,10 +1,10 @@ -.TH BITCOIN-QT "1" "April 2013" "bitcoin-qt 1" +.TH DASH-QT "1" "March 2015" "dash-qt 1" .SH NAME -bitcoin-qt \- peer-to-peer network based digital currency +dash-qt \- peer-to-peer network based digital currency .SH DESCRIPTION .SS "Usage:" .IP -bitcoin\-qt [command\-line options] +dash\-qt [command\-line options] .SH OPTIONS .TP \-? @@ -14,7 +14,7 @@ This help message Specify configuration file (default: dash.conf) .TP \fB\-pid=\fR -Specify pid file (default: bitcoind.pid) +Specify pid file (default: dashd.pid) .TP \fB\-gen\fR Generate coins @@ -32,10 +32,7 @@ Set database cache size in megabytes (default: 25) Specify connection timeout in milliseconds (default: 5000) .TP \fB\-proxy=\fR -Connect through socks proxy -.TP -\fB\-socks=\fR -Select the version of socks proxy to use (4\-5, default: 5) +Connect through SOCKS5 proxy .TP \fB\-tor=\fR Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR) diff --git a/contrib/debian/manpages/dash.conf.5 b/contrib/debian/manpages/dash.conf.5 index e4304d86cc315..319c84b44558b 100644 --- a/contrib/debian/manpages/dash.conf.5 +++ b/contrib/debian/manpages/dash.conf.5 @@ -2,7 +2,7 @@ .SH NAME dash.conf \- dash configuration file .SH SYNOPSIS -All command-line options (except for '\-datadir' and '\-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. +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 diff --git a/contrib/debian/manpages/dashd.1 b/contrib/debian/manpages/dashd.1 index fe0d744fda5bb..b31f828737c43 100644 --- a/contrib/debian/manpages/dashd.1 +++ b/contrib/debian/manpages/dashd.1 @@ -1,14 +1,14 @@ -.TH BITCOIND "1" "January 2011" "bitcoind 3.19" +.TH DASHD "1" "January 2011" "dashd 3.19" .SH NAME -bitcoind \- peer-to-peer network based digital currency +Dash \- peer-to-peer network based digital currency .SH SYNOPSIS -bitcoin [options] [params] +dashd [options] [params] .TP -bitcoin [options] help \- Get help for a command +dashd [options] help \- Get help for a command .SH DESCRIPTION -This manual page documents the bitcoind program. Bitcoin 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: +This manual page documents the dashd program. Dash 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: -Bitcoins 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 Bitcoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks. +Dash 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 Dash system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks. .SH OPTIONS .TP @@ -28,7 +28,7 @@ Start minimized Specify data directory .TP \fB\-proxy=\fR -Connect through socks4 proxy +Connect through SOCKS5 proxy .TP \fB\-addnode=\fR Add a node to connect to @@ -84,14 +84,14 @@ This help message \fBbackupwallet 'destination'\fR Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename. .TP -\fBgetaccount 'bitcoinaddress'\fR +\fBgetaccount 'dashaddress'\fR Returns the account associated with the given address. .TP -\fBsetaccount 'bitcoinaddress' ['account']\fR +\fBsetaccount 'dashaddress' ['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 bitcoin address for 'account'. +Returns a new dash address for 'account'. .TP \fBgetaddressesbyaccount 'account'\fR Returns the list of addresses associated with the given 'account'. @@ -112,7 +112,7 @@ Returns the number of connections to other nodes. 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 bitcoins, false otherwise. +Returns boolean true if server is trying to generate DASH, false otherwise. .TP \fBsetgenerate 'generate' ['genproclimit']\fR Generation is limited to ['genproclimit'] processors, \-1 is unlimited. @@ -124,13 +124,13 @@ Returns a recent hashes per second performance measurement while generating. Returns an object containing server information. .TP \fBgetnewaddress 'account'\fR -Returns a new bitcoin 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'. +Returns a new dash 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 'bitcoinaddress' ['minconf=1']\fR -Returns the total amount received by 'bitcoinaddress' in transactions with at least ['minconf'] confirmations. +\fBgetreceivedbyaddress 'dashaddress' ['minconf=1']\fR +Returns the total amount received by 'dashaddress' in transactions with at least ['minconf'] confirmations. .TP \fBgettransaction 'txid'\fR Returns information about a specific transaction, given hexadecimal transaction ID. @@ -148,7 +148,7 @@ List commands, or get help for a command. .TP \fBlistaccounts ['minconf=1']\fR List accounts and their current balances. - *note: requires bitcoin 0.3.20 or later. + *note: requires dash 0.3.20 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: @@ -177,26 +177,26 @@ Returns a list of the last ['count'] transactions for 'account' \- for all accou "message" : message associated with transaction (only for send). "to" : message-to associated with transaction (only for send). - *note: requires bitcoin 0.3.20 or later. + *note: requires dash 0.3.20 or later. .TP \fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR Moves funds between accounts. .TP -\fBsendfrom* <'account'> <'bitcoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR -Sends amount from account's balance to 'bitcoinaddress'. This method will fail if there is less than amount bitcoins 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. +\fBsendfrom* <'account'> <'dashaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR +Sends amount from account's balance to 'dashaddress'. This method will fail if there is less than amount DASH 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 'bitcoinaddress' 'amount' ['comment'] ['comment-to']\fR -Sends amount from the server's available balance to 'bitcoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success. +\fBsendtoaddress 'dashaddress' 'amount' ['comment'] ['comment-to']\fR +Sends amount from the server's available balance to 'dashaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success. .TP \fBstop\fR -Stops the bitcoin server. +Stops the dash server. .TP -\fBvalidateaddress 'bitcoinaddress'\fR -Checks that 'bitcoinaddress' looks like a proper bitcoin address. Returns an object containing: +\fBvalidateaddress 'dashaddress'\fR +Checks that 'dashaddress' looks like a proper Dash address. Returns an object containing: "isvalid" : true or false. "ismine" : true if the address is in the server's wallet. - "address" : bitcoinaddress. + "address" : dashaddress. *note: ismine and address are only returned if the address is valid. diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh index e42b71a54ac07..6f68496ed86b8 100755 --- a/contrib/devtools/github-merge.sh +++ b/contrib/devtools/github-merge.sh @@ -49,11 +49,11 @@ fi # Initialize source branches. git checkout -q "$BRANCH" if git fetch -q "$HOST":"$REPO" "+refs/pull/$PULL/*:refs/heads/pull/$PULL/*"; then - if ! git log -1q "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then + if ! git log -q -1 "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then echo "ERROR: Cannot find head of pull request #$PULL on $HOST:$REPO." >&2 exit 3 fi - if ! git log -1q "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then + if ! git log -q -1 "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then echo "ERROR: Cannot find merge of pull request #$PULL on $HOST:$REPO." >&2 exit 3 fi @@ -136,6 +136,9 @@ else echo "Dropping you on a shell so you can try building/testing the merged source." >&2 echo "Run 'git diff HEAD~' to show the changes being merged." >&2 echo "Type 'exit' when done." >&2 + if [[ -f /etc/debian_version ]]; then # Show pull number in prompt on Debian default prompt + export debian_chroot="$PULL" + fi bash -i read -p "Press 'm' to accept the merge. " -n 1 -r >&2 echo diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 8dd6d8f037d9b..f3999f1c0b54a 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -41,6 +41,10 @@ 'GLIBCXX': (3,4,13), 'GLIBC': (2,11) } +# Ignore symbols that are exported as part of every executable +IGNORE_EXPORTS = { +'_edata', '_end', '_init', '__bss_start', '_fini' +} READELF_CMD = '/usr/bin/readelf' CPPFILT_CMD = '/usr/bin/c++filt' @@ -105,6 +109,8 @@ def check_version(max_versions, version): retval = 1 # Check exported symbols for sym,version in read_symbols(filename, False): + if sym in IGNORE_EXPORTS: + continue print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym))) retval = 1 diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md index babb28b0890e7..faa1c4b194ee1 100644 --- a/contrib/gitian-descriptors/README.md +++ b/contrib/gitian-descriptors/README.md @@ -20,14 +20,13 @@ Sanity checks: Once you've got the right hardware and software: - git clone git://github.com/darkcoin/darkcoin.git + git clone git://github.com/dashpay/dash.git git clone git://github.com/devrandom/gitian-builder.git mkdir gitian-builder/inputs cd gitian-builder/inputs # Create base images cd gitian-builder - bin/make-base-vm --suite precise --arch i386 bin/make-base-vm --suite precise --arch amd64 cd .. @@ -63,5 +62,5 @@ Here's a description of Gavin's setup on OSX 10.6: 5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above: export USE_LXC=1 - git clone git://github.com/darkcoin/darkcoin.git + git clone git://github.com/dashpay/dash.git ... etc diff --git a/contrib/gitian-descriptors/boost-linux.yml b/contrib/gitian-descriptors/boost-linux.yml deleted file mode 100644 index bd3534633737a..0000000000000 --- a/contrib/gitian-descriptors/boost-linux.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: "boost" -suites: -- "precise" -architectures: -- "i386" -- "amd64" -packages: -- "g++" -- "unzip" -- "pkg-config" -- "libtool" -- "faketime" -- "bsdmainutils" -- "zip" -- "libz-dev" -reference_datetime: "2011-01-30 00:00:00" -remotes: [] -files: -- "boost_1_55_0.tar.bz2" -script: | - STAGING="$HOME/install" - TEMPDIR="$HOME/tmp" - export LIBRARY_PATH="$STAGING/lib" - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - # Input Integrity Check - echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c - - mkdir -p "$STAGING" - tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2 - cd boost_1_55_0 - GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2) - # note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags - echo "using gcc : $GCCVERSION : g++ - : - \"-frandom-seed=boost1 -fPIC\" - ;" > user-config.jam - - ./bootstrap.sh --without-icu - - ./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS -d+2 install - - # post-process all generated libraries to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $STAGING -name \*.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd "$STAGING" - find | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip diff --git a/contrib/gitian-descriptors/boost-win.yml b/contrib/gitian-descriptors/boost-win.yml deleted file mode 100644 index db5d6bab1d92d..0000000000000 --- a/contrib/gitian-descriptors/boost-win.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -name: "boost" -suites: -- "precise" -architectures: -- "amd64" -packages: -- "mingw-w64" -- "g++-mingw-w64" -- "faketime" -- "zip" -reference_datetime: "2011-01-30 00:00:00" -remotes: [] -files: -- "boost_1_55_0.tar.bz2" -- "boost-mingw-gas-cross-compile-2013-03-03.patch" -script: | - # Defines - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - INDIR=$HOME/build - TEMPDIR=$HOME/tmp - # Input Integrity Check - echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c - echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c - - for BITS in 32 64; do # for architectures - # - INSTALLPREFIX=$HOME/staging${BITS} - BUILDDIR=$HOME/build${BITS} - if [ "$BITS" == "32" ]; then - HOST=i686-w64-mingw32 - else - HOST=x86_64-w64-mingw32 - fi - # - mkdir -p $INSTALLPREFIX $BUILDDIR - cd $BUILDDIR - # - tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2 - cd boost_1_55_0 - GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2) - echo "using gcc : $GCCVERSION : $HOST-g++ - : - $HOST-windres - $HOST-ar - -frandom-seed=boost1 - $HOST-ranlib - ;" > user-config.jam - ./bootstrap.sh --without-icu - - # Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work - # This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost. - # Please obtain the exact patch that matches the above sha256sum from one of the following mirrors. - # - # Read History: https://svn.boost.org/trac/boost/ticket/7262 - # History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html - # - # Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch - # Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch - # Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch - # Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch - patch -p0 < $INDIR/boost-mingw-gas-cross-compile-2013-03-03.patch - - # Bug Workaround: boost-1.54.0 broke the ability to disable zlib, still broken in 1.55 - # https://svn.boost.org/trac/boost/ticket/9156 - sed -i 's^\[ ac.check-library /zlib//zlib : /zlib//zlib^^' libs/iostreams/build/Jamfile.v2 - sed -i 's^zlib.cpp gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2 - - # http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html - # "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model." - ./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install - # post-process all generated libraries to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $INSTALLPREFIX -name \*.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - $HOST-ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd "$INSTALLPREFIX" - find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip - done # for BITS in - diff --git a/contrib/gitian-descriptors/deps-linux.yml b/contrib/gitian-descriptors/deps-linux.yml deleted file mode 100644 index d1e37833d925e..0000000000000 --- a/contrib/gitian-descriptors/deps-linux.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -name: "bitcoin" -suites: -- "precise" -architectures: -- "i386" -- "amd64" -packages: -- "g++" -- "unzip" -- "zip" -- "pkg-config" -- "libtool" -- "faketime" -- "bsdmainutils" -reference_datetime: "2013-06-01 00:00:00" -remotes: [] -files: -- "openssl-1.0.1k.tar.gz" -- "miniupnpc-1.9.20140701.tar.gz" -- "qrencode-3.4.3.tar.bz2" -- "protobuf-2.5.0.tar.bz2" -- "db-4.8.30.NC.tar.gz" -script: | - STAGING="$HOME/install" - TEMPDIR="$HOME/tmp" - OPTFLAGS='-O2' - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - export LIBRARY_PATH="$STAGING/lib" - # Integrity Check - echo "8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c openssl-1.0.1k.tar.gz" | sha256sum -c - echo "26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07 miniupnpc-1.9.20140701.tar.gz" | sha256sum -c - echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c - echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c - echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c - - # - tar xzf openssl-1.0.1k.tar.gz - cd openssl-1.0.1k - # need -fPIC to avoid relocation error in 64 bit builds - ./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC - # need to build OpenSSL with faketime because a timestamp is embedded into cversion.o - make - make install_sw - cd .. - # - tar xzfm miniupnpc-1.9.20140701.tar.gz - cd miniupnpc-1.9.20140701 - # miniupnpc is always built with -fPIC - INSTALLPREFIX=$STAGING make $MAKEOPTS install - rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build - cd .. - # - tar xjf qrencode-3.4.3.tar.bz2 - cd qrencode-3.4.3 - unset FAKETIME # unset fake time during configure, as it does some clock sanity tests - # need --with-pic to avoid relocation error in 64 bit builds - ./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking - # Workaround to prevent re-configuring by make; make all files have a date in the past - find . -print0 | xargs -r0 touch -t 200001010000 - export FAKETIME=$REFERENCE_DATETIME - make $MAKEOPTS install - cd .. - # - tar xjf protobuf-2.5.0.tar.bz2 - cd protobuf-2.5.0 - mkdir -p $STAGING/host/bin - unset FAKETIME # unset fake time during configure, as it does some clock sanity tests - # need --with-pic to avoid relocation error in 64 bit builds - ./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib - # Workaround to prevent re-configuring by make; make all files have a date in the past - find . -print0 | xargs -r0 touch -t 200001010000 - export FAKETIME=$REFERENCE_DATETIME - make $MAKEOPTS install - cd .. - # - tar xzf db-4.8.30.NC.tar.gz - cd db-4.8.30.NC/build_unix - # need --with-pic to avoid relocation error in 64 bit builds - ../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic - # Workaround to prevent re-configuring by make; make all files have a date in the past - find . -print0 | xargs -r0 touch -t 200001010000 - make $MAKEOPTS library_build - make install_lib install_include - cd ../.. - # post-process all generated libraries to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $STAGING -name \*.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd $STAGING - find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r9.zip diff --git a/contrib/gitian-descriptors/deps-win.yml b/contrib/gitian-descriptors/deps-win.yml deleted file mode 100644 index 4e6ac954a66f8..0000000000000 --- a/contrib/gitian-descriptors/deps-win.yml +++ /dev/null @@ -1,128 +0,0 @@ ---- -name: "bitcoin-deps" -suites: -- "precise" -architectures: -- "amd64" -packages: -- "mingw-w64" -- "g++-mingw-w64" -- "git-core" -- "zip" -- "faketime" -- "psmisc" -reference_datetime: "2011-01-30 00:00:00" -remotes: [] -files: -- "openssl-1.0.1k.tar.gz" -- "db-4.8.30.NC.tar.gz" -- "miniupnpc-1.9.20140701.tar.gz" -- "zlib-1.2.8.tar.gz" -- "libpng-1.6.8.tar.gz" -- "qrencode-3.4.3.tar.bz2" -script: | - # - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - INDIR=$HOME/build - TEMPDIR=$HOME/tmp - # Input Integrity Check - echo "8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c openssl-1.0.1k.tar.gz" | sha256sum -c - echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c - echo "26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07 miniupnpc-1.9.20140701.tar.gz" | sha256sum -c - echo "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d zlib-1.2.8.tar.gz" | sha256sum -c - echo "32c7acf1608b9c8b71b743b9780adb7a7b347563dbfb4a5263761056da44cc96 libpng-1.6.8.tar.gz" | sha256sum -c - echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c - - for BITS in 32 64; do # for architectures - # - INSTALLPREFIX=$HOME/staging${BITS} - BUILDDIR=$HOME/build${BITS} - if [ "$BITS" == "32" ]; then - HOST=i686-w64-mingw32 - else - HOST=x86_64-w64-mingw32 - fi - # - mkdir -p $INSTALLPREFIX $BUILDDIR - cd $BUILDDIR - # - tar xzf $INDIR/openssl-1.0.1k.tar.gz - cd openssl-1.0.1k - if [ "$BITS" == "32" ]; then - OPENSSL_TGT=mingw - else - OPENSSL_TGT=mingw64 - fi - ./Configure --cross-compile-prefix=$HOST- ${OPENSSL_TGT} no-shared no-dso --openssldir=$INSTALLPREFIX - make - make install_sw - cd .. - # - tar xzf $INDIR/db-4.8.30.NC.tar.gz - cd db-4.8.30.NC/build_unix - ../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST --disable-shared - make $MAKEOPTS library_build - make install_lib install_include - cd ../.. - # - tar xzf $INDIR/miniupnpc-1.9.20140701.tar.gz - cd miniupnpc-1.9.20140701 - echo " - --- miniupnpc-1.9/Makefile.mingw.orig 2013-09-29 18:52:51.014087958 -1000 - +++ miniupnpc-1.9/Makefile.mingw 2013-09-29 19:09:29.663318691 -1000 - @@ -67,8 +67,8 @@ - - wingenminiupnpcstrings.o: wingenminiupnpcstrings.c - - -miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings - - wingenminiupnpcstrings \$< \$@ - +miniupnpcstrings.h: miniupnpcstrings.h.in - + sed -e 's|OS/version|MSWindows/5.1.2600|' -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"VERSIONHERE\"|' \$< > \$@ - - minixml.o: minixml.c minixml.h miniupnpcstrings.h - - " | sed "s/VERSIONHERE/$(cat VERSION)/" | patch -p1 - mkdir -p dll - make -f Makefile.mingw CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a - install -d $INSTALLPREFIX/include/miniupnpc - install *.h $INSTALLPREFIX/include/miniupnpc - install libminiupnpc.a $INSTALLPREFIX/lib - cd .. - # - tar xzf $INDIR/zlib-1.2.8.tar.gz - cd zlib-1.2.8 - CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static - make - make install - cd .. - # - tar xzf $INDIR/libpng-1.6.8.tar.gz - cd libpng-1.6.8 - OPT="-O2" - CPPFLAGS="${OPT} -I$INSTALLPREFIX/include" CFLAGS="${OPT} -I$INSTALLPREFIX/include" LDFLAGS="${OPT} -L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST - make $MAKEOPTS - make install - cd .. - # - tar xjf $INDIR/qrencode-3.4.3.tar.bz2 - cd qrencode-3.4.3 - png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-dependency-tracking - # Workaround to prevent re-configuring by make (resulting in missing m4 error); make all files have a date in the past - find . -print0 | xargs -r0 touch -t 200001010000 - make - make install - cd .. - # post-process all generated libraries to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $INSTALLPREFIX -name \*.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - $HOST-ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd $INSTALLPREFIX - find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r16.zip - done # for BITS in diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 28e795a583a6b..5a7897ee32066 100755 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,86 +1,109 @@ --- -name: "dash" +name: "dash-linux-0.12" +enable_cache: true suites: - "precise" architectures: -- "i386" - "amd64" packages: -- "g++" +- "g++-multilib" - "git-core" -- "unzip" - "pkg-config" - "autoconf2.13" - "libtool" - "automake" - "faketime" - "bsdmainutils" -- "libqt4-core" -- "libqt4-gui" -- "libqt4-dbus" -- "libqt4-network" -- "libqt4-test" +- "binutils-gold" reference_datetime: "2014-01-10 00:00:00" remotes: - "url": "https://github.com/dashpay/dash.git" "dir": "dash" -files: -- "bitcoin-deps-linux32-gitian-r9.zip" -- "bitcoin-deps-linux64-gitian-r9.zip" -- "boost-linux32-1.55.0-gitian-r1.zip" -- "boost-linux64-1.55.0-gitian-r1.zip" -- "qt-linux32-4.6.4-gitian-r1.tar.gz" -- "qt-linux64-4.6.4-gitian-r1.tar.gz" +files: [] script: | - STAGING="$HOME/install" - OPTFLAGS='-O2' - BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory - TEMPDIR="$HOME/tempdir" - export TZ=UTC - export LIBRARY_PATH="$STAGING/lib" - export PATH="$STAGING/bin:$PATH" - mkdir -p ${BINDIR} - # - mkdir -p $STAGING - cd $STAGING - unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r9.zip - unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip - tar -zxf ../build/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz - cd ../build + WRAP_DIR=$HOME/wrapped + HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu" + CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat" + FAKETIME_HOST_PROGS="" + FAKETIME_PROGS="date ar ranlib nm strip" + + export QT_RCC_TEST=1 + export GZIP="-9n" + export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" + export TZ="UTC" + export BUILD_DIR=`pwd` + mkdir -p ${WRAP_DIR} + if test -n "$GBUILD_CACHE_ENABLED"; then + export SOURCES_PATH=${GBUILD_COMMON_CACHE} + export BASE_CACHE=${GBUILD_PACKAGE_CACHE} + mkdir -p ${BASE_CACHE} ${SOURCES_PATH} + fi + + # Create global faketime wrappers + for prog in ${FAKETIME_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${prog} + chmod +x ${WRAP_DIR}/${prog} + done + + # Create per-host faketime wrappers + for i in $HOSTS; do + for prog in ${FAKETIME_HOST_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + chmod +x ${WRAP_DIR}/${i}-${prog} + done + done + export PATH=${WRAP_DIR}:${PATH} - # Avoid exporting *any* symbols from the executable - # This avoids conflicts between the libraries statically linked into dash and any - # libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094). - # It also avoids start-up overhead to not export any unnecessary symbols. - # To do this, build a linker script that marks all symbols as local. - LINKER_SCRIPT=$HOME/build/linker_version_script - echo ' - { - local: *; - };' > $LINKER_SCRIPT - function do_configure { - ./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-qt-bindir=$STAGING/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib -Wl,--version-script=$LINKER_SCRIPT ${OPTFLAGS}" CXXFLAGS="-frandom-seed=dash ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt" --enable-glibc-back-compat - } - # cd dash + BASEPREFIX=`pwd`/depends + # Build dependencies for each host + for i in $HOSTS; do + make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" + done + + # Create the release tarball using (arbitrarily) the first host ./autogen.sh - do_configure + ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` make dist - DISTNAME=`echo dash-*.tar.gz` + SOURCEDIST=`echo dash-*.tar.gz` + DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` + # Correct tar file order + mkdir -p temp + pushd temp + tar xf ../$SOURCEDIST + find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + popd - # Build dynamic versions of everything - # (with static linking to boost and openssl as well a some non-OS deps) - mkdir -p distsrc - cd distsrc - tar --strip-components=1 -xf ../$DISTNAME - do_configure --bindir=$BINDIR - make $MAKEOPTS - make $MAKEOPTS install-strip - make $MAKEOPTS clean + ORIGPATH="$PATH" + # Extract the release tarball into a dir for each host and build + for i in ${HOSTS}; do + export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} + mkdir -p distsrc-${i} + cd distsrc-${i} + INSTALLPATH=`pwd`/installed/${DISTNAME} + mkdir -p ${INSTALLPATH} + tar --strip-components=1 -xf ../$SOURCEDIST - # sort distribution tar file and normalize user/group/mtime information for deterministic output + ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} + make ${MAKEOPTS} + make install-strip + cd installed + find . -name "lib*.la" -delete + find . -name "lib*.a" -delete + rm -rf ${DISTNAME}/lib/pkgconfig + find ${DISTNAME} | 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 + cd ../../ + done mkdir -p $OUTDIR/src - rm -rf $TEMPDIR - mkdir -p $TEMPDIR - cd $TEMPDIR - tar -xvf $HOME/build/dash/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME + mv $SOURCEDIST $OUTDIR/src + mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz + mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz + diff --git a/contrib/gitian-descriptors/gitian-osx-dash.yml b/contrib/gitian-descriptors/gitian-osx-dash.yml deleted file mode 100755 index 78e6c4d07b666..0000000000000 --- a/contrib/gitian-descriptors/gitian-osx-dash.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -name: "dash" -suites: -- "precise" -architectures: -- "i386" -packages: -- "git-core" -- "automake" -- "faketime" -- "bsdmainutils" -- "pkg-config" -- "p7zip-full" - -reference_datetime: "2014-01-10 00:00:00" -remotes: -- "url": "https://github.com/dashpay/dash.git" - "dir": "dash" -files: -- "osx-native-depends-r3.tar.gz" -- "osx-depends-r7.tar.gz" -- "osx-depends-qt-5.2.1-r6.tar.gz" -- "MacOSX10.7.sdk.tar.gz" - -script: | - - HOST=x86_64-apple-darwin11 - PREFIX=`pwd`/osx-cross-depends/prefix - SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.7.sdk - NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix - export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" - - export SOURCES_PATH=`pwd` - - mkdir -p osx-cross-depends/SDKs - - tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz - - tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz - tar -C osx-cross-depends -xf osx-depends-r7.tar.gz - tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r6.tar.gz - export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH - - cd dash - - export ZERO_AR_DATE=1 - export QT_RCC_TEST=1 - ./autogen.sh - ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode - make dist - mkdir -p distsrc - cd distsrc - tar --strip-components=1 -xf ../dash-*.tar* - ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode - make $MAKEOPTS - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - make deploy - dmg dmg Dash-Qt.dmg $OUTDIR/Dash-Qt.dmg diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml deleted file mode 100644 index 83abc08f0d4a4..0000000000000 --- a/contrib/gitian-descriptors/gitian-osx-depends.yml +++ /dev/null @@ -1,159 +0,0 @@ ---- -name: "osx-depends" -suites: -- "precise" -architectures: -- "i386" -packages: -- "git-core" -- "automake" -- "p7zip-full" - -reference_datetime: "2013-06-01 00:00:00" -remotes: [] -files: -- "boost_1_55_0.tar.bz2" -- "db-4.8.30.NC.tar.gz" -- "miniupnpc-1.9.20140701.tar.gz" -- "openssl-1.0.1k.tar.gz" -- "protobuf-2.5.0.tar.bz2" -- "qrencode-3.4.3.tar.bz2" -- "MacOSX10.7.sdk.tar.gz" -- "osx-native-depends-r3.tar.gz" - -script: | - - echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | sha256sum -c - echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c - echo "26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07 miniupnpc-1.9.20140701.tar.gz" | sha256sum -c - echo "8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c openssl-1.0.1k.tar.gz" | sha256sum -c - echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c - echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c - - REVISION=r7 - export SOURCES_PATH=`pwd` - export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" - export PATH=$HOME:$PATH - export SOURCES_PATH=`pwd` - export ZERO_AR_DATE=1 - - mkdir -p osx-cross-depends/build - cd osx-cross-depends - - PREFIX=`pwd`/prefix - NATIVEPREFIX=`pwd`/native-prefix - BUILD_BASE=`pwd`/build - SDK=`pwd`/SDKs/MacOSX10.7.sdk - HOST=x86_64-apple-darwin11 - MIN_VERSION=10.6 - - INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments" - INT_CXXFLAGS="${INT_CFLAGS}" - INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" - INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin" - INT_CPPFLAGS="-I${PREFIX}/include" - INT_CC=clang - INT_CXX=clang++ - INT_OBJC=clang - INT_OBJCXX=clang++ - INT_AR=${HOST}-ar - INT_RANLIB=${HOST}-ranlib - INT_LIBTOOL=${HOST}-libtool - INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool - - export PATH=${NATIVEPREFIX}/bin:${PATH} - - mkdir -p ${NATIVEPREFIX}/bin - mkdir -p ${NATIVEPREFIX}/lib - mkdir -p ${PREFIX}/bin - mkdir -p ${PREFIX}/lib - mkdir -p ${BUILD_BASE} - - mkdir -p SDKs - tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz - - tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz - - # bdb - SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz - BUILD_DIR=${BUILD_BASE}/db-4.8.30.NC - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ${BUILD_DIR}/dbinc/atomic.h - pushd ${BUILD_DIR} - cd build_unix; - ../dist/configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" - make $MAKEOPTS libdb.a libdb_cxx.a - make install_lib install_include - popd - - # openssl - SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1k.tar.gz - BUILD_DIR=${BUILD_BASE}/openssl-1.0.1k - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - pushd ${BUILD_DIR} - sed -ie "s|cc:|${INT_CC}:|" ${BUILD_DIR}/Configure - sed -ie "s|\(-arch [_a-zA-Z0-9]*\)|\1 --sysroot ${SDK} -target ${HOST} -msse2|" ${BUILD_DIR}/Configure - AR="${INT_AR}" RANLIB="${INT_RANLIB}" ./Configure --prefix=${PREFIX} --openssldir=${PREFIX}/etc/openssl zlib shared no-krb5 darwin64-x86_64-cc ${INT_LDFLAGS} ${INT_CLANG_LDFLAGS} ${INT_CPPFLAGS} - sed -i "s|engines apps test|engines|" ${BUILD_DIR}/Makefile - sed -i "/define DATE/d" ${BUILD_DIR}/crypto/Makefile - make -j1 build_libs libcrypto.pc libssl.pc openssl.pc - make -j1 install_sw - popd - - #libminiupnpc - SOURCE_FILE=${SOURCES_PATH}/miniupnpc-1.9.20140701.tar.gz - BUILD_DIR=${BUILD_BASE}/miniupnpc-1.9.20140701 - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - pushd ${BUILD_DIR} - CFLAGS="${INT_CFLAGS} ${INT_CPPFLAGS}" make $MAKEOPTS OS=Darwin CC="${INT_CC}" AR="${INT_AR}" libminiupnpc.a - install -d ${PREFIX}/include/miniupnpc - install *.h ${PREFIX}/include/miniupnpc - install libminiupnpc.a ${PREFIX}/lib - popd - - # qrencode - SOURCE_FILE=${SOURCES_PATH}/qrencode-3.4.3.tar.bz2 - BUILD_DIR=${BUILD_BASE}/qrencode-3.4.3 - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - pushd ${BUILD_DIR} - - # m4 folder is not included in the stable release, which can confuse aclocal - # if its timestamp ends up being earlier than configure.ac when extracted - touch aclocal.m4 - ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --disable-shared -without-tools --disable-sdltest --disable-dependency-tracking - make $MAKEOPTS - make install - popd - - # libprotobuf - SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2 - BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0 - - tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE} - pushd ${BUILD_DIR} - ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --enable-shared=no --disable-dependency-tracking --with-protoc=${NATIVEPREFIX}/bin/protoc - cd src - make $MAKEOPTS libprotobuf.la - make install-libLTLIBRARIES install-nobase_includeHEADERS - cd .. - make install-pkgconfigDATA - popd - - # boost - SOURCE_FILE=${SOURCES_PATH}/boost_1_55_0.tar.bz2 - BUILD_DIR=${BUILD_BASE}/boost_1_55_0 - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - pushd ${BUILD_DIR} - ./bootstrap.sh --with-libraries=chrono,filesystem,program_options,system,thread,test - echo "using darwin : : ${INT_CXX} : \"${INT_CFLAGS} ${INT_CPPFLAGS}\" \"${INT_LDFLAGS} ${INT_CLANG_LDFLAGS}\" \"${INT_LIBTOOL}\" \"${INT_STRIP}\" : ;" > "user-config.jam" - ./b2 -d2 --layout=tagged --build-type=complete --prefix="${PREFIX}" --toolset=darwin-4.2.1 --user-config=user-config.jam variant=release threading=multi link=static install - popd - - export GZIP="-9n" - find prefix | sort | tar --no-recursion -czf osx-depends-${REVISION}.tar.gz -T - - - mv osx-depends-${REVISION}.tar.gz $OUTDIR diff --git a/contrib/gitian-descriptors/gitian-osx-native.yml b/contrib/gitian-descriptors/gitian-osx-native.yml deleted file mode 100644 index a753ad704ffe7..0000000000000 --- a/contrib/gitian-descriptors/gitian-osx-native.yml +++ /dev/null @@ -1,178 +0,0 @@ ---- -name: "osx-native" -suites: -- "precise" -architectures: -- "i386" -packages: -- "git-core" -- "automake" -- "faketime" -- "libssl-dev" -- "libbz2-dev" -- "libz-dev" -- "cmake" -- "libcap-dev" -- "p7zip-full" -- "uuid-dev" - -reference_datetime: "2013-06-01 00:00:00" -remotes: [] -files: -- "10cc648683617cca8bcbeae507888099b41b530c.tar.gz" -- "cctools-809.tar.gz" -- "dyld-195.5.tar.gz" -- "ld64-127.2.tar.gz" -- "protobuf-2.5.0.tar.bz2" -- "MacOSX10.7.sdk.tar.gz" -- "cdrkit-1.1.11.tar.gz" -- "libdmg-hfsplus-v0.1.tar.gz" -- "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" -- "cdrkit-deterministic.patch" - - -script: | - - echo "18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca 10cc648683617cca8bcbeae507888099b41b530c.tar.gz" | sha256sum -c - echo "03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad cctools-809.tar.gz" | sha256sum -c - echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c dyld-195.5.tar.gz" | sha256sum -c - echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142 ld64-127.2.tar.gz" | sha256sum -c - echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c - echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da cdrkit-1.1.11.tar.gz" | sha256sum -c - echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c - echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c - echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f cdrkit-deterministic.patch" | sha256sum -c - - - REVISION=r3 - export REFERENCE_DATETIME - export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - - REAL_AR=`which ar` - REAL_RANLIB=`which ranlib` - REAL_DATE=`which date` - - echo '#!/bin/bash' > $HOME/ar - echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar - echo "$REAL_AR \"\$@\"" >> $HOME/ar - - echo '#!/bin/bash' > $HOME/ranlib - echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ranlib - echo "$REAL_RANLIB \"\$@\"" >> $HOME/ranlib - - echo '#!/bin/bash' > $HOME/date - echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/date - echo "$REAL_DATE \"\$@\"" >> $HOME/date - - chmod +x $HOME/ar $HOME/ranlib $HOME/date - - - export PATH=$HOME:$PATH - export SOURCES_PATH=`pwd` - - mkdir -p osx-cross-depends/build - cd osx-cross-depends - - NATIVEPREFIX=`pwd`/native-prefix - BUILD_BASE=`pwd`/build - SDK=`pwd`/SDKs/MacOSX10.7.sdk - HOST=x86_64-apple-darwin11 - MIN_VERSION=10.6 - - CFLAGS="" - CXXFLAGS="${CFLAGS}" - LDFLAGS="-L${NATIVEPREFIX}/lib" - - export PATH=${NATIVEPREFIX}/bin:${PATH} - - mkdir -p ${NATIVEPREFIX}/bin - mkdir -p ${NATIVEPREFIX}/lib - - mkdir -p SDKs - tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz - - # Clang - SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz - BUILD_DIR=${BUILD_BASE}/clang+llvm-3.2-x86-linux-ubuntu-12.04 - - mkdir -p ${NATIVEPREFIX}/lib/clang/3.2/include - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - cp ${BUILD_DIR}/bin/clang ${NATIVEPREFIX}/bin/ - cp ${BUILD_DIR}/bin/clang++ ${NATIVEPREFIX}/bin/ - cp ${BUILD_DIR}/lib/libLTO.so ${NATIVEPREFIX}/lib/ - cp ${BUILD_DIR}/lib/clang/3.2/include/* ${NATIVEPREFIX}/lib/clang/3.2/include - - # cctools - SOURCE_FILE=${SOURCES_PATH}/10cc648683617cca8bcbeae507888099b41b530c.tar.gz - BUILD_DIR=${BUILD_BASE}/toolchain4-10cc648683617cca8bcbeae507888099b41b530c - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - mkdir -p ${BUILD_DIR}/sdks - pushd ${BUILD_DIR}/sdks; - ln -sf ${SDK} MacOSX10.7.sdk - ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz - ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz - ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz - - tar -C ${BUILD_DIR} -xf ${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz - # Hack in the use of our llvm headers rather than grabbing the old llvm-gcc. - sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" ${BUILD_DIR}/cctools2odcctools/extract.sh - sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" ${BUILD_DIR}/cctools2odcctools/extract.sh - sed -i "s|\${LLVM_CLANG_DIR}/llvmCore/include/llvm-c|\${LLVM_CLANG_DIR}/include/llvm-c \${LLVM_CLANG_DIR}/include/llvm |" ${BUILD_DIR}/cctools2odcctools/extract.sh - - sed -i "s|fAC_INIT|AC_INIT|" ${BUILD_DIR}/cctools2odcctools/files/configure.ac - sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac - - cd ${BUILD_DIR}/cctools2odcctools - ./extract.sh --osxver 10.7 - cd odcctools-809 - ./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK} - - # The 'PC' define in sparc/reg.h conflicts but doesn't get used anyway. Just rename it. - sed -i "s|define\tPC|define\tPC_|" ${BUILD_DIR}/cctools2odcctools/odcctools-809/include/architecture/sparc/reg.h - make $MAKEOPTS - make install - popd - - # protoc - SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2 - BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0 - - tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE} - pushd ${BUILD_DIR}; - ./configure --enable-shared=no --disable-dependency-tracking --prefix=${NATIVEPREFIX} - make $MAKEOPTS - cp ${BUILD_DIR}/src/protoc ${NATIVEPREFIX}/bin/ - popd - - # cdrkit - SOURCE_FILE=${SOURCES_PATH}/cdrkit-1.1.11.tar.gz - BUILD_DIR=${BUILD_BASE}/cdrkit-1.1.11 - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - pushd ${BUILD_DIR} - patch -p1 < ${SOURCES_PATH}/cdrkit-deterministic.patch - cmake -DCMAKE_INSTALL_PREFIX=${NATIVEPREFIX} - make $MAKEOPTS genisoimage - make -C genisoimage install - popd - - # libdmg-hfsplus - SOURCE_FILE=${SOURCES_PATH}/libdmg-hfsplus-v0.1.tar.gz - BUILD_DIR=${BUILD_BASE}/libdmg-hfsplus-libdmg-hfsplus-v0.1 - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - mkdir -p ${BUILD_DIR}/build - pushd ${BUILD_DIR}/build - cmake -DCMAKE_INSTALL_PREFIX:PATH=${NATIVEPREFIX}/bin .. - make $MAKEOPTS - make install - popd - - rm -rf native-prefix/docs - - export GZIP="-9n" - find native-prefix | sort | tar --no-recursion -czf osx-native-depends-$REVISION.tar.gz -T - - mv osx-native-depends-$REVISION.tar.gz $OUTDIR diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml deleted file mode 100644 index 8f63e1b091ec8..0000000000000 --- a/contrib/gitian-descriptors/gitian-osx-qt.yml +++ /dev/null @@ -1,186 +0,0 @@ ---- -name: "osx-qt" -suites: -- "precise" -architectures: -- "i386" -packages: -- "git-core" -- "automake" -- "p7zip-full" - -reference_datetime: "2013-06-01 00:00:00" -remotes: [] -files: -- "qt-everywhere-opensource-src-5.2.1.tar.gz" -- "osx-native-depends-r3.tar.gz" -- "osx-depends-r7.tar.gz" -- "MacOSX10.7.sdk.tar.gz" - -script: | - - echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1 qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c - - REVISION=r6 - export SOURCES_PATH=`pwd` - export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" - export ZERO_AR_DATE=1 - - export TZ=UTC - - REAL_DATE=`which date` - echo '#!/bin/bash' > $HOME/date - echo "$REAL_DATE -d \"${REFERENCE_DATETIME}\" \"\$@\"" >> $HOME/date - - chmod +x $HOME/date - export PATH=$HOME:$PATH - - mkdir -p osx-cross-depends/build - cd osx-cross-depends - - PREFIX=`pwd`/prefix - NATIVEPREFIX=`pwd`/native-prefix - BUILD_BASE=`pwd`/build - SDK=`pwd`/SDKs/MacOSX10.7.sdk - HOST=x86_64-apple-darwin11 - MIN_VERSION=10.6 - - INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments" - INT_CXXFLAGS="${INT_CFLAGS}" - INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" - INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin" - INT_CPPFLAGS="-I${PREFIX}/include" - INT_CC=clang - INT_CXX=clang++ - INT_OBJC=clang - INT_OBJCXX=clang++ - INT_AR=${HOST}-ar - INT_RANLIB=${HOST}-ranlib - INT_LIBTOOL=${HOST}-libtool - INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool - - export PATH=${NATIVEPREFIX}/bin:${PATH} - - mkdir -p ${NATIVEPREFIX}/bin - mkdir -p ${NATIVEPREFIX}/lib - mkdir -p ${PREFIX}/bin - mkdir -p ${PREFIX}/lib - mkdir -p ${BUILD_BASE} - - mkdir -p SDKs - tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz - - tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz - - export PATH=`pwd`/native-prefix/bin:$PATH - tar xf /home/ubuntu/build/osx-depends-r7.tar.gz - - SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz - BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1 - - - tar -C ${BUILD_BASE} -xf ${SOURCE_FILE} - - # Install our mkspec. All files are pulled from the macx-clang spec, except for - # our custom qmake.conf - SPECFILE=${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/qmake.conf - - mkdir -p ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux - cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.lib ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/ - cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.app ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/ - cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/qplatformdefs.h ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/ - - cat > ${SPECFILE} < ${WRAP_DIR}/${prog} + echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${prog} + chmod +x ${WRAP_DIR}/${prog} + done + + UNSIGNED=dash-osx-unsigned.tar.gz + SIGNED=dash-osx-signed.dmg + + tar -xf ${UNSIGNED} + ./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz + ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Dash-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app + ${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED} diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml new file mode 100644 index 0000000000000..f8cb34deef226 --- /dev/null +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -0,0 +1,134 @@ +--- +name: "dash-osx-0.12" +enable_cache: true +suites: +- "precise" +architectures: +- "amd64" +packages: +- "g++-multilib" +- "git-core" +- "pkg-config" +- "autoconf2.13" +- "libtool" +- "automake" +- "faketime" +- "bsdmainutils" +- "cmake" +- "libcap-dev" +- "libz-dev" +- "libbz2-dev" +reference_datetime: "2013-06-01 00:00:00" +remotes: +- "url": "https://github.com/dashpay/dash.git" + "dir": "dash" +files: +- "MacOSX10.7.sdk.tar.gz" +script: | + WRAP_DIR=$HOME/wrapped + HOSTS="x86_64-apple-darwin11" + CONFIGFLAGS="--enable-upnp-default GENISOIMAGE=$WRAP_DIR/genisoimage" + FAKETIME_HOST_PROGS="" + FAKETIME_PROGS="ar ranlib date dmg genisoimage" + + export QT_RCC_TEST=1 + export GZIP="-9n" + export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" + export TZ="UTC" + export BUILD_DIR=`pwd` + mkdir -p ${WRAP_DIR} + if test -n "$GBUILD_CACHE_ENABLED"; then + export SOURCES_PATH=${GBUILD_COMMON_CACHE} + export BASE_CACHE=${GBUILD_PACKAGE_CACHE} + mkdir -p ${BASE_CACHE} ${SOURCES_PATH} + fi + + export ZERO_AR_DATE=1 + + # Create global faketime wrappers + for prog in ${FAKETIME_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${prog} + chmod +x ${WRAP_DIR}/${prog} + done + + # Create per-host faketime wrappers + for i in $HOSTS; do + for prog in ${FAKETIME_HOST_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + chmod +x ${WRAP_DIR}/${i}-${prog} + done + done + export PATH=${WRAP_DIR}:${PATH} + + cd dash + BASEPREFIX=`pwd`/depends + + mkdir -p ${BASEPREFIX}/SDKs + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.7.sdk.tar.gz + + # Build dependencies for each host + for i in $HOSTS; do + make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" + done + + # Create the release tarball using (arbitrarily) the first host + ./autogen.sh + ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` + make dist + SOURCEDIST=`echo dash-*.tar.gz` + DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` + + # Correct tar file order + mkdir -p temp + pushd temp + tar xf ../$SOURCEDIST + find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + popd + + ORIGPATH="$PATH" + # Extract the release tarball into a dir for each host and build + for i in ${HOSTS}; do + export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} + mkdir -p distsrc-${i} + cd distsrc-${i} + INSTALLPATH=`pwd`/installed/${DISTNAME} + mkdir -p ${INSTALLPATH} + tar --strip-components=1 -xf ../$SOURCEDIST + + ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} + make ${MAKEOPTS} + make install-strip + + make deploydir + mkdir -p unsigned-app-${i} + cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i} + cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i} + cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i} + cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate + cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff + mv dist unsigned-app-${i} + pushd unsigned-app-${i} + find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz + popd + + make deploy + ${WRAP_DIR}/dmg dmg Dash-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg + + cd installed + find . -name "lib*.la" -delete + find . -name "lib*.a" -delete + rm -rf ${DISTNAME}/lib/pkgconfig + find ${DISTNAME} | 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 + cd ../../ + done + mkdir -p $OUTDIR/src + mv $SOURCEDIST $OUTDIR/src + mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz diff --git a/contrib/gitian-descriptors/gitian-rpi2.yml b/contrib/gitian-descriptors/gitian-rpi2.yml new file mode 100644 index 0000000000000..6bf051f8c21ff --- /dev/null +++ b/contrib/gitian-descriptors/gitian-rpi2.yml @@ -0,0 +1,112 @@ +--- +name: "dash-raspberry-0.12" +enable_cache: true +suites: +- "precise" +architectures: +- "amd64" +packages: +- "g++-multilib" +- "git-core" +- "pkg-config" +- "autoconf2.13" +- "libtool" +- "automake" +- "faketime" +- "bsdmainutils" +- "binutils-gold" +reference_datetime: "2014-01-10 00:00:00" +remotes: +- "url": "https://github.com/dashpay/dash.git" + "dir": "dash" +files: +- "raspberrypi-tools.tar.gz" +script: | + WRAP_DIR=$HOME/wrapped + HOSTS="arm-linux-gnueabihf" + CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat" + FAKETIME_HOST_PROGS="" + FAKETIME_PROGS="date ar ranlib nm strip" + + tar --warning=no-timestamp -xzf raspberrypi-tools.tar.gz + export TOOLCHAIN_BIN=$(pwd)/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin + export PATH=$PATH:$TOOLCHAIN_BIN + + export QT_RCC_TEST=1 + export GZIP="-9n" + export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" + export TZ="UTC" + export BUILD_DIR=`pwd` + mkdir -p ${WRAP_DIR} + if test -n "$GBUILD_CACHE_ENABLED"; then + export SOURCES_PATH=${GBUILD_COMMON_CACHE} + export BASE_CACHE=${GBUILD_PACKAGE_CACHE} + mkdir -p ${BASE_CACHE} ${SOURCES_PATH} + fi + + # Create global faketime wrappers + for prog in ${FAKETIME_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${prog} + chmod +x ${WRAP_DIR}/${prog} + done + + # Create per-host faketime wrappers + for i in $HOSTS; do + for prog in ${FAKETIME_HOST_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + chmod +x ${WRAP_DIR}/${i}-${prog} + done + done + export PATH=${WRAP_DIR}:${PATH} + + cd dash + BASEPREFIX=`pwd`/depends + # Build dependencies for each host + for i in $HOSTS; do + make ${MAKEOPTS} NO_QT=1 -C ${BASEPREFIX} HOST="${i}" + done + + # Create the release tarball using (arbitrarily) the first host + ./autogen.sh + ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` + make NO_QT=1 dist + SOURCEDIST=`echo dash-*.tar.gz` + DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` + # Correct tar file order + mkdir -p temp + pushd temp + tar xf ../$SOURCEDIST + find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + popd + + ORIGPATH="$PATH" + # Extract the release tarball into a dir for each host and build + for i in ${HOSTS}; do + export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} + mkdir -p distsrc-${i} + cd distsrc-${i} + INSTALLPATH=`pwd`/installed/${DISTNAME} + mkdir -p ${INSTALLPATH} + tar --strip-components=1 -xf ../$SOURCEDIST + + ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} + make ${MAKEOPTS} NO_QT=1 + make NO_QT=1 install-strip + cd installed + find . -name "lib*.la" -delete + find . -name "lib*.a" -delete + rm -rf ${DISTNAME}/lib/pkgconfig + find ${DISTNAME} | 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 + cd ../../ + done + mkdir -p $OUTDIR/src + mv $SOURCEDIST $OUTDIR/src + mv ${OUTDIR}/${DISTNAME}-arm-*.tar.gz ${OUTDIR}/${DISTNAME}-RPi2.tar.gz diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 19adfb4135c5d..9ca5ab6e496d2 100755 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,97 +1,115 @@ --- -name: "dash" +name: "dash-win-0.12" +enable_cache: true suites: - "precise" architectures: - "amd64" -packages: -- "mingw-w64" -- "g++-mingw-w64" +packages: +- "g++" - "git-core" -- "unzip" -- "nsis" -- "faketime" +- "pkg-config" - "autoconf2.13" - "libtool" - "automake" -- "pkg-config" +- "faketime" - "bsdmainutils" - +- "mingw-w64" +- "g++-mingw-w64" +- "nsis" +- "zip" reference_datetime: "2014-01-10 00:00:00" remotes: - "url": "https://github.com/dashpay/dash.git" "dir": "dash" -files: -- "qt-win32-5.2.0-gitian-r3.zip" -- "qt-win64-5.2.0-gitian-r3.zip" -- "boost-win32-1.55.0-gitian-r6.zip" -- "boost-win64-1.55.0-gitian-r6.zip" -- "bitcoin-deps-win32-gitian-r16.zip" -- "bitcoin-deps-win64-gitian-r16.zip" -- "protobuf-win32-2.5.0-gitian-r4.zip" -- "protobuf-win64-2.5.0-gitian-r4.zip" +files: [] script: | - # Defines - export TZ=UTC - INDIR=$HOME/build - OPTFLAGS='-O2' - TEMPDIR="$HOME/tempdir" - NEEDDIST=1 - # Qt: workaround for determinism in resource ordering - # Qt5's rcc uses a QHash to store the files for the resource. - # A security fix in QHash makes the ordering of keys to be different on every run - # (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268). - # This is good in general but qrc shouldn't be doing a traversal over a randomized container. - # The thorough solution would be to use QMap instead of QHash, but this requires patching Qt. - # For now luckily there is a test mode that forces a fixed seed. + WRAP_DIR=$HOME/wrapped + HOSTS="x86_64-w64-mingw32 i686-w64-mingw32" + CONFIGFLAGS="--enable-upnp-default" + FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip" + FAKETIME_PROGS="date makensis zip" + export QT_RCC_TEST=1 - for BITS in 32 64; do # for architectures - # - STAGING=$HOME/staging${BITS} - BUILDDIR=$HOME/build${BITS} - BINDIR=$OUTDIR/$BITS - if [ "$BITS" == "32" ]; then - HOST=i686-w64-mingw32 - else - HOST=x86_64-w64-mingw32 - fi - export PATH=$STAGING/host/bin:$PATH - mkdir -p $STAGING $BUILDDIR $BINDIR - # - cd $STAGING - unzip $INDIR/qt-win${BITS}-5.2.0-gitian-r3.zip - unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip - unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r16.zip - unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip - if [ "$NEEDDIST" == "1" ]; then - # Make source code archive which is architecture independent so it only needs to be done once - cd $HOME/build/dash - ./autogen.sh - ./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=dash ${OPTFLAGS}" - make dist - DISTNAME=`echo dash-*.tar.gz` - NEEDDIST=0 - fi - # Build platform-dependent executables from source archive - cd $BUILDDIR - mkdir -p distsrc - cd distsrc - tar --strip-components=1 -xf $HOME/build/dash/$DISTNAME - ./configure --enable-upnp-default --bindir=$BINDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=dash ${OPTFLAGS}" - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - make $MAKEOPTS + export GZIP="-9n" + export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" + export TZ="UTC" + export BUILD_DIR=`pwd` + mkdir -p ${WRAP_DIR} + if test -n "$GBUILD_CACHE_ENABLED"; then + export SOURCES_PATH=${GBUILD_COMMON_CACHE} + export BASE_CACHE=${GBUILD_PACKAGE_CACHE} + mkdir -p ${BASE_CACHE} ${SOURCES_PATH} + fi + + # Create global faketime wrappers + for prog in ${FAKETIME_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${prog} + chmod +x ${WRAP_DIR}/${prog} + done + + # Create per-host faketime wrappers + for i in $HOSTS; do + for prog in ${FAKETIME_HOST_PROGS}; do + echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} + echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} + echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog} + echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + chmod +x ${WRAP_DIR}/${i}-${prog} + done + done + export PATH=${WRAP_DIR}:${PATH} + + cd dash + BASEPREFIX=`pwd`/depends + # Build dependencies for each host + for i in $HOSTS; do + make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" + done + + # Create the release tarball using (arbitrarily) the first host + ./autogen.sh + ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` + make dist + SOURCEDIST=`echo dash-*.tar.gz` + DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` + + # Correct tar file order + mkdir -p temp + pushd temp + tar xf ../$SOURCEDIST + find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + popd + + ORIGPATH="$PATH" + # Extract the release tarball into a dir for each host and build + for i in ${HOSTS}; do + export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} + mkdir -p distsrc-${i} + cd distsrc-${i} + INSTALLPATH=`pwd`/installed/${DISTNAME} + mkdir -p ${INSTALLPATH} + tar --strip-components=1 -xf ../$SOURCEDIST + + ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} + make ${MAKEOPTS} make deploy make install-strip - cp -f dash-*setup*.exe $BINDIR/ - unset LD_PRELOAD - unset FAKETIME - done # for BITS in - - # sort distribution tar file and normalize user/group/mtime information for deterministic output + cp -f dash-*setup*.exe $OUTDIR/ + cd installed + mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/ + find . -name "lib*.la" -delete + find . -name "lib*.a" -delete + rm -rf ${DISTNAME}/lib/pkgconfig + find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip + cd ../.. + done mkdir -p $OUTDIR/src - rm -rf $TEMPDIR - mkdir -p $TEMPDIR - cd $TEMPDIR - tar -xvf $HOME/build/dash/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME - + mv $SOURCEDIST $OUTDIR/src + mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip + mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip diff --git a/contrib/gitian-descriptors/protobuf-win.yml b/contrib/gitian-descriptors/protobuf-win.yml deleted file mode 100644 index d2fdcaa7f20e9..0000000000000 --- a/contrib/gitian-descriptors/protobuf-win.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: "protobuf-win32" -suites: -- "precise" -architectures: -- "amd64" -packages: -- "mingw-w64" -- "g++-mingw-w64" -- "zip" -- "faketime" -reference_datetime: "2013-04-15 00:00:00" -remotes: [] -files: -- "protobuf-2.5.0.tar.bz2" -script: | - # - export TZ=UTC - INDIR=$HOME/build - TEMPDIR=$HOME/tmp - OPTFLAGS="-O2" - # Integrity Check - echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c - - for BITS in 32 64; do # for architectures - # - INSTALLPREFIX=$HOME/staging${BITS} - BUILDDIR=$HOME/build${BITS} - if [ "$BITS" == "32" ]; then - HOST=i686-w64-mingw32 - else - HOST=x86_64-w64-mingw32 - fi - # - mkdir -p $INSTALLPREFIX $BUILDDIR - cd $BUILDDIR - # - tar xjf $INDIR/protobuf-2.5.0.tar.bz2 - cd protobuf-2.5.0 - # First: build a native (linux) protoc - ./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}" - make - mkdir -p $INSTALLPREFIX/host/bin - cp src/protoc $INSTALLPREFIX/host/bin - # Now recompile with the mingw cross-compiler: - make distclean - ./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}" - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - make - make install - # post-process all generated libraries to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $INSTALLPREFIX -name \*.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - $HOST-ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd $INSTALLPREFIX - find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip - unset LD_PRELOAD - unset FAKETIME - done # for BITS in diff --git a/contrib/gitian-descriptors/qt-linux.yml b/contrib/gitian-descriptors/qt-linux.yml deleted file mode 100644 index b163b4bb8c1f5..0000000000000 --- a/contrib/gitian-descriptors/qt-linux.yml +++ /dev/null @@ -1,264 +0,0 @@ ---- -name: "qt-linux" -suites: -- "precise" -architectures: -- "i386" -- "amd64" -packages: -- "zip" -- "unzip" -- "faketime" -- "unzip" -- "libxext-dev" -reference_datetime: "2011-01-30 00:00:00" -remotes: [] -files: -- "qt-everywhere-opensource-src-4.6.4.tar.gz" -script: | - export FAKETIME=$REFERENCE_DATETIME - export TZ=UTC - if [ "$GBUILD_BITS" == "32" ]; then - ARCH='i386-linux-gnu' - else - ARCH='x86_64-linux-gnu' - fi - # The purpose of this gitian build is not to actually build Qt, but to export - # the headers as well as pkgconfig files in a useable format so that we can - # pretend to link against an older version. The goal is to link to the - # system version of Qt 4. - # Also build development tools. - INSTALLPREFIX="$HOME/install" - # Integrity Check - echo "9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250 qt-everywhere-opensource-src-4.6.4.tar.gz" | sha256sum -c - # Make install directories - mkdir -p $INSTALLPREFIX - mkdir -p $INSTALLPREFIX/include - PKGCONFIGDIR=$INSTALLPREFIX/lib/pkgconfig - mkdir -p $PKGCONFIGDIR - # - tar xzf qt-everywhere-opensource-src-4.6.4.tar.gz - cd qt-everywhere-opensource-src-4.6.4 - QTBUILDDIR=$(pwd) - sed 's/TODAY=`date +%Y-%m-%d`/TODAY=2011-01-30/' -i configure - - # Need to build 4.6-versioned host utilities as well (lrelease/qrc/lupdate/...) - ./configure -prefix $INSTALLPREFIX -confirm-license -release -opensource -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs - # - make $MAKEOPTS -C src/tools install # (rcc, uic, moc) - make $MAKEOPTS -C tools/linguist/lrelease install # (lrelease) - # install includes and pkgconfig files - for DIR in src/corelib src/gui src/testlib src/dbus src/network; do - ( - cd $DIR - # extract module (QtCore/QtNetwork/...) from Makefile - MODULE=$(grep "QMAKE_TARGET *=" Makefile | cut -d = -f 2 | xargs) - # patch makefile so that not everything is build first - sed -i 's/first: all/first:/g' Makefile - make install_flat_headers install_class_headers install_targ_headers - # create and install pkgconfig descriptor - make ../../lib/pkgconfig/$MODULE.pc - sed -e "s,$QTBUILDDIR,$INSTALLPREFIX,g" ../../lib/pkgconfig/$MODULE.pc > $PKGCONFIGDIR/$MODULE.pc - # create links to existing Qt libraries - ln -sf /usr/lib/${ARCH}/lib${MODULE}.so.4 ${INSTALLPREFIX}/lib/lib${MODULE}.so - ) - done - - # Write our own configuration header, same as Ubuntu - # When we don't do this, the configuration will be without STL support (the QString from/to stdString methods) - QCONFIG=$INSTALLPREFIX/include/Qt/qconfig.h - echo ' - /* Qt Edition */ - #ifndef QT_EDITION - # define QT_EDITION QT_EDITION_OPENSOURCE - #endif - ' > $QCONFIG - - if [ "$GBUILD_BITS" == "32" ]; then - echo ' - /* Machine byte-order */ - #define Q_BIG_ENDIAN 4321 - #define Q_LITTLE_ENDIAN 1234 - #define QT_BUILD_KEY "i386 linux g++-4 full-config" - #define QT_BUILD_KEY_COMPAT "i686 Linux g++-4 full-config" - - #ifdef QT_BOOTSTRAPPED - #define Q_BYTE_ORDER Q_LITTLE_ENDIAN - #else - #define Q_BYTE_ORDER Q_LITTLE_ENDIAN - #endif - /* Machine Architecture */ - #ifndef QT_BOOTSTRAPPED - # define QT_ARCH_I386 - #else - # define QT_ARCH_I386 - #endif - /* Compile time features */ - #define QT_LARGEFILE_SUPPORT 64 - #define QT_POINTER_SIZE 4 - ' >> $QCONFIG - else - echo ' - /* Machine byte-order */ - #define Q_BIG_ENDIAN 4321 - #define Q_LITTLE_ENDIAN 1234 - #define QT_BUILD_KEY "x86_64 linux g++-4 full-config" - #define QT_BUILD_KEY_COMPAT "x86_64 Linux g++-4 full-config" - - #ifdef QT_BOOTSTRAPPED - #define Q_BYTE_ORDER Q_LITTLE_ENDIAN - #else - #define Q_BYTE_ORDER Q_LITTLE_ENDIAN - #endif - /* Machine Architecture */ - #ifndef QT_BOOTSTRAPPED - # define QT_ARCH_X86_64 - #else - # define QT_ARCH_X86_64 - #endif - /* Compile time features */ - #define QT_LARGEFILE_SUPPORT 64 - #define QT_POINTER_SIZE 8 - ' >> $QCONFIG - fi - - echo ' - #ifndef QT_BOOTSTRAPPED - - #if defined(QT_NO_EGL) && defined(QT_EGL) - # undef QT_NO_EGL - #elif !defined(QT_NO_EGL) && !defined(QT_EGL) - # define QT_NO_EGL - #endif - - #if defined(QT_NO_GSTREAMER) && defined(QT_GSTREAMER) - # undef QT_NO_GSTREAMER - #elif !defined(QT_NO_GSTREAMER) && !defined(QT_GSTREAMER) - # define QT_NO_GSTREAMER - #endif - - #if defined(QT_NO_ICD) && defined(QT_ICD) - # undef QT_NO_ICD - #elif !defined(QT_NO_ICD) && !defined(QT_ICD) - # define QT_NO_ICD - #endif - - #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG) - # undef QT_NO_IMAGEFORMAT_JPEG - #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG) - # define QT_NO_IMAGEFORMAT_JPEG - #endif - - #if defined(QT_NO_IMAGEFORMAT_MNG) && defined(QT_IMAGEFORMAT_MNG) - # undef QT_NO_IMAGEFORMAT_MNG - #elif !defined(QT_NO_IMAGEFORMAT_MNG) && !defined(QT_IMAGEFORMAT_MNG) - # define QT_NO_IMAGEFORMAT_MNG - #endif - - #if defined(QT_NO_IMAGEFORMAT_TIFF) && defined(QT_IMAGEFORMAT_TIFF) - # undef QT_NO_IMAGEFORMAT_TIFF - #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF) - # define QT_NO_IMAGEFORMAT_TIFF - #endif - - #if defined(QT_NO_MULTIMEDIA) && defined(QT_MULTIMEDIA) - # undef QT_NO_MULTIMEDIA - #elif !defined(QT_NO_MULTIMEDIA) && !defined(QT_MULTIMEDIA) - # define QT_NO_MULTIMEDIA - #endif - - #if defined(QT_NO_OPENVG) && defined(QT_OPENVG) - # undef QT_NO_OPENVG - #elif !defined(QT_NO_OPENVG) && !defined(QT_OPENVG) - # define QT_NO_OPENVG - #endif - - #if defined(QT_NO_PHONON) && defined(QT_PHONON) - # undef QT_NO_PHONON - #elif !defined(QT_NO_PHONON) && !defined(QT_PHONON) - # define QT_NO_PHONON - #endif - - #if defined(QT_NO_PULSEAUDIO) && defined(QT_PULSEAUDIO) - # undef QT_NO_PULSEAUDIO - #elif !defined(QT_NO_PULSEAUDIO) && !defined(QT_PULSEAUDIO) - # define QT_NO_PULSEAUDIO - #endif - - #if defined(QT_NO_S60) && defined(QT_S60) - # undef QT_NO_S60 - #elif !defined(QT_NO_S60) && !defined(QT_S60) - # define QT_NO_S60 - #endif - - #if defined(QT_NO_STYLE_S60) && defined(QT_STYLE_S60) - # undef QT_NO_STYLE_S60 - #elif !defined(QT_NO_STYLE_S60) && !defined(QT_STYLE_S60) - # define QT_NO_STYLE_S60 - #endif - - #if defined(QT_NO_SXE) && defined(QT_SXE) - # undef QT_NO_SXE - #elif !defined(QT_NO_SXE) && !defined(QT_SXE) - # define QT_NO_SXE - #endif - - #if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT) - # undef QT_NO_WEBKIT - #elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT) - # define QT_NO_WEBKIT - #endif - - #if defined(QT_NO_ZLIB) && defined(QT_ZLIB) - # undef QT_NO_ZLIB - #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB) - # define QT_NO_ZLIB - #endif - - #if defined(QT_RUNTIME_XCURSOR) && defined(QT_NO_RUNTIME_XCURSOR) - # undef QT_RUNTIME_XCURSOR - #elif !defined(QT_RUNTIME_XCURSOR) && !defined(QT_NO_RUNTIME_XCURSOR) - # define QT_RUNTIME_XCURSOR - #endif - - #if defined(QT_RUNTIME_XFIXES) && defined(QT_NO_RUNTIME_XFIXES) - # undef QT_RUNTIME_XFIXES - #elif !defined(QT_RUNTIME_XFIXES) && !defined(QT_NO_RUNTIME_XFIXES) - # define QT_RUNTIME_XFIXES - #endif - - #if defined(QT_RUNTIME_XINERAMA) && defined(QT_NO_RUNTIME_XINERAMA) - # undef QT_RUNTIME_XINERAMA - #elif !defined(QT_RUNTIME_XINERAMA) && !defined(QT_NO_RUNTIME_XINERAMA) - # define QT_RUNTIME_XINERAMA - #endif - - #if defined(QT_RUNTIME_XINPUT) && defined(QT_NO_RUNTIME_XINPUT) - # undef QT_RUNTIME_XINPUT - #elif !defined(QT_RUNTIME_XINPUT) && !defined(QT_NO_RUNTIME_XINPUT) - # define QT_RUNTIME_XINPUT - #endif - - #if defined(QT_RUNTIME_XRANDR) && defined(QT_NO_RUNTIME_XRANDR) - # undef QT_RUNTIME_XRANDR - #elif !defined(QT_RUNTIME_XRANDR) && !defined(QT_NO_RUNTIME_XRANDR) - # define QT_RUNTIME_XRANDR - #endif - - #if defined(QT_USE_MATH_H_FLOATS) && defined(QT_NO_USE_MATH_H_FLOATS) - # undef QT_USE_MATH_H_FLOATS - #elif !defined(QT_USE_MATH_H_FLOATS) && !defined(QT_NO_USE_MATH_H_FLOATS) - # define QT_USE_MATH_H_FLOATS - #endif - - #endif // QT_BOOTSTRAPPED - - #define QT_VISIBILITY_AVAILABLE - ' >> $QCONFIG - cp $QCONFIG $INSTALLPREFIX/include/QtCore/qconfig.h - - cd $INSTALLPREFIX - # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - # Create a .tar.gz because .zip has problems with symbolic links - find | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz diff --git a/contrib/gitian-descriptors/qt-win.yml b/contrib/gitian-descriptors/qt-win.yml deleted file mode 100644 index 6211d721aa6f2..0000000000000 --- a/contrib/gitian-descriptors/qt-win.yml +++ /dev/null @@ -1,92 +0,0 @@ ---- -name: "qt" -suites: -- "precise" -architectures: -- "amd64" -packages: -- "mingw-w64" -- "g++-mingw-w64" -- "zip" -- "unzip" -- "faketime" -- "libz-dev" -reference_datetime: "2011-01-30 00:00:00" -remotes: [] -files: -- "qt-everywhere-opensource-src-5.2.0.tar.gz" -- "bitcoin-deps-win32-gitian-r16.zip" -- "bitcoin-deps-win64-gitian-r16.zip" -script: | - # Defines - export TZ=UTC - INDIR=$HOME/build - TEMPDIR=$HOME/tmp - # Qt: workaround for determinism in resource ordering - # Qt5's rcc uses a QHash to store the files for the resource. - # A security fix in QHash makes the ordering of keys to be different on every run - # (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268). - # This is good in general but qrc shouldn't be doing a traversal over a randomized container. - # The thorough solution would be to use QMap instead of QHash, but this requires patching Qt. - # For now luckily there is a test mode that forces a fixed seed. - export QT_RCC_TEST=1 - # Integrity Check - echo "395ec72277c5786c65b8163ef5817fd03d0a1f524a6d47f53624baf8056f1081 qt-everywhere-opensource-src-5.2.0.tar.gz" | sha256sum -c - - for BITS in 32 64; do # for architectures - # - INSTALLPREFIX=$HOME/staging${BITS} - BUILDDIR=$HOME/build${BITS} - DEPSDIR=$HOME/deps${BITS} - if [ "$BITS" == "32" ]; then - HOST=i686-w64-mingw32 - else - HOST=x86_64-w64-mingw32 - fi - # - mkdir -p $INSTALLPREFIX $INSTALLPREFIX/host/bin $DEPSDIR $BUILDDIR - # - # Need mingw-compiled openssl from bitcoin-deps: - cd $DEPSDIR - unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r16.zip - # - cd $BUILDDIR - # - tar xzf $INDIR/qt-everywhere-opensource-src-5.2.0.tar.gz - cd qt-everywhere-opensource-src-5.2.0 - SPECNAME="win32-g++" - SPECFILE="qtbase/mkspecs/${SPECNAME}/qmake.conf" - sed 's/qt_instdate=`date +%Y-%m-%d`/qt_instdate=2011-01-30/' -i qtbase/configure - sed --posix "s|QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport|QMAKE_CFLAGS\t\t= -pipe -fno-keep-inline-dllexport -isystem /usr/$HOST/include/ -frandom-seed=qtbuild -I$DEPSDIR/include|" -i ${SPECFILE} - sed --posix "s|QMAKE_LFLAGS =|QMAKE_LFLAGS\t\t= -L$DEPSDIR/lib|" -i ${SPECFILE} - # Before we tried to pass arguments to ar (static linking) in using QMAKE_LIB, however - # qt removes the arguments for ar and provides a script which makes it impossible to pass the determinism flag - - # so rather than try to replace ar, post-process all libraries and plugins at the end. - # - # Don't load faketime while compiling Qt, qmake will get stuck in nearly infinite loops - #export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - #export FAKETIME=$REFERENCE_DATETIME - # - # Compile static libraries, and use statically linked openssl (-openssl-linked): - OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTALLPREFIX -bindir $INSTALLPREFIX/host/bin -confirm-license -release -opensource -static -xplatform $SPECNAME -device-option CROSS_COMPILE="$HOST-" -no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-odbc -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-opengl -no-compile-examples -no-feature-style-windowsce -no-feature-style-windowsmobile -no-qml-debug -openssl-linked -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc -system-libpng -system-zlib - make $MAKEOPTS install - # post-process all generated libraries and plugins to be deterministic - # extract them to a temporary directory then re-build them deterministically - for LIB in $(find $INSTALLPREFIX -name *.a); do - rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR - $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt - rm $LIB - $HOST-ar crsD $LIB $(cat /tmp/list.txt) - done - # - cd $INSTALLPREFIX - # Remove unused non-deterministic stuff - rm host/bin/qtpaths.exe lib/libQt5Bootstrap.a lib/libQt5Bootstrap.la - # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - find -print0 | xargs -r0 touch # fix up timestamps before packaging - find | sort | zip -X@ $OUTDIR/qt-win${BITS}-5.2.0-gitian-r3.zip - unset LD_PRELOAD - unset FAKETIME - done # for BITS in diff --git a/contrib/gitian-downloader/cfields-key.pgp b/contrib/gitian-downloader/cfields-key.pgp new file mode 100644 index 0000000000000..6b0bd240ba4cf --- /dev/null +++ b/contrib/gitian-downloader/cfields-key.pgp @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQINBFOHTh4BEADdKsRvmNhX+B+bcPsgMkp8ztwJA5g/rmrOlHQpKOOf4P2tAr6w +FmXCChWF9Iq3pDFQ0t0iq5rgisFPyrGVT/VToMmH+/PSLTyIdAlgkRYDMAPsMAFV +MaADH4yiAgJ3cdXtysjaNQV5O25ypqq6/obUjZJD5Enn6b/UgHe2+7LTmTNsskOx +5s/WPPht79EY1kM4JQfmDx68CsmqeSAlT6yeO3RQcLn/l46cfXiwzMO4h1hsZS1r +pgciRp0EHK9uAjF2rjqt8v4SDxwyTnwfpBBulzvH9mBf+HRXWzoTMR4sC/oOZext +hKAH/ex47BxN3HU3ftNhCK2c1xcU1UOGSjbf0RdbwuSCxxa7mktEDumvOxAk9EBB ++PDPv7jO1FBK3rsJdscYQIL0AiRyO49VfNLARa34OqUi8pOAxKBQ9plO02W1gp7a +DVBPI05TZ46Y8dTR2Bc1raAgOyxnXM7jfiQG2gSULiKAJAI4HwOiodaiiHAxDaIo +a3mtsmfN25TZUQuA0I0BvHbJvLRlVnyZm3XVOcwReKJpZJV4qRhd3XNrERZdz6ZK +cAZnyC/X+Uzo4HfnVSsJk1GpIa4seYyrVCFfHMiAA6SkgAUFbV26KCOv4rNR2GlV +l2fVhu1RKOEUJ8nRcEqf93SehRVYdI67LepIPgmIwi0KG4HhoTbIHDAKWQARAQAB +tCtDb3J5IEZpZWxkcyA8Y2ZpZWxkc0BiaXRjb2luZm91bmRhdGlvbi5vcmc+iQI4 +BBMBAgAiBQJTh04eAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAcJJH/ +6w73cBTiEADIGZSueBFmaOTJCgasKGguHns/n8P94EQBZr07rrgN99Rzp85WvDUN +Qa72wj3GNcAffN7aZlIWv4g+fjyr9AzHekjI/7iwwSYIfjfTR/xRUW7czRfKAOrK +iwpEzgv440i7PBvkS/AhNdUNkm+cJvaQUej/F2/O52qDLEpHuzvjAUUWlSeF9/oO +AjM9dfC24L5k5cVwQvH9noxk3EyuE7BuiGE5a+kKiORrtxiHeUG6GYQxuqrPucLU +fI67ETyXa0YSpYm5/O65BKMTMpmkMvv1JC2kqqsYTrO5p158CrKzq2xvpuG4ABsb +9KwICUGW31Ndr6TXwQJFa1b7VK4G1g6M1DFkVTOLJnEyOwgYxsXrV5QFpzpAOAji +6KcxNGeow1avAFYbqjjLgu9UNuq6b8du13hjkQxVs2NAP1Kd/u2ADwxQHMhZGVEC +9LIcLVSP9ShY6fR8m6fwSlJfpiV81uLNVD8KIyvp+pYTQ/FnxoPhPIwalYquBZKi +0u38igW75IzZ0fYvJgTumE/8ofSVkutVtrQb21eJclVrJGMNweTlJcJhAWdKkjDC +e6mSj8GItKV1ef+eusXSzs/wPyTaqgkELvvAOZdwUq3kobQErE5HOuPEOvcwuY96 +DcxLexirCGW5wCUq7Db0c0dUjQwzzb5OTW2jdnPVR0qxi29TnOJ2aLkCDQRTh04e +ARAAuJKpI6NTCQrjEqe9AYywN8676+fPS5bqXkyb/iub6MXeQdwpH0K42lXAaYMq +ow/0aLlvGWCHuJJGozoOWpTzQ+VPbhpdARoLCop5fYTpy8Q17ubLeeODDtr6jtDN +lmg+9PBIErIVUnUS2wNZuJRVsfwlLaU3T2v8kQnQ6AEbl/QwyWW9nB8rAWBu6Hvs +VdtcBmtHSr9xAGBGfW6rSVhTitikR4lWJPdNJxI3pLaswpLIUIQ1rssKO4glljcp +C6nhMvRkDLvDFvDP9QnmwY/A4ch5S6ANPrhOjQuu9njjQ+/ImrJTjAXqHwg5KdTc +NKxufgvi9elOQ422o0No3yKdRoRA4kdcUmqA9gNZDyX0ZTd17aNqc42Zt3aYLJ11 +bLZZp0qnfhkmhbsBZZtaLNkuF+RGPWysxY7KPMm+nHn6f3Wpr18E+T02wi02r4nS +HOQI+gppDqy3Vq3ZZNoUZynctiLZVHkqi+WYXqfD2tEn8UJKpht7jrZlNgkHFgT7 +T0/U4+JmaQ/HltE+IexAIH0GP0Jt6hmRoZimdoy8Q8NY5t/fn9CQNJm5InrHvooN +aFmZMvzGTGiTqBqnA/7k9FCUEG98LK11MsIssY8YE/F6HD69R3ISyRvhUbpFvhD8 +c6zOkEKngTWvyRevrDrDz2yoZ1+T1X350+92rbEc/8WyutcAEQEAAYkCHwQYAQIA +CQUCU4dOHgIbDAAKCRAcJJH/6w73cAakEACv4EUEjtFjqnGB0Lru5FKs1obWcf37 +c4a5yYvOw58dkEZ9hsq34qWGLT128n6R24KEG+3O4CbplAD5Kt2eAPracbPHMAn8 +TGmC+KjiGlBR5xCY9dD0fn5EbRWOa+Fdcj1DpneaqMl9vLnBbqGp7pa/MwSOc+FB +0Ms2rcGJJMNHgITfP22eCf6pvf/xq7kKbUJ3Kjqdc2hWlRMjC/OOeITdrgycfDk/ +AOzLNqk5q7bYOxna6rWDLGSkCATyQKaBTVK7wRd1VrIhI4vfFqy+BWYXyXJ0pxjS +eaCDwbWHX/KW+0qLsmHxFMAyHJPjs8LEwK/DRbmWhe1HzPcBKmpyjqlkuxPjAdSl +hP4+IBvVNLf2Kh3uFHehk9A6oCYZGe3lLfQnOxIantXF7IROTmiZZsb+08w6cIXE ++r6kWG6vP2aCVtzYNfY+2p5xfg3yMxcxENJki1WSCOq6WVf9IWFzSJu+0+eazD3L +3QpZoSX5VvT6x05C0Ay1ert0Q5MyF84Eh8mDqL4PhpWtQhZMp8SG4jqFVgrhM4sl +vWGYXGns4tbnNPiiksjBD8TTvG3+mt48sNJIpHThjdWJSZjllYG7jV8oi7HrX8M2 +LOwWWLYxHkqi9wpmrWHSmniex6ABozcqrb+EgSMnHuSd7glmOJxHToJIudJbKG5D +MrD0ofsytfy1LQ== +=DE4h +-----END PGP PUBLIC KEY BLOCK----- diff --git a/contrib/gitian-downloader/linux-download-config b/contrib/gitian-downloader/linux-download-config index b5e0561aa3be5..4c037795267dc 100644 --- a/contrib/gitian-downloader/linux-download-config +++ b/contrib/gitian-downloader/linux-download-config @@ -3,7 +3,7 @@ name: bitcoin urls: - http://bitcoin.org/bitcoin-latest-linux-gitian.zip rss: -- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss +- url: xpath: //item/link/text() pattern: bitcoin-\d+.\d+.\d+-linux-gitian.zip signers: @@ -37,3 +37,6 @@ signers: E944AE667CF960B1004BC32FCA662BE18B877A60: name: "Andreas Schildbach" key: aschildbach + C060A6635913D98A3587D7DB1C2491FFEB0EF770: + name: "Cory Fields" + key: "cfields" diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config index 5d56db863ead1..083bce5de815c 100644 --- a/contrib/gitian-downloader/win32-download-config +++ b/contrib/gitian-downloader/win32-download-config @@ -3,7 +3,7 @@ name: bitcoin urls: - http://bitcoin.org/bitcoin-latest-win32-gitian.zip rss: -- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss +- url: xpath: //item/link/text() pattern: bitcoin-\d+.\d+.\d+-win32-gitian.zip signers: @@ -37,3 +37,6 @@ signers: E944AE667CF960B1004BC32FCA662BE18B877A60: name: "Andreas Schildbach" key: aschildbach + C060A6635913D98A3587D7DB1C2491FFEB0EF770: + name: "Cory Fields" + key: "cfields" diff --git a/contrib/init/README.md b/contrib/init/README.md new file mode 100644 index 0000000000000..6b8e244a7faaf --- /dev/null +++ b/contrib/init/README.md @@ -0,0 +1,10 @@ +Sample configuration files for: + +SystemD: dashd.service +Upstart: dashd.conf +OpenRC: dashd.openrc + dashd.openrcconf + +have been made available to assist packagers in creating node packages here. + +See doc/init.md for more information. diff --git a/contrib/init/dashd.conf b/contrib/init/dashd.conf new file mode 100644 index 0000000000000..40b9b9a4f9862 --- /dev/null +++ b/contrib/init/dashd.conf @@ -0,0 +1,65 @@ +description "Dash Core Daemon" + +start on runlevel [2345] +stop on starting rc RUNLEVEL=[016] + +env BITCOIND_BIN="/usr/bin/dashd" +env BITCOIND_USER="dash" +env BITCOIND_GROUP="dash" +env BITCOIND_PIDDIR="/var/run/dashd" +# upstart can't handle variables constructed with other variables +env BITCOIND_PIDFILE="/var/run/dashd/dashd.pid" +env BITCOIND_CONFIGFILE="/etc/dash/dash.conf" +env BITCOIND_DATADIR="/var/lib/dashd" + +expect fork + +respawn +respawn limit 5 120 +kill timeout 60 + +pre-start script + # this will catch non-existent config files + # dashd will check and exit with this very warning, but it can do so + # long after forking, leaving upstart to think everything started fine. + # since this is a commonly encountered case on install, just check and + # warn here. + if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then + echo "ERROR: You must set a secure rpcpassword to run dashd." + echo "The setting must appear in $BITCOIND_CONFIGFILE" + echo + echo "This password is security critical to securing wallets " + echo "and must not be the same as the rpcuser setting." + echo "You can generate a suitable random password using the following" + echo "command from the shell:" + echo + echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" + echo + echo "It is also recommended that you also set alertnotify so you are " + echo "notified of problems:" + echo + echo "ie: alertnotify=echo %%s | mail -s \"Dash Alert\"" \ + "admin@foo.com" + echo + exit 1 + fi + + mkdir -p "$BITCOIND_PIDDIR" + chmod 0755 "$BITCOIND_PIDDIR" + chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_PIDDIR" + chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_CONFIGFILE" + chmod 0660 "$BITCOIND_CONFIGFILE" +end script + +exec start-stop-daemon \ + --start \ + --pidfile "$BITCOIND_PIDFILE" \ + --chuid $BITCOIND_USER:$BITCOIND_GROUP \ + --exec "$BITCOIND_BIN" \ + -- \ + -pid="$BITCOIND_PIDFILE" \ + -conf="$BITCOIND_CONFIGFILE" \ + -datadir="$BITCOIND_DATADIR" \ + -disablewallet \ + -daemon + diff --git a/contrib/init/dashd.openrc b/contrib/init/dashd.openrc new file mode 100644 index 0000000000000..b1b7144d87708 --- /dev/null +++ b/contrib/init/dashd.openrc @@ -0,0 +1,86 @@ +#!/sbin/runscript + +# backward compatibility for existing gentoo layout +# +if [ -d "/var/lib/dash/.dash" ]; then + BITCOIND_DEFAULT_DATADIR="/var/lib/dash/.dash" +else + BITCOIND_DEFAULT_DATADIR="/var/lib/dashd" +fi + +BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/dash/dash.conf} +BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/dashd} +BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/dashd.pid} +BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}} +BITCOIND_USER=${BITCOIND_USER:-dash} +BITCOIND_GROUP=${BITCOIND_GROUP:-dash} +BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/dashd} + +name="Dash Core Daemon" +description="Dash crypto-currency p2p network daemon" + +command="/usr/bin/dashd" +command_args="-pid=\"${BITCOIND_PIDFILE}\" \ + -conf=\"${BITCOIND_CONFIGFILE}\" \ + -datadir=\"${BITCOIND_DATADIR}\" \ + -daemon \ + ${BITCOIND_OPTS}" + +required_files="${BITCOIND_CONFIGFILE}" +start_stop_daemon_args="-u ${BITCOIND_USER} \ + -N ${BITCOIND_NICE:-0} -w 2000" +pidfile="${BITCOIND_PIDFILE}" +retry=60 + +depend() { + need localmount net +} + +# verify +# 1) that the datadir exists and is writable (or create it) +# 2) that a directory for the pid exists and is writable +# 3) ownership and permissions on the config file +start_pre() { + checkpath \ + -d \ + --mode 0750 \ + --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ + "${BITCOIND_DATADIR}" + + checkpath \ + -d \ + --mode 0755 \ + --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ + "${BITCOIND_PIDDIR}" + + checkpath -f \ + -o ${BITCOIND_USER}:${BITCOIND_GROUP} \ + -m 0660 \ + ${BITCOIND_CONFIGFILE} + + checkconfig || return 1 +} + +checkconfig() +{ + if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then + eerror "" + eerror "ERROR: You must set a secure rpcpassword to run dashd." + eerror "The setting must appear in ${BITCOIND_CONFIGFILE}" + eerror "" + eerror "This password is security critical to securing wallets " + eerror "and must not be the same as the rpcuser setting." + eerror "You can generate a suitable random password using the following" + eerror "command from the shell:" + eerror "" + eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" + eerror "" + eerror "It is also recommended that you also set alertnotify so you are " + eerror "notified of problems:" + eerror "" + eerror "ie: alertnotify=echo %%s | mail -s \"Dash Alert\"" \ + "admin@foo.com" + eerror "" + return 1 + fi +} diff --git a/contrib/init/dashd.openrcconf b/contrib/init/dashd.openrcconf new file mode 100644 index 0000000000000..05f033ae8ec05 --- /dev/null +++ b/contrib/init/dashd.openrcconf @@ -0,0 +1,27 @@ +# /etc/conf.d/dashd: config file for /etc/init.d/dashd + +# Config file location +#BITCOIND_CONFIGFILE="/etc/dash/dash.conf" + +# What directory to write pidfile to? (created and owned by $BITCOIND_USER) +#BITCOIND_PIDDIR="/var/run/dashd" + +# What filename to give the pidfile +#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/dashd.pid" + +# Where to write dashd data (be mindful that the blockchain is large) +#BITCOIND_DATADIR="/var/lib/dashd" + +# User and group to own dashd process +#BITCOIND_USER="dash" +#BITCOIND_GROUP="dash" + +# Path to dashd executable +#BITCOIND_BIN="/usr/bin/dashd" + +# Nice value to run dashd under +#BITCOIND_NICE=0 + +# Additional options (avoid -conf and -datadir, use flags above) +BITCOIND_OPTS="-disablewallet" + diff --git a/contrib/init/dashd.service b/contrib/init/dashd.service new file mode 100644 index 0000000000000..732ac647d38a1 --- /dev/null +++ b/contrib/init/dashd.service @@ -0,0 +1,22 @@ +[Unit] +Description=Dash's distributed currency daemon +After=network.target + +[Service] +User=dash +Group=dash + +Type=forking +PIDFile=/var/lib/dashd/dashd.pid +ExecStart=/usr/bin/dashd -daemon -pid=/var/lib/dashd/dashd.pid \ +-conf=/etc/dash/dash.conf -datadir=/var/lib/dashd -disablewallet + +Restart=always +PrivateTmp=true +TimeoutStopSec=60s +TimeoutStartSec=2s +StartLimitInterval=120s +StartLimitBurst=5 + +[Install] +WantedBy=multi-user.target diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md index 70b9f034cdf05..157586e4d4e0a 100644 --- a/contrib/linearize/README.md +++ b/contrib/linearize/README.md @@ -1,2 +1,33 @@ -### Linearize ### -Construct a linear, no-fork, best version of the blockchain. \ No newline at end of file +# Linearize +Construct a linear, no-fork, best version of the blockchain. + +## Step 1: Download hash list + + $ ./linearize-hashes.py linearize.cfg > hashlist.txt + +Required configuration file settings for linearize-hashes: +* RPC: rpcuser, rpcpassword + +Optional config file setting for linearize-hashes: +* RPC: host, port +* Block chain: min_height, max_height + +## Step 2: Copy local block data + + $ ./linearize-data.py linearize.cfg + +Required configuration file settings: +* "input": bitcoind blocks/ directory containing blkNNNNN.dat +* "hashlist": text file containing list of block hashes, linearized-hashes.py +output. +* "output_file": bootstrap.dat + or +* "output": output directory for linearized blocks/blkNNNNN.dat output + +Optional config file setting for linearize-data: +* "netmagic": network magic number +* "max_out_sz": maximum output file size (default 1000*1000*1000) +* "split_timestamp": Split files when a new month is first seen, in addition to +reaching a maximum file size. +* "file_timestamp": Set each file's last-modified time to that of the +most recent block in that file. diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index 4246e129838d2..9c0824ee1f261 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -1,12 +1,19 @@ -# bitcoind RPC settings +# bitcoind RPC settings (linearize-hashes) rpcuser=someuser rpcpassword=somepassword host=127.0.0.1 port=9998 -# bootstrap.dat settings +# bootstrap.dat hashlist settings (linearize-hashes) +max_height=313000 + +# bootstrap.dat input/output settings (linearize-data) netmagic=f9beb4d9 -max_height=279000 -output=bootstrap.dat +input=/home/example/.bitcoin/blocks +output_file=/home/example/Downloads/bootstrap.dat +hashlist=hashlist.txt +split_year=1 +# Maxmimum size in bytes of out-of-order blocks cache in memory +out_of_order_cache_sz = 100000000 diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py new file mode 100755 index 0000000000000..2dac3a614b031 --- /dev/null +++ b/contrib/linearize/linearize-data.py @@ -0,0 +1,299 @@ +#!/usr/bin/python +# +# linearize-data.py: Construct a linear, no-fork version of the chain. +# +# Copyright (c) 2013-2014 The Bitcoin developers +# Distributed under the MIT/X11 software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# + +from __future__ import print_function, division +import json +import struct +import re +import os +import base64 +import httplib +import sys +import hashlib +import datetime +import time +from collections import namedtuple + +settings = {} + +def uint32(x): + return x & 0xffffffffL + +def bytereverse(x): + return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) | + (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )) + +def bufreverse(in_buf): + out_words = [] + for i in range(0, len(in_buf), 4): + word = struct.unpack('@I', in_buf[i:i+4])[0] + out_words.append(struct.pack('@I', bytereverse(word))) + return ''.join(out_words) + +def wordreverse(in_buf): + out_words = [] + for i in range(0, len(in_buf), 4): + out_words.append(in_buf[i:i+4]) + out_words.reverse() + return ''.join(out_words) + +def calc_hdr_hash(blk_hdr): + hash1 = hashlib.sha256() + hash1.update(blk_hdr) + hash1_o = hash1.digest() + + hash2 = hashlib.sha256() + hash2.update(hash1_o) + hash2_o = hash2.digest() + + return hash2_o + +def calc_hash_str(blk_hdr): + hash = calc_hdr_hash(blk_hdr) + hash = bufreverse(hash) + hash = wordreverse(hash) + hash_str = hash.encode('hex') + return hash_str + +def get_blk_dt(blk_hdr): + members = struct.unpack(" self.maxOutSz): + self.outF.close() + if self.setFileTime: + os.utime(outFname, (int(time.time()), highTS)) + self.outF = None + self.outFname = None + self.outFn = outFn + 1 + self.outsz = 0 + + (blkDate, blkTS) = get_blk_dt(blk_hdr) + if self.timestampSplit and (blkDate > self.lastDate): + print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str) + lastDate = blkDate + if outF: + outF.close() + if setFileTime: + os.utime(outFname, (int(time.time()), highTS)) + self.outF = None + self.outFname = None + self.outFn = self.outFn + 1 + self.outsz = 0 + + if not self.outF: + if self.fileOutput: + outFname = self.settings['output_file'] + else: + outFname = "%s/blk%05d.dat" % (self.settings['output'], outFn) + print("Output file" + outFname) + self.outF = open(outFname, "wb") + + self.outF.write(inhdr) + self.outF.write(blk_hdr) + self.outF.write(rawblock) + self.outsz = self.outsz + len(inhdr) + len(blk_hdr) + len(rawblock) + + self.blkCountOut = self.blkCountOut + 1 + if blkTS > self.highTS: + self.highTS = blkTS + + if (self.blkCountOut % 1000) == 0: + print('%i blocks scanned, %i blocks written (of %i, %.1f%% complete)' % + (self.blkCountIn, self.blkCountOut, len(self.blkindex), 100.0 * self.blkCountOut / len(self.blkindex))) + + def inFileName(self, fn): + return "%s/blk%05d.dat" % (self.settings['input'], fn) + + def fetchBlock(self, extent): + '''Fetch block contents from disk given extents''' + with open(self.inFileName(extent.fn), "rb") as f: + f.seek(extent.offset) + return f.read(extent.size) + + def copyOneBlock(self): + '''Find the next block to be written in the input, and copy it to the output.''' + extent = self.blockExtents.pop(self.blkCountOut) + if self.blkCountOut in self.outOfOrderData: + # If the data is cached, use it from memory and remove from the cache + rawblock = self.outOfOrderData.pop(self.blkCountOut) + self.outOfOrderSize -= len(rawblock) + else: # Otherwise look up data on disk + rawblock = self.fetchBlock(extent) + + self.writeBlock(extent.inhdr, extent.blkhdr, rawblock) + + def run(self): + while self.blkCountOut < len(self.blkindex): + if not self.inF: + fname = self.inFileName(self.inFn) + print("Input file" + fname) + try: + self.inF = open(fname, "rb") + except IOError: + print("Premature end of block data") + return + + inhdr = self.inF.read(8) + if (not inhdr or (inhdr[0] == "\0")): + self.inF.close() + self.inF = None + self.inFn = self.inFn + 1 + continue + + inMagic = inhdr[:4] + if (inMagic != self.settings['netmagic']): + print("Invalid magic:" + inMagic) + return + inLenLE = inhdr[4:] + su = struct.unpack(" " + exit 1 +fi + +if [ -z "$SIGNATURE" ]; then + echo "usage: $0 " + exit 1 +fi + +rm -rf ${TEMPDIR} && mkdir -p ${TEMPDIR} +tar -C ${TEMPDIR} -xf ${UNSIGNED} +tar -C ${TEMPDIR} -xf ${SIGNATURE} + +if [ -z "${PAGESTUFF}" ]; then + PAGESTUFF=${TEMPDIR}/pagestuff +fi + +if [ -z "${CODESIGN_ALLOCATE}" ]; then + CODESIGN_ALLOCATE=${TEMPDIR}/codesign_allocate +fi + +for i in `find ${TEMPDIR} -name "*.sign"`; do + SIZE=`stat -c %s ${i}` + TARGET_FILE=`echo ${i} | sed 's/\.sign$//'` + + echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}" + ${CODESIGN_ALLOCATE} -i ${TARGET_FILE} -a ${ARCH} ${SIZE} -o ${i}.tmp + + OFFSET=`${PAGESTUFF} ${i}.tmp -p | tail -2 | grep offset | sed 's/[^0-9]*//g'` + if [ -z ${QUIET} ]; then + echo "Attaching signature at offset ${OFFSET}" + fi + + dd if=$i of=${i}.tmp bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null + mv ${i}.tmp ${TARGET_FILE} + rm ${i} + echo "Success." +done +mv ${TEMPDIR}/${ROOTDIR} ${OUTDIR} +rm -rf ${TEMPDIR} +echo "Signed: ${OUTDIR}" diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh new file mode 100755 index 0000000000000..200b71ce44e83 --- /dev/null +++ b/contrib/macdeploy/detached-sig-create.sh @@ -0,0 +1,46 @@ +#!/bin/sh +set -e + +ROOTDIR=dist +BUNDLE=${ROOTDIR}/Dash-Qt.app +CODESIGN=codesign +TEMPDIR=sign.temp +TEMPLIST=${TEMPDIR}/signatures.txt +OUT=signature.tar.gz + +if [ ! -n "$1" ]; then + echo "usage: $0 " + echo "example: $0 -s MyIdentity" + exit 1 +fi + +rm -rf ${TEMPDIR} ${TEMPLIST} +mkdir -p ${TEMPDIR} + +${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}" + +for i in `grep -v CodeResources ${TEMPLIST}`; do + TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`" + SIZE=`pagestuff $i -p | tail -2 | grep size | sed 's/[^0-9]*//g'` + OFFSET=`pagestuff $i -p | tail -2 | grep offset | sed 's/[^0-9]*//g'` + SIGNFILE="${TEMPDIR}/${TARGETFILE}.sign" + DIRNAME="`dirname ${SIGNFILE}`" + mkdir -p "${DIRNAME}" + echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}" + dd if=$i of=${SIGNFILE} bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null +done + +for i in `grep CodeResources ${TEMPLIST}`; do + TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`" + RESOURCE="${TEMPDIR}/${TARGETFILE}" + DIRNAME="`dirname "${RESOURCE}"`" + mkdir -p "${DIRNAME}" + echo "Adding resource for: "${TARGETFILE}"" + cp "${i}" "${RESOURCE}" +done + +rm ${TEMPLIST} + +tar -C ${TEMPDIR} -czf ${OUT} . +rm -rf ${TEMPDIR} +echo "Created ${OUT}" diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index e462ea03271eb..a3358033af8a2 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -17,9 +17,8 @@ # along with this program. If not, see . # -import subprocess, sys, re, os, shutil, stat, os.path +import subprocess, sys, re, os, shutil, stat, os.path, time from string import Template -from time import sleep from argparse import ArgumentParser # This is ported from the original macdeployqt with modifications @@ -332,7 +331,7 @@ def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploym # Get the Qt path from one of the Qt frameworks if deploymentInfo.qtPath is None and framework.isQtFramework(): deploymentInfo.detectQtPath(framework.frameworkDirectory) - + if framework.installName.startswith("@executable_path") or framework.installName.startswith(bundlePath): if verbose >= 2: print framework.frameworkName, "already deployed, skipping." @@ -394,7 +393,7 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose): # Deploy the script plugins only if QtScript is in use if not deploymentInfo.usesFramework("QtScript"): continue - elif pluginDirectory == "qmltooling": + elif pluginDirectory == "qmltooling" or pluginDirectory == "qml1tooling": # Deploy the qml plugins only if QtDeclarative is in use if not deploymentInfo.usesFramework("QtDeclarative"): continue @@ -402,6 +401,22 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose): # Deploy the bearer plugins only if QtNetwork is in use if not deploymentInfo.usesFramework("QtNetwork"): continue + elif pluginDirectory == "position": + # Deploy the position plugins only if QtPositioning is in use + if not deploymentInfo.usesFramework("QtPositioning"): + continue + elif pluginDirectory == "sensors" or pluginDirectory == "sensorgestures": + # Deploy the sensor plugins only if QtSensors is in use + if not deploymentInfo.usesFramework("QtSensors"): + continue + elif pluginDirectory == "audio" or pluginDirectory == "playlistformats": + # Deploy the audio plugins only if QtMultimedia is in use + if not deploymentInfo.usesFramework("QtMultimedia"): + continue + elif pluginDirectory == "mediaservice": + # Deploy the mediaservice plugins only if QtMultimediaWidgets is in use + if not deploymentInfo.usesFramework("QtMultimediaWidgets"): + continue for pluginName in filenames: pluginPath = os.path.join(pluginDirectory, pluginName) @@ -420,6 +435,10 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose): # Deploy the opengl graphicssystem plugin only if QtOpenGL is in use if not deploymentInfo.usesFramework("QtOpenGL"): continue + elif pluginPath == "accessible/libqtaccessiblequick.dylib": + # Deploy the accessible qtquick plugin only if QtQuick is in use + if not deploymentInfo.usesFramework("QtQuick"): + continue plugins.append((pluginDirectory, pluginName)) @@ -474,6 +493,7 @@ ap.add_argument("-sign", dest="sign", action="store_true", default=False, help=" ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used") ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work") ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's ressources; the language list must be separated with commas, not with whitespace") +ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translation files") ap.add_argument("-add-resources", nargs="+", metavar="path", default=[], help="list of additional files or folders to be copied into the bundle's resources; must be the last argument") config = ap.parse_args() @@ -492,6 +512,15 @@ if not os.path.exists(app_bundle): app_bundle_name = os.path.splitext(os.path.basename(app_bundle))[0] # ------------------------------------------------ +translations_dir = None +if config.translations_dir and config.translations_dir[0]: + if os.path.exists(config.translations_dir[0]): + translations_dir = config.translations_dir[0] + else: + if verbose >= 1: + sys.stderr.write("Error: Could not find translation dir \"%s\"\n" % (translations_dir)) + sys.exit(1) +# ------------------------------------------------ for p in config.add_resources: if verbose >= 3: @@ -512,17 +541,7 @@ if len(config.fancy) == 1: if verbose >= 1: sys.stderr.write("Error: Could not import plistlib which is required for fancy disk images.\n") sys.exit(1) - - if verbose >= 3: - print "Fancy: Importing appscript..." - try: - import appscript - except ImportError: - if verbose >= 1: - sys.stderr.write("Error: Could not import appscript which is required for fancy disk images.\n") - sys.stderr.write("Please install it e.g. with \"sudo easy_install appscript\".\n") - sys.exit(1) - + p = config.fancy[0] if verbose >= 3: print "Fancy: Loading \"%s\"..." % p @@ -625,7 +644,14 @@ if config.plugins: if len(config.add_qt_tr) == 0: add_qt_tr = [] else: - qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations") + if translations_dir is not None: + qt_tr_dir = translations_dir + else: + if deploymentInfo.qtPath is not None: + qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations") + else: + sys.stderr.write("Error: Could not find Qt translation path\n") + sys.exit(1) add_qt_tr = ["qt_%s.qm" % lng for lng in config.add_qt_tr[0].split(",")] for lng_file in add_qt_tr: p = os.path.join(qt_tr_dir, lng_file) @@ -839,7 +865,8 @@ if config.dmg is not None: if verbose >= 2: print "+ Finalizing .dmg disk image +" - + time.sleep(5) + try: runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True) except subprocess.CalledProcessError as e: diff --git a/contrib/pyminer/README.md b/contrib/pyminer/README.md deleted file mode 100644 index 3b20f2fdeac1f..0000000000000 --- a/contrib/pyminer/README.md +++ /dev/null @@ -1,8 +0,0 @@ -### PyMiner ### - -This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow. The purpose is to provide a reference implementation of a miner, for study. - -### Other Resources ### - -- [BitcoinTalk Thread](https://bitcointalk.org/index.php?topic=3546.0) -- [Jgarzik Repo](https://github.com/jgarzik/pyminer) \ No newline at end of file diff --git a/contrib/pyminer/example-config.cfg b/contrib/pyminer/example-config.cfg deleted file mode 100644 index 53838838eaac8..0000000000000 --- a/contrib/pyminer/example-config.cfg +++ /dev/null @@ -1,32 +0,0 @@ - -# -# RPC login details -# -host=127.0.0.1 -port=9998 - -rpcuser=myusername -rpcpass=mypass - - -# -# mining details -# - -threads=4 - -# periodic rate for requesting new work, if solution not found -scantime=60 - - -# -# misc. -# - -# not really used right now -logdir=/tmp/pyminer - -# set to 1, to enable hashmeter output -hashmeter=0 - - diff --git a/contrib/pyminer/pyminer.py b/contrib/pyminer/pyminer.py deleted file mode 100755 index 74b2304795d52..0000000000000 --- a/contrib/pyminer/pyminer.py +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/python -# -# Copyright (c) 2011 The Bitcoin developers -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -# - -import time -import json -import pprint -import hashlib -import struct -import re -import base64 -import httplib -import sys -from multiprocessing import Process - -ERR_SLEEP = 15 -MAX_NONCE = 1000000L - -settings = {} -pp = pprint.PrettyPrinter(indent=4) - -class BitcoinRPC: - OBJID = 1 - - def __init__(self, host, port, username, password): - authpair = "%s:%s" % (username, password) - self.authhdr = "Basic %s" % (base64.b64encode(authpair)) - self.conn = httplib.HTTPConnection(host, port, False, 30) - def rpc(self, method, params=None): - self.OBJID += 1 - obj = { 'version' : '1.1', - 'method' : method, - 'id' : self.OBJID } - if params is None: - obj['params'] = [] - else: - obj['params'] = params - self.conn.request('POST', '/', json.dumps(obj), - { 'Authorization' : self.authhdr, - 'Content-type' : 'application/json' }) - - resp = self.conn.getresponse() - if resp is None: - print "JSON-RPC: no response" - return None - - body = resp.read() - resp_obj = json.loads(body) - if resp_obj is None: - print "JSON-RPC: cannot JSON-decode body" - return None - if 'error' in resp_obj and resp_obj['error'] != None: - return resp_obj['error'] - if 'result' not in resp_obj: - print "JSON-RPC: no result in object" - return None - - return resp_obj['result'] - def getblockcount(self): - return self.rpc('getblockcount') - def getwork(self, data=None): - return self.rpc('getwork', data) - -def uint32(x): - return x & 0xffffffffL - -def bytereverse(x): - return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) | - (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )) - -def bufreverse(in_buf): - out_words = [] - for i in range(0, len(in_buf), 4): - word = struct.unpack('@I', in_buf[i:i+4])[0] - out_words.append(struct.pack('@I', bytereverse(word))) - return ''.join(out_words) - -def wordreverse(in_buf): - out_words = [] - for i in range(0, len(in_buf), 4): - out_words.append(in_buf[i:i+4]) - out_words.reverse() - return ''.join(out_words) - -class Miner: - def __init__(self, id): - self.id = id - self.max_nonce = MAX_NONCE - - def work(self, datastr, targetstr): - # decode work data hex string to binary - static_data = datastr.decode('hex') - static_data = bufreverse(static_data) - - # the first 76b of 80b do not change - blk_hdr = static_data[:76] - - # decode 256-bit target value - targetbin = targetstr.decode('hex') - targetbin = targetbin[::-1] # byte-swap and dword-swap - targetbin_str = targetbin.encode('hex') - target = long(targetbin_str, 16) - - # pre-hash first 76b of block header - static_hash = hashlib.sha256() - static_hash.update(blk_hdr) - - for nonce in xrange(self.max_nonce): - - # encode 32-bit nonce value - nonce_bin = struct.pack(" Upstream RPC result:", result - - def iterate(self, rpc): - work = rpc.getwork() - if work is None: - time.sleep(ERR_SLEEP) - return - if 'data' not in work or 'target' not in work: - time.sleep(ERR_SLEEP) - return - - time_start = time.time() - - (hashes_done, nonce_bin) = self.work(work['data'], - work['target']) - - time_end = time.time() - time_diff = time_end - time_start - - self.max_nonce = long( - (hashes_done * settings['scantime']) / time_diff) - if self.max_nonce > 0xfffffffaL: - self.max_nonce = 0xfffffffaL - - if settings['hashmeter']: - print "HashMeter(%d): %d hashes, %.2f Khash/sec" % ( - self.id, hashes_done, - (hashes_done / 1000.0) / time_diff) - - if nonce_bin is not None: - self.submit_work(rpc, work['data'], nonce_bin) - - def loop(self): - rpc = BitcoinRPC(settings['host'], settings['port'], - settings['rpcuser'], settings['rpcpass']) - if rpc is None: - return - - while True: - self.iterate(rpc) - -def miner_thread(id): - miner = Miner(id) - miner.loop() - -if __name__ == '__main__': - if len(sys.argv) != 2: - print "Usage: pyminer.py CONFIG-FILE" - sys.exit(1) - - f = open(sys.argv[1]) - for line in f: - # skip comment lines - m = re.search('^\s*#', line) - if m: - continue - - # parse key=value lines - m = re.search('^(\w+)\s*=\s*(\S.*)$', line) - if m is None: - continue - settings[m.group(1)] = m.group(2) - f.close() - - if 'host' not in settings: - settings['host'] = '127.0.0.1' - if 'port' not in settings: - settings['port'] = 9998 - if 'threads' not in settings: - settings['threads'] = 1 - if 'hashmeter' not in settings: - settings['hashmeter'] = 0 - if 'scantime' not in settings: - settings['scantime'] = 30L - if 'rpcuser' not in settings or 'rpcpass' not in settings: - print "Missing username and/or password in cfg file" - sys.exit(1) - - settings['port'] = int(settings['port']) - settings['threads'] = int(settings['threads']) - settings['hashmeter'] = int(settings['hashmeter']) - settings['scantime'] = long(settings['scantime']) - - thr_list = [] - for thr_id in range(settings['threads']): - p = Process(target=miner_thread, args=(thr_id,)) - p.start() - thr_list.append(p) - time.sleep(1) # stagger threads - - print settings['threads'], "mining threads started" - - print time.asctime(), "Miner Starts - %s:%s" % (settings['host'], settings['port']) - try: - for thr_proc in thr_list: - thr_proc.join() - except KeyboardInterrupt: - pass - print time.asctime(), "Miner Stops - %s:%s" % (settings['host'], settings['port']) - diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md index f9a0c277e2e7f..bc88201f0faec 100644 --- a/contrib/seeds/README.md +++ b/contrib/seeds/README.md @@ -1,11 +1,8 @@ ### Seeds ### -Utility to generate the pnSeed[] array that is compiled into the client -(see [src/net.cpp](/src/net.cpp)). +Utility to generate the seeds.txt list that is compiled into the client +(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and [share/seeds](/share/seeds)). -The 600 seeds compiled into the 0.8 release were created from sipa's DNS seed data, like this: +The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this: - curl -s http://bitcoin.sipa.be/seeds.txt | head -1000 | makeseeds.py - -The input to makeseeds.py is assumed to be approximately sorted from most-reliable to least-reliable, -with IP:port first on each line (lines that don't match IPv4:port are ignored). + curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index a34e3c2be71ec..253970792891d 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -1,32 +1,118 @@ #!/usr/bin/env python # -# Generate pnSeed[] from Pieter's DNS seeder +# Generate seeds.txt from Pieter's DNS seeder # -NSEEDS=600 +NSEEDS=512 + +MAX_SEEDS_PER_ASN=2 + +MIN_BLOCKS = 200000 + +# These are hosts that have been observed to be behaving strangely (e.g. +# aggressively connecting to every node). +SUSPICIOUS_HOSTS = set([ + "130.211.129.106", "178.63.107.226", + "83.81.130.26", "88.198.17.7", "148.251.238.178", "176.9.46.6", + "54.173.72.127", "54.174.10.182", "54.183.64.54", "54.194.231.211", + "54.66.214.167", "54.66.220.137", "54.67.33.14", "54.77.251.214", + "54.94.195.96", "54.94.200.247" +]) import re import sys -from subprocess import check_output +import dns.resolver + +PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):9999$") +PATTERN_AGENT = re.compile(r"^(\/Satoshi:0.8.6\/|\/Satoshi:0.9.(2|3)\/|\/Core:0.1(0|1|2).\d{1,2}.\d{1,2}\/)$") + +def parseline(line): + sline = line.split() + if len(sline) < 11: + return None + # Match only IPv4 + m = PATTERN_IPV4.match(sline[0]) + if m is None: + return None + # Do IPv4 sanity check + ip = 0 + for i in range(0,4): + if int(m.group(i+2)) < 0 or int(m.group(i+2)) > 255: + return None + ip = ip + (int(m.group(i+2)) << (8*(3-i))) + if ip == 0: + return None + # Skip bad results. + if sline[1] == 0: + return None + # Extract uptime %. + uptime30 = float(sline[7][:-1]) + # Extract Unix timestamp of last success. + lastsuccess = int(sline[2]) + # Extract protocol version. + version = int(sline[10]) + # Extract user agent. + agent = sline[11][1:-1] + # Extract service flags. + service = int(sline[9], 16) + # Extract blocks. + blocks = int(sline[8]) + # Construct result. + return { + 'ip': m.group(1), + 'ipnum': ip, + 'uptime': uptime30, + 'lastsuccess': lastsuccess, + 'version': version, + 'agent': agent, + 'service': service, + 'blocks': blocks, + } + +# Based on Greg Maxwell's seed_filter.py +def filterbyasn(ips, max_per_asn, max_total): + result = [] + asn_count = {} + for ip in ips: + if len(result) == max_total: + break + try: + asn = int([x.to_text() for x in dns.resolver.query('.'.join(reversed(ip['ip'].split('.'))) + '.origin.asn.cymru.com', 'TXT').response.answer][0].split('\"')[1].split(' ')[0]) + if asn not in asn_count: + asn_count[asn] = 0 + if asn_count[asn] == max_per_asn: + continue + asn_count[asn] += 1 + result.append(ip) + except: + sys.stderr.write('ERR: Could not resolve ASN for "' + ip['ip'] + '"\n') + return result def main(): lines = sys.stdin.readlines() + ips = [parseline(line) for line in lines] + + # Skip entries with valid IPv4 address. + ips = [ip for ip in ips if ip is not None] + # Skip entries from suspicious hosts. + ips = [ip for ip in ips if ip['ip'] not in SUSPICIOUS_HOSTS] + # Enforce minimal number of blocks. + ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS] + # Require service bit 1. + ips = [ip for ip in ips if (ip['service'] & 1) == 1] + # Require at least 50% 30-day uptime. + ips = [ip for ip in ips if ip['uptime'] > 50] + # Require a known and recent user agent. + ips = [ip for ip in ips if PATTERN_AGENT.match(ip['agent'])] + # Sort by availability (and use last success as tie breaker) + ips.sort(key=lambda x: (x['uptime'], x['lastsuccess'], x['ip']), reverse=True) + # Look up ASNs and limit results, both per ASN and globally. + ips = filterbyasn(ips, MAX_SEEDS_PER_ASN, NSEEDS) + # Sort the results by IP address (for deterministic output). + ips.sort(key=lambda x: (x['ipnum'])) - ips = [] - pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):9999") - for line in lines: - m = pattern.match(line) - if m is None: - continue - ip = 0 - for i in range(0,4): - ip = ip + (int(m.group(i+1)) << (8*(i))) - if ip == 0: - continue - ips.append(ip) - - for row in range(0, min(NSEEDS,len(ips)), 8): - print " " + ", ".join([ "0x%08x"%i for i in ips[row:row+8] ]) + "," + for ip in ips: + print ip['ip'] if __name__ == '__main__': main() diff --git a/contrib/verifysfbinaries/README.md b/contrib/verifysfbinaries/README.md index f646d1efd1b37..8c038865bdaff 100644 --- a/contrib/verifysfbinaries/README.md +++ b/contrib/verifysfbinaries/README.md @@ -1,5 +1,5 @@ ### Verify SF Binaries ### -This script attempts to download the signature file `SHA256SUMS.asc` from SourceForge. +This script attempts to download the signature file `SHA256SUMS.asc` from https://bitcoin.org. It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file. diff --git a/contrib/verifysfbinaries/verify.sh b/contrib/verifysfbinaries/verify.sh index e92295661cc4f..3eb46938835cc 100755 --- a/contrib/verifysfbinaries/verify.sh +++ b/contrib/verifysfbinaries/verify.sh @@ -1,6 +1,6 @@ #!/bin/bash -### This script attempts to download the signature file SHA256SUMS.asc from SourceForge +### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org ### It first checks if the signature passes, and then downloads the files specified in ### the file, and checks if the hashes of these files match those that are specified ### in the signature file. @@ -18,11 +18,11 @@ WORKINGDIR="/tmp/bitcoin" TMPFILE="hashes.tmp" #this URL is used if a version number is not specified as an argument to the script -SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.9.0rc1/SHA256SUMS.asc" +SIGNATUREFILE="https://bitcoin.org/bin/0.9.2.1/SHA256SUMS.asc" SIGNATUREFILENAME="SHA256SUMS.asc" RCSUBDIR="test/" -BASEDIR="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/" +BASEDIR="https://bitcoin.org/bin/" VERSIONPREFIX="bitcoin-" RCVERSIONSTRING="rc" @@ -62,7 +62,7 @@ WGETOUT=$(wget -N "$BASEDIR$SIGNATUREFILENAME" 2>&1) #and then see if wget completed successfully if [ $? -ne 0 ]; then echo "Error: couldn't fetch signature file. Have you specified the version number in the following format?" - echo "[bitcoin-]-[rc[0-9]] (example: bitcoin-0.7.1-rc1)" + echo "[bitcoin-]-[rc[0-9]] (example: bitcoin-0.9.2-rc1)" echo "wget output:" echo "$WGETOUT"|sed 's/^/\t/g' exit 2 diff --git a/depends/funcs.mk b/depends/funcs.mk index 79015c047ca04..337634253f5bd 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -31,8 +31,8 @@ define fetch_file endef define int_get_build_recipe_hash -$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)))) -$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | cut -d" " -f1 | $(build_SHA256SUM))) +$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1)) +$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1)) endef define int_get_build_id diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index 6d7a556c1100b..eb4779410bf2a 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -1,8 +1,8 @@ package=openssl -$(package)_version=1.0.1j +$(package)_version=1.0.1k $(package)_download_path=https://www.openssl.org/source $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3 +$(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c define $(package)_set_vars $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" @@ -20,7 +20,7 @@ $(package)_config_opts_i686_mingw32=mingw endef define $(package)_preprocess_cmds - sed -i.old "/define DATE/d" crypto/Makefile && \ + sed -i.old "/define DATE/d" util/mkbuildinf.pl && \ sed -i.old "s|engines apps test|engines|" Makefile.org endef diff --git a/doc/Doxyfile b/doc/Doxyfile index e95f5501568e0..563edc64b268a 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -34,7 +34,7 @@ PROJECT_NAME = Dash # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.11.0.4 +PROJECT_NUMBER = 0.12.0.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 diff --git a/doc/README.md b/doc/README.md index dd2533a2da83d..2dab1a7c7a848 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,10 +1,5 @@ -Dash 0.11.x BETA -==================== - -Copyright (c) 2009-2015 Bitcoin Developers - -Copyright (c) 2014-2015 Dash Developers - +Dash Core 0.12.0 +===================== Setup --------------------- @@ -12,67 +7,67 @@ Setup Running --------------------- -The following are some helpful notes on how to run Bitcoin on your native platform. +The following are some helpful notes on how to run Dash on your native platform. ### Unix -You need the Qt4 run-time libraries to run Bitcoin-Qt. On Debian or Ubuntu: +You need the Qt4 run-time libraries to run Dash-Qt. On Debian or Ubuntu: sudo apt-get install libqtgui4 Unpack the files into a directory and run: -- bin/32/bitcoin-qt (GUI, 32-bit) or bin/32/bitcoind (headless, 32-bit) -- bin/64/bitcoin-qt (GUI, 64-bit) or bin/64/bitcoind (headless, 64-bit) +- bin/32/dash-qt (GUI, 32-bit) or bin/32/dashd (headless, 32-bit) +- bin/64/dash-qt (GUI, 64-bit) or bin/64/dashd (headless, 64-bit) ### Windows -Unpack the files into a directory, and then run bitcoin-qt.exe. +Unpack the files into a directory, and then run dash-qt.exe. ### OSX -Drag Bitcoin-Qt to your applications folder, and then run Bitcoin-Qt. +Drag Dash-Qt to your applications folder, and then run Dash-Qt. ### Need Help? -* See the documentation at the [Bitcoin Wiki](https://en.bitcoin.it/wiki/Main_Page) +* See the documentation at the [Dash Wiki](https://en.bitcoin.it/wiki/Main_Page) ***TODO*** for help and more information. -* Ask for help on [#bitcoin](http://webchat.freenode.net?channels=bitcoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net?channels=bitcoin). -* Ask for help on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Technical Support board](https://bitcointalk.org/index.php?board=4.0). +* Ask for help on [#dashpay](http://webchat.freenode.net?channels=dashpay) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net?channels=dashpay). +* Ask for help on the [DashTalk](https://dashtalk.org/) forums. Building --------------------- -The following are developer notes on how to build Bitcoin on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc. +The following are developer notes on how to build Dash on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc. - [OSX Build Notes](build-osx.md) - [Unix Build Notes](build-unix.md) -- [Windows Build Notes](build-msw.md) Development --------------------- -The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/README.md) contains relevant information on the development process and automated testing. +The Dash repo's [root README](https://github.com/dashpay/dash/blob/master/README.md) contains relevant information on the development process and automated testing. - [Coding Guidelines](coding.md) - [Multiwallet Qt Development](multiwallet-qt.md) - [Release Notes](release-notes.md) - [Release Process](release-process.md) -- [Source Code Documentation (External Link)](https://dev.visucore.com/bitcoin/doxygen/) +- [Source Code Documentation (External Link)](https://dev.visucore.com/bitcoin/doxygen/) ***TODO*** - [Translation Process](translation_process.md) - [Unit Tests](unit-tests.md) ### Resources -* Discuss on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Development & Technical Discussion board](https://bitcointalk.org/index.php?board=6.0). -* Discuss on [#bitcoin-dev](http://webchat.freenode.net/?channels=bitcoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net/?channels=bitcoin-dev). +* Discuss on the [DashTalk](https://dashtalk.org/) forums, in the Development & Technical Discussion board. +* Discuss on [#dashpay](http://webchat.freenode.net/?channels=dashpay) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net/?channels=dashpay). ### Miscellaneous - [Assets Attribution](assets-attribution.md) - [Files](files.md) - [Tor Support](tor.md) +- [Init Scripts (systemd/upstart/openrc)](init.md) License --------------------- Distributed under the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php). -This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](http://www.openssl.org/). This product includes +This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard. diff --git a/doc/README_osx.txt b/doc/README_osx.txt index 2be56c15926c7..d56234f7d9408 100644 --- a/doc/README_osx.txt +++ b/doc/README_osx.txt @@ -20,14 +20,6 @@ https://github.com/mingwandroid/toolchain4 In order to build a working toolchain, the following source packages are needed from Apple: cctools, dyld, and ld64. -Beware. This part is ugly. Very very very ugly. In the future, this should be -broken out into a new repository and cleaned up. Additionally, the binaries -only work when built as x86 and not x86_64. This is an especially nasty -limitation because it must be linked with the toolchain's libLTO.so, meaning -that the entire toolchain must be x86. Gitian x86_64 should not be used until -this has been fixed, because it would mean that several native dependencies -(openssl, libuuid, etc) would need to be built as x86 first. - These tools inject timestamps by default, which produce non-deterministic binaries. The ZERO_AR_DATE environment variable is used to disable that. @@ -73,3 +65,18 @@ Background images and other features can be added to DMG files by inserting a .DS_Store before creation. The easiest way to create this file is to build a DMG without one, move it to a device running OSX, customize the layout, then grab the .DS_Store file for later use. That is the approach taken here. + +As of OSX Mavericks (10.9), using an Apple-blessed key to sign binaries is a +requirement in order to satisfy the new Gatekeeper requirements. Because this +private key cannot be shared, we'll have to be a bit creative in order for the +build process to remain somewhat deterministic. Here's how it works: + +- Builders use gitian to create an unsigned release. This outputs an unsigned + dmg which users may choose to bless and run. It also outputs an unsigned app + structure in the form of a tarball, which also contains all of the tools + that have been previously (deterministically) built in order to create a + final dmg. +- The Apple keyholder uses this unsigned app to create a detached signature, + using the script that is also included there. +- Builders feed the unsigned app + detached signature back into gitian. It + uses the pre-built tools to recombine the pieces into a deterministic dmg. diff --git a/doc/README_windows.txt b/doc/README_windows.txt index a59dffef72dc2..dedbad6b722e6 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,32 +1,23 @@ -Dash 0.11.x BETA - -Copyright (c) 2009-2015 Bitcoin Core Developers -Copyright (c) 2014-2015 Dash Core Developers - -Distributed under the MIT/X11 software license, see the accompanying -file COPYING or http://www.opensource.org/licenses/mit-license.php. -This product includes software developed by the OpenSSL Project for use in -the OpenSSL Toolkit (http://www.openssl.org/). This product includes -cryptographic software written by Eric Young (eay@cryptsoft.com). - - -Intro ------ -Bitcoin is a free open source peer-to-peer electronic cash system that is -completely decentralized, without the need for a central server or trusted -parties. Users hold the crypto keys to their own money and transact directly -with each other, with the help of a P2P network to check for double-spending. - - -Setup ------ -Unpack the files into a directory and run bitcoin-qt.exe. - -Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. -However, it downloads and stores the entire history of Bitcoin transactions; -depending on the speed of your computer and network connection, the synchronization -process can take anywhere from a few hours to a day or more. - -See the bitcoin wiki at: - https://en.bitcoin.it/wiki/Main_Page -for more help and information. +Dash Core 0.12.0 +===================== + +Intro +----- +Dash is a free open source peer-to-peer electronic cash system that is +completely decentralized, without the need for a central server or trusted +parties. Users hold the crypto keys to their own money and transact directly +with each other, with the help of a P2P network to check for double-spending. + + +Setup +----- +Unpack the files into a directory and run dash-qt.exe. + +Dash Core is the original Dash client and it builds the backbone of the network. +However, it downloads and stores the entire history of Dash transactions; +depending on the speed of your computer and network connection, the synchronization +process can take anywhere from a few hours to a day or more. + +See the dash wiki at: + https://en.bitcoin.it/wiki/Main_Page ***TODO*** +for more help and information. diff --git a/doc/REST-interface.md b/doc/REST-interface.md new file mode 100644 index 0000000000000..0af650b4e8eb3 --- /dev/null +++ b/doc/REST-interface.md @@ -0,0 +1,27 @@ +Unauthenticated REST Interface +============================== + +The REST API can be enabled with the `-rest` option. + +Supported API +------------- +`GET /rest/tx/TX-HASH.{bin|hex|json}` + +Given a transaction hash, +Returns a transaction, in binary, hex-encoded binary or JSON formats. + +`GET /rest/block/BLOCK-HASH.{bin|hex|json}` +`GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}` + +Given a block hash, +Returns a block, in binary, hex-encoded binary or JSON formats. + +The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. + +With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. + +For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option. + +Risks +------------- +Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `