mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 08:09:19 +01:00
Compare commits
161 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d05c03ab4e | ||
|
|
b4f8c8f5f9 | ||
|
|
11c34e0f6c | ||
|
|
b3b4b008e3 | ||
|
|
9cf600e6da | ||
|
|
7013cc3d97 | ||
|
|
88aa771536 | ||
|
|
4fc8c042a2 | ||
|
|
e9865a41d6 | ||
|
|
d7962747c4 | ||
|
|
3108aed0f2 | ||
|
|
ef48e9b7df | ||
|
|
0b11082d36 | ||
|
|
feb3c15335 | ||
|
|
1be5779124 | ||
|
|
ab2be34059 | ||
|
|
54fee2d0ce | ||
|
|
001a64c71c | ||
|
|
b085138f89 | ||
|
|
471e0bdc7c | ||
|
|
caad1add4f | ||
|
|
33e0c3a866 | ||
|
|
82705af1eb | ||
|
|
69ce70866d | ||
|
|
6fb186f4bb | ||
|
|
fdb365df0e | ||
|
|
8960f2fc33 | ||
|
|
43163a5a4d | ||
|
|
fb811c31fd | ||
|
|
0365f19dec | ||
|
|
25be0597ca | ||
|
|
6928794f56 | ||
|
|
d52397b3c0 | ||
|
|
622f1438de | ||
|
|
41cde5bbdc | ||
|
|
6ebb141bf9 | ||
|
|
4c38fbae95 | ||
|
|
9ab932b769 | ||
|
|
8ad6996cc3 | ||
|
|
888ac4e7a3 | ||
|
|
76e707a44e | ||
|
|
84d228ed83 | ||
|
|
a21e4da901 | ||
|
|
b5d9c7d9fb | ||
|
|
4bbd72cca1 | ||
|
|
da6a3919a9 | ||
|
|
e7c3e6e4b4 | ||
|
|
ccd69c7d22 | ||
|
|
4664aae3fe | ||
|
|
cac23a5a0b | ||
|
|
06e0f79ae5 | ||
|
|
882e00e215 | ||
|
|
c11e2b8679 | ||
|
|
d841fc969a | ||
|
|
c13d50d861 | ||
|
|
c1c6de6ad4 | ||
|
|
7120874983 | ||
|
|
1b6d8f3fca | ||
|
|
e5b031f5d2 | ||
|
|
edb563e8a5 | ||
|
|
bccbc5f4c3 | ||
|
|
22388eac08 | ||
|
|
1677743fca | ||
|
|
d1e56838dc | ||
|
|
a0db9a79e5 | ||
|
|
8f378e98c5 | ||
|
|
3d3f9cd120 | ||
|
|
5df1a22c2e | ||
|
|
54ed0a0432 | ||
|
|
b0870346f2 | ||
|
|
1181bf86d1 | ||
|
|
382e613ef5 | ||
|
|
c144672045 | ||
|
|
a5b875f47b | ||
|
|
70550ed81b | ||
|
|
5df96269d3 | ||
|
|
948072c39f | ||
|
|
880c478635 | ||
|
|
98811f6ad4 | ||
|
|
83201b12ae | ||
|
|
507848b63d | ||
|
|
cc19ba76e4 | ||
|
|
6e1e62a04c | ||
|
|
9b53650a45 | ||
|
|
2d8bc0e6da | ||
|
|
21aa161453 | ||
|
|
09308a3882 | ||
|
|
7de7913abd | ||
|
|
780a182317 | ||
|
|
99e9601e80 | ||
|
|
45099b19da | ||
|
|
a2e9767225 | ||
|
|
20e3f2aefc | ||
|
|
fb88f1cc97 | ||
|
|
eb2a10afd6 | ||
|
|
cc6bd19660 | ||
|
|
84393f15b6 | ||
|
|
b52b6f2e38 | ||
|
|
a91a40febd | ||
|
|
3b8051864b | ||
|
|
961cf14ab3 | ||
|
|
8632383161 | ||
|
|
ab4b52a239 | ||
|
|
96f1723bb1 | ||
|
|
027d149352 | ||
|
|
96c700f5e4 | ||
|
|
f503a1486a | ||
|
|
987f26aa1a | ||
|
|
6be2c9b5b4 | ||
|
|
7aa253d3ec | ||
|
|
9ea0699278 | ||
|
|
f1a6d74775 | ||
|
|
5fe2dbd7b6 | ||
|
|
ace5ce05be | ||
|
|
98c0b8b85e | ||
|
|
1f53204045 | ||
|
|
181b863d22 | ||
|
|
142e5056cd | ||
|
|
9a7f4948c6 | ||
|
|
12c69167e3 | ||
|
|
b379bc5eef | ||
|
|
16e7c05de7 | ||
|
|
4c519a47a9 | ||
|
|
ba56a88ca5 | ||
|
|
fe5cc3b7f8 | ||
|
|
5d901f1ba0 | ||
|
|
0e6425da4a | ||
|
|
f8c3eb9568 | ||
|
|
d27be1f557 | ||
|
|
3741185a51 | ||
|
|
cba18514c0 | ||
|
|
a7d735dcc2 | ||
|
|
094c35cffc | ||
|
|
b683118cd0 | ||
|
|
1c4be55a99 | ||
|
|
7597fcd92f | ||
|
|
adb9f7ddde | ||
|
|
99fe0af2fe | ||
|
|
45593c271a | ||
|
|
d885aba347 | ||
|
|
36b1eb7631 | ||
|
|
76ef6d89b9 | ||
|
|
c4a3bf9e55 | ||
|
|
90de05e88e | ||
|
|
2bf36b4e7d | ||
|
|
831d24a19d | ||
|
|
1aafd7464f | ||
|
|
586ea168c2 | ||
|
|
1179f6373d | ||
|
|
0143c024af | ||
|
|
2744ea8c1f | ||
|
|
00eae584a2 | ||
|
|
ef4280e08b | ||
|
|
ed176ba584 | ||
|
|
38a976d5bb | ||
|
|
b526cbaa71 | ||
|
|
aec5c5fe26 | ||
|
|
600dc62559 | ||
|
|
030d7acf7d | ||
|
|
20cff2ade4 | ||
|
|
7944d81567 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
||||
src/version.cpp export-subst
|
||||
73
.gitignore
vendored
73
.gitignore
vendored
@@ -1,33 +1,6 @@
|
||||
*.tar.gz
|
||||
|
||||
*.exe
|
||||
src/*.exe
|
||||
src/bitcoin
|
||||
src/bitcoind
|
||||
src/bitcoin-cli
|
||||
src/test/test_bitcoin
|
||||
src/qt/test/test_bitcoin-qt
|
||||
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
src/bitcoin-config.h
|
||||
src/bitcoin-config.h.in
|
||||
src/build-aux/
|
||||
src/stamp-h1
|
||||
share/setup.nsi
|
||||
share/qt/Info.plist
|
||||
|
||||
src/qt/*.moc
|
||||
src/qt/moc_*.cpp
|
||||
src/qt/forms/ui_*.h
|
||||
|
||||
src/qt/test/moc*.cpp
|
||||
|
||||
.deps
|
||||
.dirstamp
|
||||
.*.swp
|
||||
*.*~*
|
||||
*.bak
|
||||
@@ -36,49 +9,13 @@ src/qt/test/moc*.cpp
|
||||
*.o
|
||||
*.patch
|
||||
.bitcoin
|
||||
*.a
|
||||
*.pb.cc
|
||||
*.pb.h
|
||||
|
||||
*.log
|
||||
*.trs
|
||||
*.dmg
|
||||
|
||||
*.json.h
|
||||
*.raw.h
|
||||
|
||||
# Compilation and Qt preprocessor part
|
||||
#compilation and Qt preprocessor part
|
||||
*.qm
|
||||
Makefile
|
||||
bitcoin-qt
|
||||
Bitcoin-Qt.app
|
||||
|
||||
# Unit-tests
|
||||
Makefile.test
|
||||
bitcoin-qt_test
|
||||
|
||||
# Resources cpp
|
||||
#resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Qt creator
|
||||
#qt creator
|
||||
*.pro.user
|
||||
|
||||
# Mac specific
|
||||
#mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
||||
#lcov
|
||||
*.gcno
|
||||
/*.info
|
||||
test_bitcoin.coverage/
|
||||
total.coverage/
|
||||
coverage_percent.txt
|
||||
|
||||
#build tests
|
||||
linux-coverage-build
|
||||
linux-build
|
||||
win32-build
|
||||
qa/pull-tester/run-bitcoind-for-test.sh
|
||||
qa/pull-tester/build-tests.sh
|
||||
|
||||
!src/leveldb*/Makefile
|
||||
|
||||
2
COPYING
2
COPYING
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2009-2013 Bitcoin Developers
|
||||
Copyright (c) 2009-2012 Bitcoin 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
|
||||
|
||||
8
INSTALL
8
INSTALL
@@ -1,5 +1,9 @@
|
||||
Building Bitcoin
|
||||
|
||||
See doc/build-*.md for instructions on building bitcoind,
|
||||
See doc/readme-qt.rst for instructions on building Bitcoin QT,
|
||||
the intended-for-end-users, nice-graphical-interface, reference
|
||||
implementation of Bitcoin.
|
||||
|
||||
See doc/build-*.txt for instructions on building bitcoind,
|
||||
the intended-for-services, no-graphical-interface, reference
|
||||
implementation of Bitcoin.
|
||||
implementation of Bitcoin.
|
||||
|
||||
160
Makefile.am
160
Makefile.am
@@ -1,160 +0,0 @@
|
||||
ACLOCAL_AMFLAGS = -I src/m4
|
||||
SUBDIRS = src
|
||||
.PHONY: deploy
|
||||
|
||||
GZIP_ENV="-9n"
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
|
||||
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_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
|
||||
|
||||
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
|
||||
|
||||
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
|
||||
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
|
||||
$(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
|
||||
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
|
||||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
|
||||
baseline_filtered.info block_test_filtered.info \
|
||||
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
|
||||
|
||||
dist-hook:
|
||||
-$(MAKE) -C $(top_distdir)/src/leveldb clean
|
||||
-$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||
|
||||
distcheck-hook:
|
||||
$(MKDIR_P) $(top_distdir)/_build/src/leveldb
|
||||
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
|
||||
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
|
||||
|
||||
distcleancheck:
|
||||
@:
|
||||
|
||||
$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
|
||||
$(MKDIR_P) $(top_builddir)/release
|
||||
$(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
|
||||
$(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
|
||||
$(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
|
||||
@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
|
||||
echo error: could not build $@
|
||||
|
||||
$(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN):
|
||||
make -C $(dir $@) $(notdir $@)
|
||||
|
||||
$(OSX_APP)/Contents/PkgInfo:
|
||||
$(MKDIR_P) $(@D)
|
||||
@echo "APPL????" > $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_STRIP_PROGRAM) $< $@
|
||||
|
||||
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_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
|
||||
|
||||
|
||||
if TARGET_DARWIN
|
||||
appbundle: $(OSX_APP_BUILT)
|
||||
deploy: $(OSX_DMG)
|
||||
endif
|
||||
if TARGET_WINDOWS
|
||||
deploy: $(BITCOIN_WIN_INSTALLER)
|
||||
endif
|
||||
|
||||
if USE_LCOV
|
||||
|
||||
baseline.info:
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
|
||||
|
||||
baseline_filtered.info: baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
leveldb_baseline.info: baseline_filtered.info
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
|
||||
|
||||
leveldb_baseline_filtered.info: leveldb_baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
|
||||
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
|
||||
|
||||
test_bitcoin.info: baseline_filtered_combined.info
|
||||
$(MAKE) -C src/ check
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
test_bitcoin_filtered.info: test_bitcoin.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
block_test.info: test_bitcoin_filtered.info
|
||||
$(MKDIR_P) qa/tmp
|
||||
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
|
||||
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
block_test_filtered.info: block_test.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
||||
|
||||
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
|
||||
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
total.coverage/.dirstamp: total_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
|
||||
|
||||
endif
|
||||
|
||||
if USE_COMPARISON_TOOL
|
||||
check-local:
|
||||
$(MKDIR_P) qa/tmp
|
||||
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
|
||||
|
||||
CLEANFILES = $(OSX_DMG) $(OSX_APP) $(BITCOIN_WIN_INSTALLER)
|
||||
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
clean-local:
|
||||
rm -rf test_bitcoin.coverage/ total.coverage/
|
||||
21
README
21
README
@@ -1,21 +0,0 @@
|
||||
AuthServiceProxy is an improved version of python-jsonrpc.
|
||||
|
||||
It includes the following generic improvements:
|
||||
|
||||
- HTTP connections persist for the life of the AuthServiceProxy object
|
||||
- sends protocol 'version', per JSON-RPC 1.1
|
||||
- sends proper, incrementing 'id'
|
||||
- uses standard Python json lib
|
||||
|
||||
It also includes the following bitcoin-specific details:
|
||||
|
||||
- sends Basic HTTP authentication headers
|
||||
- parses all JSON numbers that look like floats as Decimal
|
||||
|
||||
Installation:
|
||||
|
||||
- change the first line of setup.py to point to the directory of your installation of python 2.*
|
||||
- run setup.py
|
||||
|
||||
Note: This will only install bitcoinrpc. If you also want to install jsonrpc to preserve
|
||||
backwards compatibility, you have to replace 'bitcoinrpc' with 'jsonrpc' in setup.py and run it again.
|
||||
89
README.md
89
README.md
@@ -1,71 +1,42 @@
|
||||
Bitcoin Core integration/staging tree
|
||||
=====================================
|
||||
|
||||
http://www.bitcoin.org
|
||||
|
||||
Copyright (c) 2009-2013 Bitcoin Core Developers
|
||||
|
||||
What is Bitcoin?
|
||||
----------------
|
||||
|
||||
Bitcoin is an experimental new digital currency that enables instant payments to
|
||||
anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
|
||||
with no central authority: managing transactions and issuing money are carried
|
||||
out collectively by the network. Bitcoin Core is the name of open source
|
||||
software which enables the use of this currency.
|
||||
|
||||
For more information, as well as an immediately useable, binary version of
|
||||
the Bitcoin Core software, see http://www.bitcoin.org/en/download.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
|
||||
information or see http://opensource.org/licenses/MIT.
|
||||
Bitcoin integration/staging tree
|
||||
|
||||
Development process
|
||||
-------------------
|
||||
===================
|
||||
|
||||
Developers work in their own trees, then submit pull requests when they think
|
||||
their feature or bug fix is ready.
|
||||
Developers work in their own trees, then submit pull requests when
|
||||
they think their feature or bug fix is ready.
|
||||
|
||||
If it is a simple/trivial/non-controversial change, then one of the Bitcoin
|
||||
development team members simply pulls it.
|
||||
If it is a simple/trivial/non-controversial change, then one of the
|
||||
bitcoin 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).
|
||||
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
|
||||
|
||||
The patch will be accepted if there is broad consensus that it is a good thing.
|
||||
Developers should expect to rework and resubmit patches if the code doesn't
|
||||
match the project's coding conventions (see [doc/coding.md](doc/coding.md)) or are
|
||||
controversial.
|
||||
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 they don't match the project's coding conventions (see coding.txt)
|
||||
or are controversial.
|
||||
|
||||
The `master` branch is regularly built and tested, but is not guaranteed to be
|
||||
completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created
|
||||
regularly to indicate new official, stable release versions of Bitcoin.
|
||||
The master branch is regularly built and tested, but is not guaranteed
|
||||
to be completely stable. Tags are regularly created to indicate new
|
||||
official, stable release versions of Bitcoin. If you would like to
|
||||
help test the Bitcoin core, please contact QA@BitcoinTesting.org.
|
||||
|
||||
Testing
|
||||
-------
|
||||
Feature branches are created when there are major new features being
|
||||
worked on by several people.
|
||||
|
||||
Testing and code review is the bottleneck for development; we get more pull
|
||||
requests than we can review and test. Please be patient and help out, and
|
||||
remember this is a security-critical project where any mistake might cost people
|
||||
lots of money.
|
||||
From time to time a pull request will become outdated. If this occurs, and
|
||||
the pull is no longer automatically mergeable; a comment on the pull will
|
||||
be used to issue a warning of closure. The pull will be closed 15 days
|
||||
after the warning if action is not taken by the author. Pull requests closed
|
||||
in this manner will have their corresponding issue labeled 'stagnant'.
|
||||
|
||||
### Automated Testing
|
||||
Issues with no commits will be given a similar warning, and closed after
|
||||
15 days from their last activity. Issues closed in this manner will be
|
||||
labeled 'stale'.
|
||||
|
||||
Developers are strongly encouraged to write unit tests for new code, and to
|
||||
submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: `make check`
|
||||
|
||||
Every pull request is built for both Windows and Linux on a dedicated server,
|
||||
and unit and sanity tests are automatically run. The binaries produced may be
|
||||
used for manual QA testing — a link to them will appear in a comment on the
|
||||
pull request posted by [BitcoinPullTester](https://github.com/BitcoinPullTester). See https://github.com/TheBlueMatt/test-scripts
|
||||
for the build/test scripts.
|
||||
|
||||
### Manual Quality Assurance (QA) Testing
|
||||
|
||||
Large changes should have a test plan, and should be tested by somebody other
|
||||
than the developer who wrote the code.
|
||||
See https://github.com/bitcoin/QA/ for how to create a test plan.
|
||||
Requests to reopen closed pull requests and/or issues can be submitted to
|
||||
QA@BitcoinTesting.org.
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
srcdir="$(dirname $0)"
|
||||
cd "$srcdir"
|
||||
autoreconf --install --force
|
||||
280
bitcoin-qt.pro
Normal file
280
bitcoin-qt.pro
Normal file
@@ -0,0 +1,280 @@
|
||||
TEMPLATE = app
|
||||
TARGET =
|
||||
VERSION = 0.5.3
|
||||
INCLUDEPATH += src src/json src/qt
|
||||
DEFINES += QT_GUI BOOST_THREAD_USE_LIB
|
||||
CONFIG += no_include_pwd
|
||||
|
||||
# for boost 1.37, add -mt to the boost libraries
|
||||
# use: qmake BOOST_LIB_SUFFIX=-mt
|
||||
# for boost thread win32 with _win32 sufix
|
||||
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
|
||||
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
|
||||
|
||||
# Dependency library locations can be customized with BOOST_INCLUDE_PATH,
|
||||
# BOOST_LIB_PATH, BDB_INCLUDE_PATH, BDB_LIB_PATH
|
||||
# OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
|
||||
|
||||
OBJECTS_DIR = build
|
||||
MOC_DIR = build
|
||||
UI_DIR = build
|
||||
|
||||
# use: qmake "RELEASE=1"
|
||||
contains(RELEASE, 1) {
|
||||
# Mac: compile for maximum compatibility (10.5, 32-bit)
|
||||
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
|
||||
|
||||
!windows:!macx {
|
||||
# Linux: static link
|
||||
LIBS += -Wl,-Bstatic
|
||||
}
|
||||
}
|
||||
|
||||
# use: qmake "USE_UPNP=1" ( enabled by default; default)
|
||||
# or: qmake "USE_UPNP=0" (disabled by default)
|
||||
# or: qmake "USE_UPNP=-" (not supported)
|
||||
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
|
||||
contains(USE_UPNP, -) {
|
||||
message(Building without UPNP support)
|
||||
} else {
|
||||
message(Building with UPNP support)
|
||||
count(USE_UPNP, 0) {
|
||||
USE_UPNP=1
|
||||
}
|
||||
DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
|
||||
INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
|
||||
LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
|
||||
win32:LIBS += -liphlpapi
|
||||
}
|
||||
|
||||
# use: qmake "USE_DBUS=1"
|
||||
contains(USE_DBUS, 1) {
|
||||
message(Building with DBUS (Freedesktop notifications) support)
|
||||
DEFINES += USE_DBUS
|
||||
QT += dbus
|
||||
}
|
||||
|
||||
# use: qmake "USE_SSL=1"
|
||||
contains(USE_SSL, 1) {
|
||||
message(Building with SSL support for RPC)
|
||||
DEFINES += USE_SSL
|
||||
}
|
||||
|
||||
contains(BITCOIN_NEED_QT_PLUGINS, 1) {
|
||||
DEFINES += BITCOIN_NEED_QT_PLUGINS
|
||||
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
|
||||
}
|
||||
|
||||
!windows {
|
||||
# for extra security against potential buffer overflows
|
||||
QMAKE_CXXFLAGS += -fstack-protector
|
||||
QMAKE_LFLAGS += -fstack-protector
|
||||
# do not enable this on windows, as it will result in a non-working executable!
|
||||
}
|
||||
|
||||
# disable quite some warnings because bitcoin core "sins" a lot
|
||||
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wno-strict-aliasing -Wno-invalid-offsetof -Wno-unused-variable -Wno-unused-parameter -Wno-sign-compare -Wno-char-subscripts -Wno-unused-value -Wno-sequence-point -Wno-parentheses -Wno-unknown-pragmas -Wno-switch
|
||||
|
||||
# Input
|
||||
DEPENDPATH += src/qt src src json/include
|
||||
HEADERS += src/qt/bitcoingui.h \
|
||||
src/qt/transactiontablemodel.h \
|
||||
src/qt/addresstablemodel.h \
|
||||
src/qt/optionsdialog.h \
|
||||
src/qt/sendcoinsdialog.h \
|
||||
src/qt/addressbookpage.h \
|
||||
src/qt/aboutdialog.h \
|
||||
src/qt/editaddressdialog.h \
|
||||
src/qt/bitcoinaddressvalidator.h \
|
||||
src/base58.h \
|
||||
src/bignum.h \
|
||||
src/checkpoints.h \
|
||||
src/util.h \
|
||||
src/uint256.h \
|
||||
src/serialize.h \
|
||||
src/strlcpy.h \
|
||||
src/main.h \
|
||||
src/net.h \
|
||||
src/key.h \
|
||||
src/db.h \
|
||||
src/script.h \
|
||||
src/noui.h \
|
||||
src/init.h \
|
||||
src/headers.h \
|
||||
src/irc.h \
|
||||
src/json/json_spirit_writer_template.h \
|
||||
src/json/json_spirit_writer.h \
|
||||
src/json/json_spirit_value.h \
|
||||
src/json/json_spirit_utils.h \
|
||||
src/json/json_spirit_stream_reader.h \
|
||||
src/json/json_spirit_reader_template.h \
|
||||
src/json/json_spirit_reader.h \
|
||||
src/json/json_spirit_error_position.h \
|
||||
src/json/json_spirit.h \
|
||||
src/qt/clientmodel.h \
|
||||
src/qt/guiutil.h \
|
||||
src/qt/transactionrecord.h \
|
||||
src/qt/guiconstants.h \
|
||||
src/qt/optionsmodel.h \
|
||||
src/qt/monitoreddatamapper.h \
|
||||
src/qtui.h \
|
||||
src/qt/transactiondesc.h \
|
||||
src/qt/transactiondescdialog.h \
|
||||
src/qt/bitcoinamountfield.h \
|
||||
src/wallet.h \
|
||||
src/keystore.h \
|
||||
src/qt/transactionfilterproxy.h \
|
||||
src/qt/transactionview.h \
|
||||
src/qt/walletmodel.h \
|
||||
src/bitcoinrpc.h \
|
||||
src/qt/overviewpage.h \
|
||||
src/qt/csvmodelwriter.h \
|
||||
src/crypter.h \
|
||||
src/qt/sendcoinsentry.h \
|
||||
src/qt/qvalidatedlineedit.h \
|
||||
src/qt/bitcoinunits.h \
|
||||
src/qt/qvaluecombobox.h \
|
||||
src/qt/askpassphrasedialog.h \
|
||||
src/protocol.h \
|
||||
src/qt/notificator.h
|
||||
|
||||
SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
|
||||
src/qt/transactiontablemodel.cpp \
|
||||
src/qt/addresstablemodel.cpp \
|
||||
src/qt/optionsdialog.cpp \
|
||||
src/qt/sendcoinsdialog.cpp \
|
||||
src/qt/addressbookpage.cpp \
|
||||
src/qt/aboutdialog.cpp \
|
||||
src/qt/editaddressdialog.cpp \
|
||||
src/qt/bitcoinaddressvalidator.cpp \
|
||||
src/util.cpp \
|
||||
src/script.cpp \
|
||||
src/main.cpp \
|
||||
src/init.cpp \
|
||||
src/net.cpp \
|
||||
src/irc.cpp \
|
||||
src/checkpoints.cpp \
|
||||
src/db.cpp \
|
||||
src/json/json_spirit_writer.cpp \
|
||||
src/json/json_spirit_value.cpp \
|
||||
src/json/json_spirit_reader.cpp \
|
||||
src/qt/clientmodel.cpp \
|
||||
src/qt/guiutil.cpp \
|
||||
src/qt/transactionrecord.cpp \
|
||||
src/qt/optionsmodel.cpp \
|
||||
src/qt/monitoreddatamapper.cpp \
|
||||
src/qt/transactiondesc.cpp \
|
||||
src/qt/transactiondescdialog.cpp \
|
||||
src/qt/bitcoinstrings.cpp \
|
||||
src/qt/bitcoinamountfield.cpp \
|
||||
src/wallet.cpp \
|
||||
src/keystore.cpp \
|
||||
src/qt/transactionfilterproxy.cpp \
|
||||
src/qt/transactionview.cpp \
|
||||
src/qt/walletmodel.cpp \
|
||||
src/bitcoinrpc.cpp \
|
||||
src/qt/overviewpage.cpp \
|
||||
src/qt/csvmodelwriter.cpp \
|
||||
src/crypter.cpp \
|
||||
src/qt/sendcoinsentry.cpp \
|
||||
src/qt/qvalidatedlineedit.cpp \
|
||||
src/qt/bitcoinunits.cpp \
|
||||
src/qt/qvaluecombobox.cpp \
|
||||
src/qt/askpassphrasedialog.cpp \
|
||||
src/protocol.cpp \
|
||||
src/qt/notificator.cpp
|
||||
|
||||
RESOURCES += \
|
||||
src/qt/bitcoin.qrc
|
||||
|
||||
FORMS += \
|
||||
src/qt/forms/sendcoinsdialog.ui \
|
||||
src/qt/forms/addressbookpage.ui \
|
||||
src/qt/forms/aboutdialog.ui \
|
||||
src/qt/forms/editaddressdialog.ui \
|
||||
src/qt/forms/transactiondescdialog.ui \
|
||||
src/qt/forms/overviewpage.ui \
|
||||
src/qt/forms/sendcoinsentry.ui \
|
||||
src/qt/forms/askpassphrasedialog.ui
|
||||
|
||||
CODECFORTR = UTF-8
|
||||
|
||||
# for lrelease/lupdate
|
||||
# also add new translations to src/qt/bitcoin.qrc under translations/
|
||||
TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)
|
||||
|
||||
isEmpty(QMAKE_LRELEASE) {
|
||||
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
|
||||
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||
}
|
||||
isEmpty(TS_DIR):TS_DIR = src/qt/locale
|
||||
# automatically build translations, so they can be included in resource file
|
||||
TSQM.name = lrelease ${QMAKE_FILE_IN}
|
||||
TSQM.input = TRANSLATIONS
|
||||
TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
|
||||
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
|
||||
TSQM.CONFIG = no_link
|
||||
QMAKE_EXTRA_COMPILERS += TSQM
|
||||
PRE_TARGETDEPS += compiler_TSQM_make_all
|
||||
|
||||
# "Other files" to show in Qt Creator
|
||||
OTHER_FILES += \
|
||||
doc/*.rst doc/*.txt doc/README README.md
|
||||
|
||||
# platform specific defaults, if not overridden on command line
|
||||
isEmpty(BOOST_LIB_SUFFIX) {
|
||||
macx:BOOST_LIB_SUFFIX = -mt
|
||||
windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
|
||||
}
|
||||
|
||||
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
||||
BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
|
||||
}
|
||||
|
||||
isEmpty(BDB_LIB_PATH) {
|
||||
macx:BDB_LIB_PATH = /opt/local/lib/db48
|
||||
}
|
||||
|
||||
isEmpty(BDB_LIB_SUFFIX) {
|
||||
macx:BDB_LIB_SUFFIX = -4.8
|
||||
}
|
||||
|
||||
isEmpty(BDB_INCLUDE_PATH) {
|
||||
macx:BDB_INCLUDE_PATH = /opt/local/include/db48
|
||||
}
|
||||
|
||||
isEmpty(BOOST_LIB_PATH) {
|
||||
macx:BOOST_LIB_PATH = /opt/local/lib
|
||||
}
|
||||
|
||||
isEmpty(BOOST_INCLUDE_PATH) {
|
||||
macx:BOOST_INCLUDE_PATH = /opt/local/include
|
||||
}
|
||||
|
||||
windows:LIBS += -lws2_32
|
||||
windows:DEFINES += WIN32
|
||||
windows:RC_FILE = src/qt/res/bitcoin-qt.rc
|
||||
|
||||
macx:HEADERS += src/qt/macdockiconhandler.h
|
||||
macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
|
||||
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
|
||||
macx:ICON = src/qt/res/icons/bitcoin.icns
|
||||
macx:TARGET = "Bitcoin-Qt"
|
||||
|
||||
# Set libraries and includes at end, to use platform-defined defaults if not overridden
|
||||
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH
|
||||
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,)
|
||||
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
|
||||
# -lgdi32 has to happen after -lcrypto (see #681)
|
||||
windows:LIBS += -lgdi32
|
||||
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
|
||||
|
||||
contains(RELEASE, 1) {
|
||||
!windows:!macx {
|
||||
# Linux: turn dynamic linking back on for c/c++ runtime libraries
|
||||
LIBS += -Wl,-Bdynamic
|
||||
}
|
||||
}
|
||||
|
||||
system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)
|
||||
2
bitcoinrpc/.gitignore
vendored
2
bitcoinrpc/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
*.pyc
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
|
||||
"""
|
||||
Copyright 2011 Jeff Garzik
|
||||
|
||||
AuthServiceProxy has the following improvements over python-jsonrpc's
|
||||
ServiceProxy class:
|
||||
|
||||
- HTTP connections persist for the life of the AuthServiceProxy object
|
||||
(if server supports HTTP/1.1)
|
||||
- sends protocol 'version', per JSON-RPC 1.1
|
||||
- sends proper, incrementing 'id'
|
||||
- sends Basic HTTP authentication headers
|
||||
- parses all JSON numbers that look like floats as Decimal
|
||||
- uses standard Python json lib
|
||||
|
||||
Previous copyright, from python-jsonrpc/jsonrpc/proxy.py:
|
||||
|
||||
Copyright (c) 2007 Jan-Klaas Kollhof
|
||||
|
||||
This file is part of jsonrpc.
|
||||
|
||||
jsonrpc is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This software is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this software; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
try:
|
||||
import http.client as httplib
|
||||
except ImportError:
|
||||
import httplib
|
||||
import base64
|
||||
import json
|
||||
import decimal
|
||||
try:
|
||||
import urllib.parse as urlparse
|
||||
except ImportError:
|
||||
import urlparse
|
||||
|
||||
USER_AGENT = "AuthServiceProxy/0.1"
|
||||
|
||||
HTTP_TIMEOUT = 30
|
||||
|
||||
|
||||
class JSONRPCException(Exception):
|
||||
def __init__(self, rpc_error):
|
||||
Exception.__init__(self)
|
||||
self.error = rpc_error
|
||||
|
||||
|
||||
class AuthServiceProxy(object):
|
||||
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
|
||||
self.__service_url = service_url
|
||||
self.__service_name = service_name
|
||||
self.__url = urlparse.urlparse(service_url)
|
||||
if self.__url.port is None:
|
||||
port = 80
|
||||
else:
|
||||
port = self.__url.port
|
||||
self.__id_count = 0
|
||||
(user, passwd) = (self.__url.username, self.__url.password)
|
||||
try:
|
||||
user = user.encode('utf8')
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
passwd = passwd.encode('utf8')
|
||||
except AttributeError:
|
||||
pass
|
||||
authpair = user + b':' + passwd
|
||||
self.__auth_header = b'Basic ' + base64.b64encode(authpair)
|
||||
|
||||
if connection:
|
||||
# Callables re-use the connection of the original proxy
|
||||
self.__conn = connection
|
||||
elif self.__url.scheme == 'https':
|
||||
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
|
||||
None, None, False,
|
||||
timeout)
|
||||
else:
|
||||
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
|
||||
False, timeout)
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name.startswith('__') and name.endswith('__'):
|
||||
# Python internal stuff
|
||||
raise AttributeError
|
||||
if self.__service_name is not None:
|
||||
name = "%s.%s" % (self.__service_name, name)
|
||||
return AuthServiceProxy(self.__service_url, name, connection=self.__conn)
|
||||
|
||||
def __call__(self, *args):
|
||||
self.__id_count += 1
|
||||
|
||||
postdata = json.dumps({'version': '1.1',
|
||||
'method': self.__service_name,
|
||||
'params': args,
|
||||
'id': self.__id_count})
|
||||
self.__conn.request('POST', self.__url.path, postdata,
|
||||
{'Host': self.__url.hostname,
|
||||
'User-Agent': USER_AGENT,
|
||||
'Authorization': self.__auth_header,
|
||||
'Content-type': 'application/json'})
|
||||
|
||||
response = self._get_response()
|
||||
if response['error'] is not None:
|
||||
raise JSONRPCException(response['error'])
|
||||
elif 'result' not in response:
|
||||
raise JSONRPCException({
|
||||
'code': -343, 'message': 'missing JSON-RPC result'})
|
||||
else:
|
||||
return response['result']
|
||||
|
||||
def _batch(self, rpc_call_list):
|
||||
postdata = json.dumps(list(rpc_call_list))
|
||||
self.__conn.request('POST', self.__url.path, postdata,
|
||||
{'Host': self.__url.hostname,
|
||||
'User-Agent': USER_AGENT,
|
||||
'Authorization': self.__auth_header,
|
||||
'Content-type': 'application/json'})
|
||||
|
||||
return self._get_response()
|
||||
|
||||
def _get_response(self):
|
||||
http_response = self.__conn.getresponse()
|
||||
if http_response is None:
|
||||
raise JSONRPCException({
|
||||
'code': -342, 'message': 'missing HTTP response from server'})
|
||||
|
||||
return json.loads(http_response.read().decode('utf8'),
|
||||
parse_float=decimal.Decimal)
|
||||
691
configure.ac
691
configure.ac
@@ -1,691 +0,0 @@
|
||||
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 9)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2014)
|
||||
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
|
||||
AC_CONFIG_AUX_DIR([src/build-aux])
|
||||
AC_CONFIG_MACRO_DIR([src/m4])
|
||||
AC_CANONICAL_HOST
|
||||
AH_TOP([#ifndef BITCOIN_CONFIG_H])
|
||||
AH_TOP([#define BITCOIN_CONFIG_H])
|
||||
AH_BOTTOM([#endif //BITCOIN_CONFIG_H])
|
||||
|
||||
# This m4 will only be used if a system copy cannot be found. This is helpful
|
||||
# on systems where autotools are installed but the pkg-config macros are not in
|
||||
# a default location. It is currently used for building on OSX where autotools
|
||||
# are preinstalled but pkg-config comes from macports or homebrew. It should
|
||||
# probably be removed when building on <= 10.6 is no longer supported.
|
||||
m4_include([pkg.m4])
|
||||
|
||||
dnl faketime breaks configure and is only needed for make. Disable it here.
|
||||
unset FAKETIME
|
||||
|
||||
if test "x${CXXFLAGS+set}" = "xset"; then
|
||||
CXXFLAGS_overridden=yes
|
||||
else
|
||||
CXXFLAGS_overridden=no
|
||||
fi
|
||||
|
||||
dnl ==============================================================
|
||||
dnl Setup for automake
|
||||
dnl ==============================================================
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define subdir-objects foreign])
|
||||
|
||||
dnl faketime messes with timestamps and causes configure to be re-run.
|
||||
dnl --disable-maintainer-mode can be used to bypass this.
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
dnl make the compilation flags quiet unless V=1 is used
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# Enable wallet
|
||||
AC_ARG_ENABLE([wallet],
|
||||
[AS_HELP_STRING([--enable-wallet],
|
||||
[enable wallet (default is yes)])],
|
||||
[enable_wallet=$enableval],
|
||||
[enable_wallet=yes])
|
||||
|
||||
AC_ARG_WITH([miniupnpc],
|
||||
[AS_HELP_STRING([--with-miniupnpc],
|
||||
[enable UPNP (default is yes if libminiupnpc is found)])],
|
||||
[use_upnp=$withval],
|
||||
[use_upnp=auto])
|
||||
|
||||
AC_ARG_ENABLE([upnp-default],
|
||||
[AS_HELP_STRING([--enable-upnp-default],
|
||||
[if UPNP is enabled, turn it on at startup (default is no)])],
|
||||
[use_upnp_default=$enableval],
|
||||
[use_upnp_default=no])
|
||||
|
||||
dnl enable ipv6 support
|
||||
AC_ARG_ENABLE([ipv6],
|
||||
[AS_HELP_STRING([--enable-ipv6],
|
||||
[enable ipv6 (default is yes)])],
|
||||
[use_ipv6=$enableval],
|
||||
[use_ipv6=yes])
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]),
|
||||
[use_tests=$enableval],
|
||||
[use_tests=yes])
|
||||
|
||||
AC_ARG_WITH([comparison-tool],
|
||||
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
|
||||
[use_comparison_tool=$withval],
|
||||
[use_comparison_tool=no])
|
||||
|
||||
AC_ARG_ENABLE([comparison-tool-reorg-tests],
|
||||
AS_HELP_STRING([--enable-comparison-tool-reorg-tests],[enable expensive reorg tests in the comparison tool (default no)]),
|
||||
[use_comparison_tool_reorg_tests=$enableval],
|
||||
[use_comparison_tool_reorg_tests=no])
|
||||
|
||||
AC_ARG_WITH([qrencode],
|
||||
[AS_HELP_STRING([--with-qrencode],
|
||||
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
|
||||
[use_qr=$withval],
|
||||
[use_qr=auto])
|
||||
|
||||
AC_ARG_ENABLE([hardening],
|
||||
[AS_HELP_STRING([--enable-hardening],
|
||||
[attempt to harden the resulting executables (default is yes)])],
|
||||
[use_hardening=$enableval],
|
||||
[use_hardening=yes])
|
||||
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--enable-ccache],
|
||||
[use ccache for building (default is yes if ccache is found)])],
|
||||
[use_ccache=$enableval],
|
||||
[use_ccache=auto])
|
||||
|
||||
AC_ARG_ENABLE([lcov],
|
||||
[AS_HELP_STRING([--enable-lcov],
|
||||
[enable lcov testing (default is no)])],
|
||||
[use_lcov=yes],
|
||||
[use_lcov=no])
|
||||
|
||||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
||||
|
||||
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
AC_CONFIG_HEADERS([src/bitcoin-config.h])
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXXCPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_OBJC
|
||||
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PROG_SED
|
||||
AC_PATH_TOOL(AR, ar)
|
||||
AC_PATH_TOOL(RANLIB, ranlib)
|
||||
AC_PATH_TOOL(STRIP, strip)
|
||||
AC_PATH_TOOL(GCOV, gcov)
|
||||
AC_PATH_PROG(LCOV, lcov)
|
||||
AC_PATH_PROG(JAVA, java)
|
||||
AC_PATH_PROG(GENHTML, genhtml)
|
||||
AC_PATH_PROG([GIT], [git])
|
||||
AC_PATH_PROG(CCACHE,ccache)
|
||||
AC_PATH_PROG(XGETTEXT,xgettext)
|
||||
AC_PATH_PROG(HEXDUMP,hexdump)
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
## TODO: Remove these hard-coded paths and flags. They are here for the sake of
|
||||
## compatibility with the legacy buildsystem.
|
||||
##
|
||||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
use_pkgconfig=yes
|
||||
case $host in
|
||||
*mingw*)
|
||||
|
||||
#pkgconfig does more harm than good with MinGW
|
||||
use_pkgconfig=no
|
||||
|
||||
TARGET_OS=windows
|
||||
AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing))
|
||||
AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing))
|
||||
|
||||
AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"])
|
||||
AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"])
|
||||
AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"])
|
||||
|
||||
AC_PATH_PROG([MAKENSIS], [makensis], none)
|
||||
if test x$MAKENSIS = xnone; then
|
||||
AC_MSG_WARN("makensis not found. Cannot create installer.")
|
||||
fi
|
||||
|
||||
AC_PATH_TOOL(WINDRES, windres, none)
|
||||
if test x$WINDRES = xnone; then
|
||||
AC_MSG_ERROR("windres not found")
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
|
||||
LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE"
|
||||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
CXXFLAGS="$CXXFLAGS -w"
|
||||
fi
|
||||
case $host in
|
||||
i?86-*) WINDOWS_BITS=32 ;;
|
||||
x86_64-*) WINDOWS_BITS=64 ;;
|
||||
*) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;;
|
||||
esac
|
||||
AC_SUBST(WINDOWS_BITS)
|
||||
;;
|
||||
*darwin*)
|
||||
TARGET_OS=darwin
|
||||
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
|
||||
if test x$cross_compiling != xyes; then
|
||||
AC_CHECK_PROG([PORT],port, port)
|
||||
if test x$PORT = xport; then
|
||||
dnl add default macports paths
|
||||
CPPFLAGS="$CPPFLAGS -isystem /opt/local/include -I/opt/local/include/db48"
|
||||
LIBS="$LIBS -L/opt/local/lib -L/opt/local/lib/db48"
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG([BREW],brew, brew)
|
||||
if test x$BREW = xbrew; then
|
||||
dnl add default homebrew paths
|
||||
openssl_prefix=`$BREW --prefix openssl`
|
||||
bdb_prefix=`$BREW --prefix berkeley-db4`
|
||||
export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
|
||||
LIBS="$LIBS -L$bdb_prefix/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x$use_comparison_tool != xno; then
|
||||
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
|
||||
fi
|
||||
|
||||
if test x$use_comparison_tool_reorg_tests != xno; then
|
||||
if test x$use_comparison_tool == x; then
|
||||
AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
|
||||
fi
|
||||
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
|
||||
else
|
||||
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
|
||||
fi
|
||||
|
||||
if test x$use_lcov == xyes; then
|
||||
if test x$LCOV == x; then
|
||||
AC_MSG_ERROR("lcov testing requested but lcov not found")
|
||||
fi
|
||||
if test x$GCOV == x; then
|
||||
AC_MSG_ERROR("lcov testing requested but gcov not found")
|
||||
fi
|
||||
if test x$JAVA == x; then
|
||||
AC_MSG_ERROR("lcov testing requested but java not found")
|
||||
fi
|
||||
if test x$GENHTML == x; then
|
||||
AC_MSG_ERROR("lcov testing requested but genhtml not found")
|
||||
fi
|
||||
if test x$use_comparison_tool == x; then
|
||||
AC_MSG_ERROR("lcov testing requested but comparison tool was not specified")
|
||||
fi
|
||||
LCOV="$LCOV --gcov-tool=$GCOV"
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
|
||||
[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 pthread compile/link requirements
|
||||
AX_PTHREAD
|
||||
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
|
||||
|
||||
# The following macro will add the necessary defines to bitcoin-config.h, but
|
||||
# they also need to be passed down to any subprojects. Pull the results out of
|
||||
# the cache and add them to CPPFLAGS.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
if test x$ac_cv_sys_file_offset_bits != x &&
|
||||
test x$ac_cv_sys_file_offset_bits != xno &&
|
||||
test x$ac_cv_sys_file_offset_bits != xunknown; then
|
||||
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
|
||||
fi
|
||||
|
||||
if test x$ac_cv_sys_large_files != x &&
|
||||
test x$ac_cv_sys_large_files != xno &&
|
||||
test x$ac_cv_sys_large_files != xunknown; then
|
||||
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
|
||||
fi
|
||||
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
|
||||
|
||||
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"])
|
||||
AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
|
||||
|
||||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
|
||||
AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
|
||||
])
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
|
||||
])
|
||||
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
|
||||
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
# -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries
|
||||
AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
|
||||
fi
|
||||
|
||||
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.
|
||||
if test x$TARGET_OS = xdarwin; then
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h])
|
||||
|
||||
dnl Check for MSG_NOSIGNAL
|
||||
AC_MSG_CHECKING(for MSG_NOSIGNAL)
|
||||
AC_TRY_COMPILE([#include <sys/socket.h>],
|
||||
[ int f = MSG_NOSIGNAL; ],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
LEVELDB_CPPFLAGS=
|
||||
LIBLEVELDB=
|
||||
LIBMEMENV=
|
||||
AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
|
||||
AC_SUBST(LEVELDB_CPPFLAGS)
|
||||
AC_SUBST(LIBLEVELDB)
|
||||
AC_SUBST(LIBMEMENV)
|
||||
|
||||
if test x$enable_wallet != xno; then
|
||||
dnl Check for libdb_cxx only if wallet enabled
|
||||
BITCOIN_FIND_BDB48
|
||||
fi
|
||||
|
||||
dnl Check for libminiupnpc (optional)
|
||||
if test x$use_upnp != xno; then
|
||||
AC_CHECK_HEADERS(
|
||||
[miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
|
||||
[AC_CHECK_LIB([miniupnpc], [main],, [have_miniupnpc=no])],
|
||||
[have_miniupnpc=no]
|
||||
)
|
||||
fi
|
||||
|
||||
dnl Check for boost libs
|
||||
AX_BOOST_BASE
|
||||
AX_BOOST_SYSTEM
|
||||
AX_BOOST_FILESYSTEM
|
||||
AX_BOOST_PROGRAM_OPTIONS
|
||||
AX_BOOST_THREAD
|
||||
AX_BOOST_CHRONO
|
||||
|
||||
if test x$use_tests = xyes; then
|
||||
|
||||
if test x$HEXDUMP = x; then
|
||||
AC_MSG_ERROR(hexdump is required for tests)
|
||||
fi
|
||||
|
||||
|
||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
|
||||
dnl Determine if -DBOOST_TEST_DYN_LINK is needed
|
||||
AC_MSG_CHECKING([for dynamic linked boost test])
|
||||
TEMP_LIBS="$LIBS"
|
||||
LIBS="$LIBS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
#define BOOST_TEST_DYN_LINK
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
])],
|
||||
[AC_MSG_RESULT(yes)]
|
||||
[TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"],
|
||||
[AC_MSG_RESULT(no)])
|
||||
LIBS="$TEMP_LIBS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
fi
|
||||
|
||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
|
||||
BOOST_INCLUDES="$BOOST_CPPFLAGS"
|
||||
|
||||
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
|
||||
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
|
||||
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
|
||||
dnl Allow passing extra needed dependency libraries for boost-chrono from static gitian build
|
||||
BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
|
||||
|
||||
TEMP_LIBS="$LIBS"
|
||||
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_TRY_LINK([
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <boost/version.hpp>
|
||||
],[
|
||||
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
],
|
||||
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB";
|
||||
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
|
||||
[boost_sleep=no])
|
||||
LIBS="$TEMP_LIBS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test x$boost_sleep != xyes; then
|
||||
TEMP_LIBS="$LIBS"
|
||||
LIBS="$LIBS $BOOST_LIBS"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_TRY_LINK([
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
],[
|
||||
#if BOOST_VERSION <= 105600
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(0));
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
],
|
||||
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
|
||||
[boost_sleep=no])
|
||||
LIBS="$TEMP_LIBS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test x$boost_sleep != xyes; then
|
||||
AC_MSG_ERROR(No working boost sleep implementation found. If on ubuntu 13.10 with libboost1.54-all-dev remove libboost.1.54-all-dev and use libboost1.53-all-dev)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([cli],
|
||||
[AS_HELP_STRING([--with-cli],
|
||||
[with CLI (default is yes)])],
|
||||
[build_bitcoin_cli=$withval],
|
||||
[build_bitcoin_cli=yes])
|
||||
|
||||
AC_ARG_WITH([daemon],
|
||||
[AS_HELP_STRING([--with-daemon],
|
||||
[with daemon (default is yes)])],
|
||||
[build_bitcoind=$withval],
|
||||
[build_bitcoind=yes])
|
||||
|
||||
BITCOIN_QT_INIT
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
|
||||
if test x$PKG_CONFIG == x; then
|
||||
AC_MSG_ERROR(pkg-config not found.)
|
||||
fi
|
||||
|
||||
: #NOP
|
||||
m4_ifdef(
|
||||
[PKG_CHECK_MODULES],
|
||||
[
|
||||
PKG_CHECK_MODULES([SSL], [libssl], [INCLUDES="$INCLUDES $SSL_CFLAGS"; LIBS="$LIBS $SSL_LIBS"], [AC_MSG_ERROR(openssl not found.)])
|
||||
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [INCLUDES="$INCLUDES $CRYPTO_CFLAGS"; LIBS="$LIBS $CRYPTO_LIBS"], [AC_MSG_ERROR(libcrypto not found.)])
|
||||
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
|
||||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
|
||||
fi
|
||||
]
|
||||
)
|
||||
else
|
||||
AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
|
||||
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR(libcrypto missing))
|
||||
|
||||
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
|
||||
AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR(libssl missing))
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],,BITCOIN_QT_FAIL(libprotobuf not found)))
|
||||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no])])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
|
||||
fi
|
||||
fi
|
||||
|
||||
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
|
||||
|
||||
AC_MSG_CHECKING([whether to build bitcoind])
|
||||
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
|
||||
AC_MSG_RESULT($build_bitcoind)
|
||||
|
||||
AC_MSG_CHECKING([whether to build bitcoin-cli])
|
||||
AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
|
||||
AC_MSG_RESULT($build_bitcoin_cli)
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
|
||||
|
||||
|
||||
if test x$use_ipv6 = xyes; then
|
||||
dnl Check for ipv6 build requirements
|
||||
AC_MSG_CHECKING(for operating system IPv6 support)
|
||||
AC_TRY_LINK([
|
||||
#if defined(_WINDOWS)
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
],[
|
||||
#if !defined(_WINDOWS)
|
||||
struct in6_addr ipv6Addr;
|
||||
struct sockaddr_in6 addr;
|
||||
#endif
|
||||
int temp = socket(AF_INET6, SOCK_STREAM, 0);],
|
||||
[AC_MSG_RESULT(yes); have_ipv6=yes; AC_DEFINE(HAVE_IPV6, 1, [Define this symbol if you have operating system IPv6 support])],
|
||||
[AC_MSG_RESULT(no)]; have_ipv6=no)
|
||||
fi
|
||||
AC_LANG_POP
|
||||
|
||||
if test "x$use_ccache" != "xno"; then
|
||||
AC_MSG_CHECKING(if ccache should be used)
|
||||
if test x$CCACHE = x; then
|
||||
if test "x$use_ccache" = "xyes"; then
|
||||
AC_MSG_ERROR([ccache not found.]);
|
||||
else
|
||||
use_ccache=no
|
||||
fi
|
||||
else
|
||||
use_ccache=yes
|
||||
CC="$ac_cv_path_CCACHE $CC"
|
||||
CXX="$ac_cv_path_CCACHE $CXX"
|
||||
fi
|
||||
AC_MSG_RESULT($use_ccache)
|
||||
fi
|
||||
|
||||
dnl enable wallet
|
||||
AC_MSG_CHECKING([if wallet should be enabled])
|
||||
if test x$enable_wallet != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions])
|
||||
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl enable ipv6 support
|
||||
AC_MSG_CHECKING([whether to build with support for IPv6])
|
||||
if test x$have_ipv6 = xno; then
|
||||
if test x$use_ipv6 = xyes; then
|
||||
AC_MSG_ERROR([IPv6 requested, but cannot be built. use --disable-ipv6])
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$use_ipv6 = xyes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([USE_IPV6],[1],[Define if IPv6 support should be compiled in])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl enable upnp support
|
||||
AC_MSG_CHECKING([whether to build with support for UPnP])
|
||||
if test x$have_miniupnpc = xno; then
|
||||
if test x$use_upnp = xyes; then
|
||||
AC_MSG_ERROR("UPnP requested but cannot be built. use --without-miniupnpc")
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$use_upnp != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING([whether to build with UPnP enabled by default])
|
||||
use_upnp=yes
|
||||
upnp_setting=0
|
||||
if test x$use_upnp_default != xno; then
|
||||
use_upnp_default=yes
|
||||
upnp_setting=1
|
||||
fi
|
||||
AC_MSG_RESULT($use_upnp_default)
|
||||
AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
CPPFLAGS="$CPPFLAGS -DSTATICLIB"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl these are only used when qt is enabled
|
||||
if test x$bitcoin_enable_qt != xno; then
|
||||
BUILD_QT=qt
|
||||
dnl enable dbus support
|
||||
AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
|
||||
if test x$bitcoin_enable_qt_dbus != xno; then
|
||||
AC_DEFINE([USE_DBUS],[1],[Define if dbus support should be compiled in])
|
||||
fi
|
||||
AC_MSG_RESULT($bitcoin_enable_qt_dbus)
|
||||
|
||||
dnl enable qr support
|
||||
AC_MSG_CHECKING([whether to build GUI with support for QR codes])
|
||||
if test x$have_qrencode = xno; then
|
||||
if test x$use_qr == xyes; then
|
||||
AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode")
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test x$use_qr != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([USE_QRCODE],[1],[Define if QR support should be compiled in])
|
||||
use_qr=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$XGETTEXT == x; then
|
||||
AC_MSG_WARN("xgettext is required to update qt translations")
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin-qt])
|
||||
if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_TEST_QT="test"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin])
|
||||
if test x$use_tests = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_TEST="test"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --enable-cli --enable-daemon --enable-gui or --enable-tests])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes])
|
||||
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
|
||||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
|
||||
|
||||
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
||||
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
||||
AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision])
|
||||
AC_DEFINE(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD, [Version Build])
|
||||
AC_DEFINE(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE, [Version is release])
|
||||
AC_DEFINE(COPYRIGHT_YEAR, _COPYRIGHT_YEAR, [Version is release])
|
||||
AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR)
|
||||
AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR)
|
||||
AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION)
|
||||
AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD)
|
||||
AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
|
||||
AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
|
||||
|
||||
|
||||
AC_SUBST(USE_UPNP)
|
||||
AC_SUBST(USE_QRCODE)
|
||||
AC_SUBST(USE_IPV6)
|
||||
AC_SUBST(INCLUDES)
|
||||
AC_SUBST(BOOST_LIBS)
|
||||
AC_SUBST(TESTDEFS)
|
||||
AC_SUBST(LEVELDB_TARGET_FLAGS)
|
||||
AC_SUBST(BUILD_TEST)
|
||||
AC_SUBST(BUILD_QT)
|
||||
AC_SUBST(BUILD_TEST_QT)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile src/qt/Makefile src/qt/test/Makefile share/setup.nsi share/qt/Info.plist])
|
||||
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
|
||||
AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
|
||||
AC_OUTPUT
|
||||
@@ -1,58 +0,0 @@
|
||||
Python Tools
|
||||
---------------------
|
||||
|
||||
### [BitRPC](/contrib/bitrpc) ###
|
||||
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
|
||||
|
||||
### [PyMiner](/contrib/pyminer) ###
|
||||
|
||||
This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow. The purpose is to provide a reference implementation of a miner, for study.
|
||||
|
||||
### [SpendFrom](/contrib/spendfrom) ###
|
||||
|
||||
Use the raw transactions API to send coins received on a particular
|
||||
address (or addresses).
|
||||
|
||||
### WalletTools
|
||||
Removed. Please see [/contrib/bitrpc](/contrib/bitrpc).
|
||||
|
||||
Repository Tools
|
||||
---------------------
|
||||
|
||||
### [Debian](/contrib/debian) ###
|
||||
Contains files used to package bitcoind/bitcoin-qt
|
||||
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
|
||||
|
||||
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
|
||||
Gavin's notes on getting gitian builds up and running using KVM.
|
||||
|
||||
### [Gitian-downloader](/contrib/gitian-downloader)
|
||||
Various PGP files of core developers.
|
||||
|
||||
### [Linearize](/contrib/linearize) ###
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
|
||||
### [MacDeploy](/contrib/macdeploy) ###
|
||||
Scripts and notes for Mac builds.
|
||||
|
||||
### [Qos](/contrib/qos) ###
|
||||
|
||||
A Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
|
||||
|
||||
### [Seeds](/contrib/seeds) ###
|
||||
Utility to generate the pnSeed[] array that is compiled into the client.
|
||||
|
||||
### [TestGen](/contrib/testgen) ###
|
||||
Utilities to generate test vectors for the data-driven Bitcoin tests.
|
||||
|
||||
### [Test Patches](/contrib/test-patches) ###
|
||||
These patches are applied when the automated pull-tester
|
||||
tests each pull and when master is tested using jenkins.
|
||||
|
||||
### [Verify SF Binaries](/contrib/verifysfbinaries) ###
|
||||
This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge.
|
||||
|
||||
### [Developer tools](/contrib/devtools) ###
|
||||
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.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
FORMS += \
|
||||
../src/qt/forms/aboutdialog.ui \
|
||||
../src/qt/forms/addressbookpage.ui \
|
||||
../src/qt/forms/askpassphrasedialog.ui \
|
||||
../src/qt/forms/coincontroldialog.ui \
|
||||
../src/qt/forms/editaddressdialog.ui \
|
||||
../src/qt/forms/helpmessagedialog.ui \
|
||||
../src/qt/forms/intro.ui \
|
||||
../src/qt/forms/openuridialog.ui \
|
||||
../src/qt/forms/optionsdialog.ui \
|
||||
../src/qt/forms/overviewpage.ui \
|
||||
../src/qt/forms/receivecoinsdialog.ui \
|
||||
../src/qt/forms/receiverequestdialog.ui \
|
||||
../src/qt/forms/rpcconsole.ui \
|
||||
../src/qt/forms/sendcoinsdialog.ui \
|
||||
../src/qt/forms/sendcoinsentry.ui \
|
||||
../src/qt/forms/signverifymessagedialog.ui \
|
||||
../src/qt/forms/transactiondescdialog.ui \
|
||||
|
||||
RESOURCES += \
|
||||
../src/qt/bitcoin.qrc
|
||||
@@ -1,115 +0,0 @@
|
||||
# bash programmable completion for bitcoind(1)
|
||||
# Copyright (c) 2012 Christian von Roques <roques@mti.ag>
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
have bitcoind && {
|
||||
|
||||
# call $bitcoind for RPC
|
||||
_bitcoin_rpc() {
|
||||
# determine already specified args necessary for RPC
|
||||
local rpcargs=()
|
||||
for i in ${COMP_LINE}; do
|
||||
case "$i" in
|
||||
-conf=*|-proxy*|-rpc*)
|
||||
rpcargs=( "${rpcargs[@]}" "$i" )
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$bitcoind "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add bitcoin accounts to COMPREPLY
|
||||
_bitcoin_accounts() {
|
||||
local accounts
|
||||
accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
||||
}
|
||||
|
||||
_bitcoind() {
|
||||
local cur prev words=() cword
|
||||
local bitcoind
|
||||
|
||||
# save and use original argument to invoke bitcoind
|
||||
# bitcoind might not be in $PATH
|
||||
bitcoind="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
if ((cword > 2)); then
|
||||
case ${words[cword-2]} in
|
||||
listreceivedbyaccount|listreceivedbyaddress)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
setgenerate)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
-*=*) # prevent nonsense completions
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
local helpopts commands
|
||||
|
||||
# only parse --help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
fi
|
||||
|
||||
# only parse help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
||||
commands=$(_bitcoin_rpc help 2>/dev/null | awk '{ print $1; }')
|
||||
fi
|
||||
|
||||
COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F _bitcoind bitcoind
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
@@ -1,8 +0,0 @@
|
||||
### BitRPC
|
||||
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
|
||||
|
||||
### Looking for Wallet Tools?
|
||||
BitRPC.py is able to do the exact same thing as `walletchangepass.py` and `walletunlock.py`. Their respective commands in BitRPC.py are:
|
||||
|
||||
bitrpc.py walletpassphrasechange
|
||||
bitrpc.py walletpassphrase
|
||||
@@ -1,21 +0,0 @@
|
||||
|
||||
Debian
|
||||
====================
|
||||
This directory contains files used to package bitcoind/bitcoin-qt
|
||||
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
|
||||
|
||||
## bitcoin: URI support ##
|
||||
|
||||
|
||||
bitcoin-qt.desktop (Gnome / Open Desktop)
|
||||
To install:
|
||||
|
||||
sudo desktop-file-install bitcoin-qt.desktop
|
||||
sudo update-desktop-database
|
||||
|
||||
If you build yourself, you will either need to modify the paths in
|
||||
the .desktop file or copy or symlink your bitcoin-qt binary to `/usr/bin`
|
||||
and the `../../share/pixmaps/bitcoin128.png` to `/usr/share/pixmaps`
|
||||
|
||||
bitcoin-qt.protocol (KDE)
|
||||
|
||||
16
contrib/debian/bin/bitcoin-qt
Executable file
16
contrib/debian/bin/bitcoin-qt
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
umask 077
|
||||
|
||||
basedir=~/.bitcoin
|
||||
dbfile="$basedir/DB_CONFIG"
|
||||
cfgfile="$basedir/bitcoin.conf"
|
||||
|
||||
[ -e "$basedir" ] || mkdir "$basedir"
|
||||
|
||||
# Bitcoin does not clean up DB log files by default
|
||||
[ -e "$dbfile" ] || echo 'set_flags DB_LOG_AUTOREMOVE' > "$dbfile"
|
||||
|
||||
exec /usr/lib/bitcoin/bitcoin-qt "$@"
|
||||
18
contrib/debian/bin/bitcoind
Executable file
18
contrib/debian/bin/bitcoind
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
umask 077
|
||||
|
||||
basedir=~/.bitcoin
|
||||
dbfile="$basedir/DB_CONFIG"
|
||||
cfgfile="$basedir/bitcoin.conf"
|
||||
|
||||
[ -e "$basedir" ] || mkdir "$basedir"
|
||||
|
||||
[ -e "$cfgfile" ] || perl -le 'print"rpcpassword=",map{(a..z,A..Z,0..9)[rand 62]}0..9' > "$cfgfile"
|
||||
|
||||
# Bitcoin does not clean up DB log files by default
|
||||
[ -e "$dbfile" ] || echo 'set_flags DB_LOG_AUTOREMOVE' > "$dbfile"
|
||||
|
||||
exec /usr/lib/bitcoin/bitcoind "$@"
|
||||
@@ -2,11 +2,10 @@
|
||||
Encoding=UTF-8
|
||||
Name=Bitcoin
|
||||
Comment=Bitcoin P2P Cryptocurrency
|
||||
Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
|
||||
Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
|
||||
Exec=bitcoin-qt %u
|
||||
Exec=/usr/bin/bitcoin-qt
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=bitcoin128
|
||||
MimeType=x-scheme-handler/bitcoin;
|
||||
Categories=Office;Finance;
|
||||
Icon=/usr/share/pixmaps/bitcoin80.xpm
|
||||
#For when bitcoin (finally) properly handles bitcoin: URLs
|
||||
#MimeType=x-scheme-handler/bitcoin;
|
||||
Categories=Office;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
bitcoin-qt usr/bin
|
||||
debian/bin/bitcoin-qt usr/bin
|
||||
bitcoin-qt usr/lib/bitcoin
|
||||
share/pixmaps/bitcoin32.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin16.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin128.png usr/share/pixmaps
|
||||
share/pixmaps/bitcoin80.xpm usr/share/pixmaps
|
||||
debian/bitcoin-qt.desktop usr/share/applications
|
||||
debian/bitcoin-qt.protocol usr/share/kde4/services/
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[Protocol]
|
||||
exec=bitcoin-qt '%u'
|
||||
protocol=bitcoin
|
||||
input=none
|
||||
output=none
|
||||
helper=true
|
||||
listing=
|
||||
reading=false
|
||||
writing=false
|
||||
makedir=false
|
||||
deleting=false
|
||||
@@ -1 +0,0 @@
|
||||
contrib/bitcoind.bash-completion bitcoind
|
||||
@@ -1 +1,2 @@
|
||||
src/bitcoind usr/bin
|
||||
debian/bin/bitcoind usr/bin
|
||||
src/bitcoind usr/lib/bitcoin
|
||||
|
||||
@@ -1,114 +1,3 @@
|
||||
bitcoin (0.8.6-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Make .desktop paths non-fixed (suggested by prusnak@github)
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Fri, 13 Dec 2013 13:31:00 -0400
|
||||
|
||||
bitcoin (0.8.5-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sun, 15 Sep 2013 14:02:00 -0400
|
||||
|
||||
bitcoin (0.8.4-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 4 Sep 2013 10:25:00 -0400
|
||||
|
||||
bitcoin (0.8.3-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 26 Jun 2013 00:18:00 +0100
|
||||
|
||||
bitcoin (0.8.2-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 29 Mar 2013 23:23:00 +0100
|
||||
|
||||
bitcoin (0.8.1-natty3) natty; urgency=low
|
||||
|
||||
* New pixmaps
|
||||
|
||||
-- Jonas Schnelli <jonas.schnelli@include7.ch> Mon, 13 May 2013 16:14:00 +0100
|
||||
|
||||
bitcoin (0.8.1-natty2) natty; urgency=low
|
||||
|
||||
* Remove dumb broken launcher script
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sun, 24 Mar 2013 20:01:00 -0400
|
||||
|
||||
bitcoin (0.8.1-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Tue, 19 Mar 2013 13:03:00 -0400
|
||||
|
||||
bitcoin (0.8.0-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sat, 23 Feb 2013 16:01:00 -0500
|
||||
|
||||
bitcoin (0.7.2-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sat, 15 Dec 2012 10:59:00 -0400
|
||||
|
||||
bitcoin (0.7.1-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 24 Oct 2012 15:06:00 -0400
|
||||
|
||||
bitcoin (0.7.0-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Mon, 17 Sep 2012 13:45:00 +0200
|
||||
|
||||
bitcoin (0.6.3-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Mon, 25 Jun 2012 23:47:00 +0200
|
||||
|
||||
bitcoin (0.6.2-natty1) natty; urgency=low
|
||||
|
||||
* Update package description and launch scripts.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sat, 2 Jun 2012 16:41:00 +0200
|
||||
|
||||
bitcoin (0.6.2-natty0) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Tue, 8 May 2012 16:27:00 -0500
|
||||
|
||||
bitcoin (0.6.1-natty0) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sun, 6 May 2012 20:09:00 -0500
|
||||
|
||||
bitcoin (0.6.0-natty0) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Add GNOME/KDE support for bitcoin-qt's bitcoin: URI support.
|
||||
Thanks to luke-jr for the KDE .protocol file.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sat, 31 Mar 2012 15:35:00 -0500
|
||||
|
||||
bitcoin (0.5.3-natty1) natty; urgency=low
|
||||
|
||||
* Mark for upload to PPA.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 14 Mar 2012 23:06:00 -0400
|
||||
|
||||
bitcoin (0.5.3-natty0) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
@@ -5,7 +5,6 @@ Maintainer: Jonas Smedegaard <dr@jones.dk>
|
||||
Uploaders: Micah Anderson <micah@debian.org>
|
||||
Build-Depends: debhelper,
|
||||
devscripts,
|
||||
bash-completion,
|
||||
libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
|
||||
libdb4.8++-dev,
|
||||
libssl-dev,
|
||||
@@ -16,8 +15,7 @@ Build-Depends: debhelper,
|
||||
libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev,
|
||||
libboost-test-dev (>> 1.35) | libboost-test1.35-dev,
|
||||
qt4-qmake,
|
||||
libqt4-dev,
|
||||
libqrencode-dev
|
||||
libqt4-dev
|
||||
Standards-Version: 3.9.2
|
||||
Homepage: http://www.bitcoin.org/
|
||||
Vcs-Git: git://github.com/bitcoin/bitcoin.git
|
||||
@@ -33,8 +31,10 @@ Description: peer-to-peer network based digital currency - daemon
|
||||
transact directly with each other, with the help of a P2P network to
|
||||
check for double-spending.
|
||||
.
|
||||
By default connects to an IRC network to discover other peers.
|
||||
.
|
||||
Full transaction history is stored locally at each client. This
|
||||
requires 2+ GB of space, slowly growing.
|
||||
requires 150+ MB of space, slowly growing.
|
||||
.
|
||||
This package provides bitcoind, a combined daemon and CLI tool to
|
||||
interact with the daemon.
|
||||
@@ -42,14 +42,16 @@ Description: peer-to-peer network based digital currency - daemon
|
||||
Package: bitcoin-qt
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: peer-to-peer network based digital currency - Qt GUI
|
||||
Description: peer-to-peer network based digital currency - QT GUI
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that
|
||||
is completely decentralized, without the need for a central server or
|
||||
trusted parties. Users hold the crypto keys to their own money and
|
||||
transact directly with each other, with the help of a P2P network to
|
||||
check for double-spending.
|
||||
.
|
||||
Full transaction history is stored locally at each client. This
|
||||
requires 2+ GB of space, slowly growing.
|
||||
By default connects to an IRC network to discover other peers.
|
||||
.
|
||||
This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
|
||||
Full transaction history is stored locally at each client. This
|
||||
requires 150+ MB of space, slowly growing.
|
||||
.
|
||||
This package provides bitcoin-qt, a GUI for Bitcoin based on QT.
|
||||
|
||||
@@ -6,9 +6,9 @@ Source: http://sourceforge.net/projects/bitcoin/files/
|
||||
https://github.com/bitcoin/bitcoin
|
||||
|
||||
Files: *
|
||||
Copyright: 2009-2012, Bitcoin Core Developers
|
||||
Copyright: 2009-2011, Bitcoin Developers
|
||||
License: Expat
|
||||
Comment: The Bitcoin Core Developers encompasses the current developers listed on bitcoin.org,
|
||||
Comment: The Bitcoin Developers encompasses the current developers listed on bitcoin.org,
|
||||
as well as the numerous contributors to the project.
|
||||
|
||||
Files: src/json/*
|
||||
@@ -37,7 +37,7 @@ Files: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
|
||||
src/qt/res/icons/history.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
|
||||
src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png
|
||||
src/qt/res/icons/synced.png
|
||||
Copyright: David Vignoni (david@icon-king.com)
|
||||
ICON KING - www.icon-king.com
|
||||
License: LGPL
|
||||
@@ -55,8 +55,9 @@ Comment: Icon Pack: Human-O2
|
||||
|
||||
Files: src/qt/res/icons/transaction*.png
|
||||
Copyright: md2k7
|
||||
License: Expat
|
||||
Comment: Site: https://bitcointalk.org/index.php?topic=15276.0
|
||||
License: You are free to do with these icons as you wish, including selling,
|
||||
copying, modifying etc.
|
||||
Comment: Site: https://forum.bitcoin.org/index.php?topic=15276.0
|
||||
|
||||
Files: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
|
||||
@@ -69,9 +70,9 @@ Comment: Icon Pack: Crystal SVG
|
||||
Files: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png
|
||||
Copyright: Bitboy (optimized for 16x16 by Wladimir van der Laan)
|
||||
License: PUB-DOM
|
||||
Comment: Site: https://bitcointalk.org/?topic=1756.0
|
||||
Comment: Site: http://forum.bitcoin.org/?topic=1756.0
|
||||
|
||||
Files: scripts/img/reload.xcf, src/qt/res/movies/*.png
|
||||
Files: scripts/img/reload.xcf, src/qt/res/movies/update_spinner.mng
|
||||
Copyright: Everaldo (Everaldo Coelho)
|
||||
License: GPL-3+
|
||||
Comment: Icon Pack: Kids
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
#connect=69.164.218.197
|
||||
#connect=10.0.0.1:8333
|
||||
|
||||
# Do not use Internet Relay Chat (irc.lfnet.org #bitcoin channel) to
|
||||
# find other peers.
|
||||
#noirc=1
|
||||
|
||||
# Maximum number of inbound+outbound connections.
|
||||
#maxconnections=
|
||||
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
.TH BITCOIN-QT "1" "April 2013" "bitcoin-qt 1"
|
||||
.SH NAME
|
||||
bitcoin-qt \- peer-to-peer network based digital currency
|
||||
.SH DESCRIPTION
|
||||
.SS "Usage:"
|
||||
.IP
|
||||
bitcoin\-qt [command\-line options]
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\-?
|
||||
This help message
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: bitcoin.conf)
|
||||
.TP
|
||||
\fB\-pid=\fR<file>
|
||||
Specify pid file (default: bitcoind.pid)
|
||||
.TP
|
||||
\fB\-gen\fR
|
||||
Generate coins
|
||||
.TP
|
||||
\fB\-gen\fR=\fI0\fR
|
||||
Don't generate coins
|
||||
.TP
|
||||
\fB\-datadir=\fR<dir>
|
||||
Specify data directory
|
||||
.TP
|
||||
\fB\-dbcache=\fR<n>
|
||||
Set database cache size in megabytes (default: 25)
|
||||
.TP
|
||||
\fB\-timeout=\fR<n>
|
||||
Specify connection timeout in milliseconds (default: 5000)
|
||||
.TP
|
||||
\fB\-proxy=\fR<ip:port>
|
||||
Connect through socks proxy
|
||||
.TP
|
||||
\fB\-socks=\fR<n>
|
||||
Select the version of socks proxy to use (4\-5, default: 5)
|
||||
.TP
|
||||
\fB\-tor=\fR<ip:port>
|
||||
Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
|
||||
.TP
|
||||
\fB\-dns\fR
|
||||
Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR
|
||||
.TP
|
||||
\fB\-port=\fR<port>
|
||||
Listen for connections on <port> (default: 8333 or testnet: 18333)
|
||||
.TP
|
||||
\fB\-maxconnections=\fR<n>
|
||||
Maintain at most <n> connections to peers (default: 125)
|
||||
.TP
|
||||
\fB\-addnode=\fR<ip>
|
||||
Add a node to connect to and attempt to keep the connection open
|
||||
.TP
|
||||
\fB\-connect=\fR<ip>
|
||||
Connect only to the specified node(s)
|
||||
.TP
|
||||
\fB\-seednode=\fR<ip>
|
||||
Connect to a node to retrieve peer addresses, and disconnect
|
||||
.TP
|
||||
\fB\-externalip=\fR<ip>
|
||||
Specify your own public address
|
||||
.TP
|
||||
\fB\-onlynet=\fR<net>
|
||||
Only connect to nodes in network <net> (IPv4, IPv6 or Tor)
|
||||
.TP
|
||||
\fB\-discover\fR
|
||||
Discover own IP address (default: 1 when listening and no \fB\-externalip\fR)
|
||||
.TP
|
||||
\fB\-checkpoints\fR
|
||||
Only accept block chain matching built\-in checkpoints (default: 1)
|
||||
.TP
|
||||
\fB\-listen\fR
|
||||
Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
|
||||
.TP
|
||||
\fB\-bind=\fR<addr>
|
||||
Bind to given address and always listen on it. Use [host]:port notation for IPv6
|
||||
.TP
|
||||
\fB\-dnsseed\fR
|
||||
Find peers using DNS lookup (default: 1 unless \fB\-connect\fR)
|
||||
.TP
|
||||
\fB\-banscore=\fR<n>
|
||||
Threshold for disconnecting misbehaving peers (default: 100)
|
||||
.TP
|
||||
\fB\-bantime=\fR<n>
|
||||
Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
|
||||
.TP
|
||||
\fB\-maxreceivebuffer=\fR<n>
|
||||
Maximum per\-connection receive buffer, <n>*1000 bytes (default: 5000)
|
||||
.TP
|
||||
\fB\-maxsendbuffer=\fR<n>
|
||||
Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
|
||||
.TP
|
||||
\fB\-upnp\fR
|
||||
Use UPnP to map the listening port (default: 1 when listening)
|
||||
.TP
|
||||
\fB\-paytxfee=\fR<amt>
|
||||
Fee per KB to add to transactions you send
|
||||
.TP
|
||||
\fB\-server\fR
|
||||
Accept command line and JSON\-RPC commands
|
||||
.TP
|
||||
\fB\-testnet\fR
|
||||
Use the test network
|
||||
.TP
|
||||
\fB\-debug\fR
|
||||
Output extra debugging information. Implies all other \fB\-debug\fR* options
|
||||
.TP
|
||||
\fB\-debugnet\fR
|
||||
Output extra network debugging information
|
||||
.TP
|
||||
\fB\-logtimestamps\fR
|
||||
Prepend debug output with timestamp
|
||||
.TP
|
||||
\fB\-shrinkdebugfile\fR
|
||||
Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
|
||||
.TP
|
||||
\fB\-printtoconsole\fR
|
||||
Send trace/debug info to console instead of debug.log file
|
||||
.TP
|
||||
\fB\-rpcuser=\fR<user>
|
||||
Username for JSON\-RPC connections
|
||||
.TP
|
||||
\fB\-rpcpassword=\fR<pw>
|
||||
Password for JSON\-RPC connections
|
||||
.TP
|
||||
\fB\-rpcport=\fR<port>
|
||||
Listen for JSON\-RPC connections on <port> (default: 8332 or testnet: 18332)
|
||||
.TP
|
||||
\fB\-rpcallowip=\fR<ip>
|
||||
Allow JSON\-RPC connections from specified IP address
|
||||
.TP
|
||||
\fB\-rpcthreads=\fR<n>
|
||||
Set the number of threads to service RPC calls (default: 4)
|
||||
.TP
|
||||
\fB\-blocknotify=\fR<cmd>
|
||||
Execute command when the best block changes (%s in cmd is replaced by block hash)
|
||||
.TP
|
||||
\fB\-walletnotify=\fR<cmd>
|
||||
Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
|
||||
.TP
|
||||
\fB\-alertnotify=\fR<cmd>
|
||||
Execute command when a relevant alert is received (%s in cmd is replaced by message)
|
||||
.TP
|
||||
\fB\-upgradewallet\fR
|
||||
Upgrade wallet to latest format
|
||||
.TP
|
||||
\fB\-keypool=\fR<n>
|
||||
Set key pool size to <n> (default: 100)
|
||||
.TP
|
||||
\fB\-rescan\fR
|
||||
Rescan the block chain for missing wallet transactions
|
||||
.TP
|
||||
\fB\-salvagewallet\fR
|
||||
Attempt to recover private keys from a corrupt wallet.dat
|
||||
.TP
|
||||
\fB\-checkblocks=\fR<n>
|
||||
How many blocks to check at startup (default: 288, 0 = all)
|
||||
.TP
|
||||
\fB\-checklevel=\fR<n>
|
||||
How thorough the block verification is (0\-4, default: 3)
|
||||
.TP
|
||||
\fB\-txindex\fR
|
||||
Maintain a full transaction index (default: 0)
|
||||
.TP
|
||||
\fB\-loadblock=\fR<file>
|
||||
Imports blocks from external blk000??.dat file
|
||||
.TP
|
||||
\fB\-reindex\fR
|
||||
Rebuild block chain index from current blk000??.dat files
|
||||
.TP
|
||||
\fB\-par=\fR<n>
|
||||
Set the number of script verification threads (1\-16, 0=auto, default: 0)
|
||||
.SS "Block creation options:"
|
||||
.TP
|
||||
\fB\-blockminsize=\fR<n>
|
||||
Set minimum block size in bytes (default: 0)
|
||||
.TP
|
||||
\fB\-blockmaxsize=\fR<n>
|
||||
Set maximum block size in bytes (default: 250000)
|
||||
.HP
|
||||
\fB\-blockprioritysize=\fR<n> Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
|
||||
.PP
|
||||
SSL options: (see the Bitcoin Wiki for SSL setup instructions)
|
||||
.TP
|
||||
\fB\-rpcssl\fR
|
||||
Use OpenSSL (https) for JSON\-RPC connections
|
||||
.TP
|
||||
\fB\-rpcsslcertificatechainfile=\fR<file.cert>
|
||||
Server certificate file (default: server.cert)
|
||||
.TP
|
||||
\fB\-rpcsslprivatekeyfile=\fR<file.pem>
|
||||
Server private key (default: server.pem)
|
||||
.TP
|
||||
\fB\-rpcsslciphers=\fR<ciphers>
|
||||
Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
|
||||
.SS "UI options:"
|
||||
.TP
|
||||
\fB\-lang=\fR<lang>
|
||||
Set language, for example "de_DE" (default: system locale)
|
||||
.TP
|
||||
\fB\-min\fR
|
||||
Start minimized
|
||||
.TP
|
||||
\fB\-splash\fR
|
||||
Show splash screen on startup (default: 1)
|
||||
@@ -2,11 +2,11 @@
|
||||
.SH NAME
|
||||
bitcoin.conf \- bitcoin configuration file
|
||||
.SH SYNOPSIS
|
||||
All command-line options (except for '\-datadir' and '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
|
||||
All command-line options (except for '-datadir' and '-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
|
||||
.TP
|
||||
The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
|
||||
.TP
|
||||
The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, bitcoind(1) will look for a file named bitcoin.conf(5) in the bitcoin data directory, but both the data directory and the configuration file path may be changed using the '\-datadir' and '\-conf' command-line arguments.
|
||||
The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, bitcoind(1) will look for a file named bitcoin.conf(5) in the bitcoin data directory, but both the data directory and the configuration file path may be changed using the '-datadir' and '-conf' command-line arguments.
|
||||
.SH LOCATION
|
||||
bitcoin.conf should be located in $HOME/.bitcoin
|
||||
.SH NETWORK-RELATED SETTINGS
|
||||
@@ -24,6 +24,9 @@ Use as many *addnode=* settings as you like to connect to specific peers.
|
||||
\fBconnect=\fR\fI'10.0.0.1:8333'\fR
|
||||
Use as many *connect=* settings as you like to connect ONLY to specific peers.
|
||||
.TP
|
||||
\fBnoirc=\fR[\fI'1'\fR|\fI'0'\fR]
|
||||
Use or Do not use Internet Relay Chat (irc.lfnet.org #bitcoin channel) to find other peers.
|
||||
.TP
|
||||
\fRmaxconnections=\fR\fI'value'\fR
|
||||
Maximum number of inbound+outbound connections.
|
||||
.SH JSON-RPC OPTIONS
|
||||
@@ -50,10 +53,9 @@ Listen for RPC connections on this TCP port.
|
||||
You can use *bitcoin* or *bitcoind(1)* to send commands to *bitcoin*/*bitcoind(1)* running on another host using this option.
|
||||
.TP
|
||||
\fBrpcssl=\fR\fI'1'\fR
|
||||
Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *bitcoin* '\-server' or *bitcoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
|
||||
Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *bitcoin* '-server' or *bitcoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
|
||||
.TP
|
||||
\fB\-rpcsslciphers=\fR<ciphers>
|
||||
Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
|
||||
\fBrpcsslciphers=\fR\fI'TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH'\fR
|
||||
.TP
|
||||
\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
|
||||
.TP
|
||||
|
||||
@@ -4,7 +4,7 @@ bitcoind \- peer-to-peer network based digital currency
|
||||
.SH SYNOPSIS
|
||||
bitcoin [options] <command> [params]
|
||||
.TP
|
||||
bitcoin [options] help <command> \- Get help for a command
|
||||
bitcoin [options] help <command> - Get help for a command
|
||||
.SH DESCRIPTION
|
||||
This manual page documents the bitcoind program. Bitcoin is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
|
||||
|
||||
@@ -75,7 +75,7 @@ Server certificate file (default: server.cert)
|
||||
Server private key (default: server.pem)
|
||||
.TP
|
||||
\fB\-rpcsslciphers=\fR<ciphers>
|
||||
Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
|
||||
Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
|
||||
.TP
|
||||
\-?
|
||||
This help message
|
||||
@@ -115,7 +115,7 @@ Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
|
||||
Returns boolean true if server is trying to generate bitcoins, false otherwise.
|
||||
.TP
|
||||
\fBsetgenerate 'generate' ['genproclimit']\fR
|
||||
Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
|
||||
Generation is limited to ['genproclimit'] processors, -1 is unlimited.
|
||||
.TP
|
||||
\fBgethashespersec\fR
|
||||
Returns a recent hashes per second performance measurement while generating.
|
||||
@@ -166,7 +166,7 @@ List accounts and their current balances.
|
||||
"confirmations" : number of confirmations of the most recent transaction included.
|
||||
.TP
|
||||
\fBlisttransactions 'account' ['count=10']\fR
|
||||
Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
|
||||
Returns a list of the last ['count'] transactions for 'account' - for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
|
||||
|
||||
"category" : will be generate, send, receive, or move.
|
||||
"amount" : amount of transaction.
|
||||
|
||||
26
contrib/debian/patches/1001_use_system_json-spirit.patch
Normal file
26
contrib/debian/patches/1001_use_system_json-spirit.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
Description: Use system JSON Spirit library
|
||||
Author: Jonas Smedegaard <dr@jones.dk>
|
||||
Last-Update: 2011-05-17
|
||||
--- a/src/rpc.cpp
|
||||
+++ b/src/rpc.cpp
|
||||
@@ -12,9 +12,7 @@
|
||||
#include <boost/asio/ssl.hpp>
|
||||
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> SSLStream;
|
||||
#endif
|
||||
-#include "json/json_spirit_reader_template.h"
|
||||
-#include "json/json_spirit_writer_template.h"
|
||||
-#include "json/json_spirit_utils.h"
|
||||
+#include <json_spirit.h>
|
||||
#define printf OutputDebugStringF
|
||||
// MinGW 3.4.5 gets "fatal error: had to relocate PCH" if the json headers are
|
||||
// precompiled in headers.h. The problem might be when the pch file goes over
|
||||
--- a/src/makefile.unix
|
||||
+++ b/src/makefile.unix
|
||||
@@ -23,6 +23,7 @@
|
||||
-l boost_thread \
|
||||
-l db_cxx \
|
||||
-l ssl \
|
||||
+ -l json_spirit \
|
||||
-l crypto
|
||||
|
||||
ifdef USE_UPNP
|
||||
@@ -1 +1 @@
|
||||
|
||||
#1001_use_system_json-spirit.patch
|
||||
|
||||
@@ -9,7 +9,7 @@ DEB_INSTALL_EXAMPLES_bitcoind += debian/examples/*
|
||||
DEB_INSTALL_MANPAGES_bitcoind += debian/manpages/*
|
||||
|
||||
%:
|
||||
dh --with bash-completion $@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
cd src; $(MAKE) -f makefile.unix bitcoind
|
||||
@@ -20,7 +20,7 @@ override_dh_auto_clean:
|
||||
cd src; $(MAKE) -f makefile.unix clean
|
||||
|
||||
override_dh_auto_configure:
|
||||
qmake bitcoin-qt.pro USE_QRCODE=1
|
||||
qmake bitcoin-qt.pro
|
||||
|
||||
override_dh_auto_test:
|
||||
cd src; $(MAKE) -f makefile.unix test_bitcoin
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
Contents
|
||||
===========
|
||||
This directory contains tools for developers working on this repository.
|
||||
|
||||
github-merge.sh
|
||||
----------------
|
||||
|
||||
A small script to automate merging pull-requests securely and sign them with GPG.
|
||||
|
||||
For example:
|
||||
|
||||
./github-merge.sh bitcoin/bitcoin 3077
|
||||
|
||||
(in any git repository) will help you merge pull request #3077 for the
|
||||
bitcoin/bitcoin repository.
|
||||
|
||||
What it does:
|
||||
* Fetch master and the pull request.
|
||||
* Locally construct a merge commit.
|
||||
* Show the diff that merge results in.
|
||||
* Ask you to verify the resulting source tree (so you can do a make
|
||||
check or whatever).
|
||||
* Ask you whether to GPG sign the merge commit.
|
||||
* Ask you whether to push the result upstream.
|
||||
|
||||
This means that there are no potential race conditions (where a
|
||||
pullreq gets updated while you're reviewing it, but before you click
|
||||
merge), and when using GPG signatures, that even a compromised github
|
||||
couldn't mess with the sources.
|
||||
|
||||
Setup
|
||||
---------
|
||||
Configuring the github-merge tool for the bitcoin repository is done in the following way:
|
||||
|
||||
git config githubmerge.repository bitcoin/bitcoin
|
||||
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
|
||||
git config --global user.signingkey mykeyid (if you want to GPG sign)
|
||||
|
||||
## fix-copyright-headers.py
|
||||
|
||||
Every year newly updated files need to have its copyright headers updated to reflect the current year.
|
||||
If you run this script from src/ it will automatically update the year on the copyright header for all
|
||||
.cpp and .h files if these have a git commit from the current year.
|
||||
|
||||
For example a file changed in 2014 (with 2014 being the current year):
|
||||
```// Copyright (c) 2009-2013 The Bitcoin developers```
|
||||
|
||||
would be changed to:
|
||||
```// Copyright (c) 2009-2014 The Bitcoin developers```
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
'''
|
||||
Run this script inside of src/ and it will look for all the files
|
||||
that were changed this year that still have the last year in the
|
||||
copyright headers, and it will fix the headers on that file using
|
||||
a perl regex one liner.
|
||||
|
||||
For example: if it finds something like this and we're in 2014
|
||||
|
||||
// Copyright (c) 2009-2013 The Bitcoin developers
|
||||
|
||||
it will change it to
|
||||
|
||||
// Copyright (c) 2009-2014 The Bitcoin developers
|
||||
|
||||
It will do this for all the files in the folder and its children.
|
||||
|
||||
Author: @gubatron
|
||||
'''
|
||||
import os
|
||||
import time
|
||||
|
||||
year = time.gmtime()[0]
|
||||
last_year = year - 1
|
||||
command = "perl -pi -e 's/%s The Bitcoin/%s The Bitcoin/' %s"
|
||||
listFilesCommand = "find . | grep %s"
|
||||
|
||||
extensions = [".cpp",".h"]
|
||||
|
||||
def getLastGitModifiedDate(filePath):
|
||||
gitGetLastCommitDateCommand = "git log " + filePath +" | grep Date | head -n 1"
|
||||
p = os.popen(gitGetLastCommitDateCommand)
|
||||
result = ""
|
||||
for l in p:
|
||||
result = l
|
||||
break
|
||||
result = result.replace("\n","")
|
||||
return result
|
||||
|
||||
n=1
|
||||
for extension in extensions:
|
||||
foundFiles = os.popen(listFilesCommand % extension)
|
||||
for filePath in foundFiles:
|
||||
filePath = filePath[1:-1]
|
||||
if filePath.endswith(extension):
|
||||
filePath = os.getcwd() + filePath
|
||||
modifiedTime = getLastGitModifiedDate(filePath)
|
||||
if len(modifiedTime) > 0 and str(year) in modifiedTime:
|
||||
print n,"Last Git Modified: ", modifiedTime, " - ", filePath
|
||||
os.popen(command % (last_year,year,filePath))
|
||||
n = n + 1
|
||||
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will locally construct a merge commit for a pull request on a
|
||||
# github repository, inspect it, sign it and optionally push it.
|
||||
|
||||
# The following temporary branches are created/overwritten and deleted:
|
||||
# * pull/$PULL/base (the current master we're merging onto)
|
||||
# * pull/$PULL/head (the current state of the remote pull request)
|
||||
# * pull/$PULL/merge (github's merge)
|
||||
# * pull/$PULL/local-merge (our merge)
|
||||
|
||||
# In case of a clean merge that is accepted by the user, the local branch with
|
||||
# name $BRANCH is overwritten with the merged result, and optionally pushed.
|
||||
|
||||
REPO="$(git config --get githubmerge.repository)"
|
||||
if [[ "d$REPO" == "d" ]]; then
|
||||
echo "ERROR: No repository configured. Use this command to set:" >&2
|
||||
echo "git config githubmerge.repository <owner>/<repo>" >&2
|
||||
echo "In addition, you can set the following variables:" >&2
|
||||
echo "- githubmerge.host (default git@github.com)" >&2
|
||||
echo "- githubmerge.branch (default master)" >&2
|
||||
echo "- githubmerge.testcmd (default none)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST="$(git config --get githubmerge.host)"
|
||||
if [[ "d$HOST" == "d" ]]; then
|
||||
HOST="git@github.com"
|
||||
fi
|
||||
|
||||
BRANCH="$(git config --get githubmerge.branch)"
|
||||
if [[ "d$BRANCH" == "d" ]]; then
|
||||
BRANCH="master"
|
||||
fi
|
||||
|
||||
TESTCMD="$(git config --get githubmerge.testcmd)"
|
||||
|
||||
PULL="$1"
|
||||
|
||||
if [[ "d$PULL" == "d" ]]; then
|
||||
echo "Usage: $0 pullnumber [branch]" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ "d$2" != "d" ]]; then
|
||||
BRANCH="$2"
|
||||
fi
|
||||
|
||||
# Initialize source branches.
|
||||
git checkout -q "$BRANCH"
|
||||
if git fetch -q "$HOST":"$REPO" "+refs/pull/$PULL/*:refs/heads/pull/$PULL/*"; then
|
||||
if ! git log -1q "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then
|
||||
echo "ERROR: Cannot find head of pull request #$PULL on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
if ! git log -1q "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then
|
||||
echo "ERROR: Cannot find merge of pull request #$PULL on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Cannot find pull request #$PULL on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
if git fetch -q "$HOST":"$REPO" +refs/heads/"$BRANCH":refs/heads/pull/"$PULL"/base; then
|
||||
true
|
||||
else
|
||||
echo "ERROR: Cannot find branch $BRANCH on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
git checkout -q pull/"$PULL"/base
|
||||
git branch -q -D pull/"$PULL"/local-merge 2>/dev/null
|
||||
git checkout -q -b pull/"$PULL"/local-merge
|
||||
TMPDIR="$(mktemp -d -t ghmXXXXX)"
|
||||
|
||||
function cleanup() {
|
||||
git checkout -q "$BRANCH"
|
||||
git branch -q -D pull/"$PULL"/head 2>/dev/null
|
||||
git branch -q -D pull/"$PULL"/base 2>/dev/null
|
||||
git branch -q -D pull/"$PULL"/merge 2>/dev/null
|
||||
git branch -q -D pull/"$PULL"/local-merge 2>/dev/null
|
||||
rm -rf "$TMPDIR"
|
||||
}
|
||||
|
||||
# Create unsigned merge commit.
|
||||
(
|
||||
echo "Merge pull request #$PULL"
|
||||
echo ""
|
||||
git log --no-merges --topo-order --pretty='format:%h %s (%an)' pull/"$PULL"/base..pull/"$PULL"/head
|
||||
)>"$TMPDIR/message"
|
||||
if git merge -q --commit --no-edit --no-ff -m "$(<"$TMPDIR/message")" pull/"$PULL"/head; then
|
||||
if [ "d$(git log --pretty='format:%s' -n 1)" != "dMerge pull request #$PULL" ]; then
|
||||
echo "ERROR: Creating merge failed (already merged?)." >&2
|
||||
cleanup
|
||||
exit 4
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Cannot be merged cleanly." >&2
|
||||
git merge --abort
|
||||
cleanup
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# Run test command if configured.
|
||||
if [[ "d$TESTCMD" != "d" ]]; then
|
||||
# Go up to the repository's root.
|
||||
while [ ! -d .git ]; do cd ..; done
|
||||
if ! $TESTCMD; then
|
||||
echo "ERROR: Running $TESTCMD failed." >&2
|
||||
cleanup
|
||||
exit 5
|
||||
fi
|
||||
# Show the created merge.
|
||||
git diff pull/"$PULL"/merge..pull/"$PULL"/local-merge >"$TMPDIR"/diff
|
||||
git diff pull/"$PULL"/base..pull/"$PULL"/local-merge
|
||||
if [[ "$(<"$TMPDIR"/diff)" != "" ]]; then
|
||||
echo "WARNING: merge differs from github!" >&2
|
||||
read -p "Type 'ignore' to continue. " -r >&2
|
||||
if [[ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]]; then
|
||||
echo "Difference with github ignored." >&2
|
||||
else
|
||||
cleanup
|
||||
exit 6
|
||||
fi
|
||||
fi
|
||||
read -p "Press 'd' to accept the diff. " -n 1 -r >&2
|
||||
echo
|
||||
if [[ "d$REPLY" =~ ^d[dD]$ ]]; then
|
||||
echo "Diff accepted." >&2
|
||||
else
|
||||
echo "ERROR: Diff rejected." >&2
|
||||
cleanup
|
||||
exit 6
|
||||
fi
|
||||
else
|
||||
# Verify the result.
|
||||
echo "Dropping you on a shell so you can try building/testing the merged source." >&2
|
||||
echo "Run 'git diff HEAD~' to show the changes being merged." >&2
|
||||
echo "Type 'exit' when done." >&2
|
||||
bash -i
|
||||
read -p "Press 'm' to accept the merge. " -n 1 -r >&2
|
||||
echo
|
||||
if [[ "d$REPLY" =~ ^d[Mm]$ ]]; then
|
||||
echo "Merge accepted." >&2
|
||||
else
|
||||
echo "ERROR: Merge rejected." >&2
|
||||
cleanup
|
||||
exit 7
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sign the merge commit.
|
||||
read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
|
||||
echo
|
||||
if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then
|
||||
if [[ "$(git config --get user.signingkey)" == "" ]]; then
|
||||
echo "WARNING: No GPG signing key set, not signing. Set one using:" >&2
|
||||
echo "git config --global user.signingkey <key>" >&2
|
||||
git commit -q --signoff --amend --no-edit
|
||||
else
|
||||
git commit -q --gpg-sign --amend --no-edit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clean up temporary branches, and put the result in $BRANCH.
|
||||
git checkout -q "$BRANCH"
|
||||
git reset -q --hard pull/"$PULL"/local-merge
|
||||
cleanup
|
||||
|
||||
# Push the result.
|
||||
read -p "Type 'push' to push the result to $HOST:$REPO, branch $BRANCH. " -r >&2
|
||||
if [[ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]]; then
|
||||
git push "$HOST":"$REPO" refs/heads/"$BRANCH"
|
||||
fi
|
||||
31
contrib/gitian-descriptors/README
Normal file
31
contrib/gitian-descriptors/README
Normal file
@@ -0,0 +1,31 @@
|
||||
Gavin's notes on getting gitian builds up and running:
|
||||
|
||||
You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization.
|
||||
|
||||
You probably need to enable hardware virtualization in your machine's BIOS.
|
||||
|
||||
You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites:
|
||||
sudo apt-get install apache2 git apt-cacher-ng python-vm-builder qemu-kvm
|
||||
|
||||
Sanity checks:
|
||||
sudo service apt-cacher-ng status # Should return apt-cacher-ng is running
|
||||
ls -l /dev/kvm # Should show a /dev/kvm device
|
||||
|
||||
Once you've got the right hardware and software:
|
||||
|
||||
git clone git://github.com/bitcoin/bitcoin.git
|
||||
git clone git://github.com/devrandom/gitian-builder.git
|
||||
mkdir gitian-builder/inputs
|
||||
wget 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz' -O gitian-builder/inputs/miniupnpc-1.6.tar.gz
|
||||
|
||||
cd gitian-builder
|
||||
bin/make-base-vm --arch i386
|
||||
bin/make-base-vm --arch amd64
|
||||
cd ..
|
||||
|
||||
# To build
|
||||
cd bitcoin
|
||||
git pull
|
||||
cd ../gitian-builder
|
||||
git pull
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian.yml
|
||||
@@ -1,80 +0,0 @@
|
||||
### Gavin's notes on getting gitian builds up and running using KVM:###
|
||||
|
||||
These instructions distilled from:
|
||||
[ https://help.ubuntu.com/community/KVM/Installation]( https://help.ubuntu.com/community/KVM/Installation)
|
||||
... see there for complete details.
|
||||
|
||||
You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization.
|
||||
|
||||
You probably need to enable hardware virtualization in your machine's BIOS.
|
||||
|
||||
You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites:
|
||||
|
||||
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm
|
||||
|
||||
Sanity checks:
|
||||
|
||||
sudo service apt-cacher-ng status # Should return apt-cacher-ng is running
|
||||
ls -l /dev/kvm # Should show a /dev/kvm device
|
||||
|
||||
|
||||
Once you've got the right hardware and software:
|
||||
|
||||
git clone git://github.com/bitcoin/bitcoin.git
|
||||
git clone git://github.com/devrandom/gitian-builder.git
|
||||
mkdir gitian-builder/inputs
|
||||
cd gitian-builder/inputs
|
||||
|
||||
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
|
||||
...
|
||||
cd ../..
|
||||
|
||||
cd gitian-builder
|
||||
bin/make-base-vm --arch i386
|
||||
bin/make-base-vm --arch amd64
|
||||
cd ..
|
||||
|
||||
# Build Linux release:
|
||||
cd bitcoin
|
||||
git pull
|
||||
cd ../gitian-builder
|
||||
git pull
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
|
||||
# Build Win32 dependencies: (only needs to be done once, or when dependency versions change)
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/boost-win32.yml
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/deps-win32.yml
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/qt-win32.yml
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/protobuf-win32.yml
|
||||
|
||||
# Build Win32 release:
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml
|
||||
|
||||
---------------------
|
||||
|
||||
`gitian-builder` now also supports building using LXC. See
|
||||
[ https://help.ubuntu.com/12.04/serverguide/lxc.html]( https://help.ubuntu.com/12.04/serverguide/lxc.html)
|
||||
... for how to get LXC up and running under Ubuntu.
|
||||
|
||||
If your main machine is a 64-bit Mac or PC with a few gigabytes of memory
|
||||
and at least 10 gigabytes of free disk space, you can `gitian-build` using
|
||||
LXC running inside a virtual machine.
|
||||
|
||||
Here's a description of Gavin's setup on OSX 10.6:
|
||||
|
||||
1. Download and install VirtualBox from [https://www.virtualbox.org/](https://www.virtualbox.org/)
|
||||
|
||||
2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from
|
||||
[http://www.ubuntu.com/](http://www.ubuntu.com/)
|
||||
|
||||
3. Run VirtualBox and create a new virtual machine, using the Ubuntu .iso (see the [VirtualBox documentation](https://www.virtualbox.org/wiki/Documentation) for details). Create it with at least 2 gigabytes of memory and a disk that is at least 20 gigabytes big.
|
||||
|
||||
4. Inside the running Ubuntu desktop, install:
|
||||
|
||||
sudo apt-get install debootstrap lxc ruby apache2 git apt-cacher-ng python-vm-builder
|
||||
|
||||
5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above:
|
||||
|
||||
export USE_LXC=1
|
||||
git clone git://github.com/bitcoin/bitcoin.git
|
||||
... etc
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
name: "boost"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "g++"
|
||||
- "unzip"
|
||||
- "pkg-config"
|
||||
- "libtool"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
- "zip"
|
||||
- "libz-dev"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "boost_1_55_0.tar.bz2"
|
||||
script: |
|
||||
STAGING="$HOME/install"
|
||||
TEMPDIR="$HOME/tmp"
|
||||
export LIBRARY_PATH="$STAGING/lib"
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
# Input Integrity Check
|
||||
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
|
||||
|
||||
mkdir -p "$STAGING"
|
||||
tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
|
||||
cd boost_1_55_0
|
||||
GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
|
||||
# note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
|
||||
echo "using gcc : $GCCVERSION : g++
|
||||
:
|
||||
<cxxflags>\"-frandom-seed=boost1 -fPIC\"
|
||||
;" > user-config.jam
|
||||
|
||||
./bootstrap.sh --without-icu
|
||||
|
||||
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS -d+2 install
|
||||
|
||||
# post-process all generated libraries to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $STAGING -name \*.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd "$STAGING"
|
||||
find | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
|
||||
@@ -1,86 +0,0 @@
|
||||
---
|
||||
name: "boost"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "faketime"
|
||||
- "zip"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "boost_1_55_0.tar.bz2"
|
||||
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
|
||||
script: |
|
||||
# Defines
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
INDIR=$HOME/build
|
||||
TEMPDIR=$HOME/tmp
|
||||
# Input Integrity Check
|
||||
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
|
||||
echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c
|
||||
|
||||
for BITS in 32 64; do # for architectures
|
||||
#
|
||||
INSTALLPREFIX=$HOME/staging${BITS}
|
||||
BUILDDIR=$HOME/build${BITS}
|
||||
if [ "$BITS" == "32" ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
fi
|
||||
#
|
||||
mkdir -p $INSTALLPREFIX $BUILDDIR
|
||||
cd $BUILDDIR
|
||||
#
|
||||
tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2
|
||||
cd boost_1_55_0
|
||||
GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
|
||||
echo "using gcc : $GCCVERSION : $HOST-g++
|
||||
:
|
||||
<rc>$HOST-windres
|
||||
<archiver>$HOST-ar
|
||||
<cxxflags>-frandom-seed=boost1
|
||||
<ranlib>$HOST-ranlib
|
||||
;" > user-config.jam
|
||||
./bootstrap.sh --without-icu
|
||||
|
||||
# Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work
|
||||
# This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost.
|
||||
# Please obtain the exact patch that matches the above sha256sum from one of the following mirrors.
|
||||
#
|
||||
# Read History: https://svn.boost.org/trac/boost/ticket/7262
|
||||
# History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html
|
||||
#
|
||||
# Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
|
||||
# Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
# Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
# Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
patch -p0 < $INDIR/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
|
||||
# Bug Workaround: boost-1.54.0 broke the ability to disable zlib, still broken in 1.55
|
||||
# https://svn.boost.org/trac/boost/ticket/9156
|
||||
sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2
|
||||
sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2
|
||||
|
||||
# http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html
|
||||
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
|
||||
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
|
||||
# post-process all generated libraries to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $INSTALLPREFIX -name \*.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd "$INSTALLPREFIX"
|
||||
find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip
|
||||
done # for BITS in
|
||||
|
||||
38
contrib/gitian-descriptors/boost-win32.yml
Normal file
38
contrib/gitian-descriptors/boost-win32.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: "boost"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
packages:
|
||||
- "mingw32"
|
||||
- "faketime"
|
||||
- "zip"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "boost_1_47_0.tar.bz2"
|
||||
script: |
|
||||
TMPDIR="$HOME/tmpdir"
|
||||
mkdir -p $TMPDIR/bin/$GBUILD_BITS $TMPDIR/include
|
||||
tar xjf boost_1_47_0.tar.bz2
|
||||
cd boost_1_47_0
|
||||
echo "using gcc : 4.4 : i586-mingw32msvc-g++
|
||||
:
|
||||
<rc>i586-mingw32msvc-windres
|
||||
<archiver>i586-mingw32msvc-ar
|
||||
<cxxflags>-frandom-seed=boost1
|
||||
;" > user-config.jam
|
||||
./bootstrap.sh --without-icu
|
||||
./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage
|
||||
for lib in chrono date_time exception filesystem graph iostreams math_c99f math_c99l math_c99 math_tr1f math_tr1l math_tr1 prg_exec_monitor program_options random regex serialization signals system test_exec_monitor thread_win32 unit_test_framework wave wserialization; do
|
||||
mkdir $lib
|
||||
(cd $lib ; ar xf ../stage/lib/libboost_${lib}-mt-s.a)
|
||||
mv $lib $TMPDIR/bin/$GBUILD_BITS
|
||||
done
|
||||
cp -a boost $TMPDIR/include
|
||||
cd $TMPDIR
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
zip -r boost-win32-1.47.0-gitian.zip *
|
||||
cp boost-win32-1.47.0-gitian.zip $OUTDIR
|
||||
@@ -1,98 +0,0 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "g++"
|
||||
- "unzip"
|
||||
- "zip"
|
||||
- "pkg-config"
|
||||
- "libtool"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
reference_datetime: "2013-06-01 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "openssl-1.0.1e.tar.gz"
|
||||
- "miniupnpc-1.8.tar.gz"
|
||||
- "qrencode-3.4.3.tar.bz2"
|
||||
- "protobuf-2.5.0.tar.bz2"
|
||||
- "db-4.8.30.NC.tar.gz"
|
||||
script: |
|
||||
STAGING="$HOME/install"
|
||||
TEMPDIR="$HOME/tmp"
|
||||
OPTFLAGS='-O2'
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
export LIBRARY_PATH="$STAGING/lib"
|
||||
# Integrity Check
|
||||
echo "f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3 openssl-1.0.1e.tar.gz" | sha256sum -c
|
||||
echo "bc5f73c7b0056252c1888a80e6075787a1e1e9112b808f863a245483ff79859c miniupnpc-1.8.tar.gz" | sha256sum -c
|
||||
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
|
||||
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
|
||||
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
|
||||
|
||||
#
|
||||
tar xzf openssl-1.0.1e.tar.gz
|
||||
cd openssl-1.0.1e
|
||||
# need -fPIC to avoid relocation error in 64 bit builds
|
||||
./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
|
||||
# need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
|
||||
make
|
||||
make install_sw
|
||||
cd ..
|
||||
#
|
||||
tar xzfm miniupnpc-1.8.tar.gz
|
||||
cd miniupnpc-1.8
|
||||
# miniupnpc is always built with -fPIC
|
||||
INSTALLPREFIX=$STAGING make $MAKEOPTS install
|
||||
rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build
|
||||
cd ..
|
||||
#
|
||||
tar xjf qrencode-3.4.3.tar.bz2
|
||||
cd qrencode-3.4.3
|
||||
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
|
||||
# need --with-pic to avoid relocation error in 64 bit builds
|
||||
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
|
||||
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
||||
find . -print0 | xargs -r0 touch -t 200001010000
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
tar xjf protobuf-2.5.0.tar.bz2
|
||||
cd protobuf-2.5.0
|
||||
mkdir -p $STAGING/host/bin
|
||||
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
|
||||
# need --with-pic to avoid relocation error in 64 bit builds
|
||||
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
|
||||
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
||||
find . -print0 | xargs -r0 touch -t 200001010000
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
tar xzf db-4.8.30.NC.tar.gz
|
||||
cd db-4.8.30.NC/build_unix
|
||||
# need --with-pic to avoid relocation error in 64 bit builds
|
||||
../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic
|
||||
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
||||
find . -print0 | xargs -r0 touch -t 200001010000
|
||||
make $MAKEOPTS library_build
|
||||
make install_lib install_include
|
||||
cd ../..
|
||||
# post-process all generated libraries to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $STAGING -name \*.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd $STAGING
|
||||
find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r3.zip
|
||||
@@ -1,128 +0,0 @@
|
||||
---
|
||||
name: "bitcoin-deps"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "git-core"
|
||||
- "zip"
|
||||
- "faketime"
|
||||
- "psmisc"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "openssl-1.0.1e.tar.gz"
|
||||
- "db-4.8.30.NC.tar.gz"
|
||||
- "miniupnpc-1.8.tar.gz"
|
||||
- "zlib-1.2.8.tar.gz"
|
||||
- "libpng-1.6.8.tar.gz"
|
||||
- "qrencode-3.4.3.tar.bz2"
|
||||
script: |
|
||||
#
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
INDIR=$HOME/build
|
||||
TEMPDIR=$HOME/tmp
|
||||
# Input Integrity Check
|
||||
echo "f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3 openssl-1.0.1e.tar.gz" | sha256sum -c
|
||||
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
|
||||
echo "bc5f73c7b0056252c1888a80e6075787a1e1e9112b808f863a245483ff79859c miniupnpc-1.8.tar.gz" | sha256sum -c
|
||||
echo "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d zlib-1.2.8.tar.gz" | sha256sum -c
|
||||
echo "32c7acf1608b9c8b71b743b9780adb7a7b347563dbfb4a5263761056da44cc96 libpng-1.6.8.tar.gz" | sha256sum -c
|
||||
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
|
||||
|
||||
for BITS in 32 64; do # for architectures
|
||||
#
|
||||
INSTALLPREFIX=$HOME/staging${BITS}
|
||||
BUILDDIR=$HOME/build${BITS}
|
||||
if [ "$BITS" == "32" ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
fi
|
||||
#
|
||||
mkdir -p $INSTALLPREFIX $BUILDDIR
|
||||
cd $BUILDDIR
|
||||
#
|
||||
tar xzf $INDIR/openssl-1.0.1e.tar.gz
|
||||
cd openssl-1.0.1e
|
||||
if [ "$BITS" == "32" ]; then
|
||||
OPENSSL_TGT=mingw
|
||||
else
|
||||
OPENSSL_TGT=mingw64
|
||||
fi
|
||||
./Configure --cross-compile-prefix=$HOST- ${OPENSSL_TGT} no-shared no-dso --openssldir=$INSTALLPREFIX
|
||||
make
|
||||
make install_sw
|
||||
cd ..
|
||||
#
|
||||
tar xzf $INDIR/db-4.8.30.NC.tar.gz
|
||||
cd db-4.8.30.NC/build_unix
|
||||
../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST --disable-shared
|
||||
make $MAKEOPTS library_build
|
||||
make install_lib install_include
|
||||
cd ../..
|
||||
#
|
||||
tar xzf $INDIR/miniupnpc-1.8.tar.gz
|
||||
cd miniupnpc-1.8
|
||||
echo "
|
||||
--- miniupnpc-1.8/Makefile.mingw.orig 2013-09-29 18:52:51.014087958 -1000
|
||||
+++ miniupnpc-1.8/Makefile.mingw 2013-09-29 19:09:29.663318691 -1000
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
wingenminiupnpcstrings.o: wingenminiupnpcstrings.c
|
||||
|
||||
-miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
|
||||
- wingenminiupnpcstrings \$< \$@
|
||||
+miniupnpcstrings.h: miniupnpcstrings.h.in
|
||||
+ sed -e 's|OS/version|MSWindows/5.1.2600|' -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"VERSIONHERE\"|' \$< > \$@
|
||||
|
||||
minixml.o: minixml.c minixml.h miniupnpcstrings.h
|
||||
|
||||
" | sed "s/VERSIONHERE/$(cat VERSION)/" | patch -p1
|
||||
mkdir -p dll
|
||||
make -f Makefile.mingw CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a
|
||||
install -d $INSTALLPREFIX/include/miniupnpc
|
||||
install *.h $INSTALLPREFIX/include/miniupnpc
|
||||
install libminiupnpc.a $INSTALLPREFIX/lib
|
||||
cd ..
|
||||
#
|
||||
tar xzf $INDIR/zlib-1.2.8.tar.gz
|
||||
cd zlib-1.2.8
|
||||
CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
#
|
||||
tar xzf $INDIR/libpng-1.6.8.tar.gz
|
||||
cd libpng-1.6.8
|
||||
OPT="-O2"
|
||||
CPPFLAGS="${OPT} -I$INSTALLPREFIX/include" CFLAGS="${OPT} -I$INSTALLPREFIX/include" LDFLAGS="${OPT} -L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST
|
||||
make $MAKEOPTS
|
||||
make install
|
||||
cd ..
|
||||
#
|
||||
tar xjf $INDIR/qrencode-3.4.3.tar.bz2
|
||||
cd qrencode-3.4.3
|
||||
png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-dependency-tracking
|
||||
# Workaround to prevent re-configuring by make (resulting in missing m4 error); make all files have a date in the past
|
||||
find . -print0 | xargs -r0 touch -t 200001010000
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
# post-process all generated libraries to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $INSTALLPREFIX -name \*.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd $INSTALLPREFIX
|
||||
find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r10.zip
|
||||
done # for BITS in
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "g++"
|
||||
- "libqt4-dev"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "pkg-config"
|
||||
- "autoconf2.13"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
reference_datetime: "2013-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "bitcoin-deps-linux32-gitian-r3.zip"
|
||||
- "bitcoin-deps-linux64-gitian-r3.zip"
|
||||
- "boost-linux32-1.55.0-gitian-r1.zip"
|
||||
- "boost-linux64-1.55.0-gitian-r1.zip"
|
||||
script: |
|
||||
STAGING="$HOME/install"
|
||||
OPTFLAGS='-O2'
|
||||
BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
|
||||
TEMPDIR="$HOME/tempdir"
|
||||
export TZ=UTC
|
||||
export LIBRARY_PATH="$STAGING/lib"
|
||||
mkdir -p ${BINDIR}
|
||||
#
|
||||
mkdir -p $STAGING
|
||||
cd $STAGING
|
||||
unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r3.zip
|
||||
unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
|
||||
cd ../build
|
||||
#
|
||||
cd bitcoin
|
||||
./autogen.sh
|
||||
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
|
||||
make dist
|
||||
DISTNAME=`echo bitcoin-*.tar.gz`
|
||||
mkdir -p distsrc
|
||||
cd distsrc
|
||||
tar --strip-components=1 -xf ../$DISTNAME
|
||||
./configure --enable-upnp-default --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
|
||||
make $MAKEOPTS
|
||||
make $MAKEOPTS install-strip
|
||||
|
||||
# sort distribution tar file and normalize user/group/mtime information for deterministic output
|
||||
mkdir -p $OUTDIR/src
|
||||
rm -rf $TEMPDIR
|
||||
mkdir -p $TEMPDIR
|
||||
cd $TEMPDIR
|
||||
tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "nsis"
|
||||
- "faketime"
|
||||
- "autoconf2.13"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "pkg-config"
|
||||
- "bsdmainutils"
|
||||
|
||||
reference_datetime: "2013-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "qt-win32-5.2.0-gitian-r2.zip"
|
||||
- "qt-win64-5.2.0-gitian-r2.zip"
|
||||
- "boost-win32-1.55.0-gitian-r6.zip"
|
||||
- "boost-win64-1.55.0-gitian-r6.zip"
|
||||
- "bitcoin-deps-win32-gitian-r10.zip"
|
||||
- "bitcoin-deps-win64-gitian-r10.zip"
|
||||
- "protobuf-win32-2.5.0-gitian-r4.zip"
|
||||
- "protobuf-win64-2.5.0-gitian-r4.zip"
|
||||
script: |
|
||||
# Defines
|
||||
export TZ=UTC
|
||||
INDIR=$HOME/build
|
||||
OPTFLAGS='-O2'
|
||||
TEMPDIR="$HOME/tempdir"
|
||||
NEEDDIST=1
|
||||
# Qt: workaround for determinism in resource ordering
|
||||
# Qt5's rcc uses a QHash to store the files for the resource.
|
||||
# A security fix in QHash makes the ordering of keys to be different on every run
|
||||
# (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
|
||||
# This is good in general but qrc shouldn't be doing a traversal over a randomized container.
|
||||
# The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
|
||||
# For now luckily there is a test mode that forces a fixed seed.
|
||||
export QT_RCC_TEST=1
|
||||
for BITS in 32 64; do # for architectures
|
||||
#
|
||||
STAGING=$HOME/staging${BITS}
|
||||
BUILDDIR=$HOME/build${BITS}
|
||||
BINDIR=$OUTDIR/$BITS
|
||||
if [ "$BITS" == "32" ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
fi
|
||||
export PATH=$STAGING/host/bin:$PATH
|
||||
mkdir -p $STAGING $BUILDDIR $BINDIR
|
||||
#
|
||||
cd $STAGING
|
||||
unzip $INDIR/qt-win${BITS}-5.2.0-gitian-r2.zip
|
||||
unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip
|
||||
unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r10.zip
|
||||
unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip
|
||||
if [ "$NEEDDIST" == "1" ]; then
|
||||
# Make source code archive which is architecture independent so it only needs to be done once
|
||||
cd $HOME/build/bitcoin
|
||||
./autogen.sh
|
||||
./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
|
||||
make dist
|
||||
DISTNAME=`echo bitcoin-*.tar.gz`
|
||||
NEEDDIST=0
|
||||
fi
|
||||
# Build platform-dependent executables from source archive
|
||||
cd $BUILDDIR
|
||||
mkdir -p distsrc
|
||||
cd distsrc
|
||||
tar --strip-components=1 -xf $HOME/build/bitcoin/$DISTNAME
|
||||
./configure --enable-upnp-default --bindir=$BINDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
make $MAKEOPTS
|
||||
make deploy
|
||||
make install-strip
|
||||
cp -f bitcoin-*setup*.exe $BINDIR/
|
||||
unset LD_PRELOAD
|
||||
unset FAKETIME
|
||||
done # for BITS in
|
||||
|
||||
# sort distribution tar file and normalize user/group/mtime information for deterministic output
|
||||
mkdir -p $OUTDIR/src
|
||||
rm -rf $TEMPDIR
|
||||
mkdir -p $TEMPDIR
|
||||
cd $TEMPDIR
|
||||
tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
|
||||
|
||||
88
contrib/gitian-descriptors/gitian-win32.yml
Normal file
88
contrib/gitian-descriptors/gitian-win32.yml
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
packages:
|
||||
- "mingw32"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "nsis"
|
||||
- "faketime"
|
||||
- "wine"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://git.gitorious.org/+bitcoin-stable-developers/bitcoin/bitcoind-stable.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "qt-win32-4.7.4-gitian.zip"
|
||||
- "boost-win32-1.47.0-gitian.zip"
|
||||
- "openssl-1.0.0e.tar.gz"
|
||||
- "db-4.8.30.NC.tar.gz"
|
||||
- "miniupnpc-1.6.tar.gz"
|
||||
script: |
|
||||
#
|
||||
mkdir $HOME/qt
|
||||
cd $HOME/qt
|
||||
unzip ../build/qt-win32-4.7.4-gitian.zip
|
||||
cd $HOME/build/
|
||||
export PATH=$PATH:$HOME/qt/bin/
|
||||
#
|
||||
mkdir boost_1_47_0
|
||||
cd boost_1_47_0
|
||||
mkdir -p stage/lib
|
||||
unzip ../boost-win32-1.47.0-gitian.zip
|
||||
cd bin/$GBUILD_BITS
|
||||
for lib in *; do
|
||||
i586-mingw32msvc-ar rc ../../stage/lib/libboost_${lib}-mt-s.a $lib/*.o
|
||||
i586-mingw32msvc-ranlib ../../stage/lib/libboost_${lib}-mt-s.a
|
||||
done
|
||||
cd ../..
|
||||
mv include/boost .
|
||||
cd ..
|
||||
#
|
||||
tar xzf openssl-1.0.0e.tar.gz
|
||||
cd openssl-1.0.0e
|
||||
./Configure --cross-compile-prefix=i586-mingw32msvc- mingw
|
||||
make
|
||||
cd ..
|
||||
#
|
||||
tar xzf db-4.8.30.NC.tar.gz
|
||||
cd db-4.8.30.NC/build_unix
|
||||
../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
|
||||
make $MAKEOPTS
|
||||
cd ../..
|
||||
#
|
||||
tar xzf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw
|
||||
sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw
|
||||
make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar
|
||||
cd ..
|
||||
mv miniupnpc-1.6 miniupnpc
|
||||
#
|
||||
cd bitcoin
|
||||
mkdir -p $OUTDIR/src
|
||||
cp -a . $OUTDIR/src
|
||||
rm -rf $OUTDIR/src/.git
|
||||
cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
|
||||
cp $OUTDIR/src/COPYING $OUTDIR/license.txt
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
$HOME/qt/src/bin/qmake -spec unsupported/win32-g++-cross USE_SSL=1 MINIUPNPC_LIB_PATH=$HOME/build/miniupnpc MINIUPNPC_INCLUDE_PATH=$HOME/build/ BDB_LIB_PATH=$HOME/build/db-4.8.30.NC/build_unix BDB_INCLUDE_PATH=$HOME/build/db-4.8.30.NC/build_unix BOOST_LIB_PATH=$HOME/build/boost_1_47_0/stage/lib BOOST_INCLUDE_PATH=$HOME/build/boost_1_47_0 BOOST_LIB_SUFFIX=-mt-s BOOST_THREAD_LIB_SUFFIX=_win32-mt-s OPENSSL_LIB_PATH=$HOME/build/openssl-1.0.0e OPENSSL_INCLUDE_PATH=$HOME/build/openssl-1.0.0e/include INCLUDEPATH=$HOME/build DEFINES=BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 QMAKE_LRELEASE=lrelease QMAKE_CXXFLAGS=-frandom-seed=bitcoin QMAKE_LFLAGS=-frandom-seed=bitcoin
|
||||
make $MAKEOPTS
|
||||
cp release/bitcoin-qt.exe $OUTDIR/
|
||||
#
|
||||
cd src
|
||||
sed 's/$(DEBUGFLAGS)/-frandom-seed=bitcoin/' -i makefile.linux-mingw
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_SSL=1 USE_UPNP=0
|
||||
i586-mingw32msvc-strip bitcoind.exe
|
||||
makensis ../share/setup.nsi
|
||||
cp ../share/bitcoin-*-win32-setup.exe $OUTDIR/
|
||||
mkdir $OUTDIR/daemon
|
||||
cp bitcoind.exe $OUTDIR/daemon
|
||||
48
contrib/gitian-descriptors/gitian.yml
Normal file
48
contrib/gitian-descriptors/gitian.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: "bitcoin"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libdb4.8++-dev"
|
||||
- "qt4-qmake"
|
||||
- "libqt4-dev"
|
||||
- "libboost-system-dev"
|
||||
- "libboost-filesystem-dev"
|
||||
- "libboost-program-options-dev"
|
||||
- "libboost-thread-dev"
|
||||
- "libssl-dev"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://git.gitorious.org/+bitcoin-stable-developers/bitcoin/bitcoind-stable.git"
|
||||
"dir": "bitcoin"
|
||||
files:
|
||||
- "miniupnpc-1.6.tar.gz"
|
||||
script: |
|
||||
INSTDIR="$HOME/install"
|
||||
export LIBRARY_PATH="$INSTDIR/lib"
|
||||
#
|
||||
tar xzf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
cd bitcoin
|
||||
mkdir -p $OUTDIR/src
|
||||
cp -a . $OUTDIR/src
|
||||
rm -rf $OUTDIR/src/.git
|
||||
cp $OUTDIR/src/doc/README $OUTDIR
|
||||
cp $OUTDIR/src/COPYING $OUTDIR
|
||||
cd src
|
||||
sed 's/$(DEBUGFLAGS)//' -i makefile.unix
|
||||
make -f makefile.unix STATIC=1 OPENSSL_INCLUDE_PATH="$INSTDIR/include" OPENSSL_LIB_PATH="$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0 USE_SSL=1
|
||||
mkdir -p $OUTDIR/bin/$GBUILD_BITS
|
||||
install -s bitcoind $OUTDIR/bin/$GBUILD_BITS
|
||||
cd ..
|
||||
qmake INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" RELEASE=1 USE_SSL=1
|
||||
make $MAKEOPTS
|
||||
install bitcoin-qt $OUTDIR/bin/$GBUILD_BITS
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
name: "protobuf-win32"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "zip"
|
||||
- "faketime"
|
||||
reference_datetime: "2013-04-15 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "protobuf-2.5.0.tar.bz2"
|
||||
script: |
|
||||
#
|
||||
export TZ=UTC
|
||||
INDIR=$HOME/build
|
||||
TEMPDIR=$HOME/tmp
|
||||
OPTFLAGS="-O2"
|
||||
# Integrity Check
|
||||
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
|
||||
|
||||
for BITS in 32 64; do # for architectures
|
||||
#
|
||||
INSTALLPREFIX=$HOME/staging${BITS}
|
||||
BUILDDIR=$HOME/build${BITS}
|
||||
if [ "$BITS" == "32" ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
fi
|
||||
#
|
||||
mkdir -p $INSTALLPREFIX $BUILDDIR
|
||||
cd $BUILDDIR
|
||||
#
|
||||
tar xjf $INDIR/protobuf-2.5.0.tar.bz2
|
||||
cd protobuf-2.5.0
|
||||
# First: build a native (linux) protoc
|
||||
./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
|
||||
make
|
||||
mkdir -p $INSTALLPREFIX/host/bin
|
||||
cp src/protoc $INSTALLPREFIX/host/bin
|
||||
# Now recompile with the mingw cross-compiler:
|
||||
make distclean
|
||||
./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
make
|
||||
make install
|
||||
# post-process all generated libraries to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $INSTALLPREFIX -name \*.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd $INSTALLPREFIX
|
||||
find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip
|
||||
unset LD_PRELOAD
|
||||
unset FAKETIME
|
||||
done # for BITS in
|
||||
@@ -1,92 +0,0 @@
|
||||
---
|
||||
name: "qt"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "zip"
|
||||
- "unzip"
|
||||
- "faketime"
|
||||
- "libz-dev"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "qt-everywhere-opensource-src-5.2.0.tar.gz"
|
||||
- "bitcoin-deps-win32-gitian-r10.zip"
|
||||
- "bitcoin-deps-win64-gitian-r10.zip"
|
||||
script: |
|
||||
# Defines
|
||||
export TZ=UTC
|
||||
INDIR=$HOME/build
|
||||
TEMPDIR=$HOME/tmp
|
||||
# Qt: workaround for determinism in resource ordering
|
||||
# Qt5's rcc uses a QHash to store the files for the resource.
|
||||
# A security fix in QHash makes the ordering of keys to be different on every run
|
||||
# (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
|
||||
# This is good in general but qrc shouldn't be doing a traversal over a randomized container.
|
||||
# The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
|
||||
# For now luckily there is a test mode that forces a fixed seed.
|
||||
export QT_RCC_TEST=1
|
||||
# Integrity Check
|
||||
echo "395ec72277c5786c65b8163ef5817fd03d0a1f524a6d47f53624baf8056f1081 qt-everywhere-opensource-src-5.2.0.tar.gz" | sha256sum -c
|
||||
|
||||
for BITS in 32 64; do # for architectures
|
||||
#
|
||||
INSTALLPREFIX=$HOME/staging${BITS}
|
||||
BUILDDIR=$HOME/build${BITS}
|
||||
DEPSDIR=$HOME/deps${BITS}
|
||||
if [ "$BITS" == "32" ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
fi
|
||||
#
|
||||
mkdir -p $INSTALLPREFIX $INSTALLPREFIX/host/bin $DEPSDIR $BUILDDIR
|
||||
#
|
||||
# Need mingw-compiled openssl from bitcoin-deps:
|
||||
cd $DEPSDIR
|
||||
unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r10.zip
|
||||
#
|
||||
cd $BUILDDIR
|
||||
#
|
||||
tar xzf $INDIR/qt-everywhere-opensource-src-5.2.0.tar.gz
|
||||
cd qt-everywhere-opensource-src-5.2.0
|
||||
SPECNAME="win32-g++"
|
||||
SPECFILE="qtbase/mkspecs/${SPECNAME}/qmake.conf"
|
||||
sed 's/qt_instdate=`date +%Y-%m-%d`/qt_instdate=2011-01-30/' -i qtbase/configure
|
||||
sed --posix "s|QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport|QMAKE_CFLAGS\t\t= -pipe -fno-keep-inline-dllexport -isystem /usr/$HOST/include/ -frandom-seed=qtbuild -I$DEPSDIR/include|" -i ${SPECFILE}
|
||||
sed --posix "s|QMAKE_LFLAGS =|QMAKE_LFLAGS\t\t= -L$DEPSDIR/lib|" -i ${SPECFILE}
|
||||
# Before we tried to pass arguments to ar (static linking) in using QMAKE_LIB, however
|
||||
# qt removes the arguments for ar and provides a script which makes it impossible to pass the determinism flag -
|
||||
# so rather than try to replace ar, post-process all libraries and plugins at the end.
|
||||
#
|
||||
# Don't load faketime while compiling Qt, qmake will get stuck in nearly infinite loops
|
||||
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
#export FAKETIME=$REFERENCE_DATETIME
|
||||
#
|
||||
# Compile static libraries, and use statically linked openssl (-openssl-linked):
|
||||
OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTALLPREFIX -bindir $INSTALLPREFIX/host/bin -confirm-license -release -opensource -static -xplatform $SPECNAME -device-option CROSS_COMPILE="$HOST-" -no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-odbc -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-opengl -no-compile-examples -no-feature-style-windowsce -no-feature-style-windowsmobile -no-qml-debug -openssl-linked -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc -system-libpng -system-zlib
|
||||
make $MAKEOPTS install
|
||||
# post-process all generated libraries and plugins to be deterministic
|
||||
# extract them to a temporary directory then re-build them deterministically
|
||||
for LIB in $(find $INSTALLPREFIX -name *.a); do
|
||||
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
||||
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
|
||||
rm $LIB
|
||||
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
|
||||
done
|
||||
#
|
||||
cd $INSTALLPREFIX
|
||||
# Remove unused non-deterministic stuff
|
||||
rm host/bin/qtpaths.exe lib/libQt5Bootstrap.a lib/libQt5Bootstrap.la
|
||||
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
find -print0 | xargs -r0 touch # fix up timestamps before packaging
|
||||
find | sort | zip -X@ $OUTDIR/qt-win${BITS}-5.2.0-gitian-r2.zip
|
||||
unset LD_PRELOAD
|
||||
unset FAKETIME
|
||||
done # for BITS in
|
||||
54
contrib/gitian-descriptors/qt-win32.yml
Normal file
54
contrib/gitian-descriptors/qt-win32.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: "qt"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
packages:
|
||||
- "mingw32"
|
||||
- "zip"
|
||||
- "faketime"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "qt-everywhere-opensource-src-4.7.4.tar.gz"
|
||||
script: |
|
||||
INSTDIR="$HOME/qt/"
|
||||
mkdir $INSTDIR
|
||||
SRCDIR="$INSTDIR/src/"
|
||||
mkdir $SRCDIR
|
||||
#
|
||||
tar xzf qt-everywhere-opensource-src-4.7.4.tar.gz
|
||||
cd qt-everywhere-opensource-src-4.7.4
|
||||
sed 's/$TODAY/2011-01-30/' -i configure
|
||||
sed 's/i686-pc-mingw32-/i586-mingw32msvc-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/i586-mingw32msvc/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix 's/QMAKE_MOC\t\t= i586-mingw32msvc-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix 's/QMAKE_RCC\t\t= i586-mingw32msvc-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix 's/QMAKE_UIC\t\t= i586-mingw32msvc-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
# ar adds timestamps to every object file included in the static library
|
||||
# providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script...
|
||||
# which somehow cannot be combined with other flags.
|
||||
# use faketime only for ar, as it confuses make/qmake into hanging sometimes
|
||||
sed --posix "s|QMAKE_LIB\t\t= i586-mingw32msvc-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
echo '#!/bin/bash' > $HOME/ar
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
|
||||
echo 'i586-mingw32msvc-ar "$@"' >> $HOME/ar
|
||||
chmod +x $HOME/ar
|
||||
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
./configure -prefix $INSTDIR -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -opengl no -nomake examples -nomake demos -nomake docs
|
||||
find . -name *.prl | xargs -l sed 's|/\.||' -i
|
||||
find . -name *.prl | xargs -l sed 's|/$||' -i
|
||||
make $MAKEOPTS install
|
||||
cp -a bin $SRCDIR/
|
||||
cd $INSTDIR
|
||||
find . -name *.prl | xargs -l sed 's|/$||' -i
|
||||
#sed 's|QMAKE_PRL_LIBS.*|QMAKE_PRL_LIBS = -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtNetwork -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32|' -i imports/Qt/labs/particles/qmlparticlesplugin.prl
|
||||
|
||||
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
zip -r $OUTDIR/qt-win32-4.7.4-gitian.zip *
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.0
|
||||
|
||||
mQENBE5UtMEBCADOUz2i9l/D8xYINCmfUDnxi+DXvX5LmZ39ZdvsoE+ugO0SRRGdIHEFO2is
|
||||
0xezX50wXu9aneb+tEqM0BuiLo6VxaXpxrkxHpr6c4jf37SkE/H0qsi/txEUp7337y3+4HMG
|
||||
lUjiuh802I72p1qusjsKBnmnnR0rwNouTcoDmGUDh7jpKCtzFv+2TR2dRthJn7vmmjq3+bG6
|
||||
PYfqoFY1yHrAGT1lrDBULZsQ/NBLI2+J4oo2LYv3GCq8GNnzrovqvTvui50VSROhLrOe58o2
|
||||
shE+sjQShAy5wYkPt1R1fQnpfx+5vf+TPnkxVwRb3h5GhCp0YL8XC/BXsd5vM4KlVH2rABEB
|
||||
AAG0K1dsYWRpbWlyIEouIHZhbiBkZXIgTGFhbiA8bGFhbndqQGdtYWlsLmNvbT6JATgEEwEC
|
||||
ACIFAk5UtMECGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEHSBCwEjRsmmy6YIAK09
|
||||
buNXyYQrJBsX16sXxEhx5QPKyF3uHJDFJv66SdnpvIkNoznsaPiRJkbTANop93FZmaGa6wVn
|
||||
zGDiz7jPA8Dpxx5aAYPhIT+zPJAdXWM3wJ/Gio9besRNzniai8Lwi5MZ9R/5yFGBobm6/AcN
|
||||
4sUoqA3NSV2U3I29R0Vwlzo8GVtmyi9ENSi6Oo7AcXNTRt69cxW4nAHkB+amwwDJlcAb31ex
|
||||
bogYXPhScwqQZixRr+JBkKxBjkTXXnQypT4KI5SegYwQVYfyiZmDP7UHKe/u6pSKKbVphLg8
|
||||
xLB5spcXse8/a2+onrbNlw6y8TXiJ++Z54PE7zztWTXf2huakeG5AQ0ETlS0wQEIAMNO3OkP
|
||||
xoPRKWzBLcI7JRITAW+HNaLTq3uN2+4WxA57DEjbL9EDoAv+7wTkDAL40f0T+xiu6GJcLFjw
|
||||
GJZu/tYu7+mErHjrdo+K4suCQt7w5EXCBvOLjhW4tyYMzNx8hP+oqzOW9iEC+6VV91+DYeqt
|
||||
EkJuyVXOI4vzBlTw8uGow8aMMsCq8XVvKUZFTPsjGl197Q5B3A+ZOFCR8xqiqdPjuz6MglVV
|
||||
oFdDNu3EZn8zkGsQlovXoE9ndVeVzx/XMNmsxFaMYsReUs253RIf1FEfgExID0fg2OnyLCjS
|
||||
2iFW1RgajS+/saIkKl+N1iuMzJA7wMAM0plhRueOG0MtZSsAEQEAAYkBHwQYAQIACQUCTlS0
|
||||
wQIbDAAKCRB0gQsBI0bJpmsDB/4waenn2CvSHXyomykfpwf5lMte1V5LvH3z5R2LY+1NopRv
|
||||
LSz3iC39x69XWiTbhywDfgafnGPW4pWBOff2/bu5/A6z1Hnan1vyrRRD/hx1uMJ7S6q+bIvZ
|
||||
iVIg1p0jH6tdIIhwX3cydhdRZHo7e9oSMgOUWsr6Ar59NRo9CENwGPE4U61HXfOnxWdrFWoA
|
||||
XdwZczBeLxmUy6Vo6sKqv+gE4bqrtAM0sY/MsQ9cU95x+52ox/sq44lQMwd3ZBYUP7B1qbHI
|
||||
hZSZuch6MLi5scLPeau0ZvCaljiaMeivP5+x0gWPRs0kI+9sZxInbqvrsJ6oOBJM3xYGhtn1
|
||||
zZ7qmZR7
|
||||
=si/k
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -15,13 +15,9 @@ signers:
|
||||
weight: 40
|
||||
name: Devrandom
|
||||
key: devrandom
|
||||
E463A93F5F3117EEDE6C7316BD02942421F4889F:
|
||||
weight: 40
|
||||
name: Luke-Jr
|
||||
key: luke-jr
|
||||
D762373D24904A3E42F33B08B9A408E71DAAC974:
|
||||
weight: 40
|
||||
name: "Pieter Wuille"
|
||||
name: Sipa
|
||||
key: sipa
|
||||
77E72E69DA7EE0A148C06B21B34821D4944DE5F7:
|
||||
weight: 40
|
||||
@@ -31,16 +27,4 @@ signers:
|
||||
weight: 40
|
||||
name: "Gavin Andresen"
|
||||
key: gavinandresen
|
||||
71A3B16735405025D447E8F274810B012346C9A6:
|
||||
weight: 40
|
||||
name: "Wladimir J. van der Laan"
|
||||
key: laanwj
|
||||
AEC1884398647C47413C1C3FB1179EB7347DC10D:
|
||||
weight: 40
|
||||
name: "Warren Togami"
|
||||
key: wtogami
|
||||
9692B91BBF0E8D34DFD33B1882C5C009628ECF0C:
|
||||
weight: 1
|
||||
name: michagogo
|
||||
key: michagogo
|
||||
minimum_weight: 120
|
||||
|
||||
Binary file not shown.
@@ -1,59 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
mQENBFGeqJ4BCADb7SI3/+q93gIvN0AGRg9Mtz73OLIOzCHeeoyn+tp7JcYNzxkQ
|
||||
9lfeXiEfn72Sh8gHkLtLIqr7HlIMo8DxSS8JPRVjlJGkNyAW4SeEwN2wNa5OV8k0
|
||||
N4jBa9a1csFyCyrEkPKvkUpBkQDvNXjNxyEhHwyZqPanKxy6NXIHOJji8ObOMQXI
|
||||
T9HwJrpjRth3u4uKG968JBTEyAXAmkt0Zidl1Ykgzcedk4mJSE9uZCW8DjSv2wML
|
||||
XcQz8+dYsoskT3KRdkowLHxAfj1BNyNc1+rKLghliM5vSQWi+Lbhi1Bxh4sY1UwA
|
||||
lKnAGqrnAGyIvCtkwTq5QI6ufF2ZY44bvVgpABEBAAG0IU1pY2hhZ29nbyA8bWlj
|
||||
aGFnb2dvQHNlcnZlci5mYWtlPokBOAQTAQIAIgUCUZ6ongIbAwYLCQgHAwIGFQgC
|
||||
CQoLBBYCAwECHgECF4AACgkQgsXACWKOzwzMUAgAuqUmK10xE5C3lUym2f72z0t6
|
||||
a2NM5Wfjr9//Y1/okC36C5XAMEtN2UwckPzzJ5p5D5y5yzwfZq5Jd8Py29VQIMsV
|
||||
7FbC1a0H3D+bCyX+JJ6FAmUbnWOQ/+mydYc74RvD8iwjePNT6kziZNv6dMGctJTl
|
||||
0alwjtQYgyGkeYKnIxbcyjHX/IawLUrunb/6mSKun87T8+NM/omfFCTc3l8TakpM
|
||||
0wyNYRiUkIfUBvB8sDUU3A80qKN/hqRKvlFu3+/kMiAc9ZYQrbmsB+sYWdmM+4zw
|
||||
8NBw3yuYzWyPuoa4PR5ZmS9F11WLMR5vTRCdLudAqYsWu3LtV6vAIvlOUa2LMLRg
|
||||
TWljaGFnb2dvIChSZWdpc3RlcmVkIG5pY2sgbWljaGFnb2dvIG9uIGZyZWVub2Rl
|
||||
IGFzIG9mIE9jdG9iZXIgMTIsIDIwMTMpIDxtaWNoYWdvZ29Ac2VydmVyLmZha2U+
|
||||
iQE4BBMBAgAiBQJSWarzAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCC
|
||||
xcAJYo7PDA7nB/91wAiaMlU5nHLUu0anhNQbGvUdFgKK1zO90S5KzUdJcY438jcS
|
||||
UJW1az8l9U9JBRIfPRYVhz/Z1TAJ+dCzD7D8BXHFeGEr0zNOh87ly9aB5du7dpN2
|
||||
oSBD6wLcJpqxt4h+XjSS2CX98/2ZIJxXENE2KySaTXP39Xl3eNwvJTUBA4XlcMey
|
||||
J8KMp/IERli4H0O7vRyLgu3yYpUArTqAonzG1g2lfB35PQJfeInrRSniQ336otnZ
|
||||
A8qwJ63kfUtWVDRz0g1fnvtiLGPivDJaI5hyIaUeJPaXU1+sg7YNroDu60o2NGZh
|
||||
F+0IjHlvRfzzA+F9Vw38rpSqR3BmCdjf6Sv3iQEcBBABAgAGBQJSWa9/AAoJEH+r
|
||||
EUJn5PoE/hgH/1T2dAthVucA/hzY0nl4SMjbg+dzNlYBq00Qwx8DRKVjk5et8+kY
|
||||
oPI3DGILcr+ELnxNekeMv9WQBBtJanUh1K5ohZ6ohoR7lG18LXf5HCdspflB5Me6
|
||||
LMA6iMryEP6gIs9GFuoGe2YQavm58YrkqhcPu34dGN7kdurfEXLvDfVlh5ZbKCsP
|
||||
Gyd7Pbz04SpqykgK1udiTsLVjc70Xhv+jAMqeaCugDX6TLEwjVmZH/xsyKk2Uh3V
|
||||
Oib5FXADAtKH+vSqqhFpXrw7R/NaBzvCbas8l61DFHiUg1/bo8vsV8MtGcyZmzXJ
|
||||
C5Gm0njtGOil/g7JF9siUrpxs9Yyt/h+T2W0W01pY2hhZ29nbyAoVXNlciBhY2Nv
|
||||
dW50IG1pY2hhZ29nbyBvbiBHaXRodWIgYXMgb2YgT2N0b2JlciAxMiwgMjAxMykg
|
||||
PG1pY2hhZ29nb0BzZXJ2ZXIuZmFrZT6JATcEEwECACIFAlJZqxkCGwMGCwkIBwMC
|
||||
BhUIAgkKCwQWAgMBAh4BAheAAAoJEILFwAlijs8M+1AH+IU78ARblqTnJeSl0iWH
|
||||
mEsg4IBK30Q6/exDAcqOEm1Yc171uw2WnGmIvPYOQqxrRTvj3LoQ816dU6jrj6vY
|
||||
s+XX0R2hxy7ILh17D/3UKnHcddu7rmc7pNEqZeBXaMughqQaPOWkAIe52+qK5tsl
|
||||
sWllzTYE4jo29uZ3dAtDcKEJjBo/pIXnu1GOslE1+V4X1H9WDlwrS/JXHzyDQAjt
|
||||
maPR+3gNesDanhrRmrnT3ZXW2ZVd3vGBibhia8PWUhU1uwOH23ySWXncgsHH0Zad
|
||||
UMjd4w3YliZP/mLn2ghAxHB70IO7lgAgN3HYZeFoufP3pcK440A+CezfQiRcjHl/
|
||||
oIkBHAQQAQIABgUCUlmvfwAKCRB/qxFCZ+T6BOq9CACItsrUZPKGeWSTkMHknMrV
|
||||
K5vxIXJVCBb+Tppc0Q/J5p4EkW/RFhTwIP2zw8NLDKMh5oO9md4LXhvfIZkqQJFo
|
||||
6ZtLa3Vf+Kj7uyxezBo4QHA+G7tDsRGaMKVrEMiyLCwS1+hg9VaNzsf7zmQW7mYE
|
||||
vTLMHp3cVaSU7Mh2Dl8rnAaM/DpTUZQwZ+32Qrb/Z4HSa4f278iqoFpjEbBE2KCr
|
||||
vT5yEVvpCZ4lwSgA2a+uTlRTvVV6NA/kpsxU64tmhuEOjy+ToDqJ8wv4mqvWZxMv
|
||||
C6OhfVaXBy3U9gG8aQV0ffXGs+TbCtv8ApHd6E1/AVk0oyZGJaBVrEl688bBIWd/
|
||||
uQENBFGeqJ4BCADFmgR7oEGkFFB5qXnuNYFq1nUGDAh0dLNtAD3J6EMxUZEXdmp+
|
||||
DQHJw6/eDRQaG9EbjNZheycbVUoI8K2Y/Z268HQueGuIEIJv6cZYXoXdWCbDD4fn
|
||||
HMNUX2wNlpDqWxb7PNUEtfU9hI3gmHGlr5OiEh3iV06uiZg4n2rbWPbj45m5LJzv
|
||||
wpCrUA+pLcl9Xjw2cajaSTjdXHk9gvXTCo6s2ZS3/3Q4l+xuzZp1MGNzPQHASMKs
|
||||
wecSJKkYg6W8I5WsVlPd9a8oQCc/Nfz7BPw31MRVR/SF5FAMqaXx5uLwghVdHB2i
|
||||
cLURsOtJlCfP8W06gB7yS+MH45Jq/oxBRiJBABEBAAGJAR8EGAECAAkFAlGeqJ4C
|
||||
GwwACgkQgsXACWKOzwwT4wgAy6ICcnBZ9l2jSu+ldy57F6jf5kpKZgB9NV8V2mMA
|
||||
NeY1wMQ4VTVpU4t3s4E2LYtGNJNkPQVHbt1Pf4dGPasvMPaHMamgwgyqgYixqs0x
|
||||
D5PdKzVrfnjwTTr/ZAFdccSPmvy5/hbY0geQ/+mzdbL07+xaT58JIoG5nySDKhmC
|
||||
VeOvhDZtXMVAhEWBDPEgh/H9sEuBgMgZrzfE1j3q802qiXeQs6WtadWlQ1RN9Iq1
|
||||
ZzIi6u9/BifEIRI0pO/WwKOZdXLTemFUoakoe7uT3A74N96t0G9LZVihYbEoO+Pc
|
||||
5IaHPBV5VLeR3TB1LnnjHVf/Fwi8cnGy50kNWjcbMyEDag==
|
||||
=jyQ4
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
Binary file not shown.
@@ -15,13 +15,9 @@ signers:
|
||||
weight: 40
|
||||
name: Devrandom
|
||||
key: devrandom
|
||||
E463A93F5F3117EEDE6C7316BD02942421F4889F:
|
||||
weight: 40
|
||||
name: Luke-Jr
|
||||
key: luke-jr
|
||||
D762373D24904A3E42F33B08B9A408E71DAAC974:
|
||||
weight: 40
|
||||
name: "Pieter Wuille"
|
||||
name: Sipa
|
||||
key: sipa
|
||||
77E72E69DA7EE0A148C06B21B34821D4944DE5F7:
|
||||
weight: 40
|
||||
@@ -31,16 +27,4 @@ signers:
|
||||
weight: 40
|
||||
name: "Gavin Andresen"
|
||||
key: gavinandresen
|
||||
71A3B16735405025D447E8F274810B012346C9A6:
|
||||
weight: 40
|
||||
name: "Wladimir J. van der Laan"
|
||||
key: laanwj
|
||||
AEC1884398647C47413C1C3FB1179EB7347DC10D:
|
||||
weight: 40
|
||||
name: "Warren Togami"
|
||||
key: wtogami
|
||||
9692B91BBF0E8D34DFD33B1882C5C009628ECF0C:
|
||||
weight: 1
|
||||
name: michagogo
|
||||
key: michagogo
|
||||
minimum_weight: 120
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.13 (GNU/Linux)
|
||||
|
||||
mQQNBFHOzpUBIADYwJ1vC5npnYCthOtiSna/siS6tdol0OXc82QRgK4Q2YeFCkpN
|
||||
Fw/T5YK34BLVGWDHPoafG2+r1nXIuMZnJIiGw6QVOL2sP9f7PrMmzck5KJPHD14Y
|
||||
GRd9BPkhmt3dXzOCjhig7jI6hKEYayfJNUNs9nlZEvl4QWIBMmk+IyqQz3f1HMfl
|
||||
/GkFDShBYF8Ny7Ktlx7AaXymajm4DCrTkbj5V2ZDqJgyQM549EoPSwXBQYrEjye3
|
||||
g2viC8rUFRFWFjdnx7jFEb1uhx71YGuqiLxKihUW9pbSNK2cLweFazHSVmh+B/pz
|
||||
fxHfUn+ijLSIAnprTmc/rq89un/iiPt0O/mspcCZ6hE5pFIyX+SC+9PrGz+bFSmw
|
||||
PkMOZzG489G8k4t/uZsit6helkl0emg6JiXLTmS/oTuT7B9Z9/MeEhOXFcxUb0fr
|
||||
2aZkEmH5d1oxSBis3D5nylmNJXOUSCpJAZ8E5Sr/5FbF9IPR+NSzosVacqCx5Dxj
|
||||
vJ7HpZKn6pJfmwrghVXQv04NRTcxbHNmwd98cofBtWX8yBO8M2M+jZrU+BVDUbb/
|
||||
A1oAyIbUUswBP768Oh11bELhCly774VwBqTojm2yodLGSyysx4zoa6qL7myfor0m
|
||||
a+K29y8WH9XGmKGMdUOg+q9z+ODky9aToGvEo2eVhKIlJsk0aFAGy/8awy6qRIIj
|
||||
UqLMq6XoFcYlE7SmnFUDDDPlBK/NkFFqySpFhKNRyt69Ea9kYXOxDnf/EnBwHn8m
|
||||
PiFQpeZqgnmhyj8Nk1SSQBgUi07NyXdQ/WIYpWmqqqfHRVQgSE9C1920T1zg/E97
|
||||
n5yYjI/gQQwq9wikkJmog6Ny7MSiwIU4LYV0pTUdI4//EJMId2FH8YEUfvG5ds+F
|
||||
H/o/D4CAJ86KjspizfH8jEjhn0Rm/OtrxLz1rwA1gtF//P3TYNWw5qruL4stP3Rx
|
||||
9Gve8Bm7oCBU73UT2ZJomEsWE3oqXinLRl3YCsjGDg/d3ySD6i0/BBROLIeXkh3M
|
||||
M1CNCqREDGLA0vxQi1o7Zi7ZA4gWPSzvi/8KtSzY1iAQODxWUmOICRP7KQODWJmt
|
||||
roTqhKgZ39wlR6eqkO8ZfAvRYsjvkL+EZFbbKbHxVJLhKchd2qHS+/Q3ov4SFzWY
|
||||
/cE0ChOPDM587Jkps2bynKQAzQ6810FXmJc0ztrPeD3PEbuyY4KNJV8HGViRDJXi
|
||||
wvs8eqfvTDGDPl4aLYVCKO9VqZ2OJvqhRhh71LQ2xRrX1LGnYLnUGCMuEQYKvMcI
|
||||
TSssM/VAfeWAPJDklD0lVNJ7d9Z5ugvJHFc01SaaB47Aod2SPWp5DeiY4A8dcy2w
|
||||
7f4Wx6FcdP1RXqaRZKCapBooN04vsvGllCshABEBAAG0KFdhcnJlbiBUb2dhbWkg
|
||||
KDIwMTMpIDx3dG9nYW1pQGdtYWlsLmNvbT6JBDgEEwECACIFAlHOzpUCGwMGCwkI
|
||||
BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJELEXnrc0fcENY4Ef/23L9iC/39ekJ8Is
|
||||
1IZdCoDD7/DgVaZqydDcy/ha9uaDFY4MQ0h9RZYo1axVBth/Yxzh1XnvitW8HFKn
|
||||
DXn5wJI++KWpdLMUsTrc2iWsjAGgicmN5bkQvfTnRwn2pF17EUUEhZ8YyE3qMSVD
|
||||
rDBECLAswT4Oiq9r9yw3VCFsRaxz5bhk9AAzWjam4H7mAfaEAOUvuX221v+KGSDM
|
||||
UsGAAe+GjMPL8KnGgEbISlSUF1Ubcw3EChcqjf3BID2gMLkAnGAoxlCZSYievytg
|
||||
71mcHyIf9yF861QrGcrCh6/objtRdt4IDUVwo9wapunRmYCdZux4ApD0Hit8nAsm
|
||||
QtxftSK6FWBTOCIRoOQTjwE8qj9GYTIbUFppX66Dzh00td5NKkWz0PVze7YSk2hC
|
||||
KCVBYyUYHgkQYVlYLZw7dBrXSXv7ph95vc93RDS031cU7tPOrthqnMmhtg1WAwzH
|
||||
xc2v3az9Gsw1RyxBAOVpkB0AFODiEiVg46xqmxaBPXfQOg/buZA2l4gK4U/pVUZH
|
||||
72lle2CbBw6FoSx40Y3GYZWB2uEdXBTNLlhX7q2Jvo8WdeTxEv5ACZsjI7K/wrzt
|
||||
nmvCHefOmVf4tefkXy1MyEvBt2+Ek9bHmHDL1BSk/JdJzJtam2uaP5pGum/PwIUW
|
||||
KBatmHKZUKwgOIml9btB413C4zSK3GQmC5Y/+TxYybACIdxTDqPSczVZ5Q+jSywX
|
||||
shdOoLXDRyrYhT2sHjZ1W29B8ebokqwousF77EA94sqfQvDDnmFpvfq9+m0WYtOh
|
||||
PFF/yxOtlbPJYX7mnC8+dUgobSA4AR5Yrclt+levgivIyNuBwzevHRDMreMZKl2J
|
||||
uiOT8tkuu66fAwEltIowjjV7TBRfij4QLXl/zfFo8jKU8efL3xluXoRn7g+E5FZ3
|
||||
19KTF/DWMcttfeTUYVnv0QTnstb1RGnVj7w8JMy90mKdMQFpl7IzHd2n6LrhEw1V
|
||||
1AaPF7EcQBOlvsvlZdIFQrFyhKozKoGi3wRrl/bNdebxjIjPzfN9GgbiufFjz2d7
|
||||
DMR9GFXfUMVxLncaqBBy1X7MV17ZF7K4uw6DET4fRoecb4N5mJVUxvYq4iZApnNP
|
||||
npgGdmlcyPD6o3ynx/vkw78m13Gfgw8i2OaUY7xBdOyNVEvkJZBLaC2hw+TKLaZa
|
||||
v0RExtAO0i0QO4Y1eo78Pl9jOpz0wkJ4KG0270l1Jza4IyaIhYRDWagWOfOp/cXU
|
||||
cvKKiuJhLOsX1Bapz+O2Aor9+EwWRdPd3BzE2ABdmKHPwrKobNp75wrCpQ5mZifn
|
||||
DSTJRMPQQJV3wGfB2sP0NE47U8w5CCmVK8gEuqYr6wBl/CCq5tjiRc63VM+to5V4
|
||||
tVNTCJWIRgQQEQIABgUCUc7PqwAKCRBr3f6OVKKs8cYAAKCFCLJ5wc+iAVCFRevh
|
||||
xTcJct0fiQCePHpY37CIeP8s9BH8GqCDftUqh8SIRgQQEQIABgUCUc7YwAAKCRDd
|
||||
f+mrhdawLOVxAJ9Tjud26LtbM2mWcPj2eT7dhqgZrQCdGyMwMMVzp40lsCK44PrV
|
||||
+mpFO7KJAhwEEAECAAYFAlHO0BkACgkQw35HI5aSdvXfLw//c2zZxXg4bI2W7gkB
|
||||
ZQJIOWnmPZfhrXQNeFuetyGoWTm4ZWxW362AdDGiQSGNNkXqeBPOitKOkRyZP/Z3
|
||||
h1vwkLkwdFZyWXK00BzYBKfjThWV1BAnArQLewSiLlE7qSnsPEY6FW0PNv711cbL
|
||||
lXSUP1/lW25Nx7L76GAF6sHreoIdglE8YH5y310JuFnqPa0uaJG+qDo8Mb+WkyLy
|
||||
Q2A3Atws1tIB9vHsq2FCt9ACyAEA3AqtHR4uMFmIWpUYy77fJAZdzLZTWf0X5XYw
|
||||
XILNPOl/I0iZrq3LYQAvJfIwjWAC/lm6uTLlvkIJHKyhcIT+RocjMV7bY9ezrC5i
|
||||
Cag3gaOZ7USMt0h59KdmBaHHNa32n3PSHg9XWljqoWMRjuaRdcA7ofK0BHDJbHWE
|
||||
cldKXC09laWOXbyNmJsfug/23vNE7fS/cAKSIgEWszEwHJCahB2i/HqOQF0DUGpq
|
||||
3s5oIXs2xIuN0yT6yIIiQnTU/FkWDDu4D1OZNrDW6QG3cde0PRak/0fr4Kv4iB3E
|
||||
CAzlsRBlWKNu/eE4QBx6cbvLqjriijhGAF+8Y1zvRKNKPr96hSsETfVytuKDTp6F
|
||||
u7PAarrSATGXI92Hy3ThAZla0VOYUyeWPktqUMDNq90tIBZbwKpOMMqvJmZfgdOU
|
||||
4ldDq1f5+2WhAt1aTL1GJVCuYcCJAhwEEAECAAYFAlHO3MQACgkQnSOpPExjO3Gi
|
||||
jxAAsD+luooqqoz3A28ZxwfCDV+ovazQ4Bw6hVU0zKKZIz/2H4jwmLtLSHtucCRM
|
||||
xRksZmnqf1p2nn+BKBXDInx9vI9HziMu7fWkzhuovAIf9+X/l6EYV1kQx0bIM1qU
|
||||
BxXWPgGdrgSZZHl9Qff/BOBnrI8NJmVBDzOh3BSs0BrSR7aFbkSNbjk/JcP0JEyk
|
||||
j6wDKQsop/Ca5AboLL0uQPgTvhxCu4VROKjhu7o3s7G3xlxTpimwYklDQuYFaGKj
|
||||
ZNIGFq2orfIMBnj7ZEQVXzhWltlHcgPVP5TDfgd4pVUbyUB6ras7odJWWIHnUFmj
|
||||
1l5bGidIwRXGFusE4iR8pR528LG2KxNDNQYipsKRY9m+wH+N7gbSgK8DxmocvieV
|
||||
vcILFS5VrPLbEO2oC13NMljmvua3ovDB0CEh9rybaH+/oA+VDS2L3pkgATTju+Vx
|
||||
6+mVdlvnrA4mJ5BoLHzrleKybS4ZkbtVBh1KOYmo95NgVifRvpVPB6hKzwqcjYFV
|
||||
fVYBxTryTBRyd9MLsqpPKnGLBENTFvKDxRCK3iioNyVhXdS0z/UyF1C2hwNTpnjY
|
||||
pGCu+Es3SILJg2TvQcwLM0OoYBA1bcONm2XbkTrdCpTOtQcSewQSkijREunx14iu
|
||||
pvNSWeNmbjQU7gNYhvwcBgh90tWgNCfqTtSa5xSe46tmv0SJAhwEEAECAAYFAlHQ
|
||||
1hgACgkQZwn/QC8Dr2hT/g/+OFUYPXfWo0+ILdxyTGP/v2mSw/X3dBCEYUqefWxD
|
||||
umcwnksey+thEGFBlxbwpyOfAoTzZLUupaG6BacVgRUvv8bTne4v2H1d22aBXyjC
|
||||
HMtQPhupn/giamu8q8hCPFrDp6inIAeFuz1GmQaH6xWO5eYBuYXQtxlvZLWBsuMT
|
||||
74en4e3vjczxGmJu/nvM9ugcYsexA/zcN6SRGr7t2pV4ZElPzPBRyAzhYqhP1YlB
|
||||
Rydz60OjgcWYEoJKWhJOfmFJ3ZoNGAz4TGoBkDIq4olCF0/cxqrtHN+ZnEOLwiZ7
|
||||
4ZX90avcjEFtM+Wb5dBHNpni4ISoHcVI1X0ye6tuAOOt7RywbET/0oIW5iSNMgJ0
|
||||
X4XYgOIQ2+a8yjGBjo9I57k0vp1mL6Ji/eaa0dlppcCGnzvSHss+O0qO212pg5Yk
|
||||
GGfjX1y1ZeSP3ca9C2XyOGIVw2d2Iu7OyqAv/N81xt6ZgG3qixQC0nmgOmn7Kh2B
|
||||
20W12KpLxKS8RQdHawGau3MBGKeqbfK6/eAzm22yD4/yJAoW4hKgm84z3FbKUN8w
|
||||
ulYMK9hS2c4egpoDAOJ/QZLLXFWiyi7/sHZz69G2AweWCjOJh28Otg0cUHoLo7jw
|
||||
oO/L0rCsOQMbUuIumYXBPHNnDwv1xfv2lT8tVzf6GksFJBAw0DybxOMTaOg45Lhz
|
||||
jGS5BA0EUc7OlQEgAN6t+BV705uoCsdHtQBq/HKGGD5tBiOzy7Wd4nF/c6EWzET4
|
||||
QUnmw6bDnqjxrk9MWniPDf1O9MvuB4qIY6g9kEjZ+VSQpWUZpZ5bMXCNHrfh9J2Q
|
||||
6oLWqDmpeZv2OI0O9wxT62QaFei2qBtimSnBudLSCnvmU3S0h1PflmJsbj+tVcko
|
||||
w2yOh2bjH1jkVAODHvEbxqyD6fiZhbfUVbPC49SBmXv8Gv0UywNSkP+iqJdwZAb0
|
||||
XtjRx4WjZCkTwJAnbM4CJ63+5Hd83BtWZAZbGAh76XY/cSkDirXtXC+2LNUmP5W2
|
||||
QY+ur5Bvz8LHaqJMXLAtePdkv5kpd+jXBrZieXUtqovxZaQTinl7C3L2TZd/ivxD
|
||||
F3Rko9BFDuXXcdZrxBY5b3146IvSPp1y0WmHRxhAPb+RuiHQMt8K92nOhPyvtWXB
|
||||
mWz0GnW9L6+CW4LKSPRSnE057hyxYNP/DcDd+fWFH+MmhU9noqHfJXSaLVzdI5PI
|
||||
L8N44AndPIojnlxrxRs7Ik/nW6cTV9H3agg+24yyTdFkACbfIS6wWXOHeHuBzmO6
|
||||
VI7pXOZJ9vZT7zI7M/hVci0R3putsGqgRfByRWWQ2DNeyrwUHexZNR/NYz1uhvA6
|
||||
dBfKcuAwqxbdSrW/BxJ+iJWdkgYGCV67VLlO6S9sO33HgOanpPr5R9V1KsFVh4dN
|
||||
j6BjZ4ALE5FPNW+iONnuXvtZbN2cBlBzMDeFC9oZoYCs1Pkmk8xUY2sAXPUt1R0G
|
||||
D/miIb7ig1N52j9P6vv6fPs1ghmc/hGkhaXyjS54B5T33V6M9g+yba9mIgi8ZxZa
|
||||
G+4rlFFKA4HS7wYYRJoqMvnc/qBYvoWLaPu3Xq6AXrJyuAaN+e3L8++cWbYHBXF9
|
||||
qt+Q2RFL0FNiYUQuwkiaerysnm1a0H7ZtJ4zjl4ZgA1Ej7QcylTIbgFW3L7FnyMH
|
||||
/5weLLN2wdjAtzjhRPYJLbV6V/gFbbpCpr+caDUaxSNizQuhhzVI5UrJegaHCCrx
|
||||
DCiwWRFYzN5pqhtgzcaImK76DmPIk+Yrsum5KJZQeGfzKxvF0YnwxU0bxFzcDZJD
|
||||
X2oCJn828Aw2j0nIlVlrrao0JMkvTBeZehO/11U68M2vKGEqrsQOb/BTXyLCeZwn
|
||||
UGow1WvYfRxEZTrhhiYw94EH06gbqmKG1xsuV4LDI5z63/6ACcQW3orMbMymJCky
|
||||
4HiNVZ7SNeGoYe380CJCwv6GN1opKTAWp84cr2KzhAzONGqNWNpUhznAXlI+GzCc
|
||||
D2H330L1atMqZHjgpEfrkowvJ7WBM5KFKDfylaTKhYvfZcTOZs5OmRZSW3U54wRD
|
||||
RMP0d2+k3vRililNhHIErHbjhYFc6zubVbBhvUMAEQEAAYkEHwQYAQIACQUCUc7O
|
||||
lQIbDAAKCRCxF563NH3BDSX2IACugAdZqX+o/+pTkSrj+NEAcP0ZMci8w5nm/yOP
|
||||
VlGyY6PXGuQKcBtvz3LWtIDdddMc/bD/zmZPwSzTx1MMOWc+gjR0azXe2RrdMHYk
|
||||
8pb4X4Op2Nkasoc/8hNsRKaU24WUAQMqrRREIVBEOuHGl1A52Lj+aFB04rRHrkMl
|
||||
AqjB5bwArPorIBdM417EEl4hjEZ9BpQxbUgBhTgGTZuc1u9PsKz1YvQ79YJIRmSH
|
||||
n72Zaf35zY55eOQeoVBzGmFPq+/UFqtRNWA7jmRhHvMz/yR33B/RSxyTJuPb79zi
|
||||
2mIZOrViG3X/UNL4qtOc1cKXQBi+FjHAMlGrCc+D5lnyOhEvqoEuvQic7V6C8Pvk
|
||||
9q+jngn2Gs4pdJO8FOnwaC5xp/ZNE0v7x/KtAHyBA6iKcaepgoRQPSt1ONiHyfh1
|
||||
iGgJn+Y6IHx4YDYKEY0UIzHhCfWUl8XZWcf4wLGEbGztkRbkCFqrsja5IeaO7umB
|
||||
i6C4f95uSGjV7SiIMJOE8xo/m2g4VCnnmk7U996JwtBMKREMMqa3ABK4trfBL3Kq
|
||||
P6I6ZTlA/C5svkVUVwWOMZau9kLDsxv8keGrFteZtfYa1KPAROFwNuBU82UW0KtX
|
||||
QQbZoBKt1o3LhqEu+hXU3iKocYWSbBThH8u6vPNgSnW2Qcv3gcUU3jGmYeHrGiUO
|
||||
SuEWxwlKUxCxBNfmz1FGswlwve1LsS3RTz/XB/L6Ubhq5L7FevrXz8152kuMqnpy
|
||||
m93sXkL1eJVo07hH+otcRnMzy4vUar9z/N12t3hfTffx29PBKUCc2PKPVpLfJX2i
|
||||
hieHk23fhLnptjc3lm9S+bHO3rqEWHqgNgNp9bpuwiLRsIy6qTtmC8jxXkGXvQrS
|
||||
+2Hv6+jRfDcqEAK3vqi1XL7Td81KRjnheBtsKpjS2PFatK3uTo6v1oRWJCdRCxg1
|
||||
HT6a9KvZ+DNKcxlQISKAOLX72qpziaDl4CpBdQy4Zg2pr9oYkLdlfkaDK/OH4J3M
|
||||
wJiVf/uNPPd+yy6xZXK0SPZHf+mf5Yt+Sim93hIbdS9AMdvHKB5n3DR27H+/okPj
|
||||
w3J9z85hxgP5KspizQR6t77AWddPRy/l3BBZeb+HiaeKGBJeSNWXpkPXHkdjLW8U
|
||||
QStzFR8r15FWJTmamIknjJ3XNbytMCpu8cj2ZVZdyjPcHEBL3WbNYYtauSuYmyUO
|
||||
yXBaecM/KoTdvHiERU/mMuf7f1ftftCHehZoNaP+BeIbIud9IHIdrSQBCW+RC1Y1
|
||||
8opDLMtnIOX3OnyCN38ELYcuNLMJxBqnQgi7MVDVcT1+BN/+lFQtG44+rPUkK+T1
|
||||
Jk1/tIJqcyc1BfY6uFHFXWWnqQnjl0XpZo+/bMDxTVy8yND2
|
||||
=icdI
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -1,2 +0,0 @@
|
||||
### Linearize ###
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
# bitcoind RPC settings
|
||||
rpcuser=someuser
|
||||
rpcpassword=somepassword
|
||||
host=127.0.0.1
|
||||
port=8332
|
||||
|
||||
# bootstrap.dat settings
|
||||
netmagic=f9beb4d9
|
||||
max_height=279000
|
||||
output=bootstrap.dat
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# linearize.py: Construct a linear, no-fork, best version of the blockchain.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2013 The Bitcoin developers
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
||||
import json
|
||||
import struct
|
||||
import re
|
||||
import base64
|
||||
import httplib
|
||||
import sys
|
||||
|
||||
ERR_SLEEP = 15
|
||||
MAX_NONCE = 1000000L
|
||||
|
||||
settings = {}
|
||||
|
||||
class BitcoinRPC:
|
||||
OBJID = 1
|
||||
|
||||
def __init__(self, host, port, username, password):
|
||||
authpair = "%s:%s" % (username, password)
|
||||
self.authhdr = "Basic %s" % (base64.b64encode(authpair))
|
||||
self.conn = httplib.HTTPConnection(host, port, False, 30)
|
||||
def rpc(self, method, params=None):
|
||||
self.OBJID += 1
|
||||
obj = { 'version' : '1.1',
|
||||
'method' : method,
|
||||
'id' : self.OBJID }
|
||||
if params is None:
|
||||
obj['params'] = []
|
||||
else:
|
||||
obj['params'] = params
|
||||
self.conn.request('POST', '/', json.dumps(obj),
|
||||
{ 'Authorization' : self.authhdr,
|
||||
'Content-type' : 'application/json' })
|
||||
|
||||
resp = self.conn.getresponse()
|
||||
if resp is None:
|
||||
print "JSON-RPC: no response"
|
||||
return None
|
||||
|
||||
body = resp.read()
|
||||
resp_obj = json.loads(body)
|
||||
if resp_obj is None:
|
||||
print "JSON-RPC: cannot JSON-decode body"
|
||||
return None
|
||||
if 'error' in resp_obj and resp_obj['error'] != None:
|
||||
return resp_obj['error']
|
||||
if 'result' not in resp_obj:
|
||||
print "JSON-RPC: no result in object"
|
||||
return None
|
||||
|
||||
return resp_obj['result']
|
||||
def getblock(self, hash, verbose=True):
|
||||
return self.rpc('getblock', [hash, verbose])
|
||||
def getblockhash(self, index):
|
||||
return self.rpc('getblockhash', [index])
|
||||
|
||||
def getblock(rpc, settings, n):
|
||||
hash = rpc.getblockhash(n)
|
||||
hexdata = rpc.getblock(hash, False)
|
||||
data = hexdata.decode('hex')
|
||||
|
||||
return data
|
||||
|
||||
def get_blocks(settings):
|
||||
rpc = BitcoinRPC(settings['host'], settings['port'],
|
||||
settings['rpcuser'], settings['rpcpassword'])
|
||||
|
||||
outf = open(settings['output'], 'ab')
|
||||
|
||||
for height in xrange(settings['min_height'], settings['max_height']+1):
|
||||
data = getblock(rpc, settings, height)
|
||||
|
||||
outhdr = settings['netmagic']
|
||||
outhdr += struct.pack("<i", len(data))
|
||||
|
||||
outf.write(outhdr)
|
||||
outf.write(data)
|
||||
|
||||
if (height % 1000) == 0:
|
||||
sys.stdout.write("Wrote block " + str(height) + "\n")
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 2:
|
||||
print "Usage: linearize.py CONFIG-FILE"
|
||||
sys.exit(1)
|
||||
|
||||
f = open(sys.argv[1])
|
||||
for line in f:
|
||||
# skip comment lines
|
||||
m = re.search('^\s*#', line)
|
||||
if m:
|
||||
continue
|
||||
|
||||
# parse key=value lines
|
||||
m = re.search('^(\w+)\s*=\s*(\S.*)$', line)
|
||||
if m is None:
|
||||
continue
|
||||
settings[m.group(1)] = m.group(2)
|
||||
f.close()
|
||||
|
||||
if 'netmagic' not in settings:
|
||||
settings['netmagic'] = 'f9beb4d9'
|
||||
if 'output' not in settings:
|
||||
settings['output'] = 'bootstrap.dat'
|
||||
if 'host' not in settings:
|
||||
settings['host'] = '127.0.0.1'
|
||||
if 'port' not in settings:
|
||||
settings['port'] = 8332
|
||||
if 'min_height' not in settings:
|
||||
settings['min_height'] = 0
|
||||
if 'max_height' not in settings:
|
||||
settings['max_height'] = 279000
|
||||
if 'rpcuser' not in settings or 'rpcpassword' not in settings:
|
||||
print "Missing username and/or password in cfg file"
|
||||
sys.exit(1)
|
||||
|
||||
settings['netmagic'] = settings['netmagic'].decode('hex')
|
||||
settings['port'] = int(settings['port'])
|
||||
settings['min_height'] = int(settings['min_height'])
|
||||
settings['max_height'] = int(settings['max_height'])
|
||||
|
||||
get_blocks(settings)
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
### MacDeploy ###
|
||||
|
||||
You will need the appscript package for the fancy disk image creation to work:
|
||||
|
||||
sudo easy_install appscript
|
||||
|
||||
For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package:
|
||||
|
||||
sudo easy_install argparse
|
||||
|
||||
This script should not be run manually, instead, after building as usual:
|
||||
|
||||
make deploy
|
||||
|
||||
During the process, the disk image window will pop up briefly where the fancy
|
||||
settings are applied. This is normal, please do not interfere.
|
||||
|
||||
When finished, it will produce `Bitcoin-Qt.dmg`.
|
||||
|
||||
@@ -17,430 +17,26 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import subprocess, sys, re, os, shutil, stat, os.path
|
||||
from string import Template
|
||||
import subprocess, sys, re, os, shutil, os.path
|
||||
from time import sleep
|
||||
from argparse import ArgumentParser
|
||||
|
||||
# This is ported from the original macdeployqt with modifications
|
||||
|
||||
class FrameworkInfo(object):
|
||||
def __init__(self):
|
||||
self.frameworkDirectory = ""
|
||||
self.frameworkName = ""
|
||||
self.frameworkPath = ""
|
||||
self.binaryDirectory = ""
|
||||
self.binaryName = ""
|
||||
self.binaryPath = ""
|
||||
self.version = ""
|
||||
self.installName = ""
|
||||
self.deployedInstallName = ""
|
||||
self.sourceFilePath = ""
|
||||
self.destinationDirectory = ""
|
||||
self.sourceResourcesDirectory = ""
|
||||
self.destinationResourcesDirectory = ""
|
||||
|
||||
def __eq__(self, other):
|
||||
if self.__class__ == other.__class__:
|
||||
return self.__dict__ == other.__dict__
|
||||
else:
|
||||
return False
|
||||
|
||||
def __str__(self):
|
||||
return """ Framework name: %s
|
||||
Framework directory: %s
|
||||
Framework path: %s
|
||||
Binary name: %s
|
||||
Binary directory: %s
|
||||
Binary path: %s
|
||||
Version: %s
|
||||
Install name: %s
|
||||
Deployed install name: %s
|
||||
Source file Path: %s
|
||||
Deployed Directory (relative to bundle): %s
|
||||
""" % (self.frameworkName,
|
||||
self.frameworkDirectory,
|
||||
self.frameworkPath,
|
||||
self.binaryName,
|
||||
self.binaryDirectory,
|
||||
self.binaryPath,
|
||||
self.version,
|
||||
self.installName,
|
||||
self.deployedInstallName,
|
||||
self.sourceFilePath,
|
||||
self.destinationDirectory)
|
||||
|
||||
def isDylib(self):
|
||||
return self.frameworkName.endswith(".dylib")
|
||||
|
||||
def isQtFramework(self):
|
||||
if self.isDylib():
|
||||
return self.frameworkName.startswith("libQt")
|
||||
else:
|
||||
return self.frameworkName.startswith("Qt")
|
||||
|
||||
reOLine = re.compile(r'^(.+) \(compatibility version [0-9.]+, current version [0-9.]+\)$')
|
||||
bundleFrameworkDirectory = "Contents/Frameworks"
|
||||
bundleBinaryDirectory = "Contents/MacOS"
|
||||
|
||||
@classmethod
|
||||
def fromOtoolLibraryLine(cls, line):
|
||||
# Note: line must be trimmed
|
||||
if line == "":
|
||||
return None
|
||||
|
||||
# Don't deploy system libraries (exception for libQtuitools and libQtlucene).
|
||||
if line.startswith("/System/Library/") or line.startswith("@executable_path") or (line.startswith("/usr/lib/") and "libQt" not in line):
|
||||
return None
|
||||
|
||||
m = cls.reOLine.match(line)
|
||||
if m is None:
|
||||
raise RuntimeError("otool line could not be parsed: " + line)
|
||||
|
||||
path = m.group(1)
|
||||
|
||||
info = cls()
|
||||
info.sourceFilePath = path
|
||||
info.installName = path
|
||||
|
||||
if path.endswith(".dylib"):
|
||||
dirname, filename = os.path.split(path)
|
||||
info.frameworkName = filename
|
||||
info.frameworkDirectory = dirname
|
||||
info.frameworkPath = path
|
||||
|
||||
info.binaryDirectory = dirname
|
||||
info.binaryName = filename
|
||||
info.binaryPath = path
|
||||
info.version = "-"
|
||||
|
||||
info.installName = path
|
||||
info.deployedInstallName = "@executable_path/../Frameworks/" + info.binaryName
|
||||
info.sourceFilePath = path
|
||||
info.destinationDirectory = cls.bundleFrameworkDirectory
|
||||
else:
|
||||
parts = path.split("/")
|
||||
i = 0
|
||||
# Search for the .framework directory
|
||||
for part in parts:
|
||||
if part.endswith(".framework"):
|
||||
break
|
||||
i += 1
|
||||
if i == len(parts):
|
||||
raise RuntimeError("Could not find .framework or .dylib in otool line: " + line)
|
||||
|
||||
info.frameworkName = parts[i]
|
||||
info.frameworkDirectory = "/".join(parts[:i])
|
||||
info.frameworkPath = os.path.join(info.frameworkDirectory, info.frameworkName)
|
||||
|
||||
info.binaryName = parts[i+3]
|
||||
info.binaryDirectory = "/".join(parts[i+1:i+3])
|
||||
info.binaryPath = os.path.join(info.binaryDirectory, info.binaryName)
|
||||
info.version = parts[i+2]
|
||||
|
||||
info.deployedInstallName = "@executable_path/../Frameworks/" + os.path.join(info.frameworkName, info.binaryPath)
|
||||
info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory)
|
||||
|
||||
info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources")
|
||||
info.destinationResourcesDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Resources")
|
||||
|
||||
return info
|
||||
|
||||
class ApplicationBundleInfo(object):
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
appName = os.path.splitext(os.path.basename(path))[0]
|
||||
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)
|
||||
self.resourcesPath = os.path.join(path, "Contents", "Resources")
|
||||
self.pluginPath = os.path.join(path, "Contents", "PlugIns")
|
||||
|
||||
class DeploymentInfo(object):
|
||||
def __init__(self):
|
||||
self.qtPath = None
|
||||
self.pluginPath = None
|
||||
self.deployedFrameworks = []
|
||||
|
||||
def detectQtPath(self, frameworkDirectory):
|
||||
parentDir = os.path.dirname(frameworkDirectory)
|
||||
if os.path.exists(os.path.join(parentDir, "translations")):
|
||||
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x"
|
||||
self.qtPath = parentDir
|
||||
elif os.path.exists(os.path.join(parentDir, "share", "qt4", "translations")):
|
||||
# MacPorts layout, e.g. "/opt/local/share/qt4"
|
||||
self.qtPath = os.path.join(parentDir, "share", "qt4")
|
||||
elif os.path.exists(os.path.join(os.path.dirname(parentDir), "share", "qt4", "translations")):
|
||||
# Newer Macports layout
|
||||
self.qtPath = os.path.join(os.path.dirname(parentDir), "share", "qt4")
|
||||
else:
|
||||
self.qtPath = os.getenv("QTDIR", None)
|
||||
|
||||
if self.qtPath is not None:
|
||||
pluginPath = os.path.join(self.qtPath, "plugins")
|
||||
if os.path.exists(pluginPath):
|
||||
self.pluginPath = pluginPath
|
||||
|
||||
def usesFramework(self, name):
|
||||
nameDot = "%s." % name
|
||||
libNameDot = "lib%s." % name
|
||||
for framework in self.deployedFrameworks:
|
||||
if framework.endswith(".framework"):
|
||||
if framework.startswith(nameDot):
|
||||
return True
|
||||
elif framework.endswith(".dylib"):
|
||||
if framework.startswith(libNameDot):
|
||||
return True
|
||||
return False
|
||||
|
||||
def getFrameworks(binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Inspecting with otool: " + binaryPath
|
||||
otool = subprocess.Popen(["otool", "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
o_stdout, o_stderr = otool.communicate()
|
||||
if otool.returncode != 0:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write(o_stderr)
|
||||
sys.stderr.flush()
|
||||
raise RuntimeError("otool failed with return code %d" % otool.returncode)
|
||||
|
||||
otoolLines = o_stdout.split("\n")
|
||||
otoolLines.pop(0) # First line is the inspected binary
|
||||
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
|
||||
otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency.
|
||||
|
||||
libraries = []
|
||||
for line in otoolLines:
|
||||
info = FrameworkInfo.fromOtoolLibraryLine(line.strip())
|
||||
if info is not None:
|
||||
if verbose >= 3:
|
||||
print "Found framework:"
|
||||
print info
|
||||
libraries.append(info)
|
||||
|
||||
return libraries
|
||||
|
||||
def runInstallNameTool(action, *args):
|
||||
subprocess.check_call(["install_name_tool", "-"+action] + list(args))
|
||||
|
||||
def changeInstallName(oldName, newName, binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Using install_name_tool:"
|
||||
print " in", binaryPath
|
||||
print " change reference", oldName
|
||||
print " to", newName
|
||||
runInstallNameTool("change", oldName, newName, binaryPath)
|
||||
|
||||
def changeIdentification(id, binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Using install_name_tool:"
|
||||
print " change identification in", binaryPath
|
||||
print " to", id
|
||||
runInstallNameTool("id", id, binaryPath)
|
||||
|
||||
def runStrip(binaryPath, verbose):
|
||||
if verbose >= 3:
|
||||
print "Using strip:"
|
||||
print " stripped", binaryPath
|
||||
subprocess.check_call(["strip", "-x", binaryPath])
|
||||
|
||||
def copyFramework(framework, path, verbose):
|
||||
if framework.sourceFilePath.startswith("Qt"):
|
||||
#standard place for Nokia Qt installer's frameworks
|
||||
fromPath = "/Library/Frameworks/" + framework.sourceFilePath
|
||||
else:
|
||||
fromPath = framework.sourceFilePath
|
||||
toDir = os.path.join(path, framework.destinationDirectory)
|
||||
toPath = os.path.join(toDir, framework.binaryName)
|
||||
|
||||
if not os.path.exists(fromPath):
|
||||
raise RuntimeError("No file at " + fromPath)
|
||||
|
||||
if os.path.exists(toPath):
|
||||
return None # Already there
|
||||
|
||||
if not os.path.exists(toDir):
|
||||
os.makedirs(toDir)
|
||||
|
||||
shutil.copy2(fromPath, toPath)
|
||||
if verbose >= 3:
|
||||
print "Copied:", fromPath
|
||||
print " to:", toPath
|
||||
|
||||
permissions = os.stat(toPath)
|
||||
if not permissions.st_mode & stat.S_IWRITE:
|
||||
os.chmod(toPath, permissions.st_mode | stat.S_IWRITE)
|
||||
|
||||
if not framework.isDylib(): # Copy resources for real frameworks
|
||||
fromResourcesDir = framework.sourceResourcesDirectory
|
||||
if os.path.exists(fromResourcesDir):
|
||||
toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory)
|
||||
shutil.copytree(fromResourcesDir, toResourcesDir)
|
||||
if verbose >= 3:
|
||||
print "Copied resources:", fromResourcesDir
|
||||
print " to:", toResourcesDir
|
||||
elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout)
|
||||
qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib")
|
||||
qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib")
|
||||
if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath):
|
||||
shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath)
|
||||
if verbose >= 3:
|
||||
print "Copied for libQtGui:", qtMenuNibSourcePath
|
||||
print " to:", qtMenuNibDestinationPath
|
||||
|
||||
return toPath
|
||||
|
||||
def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploymentInfo=None):
|
||||
if deploymentInfo is None:
|
||||
deploymentInfo = DeploymentInfo()
|
||||
|
||||
while len(frameworks) > 0:
|
||||
framework = frameworks.pop(0)
|
||||
deploymentInfo.deployedFrameworks.append(framework.frameworkName)
|
||||
|
||||
if verbose >= 2:
|
||||
print "Processing", framework.frameworkName, "..."
|
||||
|
||||
# Get the Qt path from one of the Qt frameworks
|
||||
if deploymentInfo.qtPath is None and framework.isQtFramework():
|
||||
deploymentInfo.detectQtPath(framework.frameworkDirectory)
|
||||
|
||||
if framework.installName.startswith("@executable_path"):
|
||||
if verbose >= 2:
|
||||
print framework.frameworkName, "already deployed, skipping."
|
||||
continue
|
||||
|
||||
# install_name_tool the new id into the binary
|
||||
changeInstallName(framework.installName, framework.deployedInstallName, binaryPath, verbose)
|
||||
|
||||
# Copy farmework to app bundle.
|
||||
deployedBinaryPath = copyFramework(framework, bundlePath, verbose)
|
||||
# Skip the rest if already was deployed.
|
||||
if deployedBinaryPath is None:
|
||||
continue
|
||||
|
||||
if strip:
|
||||
runStrip(deployedBinaryPath, verbose)
|
||||
|
||||
# install_name_tool it a new id.
|
||||
changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose)
|
||||
# Check for framework dependencies
|
||||
dependencies = getFrameworks(deployedBinaryPath, verbose)
|
||||
|
||||
for dependency in dependencies:
|
||||
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose)
|
||||
|
||||
# Deploy framework if necessary.
|
||||
if dependency.frameworkName not in deploymentInfo.deployedFrameworks and dependency not in frameworks:
|
||||
frameworks.append(dependency)
|
||||
|
||||
return deploymentInfo
|
||||
|
||||
def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
|
||||
frameworks = getFrameworks(applicationBundle.binaryPath, verbose)
|
||||
if len(frameworks) == 0 and verbose >= 1:
|
||||
print "Warning: Could not find any external frameworks to deploy in %s." % (applicationBundle.path)
|
||||
return DeploymentInfo()
|
||||
else:
|
||||
return deployFrameworks(frameworks, applicationBundle.path, applicationBundle.binaryPath, strip, verbose)
|
||||
|
||||
def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
|
||||
# Lookup available plugins, exclude unneeded
|
||||
plugins = []
|
||||
for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath):
|
||||
pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath)
|
||||
if pluginDirectory == "designer":
|
||||
# Skip designer plugins
|
||||
continue
|
||||
elif pluginDirectory == "phonon" or pluginDirectory == "phonon_backend":
|
||||
# Deploy the phonon plugins only if phonon is in use
|
||||
if not deploymentInfo.usesFramework("phonon"):
|
||||
continue
|
||||
elif pluginDirectory == "sqldrivers":
|
||||
# Deploy the sql plugins only if QtSql is in use
|
||||
if not deploymentInfo.usesFramework("QtSql"):
|
||||
continue
|
||||
elif pluginDirectory == "script":
|
||||
# Deploy the script plugins only if QtScript is in use
|
||||
if not deploymentInfo.usesFramework("QtScript"):
|
||||
continue
|
||||
elif pluginDirectory == "qmltooling":
|
||||
# Deploy the qml plugins only if QtDeclarative is in use
|
||||
if not deploymentInfo.usesFramework("QtDeclarative"):
|
||||
continue
|
||||
elif pluginDirectory == "bearer":
|
||||
# Deploy the bearer plugins only if QtNetwork is in use
|
||||
if not deploymentInfo.usesFramework("QtNetwork"):
|
||||
continue
|
||||
|
||||
for pluginName in filenames:
|
||||
pluginPath = os.path.join(pluginDirectory, pluginName)
|
||||
if pluginName.endswith("_debug.dylib"):
|
||||
# Skip debug plugins
|
||||
continue
|
||||
elif pluginPath == "imageformats/libqsvg.dylib" or pluginPath == "iconengines/libqsvgicon.dylib":
|
||||
# Deploy the svg plugins only if QtSvg is in use
|
||||
if not deploymentInfo.usesFramework("QtSvg"):
|
||||
continue
|
||||
elif pluginPath == "accessible/libqtaccessiblecompatwidgets.dylib":
|
||||
# Deploy accessibility for Qt3Support only if the Qt3Support is in use
|
||||
if not deploymentInfo.usesFramework("Qt3Support"):
|
||||
continue
|
||||
elif pluginPath == "graphicssystems/libqglgraphicssystem.dylib":
|
||||
# Deploy the opengl graphicssystem plugin only if QtOpenGL is in use
|
||||
if not deploymentInfo.usesFramework("QtOpenGL"):
|
||||
continue
|
||||
|
||||
plugins.append((pluginDirectory, pluginName))
|
||||
|
||||
for pluginDirectory, pluginName in plugins:
|
||||
if verbose >= 2:
|
||||
print "Processing plugin", os.path.join(pluginDirectory, pluginName), "..."
|
||||
|
||||
sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName)
|
||||
destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory)
|
||||
if not os.path.exists(destinationDirectory):
|
||||
os.makedirs(destinationDirectory)
|
||||
|
||||
destinationPath = os.path.join(destinationDirectory, pluginName)
|
||||
shutil.copy2(sourcePath, destinationPath)
|
||||
if verbose >= 3:
|
||||
print "Copied:", sourcePath
|
||||
print " to:", destinationPath
|
||||
|
||||
if strip:
|
||||
runStrip(destinationPath, verbose)
|
||||
|
||||
dependencies = getFrameworks(destinationPath, verbose)
|
||||
|
||||
for dependency in dependencies:
|
||||
changeInstallName(dependency.installName, dependency.deployedInstallName, destinationPath, verbose)
|
||||
|
||||
# Deploy framework if necessary.
|
||||
if dependency.frameworkName not in deploymentInfo.deployedFrameworks:
|
||||
deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo)
|
||||
|
||||
qt_conf="""[Paths]
|
||||
translations=Resources
|
||||
plugins=PlugIns
|
||||
"""
|
||||
|
||||
ap = ArgumentParser(description="""Improved version of macdeployqt.
|
||||
ap = ArgumentParser(description="""Front-end to macdeployqt with some additional functions.
|
||||
|
||||
Outputs a ready-to-deploy app in a folder "dist" and optionally wraps it in a .dmg file.
|
||||
Note, that the "dist" folder will be deleted before deploying on each run.
|
||||
|
||||
Optionally, Qt translation files (.qm) and additional resources can be added to the bundle.
|
||||
|
||||
Also optionally signs the .app bundle; set the CODESIGNARGS environment variable to pass arguments
|
||||
to the codesign tool.
|
||||
E.g. CODESIGNARGS='--sign "Developer ID Application: ..." --keychain /encrypted/foo.keychain'""")
|
||||
Optionally, Qt translation files (.qm) and additional resources can be added to the bundle.""")
|
||||
|
||||
ap.add_argument("app_bundle", nargs=1, metavar="app-bundle", help="application bundle to be deployed")
|
||||
ap.add_argument("-verbose", type=int, nargs=1, default=[1], metavar="<0-3>", help="0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug")
|
||||
ap.add_argument("-no-plugins", dest="plugins", action="store_false", default=True, help="skip plugin deployment")
|
||||
ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, help="don't run 'strip' on the binaries")
|
||||
ap.add_argument("-sign", dest="sign", action="store_true", default=False, help="sign .app bundle with codesign tool")
|
||||
ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used")
|
||||
ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work")
|
||||
ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's ressources; the language list must be separated with commas, not with whitespace")
|
||||
@@ -473,6 +69,22 @@ for p in config.add_resources:
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.add_qt_tr) == 0:
|
||||
add_qt_tr = []
|
||||
else:
|
||||
qt_tr_dir = os.path.join(os.getenv("QTDIR", ""), "translations")
|
||||
add_qt_tr = ["qt_%s.qm" % lng for lng in config.add_qt_tr[0].split(",")]
|
||||
for lng_file in add_qt_tr:
|
||||
p = os.path.join(qt_tr_dir, lng_file)
|
||||
if verbose >= 3:
|
||||
print "Checking for \"%s\"..." % p
|
||||
if not os.path.exists(p):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find Qt translation file \"%s\"\n" % (lng_file))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.fancy) == 1:
|
||||
if verbose >= 3:
|
||||
print "Fancy: Importing plistlib..."
|
||||
@@ -548,6 +160,7 @@ if os.path.exists("dist"):
|
||||
# ------------------------------------------------
|
||||
|
||||
target = os.path.join("dist", app_bundle)
|
||||
target_res = os.path.join(target, "Contents", "Resources")
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Copying source bundle +"
|
||||
@@ -557,61 +170,27 @@ if verbose >= 3:
|
||||
os.mkdir("dist")
|
||||
shutil.copytree(app_bundle, target)
|
||||
|
||||
applicationBundle = ApplicationBundleInfo(target)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
macdeployqt_args = ["macdeployqt", target, "-verbose=%d" % verbose]
|
||||
if not config.plugins:
|
||||
macdeployqt_args.append("-no-plugins")
|
||||
if not config.strip:
|
||||
macdeployqt_args.append("-no-strip")
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Deploying frameworks +"
|
||||
print "+ Running macdeployqt +"
|
||||
|
||||
try:
|
||||
deploymentInfo = deployFrameworksForAppBundle(applicationBundle, config.strip, verbose)
|
||||
if deploymentInfo.qtPath is None:
|
||||
deploymentInfo.qtPath = os.getenv("QTDIR", None)
|
||||
if deploymentInfo.qtPath is None:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Warning: Could not detect Qt's path, skipping plugin deployment!\n")
|
||||
config.plugins = False
|
||||
except RuntimeError as e:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: %s\n" % str(e))
|
||||
ret = subprocess.call(macdeployqt_args)
|
||||
if ret != 0:
|
||||
sys.exit(ret)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.plugins:
|
||||
if verbose >= 2:
|
||||
print "+ Deploying plugins +"
|
||||
|
||||
try:
|
||||
deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose)
|
||||
except RuntimeError as e:
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: %s\n" % str(e))
|
||||
sys.exit(ret)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if len(config.add_qt_tr) == 0:
|
||||
add_qt_tr = []
|
||||
else:
|
||||
qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations")
|
||||
add_qt_tr = ["qt_%s.qm" % lng for lng in config.add_qt_tr[0].split(",")]
|
||||
for lng_file in add_qt_tr:
|
||||
p = os.path.join(qt_tr_dir, lng_file)
|
||||
if verbose >= 3:
|
||||
print "Checking for \"%s\"..." % p
|
||||
if not os.path.exists(p):
|
||||
if verbose >= 1:
|
||||
sys.stderr.write("Error: Could not find Qt translation file \"%s\"\n" % (lng_file))
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Installing qt.conf +"
|
||||
|
||||
f = open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb")
|
||||
f = open(os.path.join(target_res, "qt.conf"), "wb")
|
||||
f.write(qt_conf)
|
||||
f.close()
|
||||
|
||||
@@ -622,8 +201,8 @@ if len(add_qt_tr) > 0 and verbose >= 2:
|
||||
|
||||
for lng_file in add_qt_tr:
|
||||
if verbose >= 3:
|
||||
print os.path.join(qt_tr_dir, lng_file), "->", os.path.join(applicationBundle.resourcesPath, lng_file)
|
||||
shutil.copy2(os.path.join(qt_tr_dir, lng_file), os.path.join(applicationBundle.resourcesPath, lng_file))
|
||||
print os.path.join(qt_tr_dir, lng_file), "->", os.path.join(target_res, lng_file)
|
||||
shutil.copy2(os.path.join(qt_tr_dir, lng_file), os.path.join(target_res, lng_file))
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
@@ -631,7 +210,7 @@ if len(config.add_resources) > 0 and verbose >= 2:
|
||||
print "+ Adding additional resources +"
|
||||
|
||||
for p in config.add_resources:
|
||||
t = os.path.join(applicationBundle.resourcesPath, os.path.basename(p))
|
||||
t = os.path.join(target_res, os.path.basename(p))
|
||||
if verbose >= 3:
|
||||
print p, "->", t
|
||||
if os.path.isdir(p):
|
||||
@@ -641,33 +220,7 @@ for p in config.add_resources:
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.sign and 'CODESIGNARGS' not in os.environ:
|
||||
print "You must set the CODESIGNARGS environment variable. Skipping signing."
|
||||
elif config.sign:
|
||||
if verbose >= 1:
|
||||
print "Code-signing app bundle %s"%(target,)
|
||||
subprocess.check_call("codesign --force %s %s"%(os.environ['CODESIGNARGS'], target), shell=True)
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
if config.dmg is not None:
|
||||
|
||||
#Patch in check_output for Python 2.6
|
||||
if "check_output" not in dir( subprocess ):
|
||||
def f(*popenargs, **kwargs):
|
||||
if 'stdout' in kwargs:
|
||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
||||
output, unused_err = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
cmd = kwargs.get("args")
|
||||
if cmd is None:
|
||||
cmd = popenargs[0]
|
||||
raise CalledProcessError(retcode, cmd)
|
||||
return output
|
||||
subprocess.check_output = f
|
||||
|
||||
def runHDIUtil(verb, image_basename, **kwargs):
|
||||
hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"]
|
||||
if kwargs.has_key("capture_stdout"):
|
||||
@@ -745,68 +298,31 @@ if config.dmg is not None:
|
||||
if fancy.get("applications_symlink", False):
|
||||
os.symlink("/Applications", os.path.join(disk_root, "Applications"))
|
||||
|
||||
# The Python appscript package broke with OSX 10.8 and isn't being fixed.
|
||||
# So we now build up an AppleScript string and use the osascript command
|
||||
# to make the .dmg file pretty:
|
||||
appscript = Template( """
|
||||
on run argv
|
||||
tell application "Finder"
|
||||
tell disk "$disk"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {$window_bounds}
|
||||
set theViewOptions to the icon view options of container window
|
||||
set arrangement of theViewOptions to not arranged
|
||||
set icon size of theViewOptions to $icon_size
|
||||
$background_commands
|
||||
$items_positions
|
||||
close -- close/reopen works around a bug...
|
||||
open
|
||||
update without registering applications
|
||||
delay 5
|
||||
eject
|
||||
end tell
|
||||
end tell
|
||||
end run
|
||||
""")
|
||||
|
||||
itemscript = Template('set position of item "${item}" of container window to {${position}}')
|
||||
items_positions = []
|
||||
finder = appscript.app("Finder")
|
||||
disk = finder.disks[disk_name]
|
||||
disk.open()
|
||||
window = disk.container_window
|
||||
window.current_view.set(appscript.k.icon_view)
|
||||
window.toolbar_visible.set(False)
|
||||
window.statusbar_visible.set(False)
|
||||
if fancy.has_key("window_bounds"):
|
||||
window.bounds.set(fancy["window_bounds"])
|
||||
view_options = window.icon_view_options
|
||||
view_options.arrangement.set(appscript.k.not_arranged)
|
||||
if fancy.has_key("icon_size"):
|
||||
view_options.icon_size.set(fancy["icon_size"])
|
||||
if bg_path is not None:
|
||||
view_options.background_picture.set(disk.files[os.path.basename(bg_path)])
|
||||
if fancy.has_key("items_position"):
|
||||
for name, position in fancy["items_position"].iteritems():
|
||||
params = { "item" : name, "position" : ",".join([str(p) for p in position]) }
|
||||
items_positions.append(itemscript.substitute(params))
|
||||
|
||||
params = {
|
||||
"disk" : "Bitcoin-Qt",
|
||||
"window_bounds" : "300,300,800,620",
|
||||
"icon_size" : "96",
|
||||
"background_commands" : "",
|
||||
"items_positions" : "\n ".join(items_positions)
|
||||
}
|
||||
if fancy.has_key("window_bounds"):
|
||||
params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
|
||||
if fancy.has_key("icon_size"):
|
||||
params["icon_size"] = str(fancy["icon_size"])
|
||||
window.items[name].position.set(position)
|
||||
disk.close()
|
||||
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" """)
|
||||
params["background_commands"] = bgscript.substitute({"bgpic" : os.path.basename(bg_path), "disk" : params["disk"]})
|
||||
|
||||
s = appscript.substitute(params)
|
||||
if verbose >= 2:
|
||||
print("Running AppleScript:")
|
||||
print(s)
|
||||
|
||||
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
|
||||
p.communicate(input=s)
|
||||
if p.returncode:
|
||||
print("Error running osascript.")
|
||||
|
||||
subprocess.call(["SetFile", "-a", "V", bg_path])
|
||||
disk.update(registering_applications=False)
|
||||
sleep(2)
|
||||
disk.eject()
|
||||
|
||||
if verbose >= 2:
|
||||
print "+ Finalizing .dmg disk image +"
|
||||
|
||||
|
||||
26
contrib/macdeploy/notes.txt
Normal file
26
contrib/macdeploy/notes.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
macdeployqtplus works best on OS X Lion, for Snow Leopard you'd need to install
|
||||
Python 2.7 and make it your default Python installation.
|
||||
|
||||
You will need the appscript package for the fancy disk image creation to work.
|
||||
Install it by invoking "sudo easy_install appscript".
|
||||
|
||||
Ths script should be invoked in the target directory like this:
|
||||
$source_dir/contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr de,es,ru -dmg -fancy $source_dir/contrib/macdeploy/fancy.plist
|
||||
|
||||
During the process, the disk image window will pop up briefly where the fancy
|
||||
settings are applied. This is normal, please do not interfere.
|
||||
|
||||
You can also set up Qt Creator for invoking the script. For this, go to the
|
||||
"Projects" tab on the left side, switch to "Run Settings" above and add a
|
||||
deploy configuration. Next add a deploy step choosing "Custom Process Step".
|
||||
Fill in the following.
|
||||
|
||||
Enable custom process step: [x]
|
||||
Command: %{sourceDir}/contrib/macdeploy/macdeployqtplus
|
||||
Working directory: %{buildDir}
|
||||
Command arguments: Bitcoin-Qt.app -add-qt-tr de,ru -dmg -fancy %{sourceDir}/contrib/macdeploy/fancy.plist
|
||||
|
||||
After that you can start the deployment process through the menu with
|
||||
Build -> Deploy Project "bitcoin-qt"
|
||||
|
||||
43
contrib/miniupnpc/Portfile
Normal file
43
contrib/miniupnpc/Portfile
Normal file
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
|
||||
# $Id$
|
||||
|
||||
PortSystem 1.0
|
||||
|
||||
name miniupnpc
|
||||
epoch 2
|
||||
version 1.6
|
||||
revision 2
|
||||
categories net
|
||||
platforms darwin
|
||||
license BSD
|
||||
maintainers singingwolfboy openmaintainer
|
||||
description Lightweight client for UPnP protocol
|
||||
long_description \
|
||||
${description}
|
||||
|
||||
homepage http://miniupnp.free.fr/
|
||||
master_sites http://miniupnp.free.fr/files/download.php?file=${distname}${extract.suffix}&dummy=
|
||||
checksums md5 88055f2d4a061cfd4cfe25a9eae22f67 \
|
||||
sha1 ef8f2edb17f2e7c5b8dc67ee80a65c199d823e0a \
|
||||
rmd160 d86b75b331a3fb5525c71708548f311977c0598f
|
||||
|
||||
use_configure no
|
||||
|
||||
variant universal {}
|
||||
if {[variant_isset universal]} {
|
||||
set archflags ${configure.universal_cflags}
|
||||
} else {
|
||||
set archflags ${configure.cc_archflags}
|
||||
}
|
||||
|
||||
build.args-append CC="${configure.cc} ${archflags}"
|
||||
|
||||
post-patch {
|
||||
reinplace "s|-Wl,-install_name,|-Wl,-install_name,${prefix}/lib/|" ${worksrcpath}/Makefile
|
||||
}
|
||||
|
||||
destroot.destdir PREFIX=${prefix} INSTALLPREFIX=${destroot}${prefix}
|
||||
|
||||
livecheck.type regex
|
||||
livecheck.url http://miniupnp.free.fr/files/
|
||||
livecheck.regex ${name}-(\\d+(\\.\\d{1,4})+)${extract.suffix}
|
||||
6
contrib/pyminer/README
Normal file
6
contrib/pyminer/README
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
This is a 'getwork' CPU mining client for bitcoin.
|
||||
|
||||
It is pure-python, and therefore very, very slow. The purpose is to
|
||||
provide a reference implementation of a miner, for study.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
### PyMiner ###
|
||||
|
||||
This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow. The purpose is to provide a reference implementation of a miner, for study.
|
||||
|
||||
### Other Resources ###
|
||||
|
||||
- [BitcoinTalk Thread](https://bitcointalk.org/index.php?topic=3546.0)
|
||||
- [Jgarzik Repo](https://github.com/jgarzik/pyminer)
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2011 The Bitcoin developers
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
||||
import time
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
### Qos ###
|
||||
|
||||
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN (defined as 192.168.x.x).
|
||||
|
||||
This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
|
||||
@@ -1,41 +0,0 @@
|
||||
#network interface on which to limit traffic
|
||||
IF="eth0"
|
||||
#limit of the network interface in question
|
||||
LINKCEIL="1gbit"
|
||||
#limit outbound Bitcoin protocol traffic to this rate
|
||||
LIMIT="160kbit"
|
||||
#defines the address space for which you wish to disable rate limiting
|
||||
LOCALNET="192.168.0.0/16"
|
||||
|
||||
#delete existing rules
|
||||
tc qdisc del dev ${IF} root
|
||||
|
||||
#add root class
|
||||
tc qdisc add dev ${IF} root handle 1: htb default 10
|
||||
|
||||
#add parent class
|
||||
tc class add dev ${IF} parent 1: classid 1:1 htb rate ${LINKCEIL} ceil ${LINKCEIL}
|
||||
|
||||
#add our two classes. one unlimited, another limited
|
||||
tc class add dev ${IF} parent 1:1 classid 1:10 htb rate ${LINKCEIL} ceil ${LINKCEIL} prio 0
|
||||
tc class add dev ${IF} parent 1:1 classid 1:11 htb rate ${LIMIT} ceil ${LIMIT} prio 1
|
||||
|
||||
#add handles to our classes so packets marked with <x> go into the class with "... handle <x> fw ..."
|
||||
tc filter add dev ${IF} parent 1: protocol ip prio 1 handle 1 fw classid 1:10
|
||||
tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
|
||||
|
||||
#delete any existing rules
|
||||
#disable for now
|
||||
#ret=0
|
||||
#while [ $ret -eq 0 ]; do
|
||||
# iptables -t mangle -D OUTPUT 1
|
||||
# ret=$?
|
||||
#done
|
||||
|
||||
#limit outgoing traffic to and from port 8333. but not when dealing with a host on the local network
|
||||
# (defined by $LOCALNET)
|
||||
# --set-mark marks packages matching these criteria with the number "2"
|
||||
# these packages are filtered by the tc filter with "handle 2"
|
||||
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
|
||||
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
|
||||
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
|
||||
@@ -1,11 +0,0 @@
|
||||
### Seeds ###
|
||||
|
||||
Utility to generate the pnSeed[] array that is compiled into the client
|
||||
(see [src/net.cpp](/src/net.cpp)).
|
||||
|
||||
The 600 seeds compiled into the 0.8 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).
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Generate pnSeed[] from Pieter's DNS seeder
|
||||
#
|
||||
|
||||
NSEEDS=600
|
||||
|
||||
import re
|
||||
import sys
|
||||
from subprocess import check_output
|
||||
|
||||
def main():
|
||||
lines = sys.stdin.readlines()
|
||||
|
||||
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)
|
||||
if m is None:
|
||||
continue
|
||||
ip = 0
|
||||
for i in range(0,4):
|
||||
ip = ip + (int(m.group(i+1)) << (8*(i)))
|
||||
if ip == 0:
|
||||
continue
|
||||
ips.append(ip)
|
||||
|
||||
for row in range(0, min(NSEEDS,len(ips)), 8):
|
||||
print " " + ", ".join([ "0x%08x"%i for i in ips[row:row+8] ]) + ","
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,35 +0,0 @@
|
||||
### SpendFrom ###
|
||||
|
||||
Use the raw transactions API to send coins received on a particular
|
||||
address (or addresses).
|
||||
|
||||
### Usage: ###
|
||||
Depends on [jsonrpc](http://json-rpc.org/).
|
||||
|
||||
spendfrom.py --from=FROMADDRESS1[,FROMADDRESS2] --to=TOADDRESS --amount=amount \
|
||||
--fee=fee --datadir=/path/to/.bitcoin --testnet --dry_run
|
||||
|
||||
With no arguments, outputs a list of amounts associated with addresses.
|
||||
|
||||
With arguments, sends coins received by the `FROMADDRESS` addresses to the `TOADDRESS`.
|
||||
|
||||
### Notes ###
|
||||
|
||||
- You may explicitly specify how much fee to pay (a fee more than 1% of the amount
|
||||
will fail, though, to prevent bitcoin-losing accidents). Spendfrom may fail if
|
||||
it thinks the transaction would never be confirmed (if the amount being sent is
|
||||
too small, or if the transaction is too many bytes for the fee).
|
||||
|
||||
- If a change output needs to be created, the change will be sent to the last
|
||||
`FROMADDRESS` (if you specify just one `FROMADDRESS`, change will go back to it).
|
||||
|
||||
- If `--datadir` is not specified, the default datadir is used.
|
||||
|
||||
- The `--dry_run` option will just create and sign the transaction and print
|
||||
the transaction data (as hexadecimal), instead of broadcasting it.
|
||||
|
||||
- If the transaction is created and broadcast successfully, a transaction id
|
||||
is printed.
|
||||
|
||||
- If this was a tool for end-users and not programmers, it would have much friendlier
|
||||
error-handling.
|
||||
@@ -1,9 +0,0 @@
|
||||
from distutils.core import setup
|
||||
setup(name='btcspendfrom',
|
||||
version='1.0',
|
||||
description='Command-line utility for bitcoin "coin control"',
|
||||
author='Gavin Andresen',
|
||||
author_email='gavin@bitcoinfoundation.org',
|
||||
requires=['jsonrpc'],
|
||||
scripts=['spendfrom.py'],
|
||||
)
|
||||
@@ -1,267 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Use the raw transactions API to spend bitcoins received on particular addresses,
|
||||
# and send any change back to that same address.
|
||||
#
|
||||
# Example usage:
|
||||
# spendfrom.py # Lists available funds
|
||||
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
|
||||
#
|
||||
# Assumes it will talk to a bitcoind or Bitcoin-Qt running
|
||||
# on localhost.
|
||||
#
|
||||
# Depends on jsonrpc
|
||||
#
|
||||
|
||||
from decimal import *
|
||||
import getpass
|
||||
import math
|
||||
import os
|
||||
import os.path
|
||||
import platform
|
||||
import sys
|
||||
import time
|
||||
from jsonrpc import ServiceProxy, json
|
||||
|
||||
BASE_FEE=Decimal("0.001")
|
||||
|
||||
def check_json_precision():
|
||||
"""Make sure json library being used does not lose precision converting BTC values"""
|
||||
n = Decimal("20000000.00000003")
|
||||
satoshis = int(json.loads(json.dumps(float(n)))*1.0e8)
|
||||
if satoshis != 2000000000000003:
|
||||
raise RuntimeError("JSON encode/decode loses precision")
|
||||
|
||||
def determine_db_dir():
|
||||
"""Return the default location of the bitcoin data directory"""
|
||||
if platform.system() == "Darwin":
|
||||
return os.path.expanduser("~/Library/Application Support/Bitcoin/")
|
||||
elif platform.system() == "Windows":
|
||||
return os.path.join(os.environ['APPDATA'], "Bitcoin")
|
||||
return os.path.expanduser("~/.bitcoin")
|
||||
|
||||
def read_bitcoin_config(dbdir):
|
||||
"""Read the bitcoin.conf file from dbdir, returns dictionary of settings"""
|
||||
from ConfigParser import SafeConfigParser
|
||||
|
||||
class FakeSecHead(object):
|
||||
def __init__(self, fp):
|
||||
self.fp = fp
|
||||
self.sechead = '[all]\n'
|
||||
def readline(self):
|
||||
if self.sechead:
|
||||
try: return self.sechead
|
||||
finally: self.sechead = None
|
||||
else:
|
||||
s = self.fp.readline()
|
||||
if s.find('#') != -1:
|
||||
s = s[0:s.find('#')].strip() +"\n"
|
||||
return s
|
||||
|
||||
config_parser = SafeConfigParser()
|
||||
config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "bitcoin.conf"))))
|
||||
return dict(config_parser.items("all"))
|
||||
|
||||
def connect_JSON(config):
|
||||
"""Connect to a bitcoin JSON-RPC server"""
|
||||
testnet = config.get('testnet', '0')
|
||||
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
|
||||
if not 'rpcport' in config:
|
||||
config['rpcport'] = 18332 if testnet else 8332
|
||||
connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
|
||||
try:
|
||||
result = ServiceProxy(connect)
|
||||
# ServiceProxy is lazy-connect, so send an RPC command mostly to catch connection errors,
|
||||
# but also make sure the bitcoind we're talking to is/isn't testnet:
|
||||
if result.getmininginfo()['testnet'] != testnet:
|
||||
sys.stderr.write("RPC server at "+connect+" testnet setting mismatch\n")
|
||||
sys.exit(1)
|
||||
return result
|
||||
except:
|
||||
sys.stderr.write("Error connecting to RPC server at "+connect+"\n")
|
||||
sys.exit(1)
|
||||
|
||||
def unlock_wallet(bitcoind):
|
||||
info = bitcoind.getinfo()
|
||||
if 'unlocked_until' not in info:
|
||||
return True # wallet is not encrypted
|
||||
t = int(info['unlocked_until'])
|
||||
if t <= time.time():
|
||||
try:
|
||||
passphrase = getpass.getpass("Wallet is locked; enter passphrase: ")
|
||||
bitcoind.walletpassphrase(passphrase, 5)
|
||||
except:
|
||||
sys.stderr.write("Wrong passphrase\n")
|
||||
|
||||
info = bitcoind.getinfo()
|
||||
return int(info['unlocked_until']) > time.time()
|
||||
|
||||
def list_available(bitcoind):
|
||||
address_summary = dict()
|
||||
|
||||
address_to_account = dict()
|
||||
for info in bitcoind.listreceivedbyaddress(0):
|
||||
address_to_account[info["address"]] = info["account"]
|
||||
|
||||
unspent = bitcoind.listunspent(0)
|
||||
for output in unspent:
|
||||
# listunspent doesn't give addresses, so:
|
||||
rawtx = bitcoind.getrawtransaction(output['txid'], 1)
|
||||
vout = rawtx["vout"][output['vout']]
|
||||
pk = vout["scriptPubKey"]
|
||||
|
||||
# This code only deals with ordinary pay-to-bitcoin-address
|
||||
# or pay-to-script-hash outputs right now; anything exotic is ignored.
|
||||
if pk["type"] != "pubkeyhash" and pk["type"] != "scripthash":
|
||||
continue
|
||||
|
||||
address = pk["addresses"][0]
|
||||
if address in address_summary:
|
||||
address_summary[address]["total"] += vout["value"]
|
||||
address_summary[address]["outputs"].append(output)
|
||||
else:
|
||||
address_summary[address] = {
|
||||
"total" : vout["value"],
|
||||
"outputs" : [output],
|
||||
"account" : address_to_account.get(address, "")
|
||||
}
|
||||
|
||||
return address_summary
|
||||
|
||||
def select_coins(needed, inputs):
|
||||
# Feel free to improve this, this is good enough for my simple needs:
|
||||
outputs = []
|
||||
have = Decimal("0.0")
|
||||
n = 0
|
||||
while have < needed and n < len(inputs):
|
||||
outputs.append({ "txid":inputs[n]["txid"], "vout":inputs[n]["vout"]})
|
||||
have += inputs[n]["amount"]
|
||||
n += 1
|
||||
return (outputs, have-needed)
|
||||
|
||||
def create_tx(bitcoind, fromaddresses, toaddress, amount, fee):
|
||||
all_coins = list_available(bitcoind)
|
||||
|
||||
total_available = Decimal("0.0")
|
||||
needed = amount+fee
|
||||
potential_inputs = []
|
||||
for addr in fromaddresses:
|
||||
if addr not in all_coins:
|
||||
continue
|
||||
potential_inputs.extend(all_coins[addr]["outputs"])
|
||||
total_available += all_coins[addr]["total"]
|
||||
|
||||
if total_available < needed:
|
||||
sys.stderr.write("Error, only %f BTC available, need %f\n"%(total_available, needed));
|
||||
sys.exit(1)
|
||||
|
||||
#
|
||||
# Note:
|
||||
# Python's json/jsonrpc modules have inconsistent support for Decimal numbers.
|
||||
# Instead of wrestling with getting json.dumps() (used by jsonrpc) to encode
|
||||
# Decimals, I'm casting amounts to float before sending them to bitcoind.
|
||||
#
|
||||
outputs = { toaddress : float(amount) }
|
||||
(inputs, change_amount) = select_coins(needed, potential_inputs)
|
||||
if change_amount > BASE_FEE: # don't bother with zero or tiny change
|
||||
change_address = fromaddresses[-1]
|
||||
if change_address in outputs:
|
||||
outputs[change_address] += float(change_amount)
|
||||
else:
|
||||
outputs[change_address] = float(change_amount)
|
||||
|
||||
rawtx = bitcoind.createrawtransaction(inputs, outputs)
|
||||
signed_rawtx = bitcoind.signrawtransaction(rawtx)
|
||||
if not signed_rawtx["complete"]:
|
||||
sys.stderr.write("signrawtransaction failed\n")
|
||||
sys.exit(1)
|
||||
txdata = signed_rawtx["hex"]
|
||||
|
||||
return txdata
|
||||
|
||||
def compute_amount_in(bitcoind, txinfo):
|
||||
result = Decimal("0.0")
|
||||
for vin in txinfo['vin']:
|
||||
in_info = bitcoind.getrawtransaction(vin['txid'], 1)
|
||||
vout = in_info['vout'][vin['vout']]
|
||||
result = result + vout['value']
|
||||
return result
|
||||
|
||||
def compute_amount_out(txinfo):
|
||||
result = Decimal("0.0")
|
||||
for vout in txinfo['vout']:
|
||||
result = result + vout['value']
|
||||
return result
|
||||
|
||||
def sanity_test_fee(bitcoind, txdata_hex, max_fee):
|
||||
class FeeError(RuntimeError):
|
||||
pass
|
||||
try:
|
||||
txinfo = bitcoind.decoderawtransaction(txdata_hex)
|
||||
total_in = compute_amount_in(bitcoind, txinfo)
|
||||
total_out = compute_amount_out(txinfo)
|
||||
if total_in-total_out > max_fee:
|
||||
raise FeeError("Rejecting transaction, unreasonable fee of "+str(total_in-total_out))
|
||||
|
||||
tx_size = len(txdata_hex)/2
|
||||
kb = tx_size/1000 # integer division rounds down
|
||||
if kb > 1 and fee < BASE_FEE:
|
||||
raise FeeError("Rejecting no-fee transaction, larger than 1000 bytes")
|
||||
if total_in < 0.01 and fee < BASE_FEE:
|
||||
raise FeeError("Rejecting no-fee, tiny-amount transaction")
|
||||
# Exercise for the reader: compute transaction priority, and
|
||||
# warn if this is a very-low-priority transaction
|
||||
|
||||
except FeeError as err:
|
||||
sys.stderr.write((str(err)+"\n"))
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
import optparse
|
||||
|
||||
parser = optparse.OptionParser(usage="%prog [options]")
|
||||
parser.add_option("--from", dest="fromaddresses", default=None,
|
||||
help="addresses to get bitcoins from")
|
||||
parser.add_option("--to", dest="to", default=None,
|
||||
help="address to get send bitcoins to")
|
||||
parser.add_option("--amount", dest="amount", default=None,
|
||||
help="amount to send")
|
||||
parser.add_option("--fee", dest="fee", default="0.0",
|
||||
help="fee to include")
|
||||
parser.add_option("--datadir", dest="datadir", default=determine_db_dir(),
|
||||
help="location of bitcoin.conf file with RPC username/password (default: %default)")
|
||||
parser.add_option("--testnet", dest="testnet", default=False, action="store_true",
|
||||
help="Use the test network")
|
||||
parser.add_option("--dry_run", dest="dry_run", default=False, action="store_true",
|
||||
help="Don't broadcast the transaction, just create and print the transaction data")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
check_json_precision()
|
||||
config = read_bitcoin_config(options.datadir)
|
||||
if options.testnet: config['testnet'] = True
|
||||
bitcoind = connect_JSON(config)
|
||||
|
||||
if options.amount is None:
|
||||
address_summary = list_available(bitcoind)
|
||||
for address,info in address_summary.iteritems():
|
||||
n_transactions = len(info['outputs'])
|
||||
if n_transactions > 1:
|
||||
print("%s %.8f %s (%d transactions)"%(address, info['total'], info['account'], n_transactions))
|
||||
else:
|
||||
print("%s %.8f %s"%(address, info['total'], info['account']))
|
||||
else:
|
||||
fee = Decimal(options.fee)
|
||||
amount = Decimal(options.amount)
|
||||
while unlock_wallet(bitcoind) == False:
|
||||
pass # Keep asking for passphrase until they get it right
|
||||
txdata = create_tx(bitcoind, options.fromaddresses.split(","), options.to, amount, fee)
|
||||
sanity_test_fee(bitcoind, txdata, amount*Decimal("0.01"))
|
||||
if options.dry_run:
|
||||
print(txdata)
|
||||
else:
|
||||
txid = bitcoind.sendrawtransaction(txdata)
|
||||
print(txid)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,7 +0,0 @@
|
||||
### Test Patches ###
|
||||
|
||||
These patches are applied when the automated pull-tester
|
||||
tests each pull and when master is tested using jenkins.
|
||||
You can find more information about the tests run at
|
||||
[http://jenkins.bluematt.me/pull-tester/files/
|
||||
](http://jenkins.bluematt.me/pull-tester/files/)
|
||||
@@ -1,20 +0,0 @@
|
||||
commit cfae26916dba311f6f75d444301c1f9362267c3e
|
||||
Author: Matt Corallo <git@bluematt.me>
|
||||
Date: Sun Mar 24 20:45:50 2013 -0400
|
||||
|
||||
Revert "Checkpoint at first block in 11 March chain fork"
|
||||
|
||||
This reverts commit f817c496a1482d05b22c8e539de67f07db1c09d9.
|
||||
|
||||
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
|
||||
index 62234b9..9b11f0b 100644
|
||||
--- a/src/checkpoints.cpp
|
||||
+++ b/src/checkpoints.cpp
|
||||
@@ -44,7 +44,6 @@ namespace Checkpoints
|
||||
(193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
|
||||
(210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
|
||||
(216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
|
||||
- (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
|
||||
;
|
||||
static const CCheckpointData data = {
|
||||
&mapCheckpoints,
|
||||
@@ -1,8 +0,0 @@
|
||||
### TestGen ###
|
||||
|
||||
Utilities to generate test vectors for the data-driven Bitcoin tests.
|
||||
|
||||
Usage:
|
||||
|
||||
gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
|
||||
gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
|
||||
@@ -1,104 +0,0 @@
|
||||
'''
|
||||
Bitcoin base58 encoding and decoding.
|
||||
|
||||
Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain)
|
||||
'''
|
||||
import hashlib
|
||||
|
||||
# for compatibility with following code...
|
||||
class SHA256:
|
||||
new = hashlib.sha256
|
||||
|
||||
if str != bytes:
|
||||
# Python 3.x
|
||||
def ord(c):
|
||||
return c
|
||||
def chr(n):
|
||||
return bytes( (n,) )
|
||||
|
||||
__b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
||||
__b58base = len(__b58chars)
|
||||
b58chars = __b58chars
|
||||
|
||||
def b58encode(v):
|
||||
""" encode v, which is a string of bytes, to base58.
|
||||
"""
|
||||
long_value = 0
|
||||
for (i, c) in enumerate(v[::-1]):
|
||||
long_value += (256**i) * ord(c)
|
||||
|
||||
result = ''
|
||||
while long_value >= __b58base:
|
||||
div, mod = divmod(long_value, __b58base)
|
||||
result = __b58chars[mod] + result
|
||||
long_value = div
|
||||
result = __b58chars[long_value] + result
|
||||
|
||||
# Bitcoin does a little leading-zero-compression:
|
||||
# leading 0-bytes in the input become leading-1s
|
||||
nPad = 0
|
||||
for c in v:
|
||||
if c == '\0': nPad += 1
|
||||
else: break
|
||||
|
||||
return (__b58chars[0]*nPad) + result
|
||||
|
||||
def b58decode(v, length = None):
|
||||
""" decode v into a string of len bytes
|
||||
"""
|
||||
long_value = 0
|
||||
for (i, c) in enumerate(v[::-1]):
|
||||
long_value += __b58chars.find(c) * (__b58base**i)
|
||||
|
||||
result = bytes()
|
||||
while long_value >= 256:
|
||||
div, mod = divmod(long_value, 256)
|
||||
result = chr(mod) + result
|
||||
long_value = div
|
||||
result = chr(long_value) + result
|
||||
|
||||
nPad = 0
|
||||
for c in v:
|
||||
if c == __b58chars[0]: nPad += 1
|
||||
else: break
|
||||
|
||||
result = chr(0)*nPad + result
|
||||
if length is not None and len(result) != length:
|
||||
return None
|
||||
|
||||
return result
|
||||
|
||||
def checksum(v):
|
||||
"""Return 32-bit checksum based on SHA256"""
|
||||
return SHA256.new(SHA256.new(v).digest()).digest()[0:4]
|
||||
|
||||
def b58encode_chk(v):
|
||||
"""b58encode a string, with 32-bit checksum"""
|
||||
return b58encode(v + checksum(v))
|
||||
|
||||
def b58decode_chk(v):
|
||||
"""decode a base58 string, check and remove checksum"""
|
||||
result = b58decode(v)
|
||||
if result is None:
|
||||
return None
|
||||
h3 = checksum(result[:-4])
|
||||
if result[-4:] == checksum(result[:-4]):
|
||||
return result[:-4]
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_bcaddress_version(strAddress):
|
||||
""" Returns None if strAddress is invalid. Otherwise returns integer version of address. """
|
||||
addr = b58decode_chk(strAddress)
|
||||
if addr is None or len(addr)!=21: return None
|
||||
version = addr[0]
|
||||
return ord(version)
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Test case (from http://gitorious.org/bitcoin/python-base58.git)
|
||||
assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') is 0
|
||||
_ohai = 'o hai'.encode('ascii')
|
||||
_tmp = b58encode(_ohai)
|
||||
assert _tmp == 'DYB3oMS'
|
||||
assert b58decode(_tmp, 5) == _ohai
|
||||
print("Tests passed")
|
||||
@@ -1,126 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
'''
|
||||
Generate valid and invalid base58 address and private key test vectors.
|
||||
|
||||
Usage:
|
||||
gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
|
||||
gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
|
||||
'''
|
||||
# 2012 Wladimir J. van der Laan
|
||||
# Released under MIT License
|
||||
import os
|
||||
from itertools import islice
|
||||
from base58 import b58encode, b58decode, b58encode_chk, b58decode_chk, b58chars
|
||||
import random
|
||||
from binascii import b2a_hex
|
||||
|
||||
# key types
|
||||
PUBKEY_ADDRESS = 0
|
||||
SCRIPT_ADDRESS = 5
|
||||
PUBKEY_ADDRESS_TEST = 111
|
||||
SCRIPT_ADDRESS_TEST = 196
|
||||
PRIVKEY = 128
|
||||
PRIVKEY_TEST = 239
|
||||
|
||||
metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed']
|
||||
# templates for valid sequences
|
||||
templates = [
|
||||
# prefix, payload_size, suffix, metadata
|
||||
# None = N/A
|
||||
((PUBKEY_ADDRESS,), 20, (), (False, False, 'pubkey', None)),
|
||||
((SCRIPT_ADDRESS,), 20, (), (False, False, 'script', None)),
|
||||
((PUBKEY_ADDRESS_TEST,), 20, (), (False, True, 'pubkey', None)),
|
||||
((SCRIPT_ADDRESS_TEST,), 20, (), (False, True, 'script', None)),
|
||||
((PRIVKEY,), 32, (), (True, False, None, False)),
|
||||
((PRIVKEY,), 32, (1,), (True, False, None, True)),
|
||||
((PRIVKEY_TEST,), 32, (), (True, True, None, False)),
|
||||
((PRIVKEY_TEST,), 32, (1,), (True, True, None, True))
|
||||
]
|
||||
|
||||
def is_valid(v):
|
||||
'''Check vector v for validity'''
|
||||
result = b58decode_chk(v)
|
||||
if result is None:
|
||||
return False
|
||||
valid = False
|
||||
for template in templates:
|
||||
prefix = str(bytearray(template[0]))
|
||||
suffix = str(bytearray(template[2]))
|
||||
if result.startswith(prefix) and result.endswith(suffix):
|
||||
if (len(result) - len(prefix) - len(suffix)) == template[1]:
|
||||
return True
|
||||
return False
|
||||
|
||||
def gen_valid_vectors():
|
||||
'''Generate valid test vectors'''
|
||||
while True:
|
||||
for template in templates:
|
||||
prefix = str(bytearray(template[0]))
|
||||
payload = os.urandom(template[1])
|
||||
suffix = str(bytearray(template[2]))
|
||||
rv = b58encode_chk(prefix + payload + suffix)
|
||||
assert is_valid(rv)
|
||||
metadata = dict([(x,y) for (x,y) in zip(metadata_keys,template[3]) if y is not None])
|
||||
yield (rv, b2a_hex(payload), metadata)
|
||||
|
||||
def gen_invalid_vector(template, corrupt_prefix, randomize_payload_size, corrupt_suffix):
|
||||
'''Generate possibly invalid vector'''
|
||||
if corrupt_prefix:
|
||||
prefix = os.urandom(1)
|
||||
else:
|
||||
prefix = str(bytearray(template[0]))
|
||||
|
||||
if randomize_payload_size:
|
||||
payload = os.urandom(max(int(random.expovariate(0.5)), 50))
|
||||
else:
|
||||
payload = os.urandom(template[1])
|
||||
|
||||
if corrupt_suffix:
|
||||
suffix = os.urandom(len(template[2]))
|
||||
else:
|
||||
suffix = str(bytearray(template[2]))
|
||||
|
||||
return b58encode_chk(prefix + payload + suffix)
|
||||
|
||||
def randbool(p = 0.5):
|
||||
'''Return True with P(p)'''
|
||||
return random.random() < p
|
||||
|
||||
def gen_invalid_vectors():
|
||||
'''Generate invalid test vectors'''
|
||||
# start with some manual edge-cases
|
||||
yield "",
|
||||
yield "x",
|
||||
while True:
|
||||
# kinds of invalid vectors:
|
||||
# invalid prefix
|
||||
# invalid payload length
|
||||
# invalid (randomized) suffix (add random data)
|
||||
# corrupt checksum
|
||||
for template in templates:
|
||||
val = gen_invalid_vector(template, randbool(0.2), randbool(0.2), randbool(0.2))
|
||||
if random.randint(0,10)<1: # line corruption
|
||||
if randbool(): # add random character to end
|
||||
val += random.choice(b58chars)
|
||||
else: # replace random character in the middle
|
||||
n = random.randint(0, len(val))
|
||||
val = val[0:n] + random.choice(b58chars) + val[n+1:]
|
||||
if not is_valid(val):
|
||||
yield val,
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys, json
|
||||
iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors}
|
||||
try:
|
||||
uiter = iters[sys.argv[1]]
|
||||
except IndexError:
|
||||
uiter = gen_valid_vectors
|
||||
try:
|
||||
count = int(sys.argv[2])
|
||||
except IndexError:
|
||||
count = 0
|
||||
|
||||
data = list(islice(uiter(), count))
|
||||
json.dump(data, sys.stdout, sort_keys=True, indent=4)
|
||||
sys.stdout.write('\n')
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -d "$1" ]; then
|
||||
cd "$1"
|
||||
else
|
||||
echo "Usage: $0 <datadir>" >&2
|
||||
echo "Removes obsolete Bitcoin database files" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LEVEL=0
|
||||
if [ -f wallet.dat -a -f addr.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=1; fi
|
||||
if [ -f wallet.dat -a -f peers.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=2; fi
|
||||
if [ -f wallet.dat -a -f peers.dat -a -f coins/CURRENT -a -f blktree/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=3; fi
|
||||
if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=4; fi
|
||||
|
||||
case $LEVEL in
|
||||
0)
|
||||
echo "Error: no Bitcoin datadir detected."
|
||||
exit 1
|
||||
;;
|
||||
1)
|
||||
echo "Detected old Bitcoin datadir (before 0.7)."
|
||||
echo "Nothing to do."
|
||||
exit 0
|
||||
;;
|
||||
2)
|
||||
echo "Detected Bitcoin 0.7 datadir."
|
||||
;;
|
||||
3)
|
||||
echo "Detected Bitcoin pre-0.8 datadir."
|
||||
;;
|
||||
4)
|
||||
echo "Detected Bitcoin 0.8 datadir."
|
||||
;;
|
||||
esac
|
||||
|
||||
FILES=""
|
||||
DIRS=""
|
||||
|
||||
if [ $LEVEL -ge 3 ]; then FILES=$(echo $FILES blk????.dat blkindex.dat); fi
|
||||
if [ $LEVEL -ge 2 ]; then FILES=$(echo $FILES addr.dat); fi
|
||||
if [ $LEVEL -ge 4 ]; then DIRS=$(echo $DIRS coins blktree); fi
|
||||
|
||||
for FILE in $FILES; do
|
||||
if [ -f $FILE ]; then
|
||||
echo "Deleting: $FILE"
|
||||
rm -f $FILE
|
||||
fi
|
||||
done
|
||||
|
||||
for DIR in $DIRS; do
|
||||
if [ -d $DIR ]; then
|
||||
echo "Deleting: $DIR/"
|
||||
rm -rf $DIR
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
@@ -1,6 +0,0 @@
|
||||
### Verify SF Binaries ###
|
||||
This script attempts to download the signature file `SHA256SUMS.asc` from SourceForge.
|
||||
|
||||
It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file.
|
||||
|
||||
The script returns 0 if everything passes the checks. It returns 1 if either the signature check or the hash check doesn't pass. If an error occurs the return value is 2.
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script attempts to download the signature file SHA256SUMS.asc from SourceForge
|
||||
### It first checks if the signature passes, and then downloads the files specified in
|
||||
### the file, and checks if the hashes of these files match those that are specified
|
||||
### in the signature file.
|
||||
### The script returns 0 if everything passes the checks. It returns 1 if either the
|
||||
### signature check or the hash check doesn't pass. If an error occurs the return value is 2
|
||||
|
||||
function clean_up {
|
||||
for file in $*
|
||||
do
|
||||
rm "$file" 2> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
WORKINGDIR="/tmp/bitcoin"
|
||||
TMPFILE="hashes.tmp"
|
||||
|
||||
#this URL is used if a version number is not specified as an argument to the script
|
||||
SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.9.0rc1/SHA256SUMS.asc"
|
||||
|
||||
SIGNATUREFILENAME="SHA256SUMS.asc"
|
||||
RCSUBDIR="test/"
|
||||
BASEDIR="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/"
|
||||
VERSIONPREFIX="bitcoin-"
|
||||
RCVERSIONSTRING="rc"
|
||||
|
||||
if [ ! -d "$WORKINGDIR" ]; then
|
||||
mkdir "$WORKINGDIR"
|
||||
fi
|
||||
|
||||
cd "$WORKINGDIR"
|
||||
|
||||
#test if a version number has been passed as an argument
|
||||
if [ -n "$1" ]; then
|
||||
#let's also check if the version number includes the prefix 'bitcoin-',
|
||||
# and add this prefix if it doesn't
|
||||
if [[ $1 == "$VERSIONPREFIX"* ]]; then
|
||||
VERSION="$1"
|
||||
else
|
||||
VERSION="$VERSIONPREFIX$1"
|
||||
fi
|
||||
|
||||
#now let's see if the version string contains "rc", and strip it off if it does
|
||||
# and simultaneously add RCSUBDIR to BASEDIR, where we will look for SIGNATUREFILENAME
|
||||
if [[ $VERSION == *"$RCVERSIONSTRING"* ]]; then
|
||||
BASEDIR="$BASEDIR${VERSION/%-$RCVERSIONSTRING*}/"
|
||||
BASEDIR="$BASEDIR$RCSUBDIR"
|
||||
else
|
||||
BASEDIR="$BASEDIR$VERSION/"
|
||||
fi
|
||||
|
||||
SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME"
|
||||
else
|
||||
BASEDIR="${SIGNATUREFILE%/*}/"
|
||||
fi
|
||||
|
||||
#first we fetch the file containing the signature
|
||||
WGETOUT=$(wget -N "$BASEDIR$SIGNATUREFILENAME" 2>&1)
|
||||
|
||||
#and then see if wget completed successfully
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: couldn't fetch signature file. Have you specified the version number in the following format?"
|
||||
echo "[bitcoin-]<version>-[rc[0-9]] (example: bitcoin-0.7.1-rc1)"
|
||||
echo "wget output:"
|
||||
echo "$WGETOUT"|sed 's/^/\t/g'
|
||||
exit 2
|
||||
fi
|
||||
|
||||
#then we check it
|
||||
GPGOUT=$(gpg --yes --decrypt --output "$TMPFILE" "$SIGNATUREFILENAME" 2>&1)
|
||||
|
||||
#return value 0: good signature
|
||||
#return value 1: bad signature
|
||||
#return value 2: gpg error
|
||||
|
||||
RET="$?"
|
||||
if [ $RET -ne 0 ]; then
|
||||
if [ $RET -eq 1 ]; then
|
||||
#and notify the user if it's bad
|
||||
echo "Bad signature."
|
||||
elif [ $RET -eq 2 ]; then
|
||||
#or if a gpg error has occurred
|
||||
echo "gpg error. Do you have Gavin's code signing key installed?"
|
||||
fi
|
||||
|
||||
echo "gpg output:"
|
||||
echo "$GPGOUT"|sed 's/^/\t/g'
|
||||
clean_up $SIGNATUREFILENAME $TMPFILE
|
||||
exit "$RET"
|
||||
fi
|
||||
|
||||
#here we extract the filenames from the signature file
|
||||
FILES=$(awk '{print $2}' "$TMPFILE")
|
||||
|
||||
#and download these one by one
|
||||
for file in in $FILES
|
||||
do
|
||||
wget --quiet -N "$BASEDIR$file"
|
||||
done
|
||||
|
||||
#check hashes
|
||||
DIFF=$(diff <(sha256sum $FILES) "$TMPFILE")
|
||||
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Hashes don't match."
|
||||
echo "Offending files:"
|
||||
echo "$DIFF"|grep "^<"|awk '{print "\t"$3}'
|
||||
exit 1
|
||||
elif [ $? -gt 1 ]; then
|
||||
echo "Error executing 'diff'"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
#everything matches! clean up the mess
|
||||
clean_up $FILES $SIGNATUREFILENAME $TMPFILE
|
||||
|
||||
exit 0
|
||||
5
contrib/wallettools/walletchangepass.py
Normal file
5
contrib/wallettools/walletchangepass.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from jsonrpc import ServiceProxy
|
||||
access = ServiceProxy("http://127.0.0.1:8332")
|
||||
pwd = raw_input("Enter old wallet passphrase: ")
|
||||
pwd2 = raw_input("Enter new wallet passphrase: ")
|
||||
access.walletpassphrasechange(pwd, pwd2)
|
||||
4
contrib/wallettools/walletunlock.py
Normal file
4
contrib/wallettools/walletunlock.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from jsonrpc import ServiceProxy
|
||||
access = ServiceProxy("http://127.0.0.1:8332")
|
||||
pwd = raw_input("Enter wallet passphrase: ")
|
||||
access.walletpassphrase(pwd, 60)
|
||||
@@ -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.9.0
|
||||
PROJECT_NUMBER = 0.5.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer
|
||||
@@ -203,7 +203,7 @@ TAB_SIZE = 8
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user-defined paragraph with heading "Side Effects:".
|
||||
# You can put \n in the value part of an alias to insert newlines.
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
|
||||
33
doc/README
Normal file
33
doc/README
Normal file
@@ -0,0 +1,33 @@
|
||||
Bitcoin 0.5.3 BETA
|
||||
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
||||
completely decentralized, without the need for a central server or trusted
|
||||
parties. Users hold the crypto keys to their own money and transact directly
|
||||
with each other, with the help of a P2P network to check for double-spending.
|
||||
|
||||
|
||||
Setup
|
||||
-----
|
||||
You need the Qt4 run-time libraries to run bitcoin-qt. On Debian or Ubuntu:
|
||||
sudo apt-get install libqtgui4
|
||||
|
||||
Unpack the files into a directory and run:
|
||||
bin/32/bitcoin-qt (GUI, 32-bit)
|
||||
bin/32/bitcoind (headless, 32-bit)
|
||||
bin/64/bitcoin-qt (GUI, 64-bit)
|
||||
bin/64/bitcoind (headless, 64-bit)
|
||||
|
||||
|
||||
See the documentation at the bitcoin wiki:
|
||||
https://en.bitcoin.it/wiki/Main_Page
|
||||
for help and more information.
|
||||
@@ -1,76 +0,0 @@
|
||||
Bitcoin 0.9.0rc1 BETA
|
||||
=====================
|
||||
|
||||
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](https://bitcointalk.org/index.php?topic=145386.0).
|
||||
|
||||
Running
|
||||
---------------------
|
||||
The following are some helpful notes on how to run Bitcoin on your native platform.
|
||||
|
||||
### Unix
|
||||
|
||||
You need the Qt4 run-time libraries to run Bitcoin-Qt. On Debian or Ubuntu:
|
||||
|
||||
sudo apt-get install libqtgui4
|
||||
|
||||
Unpack the files into a directory and run:
|
||||
|
||||
- bin/32/bitcoin-qt (GUI, 32-bit) or bin/32/bitcoind (headless, 32-bit)
|
||||
- bin/64/bitcoin-qt (GUI, 64-bit) or bin/64/bitcoind (headless, 64-bit)
|
||||
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
Unpack the files into a directory, and then run bitcoin-qt.exe.
|
||||
|
||||
### OSX
|
||||
|
||||
Drag Bitcoin-Qt to your applications folder, and then run Bitcoin-Qt.
|
||||
|
||||
### Need Help?
|
||||
|
||||
* See the documentation at the [Bitcoin Wiki](https://en.bitcoin.it/wiki/Main_Page)
|
||||
for help and more information.
|
||||
* Ask for help on [#bitcoin](http://webchat.freenode.net?channels=bitcoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net?channels=bitcoin).
|
||||
* Ask for help on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Technical Support board](https://bitcointalk.org/index.php?board=4.0).
|
||||
|
||||
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)
|
||||
- [Unix Build Notes](build-unix.md)
|
||||
- [Windows Build Notes](build-msw.md)
|
||||
|
||||
Development
|
||||
---------------------
|
||||
The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/README.md) contains relevant information on the development process and automated testing.
|
||||
|
||||
- [Coding Guidelines](coding.md)
|
||||
- [Multiwallet Qt Development](multiwallet-qt.md)
|
||||
- [Release Notes](release-notes.md)
|
||||
- [Release Process](release-process.md)
|
||||
- [Source Code Documentation (External Link)](https://dev.visucore.com/bitcoin/doxygen/)
|
||||
- [Translation Process](translation_process.md)
|
||||
- [Unit Tests](unit-tests.md)
|
||||
|
||||
### Resources
|
||||
* Discuss on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Development & Technical Discussion board](https://bitcointalk.org/index.php?board=6.0).
|
||||
* Discuss on [#bitcoin-dev](http://webchat.freenode.net/?channels=bitcoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net/?channels=bitcoin-dev).
|
||||
|
||||
### Miscellaneous
|
||||
- [Assets Attribution](assets-attribution.md)
|
||||
- [Files](files.md)
|
||||
- [Tor Support](tor.md)
|
||||
|
||||
License
|
||||
---------------------
|
||||
Distributed under the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php).
|
||||
This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard.
|
||||
@@ -1,9 +1,8 @@
|
||||
Bitcoin 0.9.0rc1 BETA
|
||||
|
||||
Copyright (c) 2009-2014 Bitcoin Core Developers
|
||||
Bitcoin 0.5.3 BETA
|
||||
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com).
|
||||
@@ -21,10 +20,15 @@ Setup
|
||||
-----
|
||||
Unpack the files into a directory and run bitcoin-qt.exe.
|
||||
|
||||
Bitcoin Core is the original Bitcoin client and it builds the backbone of the network.
|
||||
However, it downloads and stores the entire history of Bitcoin transactions;
|
||||
depending on the speed of your computer and network connection, the synchronization
|
||||
process can take anywhere from a few hours to a day or more.
|
||||
If you have Microsoft Security Essentials, you need to add bitcoin.exe to its
|
||||
"Excluded processes" list. Microsoft Security Essentials->Settings tab,
|
||||
select Excluded processes, press Add, select bitcoin.exe, OK, Save changes.
|
||||
|
||||
The software automatically finds other nodes to connect to. You can
|
||||
enable Universal Plug and Play using a menu entry or set your firewall
|
||||
to forward port 8333 (TCP) to your computer so you can receive
|
||||
incoming connections. Bitcoin works without incoming connections,
|
||||
but allowing incoming connections helps the Bitcoin network.
|
||||
|
||||
See the bitcoin wiki at:
|
||||
https://en.bitcoin.it/wiki/Main_Page
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
The following is a list of assets used in the bitcoin source and their proper attribution.
|
||||
|
||||
[Wladimir van der Laan](https://github.com/laanwj)
|
||||
-----------------------
|
||||
#### Info
|
||||
* License: MIT
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
|
||||
src/qt/res/src/clock_green.svg, src/qt/res/src/clock1.svg,
|
||||
src/qt/res/src/clock2.svg, src/qt/res/src/clock3.svg,
|
||||
src/qt/res/src/clock4.svg, src/qt/res/src/clock5.svg,
|
||||
src/qt/res/src/inout.svg, src/qt/res/src/questionmark.svg
|
||||
|
||||
[David Vignoni](http://www.icon-king.com)
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Icon Pack: NUVOLA ICON THEME for KDE 3.x
|
||||
* Designer: David Vignoni (david@icon-king.com)
|
||||
* License: LGPL
|
||||
* Site: [http://www.icon-king.com/projects/nuvola](http://www.icon-king.com/projects/nuvola)
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
|
||||
src/qt/res/icons/history.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
|
||||
src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png
|
||||
|
||||
schollidesign
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Icon Pack: Human-O2
|
||||
* Designer: schollidesign
|
||||
* License: GNU/GPL
|
||||
* Site: [http://findicons.com/icon/93743/blocks_gnome_netstatus_0](http://findicons.com/icon/93743/blocks_gnome_netstatus_0)
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/connect*.png
|
||||
|
||||
md2k7
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Designer: md2k7
|
||||
* License: You are free to do with these icons as you wish, including selling, copying, modifying etc.
|
||||
* License: MIT
|
||||
* Site: [https://bitcointalk.org/index.php?topic=15276.0](https://bitcointalk.org/index.php?topic=15276.0)
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/transaction*.png
|
||||
|
||||
[Everaldo.com](http://www.everaldo.com)
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Icon Pack: Crystal SVG
|
||||
* Designer: [http://www.everaldo.com](http://www.everaldo.com)
|
||||
* License: LGPL
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/remove.png (edited)
|
||||
|
||||
Everaldo (Everaldo Coelho)
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Icon Pack: Kids
|
||||
* Designer: Everaldo (Everaldo Coelho)
|
||||
* License: GNU/GPL
|
||||
* Site: [http://findicons.com/icon/17102/reload?id=17102](http://findicons.com/icon/17102/reload?id=17102)
|
||||
|
||||
### Assets Used
|
||||
scripts/img/reload.xcf (modified), src/qt/res/movies/*.png
|
||||
|
||||
[Vignoni David](http://www.oxygen-icons.org)
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Designer: Vignoni David
|
||||
* License: Oxygen icon theme is dual licensed. You may copy it under the Creative Common Attribution-ShareAlike 3.0 License or the GNU Library General Public License.
|
||||
* Site: [http://www.oxygen-icons.org](http://www.oxygen-icons.org)
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/debugwindow.png
|
||||
|
||||
Jonas Schnelli
|
||||
-----------------------
|
||||
|
||||
### Info
|
||||
* Designer: Jonas Schnelli (based on the original bitcoin logo from Bitboy)
|
||||
* License: MIT
|
||||
|
||||
### Assets Used
|
||||
src/qt/res/icons/bitcoin.icns, src/qt/res/src/bitcoin.svg,
|
||||
src/qt/res/src/bitcoin.ico, src/qt/res/src/bitcoin.png,
|
||||
src/qt/res/src/bitcoin_testnet.png, docs/bitcoin_logo_doxygen.png,
|
||||
src/qt/res/icons/toolbar.png, src/qt/res/icons/toolbar_testnet.png,
|
||||
src/qt/res/images/splash.png, src/qt/res/images/splash_testnet.png
|
||||
52
doc/assets-attribution.txt
Normal file
52
doc/assets-attribution.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
Icon: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
|
||||
src/qt/res/src/*.svg
|
||||
Designer: Wladimir van der Laan
|
||||
License: MIT
|
||||
|
||||
Icon: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
|
||||
src/qt/res/icons/history.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
|
||||
src/qt/res/icons/synced.png
|
||||
Icon Pack: NUVOLA ICON THEME for KDE 3.x
|
||||
Designer: David Vignoni (david@icon-king.com)
|
||||
ICON KING - www.icon-king.com
|
||||
License: LGPL
|
||||
Site: http://www.icon-king.com/projects/nuvola/
|
||||
|
||||
Icon: src/qt/res/icons/connect*.png
|
||||
Icon Pack: Human-O2
|
||||
Designer: schollidesign
|
||||
License: GNU/GPL
|
||||
Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
|
||||
|
||||
Icon: src/qt/res/icons/transaction*.png
|
||||
Designer: md2k7
|
||||
Site: https://forum.bitcoin.org/index.php?topic=15276.0
|
||||
License: You are free to do with these icons as you wish, including selling,
|
||||
copying, modifying etc.
|
||||
|
||||
Icon: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/remove.png (edited)
|
||||
Designer: http://www.everaldo.com
|
||||
Icon Pack: Crystal SVG
|
||||
License: LGPL
|
||||
|
||||
Icon: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png
|
||||
Designer: Bitboy (optimized for 16x16 by Wladimir van der Laan)
|
||||
License: Public Domain
|
||||
Site: http://forum.bitcoin.org/?topic=1756.0
|
||||
|
||||
Icon: scripts/img/reload.xcf (modified),src/qt/res/movies/update_spinner.mng
|
||||
Icon Pack: Kids
|
||||
Designer: Everaldo (Everaldo Coelho)
|
||||
License: GNU/GPL
|
||||
Site: http://findicons.com/icon/17102/reload?id=17102
|
||||
|
||||
Image: src/qt/res/images/splash2.jpg (Wallet image)
|
||||
Designer: Crobbo (forum)
|
||||
Site: https://bitcointalk.org/index.php?topic=32273.0
|
||||
License: Public domain
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 5.6 KiB |
@@ -1,83 +0,0 @@
|
||||
WINDOWS BUILD NOTES
|
||||
===================
|
||||
|
||||
|
||||
Compilers Supported
|
||||
-------------------
|
||||
TODO: What works?
|
||||
Note: releases are cross-compiled using mingw running on Linux.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
Libraries you need to download separately and build:
|
||||
|
||||
name default path download
|
||||
--------------------------------------------------------------------------------------------------------------------
|
||||
OpenSSL \openssl-1.0.1c-mgw http://www.openssl.org/source/
|
||||
Berkeley DB \db-4.8.30.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
|
||||
Boost \boost-1.50.0-mgw http://www.boost.org/users/download/
|
||||
miniupnpc \miniupnpc-1.6-mgw http://miniupnp.tuxfamily.org/files/
|
||||
|
||||
Their licenses:
|
||||
|
||||
OpenSSL Old BSD license with the problematic advertising requirement
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
Versions used in this release:
|
||||
|
||||
OpenSSL 1.0.1c
|
||||
Berkeley DB 4.8.30.NC
|
||||
Boost 1.50.0
|
||||
miniupnpc 1.6
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
MSYS shell:
|
||||
|
||||
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
|
||||
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
|
||||
|
||||
cd /c/openssl-1.0.1c-mgw
|
||||
./config
|
||||
make
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
MSYS shell:
|
||||
|
||||
cd /c/db-4.8.30.NC-mgw/build_unix
|
||||
sh ../dist/configure --enable-mingw --enable-cxx
|
||||
make
|
||||
|
||||
Boost
|
||||
-----
|
||||
MSYS shell:
|
||||
|
||||
downloaded boost jam 3.1.18
|
||||
cd \boost-1.50.0-mgw
|
||||
bjam toolset=gcc --build-type=complete stage
|
||||
|
||||
MiniUPnPc
|
||||
---------
|
||||
UPnP support is optional, make with `USE_UPNP=` to disable it.
|
||||
|
||||
MSYS shell:
|
||||
|
||||
cd /c/miniupnpc-1.6-mgw
|
||||
make -f Makefile.mingw
|
||||
mkdir miniupnpc
|
||||
cp *.h miniupnpc/
|
||||
|
||||
Bitcoin
|
||||
-------
|
||||
MSYS shell:
|
||||
|
||||
cd \bitcoin
|
||||
sh autogen.sh
|
||||
sh configure
|
||||
mingw32-make
|
||||
strip bitcoind.exe
|
||||
84
doc/build-msw.txt
Normal file
84
doc/build-msw.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
Copyright (c) 2009-2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
See readme-qt.rst for instructions on building Bitcoin QT, the
|
||||
graphical user interface.
|
||||
|
||||
WINDOWS BUILD NOTES
|
||||
===================
|
||||
|
||||
Compilers Supported
|
||||
-------------------
|
||||
TODO: What works?
|
||||
Note: releases are cross-compiled using mingw running on Linux.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
Libraries you need to download separately and build:
|
||||
|
||||
default path download
|
||||
OpenSSL \openssl-1.0.0d-mgw http://www.openssl.org/source/
|
||||
Berkeley DB \db-4.8.30.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
|
||||
Boost \boost-1.47.0-mgw http://www.boost.org/users/download/
|
||||
miniupnpc \miniupnpc-1.6-mgw http://miniupnp.tuxfamily.org/files/
|
||||
|
||||
Their licenses:
|
||||
OpenSSL Old BSD license with the problematic advertising requirement
|
||||
Berkeley DB New BSD license with additional requirement that linked software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
Versions used in this release:
|
||||
OpenSSL 1.0.0e
|
||||
Berkeley DB 4.8.30.NC
|
||||
Boost 1.47.0
|
||||
miniupnpc 1.6
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
MSYS shell:
|
||||
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
|
||||
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
|
||||
|
||||
cd /c/openssl-1.0.0e-mgw
|
||||
./config
|
||||
make
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
MSYS shell:
|
||||
cd /c/db-4.8.30.NC-mgw/build_unix
|
||||
sh ../dist/configure --enable-mingw --enable-cxx
|
||||
make
|
||||
|
||||
Boost
|
||||
-----
|
||||
DOS prompt:
|
||||
downloaded boost jam 3.1.18
|
||||
cd \boost-1.47.0-mgw
|
||||
bjam toolset=gcc --build-type=complete stage
|
||||
|
||||
MiniUPnPc
|
||||
---------
|
||||
UPnP support is optional, make with USE_UPNP= to disable it.
|
||||
|
||||
MSYS shell:
|
||||
cd /c/miniupnpc-1.6-mgw
|
||||
make -f Makefile.mingw
|
||||
mkdir miniupnpc
|
||||
cp *.h miniupnpc/
|
||||
|
||||
Bitcoin
|
||||
-------
|
||||
DOS prompt:
|
||||
cd \bitcoin\src
|
||||
mingw32-make -f makefile.mingw
|
||||
strip bitcoind.exe
|
||||
160
doc/build-osx.md
160
doc/build-osx.md
@@ -1,160 +0,0 @@
|
||||
Mac OS X Build Instructions and Notes
|
||||
====================================
|
||||
This guide will show you how to build bitcoind(headless client) for OSX.
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
* Tested on OS X 10.6 through 10.9 on 64-bit Intel processors only.
|
||||
Older OSX releases or 32-bit processors are no longer supported.
|
||||
|
||||
* All of the commands should be executed in a Terminal application. The
|
||||
built-in one is located in `/Applications/Utilities`.
|
||||
|
||||
Preparation
|
||||
-----------
|
||||
|
||||
You need to install XCode with all the options checked so that the compiler
|
||||
and everything is available in /usr not just /Developer. XCode should be
|
||||
available on your OS X installation media, but if not, you can get the
|
||||
current version from https://developer.apple.com/xcode/. If you install
|
||||
Xcode 4.3 or later, you'll need to install its command line tools. This can
|
||||
be done in `Xcode > Preferences > Downloads > Components` and generally must
|
||||
be re-done or updated every time Xcode is updated.
|
||||
|
||||
There's an assumption that you already have `git` installed, as well. If
|
||||
not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
|
||||
(OS X 10.7+) or
|
||||
[Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
|
||||
available via Homebrew or MacPorts.
|
||||
|
||||
You will also need to install [Homebrew](http://brew.sh)
|
||||
or [MacPorts](https://www.macports.org/) in order to install library
|
||||
dependencies. It's largely a religious decision which to choose, but, as of
|
||||
December 2012, MacPorts is a little easier because you can just install the
|
||||
dependencies immediately - no other work required. If you're unsure, read
|
||||
the instructions through first in order to assess what you want to do.
|
||||
Homebrew is a little more popular among those newer to OS X.
|
||||
|
||||
The installation of the actual dependencies is covered in the Instructions
|
||||
sections below.
|
||||
|
||||
Instructions: MacPorts
|
||||
----------------------
|
||||
|
||||
### Install dependencies
|
||||
|
||||
Installing the dependencies using MacPorts is very straightforward.
|
||||
|
||||
sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake
|
||||
|
||||
Optional: install Qt4
|
||||
|
||||
sudo port install qt4-mac qrencode protobuf-cpp
|
||||
|
||||
### Building `bitcoind`
|
||||
|
||||
1. Clone the github tree to get the source code and go into the directory.
|
||||
|
||||
git clone git@github.com:bitcoin/bitcoin.git bitcoin
|
||||
cd bitcoin
|
||||
|
||||
2. Build bitcoind (and Bitcoin-Qt, if configured):
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
3. It is a good idea to build and run the unit tests, too:
|
||||
|
||||
make check
|
||||
|
||||
Instructions: Homebrew
|
||||
----------------------
|
||||
|
||||
#### Install dependencies using Homebrew
|
||||
|
||||
brew install autoconf automake berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt
|
||||
|
||||
Note: After you have installed the dependencies, you should check that the Homebrew installed version of OpenSSL is the one available for compilation. You can check this by typing
|
||||
|
||||
openssl version
|
||||
|
||||
into Terminal. You should see OpenSSL 1.0.1f 6 Jan 2014.
|
||||
|
||||
If not, you can ensure that the Homebrew OpenSSL is correctly linked by running
|
||||
|
||||
brew link openssl --force
|
||||
|
||||
Rerunning "openssl version" should now return the correct version.
|
||||
|
||||
### Building `bitcoind`
|
||||
|
||||
1. Clone the github tree to get the source code and go into the directory.
|
||||
|
||||
git clone https://github.com/bitcoin/bitcoin.git
|
||||
cd bitcoin
|
||||
|
||||
2. Build bitcoind:
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
3. It is a good idea to build and run the unit tests, too:
|
||||
|
||||
make check
|
||||
|
||||
Creating a release build
|
||||
------------------------
|
||||
You can ignore this section if you are building `bitcoind` for your own use.
|
||||
|
||||
bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Qt.app bundle.
|
||||
|
||||
If you are building `bitcoind` or `Bitcoin-Qt` for others, your build machine should be set up
|
||||
as follows for maximum compatibility:
|
||||
|
||||
All dependencies should be compiled with these flags:
|
||||
|
||||
-mmacosx-version-min=10.6
|
||||
-arch x86_64
|
||||
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
|
||||
|
||||
For MacPorts, that means editing your macports.conf and setting
|
||||
`macosx_deployment_target` and `build_arch`:
|
||||
|
||||
macosx_deployment_target=10.6
|
||||
build_arch=x86_64
|
||||
|
||||
... and then uninstalling and re-installing, or simply rebuilding, all ports.
|
||||
|
||||
As of December 2012, the `boost` port does not obey `macosx_deployment_target`.
|
||||
Download `http://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
|
||||
for a fix.
|
||||
|
||||
Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
|
||||
bundle is packaged and signed to create the .dmg disk image that is distributed.
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
It's now available at `./bitcoind`, provided that you are still in the `src`
|
||||
directory. We have to first create the RPC configuration file, though.
|
||||
|
||||
Run `./bitcoind` to get the filename where it should be put, or just try these
|
||||
commands:
|
||||
|
||||
echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
||||
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
||||
|
||||
When next you run it, it will start downloading the blockchain, but it won't
|
||||
output anything while it's doing this. This process may take several hours;
|
||||
you can monitor its process by looking at the debug.log file, like this:
|
||||
|
||||
tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
|
||||
|
||||
Other commands:
|
||||
|
||||
./bitcoind -daemon # to start the bitcoin daemon.
|
||||
./bitcoin-cli --help # for a list of command-line options.
|
||||
./bitcoin-cli help # When the daemon is running, to get a list of RPC commands
|
||||
56
doc/build-osx.txt
Normal file
56
doc/build-osx.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
Copyright (c) 2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying file
|
||||
license.txt or http://www.opensource.org/licenses/mit-license.php. This
|
||||
product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic
|
||||
software written by Eric Young (eay@cryptsoft.com) and UPnP software written by
|
||||
Thomas Bernard.
|
||||
|
||||
|
||||
Mac OS X bitcoind build instructions
|
||||
Laszlo Hanyecz <solar@heliacal.net>
|
||||
Douglas Huff <dhuff@jrbobdobbs.org>
|
||||
|
||||
|
||||
See readme-qt.rst for instructions on building Bitcoin QT, the
|
||||
graphical user interface.
|
||||
|
||||
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
|
||||
|
||||
All of the commands should be executed in Terminal.app.. it's in
|
||||
/Applications/Utilities
|
||||
|
||||
You need to install XCode with all the options checked so that the compiler and
|
||||
everything is available in /usr not just /Developer I think it comes on the DVD
|
||||
but you can get the current version from http://developer.apple.com
|
||||
|
||||
|
||||
1. Clone the github tree to get the source code:
|
||||
|
||||
git clone git@github.com:bitcoin/bitcoin.git bitcoin
|
||||
|
||||
2. Download and install MacPorts from http://www.macports.org/
|
||||
|
||||
2a. (for 10.7 Lion)
|
||||
Edit /opt/local/etc/macports/macports.conf and uncomment "build_arch i386"
|
||||
|
||||
3. Install dependencies from MacPorts
|
||||
|
||||
sudo port install boost db48 openssl
|
||||
|
||||
Install the right version of miniupnpc:
|
||||
pushd bitcoin/contrib/minipupnpc; sudo port install; popd
|
||||
(this will be unnecessary soon, you will just port install miniupnpc
|
||||
along with the rest of the dependencies).
|
||||
|
||||
4. Now you should be able to build bitcoind:
|
||||
|
||||
cd bitcoin/src
|
||||
make -f makefile.osx
|
||||
|
||||
Run:
|
||||
./bitcoind --help # for a list of command-line options.
|
||||
Run
|
||||
./bitcoind -daemon # to start the bitcoin daemon.
|
||||
Run
|
||||
./bitcoind help # When the daemon is running, to get a list of RPC commands
|
||||
@@ -1,217 +0,0 @@
|
||||
UNIX BUILD NOTES
|
||||
====================
|
||||
Some notes on how to build Bitcoin in Unix.
|
||||
|
||||
To Build
|
||||
---------------------
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
This will build bitcoin-qt as well if the dependencies are met.
|
||||
|
||||
Dependencies
|
||||
---------------------
|
||||
|
||||
Library Purpose Description
|
||||
------- ------- -----------
|
||||
libssl SSL Support Secure communications
|
||||
libdb4.8 Berkeley DB Wallet storage
|
||||
libboost Boost C++ Library
|
||||
miniupnpc UPnP Support Optional firewall-jumping support
|
||||
qt GUI GUI toolkit
|
||||
protobuf Payments in GUI Data interchange format used for payment protocol
|
||||
libqrencode QR codes in GUI Optional for generating QR codes
|
||||
|
||||
[miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping. It can be downloaded from [here](
|
||||
http://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
|
||||
turned off by default. See the configure options for upnp behavior desired:
|
||||
|
||||
--with-miniupnpc No UPnP support miniupnp not required
|
||||
--disable-upnp-default (the default) UPnP support turned off by default at runtime
|
||||
--enable-upnp-default UPnP support turned on by default at runtime
|
||||
|
||||
IPv6 support may be disabled by setting:
|
||||
|
||||
--disable-ipv6 Disable IPv6 support
|
||||
|
||||
Licenses of statically linked libraries:
|
||||
Berkeley DB New BSD license with additional requirement that linked
|
||||
software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
- Versions used in this release:
|
||||
- GCC 4.3.3
|
||||
- OpenSSL 1.0.1c
|
||||
- Berkeley DB 4.8.30.NC
|
||||
- Boost 1.37
|
||||
- miniupnpc 1.6
|
||||
- qt 4.8.3
|
||||
- protobuf 2.5.0
|
||||
- libqrencode 3.2.0
|
||||
|
||||
Dependency Build Instructions: Ubuntu & Debian
|
||||
----------------------------------------------
|
||||
Build requirements:
|
||||
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libtool autotools-dev autoconf
|
||||
sudo apt-get install libssl-dev
|
||||
|
||||
for Ubuntu 12.04 and later:
|
||||
|
||||
sudo apt-get install libboost-all-dev
|
||||
|
||||
db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
|
||||
You can add the repository using the following command:
|
||||
|
||||
sudo add-apt-repository ppa:bitcoin/bitcoin
|
||||
sudo apt-get update
|
||||
|
||||
Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev,
|
||||
but using these will break binary wallet compatibility, and is not recommended.
|
||||
|
||||
for Ubuntu 13.10:
|
||||
libboost1.54-all-dev will not work. Remove libboost1.54-all-dev and install libboost1.53-all-dev
|
||||
|
||||
for Debian 7 (Wheezy) and later:
|
||||
The oldstable repository contains db4.8 packages.
|
||||
Add the following line to /etc/apt/sources.list,
|
||||
replacing [mirror] with any official debian mirror.
|
||||
|
||||
deb http://[mirror]/debian/ oldstable main
|
||||
|
||||
To enable the change run
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
for other Ubuntu & Debian:
|
||||
|
||||
sudo apt-get install libdb4.8-dev
|
||||
sudo apt-get install libdb4.8++-dev
|
||||
sudo apt-get install libboost1.37-dev
|
||||
(If using Boost 1.37, append -mt to the boost libraries in the makefile)
|
||||
|
||||
Optional:
|
||||
|
||||
sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
|
||||
|
||||
Dependencies for the GUI: Ubuntu & Debian
|
||||
-----------------------------------------
|
||||
|
||||
If you want to build Bitcoin-Qt, make sure that the required packages for Qt development
|
||||
are installed. Either Qt 4 or Qt 5 are necessary to build the GUI.
|
||||
If both Qt 4 and Qt 5 are installed, Qt 4 will be used. Pass `--with-gui=qt5` to configure to choose Qt5.
|
||||
To build without GUI pass `--without-gui`.
|
||||
|
||||
To build with Qt 4 you need the following:
|
||||
|
||||
apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
|
||||
|
||||
For Qt 5 you need the following:
|
||||
|
||||
apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
|
||||
|
||||
libqrencode (optional) can be installed with:
|
||||
|
||||
apt-get install libqrencode-dev
|
||||
|
||||
Once these are installed, they will be found by configure and a bitcoin-qt executable will be
|
||||
built by default.
|
||||
|
||||
Notes
|
||||
-----
|
||||
The release is built with GCC and then "strip bitcoind" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
tar -xzvf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
You need Berkeley DB 4.8. If you have to build Berkeley DB yourself:
|
||||
|
||||
cd build_unix/
|
||||
../dist/configure --enable-cxx
|
||||
make
|
||||
sudo make install
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
If you need to build Boost yourself:
|
||||
|
||||
sudo su
|
||||
./bootstrap.sh
|
||||
./bjam install
|
||||
|
||||
|
||||
Security
|
||||
--------
|
||||
To help make your bitcoin installation more secure by making certain attacks impossible to
|
||||
exploit even if a vulnerability is found, binaries are hardened by default.
|
||||
This can be disabled with:
|
||||
|
||||
Hardening Flags:
|
||||
|
||||
./configure --enable-hardening
|
||||
./configure --disable-hardening
|
||||
|
||||
|
||||
Hardening enables the following features:
|
||||
|
||||
* Position Independent Executable
|
||||
Build position independent code to take advantage of Address Space Layout Randomization
|
||||
offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
|
||||
memory location is thwarted if he doesn't know where anything useful is located.
|
||||
The stack and heap are randomly located by default but this allows the code section to be
|
||||
randomly located as well.
|
||||
|
||||
On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error
|
||||
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"
|
||||
|
||||
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
||||
|
||||
scanelf -e ./bitcoin
|
||||
|
||||
The output should contain:
|
||||
TYPE
|
||||
ET_DYN
|
||||
|
||||
* Non-executable Stack
|
||||
If the stack is executable then trivial stack based buffer overflow exploits are possible if
|
||||
vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack
|
||||
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
|
||||
and uses a compiler extension which requires an executable stack, it will silently build an
|
||||
executable without the non-executable stack protection.
|
||||
|
||||
To verify that the stack is non-executable after compiling use:
|
||||
`scanelf -e ./bitcoin`
|
||||
|
||||
the output should contain:
|
||||
STK/REL/PTL
|
||||
RW- R-- RW-
|
||||
|
||||
The STK RW- means that the stack is readable and writeable but not executable.
|
||||
|
||||
Disable-wallet mode
|
||||
--------------------
|
||||
When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in
|
||||
disable-wallet mode with:
|
||||
|
||||
./configure --disable-wallet
|
||||
|
||||
In this case there is no dependency on Berkeley DB 4.8.
|
||||
|
||||
Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC
|
||||
call not `getwork`.
|
||||
|
||||
150
doc/build-unix.txt
Normal file
150
doc/build-unix.txt
Normal file
@@ -0,0 +1,150 @@
|
||||
Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
Copyright (c) 2011 Bitcoin Developers
|
||||
Distributed under the MIT/X11 software license, see the accompanying
|
||||
file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
This product includes software developed by the OpenSSL Project for use in
|
||||
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
|
||||
cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
UNIX BUILD NOTES
|
||||
================
|
||||
|
||||
To Build
|
||||
--------
|
||||
|
||||
cd src/
|
||||
make -f makefile.unix # Headless bitcoin
|
||||
|
||||
See readme-qt.rst for instructions on building Bitcoin QT,
|
||||
the graphical bitcoin.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Library Purpose Description
|
||||
------- ------- -----------
|
||||
libssl SSL Support Secure communications
|
||||
libdb4.8 Berkeley DB Blockchain & wallet storage
|
||||
libboost Boost C++ Library
|
||||
miniupnpc UPnP Support Optional firewall-jumping support
|
||||
|
||||
miniupnpc may be used for UPnP port mapping. It can be downloaded from
|
||||
http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and
|
||||
turned off by default. Set USE_UPNP to a different value to control this:
|
||||
USE_UPNP= No UPnP support - miniupnp not required
|
||||
USE_UPNP=0 (the default) UPnP support turned off by default at runtime
|
||||
USE_UPNP=1 UPnP support turned on by default at runtime
|
||||
|
||||
Licenses of statically linked libraries:
|
||||
Berkeley DB New BSD license with additional requirement that linked
|
||||
software must be free open source
|
||||
Boost MIT-like license
|
||||
miniupnpc New (3-clause) BSD license
|
||||
|
||||
Versions used in this release:
|
||||
GCC 4.3.3
|
||||
OpenSSL 0.9.8g
|
||||
Berkeley DB 4.8.30.NC
|
||||
Boost 1.37
|
||||
miniupnpc 1.6
|
||||
|
||||
|
||||
Dependency Build Instructions: Ubuntu & Debian
|
||||
----------------------------------------------
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install libdb4.8-dev
|
||||
sudo apt-get install libdb4.8++-dev
|
||||
Boost 1.40+: sudo apt-get install libboost-all-dev
|
||||
or Boost 1.37: sudo apt-get install libboost1.37-dev
|
||||
|
||||
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
||||
|
||||
|
||||
Dependency Build Instructions: Gentoo
|
||||
-------------------------------------
|
||||
|
||||
Note: If you just want to install bitcoind on Gentoo, you can add the Bitcoin
|
||||
overlay and use your package manager:
|
||||
layman -a bitcoin && emerge bitcoind
|
||||
|
||||
emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8
|
||||
|
||||
Take the following steps to build (no UPnP support):
|
||||
cd ${BITCOIN_DIR}/src
|
||||
make -f makefile.unix USE_UPNP= BDB_INCLUDE_PATH='/usr/include/db4.8'
|
||||
strip bitcoind
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The release is built with GCC and then "strip bitcoind" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
tar -xzvf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
You need Berkeley DB 4.8. If you have to build Berkeley DB yourself:
|
||||
../dist/configure --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
If you need to build Boost yourself:
|
||||
sudo su
|
||||
./bootstrap.sh
|
||||
./bjam install
|
||||
|
||||
|
||||
Security
|
||||
--------
|
||||
To help make your bitcoin installation more secure by making certain attacks impossible to
|
||||
exploit even if a vulnerability is found, you can take the following measures:
|
||||
|
||||
* Position Independent Executable
|
||||
Build position independent code to take advantage of Address Space Layout Randomization
|
||||
offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
|
||||
memory location is thwarted if he doesn't know where anything useful is located.
|
||||
The stack and heap are randomly located by default but this allows the code section to be
|
||||
randomly located as well.
|
||||
|
||||
On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error
|
||||
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"
|
||||
|
||||
To build with PIE, use:
|
||||
make -f makefile.unix ... -e PIE=1
|
||||
|
||||
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
||||
scanelf -e ./bitcoin
|
||||
|
||||
The output should contain:
|
||||
TYPE
|
||||
ET_DYN
|
||||
|
||||
* Non-executable Stack
|
||||
If the stack is executable then trivial stack based buffer overflow exploits are possible if
|
||||
vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack
|
||||
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
|
||||
and uses a compiler extension which requires an executable stack, it will silently build an
|
||||
executable without the non-executable stack protection.
|
||||
|
||||
To verify that the stack is non-executable after compiling use:
|
||||
scanelf -e ./bitcoin
|
||||
|
||||
the output should contain:
|
||||
STK/REL/PTL
|
||||
RW- R-- RW-
|
||||
|
||||
The STK RW- means that the stack is readable and writeable but not executable.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user