diff --git a/.travis.yml b/.travis.yml index 1630c1d02a4..0964650a2a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,29 @@ # - 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 +# command. See: https://github.com/travis-ci/travis-ci/issues/4393 +# - sudo/dist/group are set so as to get Blue Box VMs, necessary for [loopback] +# IPv6 support + +sudo: required +dist: precise +group: legacy os: linux language: cpp +compiler: gcc env: global: - MAKEJOBS=-j3 - RUN_TESTS=false + - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID - 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 + - PYTHON_DEBUG=1 + - WINEDEBUG=fixme-all cache: apt: true directories: @@ -25,26 +35,28 @@ 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" + env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" + - 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 --enable-reduce-exports" MAKEJOBS="-j2" + - 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 --enable-reduce-exports LDFLAGS=-static-libstdc++" USE_SHELL="/bin/dash" + - 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 --enable-reduce-exports" MAKEJOBS="-j2" - compiler: ": bitcoind" - 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" + 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 --enable-reduce-exports 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" + env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" - 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" + env: HOST=x86_64-apple-darwin11 PACKAGES="cmake libcap-dev libz-dev libbz2-dev" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy" + exclude: + - compiler: gcc 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 curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS script: diff --git a/.tx/config b/.tx/config index 472d27b46fe..6c534f06e49 100644 --- a/.tx/config +++ b/.tx/config @@ -1,7 +1,7 @@ [main] host = https://www.transifex.com -[bitcoin.qt-translation-010x] +[bitcoin.qt-translation-011x] file_filter = src/qt/locale/bitcoin_.ts source_file = src/qt/locale/bitcoin_en.ts source_lang = en diff --git a/COPYING b/COPYING index 6219bd75a64..cae0f5b6f41 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2009-2014 Bitcoin Developers +Copyright (c) 2009-2015 The Bitcoin Core developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile.am b/Makefile.am index 56497706029..cff6dd2780e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,9 +15,11 @@ BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) OSX_APP=Bitcoin-Qt.app -OSX_DMG=Bitcoin-Qt.dmg +OSX_DMG=Bitcoin-Core.dmg +OSX_BACKGROUND_IMAGE=background.tiff OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist +OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW @@ -29,8 +31,8 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ $(top_srcdir)/doc/README_windows.txt -OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ - $(top_srcdir)/contrib/macdeploy/background.png \ +OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \ + $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \ $(top_srcdir)/contrib/macdeploy/DS_Store \ $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \ $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh @@ -58,8 +60,9 @@ $(BITCOIN_WIN_INSTALLER): all-recursive STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release - @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ + @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \ echo error: could not build $@ + @echo built $@ $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE $(MAKE) -C src $(patsubst src/%,%,$@) @@ -70,7 +73,7 @@ $(OSX_APP)/Contents/PkgInfo: $(OSX_APP)/Contents/Resources/empty.lproj: $(MKDIR_P) $(@D) - @touch $@ + @touch $@ $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) $(MKDIR_P) $(@D) @@ -84,9 +87,13 @@ $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) $(MKDIR_P) $(@D) STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@ +$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR) + $(MKDIR_P) $(@D) + $(INSTALL_DATA) $< $@ + OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ - $(OSX_APP)/Contents/MacOS/Bitcoin-Qt + $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings if BUILD_DARWIN $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) @@ -95,7 +102,7 @@ $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) deploydir: $(OSX_DMG) else 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_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications $(APP_DIST_DIR)/Applications: @rm -f $@ @@ -104,13 +111,13 @@ $(APP_DIST_DIR)/Applications: $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_DMG): $(APP_DIST_EXTRAS) - $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist + $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -dir-mode 0755 -apple -o $@ dist -$(APP_DIST_DIR)/.background/background.png: +$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) $(MKDIR_P) $(@D) - $(INSTALL) $(top_srcdir)/contrib/macdeploy/background.png $@ -$(APP_DIST_DIR)/.DS_Store: - $(INSTALL) $(top_srcdir)/contrib/macdeploy/DS_Store $@ + $(INSTALL) $< $@ +$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store + $(INSTALL) $< $@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-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 @@ -195,6 +202,8 @@ check-local: @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1 endif +dist_noinst_SCRIPTS = autogen.sh + EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) diff --git a/README.md b/README.md index cf650fe5433..4fe6a874950 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ Bitcoin Core integration/staging tree https://www.bitcoin.org -Copyright (c) 2009-2014 Bitcoin Core Developers - What is Bitcoin? ---------------- @@ -36,11 +34,11 @@ development team members simply pulls it. 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](http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development). +[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev) 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 +match the project's coding conventions (see [doc/developer-notes.md](doc/developer-notes.md)) or are controversial. The `master` branch is regularly built and tested, but is not guaranteed to be @@ -85,38 +83,3 @@ Translations are periodically pulled from Transifex and merged into the git repo pull from Transifex would automatically overwrite them again. Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/bitcoin-translators). - -Development tips and tricks ---------------------------- - -**compiling for debugging** - -Run configure with the --enable-debug option, then make. Or run configure with -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 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). - -The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt -to see it. - -**testnet and regtest modes** - -Run with the -testnet option to run with "play bitcoins" 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 -that run in -regtest mode. - -**DEBUG_LOCKORDER** - -Bitcoin 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 which locks -are held, and adds warnings to the debug.log file if inconsistencies are detected. diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 index f3b14461eb9..0bf558d25b5 100644 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/bitcoin_find_bdb48.m4 @@ -38,7 +38,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ done if test "x$bdbpath" = "xX"; then AC_MSG_RESULT([no]) - AC_MSG_ERROR(libdb_cxx headers missing) + AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) elif test "x$bdb48path" = "xX"; then BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 2a72262653f..c58397b684a 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -6,6 +6,7 @@ AC_DEFUN([BITCOIN_QT_FAIL],[ AC_MSG_WARN([$1; bitcoin-qt frontend will not be built]) fi bitcoin_enable_qt=no + bitcoin_enable_qt_test=no else AC_MSG_ERROR([$1]) fi @@ -105,24 +106,42 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ dnl results to QT_LIBS. BITCOIN_QT_CHECK([ TEMP_CPPFLAGS=$CPPFLAGS - CPPFLAGS=$QT_INCLUDES + TEMP_CXXFLAGS=$CXXFLAGS + CPPFLAGS="$QT_INCLUDES $CPPFLAGS" + CXXFLAGS="$PIC_FLAGS $CXXFLAGS" if test x$bitcoin_qt_got_major_vers = x5; then _BITCOIN_QT_IS_STATIC if test x$bitcoin_cv_static_qt = xyes; then 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]) + AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]],[[ + #if QT_VERSION >= 0x050400 + choke; + #endif + ]])], + [bitcoin_cv_need_acc_widget=yes], + [bitcoin_cv_need_acc_widget=no]) + ]) + if test "x$bitcoin_cv_need_acc_widget" = "xyes"; then + if test x$qt_plugin_path != x; then + QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" + fi + _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) + fi if test x$TARGET_OS = xwindows; then _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows]) AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows]) elif test x$TARGET_OS = xlinux; then PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"]) + if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then + PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"]) + fi _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 @@ -151,6 +170,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ fi fi CPPFLAGS=$TEMP_CPPFLAGS + CXXFLAGS=$TEMP_CXXFLAGS ]) if test x$use_pkgconfig$qt_bin_path = xyes; then @@ -159,6 +179,43 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ fi fi + if test x$use_hardening != xno; then + BITCOIN_QT_CHECK([ + AC_MSG_CHECKING(whether -fPIE can be used with this Qt config) + TEMP_CPPFLAGS=$CPPFLAGS + TEMP_CXXFLAGS=$CXXFLAGS + CPPFLAGS="$QT_INCLUDES $CPPFLAGS" + CXXFLAGS="$PIE_FLAGS $CXXFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[ + #if defined(QT_REDUCE_RELOCATIONS) + choke; + #endif + ]])], + [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ], + [ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS] + ) + CPPFLAGS=$TEMP_CPPFLAGS + CXXFLAGS=$TEMP_CXXFLAGS + ]) + else + BITCOIN_QT_CHECK([ + AC_MSG_CHECKING(whether -fPIC is needed with this Qt config) + TEMP_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$QT_INCLUDES $CPPFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[ + #if defined(QT_REDUCE_RELOCATIONS) + choke; + #endif + ]])], + [ AC_MSG_RESULT(no)], + [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS] + ) + CPPFLAGS=$TEMP_CPPFLAGS + ]) + fi + BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path) BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path) BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path) @@ -204,6 +261,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ ]) AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})]) + AC_SUBST(QT_PIE_FLAGS) AC_SUBST(QT_INCLUDES) AC_SUBST(QT_LIBS) AC_SUBST(QT_LDFLAGS) @@ -342,6 +400,8 @@ dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5". dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ TEMP_CPPFLAGS="$CPPFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$PIC_FLAGS $CXXFLAGS" TEMP_LIBS="$LIBS" BITCOIN_QT_CHECK([ if test x$qt_include_path != x; then @@ -381,7 +441,8 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in]))) BITCOIN_QT_CHECK(AC_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_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in]))) + BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled]))) BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found))) BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found))) BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found))) @@ -410,6 +471,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ fi ]) CPPFLAGS="$TEMP_CPPFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" LIBS="$TEMP_LIBS" ]) diff --git a/configure.ac b/configure.ac index b28898a4fae..fb2a25ec822 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,12 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 10) -define(_CLIENT_VERSION_REVISION, 99) +define(_CLIENT_VERSION_MINOR, 11) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_IS_RELEASE, false) -define(_COPYRIGHT_YEAR, 2014) -AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin]) +define(_CLIENT_VERSION_IS_RELEASE, true) +define(_COPYRIGHT_YEAR, 2015) +AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_AUX_DIR([build-aux]) @@ -64,13 +64,6 @@ AC_PATH_PROG(CCACHE,ccache) AC_PATH_PROG(XGETTEXT,xgettext) AC_PATH_PROG(HEXDUMP,hexdump) -# 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 pkg-config check. PKG_PROG_PKG_CONFIG @@ -122,9 +115,9 @@ AC_ARG_ENABLE([hardening], AC_ARG_ENABLE([reduce-exports], [AS_HELP_STRING([--enable-reduce-exports], - [attempt to reduce exported symbols in the resulting executables (default is yes)])], + [attempt to reduce exported symbols in the resulting executables (default is no)])], [use_reduce_exports=$enableval], - [use_reduce_exports=auto]) + [use_reduce_exports=no]) AC_ARG_ENABLE([ccache], [AS_HELP_STRING([--enable-ccache], @@ -140,7 +133,7 @@ AC_ARG_ENABLE([lcov], AC_ARG_ENABLE([glibc-back-compat], [AS_HELP_STRING([--enable-glibc-back-compat], - [enable backwards compatibility with glibc and libstdc++])], + [enable backwards compatibility with glibc])], [use_glibc_compat=$enableval], [use_glibc_compat=no]) @@ -167,10 +160,28 @@ fi ## compatibility with the legacy buildsystem. ## if test "x$CXXFLAGS_overridden" = "xno"; then - CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter" + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign" fi CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" +AC_ARG_WITH([utils], + [AS_HELP_STRING([--with-utils], + [build bitcoin-cli bitcoin-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 bitcoind daemon (default=yes)])], + [build_bitcoind=$withval], + [build_bitcoind=yes]) + AC_LANG_PUSH([C++]) use_pkgconfig=yes @@ -297,6 +308,7 @@ case $host in AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"]) CPPFLAGS="$CPPFLAGS -DMAC_OSX" + OBJCXXFLAGS="$CXXFLAGS" ;; *linux*) TARGET_OS=linux @@ -339,8 +351,8 @@ if test x$use_lcov = xyes; then [AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")]) fi -dnl Require little endian -AC_C_BIGENDIAN([AC_MSG_ERROR("Big Endian not supported")]) +dnl Check for endianness +AC_C_BIGENDIAN dnl Check for pthread compile/link requirements AX_PTHREAD @@ -388,6 +400,11 @@ if test x$use_glibc_compat != xno; then fi +if test x$TARGET_OS != xwindows; then + # All windows code is PIC, forcing it on just adds useless compile warnings + AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"]) +fi + if test x$use_hardening != xno; then AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) @@ -405,8 +422,7 @@ if test x$use_hardening != xno; then 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_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"]) AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) fi @@ -415,11 +431,6 @@ if test x$use_hardening != xno; then AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(lib missing)) ;; esac - - CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS" - CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS" - LDFLAGS="$LDFLAGS $HARDENED_LDFLAGS" - OBJCXXFLAGS="$CXXFLAGS" fi dnl this flag screws up non-darwin gcc even when the check fails. special-case it. @@ -427,15 +438,22 @@ if test x$TARGET_OS = xdarwin; then AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) fi -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_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) AC_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],,, +AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,, [#if HAVE_ENDIAN_H #include + #elif HAVE_SYS_ENDIAN_H + #include + #endif]) + +AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,, + [#if HAVE_BYTESWAP_H + #include #endif]) dnl Check for MSG_NOSIGNAL @@ -460,22 +478,14 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ 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.]) + AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-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 +if test x$use_reduce_exports = xyes; 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 - ]) + [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])]) fi LEVELDB_CPPFLAGS= @@ -500,6 +510,19 @@ if test x$use_upnp != xno; then ) 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 @@ -509,7 +532,7 @@ AX_BOOST_THREAD AX_BOOST_CHRONO -if test x$use_reduce_exports != xno; then +if test x$use_reduce_exports = xyes; then AC_MSG_CHECKING([for working boost reduced exports]) TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" @@ -523,21 +546,14 @@ if test x$use_reduce_exports != xno; then #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.]) + ],[ + AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.]) ]) CPPFLAGS="$TEMP_CPPFLAGS" fi +fi -if test x$use_reduce_exports != xno; then +if test x$use_reduce_exports = xyes; then CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS" AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"]) fi @@ -549,6 +565,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 @@ -568,19 +586,21 @@ if test x$use_tests = xyes; then [AC_MSG_RESULT(no)]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" + + fi fi -BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB" +if test x$use_boost = xyes; then + +BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB" 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 dnl a working version is available, else fall back to sleep. sleep was removed 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 TEMP_LIBS="$LIBS" -LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS" +LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @@ -593,12 +613,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ choke me #endif ]])], - [boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB"; + [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])], [boost_sleep=no]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" -fi if test x$boost_sleep != xyes; then TEMP_LIBS="$LIBS" @@ -626,25 +645,7 @@ if test x$boost_sleep != xyes; then AC_MSG_ERROR(No working boost sleep implementation found.) fi -AC_ARG_WITH([utils], - [AS_HELP_STRING([--with-utils], - [build bitcoin-cli bitcoin-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 bitcoind daemon (default=yes)])], - [build_bitcoind=$withval], - [build_bitcoind=yes]) - -BITCOIN_QT_INIT +fi if test x$use_pkgconfig = xyes; then @@ -678,6 +679,37 @@ else 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),) + +AC_MSG_CHECKING(for a supported OpenSSL version) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + ]], + [[RAND_egd(NULL);]])], + [AC_MSG_RESULT(yes)], + [ + 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="$CFLAGS_TEMP" +LIBS="$LIBS_TEMP" + BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path) AC_MSG_CHECKING([whether to build bitcoind]) @@ -696,9 +728,6 @@ if test x$build_bitcoin_libs = xyes; then fi AC_MSG_RESULT($build_bitcoin_libs) -dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus -BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4]) - AC_LANG_POP if test "x$use_ccache" != "xno"; then @@ -806,13 +835,13 @@ else fi AC_MSG_CHECKING([whether to reduce exports]) -if test x$use_reduce_exports != xno; then +if test x$use_reduce_exports = xyes; 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 = xnononono; then +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 @@ -828,7 +857,6 @@ 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]) @@ -844,6 +872,11 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) AC_SUBST(RELDFLAGS) +AC_SUBST(HARDENED_CXXFLAGS) +AC_SUBST(HARDENED_CPPFLAGS) +AC_SUBST(HARDENED_LDFLAGS) +AC_SUBST(PIC_FLAGS) +AC_SUBST(PIE_FLAGS) AC_SUBST(LIBTOOL_APP_LDFLAGS) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) @@ -882,7 +915,7 @@ 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_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no" AC_CONFIG_SUBDIRS([src/secp256k1]) AC_OUTPUT diff --git a/contrib/README.md b/contrib/README.md index dae975e9efc..7d4b91e887f 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -16,6 +16,9 @@ Repository Tools Specific tools for developers working on this repository. Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG. +### [Verify-Commits](/contrib/verify-commits) ### +Tool to verify that every merge commit was signed by a developer using the above `github-merge.sh` script. + ### [Linearize](/contrib/linearize) ### Construct a linear, no-fork, best version of the blockchain. diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py index 02577b1b6aa..c3ce9d79362 100644 --- a/contrib/bitrpc/bitrpc.py +++ b/contrib/bitrpc/bitrpc.py @@ -20,9 +20,9 @@ try: path = raw_input("Enter destination path/filename: ") print access.backupwallet(path) - except: - print "\n---An error occurred---\n" - + except Exception as inst: + print inst + elif cmd == "encryptwallet": try: pwd = getpass.getpass(prompt="Enter passphrase: ") @@ -32,29 +32,29 @@ 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" + except Exception as inst: + print inst elif cmd == "getaccount": try: addr = raw_input("Enter a Bitcoin address: ") print access.getaccount(addr) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getaccountaddress": try: acct = raw_input("Enter an account name: ") print access.getaccountaddress(acct) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getaddressesbyaccount": try: acct = raw_input("Enter an account name: ") print access.getaddressesbyaccount(acct) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getbalance": try: @@ -64,57 +64,57 @@ print access.getbalance(acct, mc) except: print access.getbalance() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getblockbycount": try: height = raw_input("Height: ") print access.getblockbycount(height) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getblockcount": try: print access.getblockcount() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getblocknumber": try: print access.getblocknumber() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getconnectioncount": try: print access.getconnectioncount() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getdifficulty": try: print access.getdifficulty() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getgenerate": try: print access.getgenerate() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "gethashespersec": try: print access.gethashespersec() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getinfo": try: print access.getinfo() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getnewaddress": try: @@ -123,8 +123,8 @@ print access.getnewaddress(acct) except: print access.getnewaddress() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getreceivedbyaccount": try: @@ -134,8 +134,8 @@ print access.getreceivedbyaccount(acct, mc) except: print access.getreceivedbyaccount() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getreceivedbyaddress": try: @@ -145,15 +145,15 @@ print access.getreceivedbyaddress(addr, mc) except: print access.getreceivedbyaddress() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "gettransaction": try: txid = raw_input("Enter a transaction ID: ") print access.gettransaction(txid) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "getwork": try: @@ -162,8 +162,8 @@ print access.gettransaction(data) except: print access.gettransaction() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "help": try: @@ -172,8 +172,8 @@ print access.help(cmd) except: print access.help() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "listaccounts": try: @@ -182,8 +182,8 @@ print access.listaccounts(mc) except: print access.listaccounts() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "listreceivedbyaccount": try: @@ -193,8 +193,8 @@ print access.listreceivedbyaccount(mc, incemp) except: print access.listreceivedbyaccount() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "listreceivedbyaddress": try: @@ -204,8 +204,8 @@ print access.listreceivedbyaddress(mc, incemp) except: print access.listreceivedbyaddress() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "listtransactions": try: @@ -216,8 +216,8 @@ print access.listtransactions(acct, count, frm) except: print access.listtransactions() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "move": try: @@ -230,8 +230,8 @@ print access.move(frm, to, amt, mc, comment) except: print access.move(frm, to, amt) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "sendfrom": try: @@ -245,8 +245,8 @@ print access.sendfrom(frm, to, amt, mc, comment, commentto) except: print access.sendfrom(frm, to, amt) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "sendmany": try: @@ -258,8 +258,8 @@ print access.sendmany(frm,to,mc,comment) except: print access.sendmany(frm,to) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "sendtoaddress": try: @@ -271,16 +271,16 @@ print access.sendtoaddress(to,amt,comment,commentto) except: print access.sendtoaddress(to,amt) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "setaccount": try: addr = raw_input("Address: ") acct = raw_input("Account:") print access.setaccount(addr,acct) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "setgenerate": try: @@ -290,36 +290,36 @@ print access.setgenerate(gen, cpus) except: print access.setgenerate(gen) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "settxfee": try: amt = raw_input("Amount:") print access.settxfee(amt) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "stop": try: print access.stop() - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "validateaddress": try: addr = raw_input("Address: ") print access.validateaddress(addr) - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "walletpassphrase": try: pwd = getpass.getpass(prompt="Enter wallet passphrase: ") access.walletpassphrase(pwd, 60) print "\n---Wallet unlocked---\n" - except: - print "\n---An error occurred---\n" + except Exception as inst: + print inst elif cmd == "walletpassphrasechange": try: @@ -328,10 +328,8 @@ access.walletpassphrasechange(pwd, pwd2) print print "\n---Passphrase changed---\n" - except: - print - print "\n---An error occurred---\n" - print + except Exception as inst: + print inst else: print "Command not found or not supported" diff --git a/contrib/debian/bitcoin-tx.install b/contrib/debian/bitcoin-tx.install new file mode 100644 index 00000000000..2c21052a687 --- /dev/null +++ b/contrib/debian/bitcoin-tx.install @@ -0,0 +1 @@ +usr/local/bin/bitcoin-tx usr/bin diff --git a/contrib/debian/bitcoind.manpages b/contrib/debian/bitcoind.manpages index 3e4ca63d4ea..6d3e6838550 100644 --- a/contrib/debian/bitcoind.manpages +++ b/contrib/debian/bitcoind.manpages @@ -1,2 +1,3 @@ debian/manpages/bitcoind.1 debian/manpages/bitcoin.conf.5 +debian/manpages/bitcoin-cli.1 diff --git a/contrib/debian/changelog b/contrib/debian/changelog index fe910b65a55..110bfe03eff 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,3 +1,45 @@ +bitcoin (0.11.0-precise1) precise; urgency=medium + + * New upstream release. + + -- Matt Corallo (BlueMatt) Tue, 14 Jul 2015 14:39:00 -1000 + +bitcoin (0.10.2-precise1) precise; urgency=medium + + * New upstream release. + + -- Matt Corallo (BlueMatt) Mon, 29 Jun 2015 17:33:00 -1000 + +bitcoin (0.10.1-precise3) precise; urgency=medium + + * Fix build dep (include python). + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 09:28:00 -1000 + +bitcoin (0.10.1-precise2) precise; urgency=medium + + * Fix miniupnpc dep. + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:33:00 -1000 + +bitcoin (0.10.1-precise1) precise; urgency=medium + + * New upstream release. + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:07:00 -1000 + +bitcoin (0.10.0-precise1) precise; urgency=medium + + * New upstream releases. + + -- Matt Corallo (BlueMatt) Wed, 18 Feb 2015 13:22:00 -1000 + +bitcoin (0.9.4-precise1) precise; urgency=high + + * New upstream releases. + + -- Matt Corallo (laptop - only while traveling) Mon, 12 Jan 2015 23:30:00 -1000 + bitcoin (0.9.3-precise1) precise; urgency=medium * New upstream releases. @@ -137,7 +179,7 @@ bitcoin (0.5.3-natty0) natty; urgency=low bitcoin (0.5.2-natty1) natty; urgency=low * Remove mentions on anonymity in package descriptions and manpage. - These should never have been there, bitcoin isnt anonymous without + These should never have been there, bitcoin isn't anonymous without a ton of work that virtually no users will ever be willing and capable of doing @@ -178,7 +220,7 @@ bitcoin (0.5.0~rc1-natty1) natty; urgency=low * Add test_bitcoin to build test * Fix clean - * Remove uneccessary build-dependancies + * Remove unnecessary build-dependancies -- Matt Corallo Wed, 26 Oct 2011 14:37:18 -0400 @@ -338,7 +380,7 @@ bitcoin (0.3.20.01~dfsg-1) unstable; urgency=low bitcoin (0.3.19~dfsg-6) unstable; urgency=low - * Fix override agressive optimizations. + * Fix override aggressive optimizations. * Fix tighten build-dependencies to really fit backporting to Lenny: + Add fallback build-dependency on libdb4.6++-dev. + Tighten unversioned Boost build-dependencies to recent versions, diff --git a/contrib/debian/control b/contrib/debian/control index a653260ad30..2fd68583cec 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -12,7 +12,7 @@ Build-Depends: debhelper, libdb4.8++-dev, libssl-dev, pkg-config, - libminiupnpc8-dev, + libminiupnpc8-dev | libminiupnpc-dev (>> 1.6), libboost-filesystem-dev (>> 1.35) | libboost-filesystem1.35-dev, libboost-program-options-dev (>> 1.35) | libboost-program-options1.35-dev, libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev, @@ -20,11 +20,12 @@ Build-Depends: debhelper, qt4-qmake, libqt4-dev, libqrencode-dev, - libprotobuf-dev, protobuf-compiler + libprotobuf-dev, protobuf-compiler, + python Standards-Version: 3.9.2 -Homepage: http://www.bitcoin.org/ +Homepage: https://www.bitcoin.org/ Vcs-Git: git://github.com/bitcoin/bitcoin.git -Vcs-Browser: http://github.com/bitcoin/bitcoin +Vcs-Browser: https://github.com/bitcoin/bitcoin Package: bitcoind Architecture: any @@ -56,3 +57,17 @@ Description: peer-to-peer network based digital currency - Qt GUI requires 20+ GB of space, slowly growing. . This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt. + +Package: bitcoin-tx +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: peer-to-peer digital currency - standalone transaction tool + Bitcoin is a free open source peer-to-peer electronic cash system that + is completely decentralized, without the need for a central server or + trusted parties. Users hold the crypto keys to their own money and + transact directly with each other, with the help of a P2P network to + check for double-spending. + . + This package provides bitcoin-tx, a command-line transaction creation + tool which can be used without a bitcoin daemon. Some means of + exchanging minimal transaction data with peers is still required. diff --git a/contrib/debian/copyright b/contrib/debian/copyright index a6ee201991c..55ebcaab425 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 @@ -15,10 +14,6 @@ Files: src/json/* Copyright: 2007-2009, John W. Wilkinson License: Expat -Files: src/strlcpy.h -Copyright: 1998, Todd C. Miller -License: ISC - Files: debian/* Copyright: 2010-2011, Jonas Smedegaard 2011, Matt Corallo diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf index 31cca981e0a..3fd47afe34f 100644 --- a/contrib/debian/examples/bitcoin.conf +++ b/contrib/debian/examples/bitcoin.conf @@ -13,6 +13,12 @@ # Connect via a SOCKS5 proxy #proxy=127.0.0.1:9050 +# Bind to given address and always listen on it. Use [host]:port notation for IPv6 +#bind= + +# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 +#whitebind= + ############################################################## ## Quick Primer on addnode vs connect ## ## Let's say for instance you use addnode=4.2.2.4 ## @@ -54,9 +60,13 @@ # JSON-RPC options (for controlling a running Bitcoin/bitcoind process) # -# server=1 tells Bitcoin-QT and bitcoind to accept JSON-RPC commands +# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands #server=0 +# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. +# This option can be specified multiple times (default: bind to all interfaces) +#rpcbind= + # You must set rpcuser and rpcpassword to secure the JSON-RPC api #rpcuser=Ulysseys #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593 @@ -72,7 +82,7 @@ # 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 Bitcoin-QT to accept JSON-RPC commands. +# server=1 tells Bitcoin-Qt to accept JSON-RPC commands. # it is also read by bitcoind to determine if RPC should be enabled #rpcallowip=10.1.1.34/255.255.255.0 #rpcallowip=1.2.3.4/24 @@ -94,6 +104,14 @@ #rpcsslcertificatechainfile=server.cert #rpcsslprivatekeyfile=server.pem +# Transaction Fee Changes in 0.10.0 + +# Send transactions as zero-fee transactions if possible (default: 0) +#sendfreetransactions=0 + +# Create transactions that have enough fees (or priority) so they are likely to begin confirmation within n blocks (default: 1). +# This setting is over-ridden by the -paytxfee option. +#txconfirmtarget=n # Miscellaneous options diff --git a/contrib/debian/manpages/bitcoin-cli.1 b/contrib/debian/manpages/bitcoin-cli.1 new file mode 100644 index 00000000000..f953ae9db7a --- /dev/null +++ b/contrib/debian/manpages/bitcoin-cli.1 @@ -0,0 +1,48 @@ +.TH BITCOIN-CLI "1" "February 2015" "bitcoin-cli 0.10" +.SH NAME +bitcoin-cli \- a remote procedure call client for Bitcoin Core. +.SH SYNOPSIS +bitcoin-cli [options] [params] \- Send command to Bitcoin Core. +.TP +bitcoin-cli [options] help \- Asks Bitcoin Core for a list of supported commands. +.SH DESCRIPTION +This manual page documents the bitcoin-cli program. bitcoin-cli is an RPC client used to send commands to Bitcoin Core. + +.SH OPTIONS +.TP +\fB\-?\fR +Show the help message. +.TP +\fB\-conf=\fR +Specify configuration file (default: bitcoin.conf). +.TP +\fB\-datadir=\fR +Specify data directory. +.TP +\fB\-testnet\fR +Connect to a Bitcoin Core instance running in testnet mode. +.TP +\fB\-regtest\fR +Connect to a Bitcoin Core instance running in regtest mode (see documentation for -regtest on bitcoind). +.TP +\fB\-rpcuser=\fR +Username for JSON\-RPC connections. +.TP +\fB\-rpcpassword=\fR +Password for JSON\-RPC connections. +.TP +\fB\-rpcport=\fR +Listen for JSON\-RPC connections on (default: 8332 or testnet: 18332). +.TP +\fB\-rpcconnect=\fR +Send commands to node running on (default: 127.0.0.1). +.TP +\fB\-rpcssl\fR=\fI1\fR +Use OpenSSL (https) for JSON\-RPC connections (see the Bitcoin Wiki for SSL setup instructions). + +.SH "SEE ALSO" +\fBbitcoind\fP, \fBbitcoin.conf\fP +.SH AUTHOR +This manual page was written by Ciemon Dunville . Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License. + +The complete text of the MIT License can be found on the web at \fIhttp://opensource.org/licenses/MIT\fP. diff --git a/contrib/debian/manpages/bitcoind.1 b/contrib/debian/manpages/bitcoind.1 index a1b17d6077f..c225b9f3e95 100644 --- a/contrib/debian/manpages/bitcoind.1 +++ b/contrib/debian/manpages/bitcoind.1 @@ -85,19 +85,19 @@ This help message Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename. .TP \fBgetaccount 'bitcoinaddress'\fR -Returns the account associated with the given address. +DEPRECATED. Returns the account associated with the given address. .TP \fBsetaccount 'bitcoinaddress' ['account']\fR -Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account']. +DEPRECATED. 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'. +DEPRECATED. Returns a new bitcoin address for 'account'. .TP \fBgetaddressesbyaccount 'account'\fR -Returns the list of addresses associated with the given 'account'. +DEPRECATED. Returns the list of addresses associated with the given 'account'. .TP \fBgetbalance 'account'\fR -Returns the server's available balance, or the balance for 'account'. +Returns the server's available balance, or the balance for 'account' (accounts are deprecated). .TP \fBgetblockcount\fR Returns the number of blocks in the longest block chain. @@ -124,10 +124,10 @@ 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 bitcoin address for receiving payments. If 'account' is specified (deprecated), 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. +DEPRECATED. 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. @@ -147,13 +147,13 @@ If 'data' is specified, tries to solve the block and returns true if it was succ List commands, or get help for a command. .TP \fBlistaccounts ['minconf=1']\fR -List accounts and their current balances. +DEPRECATED. List accounts and their current balances. *note: requires bitcoin 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: - "account" : the account of the receiving address. + "account" : DEPRECATED. the account of the receiving address. "amount" : total amount received by the address. "confirmations" : number of confirmations of the most recent transaction included. .TP @@ -161,7 +161,7 @@ List accounts and their current balances. ['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing: "address" : receiving address. - "account" : the account of the receiving address. + "account" : DEPRECATED. the account of the receiving address. "amount" : total amount received by the address. "confirmations" : number of confirmations of the most recent transaction included. .TP @@ -180,10 +180,10 @@ Returns a list of the last ['count'] transactions for 'account' \- for all accou *note: requires bitcoin 0.3.20 or later. .TP \fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR -Moves funds between accounts. +DEPRECATED. 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. +DEPRECATED. 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. .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. diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 40495cce8b1..f90afa7f20d 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -81,3 +81,16 @@ It will do the following automatically: See doc/translation-process.md for more information. +git-subtree-check.sh +==================== + +Run this script from the root of the repository to verify that a subtree matches the contents of +the commit it claims to have been updated to. + +To use, make sure that you have fetched the upstream repository branch in which the subtree is +maintained: +* for src/secp256k1: https://github.com/bitcoin/secp256k1.git (branch master) +* for sec/leveldb: https://github.com/bitcoin/leveldb.git (branch bitcoin-fork) + +Usage: git-subtree-check.sh DIR COMMIT +COMMIT may be omitted, in which case HEAD is used. diff --git a/contrib/devtools/git-subtree-check.sh b/contrib/devtools/git-subtree-check.sh new file mode 100755 index 00000000000..1cb82fe6826 --- /dev/null +++ b/contrib/devtools/git-subtree-check.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +DIR="$1" +COMMIT="$2" +if [ -z "$COMMIT" ]; then + COMMIT=HEAD +fi + +# Taken from git-subtree (Copyright (C) 2009 Avery Pennarun ) +find_latest_squash() +{ + dir="$1" + sq= + main= + sub= + git log --grep="^git-subtree-dir: $dir/*\$" \ + --pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" | + while read a b junk; do + case "$a" in + START) sq="$b" ;; + git-subtree-mainline:) main="$b" ;; + git-subtree-split:) sub="$b" ;; + END) + if [ -n "$sub" ]; then + if [ -n "$main" ]; then + # a rejoin commit? + # Pretend its sub was a squash. + sq="$sub" + fi + echo "$sq" "$sub" + break + fi + sq= + main= + sub= + ;; + esac + done +} + +latest_squash="$(find_latest_squash "$DIR")" +if [ -z "$latest_squash" ]; then + echo "ERROR: $DIR is not a subtree" >&2 + exit 2 +fi + +set $latest_squash +old=$1 +rev=$2 +if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then + echo "ERROR: subtree commit $rev unavailable. Fetch/update the subtree repository" >&2 + exit 2 +fi +tree_subtree=$(git show -s --format="%T" $rev) +echo "$DIR in $COMMIT was last updated to upstream commit $rev (tree $tree_subtree)" +tree_actual=$(git ls-tree -d "$COMMIT" "$DIR" | head -n 1) +if [ -z "$tree_actual" ]; then + echo "FAIL: subtree directory $DIR not found in $COMMIT" >&2 + exit 1 +fi +set $tree_actual +tree_actual_type=$2 +tree_actual_tree=$3 +echo "$DIR in $COMMIT currently refers to $tree_actual_type $tree_actual_tree" +if [ "d$tree_actual_type" != "dtree" ]; then + echo "FAIL: subtree directory $DIR is not a tree in $COMMIT" >&2 + exit 1 +fi +if [ "$tree_actual_tree" != "$tree_subtree" ]; then + git diff-tree $tree_actual_tree $tree_subtree >&2 + echo "FAIL: subtree directory tree doesn't match subtree commit tree" >&2 + exit 1 +fi +echo "GOOD" diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py new file mode 100755 index 00000000000..38aaa00f312 --- /dev/null +++ b/contrib/devtools/optimize-pngs.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python + +import os +import sys +import subprocess +import hashlib +from PIL import Image + +def file_hash(filename): + '''Return hash of raw file contents''' + with open(filename, 'rb') as f: + return hashlib.sha256(f.read()).hexdigest() + +def content_hash(filename): + '''Return hash of RGBA contents of image''' + i = Image.open(filename) + i = i.convert('RGBA') + data = i.tostring() + return hashlib.sha256(data).hexdigest() + +#optimize png, remove various color profiles, remove ancillary chunks (alla) and text chunks (text) +#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text + +pngcrush = 'pngcrush' +git = 'git' +folders = ["src/qt/res/movies", "src/qt/res/icons", "src/qt/res/images"] +basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n') +totalSaveBytes = 0 + +outputArray = [] +for folder in folders: + absFolder=os.path.join(basePath, folder) + for file in os.listdir(absFolder): + extension = os.path.splitext(file)[1] + if extension.lower() == '.png': + print("optimizing "+file+"..."), + file_path = os.path.join(absFolder, file) + fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}; + fileMetaMap['contentHashPre'] = content_hash(file_path) + + pngCrushOutput = "" + try: + pngCrushOutput = subprocess.check_output( + [pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path], + stderr=subprocess.STDOUT).rstrip('\n') + except: + print "pngcrush is not installed, aborting..." + sys.exit(0) + + #verify + if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT): + print "PNG file "+file+" is corrupted after crushing, check out pngcursh version" + sys.exit(1) + + fileMetaMap['sha256New'] = file_hash(file_path) + fileMetaMap['contentHashPost'] = content_hash(file_path) + + if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']: + print "Image contents of PNG file "+file+" before and after crushing don't match" + sys.exit(1) + + fileMetaMap['psize'] = os.path.getsize(file_path) + outputArray.append(fileMetaMap) + print("done\n"), + +print "summary:\n+++++++++++++++++" +for fileDict in outputArray: + oldHash = fileDict['sha256Old'] + newHash = fileDict['sha256New'] + totalSaveBytes += fileDict['osize'] - fileDict['psize'] + print fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n" + +print "completed. Total reduction: "+str(totalSaveBytes)+" bytes" diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 28bd9211acd..a13b88692a8 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,11 +1,12 @@ --- -name: "bitcoin-linux-0.10" +name: "bitcoin-linux-0.11" enable_cache: true suites: - "precise" architectures: - "amd64" packages: +- "curl" - "g++-multilib" - "git-core" - "pkg-config" @@ -15,7 +16,8 @@ packages: - "faketime" - "bsdmainutils" - "binutils-gold" -reference_datetime: "2013-06-01 00:00:00" +- "libstdc++6-4.6-pic" +reference_datetime: "2015-06-01 00:00:00" remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" @@ -23,7 +25,7 @@ files: [] script: | WRAP_DIR=$HOME/wrapped HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu" - CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat" + CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="date ar ranlib nm strip" @@ -69,6 +71,14 @@ script: | make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" done + # Ubuntu precise hack: Not an issue in later versions. + # Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic + # package which provides libstdc++_pic.a, but the linker can't find it. + # Symlink it to a path that will be included in our link-line so that the + # linker picks it up before the default libstdc++.a. + # This is only necessary for 64bit. + ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a + # Create the release tarball using (arbitrarily) the first host ./autogen.sh ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'` @@ -99,7 +109,7 @@ script: | find . -name "lib*.la" -delete find . -name "lib*.a" -delete rm -rf ${DISTNAME}/lib/pkgconfig - find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz + find ${DISTNAME} | 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 diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml index db9b4af93d0..36d7b01264e 100644 --- a/contrib/gitian-descriptors/gitian-osx-signer.yml +++ b/contrib/gitian-descriptors/gitian-osx-signer.yml @@ -7,11 +7,12 @@ architectures: packages: - "libc6:i386" - "faketime" -reference_datetime: "2013-06-01 00:00:00" -remotes: [] +reference_datetime: "2015-06-01 00:00:00" +remotes: +- "url": "https://github.com/bitcoin/bitcoin-detached-sigs.git" + "dir": "signature" files: -- "bitcoin-0.9.99-osx-unsigned.tar.gz" -- "signature.tar.gz" +- "bitcoin-osx-unsigned.tar.gz" script: | WRAP_DIR=$HOME/wrapped mkdir -p ${WRAP_DIR} @@ -28,10 +29,10 @@ script: | chmod +x ${WRAP_DIR}/${prog} done - UNSIGNED=`echo bitcoin-*.tar.gz` - SIGNED=`echo ${UNSIGNED} | sed 's/.tar.*//' | sed 's/-unsigned//'`.dmg + UNSIGNED=bitcoin-osx-unsigned.tar.gz + SIGNED=bitcoin-osx-signed.dmg tar -xf ${UNSIGNED} - ./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz - ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app + ./detached-sig-apply.sh ${UNSIGNED} signature/osx + ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -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 index 4f05aad2335..f57521a5628 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -1,12 +1,13 @@ --- -name: "bitcoin-osx-0.10" +name: "bitcoin-osx-0.11" enable_cache: true suites: - "precise" architectures: - "amd64" packages: -- "g++-multilib" +- "curl" +- "g++" - "git-core" - "pkg-config" - "autoconf2.13" @@ -18,16 +19,16 @@ packages: - "libcap-dev" - "libz-dev" - "libbz2-dev" -reference_datetime: "2013-06-01 00:00:00" +reference_datetime: "2015-06-01 00:00:00" remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" files: -- "MacOSX10.7.sdk.tar.gz" +- "MacOSX10.9.sdk.tar.gz" script: | WRAP_DIR=$HOME/wrapped HOSTS="x86_64-apple-darwin11" - CONFIGFLAGS="--enable-upnp-default GENISOIMAGE=$WRAP_DIR/genisoimage" + CONFIGFLAGS="--enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="ar ranlib date dmg genisoimage" @@ -72,7 +73,7 @@ script: | BASEPREFIX=`pwd`/depends mkdir -p ${BASEPREFIX}/SDKs - tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.7.sdk.tar.gz + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.gz # Build dependencies for each host for i in $HOSTS; do @@ -120,13 +121,13 @@ script: | popd make deploy - ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg + ${WRAP_DIR}/dmg dmg Bitcoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg cd installed find . -name "lib*.la" -delete find . -name "lib*.a" -delete rm -rf ${DISTNAME}/lib/pkgconfig - find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz + find ${DISTNAME} | 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 diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml new file mode 100644 index 00000000000..2a73050e0e6 --- /dev/null +++ b/contrib/gitian-descriptors/gitian-win-signer.yml @@ -0,0 +1,39 @@ +--- +name: "bitcoin-win-signer" +suites: +- "precise" +architectures: +- "amd64" +packages: +- "libssl-dev" +- "autoconf" +reference_datetime: "2015-06-01 00:00:00" +remotes: +- "url": "https://github.com/bitcoin/bitcoin-detached-sigs.git" + "dir": "signature" +files: +- "osslsigncode-1.7.1.tar.gz" +- "osslsigncode-Backports-to-1.7.1.patch" +- "bitcoin-win-unsigned.tar.gz" +script: | + BUILD_DIR=`pwd` + SIGDIR=${BUILD_DIR}/signature/win + UNSIGNED_DIR=${BUILD_DIR}/unsigned + + echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 osslsigncode-1.7.1.tar.gz" | sha256sum -c + echo "a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 osslsigncode-Backports-to-1.7.1.patch" | sha256sum -c + + mkdir -p ${UNSIGNED_DIR} + tar -C ${UNSIGNED_DIR} -xf bitcoin-win-unsigned.tar.gz + + tar xf osslsigncode-1.7.1.tar.gz + cd osslsigncode-1.7.1 + patch -p1 < ${BUILD_DIR}/osslsigncode-Backports-to-1.7.1.patch + + ./configure --without-gsf --without-curl --disable-dependency-tracking + make + find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do + INFILE="`basename "${i}"`" + OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`" + ./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem" + done diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 4baa08c88da..10760b1897c 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,11 +1,12 @@ --- -name: "bitcoin-win-0.10" +name: "bitcoin-win-0.11" enable_cache: true suites: - "precise" architectures: - "amd64" packages: +- "curl" - "g++" - "git-core" - "pkg-config" @@ -18,7 +19,7 @@ packages: - "g++-mingw-w64" - "nsis" - "zip" -reference_datetime: "2013-06-01 00:00:00" +reference_datetime: "2015-06-01 00:00:00" remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" @@ -26,7 +27,7 @@ files: [] script: | WRAP_DIR=$HOME/wrapped HOSTS="x86_64-w64-mingw32 i686-w64-mingw32" - CONFIGFLAGS="--enable-upnp-default" + CONFIGFLAGS="--enable-reduce-exports" FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip" FAKETIME_PROGS="date makensis zip" @@ -84,6 +85,8 @@ script: | pushd temp tar xf ../$SOURCEDIST find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + mkdir -p $OUTDIR/src + cp ../$SOURCEDIST $OUTDIR/src popd ORIGPATH="$PATH" @@ -106,10 +109,11 @@ script: | find . -name "lib*.la" -delete find . -name "lib*.a" -delete rm -rf ${DISTNAME}/lib/pkgconfig - find . -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip + find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip cd ../.. done - mkdir -p $OUTDIR/src - mv $SOURCEDIST $OUTDIR/src + cd $OUTDIR + rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe + find . -name "*-setup-unsigned.exe" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip diff --git a/contrib/gitian-downloader/bluematt-key.pgp b/contrib/gitian-downloader/bluematt-key.pgp index fb6d9eb2842..2389d4657fb 100644 Binary files a/contrib/gitian-downloader/bluematt-key.pgp and b/contrib/gitian-downloader/bluematt-key.pgp differ diff --git a/contrib/gitian-downloader/fanquake-key.pgp b/contrib/gitian-downloader/fanquake-key.pgp new file mode 100644 index 00000000000..9c03ff45226 --- /dev/null +++ b/contrib/gitian-downloader/fanquake-key.pgp @@ -0,0 +1,63 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG/MacGPG2 v2.0.26 + +mQINBFFlV7oBEAC3dRAS7gSWQ1fV4JySD0HMBOtY+Y2oCX8vEuTI4atGcxbwXr4/ +OElRYhDK6Zirk8rMoKPxmr8OVek5LNnY3gcDffco6NXmZ+wTstQm6oqUxFfgzznG +X/ExEVuCqiaPAwdWSKn9tC1GuOqRFcD+p2zmxw5mNH5XdsqaPSEGsKESY1IK+dMv +K+YUrfrtexZyb66wCtupYziEeag6iEK/i2x2wewOji6IvtI+wB5FO+YMXw+LKucw +PoHUOxjoz6YX3s04UxFaZo4R8x6J9XnJBSB2E5kfsSAzz3xR+zuapXY6H6mo/grq +nr3c6ACcbAHnMWwQLYvWzde6iwswhyl0whebsajJH7Rd3G4c1U3L/oj4RwUFmZYU +5Prs+Q5PepKAJfBeWCXZtUY2BNFCFj7b2H2NXYFR92Oc2GtoHAYACNeP070I9d3m +IeuYhOrOckkunwaijUczq4rb3n3Vaq6YrdwZIzs8fALwc9Th98jj2dCUq0fljpSh +UQFnPG83UsNkeWzUSgw+lBeEQqgOqUQQ293MbgRg0mJ8q677Iv+WaFqPKZzXxkwT +QCCXhjcBmUKgXIHLFcbfmkR8pCcCToWXBD8CU441cBsootDD7SanPHbpcwZjt74x +uLrVoCIyaju0T1jSrsPnm2A/8VkWLSCh1WRAlbjvMr7DwizGnRtzTiB6HQARAQAB +tC9NaWNoYWVsIEZvcmQgKGJpdGNvaW4tb3RjKSA8ZmFucXVha2VAZ21haWwuY29t +PokCNwQTAQoAIQUCUWVXugIbLwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCU +TTX5rD23agJgEAC0ouDjufjCMHL4DkaVkOnFbHzP+nR2Mq7pcjdiPNIt9tj8B6cI +PRh/E+tt2iEJJ4lzlfj0uEqjqexmSBaMgY+pFb6ESg42EPQjRQ95oBoyZfp+uL/0 +KC3+Hh+EgmZGIFPZy2HneVfusiBUz2/YTOoqFkzmHalJe9Yvl2+dO0SUC7i6TUdJ ++ugSr/91hkjQC52LXgHzurH4zOz7ZjzRtZgUIG3oOx8mtEDf46eJ0IUsr+tWJqOp +ce5xFh6nkKfS92B7YjGJ4YrkBHC7F9vmbrtIeuWiaxGzVqhHFmLvQe+4xyOpRgHM +kcyD5uJNmSMO9gT3udut4hd0yUKg5rdqaUzqsvv19eNL/pZ7aBK2aDAK/yAi1T7X +/nrhBJAU49zg1JRS6atRnhKSyd7wRSwVPJAXfVuelHsUgenSdLmSBxRha+9mL6Lb +bLK/Dij/0r2fyhBJx4pV6V1n4BpHjv5ivkpgCvOupx8wx3PIxZq/rx+hK+ZBe2EQ +7vq8rmLfBkSavHWyNxXEKWQed+mFS3d+Qsoy90bi7gQygIYNZOIBYwsy+qjCZ3om +LwkzRjypH23ps7WmiaoenOaCjRYooNL4qtQwNVaDGYwvbMnXJ8Vb4/2j/Riz7+Ui +BBVww+Wd72Fml/OFPDFep6HG/PuwFB9m5hmfSzrA01TIdjcWljtTDneufbkCDQRR +ZVe6ARAAvi1IAxn9xKQCCqhsoKOiXNbpnmf6lYnoEwGtgI+0a0YQwtzm39P5T8P0 +esZ65/Re6jCCHLc23/urFPfW9VfrKPmNJncyzlx7OopJ7G1MWdRLEUzwqSaglC6x +Zb4r1xR6eq2lBX6CAa5Q+AuAqkoGCEiYBpTyKij4sXE0c+Y9nIDIZhru7EnZvpL3 +SQvxzFryQLbWCGri0x9GKXZ2ZcDM7jRi/P+iX6yX6sVvOvyKz6NW2BI5OmpI1JbJ +3fIXt/R6Wl2xpAFL/pxtYTYbfL6277HWtLDTqIkkRFKh64JdkH8n4G4m6VNUtGEu +qP3SxtyShauxY44WzR0YX4rag6tU2Hks6h1JmyF8aQTBAkdP7UrQ0oxZ8f+iG9n6 +3GtTxgw2NyrqVMx3kBLm8DipyslbA2wCeZLrW6Co0j3pebJsDrMP/3zcmbJqRSLq +qnkcxA4gn5j/N0oe8t26Y2WjovndhoR0QQxw8D/BKoMXbl0lvvRAtcnWtyG0COut +AGB2PUbGdAX2Ky+uYKrG4uhu1edfV8JZVvB7NIQGzM2P8F9PrDRz7EtG6z7ky/pq +HQwRbqwLWGs4QpQmHZchFmXH7pHmLC8i29W+xYhdeUstvx7oESbunICGrPjJOShJ +G4191Zg0m/M6jeWV/v+piUXe3YVrgs42UWFusm5ZIduPUfgqUtkAEQEAAYkEPgQY +AQoACQUCUWVXugIbLgIpCRCUTTX5rD23asFdIAQZAQoABgUCUWVXugAKCRAu659c +wJUmwaduEACCiiRpBeKF5fSaM0cTb97hAHVQJL9Wk3xvA49YuROsSwtCzq9v+js5 +f/fE+QV/dIQUNwifEPQk8MqUVKpe1lIXwRp23GinzDAnOhfWnECqrMdR0dP99D49 +Zb7Dd4LDvP9c0mYtnX/78qQilxWmXhzDXcunnPsfCqsrduk9hMwkjmIrWFeSWSAg +BEJDuZ4WLuqjni1udth0iZtZYrDaDgX/RWcTFW8QCc5hLsCRcInAxb75AWfWq6i/ +s3Ibg5tGm4+UfqGbFPuNyy6ow3ggqkovBp6ABMxe8dAYVXSmM2tKWZXBb3L6eho8 +QKKzyoezqpbQ2YUaYZ8XAdLuumXCtAHKP3/DI1JBefE0mxi1CXjdLK9sE5OO5KNt +FXR8Dnot5C4BHrcaF6Iq2sqbhPxnhcDrEwv2mUgruD7n04LKIztAG0A35rcu6A2i +IUq/PsXjS/5rX/p4CeYvnTTspXkhXgkvfhWz1cISXyfcNTWBKwOsLW4lY8bi05cv +4Axl88tTg2dNYXIxSK7Jtu1YCEsZ8uaT3AAiTp1sKAOcRX8hIOTmPPxMxbIm8yg1 +jl71ovsV5rAyuVTUouFnljXyuLWXLotUOkmC6DjJUuRaxzt23/eByJ45x94T/A2U +iT1oU+voigQGARrDkApXlgSI4oekg3Zgq57y6toV9F7o9A1PMtBq3AvDD/0as1K0 +wCRZIXinSwW2F6tFnVV+z+vvE0i54yHaskkuJYZRSQ/yJR1VgmW/BtAr7ooXF7l+ +9g7XOH7D8T28h+m4ABLN5ZDOxfTMZuV5Y4MnELh4dlBIfKGG2kjmW8+y/PUqMMGE +BYRmGOD1qtWvFYoZ2ss5yrlvfenRRhQbIYSRz/YiT8OTogaNcYNpArUwT4z+05af +kdxx0AaqauHqKRo/XTO5GIZQ6NbtPH6G++2Ie+oP8AyBWEpL3rvjZpzn7jxTBXMc +MOMmhnb0Go4hD+BSphgDTZOgMLOLcorjb1Ct2VnajxPZD0aTB13SCgZjJhs9j3on +EoI3gTHkRgiBjMBNtw7iaAumIRgrDwGzyuIL6bbyfDnbE02zxCqkYP6P0u48FGLs +E4U60GrYSlFxa1MexF+HIPgqWsTOv4D2zXEJYvm1XEu1VOGQUkw7J5RFTDxHgkbh +qvmkZ492iW2IC4L9hSdSqiZ5LhD2JwpgrMt8vrCzVitkjYQnXJ6WbWYfCybPsmLb +mfQ03i9E+a50UC2SGDf8e3oxImAbbXLP/LyI7oczCxyb0EzcQlIIOtBgl3gI6KAh +PTRQGeHCzIOSgUf7B0ihY7qiDeR1OshvTY0wdykdS0c+hzwuS5TZvfY4YM7Tssvt +XwbdK0Zpx/oDtRHpuDMGKJBV2LWAZYkEbFsmtg== +=3o2I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/contrib/gitian-downloader/jonasschnelli-key.pgp b/contrib/gitian-downloader/jonasschnelli-key.pgp new file mode 100644 index 00000000000..fe44c0fbd4e Binary files /dev/null and b/contrib/gitian-downloader/jonasschnelli-key.pgp differ diff --git a/contrib/gitian-downloader/linux-download-config b/contrib/gitian-downloader/linux-download-config index f5e6382b846..4c037795267 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: diff --git a/contrib/gitian-downloader/luke-jr-key.pgp b/contrib/gitian-downloader/luke-jr-key.pgp index 275b041d205..4406e6d5be0 100644 Binary files a/contrib/gitian-downloader/luke-jr-key.pgp and b/contrib/gitian-downloader/luke-jr-key.pgp differ diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config index 06c164180d5..083bce5de81 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: diff --git a/contrib/init/README.md b/contrib/init/README.md index d3fa9665839..0d19da30399 100644 --- a/contrib/init/README.md +++ b/contrib/init/README.md @@ -4,6 +4,7 @@ SystemD: bitcoind.service Upstart: bitcoind.conf OpenRC: bitcoind.openrc bitcoind.openrcconf +CentOS: bitcoind.init have been made available to assist packagers in creating node packages here. diff --git a/contrib/init/bitcoind.init b/contrib/init/bitcoind.init new file mode 100644 index 00000000000..db5061874b3 --- /dev/null +++ b/contrib/init/bitcoind.init @@ -0,0 +1,67 @@ +#!/bin/bash +# +# bitcoind The bitcoin core server. +# +# +# chkconfig: 345 80 20 +# description: bitcoind +# processname: bitcoind +# + +# Source function library. +. /etc/init.d/functions + +# you can override defaults in /etc/sysconfig/bitcoind, see below +if [ -f /etc/sysconfig/bitcoind ]; then + . /etc/sysconfig/bitcoind +fi + +RETVAL=0 + +prog=bitcoind +# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind +lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind} + +# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN +bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind} + +# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS +bitcoind_opts=${BITCOIND_OPTS--disablewallet} + +start() { + echo -n $"Starting $prog: " + daemon $DAEMONOPTS $bitcoind $bitcoind_opts + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $prog + ;; + restart) + stop + start + ;; + *) + echo "Usage: service $prog {start|stop|status|restart}" + exit 1 + ;; +esac diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc index 1f7758c9202..a94f03680d3 100644 --- a/contrib/init/bitcoind.openrc +++ b/contrib/init/bitcoind.openrc @@ -12,12 +12,14 @@ BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf} BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind} BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid} BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}} -BITCOIND_USER=${BITCOIND_USER:-bitcoin} +BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}} BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin} BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind} +BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}} +BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}" name="Bitcoin Core Daemon" -description="Bitcoin crypto-currency p2p network daemon" +description="Bitcoin cryptocurrency P2P network daemon" command="/usr/bin/bitcoind" command_args="-pid=\"${BITCOIND_PIDFILE}\" \ @@ -28,7 +30,7 @@ command_args="-pid=\"${BITCOIND_PIDFILE}\" \ required_files="${BITCOIND_CONFIGFILE}" start_stop_daemon_args="-u ${BITCOIND_USER} \ - -N ${BITCOIND_NICE:-0} -w 2000" + -N ${BITCOIND_NICE} -w 2000" pidfile="${BITCOIND_PIDFILE}" retry=60 diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index e0fef13886d..38da02e66c1 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -4,13 +4,23 @@ rpcuser=someuser rpcpassword=somepassword host=127.0.0.1 port=8332 +#port=18332 # bootstrap.dat hashlist settings (linearize-hashes) max_height=313000 # bootstrap.dat input/output settings (linearize-data) + +# mainnet netmagic=f9beb4d9 +genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f input=/home/example/.bitcoin/blocks + +# testnet +#netmagic=0b110907 +#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 +#input=/home/example/.bitcoin/testnet3/blocks + output_file=/home/example/Downloads/bootstrap.dat hashlist=hashlist.txt split_year=1 diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py index a3a1173b1f3..7947c6bf726 100755 --- a/contrib/linearize/linearize-data.py +++ b/contrib/linearize/linearize-data.py @@ -205,7 +205,7 @@ def run(self): inMagic = inhdr[:4] if (inMagic != self.settings['netmagic']): - print("Invalid magic: " + inMagic) + print("Invalid magic: " + inMagic.encode('hex')) return inLenLE = inhdr[4:] su = struct.unpack("/dev/null - mv ${i}.tmp ${TARGET_FILE} - rm ${i} + 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} diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh index aff4f08da8b..89a2da32f7a 100755 --- a/contrib/macdeploy/detached-sig-create.sh +++ b/contrib/macdeploy/detached-sig-create.sh @@ -2,11 +2,12 @@ set -e ROOTDIR=dist -BUNDLE=${ROOTDIR}/Bitcoin-Qt.app +BUNDLE="${ROOTDIR}/Bitcoin-Qt.app" CODESIGN=codesign TEMPDIR=sign.temp TEMPLIST=${TEMPDIR}/signatures.txt OUT=signature.tar.gz +OUTROOT=osx if [ ! -n "$1" ]; then echo "usage: $0 " @@ -19,20 +20,20 @@ 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}`" +grep -v CodeResources < "${TEMPLIST}" | while read i; 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}/${OUTROOT}/${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 + 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}" +grep CodeResources < "${TEMPLIST}" | while read i; do + TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`" + RESOURCE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}" DIRNAME="`dirname "${RESOURCE}"`" mkdir -p "${DIRNAME}" echo "Adding resource for: "${TARGETFILE}"" @@ -41,6 +42,6 @@ done rm ${TEMPLIST} -tar -C ${TEMPDIR} -czf ${OUT} . -rm -rf ${TEMPDIR} +tar -C "${TEMPDIR}" -czf "${OUT}" . +rm -rf "${TEMPDIR}" echo "Created ${OUT}" diff --git a/contrib/macdeploy/fancy.plist b/contrib/macdeploy/fancy.plist index e73b9b697ef..ef277a7f14a 100644 --- a/contrib/macdeploy/fancy.plist +++ b/contrib/macdeploy/fancy.plist @@ -10,7 +10,7 @@ 620 background_picture - background.png + background.tiff icon_size 96 applications_symlink diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 541136001fc..2253c40af1f 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -155,7 +155,7 @@ class FrameworkInfo(object): class ApplicationBundleInfo(object): def __init__(self, path): self.path = path - appName = os.path.splitext(os.path.basename(path))[0] + appName = "Bitcoin-Qt" self.binaryPath = os.path.join(path, "Contents", "MacOS", appName) if not os.path.exists(self.binaryPath): raise RuntimeError("Could not find bundle binary for " + path) @@ -596,7 +596,7 @@ if os.path.exists("dist"): # ------------------------------------------------ -target = os.path.join("dist", app_bundle) +target = os.path.join("dist", "Bitcoin-Qt.app") if verbose >= 2: print "+ Copying source bundle +" @@ -757,7 +757,7 @@ if config.dmg is not None: if fancy is None: try: - runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname=app_bundle_name, ov=True) + runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname="Bitcoin-Core", ov=True) except subprocess.CalledProcessError as e: sys.exit(e.returncode) else: @@ -767,12 +767,12 @@ if config.dmg is not None: for path, dirs, files in os.walk("dist"): for file in files: size += os.path.getsize(os.path.join(path, file)) - size += int(size * 0.1) + size += int(size * 0.15) if verbose >= 3: print "Creating temp image for modification..." try: - runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname=app_bundle_name, ov=True) + runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname="Bitcoin-Core", ov=True) except subprocess.CalledProcessError as e: sys.exit(e.returncode) @@ -791,7 +791,8 @@ if config.dmg is not None: print "+ Applying fancy settings +" if fancy.has_key("background_picture"): - bg_path = os.path.join(disk_root, os.path.basename(fancy["background_picture"])) + bg_path = os.path.join(disk_root, ".background", os.path.basename(fancy["background_picture"])) + os.mkdir(os.path.dirname(bg_path)) if verbose >= 3: print fancy["background_picture"], "->", bg_path shutil.copy2(fancy["background_picture"], bg_path) @@ -836,7 +837,7 @@ if config.dmg is not None: items_positions.append(itemscript.substitute(params)) params = { - "disk" : "Bitcoin-Qt", + "disk" : "Bitcoin-Core", "window_bounds" : "300,300,800,620", "icon_size" : "96", "background_commands" : "", @@ -849,8 +850,8 @@ if config.dmg is not None: if bg_path is not None: # Set background file, then call SetFile to make it invisible. # (note: making it invisible first makes set background picture fail) - bgscript = Template("""set background picture of theViewOptions to file "$bgpic" - do shell script "SetFile -a V /Volumes/$disk/$bgpic" """) + bgscript = Template("""set background picture of theViewOptions to file ".background:$bgpic" + do shell script "SetFile -a V /Volumes/$disk/.background/$bgpic" """) params["background_commands"] = bgscript.substitute({"bgpic" : os.path.basename(bg_path), "disk" : params["disk"]}) s = appscript.substitute(params) diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md index f9a0c277e2e..63647fa11aa 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 other utilities in [contrib/seeds](/contrib/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/share/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py similarity index 96% rename from share/seeds/generate-seeds.py rename to contrib/seeds/generate-seeds.py index cdd68312185..167c219c6e0 100755 --- a/share/seeds/generate-seeds.py +++ b/contrib/seeds/generate-seeds.py @@ -77,6 +77,9 @@ def parse_spec(s, defaultport): if match: # ipv6 host = match.group(1) port = match.group(2) + elif s.count(':') > 1: # ipv6, no port + host = s + port = '' else: (host,_,port) = s.partition(':') @@ -118,7 +121,7 @@ def main(): g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n') g.write('/**\n') g.write(' * List of fixed seed nodes for the bitcoin network\n') - g.write(' * AUTOGENERATED by share/seeds/generate-seeds.py\n') + g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n') g.write(' *\n') g.write(' * Each line contains a 16-byte IPv6 address and a port.\n') g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n') diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 1d01fd7d209..4072405ef50 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -1,32 +1,169 @@ #!/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 = 337600 + +# 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 +import collections -def main(): - lines = sys.stdin.readlines() +PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$") +PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$") +PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$") +PATTERN_AGENT = re.compile(r"^(\/Satoshi:0\.8\.6\/|\/Satoshi:0\.9\.(2|3|4|5)\/|\/Satoshi:0\.10\.\d{1,2}\/|\/Satoshi:0\.11\.\d{1,2}\/)$") - ips = [] - pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):8333") - for line in lines: - m = pattern.match(line) +def parseline(line): + sline = line.split() + if len(sline) < 11: + return None + m = PATTERN_IPV4.match(sline[0]) + sortkey = None + ip = None + if m is None: + m = PATTERN_IPV6.match(sline[0]) if m is None: - continue + m = PATTERN_ONION.match(sline[0]) + if m is None: + return None + else: + net = 'onion' + ipstr = sortkey = m.group(1) + port = int(m.group(2)) + else: + net = 'ipv6' + if m.group(1) in ['::']: # Not interested in localhost + return None + ipstr = m.group(1) + sortkey = ipstr # XXX parse IPv6 into number, could use name_to_ipv6 from generate-seeds + port = int(m.group(2)) + else: + # Do IPv4 sanity check ip = 0 for i in range(0,4): - ip = ip + (int(m.group(i+1)) << (8*(i))) + 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: - continue - ips.append(ip) + return None + net = 'ipv4' + sortkey = ip + ipstr = m.group(1) + port = int(m.group(6)) + # 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 { + 'net': net, + 'ip': ipstr, + 'port': port, + 'ipnum': ip, + 'uptime': uptime30, + 'lastsuccess': lastsuccess, + 'version': version, + 'agent': agent, + 'service': service, + 'blocks': blocks, + 'sortkey': sortkey, + } + +def filtermultiport(ips): + '''Filter out hosts with more nodes per IP''' + hist = collections.defaultdict(list) + for ip in ips: + hist[ip['sortkey']].append(ip) + return [value[0] for (key,value) in hist.items() if len(value)==1] + +# Based on Greg Maxwell's seed_filter.py +def filterbyasn(ips, max_per_asn, max_total): + # Sift out ips by type + ips_ipv4 = [ip for ip in ips if ip['net'] == 'ipv4'] + ips_ipv6 = [ip for ip in ips if ip['net'] == 'ipv6'] + ips_onion = [ip for ip in ips if ip['net'] == 'onion'] + + # Filter IPv4 by ASN + result = [] + asn_count = {} + for ip in ips_ipv4: + 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') + + # TODO: filter IPv6 by ASN + + # Add back non-IPv4 + result.extend(ips_ipv6) + result.extend(ips_onion) + return result + +def main(): + lines = sys.stdin.readlines() + ips = [parseline(line) for line in lines] + + # Skip entries with valid 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) + # Filter out hosts with multiple bitcoin ports, these are likely abusive + ips = filtermultiport(ips) + # 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['net'], x['sortkey'])) - 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: + if ip['net'] == 'ipv6': + print '[%s]:%i' % (ip['ip'], ip['port']) + else: + print '%s:%i' % (ip['ip'], ip['port']) if __name__ == '__main__': main() diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt new file mode 100644 index 00000000000..17339d514af --- /dev/null +++ b/contrib/seeds/nodes_main.txt @@ -0,0 +1,879 @@ +1.34.168.128:8333 +1.202.128.218:8333 +2.30.0.210:8333 +5.9.96.203:8333 +5.45.71.130:8333 +5.45.98.141:8333 +5.102.145.68:8333 +5.135.160.77:8333 +5.189.134.246:8333 +5.199.164.132:8333 +5.249.135.102:8333 +8.19.44.110:8333 +8.22.230.8:8333 +14.200.200.145:8333 +18.228.0.188:8333 +18.228.0.200:8333 +23.24.168.97:8333 +23.28.35.227:8333 +23.92.76.170:8333 +23.99.64.119:8333 +23.228.166.128:8333 +23.229.45.32:8333 +24.8.105.128:8333 +24.16.69.137:8333 +24.94.98.96:8333 +24.102.118.7:8333 +24.118.166.228:8333 +24.122.133.49:8333 +24.166.97.162:8333 +24.213.235.242:8333 +24.226.107.64:8333 +24.228.192.171:8333 +27.140.133.18:8333 +31.41.40.25:8333 +31.43.101.59:8333 +31.184.195.181:8333 +31.193.139.66:8333 +37.200.70.102:8333 +37.205.10.151:8333 +42.3.106.227:8333 +42.60.133.106:8333 +45.56.85.231:8333 +45.56.102.228:8333 +45.79.130.235:8333 +46.28.204.61:11101 +46.38.235.229:8333 +46.59.2.74:8333 +46.101.132.37:8333 +46.101.168.50:8333 +46.163.76.230:8333 +46.166.161.103:8333 +46.182.132.100:8333 +46.223.36.94:8333 +46.227.66.132:8333 +46.227.66.138:8333 +46.239.107.74:8333 +46.249.39.100:8333 +46.250.98.108:8333 +50.7.37.114:8333 +50.81.53.151:8333 +50.115.43.253:8333 +50.116.20.87:8333 +50.116.33.92:8333 +50.125.167.245:8333 +50.143.9.51:8333 +50.188.192.133:8333 +54.77.162.76:8333 +54.153.97.109:8333 +54.165.192.125:8333 +58.96.105.85:8333 +59.167.196.135:8333 +60.29.227.163:8333 +61.35.225.19:8333 +62.43.130.178:8333 +62.109.49.26:8333 +62.202.0.97:8333 +62.210.66.227:8333 +62.210.192.169:8333 +64.74.98.205:8333 +64.156.193.100:8333 +64.203.102.86:8333 +64.229.142.48:8333 +65.96.193.165:8333 +66.30.3.7:8333 +66.114.33.49:8333 +66.118.133.194:8333 +66.135.10.126:8333 +66.172.10.4:8333 +66.194.38.250:8333 +66.194.38.253:8333 +66.215.192.104:8333 +67.60.98.115:8333 +67.164.35.36:8333 +67.191.162.244:8333 +67.207.195.77:8333 +67.219.233.140:8333 +67.221.193.55:8333 +67.228.162.228:8333 +68.50.67.199:8333 +68.62.3.203:8333 +68.65.205.226:9000 +68.106.42.191:8333 +68.150.181.198:8333 +68.196.196.106:8333 +68.224.194.81:8333 +69.46.5.194:8333 +69.50.171.238:8333 +69.64.43.152:8333 +69.65.41.13:8333 +69.90.132.200:8333 +69.143.1.243:8333 +69.146.98.216:8333 +69.165.246.38:8333 +69.207.6.135:8333 +69.251.208.26:8333 +70.38.1.101:8333 +70.38.9.66:8333 +70.90.2.18:8333 +71.58.228.226:8333 +71.199.11.189:8333 +71.199.193.202:8333 +71.205.232.181:8333 +71.236.200.162:8333 +72.24.73.186:8333 +72.52.130.110:8333 +72.53.111.37:8333 +72.235.38.70:8333 +73.31.171.149:8333 +73.32.137.72:8333 +73.137.133.238:8333 +73.181.192.103:8333 +73.190.2.60:8333 +73.195.192.137:8333 +73.222.35.117:8333 +74.57.199.180:8333 +74.82.233.205:8333 +74.85.66.82:8333 +74.101.224.127:8333 +74.113.69.16:8333 +74.122.235.68:8333 +74.193.68.141:8333 +74.208.164.219:8333 +75.100.37.122:8333 +75.145.149.169:8333 +75.168.34.20:8333 +76.20.44.240:8333 +76.100.70.17:8333 +76.168.3.239:8333 +76.186.140.103:8333 +77.92.68.221:8333 +77.109.101.142:8333 +77.110.11.86:8333 +77.242.108.18:8333 +78.46.96.150:9020 +78.84.100.95:8333 +79.132.230.144:8333 +79.133.43.63:8333 +79.160.76.153:8333 +79.169.34.24:8333 +79.188.7.78:8333 +80.217.226.25:8333 +80.223.100.179:8333 +80.240.129.221:8333 +81.1.173.243:8333 +81.7.11.50:8333 +81.7.16.17:8333 +81.66.111.3:8333 +81.80.9.71:8333 +81.140.43.138:8333 +81.171.34.37:8333 +81.174.247.50:8333 +81.181.155.53:8333 +81.184.5.253:8333 +81.187.69.130:8333 +81.230.3.84:8333 +82.42.128.51:8333 +82.74.226.21:8333 +82.142.75.50:8333 +82.199.102.10:8333 +82.200.205.30:8333 +82.221.108.21:8333 +82.221.128.35:8333 +82.238.124.41:8333 +82.242.0.245:8333 +83.76.123.110:8333 +83.150.9.196:8333 +83.162.196.192:8333 +83.162.234.224:8333 +83.170.104.91:8333 +83.255.66.118:8334 +84.2.34.104:8333 +84.45.98.91:8333 +84.47.161.150:8333 +84.212.192.131:8333 +84.215.169.101:8333 +84.238.140.176:8333 +84.245.71.31:8333 +85.17.4.212:8333 +85.114.128.134:8333 +85.159.237.191:8333 +85.166.130.189:8333 +85.199.4.228:8333 +85.214.66.168:8333 +85.214.195.210:8333 +85.229.0.73:8333 +86.21.96.45:8333 +87.48.42.199:8333 +87.81.143.82:8333 +87.81.251.72:8333 +87.104.24.185:8333 +87.104.168.104:8333 +87.117.234.71:8333 +87.118.96.197:8333 +87.145.12.57:8333 +87.159.170.190:8333 +88.150.168.160:8333 +88.208.0.79:8333 +88.208.0.149:8333 +88.214.194.226:8343 +89.1.11.32:8333 +89.36.235.108:8333 +89.67.96.2:15321 +89.98.16.41:8333 +89.108.72.195:8333 +89.156.35.157:8333 +89.163.227.28:8333 +89.212.33.237:8333 +89.212.160.165:8333 +89.231.96.83:8333 +89.248.164.64:8333 +90.149.193.199:8333 +91.77.239.245:8333 +91.106.194.97:8333 +91.126.77.77:8333 +91.134.38.195:8333 +91.156.97.181:8333 +91.207.68.144:8333 +91.209.77.101:8333 +91.214.200.205:8333 +91.220.131.242:8333 +91.220.163.18:8333 +91.233.23.35:8333 +92.13.96.93:8333 +92.14.74.114:8333 +92.27.7.209:8333 +92.221.228.13:8333 +92.255.207.73:8333 +93.72.167.148:8333 +93.74.163.234:8333 +93.123.174.66:8333 +93.152.166.29:8333 +93.181.45.188:8333 +94.19.12.244:8333 +94.190.227.112:8333 +94.198.135.29:8333 +94.224.162.65:8333 +94.226.107.86:8333 +94.242.198.161:8333 +95.31.10.209:8333 +95.65.72.244:8333 +95.84.162.95:8333 +95.90.139.46:8333 +95.183.49.27:8005 +95.215.47.133:8333 +96.23.67.85:8333 +96.44.166.190:8333 +97.93.225.74:8333 +98.26.0.34:8333 +98.27.225.102:8333 +98.229.117.229:8333 +98.249.68.125:8333 +98.255.5.155:8333 +99.101.240.114:8333 +101.100.174.138:8333 +101.251.203.6:8333 +103.3.60.61:8333 +103.30.42.189:8333 +103.224.165.48:8333 +104.36.83.233:8333 +104.37.129.22:8333 +104.54.192.251:8333 +104.128.228.252:8333 +104.128.230.185:8334 +104.130.161.47:8333 +104.131.33.60:8333 +104.143.0.156:8333 +104.156.111.72:8333 +104.167.111.84:8333 +104.193.40.248:8333 +104.197.7.174:8333 +104.197.8.250:8333 +104.223.1.133:8333 +104.236.97.140:8333 +104.238.128.214:8333 +104.238.130.182:8333 +106.38.234.84:8333 +106.185.36.204:8333 +107.6.4.145:8333 +107.150.2.6:8333 +107.150.40.234:8333 +107.155.108.130:8333 +107.161.182.115:8333 +107.170.66.231:8333 +107.190.128.226:8333 +107.191.106.115:8333 +108.16.2.61:8333 +109.70.4.168:8333 +109.162.35.196:8333 +109.163.235.239:8333 +109.190.196.220:8333 +109.191.39.60:8333 +109.234.106.191:8333 +109.238.81.82:8333 +114.76.147.27:8333 +115.28.224.127:8333 +115.68.110.82:18333 +118.97.79.218:8333 +118.189.207.197:8333 +119.228.96.233:8333 +120.147.178.81:8333 +121.41.123.5:8333 +121.67.5.230:8333 +122.107.143.110:8333 +123.2.170.98:8333 +123.110.65.94:8333 +123.193.139.19:8333 +125.239.160.41:8333 +128.101.162.193:8333 +128.111.73.10:8333 +128.140.229.73:8333 +128.175.195.31:8333 +128.199.107.63:8333 +128.199.192.153:8333 +128.253.3.193:20020 +129.123.7.7:8333 +130.89.160.234:8333 +131.72.139.164:8333 +131.191.112.98:8333 +133.1.134.162:8333 +134.19.132.53:8333 +137.226.34.42:8333 +141.41.2.172:8333 +141.255.128.204:8333 +142.217.12.106:8333 +143.215.129.126:8333 +146.0.32.101:8337 +147.229.13.199:8333 +149.210.133.244:8333 +149.210.162.187:8333 +150.101.163.241:8333 +151.236.11.189:8333 +153.121.66.211:8333 +154.20.2.139:8333 +159.253.23.132:8333 +162.209.106.123:8333 +162.210.198.184:8333 +162.218.65.121:8333 +162.222.161.49:8333 +162.243.132.6:8333 +162.243.132.58:8333 +162.248.99.164:53011 +162.248.102.117:8333 +163.158.35.110:8333 +164.15.10.189:8333 +164.40.134.171:8333 +166.230.71.67:8333 +167.160.161.199:8333 +168.103.195.250:8333 +168.144.27.112:8333 +168.158.129.29:8333 +170.75.162.86:8333 +172.90.99.174:8333 +172.245.5.156:8333 +173.23.166.47:8333 +173.32.11.194:8333 +173.34.203.76:8333 +173.171.1.52:8333 +173.175.136.13:8333 +173.230.228.139:8333 +173.247.193.70:8333 +174.49.132.28:8333 +174.52.202.72:8333 +174.53.76.87:8333 +174.109.33.28:8333 +176.28.12.169:8333 +176.35.182.214:8333 +176.36.33.113:8333 +176.36.33.121:8333 +176.58.96.173:8333 +176.121.76.84:8333 +178.62.70.16:8333 +178.62.111.26:8333 +178.76.169.59:8333 +178.79.131.32:8333 +178.162.199.216:8333 +178.175.134.35:8333 +178.248.111.4:8333 +178.254.1.170:8333 +178.254.34.161:8333 +179.43.143.120:8333 +179.208.156.198:8333 +180.200.128.58:8333 +183.78.169.108:8333 +183.96.96.152:8333 +184.68.2.46:8333 +184.73.160.160:8333 +184.94.227.58:8333 +184.152.68.163:8333 +185.7.35.114:8333 +185.28.76.179:8333 +185.31.160.202:8333 +185.45.192.129:8333 +185.66.140.15:8333 +186.2.167.23:8333 +186.220.101.142:8333 +188.26.5.33:8333 +188.75.136.146:8333 +188.120.194.140:8333 +188.121.5.150:8333 +188.138.0.114:8333 +188.138.33.239:8333 +188.166.0.82:8333 +188.182.108.129:8333 +188.191.97.208:8333 +188.226.198.102:8001 +190.10.9.217:8333 +190.75.143.144:8333 +190.139.102.146:8333 +191.237.64.28:8333 +192.3.131.61:8333 +192.99.225.3:8333 +192.110.160.122:8333 +192.146.137.1:8333 +192.183.198.204:8333 +192.203.228.71:8333 +193.0.109.3:8333 +193.12.238.204:8333 +193.91.200.85:8333 +193.234.225.156:8333 +194.6.233.38:8333 +194.63.143.136:8333 +194.126.100.246:8333 +195.134.99.195:8333 +195.159.111.98:8333 +195.159.226.139:8333 +195.197.175.190:8333 +198.48.199.108:8333 +198.57.208.134:8333 +198.57.210.27:8333 +198.62.109.223:8333 +198.167.140.8:8333 +198.167.140.18:8333 +199.91.173.234:8333 +199.127.226.245:8333 +199.180.134.116:8333 +200.7.96.99:8333 +201.160.106.86:8333 +202.55.87.45:8333 +202.60.68.242:8333 +202.60.69.232:8333 +202.124.109.103:8333 +203.30.197.77:8333 +203.88.160.43:8333 +203.151.140.14:8333 +203.219.14.204:8333 +205.147.40.62:8333 +207.235.39.214:8333 +207.244.73.8:8333 +208.12.64.225:8333 +208.76.200.200:8333 +209.40.96.121:8333 +209.126.107.176:8333 +209.141.40.149:8333 +209.190.75.59:8333 +209.208.111.142:8333 +210.54.34.164:8333 +211.72.66.229:8333 +212.51.144.42:8333 +212.112.33.157:8333 +212.116.72.63:8333 +212.126.14.122:8333 +213.66.205.194:8333 +213.111.196.21:8333 +213.122.107.102:8333 +213.136.75.175:8333 +213.155.7.24:8333 +213.163.64.31:8333 +213.163.64.208:8333 +213.165.86.136:8333 +213.184.8.22:8333 +216.15.78.182:8333 +216.55.143.154:8333 +216.115.235.32:8333 +216.126.226.166:8333 +216.145.67.87:8333 +216.169.141.169:8333 +216.249.92.230:8333 +216.250.138.230:8333 +217.20.171.43:8333 +217.23.2.71:8333 +217.23.2.242:8333 +217.25.9.76:8333 +217.40.226.169:8333 +217.123.98.9:8333 +217.155.36.62:8333 +217.172.32.18:20993 +218.61.196.202:8333 +218.231.205.41:8333 +220.233.77.200:8333 +223.18.226.85:8333 +223.197.203.82:8333 +223.255.166.142:8333 +[2001:1291:2bf:1::100]:8333 +[2001:1418:100:5c2::2]:8333 +[2001:16d8:dd24:0:86c9:681e:f931:256]:8333 +[2001:19f0:1624:e6::579d:9428]:8333 +[2001:19f0:300:1340:225:90ff:fec9:2b6d]:8333 +[2001:19f0:4009:1405::64]:8333 +[2001:1b40:5000:2e::3fb0:6571]:8333 +[2001:410:a000:4050:8463:90b0:fffb:4e58]:8333 +[2001:410:a002:cafe:8463:90b0:fffb:4e58]:8333 +[2001:41d0:1:541e::1]:8333 +[2001:41d0:1:6a34::3]:8333 +[2001:41d0:1:6cd3::]:8333 +[2001:41d0:1:8b26::1]:8333 +[2001:41d0:1:a33d::1]:8333 +[2001:41d0:1:b855::1]:8333 +[2001:41d0:1:c139::1]:8333 +[2001:41d0:1:c8d7::1]:8333 +[2001:41d0:1:dd3f::1]:8333 +[2001:41d0:1:e29d::1]:8333 +[2001:41d0:1:f59f::33]:8333 +[2001:41d0:1:f7cc::1]:8333 +[2001:41d0:1:ff87::1]:8333 +[2001:41d0:2:2f05::1]:8333 +[2001:41d0:2:37c3::]:8200 +[2001:41d0:2:3e13::1]:8333 +[2001:41d0:2:8619::]:8333 +[2001:41d0:2:9c94::1]:8333 +[2001:41d0:2:a24f::]:8333 +[2001:41d0:2:adbf::]:8333 +[2001:41d0:2:b721::1]:8333 +[2001:41d0:2:ee52::1]:8333 +[2001:41d0:2:f1a5::]:8333 +[2001:41d0:2:fa54::1]:8333 +[2001:41d0:51:1::2036]:8333 +[2001:41d0:52:a00::1a1]:8333 +[2001:41d0:52:cff::6f5]:8333 +[2001:41d0:52:d00::2c0]:8333 +[2001:41d0:52:d00::cf2]:8333 +[2001:41d0:8:1087::1]:8333 +[2001:41d0:8:4a3c::b7c]:8333 +[2001:41d0:8:6728::]:8333 +[2001:41d0:8:b779::1]:8333 +[2001:41d0:8:c30f::1]:8333 +[2001:41d0:8:d2b2::1]:8333 +[2001:41d0:8:d5c3::1]:8333 +[2001:41d0:8:eb8b::]:8333 +[2001:41d0:a:16d0::1]:8333 +[2001:41d0:a:2b18::1]:8333 +[2001:41d0:a:3a9c::1]:8333 +[2001:41d0:a:4903::]:8333 +[2001:41d0:a:57b::1]:8333 +[2001:41d0:a:5c7a::]:8333 +[2001:41d0:a:6c29::1]:8333 +[2001:41d0:a:f482::1]:8333 +[2001:41d0:b:854:b7c:b7c:b7c:b7c]:8333 +[2001:41d0:d:111c::]:8333 +[2001:44b8:4116:7801:4216:7eff:fe78:3fe4]:8333 +[2001:470:1f08:837::2]:8333 +[2001:470:1f08:c33::2]:8333 +[2001:470:1f09:bca:218:7dff:fe10:be33]:8333 +[2001:470:1f0f:22d::212:26]:8333 +[2001:470:1f11:12d5::ae1:5611]:8333 +[2001:470:1f14:57a::2]:8333 +[2001:470:1f14:7d::2]:8333 +[2001:470:1f15:57c::1]:8333 +[2001:470:1f15:dda:3d9a:3f11:9a56:ed64]:8333 +[2001:470:25:482::2]:8333 +[2001:470:25:e4::2]:8333 +[2001:470:4:26b::2]:8333 +[2001:470:5f:5f::232]:8333 +[2001:470:66:119::2]:8333 +[2001:470:67:39d::71]:8333 +[2001:470:6c4f::cafe]:8333 +[2001:470:8:2e1::43]:8333 +[2001:470:90a7:96::afe:6021]:8333 +[2001:470:95c1::2]:8333 +[2001:470:b1d0:ffff::1000]:8333 +[2001:470:c1f2:3::201]:8333 +[2001:470:d00d:0:3664:a9ff:fe9a:5150]:8333 +[2001:470:e250:0:211:11ff:feb9:924c]:8333 +[2001:4800:7817:101:be76:4eff:fe04:dc52]:8333 +[2001:4800:7819:104:be76:4eff:fe04:7809]:8333 +[2001:4800:7819:104:be76:4eff:fe05:c828]:8333 +[2001:4802:7800:2:30d7:1775:ff20:1858]:8333 +[2001:4802:7802:101:be76:4eff:fe20:256]:8333 +[2001:4802:7802:103:be76:4eff:fe20:2de8]:8333 +[2001:4830:1100:2e8::2]:8333 +[2001:4ba0:fff7:181:dead::1]:8333 +[2001:4ba0:fffa:5d::93]:8333 +[2001:4ba0:ffff:1be:1:1005:0:1]:8335 +[2001:4c48:110:101:216:3eff:fe24:1162]:8333 +[2001:4dd0:f101::32]:8333 +[2001:4dd0:ff00:867f::3]:8333 +[2001:4dd0:ff00:9a67::9]:8333 +[2001:4dd0:ff00:9c55:c23f:d5ff:fe6c:7ee9]:8333 +[2001:5c0:1400:b::3cc7]:8333 +[2001:5c0:1400:b::3d01]:8333 +[2001:5c0:1400:b::8df]:8333 +[2001:5c0:1501:300::3]:8333 +[2001:610:1b19::3]:8333 +[2001:620:500:fff0:f21f:afff:fecf:91cc]:8333 +[2001:67c:1220:80c:ad:8de2:f7e2:c784]:8333 +[2001:67c:21ec:1000::b]:8333 +[2001:6f8:1296:0:76d4:35ff:feba:1d26]:8333 +[2001:840:f000:4250:3e4a:92ff:fe6d:145f]:8333 +[2001:8d8:840:500::39:1ae]:8333 +[2001:980:efd8:0:21:de4a:2709:912]:8333 +[2001:981:46:1::3]:8333 +[2001:981:9319:2:c0:a8:c8:8]:8333 +[2001:9d8:cafe:3::91]:8333 +[2001:ad0:1:1:26be:5ff:fe25:959d]:8333 +[2001:ba8:1f1:f34c::2]:8333 +[2001:bc8:381c:100::1]:8333 +[2002:175c:4caa::175c:4caa]:8333 +[2002:4404:82f1:0:8d55:8fbb:15fa:f4e0]:8333 +[2002:4475:2233:0:21f:5bff:fe33:9f70]:8333 +[2002:596c:48c3::596c:48c3]:8333 +[2002:8c6d:6521:9617:12bf:48ff:fed8:1724]:8333 +[2002:a646:5e6a::1:2]:8333 +[2002:b009:20c5::b009:20c5]:8333 +[2400:8900::f03c:91ff:fe6e:823e]:8333 +[2400:8900::f03c:91ff:fe70:d164]:8333 +[2400:8901::f03c:91ff:fe37:9761]:8333 +[2403:4200:403:2::ff]:8333 +[2403:b800:1000:64:40a:e9ff:fe5f:94c1]:8333 +[2403:b800:1000:64:9879:17ff:fe6a:a59f]:8333 +[2600:3c00::f03c:91ff:fe18:59b2]:8333 +[2600:3c00::f03c:91ff:fe37:a4b1]:8333 +[2600:3c00::f03c:91ff:fe56:2973]:8333 +[2600:3c00::f03c:91ff:fe6e:7297]:8333 +[2600:3c00::f03c:91ff:fe84:8a6e]:8333 +[2600:3c01::f03c:91ff:fe18:6adf]:8333 +[2600:3c01::f03c:91ff:fe18:e217]:8333 +[2600:3c01::f03c:91ff:fe33:1b31]:8333 +[2600:3c01::f03c:91ff:fe33:2fe1]:8333 +[2600:3c01::f03c:91ff:fe33:a03f]:8333 +[2600:3c01::f03c:91ff:fe50:5e06]:8333 +[2600:3c01::f03c:91ff:fe56:d645]:8333 +[2600:3c01::f03c:91ff:fe6e:a3dc]:8333 +[2600:3c01::f03c:91ff:fe89:a659]:8333 +[2600:3c02::f03c:91ff:fe6e:6f0b]:8333 +[2600:3c03::f03c:91ff:fe33:f6fb]:8333 +[2600:3c03::f03c:91ff:fe50:5fa7]:8333 +[2600:3c03::f03c:91ff:fe6e:1803]:8333 +[2600:3c03::f03c:91ff:fe6e:4ac0]:8333 +[2601:6:4800:47f:1e4e:1f4d:332c:3bf6]:8333 +[2601:d:5400:fed:8d54:c1e8:7ed7:d45e]:8333 +[2602:100:4b8f:6d2a:20c:29ff:feaf:c4c2]:8333 +[2602:ffc5:1f::1f:2d61]:8333 +[2602:ffc5:1f::1f:9211]:8333 +[2602:ffc5::ffc5:b844]:8333 +[2602:ffe8:100:2::457:936b]:8333 +[2602:ffea:1001:125::2ad4]:8333 +[2602:ffea:1001:6ff::837d]:8333 +[2602:ffea:1001:72b::578b]:8333 +[2602:ffea:1001:77a::9cae]:8333 +[2602:ffea:1:2fe::6bc8]:8333 +[2602:ffea:1:701::7968]:8333 +[2602:ffea:1:70d::82ec]:8333 +[2602:ffea:1:9ff::e957]:8333 +[2602:ffea:1:a5d::4acb]:8333 +[2602:ffea:a::24c4:d9fd]:8333 +[2602:ffea:a::c06:ae32]:8333 +[2604:0:c1:100:1ec1:deff:fe54:2235]:8333 +[2604:180:1:1af::42a9]:8333 +[2604:180::b208:398]:8333 +[2604:2880::6072:aed]:8333 +[2604:4080:1114:0:3285:a9ff:fe93:850c]:8333 +[2604:7c00:17:3d0::5a4d]:8333 +[2604:9a00:2100:a009:2::]:8333 +[2604:a880:1:20::22a:4001]:8333 +[2604:a880:800:10::752:f001]:8333 +[2604:c00:88:32:216:3eff:fee4:fcca]:8333 +[2604:c00:88:32:216:3eff:fef5:bc21]:8333 +[2605:7980:1:2::1761:3d4e]:8333 +[2605:e000:1417:4068:223:32ff:fe96:e2d]:8333 +[2606:6000:a441:9903:5054:ff:fe78:66ff]:8333 +[2606:df00:2::ae85:8fc6]:8333 +[2607:5300:100:200::e7f]:8333 +[2607:5300:10::a1]:8333 +[2607:5300:60:116e::1]:8333 +[2607:5300:60:1535::]:8333 +[2607:5300:60:1b32::1]:8333 +[2607:5300:60:2337::1]:8333 +[2607:5300:60:2b90::1]:8333 +[2607:5300:60:2d99::1]:8333 +[2607:5300:60:3cb::1]:8333 +[2607:5300:60:4a85::]:8333 +[2607:5300:60:5112:0:2:4af5:63fe]:8333 +[2607:5300:60:6dd5::]:8333 +[2607:5300:60:a91::1]:8333 +[2607:f1c0:820:1500::7f:3f44]:8333 +[2607:f1c0:848:1000::48:943c]:8333 +[2607:f948:0:1::7]:8333 +[2607:fcd0:100:2300::4ad:e594]:8333 +[2607:fcd0:100:2300::659e:9cb3]:8333 +[2607:fcd0:100:2300::c74b:a8ae]:8333 +[2607:fcd0:100:2300::d82:d8c2]:8333 +[2607:fcd0:100:4300::8795:2fa8]:8333 +[2607:fcd0:daaa:901::9561:e043]:8333 +[2a00:1178:2:43:5054:ff:fee7:2eb6]:8333 +[2a00:1328:e100:cc42:230:48ff:fe92:55d]:8333 +[2a00:14f0:e000:80d2:cd1a::1]:8333 +[2a00:16d8:c::5b6a:c261]:8333 +[2a00:61e0:4083:6d01:6852:1376:e972:2091]:8333 +[2a00:c98:2030:a02f:2::2]:8333 +[2a01:1b0:7999:402::131]:8333 +[2a01:1e8:e100:811c:700f:65f0:f72a:1084]:8333 +[2a01:238:42da:c500:6546:1293:5422:ab40]:8333 +[2a01:348:6:473::2]:8333 +[2a01:368:e010:2::2]:8333 +[2a01:430:17:1::ffff:549]:8333 +[2a01:430:17:1::ffff:830]:8333 +[2a01:488:66:1000:53a9:d04:0:1]:8333 +[2a01:488:66:1000:57e6:578c:0:1]:8333 +[2a01:488:66:1000:b01c:178d:0:1]:8333 +[2a01:488:67:1000:523:fdce:0:1]:8333 +[2a01:488:67:1000:b01c:30ab:0:1]:8333 +[2a01:4f8:100:24aa::2]:8333 +[2a01:4f8:100:44e7::2]:8333 +[2a01:4f8:100:5128::2]:8333 +[2a01:4f8:100:84a7::1:1]:8333 +[2a01:4f8:110:516c::2]:8333 +[2a01:4f8:110:536e::2]:8333 +[2a01:4f8:120:62e6::2]:8333 +[2a01:4f8:120:702e::2]:8333 +[2a01:4f8:120:8005::2]:8333 +[2a01:4f8:120:8203::2]:8333 +[2a01:4f8:120:8422::2]:8333 +[2a01:4f8:121:11eb::2]:8333 +[2a01:4f8:121:261::2]:8333 +[2a01:4f8:130:242b::10]:8333 +[2a01:4f8:130:242b::5]:8333 +[2a01:4f8:130:2468::3]:8333 +[2a01:4f8:130:632c::2]:8333 +[2a01:4f8:130:6366::2]:8333 +[2a01:4f8:130:6426::2]:8333 +[2a01:4f8:130:934f::2]:8333 +[2a01:4f8:131:2070::2]:8333 +[2a01:4f8:131:54a2::2]:8333 +[2a01:4f8:140:80ad::2]:8333 +[2a01:4f8:141:186::2]:8333 +[2a01:4f8:150:210b::2]:8333 +[2a01:4f8:150:2263::5]:8333 +[2a01:4f8:150:2349::2]:8333 +[2a01:4f8:150:61ee::2]:8333 +[2a01:4f8:150:7088:5054:ff:fe45:bff2]:8333 +[2a01:4f8:150:8324::2]:9001 +[2a01:4f8:151:1d8::2]:8333 +[2a01:4f8:151:5128::2]:8333 +[2a01:4f8:151:6347::2]:9001 +[2a01:4f8:161:526d::2]:8333 +[2a01:4f8:161:9349::2]:8333 +[2a01:4f8:162:23c6::2]:8333 +[2a01:4f8:162:4348::2]:8333 +[2a01:4f8:162:7345::2]:8333 +[2a01:4f8:162:7383::2]:8333 +[2a01:4f8:162:74e3::2]:8333 +[2a01:4f8:190:6065::2]:8333 +[2a01:4f8:190:6349::2]:8333 +[2a01:4f8:190:64c9::2]:8333 +[2a01:4f8:190:91ce::2]:8333 +[2a01:4f8:191:2194::83]:8333 +[2a01:4f8:191:40a1::2]:8333 +[2a01:4f8:191:4a7::2]:8333 +[2a01:4f8:191:63b4:5000::1]:8333 +[2a01:4f8:191:7121::2]:8333 +[2a01:4f8:191:83a2::2]:8333 +[2a01:4f8:191:93c4::2]:8333 +[2a01:4f8:192:60a9:0:1:5:2]:8333 +[2a01:4f8:192:73b2::2]:8333 +[2a01:4f8:192:8098::2]:8333 +[2a01:4f8:192:db::2]:8333 +[2a01:4f8:200:1012::2]:8333 +[2a01:4f8:200:22e3::2]:8333 +[2a01:4f8:200:414e::2]:8333 +[2a01:4f8:200:63af::222]:8333 +[2a01:4f8:200:71e3:78b4:f3ff:fead:e8cf]:8333 +[2a01:4f8:201:5164::2]:8333 +[2a01:4f8:201:6011::4]:8333 +[2a01:4f8:201:60d5::2]:8333 +[2a01:4f8:202:53c3::2]:8333 +[2a01:4f8:210:24aa::2]:8333 +[2a01:4f8:210:502f::2]:8333 +[2a01:4f8:211:14cf::2]:8333 +[2a01:4f8:211:1a59::2]:8333 +[2a01:4f8:211:2ac1::2]:8333 +[2a01:4f8:211:cca::2]:8333 +[2a01:4f8:a0:22a5::2]:8333 +[2a01:4f8:a0:5023::2]:8333 +[2a01:4f8:a0:5243::2]:8333 +[2a01:4f8:a0:74c8::2]:8333 +[2a01:4f8:a0:8227::2]:8333 +[2a01:4f8:a0:822d::2]:8333 +[2a01:4f8:d13:2183::2]:8333 +[2a01:608:ffff:a009:8bf5:879d:e51a:f837]:8333 +[2a01:79d:469e:ed94:c23f:d5ff:fe65:20c5]:8333 +[2a01:7c8:aab5:3e6:5054:ff:fed7:4e54]:8333 +[2a01:7e00::f03c:91ff:fe18:301e]:8333 +[2a01:7e00::f03c:91ff:fe18:7749]:8333 +[2a01:7e00::f03c:91ff:fe33:2d67]:8333 +[2a01:7e00::f03c:91ff:fe33:347c]:8333 +[2a01:7e00::f03c:91ff:fe33:ae50]:8333 +[2a01:7e00::f03c:91ff:fe56:6b5c]:8333 +[2a01:7e00::f03c:91ff:fe56:bee6]:8333 +[2a01:7e00::f03c:91ff:fe69:4895]:8333 +[2a01:7e00::f03c:91ff:fe69:9912]:8333 +[2a01:7e00::f03c:91ff:fe6e:26ee]:8333 +[2a01:7e00::f03c:91ff:fe73:42f1]:8333 +[2a01:7e00::f03c:91ff:fe84:434f]:8333 +[2a01:7e00::f03c:91ff:fe84:b36b]:8333 +[2a01:7e00::f03c:91ff:fe89:1faa]:8333 +[2a01:7e00::f03c:91ff:fe98:816]:8333 +[2a01:7e00::f03c:91ff:fedb:352e]:8333 +[2a01:7e00::f03c:91ff:fedb:4a1d]:8333 +[2a01:e34:edbb:6750:224:1dff:fe89:3897]:8333 +[2a01:e35:2f1d:3fb0:7187:c7ba:bcfc:80ce]:8333 +[2a01:e35:8787:96f0:9032:9297:39ae:496d]:8333 +[2a01:e35:8a3f:47c0:c617:feff:fe3c:9fbd]:8333 +[2a01:e35:8b66:6a0:4900:9dfd:d841:d025]:8333 +[2a02:168:4a01::39]:8333 +[2a02:168:5404:2:c23f:d5ff:fe6a:512e]:8333 +[2a02:180:1:1::5b8f:538c]:8333 +[2a02:2028:1016::2]:8333 +[2a02:2528:503:2::14]:8333 +[2a02:2528:503:2::15]:8333 +[2a02:2528:ff00:81a6:21e:c5ff:fe8d:f9a5]:8333 +[2a02:2770:5:0:21a:4aff:fee4:c7db]:8333 +[2a02:2770:8:0:21a:4aff:fe7b:3dcd]:8333 +[2a02:348:5e:5a29::1]:8333 +[2a02:7aa0:1619::202f:c06a]:8333 +[2a02:8109:8e40:35fc:ba27:ebff:feae:cf16]:8333 +[2a02:af8:6:1500::1:130]:8333 +[2a02:c200:0:10:1:0:6314:2222]:8333 +[2a02:c200:0:10:2:3:3295:1]:8332 +[2a02:c200:0:10:3:0:5449:1]:8333 +[2a02:c200:1:10:2:3:5899:1]:8333 +[2a02:c200:1:10::2705:1]:8333 +[2a02:ce80:0:20::1]:8333 +[2a02:fe0:c321:27e0:6ef0:49ff:fe11:a61d]:8333 +[2a03:4000:2:496::8]:8333 +[2a03:b0c0:0:1010::62:f001]:8333 +[2a03:f80:ed16:ca7:ea75:b12d:2af:9e2a]:8333 +3ffk7iumtx3cegbi.onion:8333 +3hshaantu6ot4upz.onion:8333 +45c5lc77qgpikafy.onion:8333 +77mx2jsxaoyesz2p.onion:8333 +7g7j54btiaxhtsiy.onion:8333 +b6fr7dlbu2kpiysf.onion:8333 +bitcoincfqcssig5.onion:8333 +bitcoinostk4e4re.onion:8333 +bmutjfrj5btseddb.onion:8333 +drp4pvejybx2ejdr.onion:8333 +gixnv56d63buypan.onion:8333 +h2vlpudzphzqxutd.onion:8333 +hhiv5pnxenvbf4am.onion:8333 +lzxpkn6ptp3ohh63.onion:8333 +msphsgfiqfq5stne.onion:8333 +ncwk3lutemffcpc4.onion:8333 +okdzjarwekbshnof.onion:8333 +sjdomi4yb2dwkjbc.onion:8333 +uvwozwxlihntigbb.onion:8333 +v6ylz45dn5ybpk4d.onion:8333 +vk3qjdehyy4dwcxw.onion:8333 +vqpye2k5rcqvj5mq.onion:8333 +xudkoztdfrsuyyou.onion:8333 +z55v4ostefnwfy32.onion:8333 diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt new file mode 100644 index 00000000000..98365ee505c --- /dev/null +++ b/contrib/seeds/nodes_test.txt @@ -0,0 +1,11 @@ +# List of fixed seed nodes for testnet + +# Onion nodes +thfsmmn2jbitcoin.onion +it2pj4f7657g3rhi.onion +nkf5e6b7pl4jfd4a.onion +4zhkir2ofl7orfom.onion +t6xj6wilh4ytvcs7.onion +i6y6ivorwakd7nw3.onion +ubqj4rsu3nqtxmtp.onion + diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh new file mode 100755 index 00000000000..6b5137e7b54 --- /dev/null +++ b/contrib/verify-commits/gpg.sh @@ -0,0 +1,15 @@ +#!/bin/sh +INPUT=$(/dev/null); do + case "$LINE" in "[GNUPG:] VALIDSIG"*) + while read KEY; do + case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac + done < ./contrib/verify-commits/trusted-keys + esac +done +if ! $VALID; then + exit 1 +fi +echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh new file mode 100755 index 00000000000..607c0cac45e --- /dev/null +++ b/contrib/verify-commits/pre-push-hook.sh @@ -0,0 +1,16 @@ +#!/bin/bash +if ! [[ "$2" =~ [git@]?[www.]?github.com[:|/]bitcoin/bitcoin[.git]? ]]; then + exit 0 +fi + +while read LINE; do + set -- A $LINE + if [ "$4" != "refs/heads/master" ]; then + continue + fi + if ! ./contrib/verify-commits/verify-commits.sh $3 > /dev/null 2>&1; then + echo "ERROR: A commit is not signed, can't push" + ./contrib/verify-commits/verify-commits.sh + exit 1 + fi +done < /dev/stdin diff --git a/contrib/verify-commits/trusted-git-root b/contrib/verify-commits/trusted-git-root new file mode 100644 index 00000000000..eb13f8762e5 --- /dev/null +++ b/contrib/verify-commits/trusted-git-root @@ -0,0 +1 @@ +053038e5ba116cb319fb85f3cb3e062cf1b3df15 diff --git a/contrib/verify-commits/trusted-keys b/contrib/verify-commits/trusted-keys new file mode 100644 index 00000000000..658ad0375ba --- /dev/null +++ b/contrib/verify-commits/trusted-keys @@ -0,0 +1,5 @@ +71A3B16735405025D447E8F274810B012346C9A6 +1F4410F6A89268CE3197A84C57896D2FF8F0B657 +01CDF4627A3B88AAE4A571C87588242FBE38D3A8 +AF8BE07C7049F3A26B239D5325B3083201782B2F +81291FA67D2C379A006A053FEAB5AF94D9E9ABE7 diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh new file mode 100755 index 00000000000..5841fa2077a --- /dev/null +++ b/contrib/verify-commits/verify-commits.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +DIR=$(dirname "$0") + +echo "Please verify all commits in the following list are not evil:" +git log "$DIR" + +VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root") + +HAVE_FAILED=false +IS_SIGNED () { + if [ $1 = $VERIFIED_ROOT ]; then + return 0; + fi + if ! git -c "gpg.program=${DIR}/gpg.sh" verify-commit $1 > /dev/null 2>&1; then + return 1; + fi + local PARENTS=$(git show -s --format=format:%P $1) + for PARENT in $PARENTS; do + if IS_SIGNED $PARENT > /dev/null; then + return 0; + fi + done + if ! "$HAVE_FAILED"; then + echo "No parent of $1 was signed with a trusted key!" > /dev/stderr + echo "Parents are:" > /dev/stderr + for PARENT in $PARENTS; do + git show -s $PARENT > /dev/stderr + done + HAVE_FAILED=true + fi + return 1; +} + +if [ x"$1" = "x" ]; then + TEST_COMMIT="HEAD" +else + TEST_COMMIT="$1" +fi + +IS_SIGNED "$TEST_COMMIT" +RES=$? +if [ "$RES" = 1 ]; then + if ! "$HAVE_FAILED"; then + echo "$TEST_COMMIT was not signed with a trusted key!" + fi +else + echo "There is a valid path from $TEST_COMMIT to $VERIFIED_ROOT where all commits are signed!" +fi + +exit $RES diff --git a/depends/.gitignore b/depends/.gitignore index 82c48638b00..1f163897b9e 100644 --- a/depends/.gitignore +++ b/depends/.gitignore @@ -3,3 +3,7 @@ work/ built/ sources/ config.site +x86_64* +i686* +mips* +arm* diff --git a/depends/Makefile b/depends/Makefile index e2ef7ee49bd..ef5a20e6c36 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -6,7 +6,6 @@ SDK_PATH ?= $(BASEDIR)/SDKs NO_QT ?= NO_WALLET ?= NO_UPNP ?= -USE_LINUX_STATIC_QT5 ?= FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources BUILD = $(shell ./config.guess) @@ -92,12 +91,12 @@ include funcs.mk toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin) final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in) final_build_id+=$(shell echo -n $(final_build_id_long) | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)) -$(host_prefix)/.stamp_$(final_build_id): | $(native_packages) $(packages) +$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) $(AT)rm -rf $(@D) $(AT)mkdir -p $(@D) - $(AT)echo copying packages: $| + $(AT)echo copying packages: $^ $(AT)echo to: $(@D) - $(AT)cd $(@D); $(foreach package,$|, tar xf $($(package)_cached); ) + $(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); ) $(AT)touch $@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id) @@ -122,8 +121,35 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_ $< > $@ $(AT)touch $@ -install: $(host_prefix)/share/config.site -download-one: $(all_sources) + +define check_or_remove_cached + mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \ + $(build_SHA256SUM) -c $($(package)_cached_checksum) >/dev/null 2>/dev/null || \ + ( rm -f $($(package)_cached_checksum); \ + if test -f "$($(package)_cached)"; then echo "Checksum mismatch for $(package). Forcing rebuild.."; rm -f $($(package)_cached_checksum) $($(package)_cached); fi ) +endef + +define check_or_remove_sources + mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \ + $(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \ + ( if test -f $($(package)_all_sources); then echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; fi; \ + rm -f $($(package)_all_sources) $($(1)_fetched)) +endef + +check-packages: + @$(foreach package,$(all_packages),$(call check_or_remove_cached,$(package));) +check-sources: + @$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));) + +$(host_prefix)/share/config.site: check-packages + +check-packages: check-sources + +install: check-packages $(host_prefix)/share/config.site + + +download-one: check-sources $(all_sources) + download-osx: @$(MAKE) -s HOST=x86_64-apple-darwin11 download-one download-linux: @@ -131,4 +157,5 @@ download-linux: download-win: @$(MAKE) -s HOST=x86_64-w64-mingw32 download-one download: download-osx download-linux download-win -.PHONY: install cached download-one download-osx download-linux download-win download + +.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources diff --git a/depends/README.md b/depends/README.md new file mode 100644 index 00000000000..d85e652c60f --- /dev/null +++ b/depends/README.md @@ -0,0 +1,56 @@ +### Usage + +To build dependencies for the current arch+OS: + + make + +To build for another arch/OS: + + make HOST=host-platform-triplet + +For example: + + make HOST=x86_64-w64-mingw32 -j4 + +A prefix will be generated that's suitable for plugging into Bitcoin's +configure. In the above example, a dir named x86_64-w64-mingw32 will be +created. To use it for Bitcoin: + + ./configure --prefix=`pwd`/depends/x86_64-w64-mingw32 + +Common `host-platform-triplets` for cross compilation are: + +- `i686-w64-mingw32` for Win32 +- `x86_64-w64-mingw32` for Win64 +- `x86_64-apple-darwin11` for MacOSX +- `arm-linux-gnueabihf` for Linux ARM + +No other options are needed, the paths are automatically configured. + +Dependency Options: +The following can be set when running make: make FOO=bar + + SOURCES_PATH: downloaded sources will be placed here + BASE_CACHE: built packages will be placed here + SDK_PATH: Path where sdk's can be found (used by OSX) + FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up + NO_QT: Don't download/build/cache qt and its dependencies + NO_WALLET: Don't download/build/cache libs needed to enable the wallet + NO_UPNP: Don't download/build/cache packages needed for enabling upnp + DEBUG: disable some optimizations and enable more runtime checking + +If some packages are not built, for example `make NO_WALLET=1`, the appropriate +options will be passed to bitcoin's configure. In this case, `--disable-wallet`. + +Additional targets: + + download: run 'make download' to fetch all sources without building them + download-osx: run 'make download-osx' to fetch all sources needed for osx builds + download-win: run 'make download-win' to fetch all sources needed for win builds + download-linux: run 'make download-linux' to fetch all sources needed for linux builds + +### Other documentation + +- [description.md](description.md): General description of the depends system +- [packages.md](packages.md): Steps for adding packages + diff --git a/depends/README.usage b/depends/README.usage deleted file mode 100644 index f5aa5314a1f..00000000000 --- a/depends/README.usage +++ /dev/null @@ -1,35 +0,0 @@ -To build dependencies for the current arch+OS: - make -To build for another arch/OS: - make HOST=host-platform-triplet && make HOST=host-platform-triplet - (For example: make HOST=i686-w64-mingw32 -j4) - -A prefix will be generated that's suitable for plugging into Bitcoin's -configure. In the above example, a dir named i686-w64-mingw32 will be -created. To use it for Bitcoin: - -./configure --prefix=`pwd`/depends/i686-w64-mingw32 - -No other options are needed, the paths are automatically configured. - -Dependency Options: -The following can be set when running make: make FOO=bar - -SOURCES_PATH: downloaded sources will be placed here -BASE_CACHE: built packages will be placed here -SDK_PATH: Path where sdk's can be found (used by OSX) -FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up -NO_QT: Don't download/build/cache qt and its dependencies -NO_WALLET: Don't download/build/cache libs needed to enable the wallet -NO_UPNP: Don't download/build/cache packages needed for enabling upnp -DEBUG: disable some optimizations and enable more runtime checking -USE_LINUX_STATIC_QT5: Build a static qt5 rather than shared qt4. Linux only. - -If some packages are not built, for example 'make NO_WALLET=1', the appropriate -options will be passed to bitcoin's configure. In this case, --disable-wallet. - -Additional targets: -download: run 'make download' to fetch all sources without building them -download-osx: run 'make download-osx' to fetch all sources needed for osx builds -download-win: run 'make download-win' to fetch all sources needed for win builds -download-linux: run 'make download-linux' to fetch all sources needed for linux builds diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index b366460e64b..200d6ed22a2 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -7,7 +7,7 @@ build_darwin_OTOOL: = $(shell xcrun -f otool) build_darwin_NM: = $(shell xcrun -f nm) build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) build_darwin_SHA256SUM = shasum -a 256 -build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o +build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o #darwin host on darwin builder. overrides darwin host preferences. darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk index 98d0e9de348..b03f4240104 100644 --- a/depends/builders/linux.mk +++ b/depends/builders/linux.mk @@ -1,2 +1,2 @@ build_linux_SHA256SUM = sha256sum -build_linux_DOWNLOAD = wget --timeout=$(DOWNLOAD_CONNECT_TIMEOUT) --tries=$(DOWNLOAD_RETRIES) -nv -O +build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o diff --git a/depends/config.guess b/depends/config.guess index 1f5c50c0d15..f357ec6c8f6 100755 --- a/depends/config.guess +++ b/depends/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-03-23' +timestamp='2015-03-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,12 +24,12 @@ timestamp='2014-03-23' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -213,7 +227,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -579,8 +593,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -932,6 +947,9 @@ EOF crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1099,7 +1117,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; diff --git a/depends/config.sub b/depends/config.sub index d654d03cdcd..8f1229c6f7d 100755 --- a/depends/config.sub +++ b/depends/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-05-01' +timestamp='2015-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ timestamp='2014-05-01' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -259,8 +259,8 @@ case $basic_machine in | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ @@ -302,6 +302,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -312,6 +313,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -326,6 +328,9 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -376,7 +381,7 @@ case $basic_machine in | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -436,6 +441,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -512,6 +518,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -773,6 +782,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -828,6 +840,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1360,7 +1376,7 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1373,7 +1389,7 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ diff --git a/depends/README b/depends/description.md similarity index 82% rename from depends/README rename to depends/description.md index fed2f9b5ab9..74f9ef3f205 100644 --- a/depends/README +++ b/depends/description.md @@ -1,28 +1,26 @@ -This is a system of building and caching dependencies necessary for building -Bitcoin. - +This is a system of building and caching dependencies necessary for building Bitcoin. There are several features that make it different from most similar systems: -- It is designed to be builder and host agnostic +### It is designed to be builder and host agnostic In theory, binaries for any target OS/architecture can be created, from a builder running any OS/architecture. In practice, build-side tools must be -specified when the defaults don't fit, and packages must be ammended to work +specified when the defaults don't fit, and packages must be amended to work on new hosts. For now, a build architecture of x86_64 is assumed, either on Linux or OSX. -- No reliance on timestamps +### No reliance on timestamps File presence is used to determine what needs to be built. This makes the results distributable and easily digestable by automated builders. -- Each build only has its specified dependencies available at build-time. +### Each build only has its specified dependencies available at build-time. For each build, the sysroot is wiped and the (recursive) dependencies are installed. This makes each build deterministic, since there will never be any unknown files available to cause side-effects. -- Each package is cached and only rebuilt as needed. +### Each package is cached and only rebuilt as needed. Before building, a unique build-id is generated for each package. This id consists of a hash of all files used to build the package (Makefiles, packages, @@ -32,7 +30,7 @@ any other package that depends on it. If any of the main makefiles (Makefile, funcs.mk, etc) are changed, all packages will be rebuilt. After building, the results are cached into a tarball that can be re-used and distributed. -- Package build results are (relatively) deterministic. +### Package build results are (relatively) deterministic. Each package is configured and patched so that it will yield the same build-results with each consequent build, within a reasonable set of @@ -41,13 +39,13 @@ beyond the scope of this system. Additionally, the toolchain itself must be capable of deterministic results. When revisions are properly bumped, a cached build should represent an exact single payload. -- Sources are fetched and verified automatically +### Sources are fetched and verified automatically Each package must define its source location and checksum. The build will fail if the fetched source does not match. Sources may be pre-seeded and/or cached as desired. -- Self-cleaning +### Self-cleaning Build and staging dirs are wiped after use, and any previous version of a cached result is removed following a successful build. Automated builders diff --git a/depends/funcs.mk b/depends/funcs.mk index 79015c047ca..050a9b13213 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 @@ -53,12 +53,14 @@ $(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix) $(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id) $(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version) $(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir) +$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash $(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id) $(1)_prefixbin:=$($($(1)_type)_prefix)/bin/ $(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz +$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources) #stamps -$(1)_fetched=$$($(1)_source_dir)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name) +$(1)_fetched=$(SOURCES_PATH)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name).hash $(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted $(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed $(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned @@ -154,7 +156,10 @@ endef define int_add_cmds $($(1)_fetched): $(AT)mkdir -p $$(@D) $(SOURCES_PATH) + $(AT)rm -f $$@ + $(AT)touch $$@ $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) + $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) $(AT)touch $$@ $($(1)_extracted): | $($(1)_fetched) $(AT)echo Extracting $(1)... @@ -195,17 +200,19 @@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) $(AT)rm -rf $$(@D) && mkdir -p $$(@D) $(AT)mv $$($(1)_staging_dir)/$$(@F) $$(@) $(AT)rm -rf $($(1)_staging_dir) +$($(1)_cached_checksum): $($(1)_cached) + $(AT)cd $$(@D); $(build_SHA256SUM) $$( $$(@) .PHONY: $(1) -$(1): | $($(1)_cached) -.SECONDARY: $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) +$(1): | $($(1)_cached_checksum) +.SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) endef # These functions create the build targets for each package. They must be # broken down into small steps so that each part is done for all packages # before moving on to the next step. Otherwise, a package's info -# (build-id for example) would only be avilable to another package if it +# (build-id for example) would only be available to another package if it # happened to be computed already. #set the type for host/build packages. diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 8d718eba17b..2958dc50cc8 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,8 +1,9 @@ -OSX_MIN_VERSION=10.6 -OSX_SDK_VERSION=10.7 +OSX_MIN_VERSION=10.7 +OSX_SDK_VERSION=10.9 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk -darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) +LD64_VERSION=241.9 +darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) diff --git a/depends/README.packages b/depends/packages.md similarity index 58% rename from depends/README.packages rename to depends/packages.md index 5ab7ed7dee0..7c80362509e 100644 --- a/depends/README.packages +++ b/depends/packages.md @@ -4,119 +4,137 @@ variables, and defining build commands. The package "mylib" will be used here as an example General tips: -mylib_foo is written as $(package)_foo in order to make recipes more similar. +- mylib_foo is written as $(package)_foo in order to make recipes more similar. -Identifiers: +## Identifiers Each package is required to define at least these variables: - $(package)_version: + + $(package)_version: Version of the upstream library or program. If there is no version, a placeholder such as 1.0 can be used. - $(package)_download_path: + + $(package)_download_path: Location of the upstream source, without the file-name. Usually http or ftp. - $(package)_file_name: + + $(package)_file_name: The upstream source filename available at the download path. - $(package)_sha256_hash: + + $(package)_sha256_hash: The sha256 hash of the upstream file These variables are optional: - $(package)_build_subdir: + + $(package)_build_subdir: cd to this dir before running configure/build/stage commands. - $(package)_download_file: + + $(package)_download_file: The file-name of the upstream source if it differs from how it should be stored locally. This can be used to avoid storing file-names with strange characters. - $(package)_dependencies: + + $(package)_dependencies: Names of any other packages that this one depends on. - $(package)_patches: + + $(package)_patches: Filenames of any patches needed to build the package + $(package)_extra_sources: + Any extra files that will be fetched via $(package)_fetch_cmds. These are + specified so that they can be fetched and verified via 'make download'. + -Build Variables: +## Build Variables: After defining the main identifiers, build variables may be added or customized before running the build commands. They should be added to a function called $(package)_set_vars. For example: -define $(package)_set_vars -... -endef + define $(package)_set_vars + ... + endef Most variables can be prefixed with the host, architecture, or both, to make the modifications specific to that case. For example: - Universal: $(package)_cc=gcc - Linux only: $(package)_linux_cc=gcc - x86_64 only: $(package)_x86_64_cc = gcc - x86_64 linux only: $(package)_x86_64_linux_cc = gcc + Universal: $(package)_cc=gcc + Linux only: $(package)_linux_cc=gcc + x86_64 only: $(package)_x86_64_cc = gcc + x86_64 linux only: $(package)_x86_64_linux_cc = gcc These variables may be set to override or append their default values. - $(package)_cc - $(package)_cxx - $(package)_objc - $(package)_objcxx - $(package)_ar - $(package)_ranlib - $(package)_libtool - $(package)_nm - $(package)_cflags - $(package)_cxxflags - $(package)_ldflags - $(package)_cppflags - $(package)_config_env - $(package)_build_env - $(package)_stage_env - $(package)_build_opts - $(package)_config_opts + + $(package)_cc + $(package)_cxx + $(package)_objc + $(package)_objcxx + $(package)_ar + $(package)_ranlib + $(package)_libtool + $(package)_nm + $(package)_cflags + $(package)_cxxflags + $(package)_ldflags + $(package)_cppflags + $(package)_config_env + $(package)_build_env + $(package)_stage_env + $(package)_build_opts + $(package)_config_opts The *_env variables are used to add environment variables to the respective commands. Many variables respect a debug/release suffix as well, in order to use them for only the appropriate build config. For example: - $(package)_cflags_release = -O3 - $(package)_cflags_i686_debug = -g - $(package)_config_opts_release = --disable-debug + + $(package)_cflags_release = -O3 + $(package)_cflags_i686_debug = -g + $(package)_config_opts_release = --disable-debug These will be used in addition to the options that do not specify debug/release. All builds are considered to be release unless DEBUG=1 is set by -the user. +the user. Other variables may be defined as needed. -Other variables may be defined as needed. - -Build commands: +## Build commands: For each build, a unique build dir and staging dir are created. For example, - work/build/mylib/1.0-1adac830f6e and work/staging/mylib/1.0-1adac830f6e. + `work/build/mylib/1.0-1adac830f6e` and `work/staging/mylib/1.0-1adac830f6e`. The following build commands are available for each recipe: - $(package)_fetch_cmds: + $(package)_fetch_cmds: Runs from: build dir Fetch the source file. If undefined, it will be fetched and verified against its hash. - $(package)_extract_cmds: + + $(package)_extract_cmds: Runs from: build dir Verify the source file against its hash and extract it. If undefined, the source is assumed to be a tarball. - $(package)_preprocess_cmds: + + $(package)_preprocess_cmds: Runs from: build dir/$(package)_build_subdir Preprocess the source as necessary. If undefined, does nothing. - $(package)_config_cmds: + + $(package)_config_cmds: Runs from: build dir/$(package)_build_subdir Configure the source. If undefined, does nothing. - $(package)_build_cmds: + + $(package)_build_cmds: Runs from: build dir/$(package)_build_subdir Build the source. If undefined, does nothing. - $(package)_stage_cmds: + + $(package)_stage_cmds: Runs from: build dir/$(package)_build_subdir Stage the build results. If undefined, does nothing. The following variables are available for each recipe: - $(1)_staging_dir: package's destination sysroot path - $(1)_staging_prefix_dir: prefix path inside of the package's staging dir - $(1)_extract_dir: path to the package's extracted sources - $(1)_build_dir: path where configure/build/stage commands will be run - $(1)_patch_dir: path where the package's patches (if any) are found + + $(1)_staging_dir: package's destination sysroot path + $(1)_staging_prefix_dir: prefix path inside of the package's staging dir + $(1)_extract_dir: path to the package's extracted sources + $(1)_build_dir: path where configure/build/stage commands will be run + $(1)_patch_dir: path where the package's patches (if any) are found Notes on build commands: @@ -125,4 +143,5 @@ configure step to (usually) correctly configure automatically. Any $($(package)_config_opts) will be appended. Most autotools projects can be properly staged using: - $(MAKE) DESTDIR=$($(package)_staging_dir) install + + $(MAKE) DESTDIR=$($(package)_staging_dir) install diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index f50828c546d..e7aa48ddf8f 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -3,7 +3,7 @@ $(package)_version=1_55_0 $(package)_download_path=http://sourceforge.net/projects/boost/files/boost/1.55.0 $(package)_file_name=$(package)_$($(package)_version).tar.bz2 $(package)_sha256_hash=fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 -$(package)_patches=darwin_boost_atomic-1.patch darwin_boost_atomic-2.patch +$(package)_patches=darwin_boost_atomic-1.patch darwin_boost_atomic-2.patch gcc_5_no_cxx11.patch define $(package)_set_vars $(package)_config_opts_release=variant=release @@ -28,6 +28,7 @@ endef define $(package)_preprocess_cmds patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-1.patch && \ patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-2.patch && \ + patch -p2 < $($(package)_patch_dir)/gcc_5_no_cxx11.patch && \ echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index f29b577f8ac..28f2bd6f253 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -13,8 +13,13 @@ define $(package)_preprocess_cmds sed "s/pthread-stubs//" -i configure endef +# Don't install xcb headers to the default path in order to work around a qt +# build issue: https://bugreports.qt.io/browse/QTBUG-34748 +# When using qt's internal libxcb, it may end up finding the real headers in +# depends staging. Use a non-default path to avoid that. + define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared endef define $(package)_build_cmds diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 00101f1b91a..77bae10c793 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -1,8 +1,8 @@ package=miniupnpc -$(package)_version=1.9.20140701 +$(package)_version=1.9.20151008 $(package)_download_path=http://miniupnp.free.fr/files $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07 +$(package)_sha256_hash=e444ac3b587ce82709c4d0cfca1fe71f44f9fc433e9f946b12b9e1bfe667a633 define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 1675afe7813..1c1bcf199a0 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,61 +1,39 @@ package=native_cctools -$(package)_version=809 -$(package)_download_path=http://www.opensource.apple.com/tarballs/cctools -$(package)_file_name=cctools-$($(package)_version).tar.gz -$(package)_sha256_hash=03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad -$(package)_build_subdir=cctools2odcctools/odcctools-$($(package)_version) -$(package)_dependencies=native_libuuid native_openssl -$(package)_ld64_download_file=ld64-127.2.tar.gz -$(package)_ld64_download_path=http://www.opensource.apple.com/tarballs/ld64 -$(package)_ld64_file_name=$($(package)_ld64_download_file) -$(package)_ld64_sha256_hash=97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142 -$(package)_dyld_download_file=dyld-195.5.tar.gz -$(package)_dyld_download_path=http://www.opensource.apple.com/tarballs/dyld -$(package)_dyld_file_name=$($(package)_dyld_download_file) -$(package)_dyld_sha256_hash=2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c -$(package)_toolchain4_download_file=10cc648683617cca8bcbeae507888099b41b530c.tar.gz -$(package)_toolchain4_download_path=https://github.com/mingwandroid/toolchain4/archive -$(package)_toolchain4_file_name=toolchain4-1.tar.gz -$(package)_toolchain4_sha256_hash=18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca -$(package)_clang_download_file=clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz -$(package)_clang_download_path=http://llvm.org/releases/3.2 -$(package)_clang_file_name=clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz -$(package)_clang_sha256_hash=b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff +$(package)_version=ee31ae567931c426136c94aad457c7b51d844beb +$(package)_download_path=https://github.com/theuni/cctools-port/archive +$(package)_file_name=$($(package)_version).tar.gz +$(package)_sha256_hash=ef107e6ab1b3994cb22e14f4f5c59ea0c0b5a988e6b21d42ed9616b018bbcbf9 +$(package)_build_subdir=cctools +$(package)_clang_version=3.3 +$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version) +$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-amd64-Ubuntu-12.04.2.tar.gz +$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-amd64-Ubuntu-12.04.2.tar.gz +$(package)_clang_sha256_hash=60d8f69f032d62ef61bf527857ebb933741ec3352d4d328c5516aa520662dab7 +$(package)_extra_sources=$($(package)_clang_file_name) define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_ld64_download_path),$($(package)_ld64_download_file),$($(package)_ld64_file_name),$($(package)_ld64_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_dyld_download_path),$($(package)_dyld_download_file),$($(package)_dyld_file_name),$($(package)_dyld_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_toolchain4_download_path),$($(package)_toolchain4_download_file),$($(package)_toolchain4_file_name),$($(package)_toolchain4_sha256_hash)) +$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) endef -define $(package)_set_vars -$(package)_config_opts=--target=$(host) --with-sysroot=$(OSX_SDK) -$(package)_cflags+=-m32 -$(package)_cxxflags+=-m32 -$(package)_cppflags+=-D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -$(package)_ldflags+=-m32 -Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib -$(package)_ldflags+=-L$$(native_cctools_extract_dir)/clang+llvm-3.2-x86-linux-ubuntu-12.04/lib -endef define $(package)_extract_cmds - tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_toolchain4_file_name) && \ - ln -sf $($(package)_source) cctools2odcctools/$($(package)_file_name) && \ - ln -sf $($(package)_source_dir)/$($(package)_ld64_file_name) cctools2odcctools/$($(package)_ld64_file_name) && \ - ln -sf $($(package)_source_dir)/$($(package)_dyld_file_name) cctools2odcctools/$($(package)_dyld_file_name) && \ - tar xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ - mkdir -p $(SDK_PATH) sdks &&\ - cd sdks; ln -sf $(OSX_SDK) MacOSX$(OSX_SDK_VERSION).sdk + mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \ + tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ + echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \ + echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \ + chmod +x toolchain/bin/$(host)-dsymutil && \ + tar --strip-components=1 -xf $($(package)_source) +endef + +define $(package)_set_vars +$(package)_config_opts=--target=$(host) --disable-libuuid +$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib +$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang +$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ endef define $(package)_preprocess_cmds - sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" cctools2odcctools/extract.sh && \ - sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" cctools2odcctools/extract.sh && \ - sed -i "s|/llvmCore/include/llvm-c|/include/llvm-c \$$$${LLVM_CLANG_DIR}/include/llvm |" cctools2odcctools/extract.sh && \ - sed -i "s|fAC_INIT|AC_INIT|" cctools2odcctools/files/configure.ac && \ - sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' cctools2odcctools/files/configure.ac && \ - cd cctools2odcctools; ./extract.sh --osxver $(OSX_SDK_VERSION) && \ - sed -i "s|define\tPC|define\tPC_|" odcctools-809/include/architecture/sparc/reg.h + cd $($(package)_build_subdir); ./autogen.sh endef define $(package)_config_cmds @@ -68,13 +46,13 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ - cd ../../clang+llvm-3.2-x86-linux-ubuntu-12.04 && \ - mkdir -p $($(package)_staging_prefix_dir)/lib/clang/3.2/include && \ - mkdir -p $($(package)_staging_prefix_dir)/bin && \ + cd $($(package)_extract_dir)/toolchain && \ + mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \ + mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \ cp -P bin/clang bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ - cp lib/clang/3.2/include/* $($(package)_staging_prefix_dir)/lib/clang/3.2/include/ && \ - echo "#!/bin/sh" > $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - echo "exit 0" >> $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - chmod +x $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil + cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \ + cp bin/$(host)-dsymutil $($(package)_staging_prefix_dir)/bin && \ + if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \ + if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi endef diff --git a/depends/packages/native_libuuid.mk b/depends/packages/native_libuuid.mk deleted file mode 100644 index b25540f80df..00000000000 --- a/depends/packages/native_libuuid.mk +++ /dev/null @@ -1,24 +0,0 @@ -package:=native_libuuid -$(package)_version=1.41.14 -$(package)_download_path=http://downloads.sourceforge.net/e2fsprogs -$(package)_file_name=e2fsprogs-libs-$($(package)_version).tar.gz -$(package)_sha256_hash=dbc7a138a3218d9b80a0626b5b692d76934d6746d8cbb762751be33785d8d9f5 - -define $(package)_set_vars -$(package)_config_opts=--disable-elf-shlibs --disable-uuidd -$(package)_cflags+=-m32 -$(package)_ldflags+=-m32 -$(package)_cxxflags+=-m32 -endef - -define $(package)_config_cmds - $($(package)_autoconf) -endef - -define $(package)_build_cmds - $(MAKE) -C lib/uuid -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) -C lib/uuid install -endef diff --git a/depends/packages/native_openssl.mk b/depends/packages/native_openssl.mk deleted file mode 100644 index 1f25d6afccd..00000000000 --- a/depends/packages/native_openssl.mk +++ /dev/null @@ -1,21 +0,0 @@ -package=native_openssl -$(package)_version=1.0.1h -$(package)_download_path=https://www.openssl.org/source -$(package)_file_name=openssl-$($(package)_version).tar.gz -$(package)_sha256_hash=9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 -define $(package)_set_vars -$(package)_build_config_opts= --prefix=$(build_prefix) no-zlib no-shared no-krb5C linux-generic32 -m32 -endef - -define $(package)_config_cmds - ./Configure $($(package)_build_config_opts) &&\ - sed -i "s|engines apps test|engines|" Makefile -endef - -define $(package)_build_cmds - $(MAKE) -j1 -endef - -define $(package)_stage_cmds - $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw -endef diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index ad64494c1f2..687aae6682c 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)" @@ -10,7 +10,7 @@ $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/o $(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2 $(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3 $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags) -$(package)_config_opts_linux=-fPIC +$(package)_config_opts_linux=-fPIC -Wa,--noexecstack $(package)_config_opts_x86_64_linux=linux-x86_64 $(package)_config_opts_i686_linux=linux-generic32 $(package)_config_opts_arm_linux=linux-generic32 @@ -23,7 +23,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/depends/packages/packages.mk b/depends/packages/packages.mk index bbf53cc2dce..03908aba599 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -4,20 +4,15 @@ native_packages := native_ccache native_comparisontool qt_native_packages = native_protobuf qt_packages = qrencode protobuf -qt46_linux_packages = qt46 expat dbus libxcb xcb_proto libXau xproto freetype libX11 xextproto libXext xtrans libICE libSM -qt5_linux_packages= qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans - +qt_linux_packages= qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans qt_darwin_packages=qt qt_mingw32_packages=qt -qt_linux_$(USE_LINUX_STATIC_QT5):=$(qt5_linux_packages) -qt_linux_:=$(qt46_linux_packages) -qt_linux_packages:=$(qt_linux_$(USE_LINUX_STATIC_QT5)) wallet_packages=bdb upnp_packages=miniupnpc ifneq ($(build_os),darwin) -darwin_native_packages=native_libuuid native_openssl native_cctools native_cdrkit native_libdmg-hfsplus +darwin_native_packages=native_cctools native_cdrkit native_libdmg-hfsplus endif diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 6a8e714a489..cba2fbd1513 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,53 +1,131 @@ PACKAGE=qt -$(package)_version=5.2.1 -$(package)_download_path=http://download.qt-project.org/official_releases/qt/5.2/$($(package)_version)/single -$(package)_file_name=$(package)-everywhere-opensource-src-$($(package)_version).tar.gz -$(package)_sha256_hash=84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1 +$(package)_version=5.5.0 +$(package)_download_path=http://download.qt.io/official_releases/qt/5.5/$($(package)_version)/submodules +$(package)_suffix=opensource-src-$($(package)_version).tar.gz +$(package)_file_name=qtbase-$($(package)_suffix) +$(package)_sha256_hash=7e82b1318f88e56a2a9376e069aa608d4fd96b48cb0e1b880ae658b0a1af0561 $(package)_dependencies=openssl $(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext $(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch +$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch mingw-uuidof.patch + +$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) +$(package)_qttranslations_sha256_hash=c4bd6db6e426965c6f8824c54e81f68bbd61e2bae1bcadc328c6e81c45902a0d + +$(package)_qttools_file_name=qttools-$($(package)_suffix) +$(package)_qttools_sha256_hash=d9e06bd19ecc86afba5e95d45a906d1bc1ad579aa70001e36143c1aaf695bdd6 + +$(package)_extra_sources = $($(package)_qttranslations_file_name) +$(package)_extra_sources += $($(package)_qttools_file_name) define $(package)_set_vars $(package)_config_opts_release = -release $(package)_config_opts_debug = -debug -$(package)_config_opts += -opensource -confirm-license -no-audio-backend -no-sql-tds -no-glib -no-icu -$(package)_config_opts += -no-cups -no-iconv -no-gif -no-audio-backend -no-freetype -$(package)_config_opts += -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch -$(package)_config_opts += -no-gif -no-feature-style-plastique -$(package)_config_opts += -no-qml-debug -no-pch -no-nis -nomake examples -nomake tests -$(package)_config_opts += -no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif -$(package)_config_opts += -no-feature-style-windowsmobile -no-feature-style-windowsce -$(package)_config_opts += -no-feature-style-cleanlooks -$(package)_config_opts += -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -$(package)_config_opts += -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -$(package)_config_opts += -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -$(package)_config_opts += -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtx11extras -$(package)_config_opts += -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns -$(package)_config_opts += -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtmacextras -$(package)_config_opts += -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc - -$(package)_config_opts += -prefix $(host_prefix) -bindir $(build_prefix)/bin -$(package)_config_opts += -no-c++11 -openssl-linked -v -static -silent -pkg-config -$(package)_config_opts += -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre +$(package)_config_opts += -opensource -confirm-license +$(package)_config_opts += -no-audio-backend +$(package)_config_opts += -no-glib +$(package)_config_opts += -no-icu +$(package)_config_opts += -no-cups +$(package)_config_opts += -no-iconv +$(package)_config_opts += -no-gif +$(package)_config_opts += -no-freetype +$(package)_config_opts += -no-nis +$(package)_config_opts += -no-pch +$(package)_config_opts += -no-qml-debug +$(package)_config_opts += -nomake examples +$(package)_config_opts += -nomake tests +$(package)_config_opts += -no-feature-style-windowsmobile +$(package)_config_opts += -no-feature-style-windowsce +$(package)_config_opts += -no-sql-db2 +$(package)_config_opts += -no-sql-ibase +$(package)_config_opts += -no-sql-oci +$(package)_config_opts += -no-sql-tds +$(package)_config_opts += -no-sql-mysql +$(package)_config_opts += -no-sql-odbc +$(package)_config_opts += -no-sql-psql +$(package)_config_opts += -no-sql-sqlite +$(package)_config_opts += -no-sql-sqlite2 +$(package)_config_opts += -prefix $(host_prefix) +$(package)_config_opts += -hostprefix $(build_prefix) +$(package)_config_opts += -bindir $(build_prefix)/bin +$(package)_config_opts += -no-c++11 +$(package)_config_opts += -openssl-linked +$(package)_config_opts += -v +$(package)_config_opts += -static +$(package)_config_opts += -silent +$(package)_config_opts += -pkg-config +$(package)_config_opts += -qt-libpng +$(package)_config_opts += -qt-libjpeg +$(package)_config_opts += -qt-zlib +$(package)_config_opts += -qt-pcre +$(package)_config_opts += -no-pulseaudio +$(package)_config_opts += -no-openvg +$(package)_config_opts += -no-xrender +$(package)_config_opts += -no-alsa +$(package)_config_opts += -no-mtdev +$(package)_config_opts += -no-gstreamer +$(package)_config_opts += -no-mitshm +$(package)_config_opts += -no-kms +$(package)_config_opts += -no-reduce-relocations +$(package)_config_opts += -no-egl +$(package)_config_opts += -no-eglfs +$(package)_config_opts += -no-linuxfb +$(package)_config_opts += -no-xinput2 +$(package)_config_opts += -no-libudev +$(package)_config_opts += -no-use-gold-linker +$(package)_config_opts += -reduce-exports +$(package)_config_opts += -optimized-qmake ifneq ($(build_os),darwin) -$(package)_config_opts_darwin = -xplatform macx-clang-linux -device-option MAC_SDK_PATH=$(OSX_SDK) -device-option CROSS_COMPILE="$(host)-" -$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) -device-option MAC_TARGET=$(host) +$(package)_config_opts_darwin = -xplatform macx-clang-linux +$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) +$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) +$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" +$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) +$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) +$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION) endif -$(package)_config_opts_linux = -qt-xkbcommon -qt-xcb -no-eglfs -no-linuxfb -system-freetype -no-sm -fontconfig -no-xinput2 -no-libudev -no-egl -no-opengl +$(package)_config_opts_linux = -qt-xkbcommon +$(package)_config_opts_linux += -qt-xcb +$(package)_config_opts_linux += -system-freetype +$(package)_config_opts_linux += -no-sm +$(package)_config_opts_linux += -fontconfig +$(package)_config_opts_linux += -no-opengl $(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host) $(package)_config_opts_i686_linux = -xplatform linux-g++-32 $(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-" $(package)_build_env = QT_RCC_TEST=1 endef +define $(package)_fetch_cmds +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) +endef + +define $(package)_extract_cmds + mkdir -p $($(package)_extract_dir) && \ + echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir qtbase && \ + tar --strip-components=1 -xf $($(package)_source) -C qtbase && \ + mkdir qttranslations && \ + tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ + mkdir qttools && \ + tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools +endef + define $(package)_preprocess_cmds sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \ sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \ - sed -i.old "/XIproto.h/d" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \ + sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\ + sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp &&\ + sed -i.old "s/PCIDLIST_ABSOLUTE/const ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\ + sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \ sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\ @@ -55,7 +133,7 @@ define $(package)_preprocess_cmds cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \ - patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch && \ + patch -p1 < $($(package)_patch_dir)/mingw-uuidof.patch && \ echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ @@ -68,7 +146,6 @@ define $(package)_config_cmds export PKG_CONFIG_SYSROOT_DIR=/ && \ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \ - export CPATH=$(host_prefix)/include && \ ./configure $($(package)_config_opts) && \ $(MAKE) sub-src-clean && \ cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \ @@ -77,7 +154,6 @@ define $(package)_config_cmds endef define $(package)_build_cmds - export CPATH=$(host_prefix)/include && \ $(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \ $(MAKE) -C ../qttools/src/linguist/lrelease && \ $(MAKE) -C ../qttranslations @@ -93,6 +169,6 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf mkspecs/ lib/cmake/ && \ - rm lib/libQt5Bootstrap.a lib/lib*.la lib/*.prl plugins/*/*.prl + rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \ + rm -f lib/lib*.la lib/*.prl plugins/*/*.prl endef diff --git a/depends/patches/boost/gcc_5_no_cxx11.patch b/depends/patches/boost/gcc_5_no_cxx11.patch new file mode 100644 index 00000000000..04514c593a1 --- /dev/null +++ b/depends/patches/boost/gcc_5_no_cxx11.patch @@ -0,0 +1,37 @@ +From eec808554936ae068b23df07ab54d4dc6302a695 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Sat, 23 Aug 2014 09:38:02 +0100 +Subject: [PATCH] Fix BOOST_NO_CXX11_VARIADIC_TEMPLATES definition - the + feature was introduced in GCC 4.4. + +--- + include/boost/config/compiler/gcc.hpp | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp +index f37159d..97d8a18 100644 +--- a/include/boost/config/compiler/gcc.hpp ++++ b/include/boost/config/compiler/gcc.hpp +@@ -154,14 +154,6 @@ + # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS + # define BOOST_NO_CXX11_RVALUE_REFERENCES + # define BOOST_NO_CXX11_STATIC_ASSERT +- +-// Variadic templates compiler: +-// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html +-# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +-# define BOOST_HAS_VARIADIC_TMPL +-# else +-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +-# endif + #endif + + // C++0x features in 4.4.n and later +@@ -176,6 +168,7 @@ + # define BOOST_NO_CXX11_DELETED_FUNCTIONS + # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES + # define BOOST_NO_CXX11_INLINE_NAMESPACES ++# define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + + #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) diff --git a/depends/patches/qt/fix-xcb-include-order.patch b/depends/patches/qt/fix-xcb-include-order.patch index bf6c6dca36c..ae469ea94bf 100644 --- a/depends/patches/qt/fix-xcb-include-order.patch +++ b/depends/patches/qt/fix-xcb-include-order.patch @@ -1,21 +1,45 @@ ---- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2014-07-30 18:17:27.384458441 -0400 -+++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2014-07-30 18:18:28.620459303 -0400 -@@ -101,10 +101,6 @@ - } - } - --DEFINES += $$QMAKE_DEFINES_XCB --LIBS += $$QMAKE_LIBS_XCB +--- old/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:06:42.705930685 +0000 ++++ new/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:08:41.281926351 +0000 +@@ -94,8 +94,6 @@ + + DEFINES += $$QMAKE_DEFINES_XCB + LIBS += $$QMAKE_LIBS_XCB -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB -- +-QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB + CONFIG += qpa/genericunixfontdatabase - - contains(QT_CONFIG, dbus) { -@@ -141,3 +137,7 @@ - INCLUDEPATH += ../../../3rdparty/xkbcommon/xkbcommon/ - } - } -+ -+DEFINES += $$QMAKE_DEFINES_XCB -+LIBS += $$QMAKE_LIBS_XCB -+INCLUDEPATH += $$QMAKE_CFLAGS_XCB + +@@ -104,7 +102,8 @@ + contains(QT_CONFIG, xcb-qt) { + DEFINES += XCB_USE_RENDER + XCB_DIR = ../../../3rdparty/xcb +- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude ++ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB ++ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB + LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static + } else { + LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms +--- old/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:07:04.641929383 +0000 ++++ new/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:10:15.485922059 +0000 +@@ -8,7 +8,8 @@ + + XCB_DIR = ../../../../3rdparty/xcb + +-INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude ++QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude ++QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/include/xcb -I$$XCB_DIR/sysinclude + + QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB + QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB +--- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:02:59.530038830 -0400 ++++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:01:22.106037459 -0400 +@@ -11,3 +11,9 @@ + qxcbmain.cpp + OTHER_FILES += xcb.json README + ++contains(QT_CONFIG, xcb-qt) { ++ DEFINES += XCB_USE_RENDER ++ XCB_DIR = ../../../3rdparty/xcb ++ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB ++ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB ++} diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index f7302265bcd..a6d0070cca6 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -1,5 +1,6 @@ MAKEFILE_GENERATOR = UNIX CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname +DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) include(../common/gcc-base-mac.conf) @@ -10,12 +11,14 @@ QMAKE_XCODE_VERSION=4.3 QMAKE_XCODE_DEVELOPER_PATH=/Developer QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION} QMAKE_MAC_SDK=macosx -QMAKE_MAC_SDK.macosx.path = $$QMAKE_MAC_SDK_PATH +QMAKE_MAC_SDK.macosx.path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx +QMAKE_MAC_SDK.macosx.version = $${MAC_SDK_VERSION} +QMAKE_MAC_SDK.macosx.platform_path = /phony QMAKE_CFLAGS += -target $${MAC_TARGET} QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_LFLAGS += -target $${MAC_TARGET} +QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool diff --git a/depends/patches/qt/mingw-uuidof.patch b/depends/patches/qt/mingw-uuidof.patch new file mode 100644 index 00000000000..975366e6122 --- /dev/null +++ b/depends/patches/qt/mingw-uuidof.patch @@ -0,0 +1,44 @@ +--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:40:20.956781548 -0400 ++++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:29:32.052772416 -0400 +@@ -69,7 +69,7 @@ + #include + #include + #include +-#ifndef Q_OS_WINCE ++#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1)) + # include + #endif + +@@ -762,7 +762,7 @@ + HWND_MESSAGE, NULL, (HINSTANCE)GetModuleHandle(0), NULL); + } + +-#ifndef Q_OS_WINCE ++#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1)) + // Re-engineered from the inline function _com_error::ErrorMessage(). + // We cannot use it directly since it uses swprintf_s(), which is not + // present in the MSVCRT.DLL found on Windows XP (QTBUG-35617). +@@ -781,7 +781,7 @@ + return QStringLiteral("IDispatch error #") + QString::number(wCode); + return QStringLiteral("Unknown error 0x0") + QString::number(comError.Error(), 16); + } +-#endif // !Q_OS_WINCE ++#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1)) + + /*! + \brief Common COM error strings. +@@ -846,12 +846,12 @@ + default: + break; + } +-#ifndef Q_OS_WINCE ++#if !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1)) + _com_error error(hr); + result += QByteArrayLiteral(" ("); + result += errorMessageFromComError(error); + result += ')'; +-#endif // !Q_OS_WINCE ++#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1)) + return result; + } + diff --git a/depends/patches/qt/qt5-tablet-osx.patch b/depends/patches/qt/qt5-tablet-osx.patch deleted file mode 100644 index 7deabf8d4e0..00000000000 --- a/depends/patches/qt/qt5-tablet-osx.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- old/qtbase/src/widgets/kernel/qwidgetwindow.cpp 2014-09-05 20:45:18.717570370 -0400 -+++ new/qtbase/src/widgets/kernel/qwidgetwindow.cpp 2014-09-05 20:52:38.653576561 -0400 -@@ -57,7 +57,7 @@ - Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets(); - - QWidget *qt_button_down = 0; // widget got last button-down --static QWidget *qt_tablet_target = 0; -+static QPointer qt_tablet_target = 0; - - // popup control - QWidget *qt_popup_down = 0; // popup that contains the pressed widget -@@ -96,8 +96,6 @@ - - QWidgetWindow::~QWidgetWindow() - { -- if (m_widget == qt_tablet_target) -- qt_tablet_target = 0; - } - - #ifndef QT_NO_ACCESSIBILITY diff --git a/doc/Doxyfile b/doc/Doxyfile index 8a11d1e8d01..0ba664f1bd8 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -34,7 +34,7 @@ PROJECT_NAME = Bitcoin # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.10.99 +PROJECT_NUMBER = 0.11.3 # 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 ecb8dc80fdb..1fa56e26c5e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,16 +1,13 @@ -Bitcoin 0.10.99 +Bitcoin Core 0.11.3 ===================== -Copyright (c) 2009-2014 Bitcoin Developers - - Setup --------------------- -[Bitcoin Core](http://bitcoin.org/en/download) is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); 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. Thankfully you only have to do this once. If you would like the process to go faster you can [download the blockchain directly](bootstrap.md). +[Bitcoin Core](http://bitcoin.org/en/download) is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); 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. Running --------------------- -The following are some helpful notes on how to run Bitcoin on your native platform. +The following are some helpful notes on how to run Bitcoin on your native platform. ### Unix @@ -29,7 +26,7 @@ Unpack the files into a directory and run: Unpack the files into a directory, and then run bitcoin-qt.exe. -### OSX +### OS X Drag Bitcoin-Qt to your applications folder, and then run Bitcoin-Qt. @@ -44,20 +41,25 @@ 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. -- [OSX Build Notes](build-osx.md) +- [OS X Build Notes](build-osx.md) - [Unix Build Notes](build-unix.md) +- [Gitian Building Guide](gitian-building.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. -- [Coding Guidelines](coding.md) +- [Developer Notes](developer-notes.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/) - [Translation Process](translation_process.md) +- [Translation Strings Policy](translation_strings_policy.md) - [Unit Tests](unit-tests.md) +- [Unauthenticated REST Interface](REST-interface.md) +- [BIPS](bips.md) +- [Dnsseed Policy](dnsseed-policy.md) ### Resources * Discuss on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Development & Technical Discussion board](https://bitcointalk.org/index.php?board=6.0). diff --git a/doc/README_osx.txt b/doc/README_osx.txt index d56234f7d94..f589bfc676f 100644 --- a/doc/README_osx.txt +++ b/doc/README_osx.txt @@ -1,12 +1,12 @@ -Deterministic OSX Dmg Notes. +Deterministic OS X Dmg Notes. -Working OSX DMG's are created in Linux by combining a recent clang, +Working OS X DMGs are created in Linux by combining a recent clang, the Apple's binutils (ld, ar, etc), and DMG authoring tools. Apple uses clang extensively for development and has upstreamed the necessary functionality so that a vanilla clang can take advantage. It supports the use of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary -when building for OSX. A pre-compiled version of 3.2 is used because it was not +when building for OS X. A pre-compiled version of 3.2 is used because it was not available in the Precise repositories at the time this work was started. In the future, it can be switched to use system packages instead. @@ -29,17 +29,18 @@ originally done in toolchain4. To complicate things further, all builds must target an Apple SDK. These SDKs are free to download, but not redistributable. -To obtain it, register for a developer account, then download xcode4630916281a.dmg: -https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg +To obtain it, register for a developer account, then download the Xcode 6.1.1 dmg: +https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg + This file is several gigabytes in size, but only a single directory inside is -needed: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk +needed: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file. -To create a tarball suitable for gitian input, mount the dmg in OSX, then create it with: - $ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk +To create a tarball suitable for Gitian input, mount the dmg in OS X, then create it with: + $ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk -The gitian descriptors build 2 sets of files: Linux tools, then Apple binaries +The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are created using these tools. The build process has been designed to avoid including the SDK's files in Gitian's outputs. All interim tarballs are fully deterministic and may be freely redistributed. @@ -57,26 +58,26 @@ libdmg-hfsplus project is used to compress it. There are several bugs in this tool and its maintainer has seemingly abandoned the project. It has been forked and is available (with fixes) here: https://github.com/theuni/libdmg-hfsplus . -The 'dmg' tool has the ability to create DMG's from scratch as well, but this +The 'dmg' tool has the ability to create DMGs from scratch as well, but this functionality is broken. Only the compression feature is currently used. Ideally, the creation could be fixed and genisoimage would no longer be necessary. 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 +DMG without one, move it to a device running OS X, 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 +As of OS X 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 +- 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 +- 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 5ac1152055e..c9b71778ffc 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,13 +1,5 @@ -Bitcoin 0.10.99 - -Copyright (c) 2009-2014 Bitcoin Core Developers - -Distributed under the MIT 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 (https://www.openssl.org/). This product includes -cryptographic software written by Eric Young (eay@cryptsoft.com). - +Bitcoin Core 0.11.3 +===================== Intro ----- diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 0af650b4e8e..7bb6e8821cd 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -5,23 +5,77 @@ 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. +####Transactions +`GET /rest/tx/.` -`GET /rest/block/BLOCK-HASH.{bin|hex|json}` -`GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}` +Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. -Given a block hash, -Returns a block, in binary, hex-encoded binary or JSON formats. +For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option. + +####Blocks +`GET /rest/block/.` +`GET /rest/block/notxdetails/.` + +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. +####Blockheaders +`GET /rest/headers//.` + +Given a block hash: returns amount of blockheaders in upward direction. + +JSON is not supported. + +####Chaininfos +`GET /rest/chaininfo.json` + +Returns various state info regarding block chain processing. +Only supports JSON as output format. +* chain : (string) current network name as defined in BIP70 (main, test, regtest) +* blocks : (numeric) the current number of blocks processed in the server +* headers : (numeric) the current number of headers we have validated +* bestblockhash : (string) the hash of the currently best block +* difficulty : (numeric) the current difficulty +* verificationprogress : (numeric) estimate of verification progress [0..1] +* chainwork : (string) total amount of work in active chain, in hexadecimal + +####Query UTXO set +`GET /rest/getutxos//-/-/.../-.` + +The getutxo command allows querying of the UTXO set given a set of outpoints. +See BIP64 for input and output serialisation: +https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki + +Example: +``` +$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp +{ + "chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb", + "chainHeight" : 325347, + "utxos" : [ + { + "scriptPubKey" : { + "addresses" : [ + "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD" + ], + "type" : "pubkeyhash", + "hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac", + "reqSigs" : 1, + "asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG" + }, + "value" : 8.8687, + "height" : 2147483647, + "txvers" : 1 + } + ], + "bitmap" : "1" +} +``` 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 `