Compare commits
6 commits
master
...
1.10-archi
Author | SHA1 | Date | |
---|---|---|---|
22aa7b1abc | |||
b2541249d1 | |||
3f05f2debc | |||
1adeca4dad | |||
4dffcfe48e | |||
7004e094c7 |
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: 🐜 Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: '[bug] '
|
||||
---
|
||||
|
||||
<!-- Please make sure you are posting an technical issue related to Dogecoin Core. -->
|
||||
|
||||
<!-- For general questions about Dogecoin or wallet recovery please use one of the various communities:
|
||||
* [Dogeducation on reddit](https://www.reddit.com/r/dogeducation/)
|
||||
* [Discord](https://discord.com/invite/dogecoin) -->
|
||||
|
||||
<!-- ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->
|
||||
|
||||
# Bug Report
|
||||
|
||||
**Current behavior:**
|
||||
<!-- Describe how the bug manifests. -->
|
||||
|
||||
**Expected behavior**
|
||||
<!-- Describe what the behavior would be without the bug. -->
|
||||
|
||||
**Steps to reproduce:**
|
||||
<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application or sample code -->
|
||||
|
||||
**Screenshots**
|
||||
<!-- If the issue is related to the GUI, screenshots can be added to this issue via drag & drop. -->
|
||||
|
||||
**Dogecoin Core version**
|
||||
<!-- List the version number/commit ID, and if it is an official binary, self compiled or a distribution package such as PPA. -->
|
||||
|
||||
**Machine specs**
|
||||
- OS:
|
||||
- CPU:
|
||||
- RAM:
|
||||
- Disk size:
|
||||
- Disk Type (HD/SDD):
|
||||
|
||||
**Extra information**
|
||||
<!-- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
|
30
.github/ISSUE_TEMPLATE/feature_request.md
vendored
30
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
name: 🚀 Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: '[feat] '
|
||||
---
|
||||
|
||||
<!-- Please make sure you are posting an technical issue related to Dogecoin Core. -->
|
||||
|
||||
<!-- For general questions about Dogecoin or wallet recovery please use one of the various communities:
|
||||
* [Dogeducation on reddit](https://www.reddit.com/r/dogeducation/)
|
||||
* [Discord](https://discord.com/invite/dogecoin) -->
|
||||
|
||||
<!-- ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->
|
||||
|
||||
# Feature Request
|
||||
|
||||
**Describe the Feature Request**
|
||||
<!-- A clear and concise description of what the feature request is. Please include if your feature request is related to a problem. -->
|
||||
|
||||
**Describe Preferred Solution**
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe Alternatives**
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Related Code**
|
||||
<!-- If you are able to illustrate the feature request with an example, please provide a samples via an online code collaborator such as [StackBlitz](https://stackblitz.com), or code snippet on [GitHub](https://github.com). -->
|
||||
|
||||
**Additional Context**
|
||||
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to add, use case, Stack Overflow links, forum links, screenshots, OS if applicable, etc. -->
|
227
.github/workflows/ci.yml
vendored
227
.github/workflows/ci.yml
vendored
|
@ -1,227 +0,0 @@
|
|||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'doc/**'
|
||||
- 'contrib/**'
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.name }}
|
||||
|
||||
env:
|
||||
MAKEJOBS: "-j3"
|
||||
CHECK_DOC: "0"
|
||||
CCACHE_SIZE: "100M"
|
||||
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
||||
CCACHE_COMPRESS: "1"
|
||||
PYTHON_DEBUG: "1"
|
||||
WINEDEBUG: fixme-all
|
||||
SDK_URL: https://bitcoincore.org/depends-sources/sdks
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
name:
|
||||
- aarch64-linux
|
||||
- armhf-linux
|
||||
- i686-linux
|
||||
- i686-win
|
||||
- x86_64-linux-dbg
|
||||
- x86_64-linux-nowallet
|
||||
- x86_64-macos
|
||||
- x86_64-win
|
||||
- x86_64-linux-experimental
|
||||
include:
|
||||
- name: i686-linux
|
||||
host: i686-pc-linux-gnu
|
||||
os: ubuntu-18.04
|
||||
packages: g++-multilib bc python3-zmq
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: true
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: armhf-linux
|
||||
host: arm-linux-gnueabihf
|
||||
os: ubuntu-18.04
|
||||
packages: g++-arm-linux-gnueabihf
|
||||
run-tests: false
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: aarch64-linux
|
||||
host: aarch64-linux-gnu
|
||||
os: ubuntu-18.04
|
||||
packages: g++-aarch64-linux-gnu
|
||||
run-tests: false
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-zmq --enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: x86_64-linux-nowallet
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-18.04
|
||||
packages: python3
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: true
|
||||
dep-opts: "NO_WALLET=1"
|
||||
config-opts: "--enable-gui=qt5 --enable-glibc-back-compat --disable-wallet LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: x86_64-linux-dbg
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-18.04
|
||||
packages: bc python3-zmq
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "DEBUG=1"
|
||||
config-opts: "--enable-gui=qt5 --enable-zmq --enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
|
||||
goal: install
|
||||
- name: i686-win
|
||||
host: i686-w64-mingw32
|
||||
arch: "i386"
|
||||
os: ubuntu-18.04
|
||||
packages: python3 nsis g++-mingw-w64-i686 wine-stable bc wine-binfmt
|
||||
postinstall: |
|
||||
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
|
||||
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
||||
sudo update-binfmts --import /usr/share/binfmts/wine
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-gui=qt5"
|
||||
goal: install
|
||||
- name: x86_64-win
|
||||
host: x86_64-w64-mingw32
|
||||
arch: "i386"
|
||||
os: ubuntu-18.04
|
||||
packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt
|
||||
postinstall: |
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
sudo update-binfmts --import /usr/share/binfmts/wine
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-gui=qt5"
|
||||
goal: install
|
||||
- name: x86_64-macos
|
||||
host: x86_64-apple-darwin11
|
||||
os: ubuntu-18.04
|
||||
packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libtiff-tools libtinfo5 python3-setuptools xorriso libtinfo5
|
||||
run-tests: false
|
||||
check-security: false
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-gui=qt5 --disable-tests"
|
||||
goal: deploy
|
||||
sdk: 10.11
|
||||
- name: x86_64-linux-experimental
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
packages: bc python3-zmq
|
||||
run-tests: true
|
||||
dep-opts: "AVX2=1"
|
||||
config-opts: "--with-intel-avx2 --enable-gui=qt5 --enable-zmq --enable-glibc-back-compat --enable-reduce-exports"
|
||||
goal: install
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Add architecture
|
||||
if: ${{ matrix.arch }}
|
||||
run: |
|
||||
sudo dpkg --add-architecture "${{ matrix.arch }}"
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison
|
||||
sudo apt-get install ${{ matrix.packages }}
|
||||
|
||||
- name: Post install
|
||||
if: ${{ matrix.postinstall }}
|
||||
run: ${{ matrix.postinstall }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: SDK cache
|
||||
if: ${{ matrix.sdk }}
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: sdk
|
||||
with:
|
||||
path: ./depends/sdk-sources
|
||||
key: ${{ matrix.name }}-${{ env.cache-name }}
|
||||
|
||||
- name: Install SDK
|
||||
if: ${{ matrix.sdk }}
|
||||
run: |
|
||||
mkdir -p ./depends/sdk-sources
|
||||
mkdir -p ./depends/SDKs
|
||||
curl --location --fail $SDK_URL/MacOSX${{ matrix.sdk }}.sdk.tar.gz -o depends/sdk-sources/MacOSX${{ matrix.sdk }}.sdk.tar.gz
|
||||
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${{ matrix.sdk }}.sdk.tar.gz
|
||||
|
||||
- name: Dependency cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: depends
|
||||
with:
|
||||
path: ./depends/built
|
||||
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*') }}
|
||||
|
||||
- name: Build depends
|
||||
run: |
|
||||
make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
|
||||
|
||||
- name: CCache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: ccache
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac') }}
|
||||
|
||||
- name: Build Dogecoin
|
||||
run: |
|
||||
depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE
|
||||
./autogen.sh
|
||||
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports || ( cat config.log && false)
|
||||
make $MAKEJOBS ${{ matrix.goal }} || ( echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} V=1 ; false )
|
||||
|
||||
- name: Run tests
|
||||
if: ${{ matrix.run-tests }}
|
||||
run: |
|
||||
make check $MAKEJOBS VERBOSE=1
|
||||
qa/pull-tester/install-deps.sh
|
||||
qa/pull-tester/rpc-tests.py --coverage
|
||||
|
||||
- name: Check security
|
||||
if: ${{ matrix.check-security }}
|
||||
run: make -C src check-security
|
||||
|
||||
- name: Check symbols
|
||||
if: ${{ matrix.check-symbols }}
|
||||
run: make -C src check-symbols
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dogecoin-${{ github.sha }}-${{ matrix.name }}
|
||||
path: |
|
||||
depends/${{ matrix.host }}/bin/dogecoin*
|
||||
dist/Dogecoin-Qt.app
|
71
.github/workflows/codeql-analysis.yml
vendored
71
.github/workflows/codeql-analysis.yml
vendored
|
@ -1,71 +0,0 @@
|
|||
# CodeQL GH Actions file
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*-dev'
|
||||
- '*-maint'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches:
|
||||
- '*-dev'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- 'contrib'
|
||||
- 'doc'
|
||||
- 'share'
|
||||
- 'qa'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-18.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Update system
|
||||
run: |
|
||||
sudo apt-get update --yes
|
||||
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils --yes
|
||||
|
||||
- name: Dependency cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: depends
|
||||
with:
|
||||
path: ./depends/built
|
||||
key: codeql-${{ env.cache-name }}-${{ hashFiles('depends/packages/*') }}
|
||||
|
||||
- name: Build depends
|
||||
run: |
|
||||
pushd depends
|
||||
make -j4 HOST=x86_64-pc-linux-gnu
|
||||
popd
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Build Dogecoin
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu
|
||||
make -j4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
28
.gitignore
vendored
28
.gitignore
vendored
|
@ -6,7 +6,6 @@ src/dogecoind
|
|||
src/dogecoin-cli
|
||||
src/dogecoin-tx
|
||||
src/test/test_dogecoin
|
||||
src/test/test_dogecoin_fuzzy
|
||||
src/qt/test/test_dogecoin-qt
|
||||
|
||||
# autoreconf
|
||||
|
@ -56,6 +55,7 @@ src/qt/test/moc*.cpp
|
|||
*.o
|
||||
*.o-*
|
||||
*.patch
|
||||
.dogecoin
|
||||
*.a
|
||||
*.pb.cc
|
||||
*.pb.h
|
||||
|
@ -85,13 +85,15 @@ src/test/buildenv.py
|
|||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Qt creator
|
||||
*.pro.user
|
||||
|
||||
# Mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
||||
#lcov
|
||||
*.gcno
|
||||
*.gcda
|
||||
/*.info
|
||||
test_bitcoin.coverage/
|
||||
total.coverage/
|
||||
|
@ -101,27 +103,13 @@ coverage_percent.txt
|
|||
linux-coverage-build
|
||||
linux-build
|
||||
win32-build
|
||||
qa/pull-tester/tests_config.py
|
||||
qa/cache/*
|
||||
qa/pull-tester/run-bitcoind-for-test.sh
|
||||
qa/pull-tester/tests-config.sh
|
||||
qa/pull-tester/cache/*
|
||||
qa/pull-tester/test.*/*
|
||||
|
||||
!src/leveldb*/Makefile
|
||||
|
||||
/doc/doxygen/
|
||||
|
||||
libbitcoinconsensus.pc
|
||||
contrib/devtools/split-debug.sh
|
||||
|
||||
.idea/
|
||||
.vscode/*
|
||||
|
||||
# Snapcraft
|
||||
parts/
|
||||
prime/
|
||||
stage/
|
||||
*.snap
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
|
111
.travis.yml
Normal file
111
.travis.yml
Normal file
|
@ -0,0 +1,111 @@
|
|||
# errata:
|
||||
# - A travis bug causes caches to trample eachother when using the same
|
||||
# compiler key (which we don't use anyway). This is worked around for now by
|
||||
# replacing the "compilers" with a build name prefixed by the no-op ":"
|
||||
# command. See: https://github.com/travis-ci/casher/issues/6
|
||||
|
||||
os: linux
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
env:
|
||||
global:
|
||||
- MAKEJOBS=-j3
|
||||
- RUN_TESTS=false
|
||||
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
|
||||
- CCACHE_SIZE=100M
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
|
||||
- SDK_URL=http://dev.plddr.eu/osxsdk/
|
||||
- PYTHON_DEBUG=1
|
||||
- WINEDEBUG=fixme-all
|
||||
cache:
|
||||
apt: true
|
||||
directories:
|
||||
- depends/built
|
||||
- depends/sdk-sources
|
||||
- $HOME/.ccache
|
||||
sudo: false
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- compiler: ": ARM"
|
||||
env: HOST=arm-linux-gnueabihf DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-arm-linux-gnueabihf
|
||||
- compiler: ": Win32"
|
||||
env: HOST=i686-w64-mingw32 GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- nsis
|
||||
- gcc-mingw-w64-i686
|
||||
- g++-mingw-w64-i686
|
||||
- binutils-mingw-w64-i686
|
||||
- mingw-w64-dev
|
||||
- wine
|
||||
- bc
|
||||
- compiler: ": 32-bit + dash"
|
||||
env: HOST=i686-pc-linux-gnu RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" USE_SHELL="/bin/dash"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- bc
|
||||
- compiler: ": Win64"
|
||||
env: HOST=x86_64-w64-mingw32 GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- nsis
|
||||
- gcc-mingw-w64-x86-64
|
||||
- g++-mingw-w64-x86-64
|
||||
- binutils-mingw-w64-x86-64
|
||||
- mingw-w64-dev
|
||||
- wine
|
||||
- bc
|
||||
- compiler: ": dogecoind"
|
||||
env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
- compiler: ": No wallet"
|
||||
env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
||||
- compiler: ": Cross-Mac"
|
||||
env: HOST=x86_64-apple-darwin11 BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- libcap-dev
|
||||
- zlib1g-dev
|
||||
- libbz2-dev
|
||||
exclude:
|
||||
- compiler: gcc
|
||||
before_script:
|
||||
- unset CC; unset CXX
|
||||
- mkdir -p depends/SDKs depends/sdk-sources
|
||||
- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/install-deps.sh; fi
|
||||
- if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
|
||||
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
|
||||
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
|
||||
script:
|
||||
- if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
|
||||
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
|
||||
- BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
|
||||
- depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
|
||||
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
|
||||
- ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
||||
- make distdir PACKAGE=bitcoin VERSION=$HOST
|
||||
- cd bitcoin-$HOST
|
||||
- ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
||||
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
|
||||
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
|
||||
- if [ "$RUN_TESTS" = "true" ]; then make check; fi
|
||||
- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi
|
||||
after_script:
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi
|
|
@ -1,7 +1,7 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[bitcoin.qt-translation-014x]
|
||||
[bitcoin.qt-translation-011x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.ts
|
||||
source_file = src/qt/locale/bitcoin_en.ts
|
||||
source_lang = en
|
||||
|
|
177
CONTRIBUTING.md
177
CONTRIBUTING.md
|
@ -1,177 +0,0 @@
|
|||
# Contributing to Dogecoin Core
|
||||
|
||||
Dogecoin Core is open source software, and we would welcome contributions
|
||||
which improve the state of the software. For those wanting to discuss changes,
|
||||
or look for work that needs doing, please see:
|
||||
|
||||
* [Help requests](https://github.com/dogecoin/dogecoin/labels/help%20wanted)
|
||||
* [Projects](https://github.com/dogecoin/dogecoin/projects)
|
||||
* [Dogecoindev on reddit](https://www.reddit.com/r/dogecoindev/)
|
||||
|
||||
## Branch Strategy
|
||||
|
||||
Dogecoin Core's default branch is intentionally a stable release, so that anyone
|
||||
downloading the code and compiling it gets a stable release. Active development
|
||||
occurs on branches named after the version they are targeting, for example the
|
||||
1.14.4 branch is named `1.14.4-dev`. When raising PRs, please raise against the
|
||||
relevant development branch and **not** against the `master` branch.
|
||||
|
||||
## Contributor Workflow
|
||||
|
||||
The codebase is maintained using the "contributor workflow" where everyone
|
||||
without exception contributes patch proposals using "pull requests". This
|
||||
facilitates social contribution, easy testing and peer review.
|
||||
|
||||
To contribute a patch, the workflow is as follows:
|
||||
|
||||
- Fork the repository in GitHub, and clone it your development machine.
|
||||
- Create a topic branch from the relevant development branch.
|
||||
- Commit changes to the branch.
|
||||
- Test your changes, which **must** include the unit and RPC tests passing.
|
||||
- Push topic branch to your copy of the repository.
|
||||
- Raise a Pull Request via GitHub.
|
||||
|
||||
The coding conventions in the [developer notes](doc/developer-notes.md) must be
|
||||
adhered to.
|
||||
|
||||
In general [commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention)
|
||||
and diffs should be easy to read. For this reason do not mix any formatting
|
||||
fixes or code moves with actual code changes.
|
||||
|
||||
Commit messages should be verbose by default consisting of a short subject line
|
||||
(50 chars max), a blank line and detailed explanatory text as separate
|
||||
paragraph(s); unless the title alone is self-explanatory (like "Corrected typo
|
||||
in init.cpp") then a single title line is sufficient. Commit messages should be
|
||||
helpful to people reading your code in the future, so explain the reasoning for
|
||||
your decisions. Further explanation [here](http://chris.beams.io/posts/git-commit/).
|
||||
|
||||
Please refer to the [Git manual](https://git-scm.com/doc) for more information
|
||||
about Git.
|
||||
|
||||
The body of the pull request should contain enough description about what the
|
||||
patch does together with any justification/reasoning. You should include
|
||||
references to any discussions (for example other tickets or mailing list
|
||||
discussions). At this stage one should expect comments and review from other
|
||||
contributors. You can add more commits to your pull request by committing them
|
||||
locally and pushing to your fork until you have satisfied feedback.
|
||||
|
||||
|
||||
## Squashing Commits
|
||||
|
||||
If your pull request is accepted for merging, you may be asked by a maintainer
|
||||
to squash and or [rebase](https://git-scm.com/docs/git-rebase) your commits
|
||||
before it will be merged. The basic squashing workflow is shown below.
|
||||
|
||||
git checkout your_branch_name
|
||||
git rebase -i HEAD~n
|
||||
# n is normally the number of commits in the pull
|
||||
# set commits from 'pick' to 'squash', save and quit
|
||||
# on the next screen, edit/refine commit messages
|
||||
# save and quit
|
||||
git push -f # (force push to GitHub)
|
||||
|
||||
If you have problems with squashing (or other workflows with `git`), you can
|
||||
alternatively enable "Allow edits from maintainers" in the right GitHub
|
||||
sidebar and ask for help in the pull request.
|
||||
|
||||
Please refrain from creating several pull requests for the same change.
|
||||
Use the pull request that is already open (or was created earlier) to amend
|
||||
changes. This preserves the discussion and review that happened earlier for
|
||||
the respective change set.
|
||||
|
||||
The length of time required for peer review is unpredictable and will vary
|
||||
between pull requests.
|
||||
|
||||
|
||||
## Pull Request Philosophy
|
||||
|
||||
Pull Requests should always be focused. For example, a pull request could add a
|
||||
feature, fix a bug, or refactor code; but not a mixture. Please avoid submitting
|
||||
pull requests that attempt to do too much, are overly large, or overly complex
|
||||
as this makes review difficult.
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
When adding a new feature, thought must be given to the long term technical debt
|
||||
and maintenance that feature may require after inclusion. Before proposing a new
|
||||
feature that will require maintenance, please consider if you are willing to
|
||||
maintain it (including bug fixing). If features get orphaned with no maintainer
|
||||
in the future, they may be removed.
|
||||
|
||||
|
||||
### Refactoring
|
||||
|
||||
Dogecoin Core is a direct fork of Bitcoin Core and therefore benefits from as
|
||||
little refactoring as possible on code that is created upstream. If you see any
|
||||
structural issues with upstream code, please propose these fixes for
|
||||
[bitcoin/bitcoin](https://github.com/bitcoin/bitcoin) and future Dogecoin Core
|
||||
releases will automatically benefit from these.
|
||||
|
||||
When refactoring Dogecoin-specific code, please keep refactoring requests short,
|
||||
low complexity and easy to verify.
|
||||
|
||||
|
||||
## "Decision Making" Process
|
||||
|
||||
The following applies to code changes to Dogecoin Core, and is not to be
|
||||
confused with overall Dogecoin Network Protocol consensus changes. All consensus
|
||||
changes **must** be ratified by miners; a proposal to implement protocol changes
|
||||
does not guarantee activation on the mainnet, not even when a binary gets
|
||||
released by maintainers.
|
||||
|
||||
Whether a pull request is merged into Dogecoin Core rests with the repository
|
||||
maintainers.
|
||||
|
||||
Maintainers will take into consideration if a patch is in line with the general
|
||||
principles of Dogecoin; meets the minimum standards for inclusion; and will
|
||||
take into account the consensus among frequent contributors.
|
||||
|
||||
In general, all pull requests must:
|
||||
|
||||
- have a clear use case, fix a demonstrable bug or serve the greater good of
|
||||
Dogecoin;
|
||||
- be peer reviewed;
|
||||
- have unit tests and functional tests;
|
||||
- follow code style guidelines;
|
||||
- not break the existing test suite;
|
||||
- where bugs are fixed, where possible, there should be unit tests
|
||||
demonstrating the bug and also proving the fix. This helps prevent
|
||||
regressions.
|
||||
|
||||
The following patch types are expected to have significant discussion before
|
||||
approval and merge:
|
||||
|
||||
- Consensus rule changes (through softfork or otherwise)
|
||||
- Policy changes
|
||||
|
||||
While each case will be different, one should be prepared to expend more time
|
||||
and effort than for other kinds of patches because of increased peer review
|
||||
and consensus building requirements.
|
||||
|
||||
|
||||
### Peer Review
|
||||
|
||||
Anyone may participate in peer review which is expressed by comments in the pull
|
||||
request. Typically, reviewers will review the code for obvious errors, as well as
|
||||
test out the patch set and opine on the technical merits of the patch.
|
||||
Repository maintainers take into account the peer review when determining if
|
||||
there is consensus to merge a pull request.
|
||||
|
||||
Maintainers reserve the right to weigh the opinions of peer reviewers
|
||||
using common sense judgement and also may weight based on meritocracy: Those
|
||||
that have demonstrated a deeper commitment and understanding towards Dogecoin
|
||||
(over time) or have clear domain expertise may naturally have more weight, as
|
||||
one would expect in all walks of life.
|
||||
|
||||
Where a patch set proposes to change the Dogecoin consensus, it must have been
|
||||
discussed extensively, be accompanied by widely discussed documentation and have
|
||||
a generally widely perceived technical consensus of being a worthwhile change,
|
||||
based on the judgement of the maintainers.
|
||||
|
||||
## Copyright
|
||||
|
||||
By contributing to this repository, you agree to license your work under the
|
||||
MIT license unless specified otherwise in `contrib/debian/copyright` or at
|
||||
the top of the file itself. Any work contributed where you are not the original
|
||||
author must contain its license header with the original author(s) and source.
|
5
COPYING
5
COPYING
|
@ -1,7 +1,4 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2017 The Bitcoin Core developers
|
||||
Copyright (c) 2013-2021 The Dogecoin Core developers
|
||||
Copyright (c) 2009-2015 The Bitcoin Core developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
5
INSTALL
Normal file
5
INSTALL
Normal file
|
@ -0,0 +1,5 @@
|
|||
Building Bitcoin
|
||||
|
||||
See doc/build-*.md for instructions on building bitcoind,
|
||||
the intended-for-services, no-graphical-interface, reference
|
||||
implementation of Bitcoin.
|
80
INSTALL.md
80
INSTALL.md
|
@ -1,80 +0,0 @@
|
|||
# Installing Dogecoin Core
|
||||
|
||||
### Pre-compiled binaries
|
||||
|
||||
The easiest way to install the latest version of the Dogecoin Core software is
|
||||
by to download the latest precompiled binaries for your platform from the
|
||||
[release page](https://github.com/dogecoin/dogecoin/releases). Currently,
|
||||
binaries are released for the following platforms:
|
||||
|
||||
- Windows, 64-bit and 32-bit
|
||||
- Linux, 64-bit and 32-bit
|
||||
- MacOS, Intel 64-bit
|
||||
- ARM, 64-bit and 32-bit Linux
|
||||
|
||||
These binaries are created and verified by multiple independent people, to
|
||||
ensure honest and malware-free releases. See
|
||||
[the gitian building documentation](doc/gitian-building.md) for more information
|
||||
regarding that process.
|
||||
|
||||
### Compiling using packaged dependencies
|
||||
|
||||
It is possible to build your own copy of Dogecoin Core with the exact, tested,
|
||||
dependencies, as used for the binary releases, by using the
|
||||
[depends system](depends/description.md). Please refer to the
|
||||
[depends README](depends/README.md) for instructions to build Dogecoin using
|
||||
these dependencies.
|
||||
|
||||
### Compiling using system-provided libraries
|
||||
|
||||
The following are developer notes on how to build Dogecoin on your native
|
||||
platform, using the dependencies as provided by your system's package manager.
|
||||
They are not complete guides, but include notes on the necessary libraries,
|
||||
compile flags, etc.
|
||||
|
||||
- [Unix Build Notes](doc/build-unix.md)
|
||||
- [Windows Build Notes](doc/build-windows.md)
|
||||
- [macOS Build Notes](doc/Building-Dogecoin-1.14-for-Mac.md)
|
||||
|
||||
### Testing
|
||||
|
||||
Unit tests can be compiled and ran with `make check`. Further details on running
|
||||
and extending unit tests can be found in [/src/test/README.md](/src/test/README.md).
|
||||
|
||||
There are also [regression and integration tests](/qa) written in Python, that
|
||||
are run automatically on the build server. These tests can be run (if the
|
||||
[test dependencies](/qa) are installed) with: `qa/pull-tester/rpc-tests.py`
|
||||
|
||||
### Tips and tricks
|
||||
|
||||
**compiling for debugging**
|
||||
|
||||
Run `configure` with the `--enable-debug` option, then `make`. Or run `configure` with
|
||||
`CXXFLAGS="-g -ggdb -O0"` or whatever debug flags you need.
|
||||
|
||||
**debug.log**
|
||||
|
||||
If the code is behaving strangely, take a look in the debug.log file in the data directory;
|
||||
error and debugging messages are written there.
|
||||
|
||||
The `-debug=...` command-line option controls debugging; running with just `-debug` will turn
|
||||
on all categories (and give you a very large debug.log file).
|
||||
|
||||
The Qt code routes `qDebug()` output to debug.log under category "qt": run with `-debug=qt`
|
||||
to see it.
|
||||
|
||||
**testnet and regtest modes**
|
||||
|
||||
Run with the `-testnet` option to run with "play dogecoins" on the test network, if you
|
||||
are testing multi-machine code that needs to operate across the internet.
|
||||
|
||||
If you are testing something that can run on one machine, run with the `-regtest` option.
|
||||
In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
|
||||
that run in `-regtest` mode.
|
||||
|
||||
**DEBUG_LOCKORDER**
|
||||
|
||||
Dogecoin Core is a multithreaded application, and deadlocks or other multithreading bugs
|
||||
can be very difficult to track down. Compiling with `-DDEBUG_LOCKORDER` (`configure
|
||||
CXXFLAGS="-DDEBUG_LOCKORDER -g"`) inserts run-time checks to keep track of which locks
|
||||
are held, and adds warnings to the debug.log file if inconsistencies are detected.
|
130
Makefile.am
130
Makefile.am
|
@ -1,72 +1,60 @@
|
|||
# Copyright (c) 2013-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
SUBDIRS = src
|
||||
if ENABLE_MAN
|
||||
SUBDIRS += doc/man
|
||||
endif
|
||||
.PHONY: deploy FORCE
|
||||
|
||||
GZIP_ENV="-9n"
|
||||
export PYTHONPATH
|
||||
|
||||
if BUILD_BITCOIN_LIBS
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libbitcoinconsensus.pc
|
||||
endif
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
|
||||
BITCOIND_BIN=$(top_builddir)/src/dogecoind$(EXEEXT)
|
||||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/dogecoin-qt$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/dogecoin-cli$(EXEEXT)
|
||||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
OSX_APP=Dogecoin-Qt.app
|
||||
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
|
||||
OSX_DMG = $(OSX_VOLNAME).dmg
|
||||
OSX_BACKGROUND_SVG=background.svg
|
||||
OSX_DMG=Dogecoin-Core.dmg
|
||||
OSX_BACKGROUND_IMAGE=background.tiff
|
||||
OSX_BACKGROUND_IMAGE_DPIS=36 72
|
||||
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
|
||||
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/dogecoin.icns
|
||||
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
||||
OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
|
||||
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
|
||||
|
||||
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
|
||||
DIST_CONTRIB = $(top_srcdir)/contrib/dogecoin-cli.bash-completion \
|
||||
$(top_srcdir)/contrib/dogecoin-tx.bash-completion \
|
||||
$(top_srcdir)/contrib/dogecoind.bash-completion \
|
||||
$(top_srcdir)/contrib/init \
|
||||
$(top_srcdir)/contrib/rpm
|
||||
|
||||
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
|
||||
$(top_srcdir)/contrib/devtools/security-check.py
|
||||
|
||||
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/dogecoin.ico \
|
||||
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/$(OSX_BACKGROUND_SVG) \
|
||||
$(OSX_DSSTORE_GEN) \
|
||||
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
|
||||
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
|
||||
$(top_srcdir)/contrib/macdeploy/DS_Store \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
|
||||
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
|
||||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
|
||||
baseline_filtered.info rpc_test.info rpc_test_filtered.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
|
||||
-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
|
||||
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||
|
||||
distcheck-hook:
|
||||
$(MKDIR_P) $(top_distdir)/_build/src/leveldb
|
||||
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
|
||||
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
|
||||
|
||||
distcleancheck:
|
||||
@:
|
||||
|
||||
$(BITCOIN_WIN_INSTALLER): all-recursive
|
||||
$(MKDIR_P) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
|
||||
|
@ -76,19 +64,22 @@ $(BITCOIN_WIN_INSTALLER): all-recursive
|
|||
echo error: could not build $@
|
||||
@echo built $@
|
||||
|
||||
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
|
||||
$(MAKE) -C src $(patsubst src/%,%,$@)
|
||||
|
||||
$(OSX_APP)/Contents/PkgInfo:
|
||||
$(MKDIR_P) $(@D)
|
||||
@echo "APPL????" > $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/dogecoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
|
@ -96,27 +87,17 @@ $(OSX_APP)/Contents/MacOS/Dogecoin-Qt: $(BITCOIN_QT_BIN)
|
|||
$(MKDIR_P) $(@D)
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
|
||||
$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
|
||||
$(MKDIR_P) $(@D)
|
||||
echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
|
||||
$(OSX_APP)/Contents/Resources/dogecoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
$(OSX_APP)/Contents/MacOS/Dogecoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
|
||||
|
||||
osx_volname:
|
||||
echo $(OSX_VOLNAME) >$@
|
||||
|
||||
if BUILD_DARWIN
|
||||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
|
||||
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
|
||||
|
||||
$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
|
||||
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
|
||||
$(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
|
||||
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@
|
||||
$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png
|
||||
tiffutil -cathidpicheck $^ -out $@
|
||||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
|
||||
|
||||
deploydir: $(OSX_DMG)
|
||||
else
|
||||
|
@ -130,20 +111,16 @@ $(APP_DIST_DIR)/Applications:
|
|||
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dogecoin-Qt
|
||||
|
||||
$(OSX_DMG): $(APP_DIST_EXTRAS)
|
||||
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
|
||||
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Dogecoin-Core" -no-pad -r -apple -o $@ dist
|
||||
|
||||
dpi%.$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_SVG)
|
||||
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d $* -p $* | $(IMAGEMAGICK_CONVERT) - $@
|
||||
OSX_BACKGROUND_IMAGE_DPIFILES := $(foreach dpi,$(OSX_BACKGROUND_IMAGE_DPIS),dpi$(dpi).$(OSX_BACKGROUND_IMAGE))
|
||||
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIFILES)
|
||||
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@
|
||||
|
||||
$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
|
||||
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"
|
||||
$(INSTALL) $< $@
|
||||
$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
|
||||
$(INSTALL) $< $@
|
||||
|
||||
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dogecoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
|
||||
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
|
||||
|
||||
deploydir: $(APP_DIST_EXTRAS)
|
||||
endif
|
||||
|
@ -191,20 +168,21 @@ test_bitcoin.info: baseline_filtered_combined.info
|
|||
test_bitcoin_filtered.info: test_bitcoin.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
rpc_test.info: test_bitcoin_filtered.info
|
||||
-@TIMEOUT=15 python qa/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS)
|
||||
$(LCOV) -c -d $(abs_builddir)/src --t rpc-tests -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
|
||||
|
||||
rpc_test_filtered.info: rpc_test.info
|
||||
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 rpc_test_filtered.info
|
||||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a rpc_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
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)
|
||||
|
@ -218,19 +196,17 @@ cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
|
|||
|
||||
endif
|
||||
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
||||
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) 2>&1
|
||||
endif
|
||||
|
||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
|
||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
|
||||
|
||||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
||||
|
||||
# This file is problematic for out-of-tree builds if it exists.
|
||||
DISTCLEANFILES = qa/pull-tester/tests_config.pyc
|
||||
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
|
||||
clean-local:
|
||||
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ qa/tmp/ cache/ $(OSX_APP)
|
||||
rm -rf qa/pull-tester/__pycache__
|
||||
rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP)
|
||||
|
|
191
README.md
191
README.md
|
@ -1,105 +1,136 @@
|
|||
<h1 align="center">
|
||||
Dogecoin Core [DOGE, Ð]
|
||||
<br/><br/>
|
||||
<img src="https://static.tumblr.com/ppdj5y9/Ae9mxmxtp/300coin.png" alt="Dogecoin" width="300"/>
|
||||
</h1>
|
||||
# Dogecoin Core [DOGE, Ð]
|
||||
==========================
|
||||
|
||||
<div align="center">
|
||||
![Dogecoin](http://static.tumblr.com/ppdj5y9/Ae9mxmxtp/300coin.png)
|
||||
|
||||
[![DogecoinBadge](https://img.shields.io/badge/Doge-Coin-yellow.svg)](https://dogecoin.com)
|
||||
[![MuchWow](https://img.shields.io/badge/Much-Wow-yellow.svg)](https://dogecoin.com)
|
||||
[![Build Status](https://travis-ci.org/dogecoin/dogecoin.svg?branch=1.7-dev)](https://travis-ci.org/dogecoin/dogecoin) [![tip for next commit](https://tip4commit.com/projects/702.svg)](https://tip4commit.com/github/dogecoin/dogecoin)
|
||||
|
||||
</div>
|
||||
## What is Dogecoin? – Such coin
|
||||
Dogecoin is a cryptocurrency like Bitcoin, although it does not use SHA256 as its proof of work (POW). Taking development cues from Tenebrix and Litecoin, Dogecoin currently employs a simplified variant of scrypt.
|
||||
|
||||
Select language: EN | [CN](./README_zh_CN.md)
|
||||
http://dogecoin.com/
|
||||
|
||||
Dogecoin is a community-driven cryptocurrency that was inspired by a Shiba Inu meme. The Dogecoin Core software allows anyone to operate a node in the Dogecoin blockchain networks and uses the Scrypt hashing method for Proof of Work. It is adapted from Bitcoin Core and other cryptocurrencies.
|
||||
## License – Much license
|
||||
Dogecoin is released under the terms of the MIT license. See [COPYING](COPYING)
|
||||
for more information or see http://opensource.org/licenses/MIT.
|
||||
|
||||
For information about the default fees used on the Dogecoin network, please
|
||||
refer to the [fee recommendation](doc/fee-recommendation.md).
|
||||
## Development and contributions – omg developers
|
||||
Development is ongoing, and the development team, as well as other volunteers, can freely work in their own trees and submit pull requests when features or bug fixes are ready.
|
||||
|
||||
**Website:** [dogecoin.com](https://dogecoin.com)
|
||||
|
||||
## Usage 💻
|
||||
|
||||
To start your journey with Dogecoin Core, see the [installation guide](INSTALL.md) and the [getting started](doc/getting-started.md) tutorial.
|
||||
|
||||
The JSON-RPC API provided by Dogecoin Core is self-documenting and can be browsed with `dogecoin-cli help`, while detailed information for each command can be viewed with `dogecoin-cli help <command>`. Alternatively, see the [Bitcoin Core documentation](https://developer.bitcoin.org/reference/rpc/) - which implement a similar protocol - to get a browsable version.
|
||||
|
||||
### Such ports
|
||||
|
||||
Dogecoin Core by default uses port `22556` for peer-to-peer communication that
|
||||
is needed to synchronize the "mainnet" blockchain and stay informed of new
|
||||
transactions and blocks. Additionally, a JSONRPC port can be opened, which
|
||||
defaults to port `22555` for mainnet nodes. It is strongly recommended to not
|
||||
expose RPC ports to the public internet.
|
||||
|
||||
| Function | mainnet | testnet | regtest |
|
||||
| :------- | ------: | ------: | ------: |
|
||||
| P2P | 22556 | 44556 | 18444 |
|
||||
| RPC | 22555 | 44555 | 18332 |
|
||||
|
||||
## Ongoing development - Moon plan 🌒
|
||||
|
||||
Dogecoin Core is an open source and community driven software. The development
|
||||
process is open and publicly visible; anyone can see, discuss and work on the
|
||||
software.
|
||||
|
||||
Main development resources:
|
||||
|
||||
* [Github Projects](https://github.com/dogecoin/dogecoin/projects) is used to
|
||||
follow planned and in-progress work for upcoming releases.
|
||||
* [Github Discussion](https://github.com/dogecoin/dogecoin/discussions) is used
|
||||
to discuss features, planned and unplanned, related to both the development of
|
||||
the Dogecoin Core software, the underlying protocols and the DOGE asset.
|
||||
* [Dogecoindev subreddit](https://www.reddit.com/r/dogecoindev/)
|
||||
|
||||
### Version strategy
|
||||
#### Version strategy
|
||||
Version numbers are following ```major.minor.patch``` semantics.
|
||||
|
||||
### Branches
|
||||
#### Branches
|
||||
There are 3 types of branches in this repository:
|
||||
|
||||
- **master:** Stable, contains the latest version of the latest *major.minor* release.
|
||||
- **maintenance:** Stable, contains the latest version of previous releases, which are still under active maintenance. Format: ```<version>-maint```
|
||||
- **development:** Unstable, contains new code for planned releases. Format: ```<version>-dev```
|
||||
|
||||
*Master and maintenance branches are exclusively mutable by release. Planned*
|
||||
*releases will always have a development branch and pull requests should be*
|
||||
*submitted against those. Maintenance branches are there for **bug fixes only,***
|
||||
*please submit new features against the development branch with the highest version.*
|
||||
*Master and maintenance branches are exclusively mutable by release. Planned releases will always have a development branch and pull requests should be submitted against those. Maintenance branches are there for* ***bug fixes only,*** *please submit new features against the development branch with the highest version.*
|
||||
|
||||
## Contributing 🤝
|
||||
## Very Much Frequently Asked Questions
|
||||
|
||||
If you find a bug or experience issues with this software, please report it
|
||||
using the [issue system](https://github.com/dogecoin/dogecoin/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5Bbug%5D+).
|
||||
### How much doge can exist? – So many puppies!
|
||||
Early 2015 (approximately a year and a half after release) there will be approximately 100,000,000,000 coins.
|
||||
Each subsequent block will grant 10,000 coins to encourage miners to continue to secure the network and make up for lost wallets on hard drives/phones/lost encryption passwords/etc.
|
||||
|
||||
Please see [the contribution guide](CONTRIBUTING.md) to see how you can
|
||||
participate in the development of Dogecoin Core. There are often
|
||||
[topics seeking help](https://github.com/dogecoin/dogecoin/labels/help%20wanted)
|
||||
where your contributions will have high impact and get very appreciation. wow.
|
||||
### How to get doge? – To the moon!
|
||||
Dogecoin uses a simplified variant of the scrypt key derivation function as its proof of work with a target time of one minute per block and difficulty readjustment after every block. The block rewards are fixed and halve every 100,000 blocks. Starting with the 600,000th block, a permanent reward of 10,000 Dogecoin per block will be paid.
|
||||
|
||||
## Communities 🚀🍾
|
||||
Originally, a different payout scheme was envisioned with block rewards being determined by taking the maximum reward as per the block schedule and applying the result of a Mersenne Twister pseudo-random number generator to arrive at a number between 0 and the maximum reward. This was changed, starting with block 145,000, to prevent large pools from gaming the system and mining only high reward blocks. At the same time, the difficulty retargeting was also changed from four hours to once per block (every minute), implementing an algorithm courtesy of the DigiByte Coin development team, to lessen the impact of sudden increases and decreases of network hashing rate.
|
||||
|
||||
You can join the communities on different social media.
|
||||
To see what's going on, meet people & discuss, find the lastest meme, learn
|
||||
about Dogecoin, give or ask for help, to share your project.
|
||||
The current block reward schedule:
|
||||
|
||||
Here are some places to visit:
|
||||
1–99,999: 0–1,000,000 Dogecoin
|
||||
|
||||
* [Dogecoin subreddit](https://www.reddit.com/r/dogecoin/)
|
||||
* [Dogeducation subreddit](https://www.reddit.com/r/dogeducation/)
|
||||
* [Discord](https://discord.gg/dogecoin)
|
||||
* [Dogecoin Twitter](https://twitter.com/dogecoin)
|
||||
100,000–144,999: 0–500,000 Dogecoin
|
||||
|
||||
## Very Much Frequently Asked Questions ❓
|
||||
145,000–199,999: 250,000 Dogecoin
|
||||
|
||||
Do you have a question regarding Dogecoin? An answer is perhaps already in the
|
||||
[FAQ](doc/FAQ.md) or the
|
||||
[Q&A section](https://github.com/dogecoin/dogecoin/discussions/categories/q-a)
|
||||
of the discussion board!
|
||||
200,000–299,999: 125,000 Dogecoin
|
||||
|
||||
## License - Much license ⚖️
|
||||
Dogecoin Core is released under the terms of the MIT license. See
|
||||
[COPYING](COPYING) for more information or see
|
||||
[opensource.org](https://opensource.org/licenses/MIT)
|
||||
300,000–399,999: 62,500 Dogecoin
|
||||
|
||||
400,000–499,999: 31,250 Dogecoin
|
||||
|
||||
500,000–599,999: 15,625 Dogecoin
|
||||
|
||||
600,000+: 10,000 Dogecoin
|
||||
|
||||
The original block reward schedule, with one-minute block targets and four-hour difficulty readjustment:
|
||||
|
||||
1–99,999: 0–1,000,000 Dogecoin
|
||||
|
||||
100,000–199,999: 0–500,000 Dogecoin
|
||||
|
||||
200,000–299,999: 0–250,000 Dogecoin
|
||||
|
||||
300,000–399,999: 0–125,000 Dogecoin
|
||||
|
||||
400,000–499,999: 0–62,500 Dogecoin
|
||||
|
||||
500,000–599,999: 0–31,250 Dogecoin
|
||||
|
||||
600,000+: 10,000 Dogecoin
|
||||
|
||||
### Wow plz make dogecoind/dogecoin-cli/dogecoin-qt
|
||||
|
||||
The following are developer notes on how to build Dogecoin on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
|
||||
|
||||
- [OSX Build Notes](doc/build-osx.md)
|
||||
- [Unix Build Notes](doc/build-unix.md)
|
||||
- [Windows Build Notes](doc/build-msw.md)
|
||||
|
||||
### Such ports
|
||||
RPC 22555
|
||||
P2P 22556
|
||||
|
||||
![](http://dogesay.com/wow//////such/coin)
|
||||
|
||||
Translations
|
||||
------------
|
||||
|
||||
Changes to translations, as well as new translations, can be submitted to
|
||||
[Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/bitcoin/).
|
||||
|
||||
Periodically the translations are pulled from Transifex and merged into the git repository. See the
|
||||
[translation process](doc/translation_process.md) for details on how this works.
|
||||
|
||||
If the changes are Dogecoin specific, they can be submitted as pull requests against this repository.
|
||||
If it is a general translation, consider submitting it through upstream, as we will pull these changes later on.
|
||||
|
||||
Development tips and tricks
|
||||
---------------------------
|
||||
|
||||
**compiling for debugging**
|
||||
|
||||
Run configure with the --enable-debug option, then make. Or run configure with
|
||||
CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need.
|
||||
|
||||
**debug.log**
|
||||
|
||||
If the code is behaving strangely, take a look in the debug.log file in the data directory;
|
||||
error and debugging messages are written there.
|
||||
|
||||
The -debug=... command-line option controls debugging; running with just -debug will turn
|
||||
on all categories (and give you a very large debug.log file).
|
||||
|
||||
The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt
|
||||
to see it.
|
||||
|
||||
**testnet and regtest modes**
|
||||
|
||||
Run with the -testnet option to run with "play dogecoins" on the test network, if you
|
||||
are testing multi-machine code that needs to operate across the internet.
|
||||
|
||||
If you are testing something that can run on one machine, run with the -regtest option.
|
||||
In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
|
||||
that run in -regtest mode.
|
||||
|
||||
**DEBUG_LOCKORDER**
|
||||
|
||||
Dogecoin Core is a multithreaded application, and deadlocks or other multithreading bugs
|
||||
can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure
|
||||
CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of which locks
|
||||
are held, and adds warnings to the debug.log file if inconsistencies are detected.
|
||||
|
|
125
README_zh_CN.md
125
README_zh_CN.md
|
@ -1,125 +0,0 @@
|
|||
# 狗狗币核心 (Dogecoin Core) [DOGE, Ð]
|
||||
|
||||
![Dogecoin](https://static.tumblr.com/ppdj5y9/Ae9mxmxtp/300coin.png)
|
||||
|
||||
[![Build Status](https://travis-ci.com/dogecoin/dogecoin.svg?branch=master)](https://travis-ci.com/dogecoin/dogecoin)
|
||||
|
||||
选择文档语言: [英文](../README.md) | 简体中文 | [其他语言...](./README_zh_CN.md)
|
||||
|
||||
尽管狗狗币不使用SHA256作为它的工作量证明(POW),狗狗币也是一款类似Bitcoin的加密货币。受到Tenebrix和Litecoin的影响,狗狗币目前采用一种更简洁的加密方式。
|
||||
- **网址:** [dogecoin.com.](https://dogecoin.com)
|
||||
|
||||
## 证书 – 炫酷的证书 ⚖️
|
||||
狗狗币在MIT liscence的条款下发行。详情请参见
|
||||
[COPYING](COPYING) 或者
|
||||
[opensource.org](https://opensource.org/licenses/MIT)。
|
||||
|
||||
## 开发和贡献 – omg 开发者
|
||||
目前的研发还在进行中,开发团队以及其他志愿者可以随意通过自己的代码库分支发布pull request。
|
||||
|
||||
#### 版本说明
|
||||
版本号码遵循以下语法:```major.minor.patch```。
|
||||
|
||||
#### 代码库分支(branch)
|
||||
本代码库有3个branch:
|
||||
|
||||
- **master(主代码库):** 稳定。包含最新版本的release,以*major.minor*形式呈现。
|
||||
- **maintenance(维护代码库):** 稳定。包含正在维护中的上一个release的最新版本。格式: ```<version>-maint```
|
||||
- **development(正在开发代码库):** 不稳定。包含下一个release的最新代码。格式: ```<version>-dev```
|
||||
|
||||
*Master 和 maintenance 互不干扰。最新release永远包含一个development分支。新的 pull request 应该发布于此。Maintenance 分支**只能用于调试程序**。请将新开发的功能发布在 development 分支的最高版本。*
|
||||
|
||||
#### 贡献 ✍️
|
||||
|
||||
鼓励开发者为新代码来创建自己的[单元测试](src/test/README.md),或者为旧代码发布新的单元测试。用如下指令编译并运行单元测试(仅限于单元测试在配置中没有被禁用):`make check`。更多关于运行和开发单元测试的信息请查看:[/src/test/README.md](/src/test/README.md).
|
||||
|
||||
RPC界面上还有由Python编写的[回归和整合测试(regression and integration tests)](/qa) ,可以在build服务器上自动运行。这些测试还可以通过以下指令来运行:`qa/pull-tester/rpc-tests.py`(前提是已经安装了[测试依赖文件(test dependencies)](/qa))。
|
||||
|
||||
代码的改变还应该由除开发者之外的其他人员进行测试。这一点对于大段改动和高危变化尤其重要。建议在pull request的描述中加入测试文档(test plan),如果测试方式并不很直接。
|
||||
|
||||
## 灰常常见的问题 ❓
|
||||
|
||||
### 到底一共可以有多少狗狗币? – 狗狗多多! 🐕
|
||||
截至2015年初(大概发行一年半的时间)会有100,000,000,000狗狗币。
|
||||
之后的每个区块(block)将会带来10,000狗狗币来激励矿工们持续输出,增加挖矿的安全性并且对因丢失的钱包、硬盘、手机、密码等而丢失的狗狗币做出相应弥补。
|
||||
|
||||
### 挖矿须知 ⛏
|
||||
|
||||
狗狗币采用一种简化版的密钥派生函数作为它的工作量证明。目标时间为每分钟产出一个区块,每产出一个区块后都会进行难度值调整。区块奖励是固定的,且每产出100,000个区块就会减半。从第600,000个区块开始,每产出一个区块的奖励会固定在10,000个狗狗币。
|
||||
|
||||
起初,我们设想了一种不同的支付方式,由Mersenne Twister伪随机数生成器在0到区块计划相应的最大区块奖励中生成一个随机数作为区块奖励。
|
||||
|
||||
然而在第145,000区块上,为了防止大矿池钻空子只挖高奖励的区块,这种方案就不适用了。与此同时,难度值调整也从每4小时变为每个区块产生(每分钟)更改一次,使用的是DigiByte Coin开发团队的一个算法,以减少狗狗币网络中哈希率突然增大或减少带来的影响。
|
||||
|
||||
**目前的区块奖励机制:**
|
||||
|
||||
1–99,999: 0–1,000,000 Dogecoin
|
||||
|
||||
100,000–144,999: 0–500,000 Dogecoin
|
||||
|
||||
145,000–199,999: 250,000 Dogecoin
|
||||
|
||||
200,000–299,999: 125,000 Dogecoin
|
||||
|
||||
300,000–399,999: 62,500 Dogecoin
|
||||
|
||||
400,000–499,999: 31,250 Dogecoin
|
||||
|
||||
500,000–599,999: 15,625 Dogecoin
|
||||
|
||||
600,000+: 10,000 Dogecoin
|
||||
|
||||
**原先的区块奖励机制(一分钟区块和四小时难度调整):**
|
||||
|
||||
1–99,999: 0–1,000,000 Dogecoin
|
||||
|
||||
100,000–199,999: 0–500,000 Dogecoin
|
||||
|
||||
200,000–299,999: 0–250,000 Dogecoin
|
||||
|
||||
300,000–399,999: 0–125,000 Dogecoin
|
||||
|
||||
400,000–499,999: 0–62,500 Dogecoin
|
||||
|
||||
500,000–599,999: 0–31,250 Dogecoin
|
||||
|
||||
600,000+: 10,000 Dogecoin
|
||||
|
||||
### 请编译我吧 / Wow plz make dogecoind/dogecoin-cli/dogecoin-qt
|
||||
|
||||
以下是开发者的笔记,教你如何在你自己的平台上搭建狗狗币。这些不是什么权威指南,但包含了必要的libary, 编译flag 等等。
|
||||
|
||||
- [OSX Build Notes](doc/build-osx.md)
|
||||
- [Unix Build Notes](doc/build-unix.md)
|
||||
- [Windows Build Notes](doc/build-windows.md)
|
||||
|
||||
### 端口们
|
||||
|
||||
- RPC 22555
|
||||
- P2P 22556
|
||||
|
||||
## 开发贴士与技巧
|
||||
|
||||
**调试编译**
|
||||
|
||||
运行 `configure`, 应用 `--enable-debug` 选项, 然后 `make`. 或者运行 `configure` 应用
|
||||
`CXXFLAGS="-g -ggdb -O0"` 或者其他你需要的flag。
|
||||
|
||||
**debug.log**
|
||||
|
||||
如果代码表现得很诡异,看一眼data路径下的debug.log;错误信息和调试消息都在这里。
|
||||
|
||||
`-debug=...`这个选项代表调试模式;带着这个flag去运行会打开所有的类别(并输出一个非常大的debug.log文件)。
|
||||
|
||||
Qt代码把 `qDebug()` 放到qt类别下的debug.log文件里;使用方式`-debug=qt`。
|
||||
|
||||
**测试链(testnet)和私有网络(regtest)模式**
|
||||
|
||||
如果你在通过因特网测试跨机代码,在测试链上运行`-testnet`来运行“开始使用狗狗币”。
|
||||
|
||||
如果你在测试单机代码,用`-regtest`运行。
|
||||
在回归测试模式下,区块可以随时被按需制造出来;参见qa/rpc-tests/。
|
||||
|
||||
**DEBUG_LOCKORDER**
|
||||
|
||||
狗狗币核心是一个多线程应用,碰到死锁和其他多线程问题都会很难找到原因。如果在代码中发现了不一致的地方,使用-DDEBUG_LOCKORDER编译 (configure CXXFLAGS="-DDEBUG_LOCKORDER -g")会在运行时插入检查语句来检测哪些进程被锁定,并把警告加入debug.log文件中。
|
|
@ -1,8 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2013-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
set -e
|
||||
srcdir="$(dirname $0)"
|
||||
cd "$srcdir"
|
||||
|
@ -10,6 +6,4 @@ if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
|
|||
LIBTOOLIZE="${GLIBTOOLIZE}"
|
||||
export LIBTOOLIZE
|
||||
fi
|
||||
which autoreconf >/dev/null || \
|
||||
(echo "configuration failed, please install autoconf first" && exit 1)
|
||||
autoreconf --install --force --warnings=all
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 27
|
||||
#serial 23
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
|
@ -95,7 +95,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
ppc64|s390x|sparc64|aarch64)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
;;
|
||||
esac
|
||||
|
@ -170,7 +170,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
],[:
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
|
@ -179,10 +179,6 @@ if test "x$want_boost" = "xyes"; then
|
|||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
BOOST_LDFLAGS=
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
|
@ -195,12 +191,6 @@ if test "x$want_boost" = "xyes"; then
|
|||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
|
@ -263,7 +253,7 @@ if test "x$want_boost" = "xyes"; then
|
|||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
],[:
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 24
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
||||
[
|
||||
|
@ -63,9 +63,9 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
|||
AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
|
||||
ax_cv_boost_program_options,
|
||||
[AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options/errors.hpp>
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
|
||||
]],
|
||||
[[boost::program_options::error err("Error message");
|
||||
[[boost::program_options::options_description generic("Generic options");
|
||||
return 0;]])],
|
||||
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
|
||||
AC_LANG_POP([C++])
|
||||
|
@ -74,6 +74,7 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
|||
AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_program_options_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 18
|
||||
#serial 17
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
|
@ -68,10 +68,9 @@ AC_DEFUN([AX_BOOST_SYSTEM],
|
|||
ax_cv_boost_system,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
CXXFLAGS=
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
|
||||
[[boost::system::error_category *a = 0;]])],
|
||||
[[boost::system::system_category]])],
|
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
|
@ -19,8 +19,6 @@
|
|||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
|
@ -55,19 +53,19 @@
|
|||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
|
@ -19,8 +19,6 @@
|
|||
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
|
||||
# issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_LINK_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
|
||||
#
|
||||
|
@ -55,19 +53,18 @@
|
|||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_CHECK_LINK_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
|
||||
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $4 $1"
|
||||
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
LDFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
|
@ -19,8 +19,6 @@
|
|||
# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the
|
||||
# preprocessor to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_PREPROC_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG.
|
||||
#
|
||||
|
@ -55,19 +53,19 @@
|
|||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $4 $1"
|
||||
AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
CPPFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
|
|
|
@ -1,568 +0,0 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
|
||||
# or '14' (for the C++14 standard).
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
# required and that the macro should error out if no mode with that
|
||||
# support is found. If specified 'optional', then configuration proceeds
|
||||
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||
# supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 4
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [],
|
||||
[$1], [14], [],
|
||||
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
[$2], [noext], [],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
m4_if([$4], [], [ax_cxx_compile_cxx$1_try_default=true],
|
||||
[$4], [default], [ax_cxx_compile_cxx$1_try_default=true],
|
||||
[$4], [nodefault], [ax_cxx_compile_cxx$1_try_default=false],
|
||||
[m4_fatal([invalid fourth argument `$4' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
|
||||
m4_if([$4], [nodefault], [], [dnl
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
|
||||
ax_cv_cxx_compile_cxx$1,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[ax_cv_cxx_compile_cxx$1=yes],
|
||||
[ax_cv_cxx_compile_cxx$1=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
|
||||
ac_success=yes
|
||||
fi])
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++$1 -std=gnu++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$2], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
else
|
||||
HAVE_CXX$1=1
|
||||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
])
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_seperators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
|
@ -31,7 +31,6 @@
|
|||
# cold
|
||||
# const
|
||||
# constructor
|
||||
# constructor_priority for constructor attribute with priority
|
||||
# deprecated
|
||||
# destructor
|
||||
# dllexport
|
||||
|
@ -74,7 +73,7 @@
|
|||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 3
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
|
@ -104,9 +103,6 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
|||
[const], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[constructor_priority], [
|
||||
int foo( void ) __attribute__((__constructor__(65535/2)));
|
||||
],
|
||||
[constructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
|
@ -184,8 +180,6 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
|||
[visibility], [
|
||||
int foo_def( void ) __attribute__(($1("default")));
|
||||
int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
int foo_int( void ) __attribute__(($1("internal")));
|
||||
int foo_pro( void ) __attribute__(($1("protected")));
|
||||
],
|
||||
[warning], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
# is necessary on AIX to use the special cc_r compiler alias.)
|
||||
#
|
||||
# NOTE: You are assumed to not only compile your program with these flags,
|
||||
# but also to link with them as well. For example, you might link with
|
||||
# but also link it with them as well. e.g. you should link with
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threaded programs, you may wish to use these
|
||||
# If you are only building threads programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
@ -30,8 +30,8 @@
|
|||
# CC="$PTHREAD_CC"
|
||||
#
|
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
|
||||
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
|
||||
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||
#
|
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||
|
@ -82,40 +82,35 @@
|
|||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 23
|
||||
#serial 21
|
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||
AC_DEFUN([AX_PTHREAD], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
AC_LANG_PUSH([C])
|
||||
ax_pthread_ok=no
|
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h
|
||||
# requires special compiler flags (e.g. on Tru64 or Sequent).
|
||||
# requires special compiler flags (e.g. on True64 or Sequent).
|
||||
# It gets checked for in the link test anyway.
|
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
||||
# etcetera environment variables, and if threads linking works using
|
||||
# them:
|
||||
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
|
||||
ax_pthread_save_CC="$CC"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
|
||||
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
|
||||
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
||||
AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
if test x"$ax_pthread_ok" = xno; then
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
CC="$ax_pthread_save_CC"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
|
@ -128,7 +123,7 @@ fi
|
|||
# which indicates that we try without any flags at all, and "pthread-config"
|
||||
# which is a program returning the flags for the Pth emulation library.
|
||||
|
||||
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
|
@ -137,225 +132,82 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --
|
|||
# none: in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
|
||||
# (Note: HP C rejects this with "bad form for `-t' option")
|
||||
# -pthreads: Solaris/gcc (Note: HP C also rejects)
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads and
|
||||
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
|
||||
# is present but should not be used directly; and before -mthreads,
|
||||
# because the compiler interprets this as "-mt" + "-hreads")
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
||||
# -pthreads: Solaris/gcc
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads too;
|
||||
# also defines -D_REENTRANT)
|
||||
# ... -mt is also the pthreads flag for HP/aCC
|
||||
# pthread: Linux, etcetera
|
||||
# --thread-safe: KAI C++
|
||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||
|
||||
case $host_os in
|
||||
|
||||
freebsd*)
|
||||
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
|
||||
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
hpux*)
|
||||
|
||||
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
|
||||
# multi-threading and also sets -lpthread."
|
||||
|
||||
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
openedition*)
|
||||
|
||||
# IBM z/OS requires a feature-test macro to be defined in order to
|
||||
# enable POSIX threads at all, so give the user a hint if this is
|
||||
# not set. (We don't define these ourselves, as they can affect
|
||||
# other portions of the system API in unpredictable ways.)
|
||||
|
||||
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
|
||||
[
|
||||
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
|
||||
AX_PTHREAD_ZOS_MISSING
|
||||
# endif
|
||||
],
|
||||
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
|
||||
;;
|
||||
|
||||
case ${host_os} in
|
||||
solaris*)
|
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (N.B.: The stubs are missing
|
||||
# pthread_cleanup_push, or rather a function called by this macro,
|
||||
# so we could check for that, but who knows whether they'll stub
|
||||
# that too in a future libc.) So we'll check first for the
|
||||
# standard Solaris way of linking pthreads (-mt -lpthread).
|
||||
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
||||
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
||||
# a function called by this macro, so we could check for that, but
|
||||
# who knows whether they'll stub that too in a future libc.) So,
|
||||
# we'll just look for -pthreads and -lpthread first:
|
||||
|
||||
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
|
||||
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
darwin*)
|
||||
ax_pthread_flags="-pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
||||
# Clang doesn't consider unrecognized options an error unless we specify
|
||||
# -Werror. We throw in some extra Clang-specific options to ensure that
|
||||
# this doesn't happen for GCC, which also accepts -Werror.
|
||||
|
||||
AS_IF([test "x$GCC" = "xyes"],
|
||||
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
|
||||
AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
|
||||
save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_extra_flags="-Werror"
|
||||
CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[ax_pthread_extra_flags=
|
||||
AC_MSG_RESULT([no])])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# The presence of a feature test macro requesting re-entrant function
|
||||
# definitions is, on some systems, a strong hint that pthreads support is
|
||||
# correctly enabled
|
||||
if test x"$ax_pthread_ok" = xno; then
|
||||
for flag in $ax_pthread_flags; do
|
||||
|
||||
case $host_os in
|
||||
darwin* | hpux* | linux* | osf* | solaris*)
|
||||
ax_pthread_check_macro="_REENTRANT"
|
||||
;;
|
||||
|
||||
aix*)
|
||||
ax_pthread_check_macro="_THREAD_SAFE"
|
||||
;;
|
||||
|
||||
*)
|
||||
ax_pthread_check_macro="--"
|
||||
;;
|
||||
esac
|
||||
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
|
||||
[ax_pthread_check_cond=0],
|
||||
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
|
||||
|
||||
# Are we compiling with Clang?
|
||||
|
||||
AC_CACHE_CHECK([whether $CC is Clang],
|
||||
[ax_cv_PTHREAD_CLANG],
|
||||
[ax_cv_PTHREAD_CLANG=no
|
||||
# Note that Autoconf sets GCC=yes for Clang as well as GCC
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
|
||||
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
|
||||
# if defined(__clang__) && defined(__llvm__)
|
||||
AX_PTHREAD_CC_IS_CLANG
|
||||
# endif
|
||||
],
|
||||
[ax_cv_PTHREAD_CLANG=yes])
|
||||
fi
|
||||
])
|
||||
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
|
||||
|
||||
ax_pthread_clang_warning=no
|
||||
|
||||
# Clang needs special handling, because older versions handle the -pthread
|
||||
# option in a rather... idiosyncratic way
|
||||
|
||||
if test "x$ax_pthread_clang" = "xyes"; then
|
||||
|
||||
# Clang takes -pthread; it has never supported any other flag
|
||||
|
||||
# (Note 1: This will need to be revisited if a system that Clang
|
||||
# supports has POSIX threads in a separate library. This tends not
|
||||
# to be the way of modern systems, but it's conceivable.)
|
||||
|
||||
# (Note 2: On some systems, notably Darwin, -pthread is not needed
|
||||
# to get POSIX threads support; the API is always present and
|
||||
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
|
||||
# -pthread does define _REENTRANT, and while the Darwin headers
|
||||
# ignore this macro, third-party headers might not.)
|
||||
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
PTHREAD_LIBS=
|
||||
|
||||
ax_pthread_ok=yes
|
||||
|
||||
# However, older versions of Clang make a point of warning the user
|
||||
# that, in an invocation where only linking and no compilation is
|
||||
# taking place, the -pthread option has no effect ("argument unused
|
||||
# during compilation"). They expect -pthread to be passed in only
|
||||
# when source code is being compiled.
|
||||
#
|
||||
# Problem is, this is at odds with the way Automake and most other
|
||||
# C build frameworks function, which is that the same flags used in
|
||||
# compilation (CFLAGS) are also used in linking. Many systems
|
||||
# supported by AX_PTHREAD require exactly this for POSIX threads
|
||||
# support, and in fact it is often not straightforward to specify a
|
||||
# flag that is used only in the compilation phase and not in
|
||||
# linking. Such a scenario is extremely rare in practice.
|
||||
#
|
||||
# Even though use of the -pthread flag in linking would only print
|
||||
# a warning, this can be a nuisance for well-run software projects
|
||||
# that build with -Werror. So if the active version of Clang has
|
||||
# this misfeature, we search for an option to squash it.
|
||||
|
||||
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
|
||||
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
|
||||
# Create an alternate version of $ac_link that compiles and
|
||||
# links in two steps (.c -> .o, .o -> exe) instead of one
|
||||
# (.c -> exe), because the warning occurs only in the second
|
||||
# step
|
||||
ax_pthread_save_ac_link="$ac_link"
|
||||
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
|
||||
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
|
||||
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
|
||||
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
|
||||
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[ac_link="$ax_pthread_2step_ac_link"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
|
||||
[break])
|
||||
])
|
||||
done
|
||||
ac_link="$ax_pthread_save_ac_link"
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
|
||||
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
|
||||
])
|
||||
|
||||
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
|
||||
no | unknown) ;;
|
||||
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
|
||||
esac
|
||||
|
||||
fi # $ax_pthread_clang = yes
|
||||
|
||||
if test "x$ax_pthread_ok" = "xno"; then
|
||||
for ax_pthread_try_flag in $ax_pthread_flags; do
|
||||
|
||||
case $ax_pthread_try_flag in
|
||||
case $flag in
|
||||
none)
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
-mt,pthread)
|
||||
AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
|
||||
PTHREAD_CFLAGS="-mt"
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
;;
|
||||
|
||||
-*)
|
||||
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
|
||||
PTHREAD_CFLAGS="$ax_pthread_try_flag"
|
||||
AC_MSG_CHECKING([whether pthreads work with $flag])
|
||||
PTHREAD_CFLAGS="$flag"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
||||
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
|
||||
if test x"$ax_pthread_config" = xno; then continue; fi
|
||||
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
|
||||
PTHREAD_LIBS="-l$ax_pthread_try_flag"
|
||||
AC_MSG_CHECKING([for the pthreads library -l$flag])
|
||||
PTHREAD_LIBS="-l$flag"
|
||||
;;
|
||||
esac
|
||||
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
|
@ -366,11 +218,7 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
|
|||
# pthread_cleanup_push because it is one of the few pthread
|
||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||
# We try pthread_create on general principles.
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
||||
# if $ax_pthread_check_cond
|
||||
# error "$ax_pthread_check_macro must be defined"
|
||||
# endif
|
||||
static void routine(void *a) { a = 0; }
|
||||
static void *start_routine(void *a) { return a; }],
|
||||
[pthread_t th; pthread_attr_t attr;
|
||||
|
@ -379,14 +227,16 @@ for ax_pthread_try_flag in $ax_pthread_flags; do
|
|||
pthread_attr_init(&attr);
|
||||
pthread_cleanup_push(routine, 0);
|
||||
pthread_cleanup_pop(0) /* ; */])],
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
|
||||
if test "x$ax_pthread_ok" = xyes; then
|
||||
break;
|
||||
fi
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
|
@ -394,74 +244,71 @@ done
|
|||
fi
|
||||
|
||||
# Various other checks:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
if test "x$ax_pthread_ok" = xyes; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||
AC_CACHE_CHECK([for joinable pthread attribute],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
|
||||
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[int attr = $ax_pthread_attr; return attr /* ; */])],
|
||||
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
|
||||
[])
|
||||
done
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
|
||||
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
|
||||
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
|
||||
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
|
||||
[$ax_cv_PTHREAD_JOINABLE_ATTR],
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
ax_pthread_joinable_attr_defined=yes
|
||||
])
|
||||
AC_MSG_CHECKING([for joinable pthread attribute])
|
||||
attr_name=unknown
|
||||
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[int attr = $attr; return attr /* ; */])],
|
||||
[attr_name=$attr; break],
|
||||
[])
|
||||
done
|
||||
AC_MSG_RESULT([$attr_name])
|
||||
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
||||
AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether more special flags are required for pthreads],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS],
|
||||
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
|
||||
case $host_os in
|
||||
solaris*)
|
||||
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
|
||||
test "x$ax_pthread_special_flags_added" != "xyes"],
|
||||
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
|
||||
ax_pthread_special_flags_added=yes])
|
||||
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
||||
flag=no
|
||||
case ${host_os} in
|
||||
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
|
||||
osf* | hpux*) flag="-D_REENTRANT";;
|
||||
solaris*)
|
||||
if test "$GCC" = "yes"; then
|
||||
flag="-D_REENTRANT"
|
||||
else
|
||||
# TODO: What about Clang on Solaris?
|
||||
flag="-mt -D_REENTRANT"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$flag])
|
||||
if test "x$flag" != xno; then
|
||||
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
||||
[[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
|
||||
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
|
||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
|
||||
ax_pthread_prio_inherit_defined=yes
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
|
||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# More AIX lossage: compile with *_r variant
|
||||
if test "x$GCC" != "xyes"; then
|
||||
if test "x$GCC" != xyes; then
|
||||
case $host_os in
|
||||
aix*)
|
||||
AS_CASE(["x/$CC"],
|
||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
||||
[#handle absolute path differently from PATH based program lookup
|
||||
AS_CASE(["x$CC"],
|
||||
[x/*],
|
||||
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
||||
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
||||
[#handle absolute path differently from PATH based program lookup
|
||||
AS_CASE(["x$CC"],
|
||||
[x/*],
|
||||
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
||||
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -474,7 +321,7 @@ AC_SUBST([PTHREAD_CFLAGS])
|
|||
AC_SUBST([PTHREAD_CC])
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test "x$ax_pthread_ok" = "xyes"; then
|
||||
if test x"$ax_pthread_ok" = xyes; then
|
||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
||||
:
|
||||
else
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
dnl Copyright (c) 2013-2015 The Bitcoin Core developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
AC_DEFUN([BITCOIN_FIND_BDB48],[
|
||||
AC_ARG_VAR(BDB_CFLAGS, [C compiler flags for BerkeleyDB, bypasses autodetection])
|
||||
AC_ARG_VAR(BDB_LIBS, [Linker flags for BerkeleyDB, bypasses autodetection])
|
||||
|
||||
if test "x$BDB_CFLAGS" = "x"; then
|
||||
AC_MSG_CHECKING([for Berkeley DB C++ headers])
|
||||
BDB_CPPFLAGS=
|
||||
bdbpath=X
|
||||
bdb48path=X
|
||||
bdbdirlist=
|
||||
for _vn in 4.8 48 4 5 ''; do
|
||||
for _pfx in b lib ''; do
|
||||
bdbdirlist="$bdbdirlist ${_pfx}db${_vn}"
|
||||
done
|
||||
done
|
||||
for searchpath in $bdbdirlist ''; do
|
||||
test -n "${searchpath}" && searchpath="${searchpath}/"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4)
|
||||
#error "failed to find bdb 4.8+"
|
||||
#endif
|
||||
]])],[
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
bdbpath="${searchpath}"
|
||||
fi
|
||||
],[
|
||||
continue
|
||||
])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)
|
||||
#error "failed to find bdb 4.8"
|
||||
#endif
|
||||
]])],[
|
||||
bdb48path="${searchpath}"
|
||||
break
|
||||
],[])
|
||||
done
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
elif test "x$bdb48path" = "xX"; then
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
|
||||
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
|
||||
AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!])
|
||||
],[
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
])
|
||||
else
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
|
||||
bdbpath="${bdb48path}"
|
||||
fi
|
||||
else
|
||||
BDB_CPPFLAGS=${BDB_CFLAGS}
|
||||
fi
|
||||
AC_SUBST(BDB_CPPFLAGS)
|
||||
|
||||
if test "x$BDB_LIBS" = "x"; then
|
||||
# TODO: Ideally this could find the library version and make sure it matches the headers being used
|
||||
for searchlib in db_cxx-4.8 db_cxx; do
|
||||
AC_CHECK_LIB([$searchlib],[main],[
|
||||
BDB_LIBS="-l${searchlib}"
|
||||
break
|
||||
])
|
||||
done
|
||||
if test "x$BDB_LIBS" = "x"; then
|
||||
AC_MSG_ERROR([libdb_cxx missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(BDB_LIBS)
|
||||
])
|
|
@ -1,7 +1,3 @@
|
|||
dnl Copyright (c) 2013-2016 The Bitcoin Core developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
dnl Helper for cases where a qt dependency is not met.
|
||||
dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
|
||||
AC_DEFUN([BITCOIN_QT_FAIL],[
|
||||
|
@ -54,7 +50,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[
|
|||
dnl enable qt support
|
||||
AC_ARG_WITH([gui],
|
||||
[AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
|
||||
[build bitcoin-qt GUI (default=auto, qt5 tried first)])],
|
||||
[build bitcoin-qt GUI (default=auto, qt4 tried first)])],
|
||||
[
|
||||
bitcoin_qt_want_version=$withval
|
||||
if test x$bitcoin_qt_want_version = xyes; then
|
||||
|
@ -110,37 +106,34 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
dnl results to QT_LIBS.
|
||||
BITCOIN_QT_CHECK([
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||
CPPFLAGS=$QT_INCLUDES
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
_BITCOIN_QT_IS_STATIC
|
||||
if test x$bitcoin_cv_static_qt = xyes; then
|
||||
_BITCOIN_QT_FIND_STATIC_PLUGINS
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||
AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],[[
|
||||
#if QT_VERSION >= 0x050400
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_need_acc_widget=yes],
|
||||
[bitcoin_cv_need_acc_widget=no])
|
||||
])
|
||||
if test "x$bitcoin_cv_need_acc_widget" = "xyes"; then
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/printsupport"
|
||||
fi
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
|
||||
fi
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)],[-lwindowsprintersupport])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
|
||||
elif test x$TARGET_OS = xlinux; then
|
||||
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
|
||||
elif test x$TARGET_OS = xdarwin; then
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
|
||||
fi
|
||||
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
|
||||
AX_CHECK_LINK_FLAG([[-lcups]],[QT_LIBS="$QT_LIBS -lcups"],[AC_MSG_ERROR(could not link against cups)])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
|
||||
fi
|
||||
|
@ -148,6 +141,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
else
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
|
||||
fi
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
|
||||
Q_IMPORT_PLUGIN(qcncodecs)
|
||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
||||
|
@ -159,7 +156,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
fi
|
||||
fi
|
||||
CPPFLAGS=$TEMP_CPPFLAGS
|
||||
CXXFLAGS=$TEMP_CXXFLAGS
|
||||
])
|
||||
|
||||
if test x$use_pkgconfig$qt_bin_path = xyes; then
|
||||
|
@ -168,43 +164,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
fi
|
||||
fi
|
||||
|
||||
if test x$use_hardening != xno; then
|
||||
BITCOIN_QT_CHECK([
|
||||
AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
|
||||
[[
|
||||
#if defined(QT_REDUCE_RELOCATIONS)
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ],
|
||||
[ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS]
|
||||
)
|
||||
CPPFLAGS=$TEMP_CPPFLAGS
|
||||
CXXFLAGS=$TEMP_CXXFLAGS
|
||||
])
|
||||
else
|
||||
BITCOIN_QT_CHECK([
|
||||
AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
|
||||
[[
|
||||
#if defined(QT_REDUCE_RELOCATIONS)
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[ AC_MSG_RESULT(no)],
|
||||
[ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS]
|
||||
)
|
||||
CPPFLAGS=$TEMP_CPPFLAGS
|
||||
])
|
||||
fi
|
||||
|
||||
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
|
||||
|
@ -228,7 +187,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
|
||||
|
||||
dnl enable qt support
|
||||
AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI)
|
||||
AC_MSG_CHECKING(whether to build Dogecoin Core GUI)
|
||||
BITCOIN_QT_CHECK([
|
||||
bitcoin_enable_qt=yes
|
||||
bitcoin_enable_qt_test=yes
|
||||
|
@ -250,7 +209,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||
])
|
||||
AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
|
||||
|
||||
AC_SUBST(QT_PIE_FLAGS)
|
||||
AC_SUBST(QT_INCLUDES)
|
||||
AC_SUBST(QT_LIBS)
|
||||
AC_SUBST(QT_LDFLAGS)
|
||||
|
@ -327,56 +285,6 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
|
|||
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
|
||||
])
|
||||
|
||||
dnl Internal. Find paths necessary for linking qt static plugins
|
||||
dnl Inputs: bitcoin_qt_got_major_vers. 4 or 5.
|
||||
dnl Inputs: qt_plugin_path. optional.
|
||||
dnl Outputs: QT_LIBS is appended
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
|
||||
if test -d "$qt_plugin_path/accessible"; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
fi
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/printsupport"
|
||||
fi
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
: dnl
|
||||
m4_ifdef([PKG_CHECK_MODULES],[
|
||||
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
|
||||
if test x$TARGET_OS = xlinux; then
|
||||
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
|
||||
if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
|
||||
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
|
||||
fi
|
||||
elif test x$TARGET_OS = xdarwin; then
|
||||
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
|
||||
fi
|
||||
])
|
||||
else
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],[[
|
||||
#if QT_VERSION < 0x050600
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_need_platformsupport=yes],
|
||||
[bitcoin_cv_need_platformsupport=no])
|
||||
])
|
||||
if test x$bitcoin_cv_need_platformsupport = xyes; then
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test x$qt_plugin_path != x; then
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Internal. Find Qt libraries using pkg-config.
|
||||
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check
|
||||
dnl first.
|
||||
|
@ -409,7 +317,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
|
|||
|
||||
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
|
||||
if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
|
||||
if test x$auto_priority_version = xqt5; then
|
||||
if test x$auto_priority_version = x$qt5; then
|
||||
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
|
||||
else
|
||||
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
|
||||
|
@ -439,8 +347,6 @@ dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
|||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||
TEMP_LIBS="$LIBS"
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$qt_include_path != x; then
|
||||
|
@ -478,10 +384,9 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
|||
])
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([jpeg_create_decompress] ,[qtjpeg jpeg],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([pcre16] ,[main],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
|
||||
|
@ -511,7 +416,6 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
|||
fi
|
||||
])
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
LIBS="$TEMP_LIBS"
|
||||
])
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
dnl Copyright (c) 2013-2014 The Bitcoin Core developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE])
|
||||
dnl SUBDIRECTORY-NAME must end with a path separator
|
||||
AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
AC_DEFUN([BITCOIN_FIND_BDB53],[
|
||||
AC_DEFUN([BITCOIN_FIND_BDB51],[
|
||||
AC_MSG_CHECKING([for Berkeley DB C++ headers])
|
||||
BDB_CPPFLAGS=
|
||||
BDB_LIBS=
|
||||
bdbpath=X
|
||||
bdb53path=X
|
||||
bdb51path=X
|
||||
bdbdirlist=
|
||||
for _vn in 5.3 53 5 ''; do
|
||||
for _vn in 5.1 51 5 ''; do
|
||||
for _pfx in b lib ''; do
|
||||
bdbdirlist="$bdbdirlist ${_pfx}db${_vn}"
|
||||
done
|
||||
|
@ -15,8 +15,8 @@ AC_DEFUN([BITCOIN_FIND_BDB53],[
|
|||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 3) || DB_VERSION_MAJOR > 5)
|
||||
#error "failed to find bdb 5.3+"
|
||||
#if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR > 5)
|
||||
#error "failed to find bdb 5.1+"
|
||||
#endif
|
||||
]])],[
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
|
@ -28,32 +28,32 @@ AC_DEFUN([BITCOIN_FIND_BDB53],[
|
|||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !(DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR == 3)
|
||||
#error "failed to find bdb 5.3"
|
||||
#if !(DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR == 1)
|
||||
#error "failed to find bdb 5.1"
|
||||
#endif
|
||||
]])],[
|
||||
bdb53path="${searchpath}"
|
||||
bdb51path="${searchpath}"
|
||||
break
|
||||
],[])
|
||||
done
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([libdb_cxx headers missing, Dogecoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
elif test "x$bdb53path" = "xX"; then
|
||||
elif test "x$bdb51path" = "xX"; then
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
|
||||
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
|
||||
AC_MSG_WARN([Found Berkeley DB other than 5.3; wallets opened by this build will not be portable!])
|
||||
AC_MSG_WARN([Found Berkeley DB other than 5.1; wallets opened by this build will not be portable!])
|
||||
],[
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 5.3, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 5.1, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
])
|
||||
else
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb53path}],db_cxx)
|
||||
bdbpath="${bdb53path}"
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
|
||||
bdbpath="${bdb51path}"
|
||||
fi
|
||||
AC_SUBST(BDB_CPPFLAGS)
|
||||
|
||||
# TODO: Ideally this could find the library version and make sure it matches the headers being used
|
||||
for searchlib in db_cxx-5.3 db_cxx; do
|
||||
for searchlib in db_cxx-5.1 db_cxx; do
|
||||
AC_CHECK_LIB([$searchlib],[main],[
|
||||
BDB_LIBS="-l${searchlib}"
|
||||
break
|
|
@ -1,46 +0,0 @@
|
|||
dnl Copyright (c) 2015 Tim Kosse <tim.kosse@filezilla-project.org>
|
||||
dnl Copying and distribution of this file, with or without modification, are
|
||||
dnl permitted in any medium without royalty provided the copyright notice
|
||||
dnl and this notice are preserved. This file is offered as-is, without any
|
||||
dnl warranty.
|
||||
|
||||
# Some versions of gcc/libstdc++ require linking with -latomic if
|
||||
# using the C++ atomic library.
|
||||
#
|
||||
# Sourced from http://bugs.debian.org/797228
|
||||
|
||||
m4_define([_CHECK_ATOMIC_testbody], [[
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
int main() {
|
||||
std::atomic<int64_t> a{};
|
||||
|
||||
int64_t v = 5;
|
||||
int64_t r = a.fetch_add(v);
|
||||
return static_cast<int>(r);
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([CHECK_ATOMIC], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_MSG_CHECKING([whether std::atomic can be used without link library])
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS="$LIBS -latomic"
|
||||
AC_MSG_CHECKING([whether std::atomic needs -latomic])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([cannot figure out how to use std::atomic])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP
|
||||
])
|
509
configure.ac
509
configure.ac
|
@ -1,24 +1,17 @@
|
|||
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 14)
|
||||
define(_CLIENT_VERSION_REVISION, 5)
|
||||
define(_CLIENT_VERSION_MINOR, 10)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2021)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core and Dogecoin Core]])
|
||||
AC_INIT([Dogecoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/dogecoin/dogecoin/issues],[dogecoin],[https://dogecoin.com/])
|
||||
AC_CONFIG_SRCDIR([src/validation.cpp])
|
||||
define(_COPYRIGHT_YEAR, 2015)
|
||||
AC_INIT([Dogecoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/dogecoin/dogecoin/issues],[dogecoin])
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([build-aux/m4])
|
||||
|
||||
BITCOIN_DAEMON_NAME=dogecoind
|
||||
BITCOIN_GUI_NAME=dogecoin-qt
|
||||
BITCOIN_CLI_NAME=dogecoin-cli
|
||||
BITCOIN_TX_NAME=dogecoin-tx
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AH_TOP([#ifndef BITCOIN_CONFIG_H])
|
||||
|
@ -45,6 +38,7 @@ else
|
|||
CXXFLAGS_overridden=no
|
||||
fi
|
||||
AC_PROG_CXX
|
||||
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
|
||||
|
||||
dnl By default, libtool for mingw refuses to link static libs into a dll for
|
||||
dnl fear of mixing pic/non-pic objects, and import/export complications. Since
|
||||
|
@ -54,20 +48,6 @@ case $host in
|
|||
lt_cv_deplibs_check_method="pass_all"
|
||||
;;
|
||||
esac
|
||||
dnl Require C++11 compiler (no GNU extensions)
|
||||
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault])
|
||||
dnl Check if -latomic is required for <std::atomic>
|
||||
CHECK_ATOMIC
|
||||
|
||||
dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
|
||||
dnl that we get the same -std flags for both.
|
||||
m4_ifdef([AC_PROG_OBJCXX],[
|
||||
if test "x${OBJCXX+set}" = "x"; then
|
||||
OBJCXX="${CXX}"
|
||||
fi
|
||||
AC_PROG_OBJCXX
|
||||
])
|
||||
|
||||
dnl Libtool init checks.
|
||||
LT_INIT([pic-only])
|
||||
|
||||
|
@ -77,23 +57,20 @@ AC_PATH_TOOL(RANLIB, ranlib)
|
|||
AC_PATH_TOOL(STRIP, strip)
|
||||
AC_PATH_TOOL(GCOV, gcov)
|
||||
AC_PATH_PROG(LCOV, lcov)
|
||||
dnl Python 3.x is supported from 3.4 on (see https://github.com/bitcoin/bitcoin/issues/7893)
|
||||
AC_PATH_PROGS([PYTHON], [python3.6 python3.5 python3.4 python3 python2.7 python2 python])
|
||||
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)
|
||||
AC_PATH_TOOL(READELF, readelf)
|
||||
AC_PATH_TOOL(CPPFILT, c++filt)
|
||||
AC_PATH_TOOL(OBJCOPY, objcopy)
|
||||
|
||||
AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
|
||||
dnl pkg-config check.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Enable wallet
|
||||
AC_ARG_ENABLE([wallet],
|
||||
[AS_HELP_STRING([--disable-wallet],
|
||||
[disable wallet (enabled by default)])],
|
||||
[AS_HELP_STRING([--enable-wallet],
|
||||
[enable wallet (default is yes)])],
|
||||
[enable_wallet=$enableval],
|
||||
[enable_wallet=yes])
|
||||
|
||||
|
@ -110,24 +87,19 @@ AC_ARG_ENABLE([upnp-default],
|
|||
[use_upnp_default=no])
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
|
||||
AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]),
|
||||
[use_tests=$enableval],
|
||||
[use_tests=yes])
|
||||
|
||||
AC_ARG_ENABLE(gui-tests,
|
||||
AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
|
||||
[use_gui_tests=$enableval],
|
||||
[use_gui_tests=$use_tests])
|
||||
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(bench,
|
||||
AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
|
||||
[use_bench=$enableval],
|
||||
[use_bench=yes])
|
||||
|
||||
AC_ARG_ENABLE([extended-rpc-tests],
|
||||
AS_HELP_STRING([--enable-extended-rpc-tests],[enable expensive RPC tests when using lcov (default no)]),
|
||||
[use_extended_rpc_tests=$enableval],
|
||||
[use_extended_rpc_tests=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],
|
||||
|
@ -136,8 +108,8 @@ AC_ARG_WITH([qrencode],
|
|||
[use_qr=auto])
|
||||
|
||||
AC_ARG_ENABLE([hardening],
|
||||
[AS_HELP_STRING([--disable-hardening],
|
||||
[do not attempt to harden the resulting executables (default is to harden)])],
|
||||
[AS_HELP_STRING([--enable-hardening],
|
||||
[attempt to harden the resulting executables (default is yes)])],
|
||||
[use_hardening=$enableval],
|
||||
[use_hardening=yes])
|
||||
|
||||
|
@ -148,8 +120,8 @@ AC_ARG_ENABLE([reduce-exports],
|
|||
[use_reduce_exports=no])
|
||||
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--disable-ccache],
|
||||
[do not use ccache for building (default is to use if found)])],
|
||||
[AS_HELP_STRING([--enable-ccache],
|
||||
[use ccache for building (default is yes if ccache is found)])],
|
||||
[use_ccache=$enableval],
|
||||
[use_ccache=auto])
|
||||
|
||||
|
@ -165,84 +137,32 @@ AC_ARG_ENABLE([glibc-back-compat],
|
|||
[use_glibc_compat=$enableval],
|
||||
[use_glibc_compat=no])
|
||||
|
||||
AC_ARG_WITH([system-univalue],
|
||||
[AS_HELP_STRING([--with-system-univalue],
|
||||
[Build with system UniValue (default is no)])],
|
||||
[system_univalue=$withval],
|
||||
[system_univalue=no]
|
||||
)
|
||||
AC_ARG_ENABLE([zmq],
|
||||
[AS_HELP_STRING([--disable-zmq],
|
||||
[disable ZMQ notifications])],
|
||||
[use_zmq=$enableval],
|
||||
[use_zmq=yes])
|
||||
|
||||
AC_ARG_WITH([intel-avx2],
|
||||
[AS_HELP_STRING([--with-intel-avx2],
|
||||
[Build with intel avx2 (default is no)])],
|
||||
[intel_avx2=$withval],
|
||||
[intel_avx2=no])
|
||||
|
||||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
||||
|
||||
AC_ARG_ENABLE(man,
|
||||
[AS_HELP_STRING([--disable-man],
|
||||
[do not install man pages (default is to install)])],,
|
||||
enable_man=yes)
|
||||
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
||||
|
||||
# Enable debug
|
||||
# Enable debug
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[use debug compiler flags and macros (default is no)])],
|
||||
[enable_debug=$enableval],
|
||||
[enable_debug=no])
|
||||
|
||||
# Turn warnings into errors
|
||||
AC_ARG_ENABLE([werror],
|
||||
[AS_HELP_STRING([--enable-werror],
|
||||
[Treat certain compiler warnings as errors (default is no)])],
|
||||
[enable_werror=$enableval],
|
||||
[enable_werror=no])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
|
||||
|
||||
if test "x$enable_debug" = xyes; then
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -g3 -O0"
|
||||
CFLAGS="-g3 -O0 -DDEBUG"
|
||||
fi
|
||||
|
||||
|
||||
if test "x$GXX" = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS -g3 -O0"
|
||||
CXXFLAGS="-g3 -O0 -DDEBUG"
|
||||
fi
|
||||
fi
|
||||
|
||||
ERROR_CXXFLAGS=
|
||||
if test "x$enable_werror" = "xyes"; then
|
||||
if test "x$CXXFLAG_WERROR" = "x"; then
|
||||
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
|
||||
fi
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
|
||||
fi
|
||||
fi
|
||||
|
||||
## 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
|
||||
AX_CHECK_COMPILE_FLAG([-Wall],[CXXFLAGS="$CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wextra],[CXXFLAGS="$CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
|
||||
|
||||
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
|
||||
## unknown options if any other warning is produced. Test the -Wfoo case, and
|
||||
## set the -Wno-foo case if it works.
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wself-assign],[CXXFLAGS="$CXXFLAGS -Wno-self-assign"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
|
||||
AC_ARG_WITH([utils],
|
||||
[AS_HELP_STRING([--with-utils],
|
||||
|
@ -262,6 +182,8 @@ AC_ARG_WITH([daemon],
|
|||
[build_bitcoind=$withval],
|
||||
[build_bitcoind=yes])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
use_pkgconfig=yes
|
||||
case $host in
|
||||
*mingw*)
|
||||
|
@ -305,7 +227,7 @@ case $host in
|
|||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
|
||||
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
|
||||
LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE"
|
||||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
CXXFLAGS="$CXXFLAGS -w"
|
||||
fi
|
||||
|
@ -327,7 +249,7 @@ case $host in
|
|||
;;
|
||||
*darwin*)
|
||||
TARGET_OS=darwin
|
||||
LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
|
||||
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
|
||||
if test x$cross_compiling != xyes; then
|
||||
BUILD_OS=darwin
|
||||
AC_CHECK_PROG([PORT],port, port)
|
||||
|
@ -341,7 +263,6 @@ case $host in
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
|
||||
AC_CHECK_PROG([BREW],brew, brew)
|
||||
if test x$BREW = xbrew; then
|
||||
dnl These Homebrew packages may be keg-only, meaning that they won't be found
|
||||
|
@ -375,9 +296,6 @@ case $host in
|
|||
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
|
||||
AC_PATH_TOOL([OTOOL], [otool], otool)
|
||||
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
|
||||
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
|
||||
AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert)
|
||||
AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp)
|
||||
|
||||
dnl libtool will try to strip the static lib, which is a problem for
|
||||
dnl cross-builds because strip attempts to call a hard-coded ld,
|
||||
|
@ -389,38 +307,26 @@ case $host in
|
|||
fi
|
||||
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
|
||||
CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
|
||||
OBJCXXFLAGS="$CXXFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
|
||||
;;
|
||||
*linux*)
|
||||
TARGET_OS=linux
|
||||
LEVELDB_TARGET_FLAGS="-DOS_LINUX"
|
||||
;;
|
||||
*freebsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
|
||||
;;
|
||||
*openbsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
|
||||
;;
|
||||
*)
|
||||
OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
|
||||
AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])
|
||||
LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)])
|
||||
m4_ifdef([PKG_PROG_PKG_CONFIG], [
|
||||
PKG_PROG_PKG_CONFIG
|
||||
if test x"$PKG_CONFIG" = "x"; then
|
||||
AC_MSG_ERROR(pkg-config not found.)
|
||||
fi
|
||||
])
|
||||
if test x$use_comparison_tool != xno; then
|
||||
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
|
||||
fi
|
||||
|
||||
if test x$use_extended_rpc_tests != xno; then
|
||||
AC_SUBST(EXTENDED_RPC_TESTS, -extended)
|
||||
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
|
||||
|
@ -430,15 +336,16 @@ if test x$use_lcov = xyes; then
|
|||
if test x$GCOV = x; then
|
||||
AC_MSG_ERROR("lcov testing requested but gcov not found")
|
||||
fi
|
||||
if test x$PYTHON = x; then
|
||||
AC_MSG_ERROR("lcov testing requested but python not found")
|
||||
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_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"],
|
||||
[AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
|
||||
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
|
||||
fi
|
||||
|
@ -476,10 +383,6 @@ AX_GCC_FUNC_ATTRIBUTE([dllimport])
|
|||
|
||||
if test x$use_glibc_compat != xno; then
|
||||
|
||||
#glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
|
||||
#in anyway for back-compat.
|
||||
AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(lib missing))
|
||||
|
||||
#__fdelt_chk's params and return type have changed from long unsigned int to long int.
|
||||
# See which one is present here.
|
||||
AC_MSG_CHECKING(__fdelt_chk type)
|
||||
|
@ -493,15 +396,7 @@ if test x$use_glibc_compat != xno; then
|
|||
[ fdelt_type="long int"])
|
||||
AC_MSG_RESULT($fdelt_type)
|
||||
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
|
||||
else
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||
fi
|
||||
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
# All windows code is PIC, forcing it on just adds useless compile warnings
|
||||
AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"])
|
||||
fi
|
||||
|
||||
if test x$use_hardening != xno; then
|
||||
|
@ -517,12 +412,12 @@ if test x$use_hardening != xno; then
|
|||
|
||||
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,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"])
|
||||
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
|
||||
AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"])
|
||||
# All windows code is PIC, forcing it on just adds useless compile warnings
|
||||
AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
|
||||
AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
|
||||
fi
|
||||
|
||||
|
@ -531,6 +426,11 @@ if test x$use_hardening != xno; then
|
|||
AC_CHECK_LIB([ssp], [main],, AC_MSG_ERROR(lib missing))
|
||||
;;
|
||||
esac
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $HARDENED_LDFLAGS"
|
||||
OBJCXXFLAGS="$CXXFLAGS"
|
||||
fi
|
||||
|
||||
dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
|
||||
|
@ -539,12 +439,11 @@ if test x$TARGET_OS = xdarwin; then
|
|||
fi
|
||||
|
||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
|
||||
AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
|
||||
AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
|
||||
|
||||
AC_CHECK_DECLS([strnlen])
|
||||
|
||||
# Check for daemon(3), unrelated to --with-daemon (although used by it)
|
||||
AC_CHECK_DECLS([daemon])
|
||||
|
||||
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
|
||||
[#if HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
|
@ -565,13 +464,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
|||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas)
|
||||
AC_MSG_CHECKING(for mallopt M_ARENA_MAX)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
|
||||
[[ mallopt(M_ARENA_MAX, 1); ]])],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MALLOPT_ARENA_MAX, 1,[Define this symbol if you have mallopt with M_ARENA_MAX]) ],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||
|
||||
AC_MSG_CHECKING([for visibility attribute])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
|
@ -605,7 +498,7 @@ AC_SUBST(LIBMEMENV)
|
|||
|
||||
if test x$enable_wallet != xno; then
|
||||
dnl Check for libdb_cxx only if wallet enabled
|
||||
BITCOIN_FIND_BDB53
|
||||
BITCOIN_FIND_BDB51
|
||||
fi
|
||||
|
||||
dnl Check for libminiupnpc (optional)
|
||||
|
@ -620,9 +513,9 @@ fi
|
|||
BITCOIN_QT_INIT
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt5])
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
|
||||
use_boost=no
|
||||
else
|
||||
use_boost=yes
|
||||
|
@ -630,11 +523,8 @@ fi
|
|||
|
||||
if test x$use_boost = xyes; then
|
||||
|
||||
dnl Minimum required Boost version
|
||||
define(MINIMUM_REQUIRED_BOOST, 1.47.0)
|
||||
|
||||
dnl Check for boost libs
|
||||
AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
|
||||
AX_BOOST_BASE
|
||||
AX_BOOST_SYSTEM
|
||||
AX_BOOST_FILESYSTEM
|
||||
AX_BOOST_PROGRAM_OPTIONS
|
||||
|
@ -704,42 +594,6 @@ if test x$use_boost = xyes; then
|
|||
|
||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
|
||||
|
||||
|
||||
dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
|
||||
dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
|
||||
dnl the abi. This was fixed in 1.57.
|
||||
|
||||
dnl When building against that installed version using c++11, the headers pick up
|
||||
dnl on the native c++11 scoped enum support and enable it, however it will fail to
|
||||
dnl link. This can be worked around by disabling c++11 scoped enums if linking will
|
||||
dnl fail.
|
||||
dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
|
||||
|
||||
TEMP_LIBS="$LIBS"
|
||||
LIBS="$BOOST_LIBS $LIBS"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_MSG_CHECKING([for mismatched boost c++11 scoped enums])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/version.hpp"
|
||||
#if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define CHECK
|
||||
#endif
|
||||
#include "boost/filesystem.hpp"
|
||||
]],[[
|
||||
#if defined(CHECK)
|
||||
boost::filesystem::copy_file("foo", "bar");
|
||||
#else
|
||||
choke;
|
||||
#endif
|
||||
]])],
|
||||
[AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)])
|
||||
LIBS="$TEMP_LIBS"
|
||||
CPPFLAGS="$TEMP_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
|
||||
|
@ -793,18 +647,13 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test x$intel_avx2 = xyes; then
|
||||
case $host in
|
||||
x86_64-*-linux*)
|
||||
AC_CHECK_LIB([IPSec_MB],[sha1_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_CHECK_LIB([IPSec_MB],[sha256_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_CHECK_LIB([IPSec_MB],[sha512_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_DEFINE(USE_AVX2, 1, [Define this symbol if intel axv2 works])
|
||||
esac
|
||||
fi
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
: dnl
|
||||
|
||||
if test x"$PKG_CONFIG" = "x"; then
|
||||
AC_MSG_ERROR(pkg-config not found.)
|
||||
fi
|
||||
|
||||
: #NOP
|
||||
m4_ifdef(
|
||||
[PKG_CHECK_MODULES],
|
||||
[
|
||||
|
@ -814,22 +663,6 @@ if test x$use_pkgconfig = xyes; then
|
|||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
|
||||
fi
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
|
||||
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
PKG_CHECK_MODULES([ZMQ],[libzmq >= 4],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
|
||||
use_zmq=no])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
]
|
||||
)
|
||||
else
|
||||
|
@ -839,37 +672,6 @@ else
|
|||
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
|
||||
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
|
||||
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
|
||||
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
|
||||
if test x$TARGET_OS != xwindows; then
|
||||
AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
AC_CHECK_HEADER([zmq.h],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_MSG_WARN([zmq.h not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq,
|
||||
[AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
dnl Assume libzmq was built for static linking
|
||||
case $host in
|
||||
*mingw*)
|
||||
ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
|
||||
if test x$use_qr != xno; then
|
||||
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
|
||||
|
@ -877,60 +679,21 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
save_CXXFLAGS="${CXXFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}"
|
||||
AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
|
||||
#include <openssl/x509_vfy.h>
|
||||
AC_CHECK_LIB([crypto],[RAND_egd],[],[
|
||||
AC_ARG_WITH([libressl],
|
||||
[AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
|
||||
[AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
|
||||
[AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
|
||||
)
|
||||
])
|
||||
CXXFLAGS="${save_CXXFLAGS}"
|
||||
|
||||
dnl univalue check
|
||||
|
||||
need_bundled_univalue=yes
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
|
||||
need_bundled_univalue=no
|
||||
else
|
||||
|
||||
if test x$system_univalue != xno ; then
|
||||
found_univalue=no
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
: #NOP
|
||||
m4_ifdef(
|
||||
[PKG_CHECK_MODULES],
|
||||
[
|
||||
PKG_CHECK_MODULES([UNIVALUE],[libunivalue],[found_univalue=yes],[true])
|
||||
]
|
||||
)
|
||||
else
|
||||
AC_CHECK_HEADER([univalue.h],[
|
||||
AC_CHECK_LIB([univalue], [main],[
|
||||
UNIVALUE_LIBS=-lunivalue
|
||||
found_univalue=yes
|
||||
],[true])
|
||||
],[true])
|
||||
fi
|
||||
|
||||
if test x$found_univalue = xyes ; then
|
||||
system_univalue=yes
|
||||
need_bundled_univalue=no
|
||||
elif test x$system_univalue = xyes ; then
|
||||
AC_MSG_ERROR([univalue not found])
|
||||
else
|
||||
system_univalue=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$need_bundled_univalue = xyes ; then
|
||||
UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include'
|
||||
UNIVALUE_LIBS='univalue/libunivalue.la'
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
|
||||
AC_SUBST(UNIVALUE_CFLAGS)
|
||||
AC_SUBST(UNIVALUE_LIBS)
|
||||
CFLAGS_TEMP="$CFLAGS"
|
||||
LIBS_TEMP="$LIBS"
|
||||
CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
|
||||
LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS"
|
||||
AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),)
|
||||
CFLAGS="$CFLAGS_TEMP"
|
||||
LIBS="$LIBS_TEMP"
|
||||
|
||||
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
|
||||
|
||||
|
@ -1009,8 +772,8 @@ else
|
|||
fi
|
||||
|
||||
dnl these are only used when qt is enabled
|
||||
BUILD_TEST_QT=""
|
||||
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
|
||||
|
@ -1040,23 +803,20 @@ if test x$bitcoin_enable_qt != xno; then
|
|||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_dogecoin-qt])
|
||||
if test x$use_gui_tests$bitcoin_enable_qt_test = xyesyes; then
|
||||
if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_TEST_QT="yes"
|
||||
BUILD_TEST_QT="test"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_dogecoin])
|
||||
if test x$use_tests = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_TEST="yes"
|
||||
BUILD_TEST="test"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
BUILD_TEST=""
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to reduce exports])
|
||||
|
@ -1066,74 +826,51 @@ else
|
|||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnononononono; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
|
||||
if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
|
||||
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
|
||||
AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
|
||||
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
|
||||
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
|
||||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
|
||||
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
|
||||
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
|
||||
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
|
||||
|
||||
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, [Copyright year])
|
||||
AC_DEFINE(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS", [Copyright holder(s) before %s replacement])
|
||||
AC_DEFINE(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION", [Replacement for %s in copyright holders string])
|
||||
define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])])
|
||||
AC_DEFINE(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL", [Copyright holder(s)])
|
||||
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(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS")
|
||||
AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION")
|
||||
AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL")
|
||||
AC_SUBST(BITCOIN_DAEMON_NAME)
|
||||
AC_SUBST(BITCOIN_GUI_NAME)
|
||||
AC_SUBST(BITCOIN_CLI_NAME)
|
||||
AC_SUBST(BITCOIN_TX_NAME)
|
||||
|
||||
AC_SUBST(RELDFLAGS)
|
||||
AC_SUBST(COMPAT_LDFLAGS)
|
||||
AC_SUBST(ERROR_CXXFLAGS)
|
||||
AC_SUBST(HARDENED_CXXFLAGS)
|
||||
AC_SUBST(HARDENED_CPPFLAGS)
|
||||
AC_SUBST(HARDENED_LDFLAGS)
|
||||
AC_SUBST(PIC_FLAGS)
|
||||
AC_SUBST(PIE_FLAGS)
|
||||
AC_SUBST(LIBTOOL_APP_LDFLAGS)
|
||||
AC_SUBST(USE_UPNP)
|
||||
AC_SUBST(USE_QRCODE)
|
||||
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_SUBST(MINIUPNPC_CPPFLAGS)
|
||||
AC_SUBST(MINIUPNPC_LIBS)
|
||||
AC_SUBST(CRYPTO_LIBS)
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AC_SUBST(EVENT_LIBS)
|
||||
AC_SUBST(EVENT_PTHREADS_LIBS)
|
||||
AC_SUBST(ZMQ_LIBS)
|
||||
AC_SUBST(PROTOBUF_LIBS)
|
||||
AC_SUBST(QR_LIBS)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
|
||||
AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])
|
||||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
|
||||
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
|
||||
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
|
||||
AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
|
||||
|
||||
dnl boost's m4 checks do something really nasty: they export these vars. As a
|
||||
dnl result, they leak into secp256k1's configure and crazy things happen.
|
||||
|
@ -1158,11 +895,7 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
|
|||
unset PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
|
||||
|
||||
if test x$need_bundled_univalue = xyes; then
|
||||
AC_CONFIG_SUBDIRS([src/univalue])
|
||||
fi
|
||||
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery"
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no"
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1])
|
||||
|
||||
AC_OUTPUT
|
||||
|
@ -1177,37 +910,3 @@ case $host in
|
|||
chmod 755 libtool
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows
|
||||
case ${OS} in
|
||||
*Windows*)
|
||||
sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' qa/pull-tester/tests_config.py > qa/pull-tester/tests_config-2.py
|
||||
mv qa/pull-tester/tests_config-2.py qa/pull-tester/tests_config.py
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo "Options used to compile and link:"
|
||||
echo " with wallet = $enable_wallet"
|
||||
echo " with gui / qt = $bitcoin_enable_qt"
|
||||
if test x$bitcoin_enable_qt != xno; then
|
||||
echo " qt version = $bitcoin_qt_got_major_vers"
|
||||
echo " with qr = $use_qr"
|
||||
fi
|
||||
echo " with zmq = $use_zmq"
|
||||
echo " with test = $use_tests"
|
||||
echo " with bench = $use_bench"
|
||||
echo " with upnp = $use_upnp"
|
||||
echo " debug enabled = $enable_debug"
|
||||
echo " werror = $enable_werror"
|
||||
echo
|
||||
echo " target os = $TARGET_OS"
|
||||
echo " build os = $BUILD_OS"
|
||||
echo
|
||||
echo " CC = $CC"
|
||||
echo " CFLAGS = $CFLAGS"
|
||||
echo " CPPFLAGS = $CPPFLAGS"
|
||||
echo " CXX = $CXX"
|
||||
echo " CXXFLAGS = $CXXFLAGS"
|
||||
echo " LDFLAGS = $LDFLAGS"
|
||||
echo
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
Wallet Tools
|
||||
---------------------
|
||||
|
||||
### [BitRPC](/contrib/bitrpc) ###
|
||||
Allows for sending of all standard Dogecoin commands via RPC rather than as command line args.
|
||||
|
||||
### [SpendFrom](/contrib/spendfrom) ###
|
||||
|
||||
Use the raw transactions API to send coins received on a particular
|
||||
address (or addresses).
|
||||
|
||||
Repository Tools
|
||||
---------------------
|
||||
|
||||
### [Developer tools](/contrib/devtools) ###
|
||||
Specific tools for developers working on this repository.
|
||||
Contains the script `github-merge.py` for merging GitHub pull requests securely and signing them using GPG.
|
||||
Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG.
|
||||
|
||||
### [Verify-Commits](/contrib/verify-commits) ###
|
||||
Tool to verify that every merge commit was signed by a developer using the above `github-merge.py` script.
|
||||
Tool to verify that every merge commit was signed by a developer using the above `github-merge.sh` script.
|
||||
|
||||
### [Linearize](/contrib/linearize) ###
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
|
@ -26,28 +37,23 @@ Contains files used to package dogecoind/dogecoin-qt
|
|||
for Debian-based Linux systems. If you compile dogecoind/dogecoin-qt yourself, there are some useful files here.
|
||||
|
||||
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
|
||||
Notes on getting Gitian builds up and running using KVM.
|
||||
Gavin's notes on getting gitian builds up and running using KVM.
|
||||
|
||||
### [Gitian-keys](/contrib/gitian-keys)
|
||||
PGP keys used for signing Dogecoin Core [Gitian release](/doc/release-process.md) results.
|
||||
### [Gitian-downloader](/contrib/gitian-downloader)
|
||||
Various PGP files of core developers.
|
||||
|
||||
### [MacDeploy](/contrib/macdeploy) ###
|
||||
Scripts and notes for Mac builds.
|
||||
Scripts and notes for Mac builds.
|
||||
|
||||
### [RPM](/contrib/rpm) ###
|
||||
RPM spec file for building dogecoin-core on RPM based distributions
|
||||
|
||||
### [Gitian-build](/contrib/gitian-build.sh) ###
|
||||
Script for running full Gitian builds.
|
||||
|
||||
### [Snap](/contrib/snap) ###
|
||||
snapcraft.yaml file for building and distributing dogecoin-core with Snapcraft.
|
||||
|
||||
Test and Verify Tools
|
||||
Test and Verify Tools
|
||||
---------------------
|
||||
|
||||
### [TestGen](/contrib/testgen) ###
|
||||
Utilities to generate test vectors for the data-driven Dogecoin tests.
|
||||
|
||||
### [Verify Binaries](/contrib/verifybinaries) ###
|
||||
This script attempts to download and verify the signature file SHA256SUMS.asc from dogecoin.com.
|
||||
### [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.
|
||||
|
|
|
@ -5,14 +5,13 @@ FORMS += \
|
|||
../src/qt/forms/coincontroldialog.ui \
|
||||
../src/qt/forms/editaddressdialog.ui \
|
||||
../src/qt/forms/helpmessagedialog.ui \
|
||||
../src/qt/forms/importkeysdialog.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/debugwindow.ui \
|
||||
../src/qt/forms/rpcconsole.ui \
|
||||
../src/qt/forms/sendcoinsdialog.ui \
|
||||
../src/qt/forms/sendcoinsentry.ui \
|
||||
../src/qt/forms/signverifymessagedialog.ui \
|
||||
|
|
8
contrib/bitrpc/README.md
Normal file
8
contrib/bitrpc/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
### 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
|
335
contrib/bitrpc/bitrpc.py
Normal file
335
contrib/bitrpc/bitrpc.py
Normal file
|
@ -0,0 +1,335 @@
|
|||
from jsonrpc import ServiceProxy
|
||||
import sys
|
||||
import string
|
||||
import getpass
|
||||
|
||||
# ===== BEGIN USER SETTINGS =====
|
||||
# if you do not set these you will be prompted for a password for every command
|
||||
rpcuser = ""
|
||||
rpcpass = ""
|
||||
# ====== END USER SETTINGS ======
|
||||
|
||||
|
||||
if rpcpass == "":
|
||||
access = ServiceProxy("http://127.0.0.1:22555")
|
||||
else:
|
||||
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:22555")
|
||||
cmd = sys.argv[1].lower()
|
||||
|
||||
if cmd == "backupwallet":
|
||||
try:
|
||||
path = raw_input("Enter destination path/filename: ")
|
||||
print access.backupwallet(path)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "encryptwallet":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter passphrase: ")
|
||||
pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
|
||||
if pwd == pwd2:
|
||||
access.encryptwallet(pwd)
|
||||
print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
|
||||
else:
|
||||
print "\n---Passphrases do not match---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaccount":
|
||||
try:
|
||||
addr = raw_input("Enter a Bitcoin address: ")
|
||||
print access.getaccount(addr)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaccountaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaccountaddress(acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getaddressesbyaccount":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaddressesbyaccount(acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getbalance":
|
||||
try:
|
||||
acct = raw_input("Enter an account (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getbalance(acct, mc)
|
||||
except:
|
||||
print access.getbalance()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblockbycount":
|
||||
try:
|
||||
height = raw_input("Height: ")
|
||||
print access.getblockbycount(height)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblockcount":
|
||||
try:
|
||||
print access.getblockcount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getblocknumber":
|
||||
try:
|
||||
print access.getblocknumber()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getconnectioncount":
|
||||
try:
|
||||
print access.getconnectioncount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getdifficulty":
|
||||
try:
|
||||
print access.getdifficulty()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getgenerate":
|
||||
try:
|
||||
print access.getgenerate()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "gethashespersec":
|
||||
try:
|
||||
print access.gethashespersec()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getinfo":
|
||||
try:
|
||||
print access.getinfo()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getnewaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
try:
|
||||
print access.getnewaddress(acct)
|
||||
except:
|
||||
print access.getnewaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getreceivedbyaccount":
|
||||
try:
|
||||
acct = raw_input("Enter an account (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getreceivedbyaccount(acct, mc)
|
||||
except:
|
||||
print access.getreceivedbyaccount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getreceivedbyaddress":
|
||||
try:
|
||||
addr = raw_input("Enter a Bitcoin address (optional): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.getreceivedbyaddress(addr, mc)
|
||||
except:
|
||||
print access.getreceivedbyaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "gettransaction":
|
||||
try:
|
||||
txid = raw_input("Enter a transaction ID: ")
|
||||
print access.gettransaction(txid)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "getwork":
|
||||
try:
|
||||
data = raw_input("Data (optional): ")
|
||||
try:
|
||||
print access.gettransaction(data)
|
||||
except:
|
||||
print access.gettransaction()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "help":
|
||||
try:
|
||||
cmd = raw_input("Command (optional): ")
|
||||
try:
|
||||
print access.help(cmd)
|
||||
except:
|
||||
print access.help()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listaccounts":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.listaccounts(mc)
|
||||
except:
|
||||
print access.listaccounts()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listreceivedbyaccount":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
incemp = raw_input("Include empty? (true/false, optional): ")
|
||||
try:
|
||||
print access.listreceivedbyaccount(mc, incemp)
|
||||
except:
|
||||
print access.listreceivedbyaccount()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listreceivedbyaddress":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
incemp = raw_input("Include empty? (true/false, optional): ")
|
||||
try:
|
||||
print access.listreceivedbyaddress(mc, incemp)
|
||||
except:
|
||||
print access.listreceivedbyaddress()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "listtransactions":
|
||||
try:
|
||||
acct = raw_input("Account (optional): ")
|
||||
count = raw_input("Number of transactions (optional): ")
|
||||
frm = raw_input("Skip (optional):")
|
||||
try:
|
||||
print access.listtransactions(acct, count, frm)
|
||||
except:
|
||||
print access.listtransactions()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "move":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To: ")
|
||||
amt = raw_input("Amount:")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
try:
|
||||
print access.move(frm, to, amt, mc, comment)
|
||||
except:
|
||||
print access.move(frm, to, amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendfrom":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To: ")
|
||||
amt = raw_input("Amount:")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
commentto = raw_input("Comment-to (optional): ")
|
||||
try:
|
||||
print access.sendfrom(frm, to, amt, mc, comment, commentto)
|
||||
except:
|
||||
print access.sendfrom(frm, to, amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendmany":
|
||||
try:
|
||||
frm = raw_input("From: ")
|
||||
to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
try:
|
||||
print access.sendmany(frm,to,mc,comment)
|
||||
except:
|
||||
print access.sendmany(frm,to)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "sendtoaddress":
|
||||
try:
|
||||
to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
|
||||
amt = raw_input("Amount:")
|
||||
comment = raw_input("Comment (optional): ")
|
||||
commentto = raw_input("Comment-to (optional): ")
|
||||
try:
|
||||
print access.sendtoaddress(to,amt,comment,commentto)
|
||||
except:
|
||||
print access.sendtoaddress(to,amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "setaccount":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
acct = raw_input("Account:")
|
||||
print access.setaccount(addr,acct)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "setgenerate":
|
||||
try:
|
||||
gen= raw_input("Generate? (true/false): ")
|
||||
cpus = raw_input("Max processors/cores (-1 for unlimited, optional):")
|
||||
try:
|
||||
print access.setgenerate(gen, cpus)
|
||||
except:
|
||||
print access.setgenerate(gen)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "settxfee":
|
||||
try:
|
||||
amt = raw_input("Amount:")
|
||||
print access.settxfee(amt)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "stop":
|
||||
try:
|
||||
print access.stop()
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "validateaddress":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
print access.validateaddress(addr)
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "walletpassphrase":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter wallet passphrase: ")
|
||||
access.walletpassphrase(pwd, 60)
|
||||
print "\n---Wallet unlocked---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
elif cmd == "walletpassphrasechange":
|
||||
try:
|
||||
pwd = getpass.getpass(prompt="Enter old wallet passphrase: ")
|
||||
pwd2 = getpass.getpass(prompt="Enter new wallet passphrase: ")
|
||||
access.walletpassphrasechange(pwd, pwd2)
|
||||
print
|
||||
print "\n---Passphrase changed---\n"
|
||||
except Exception as inst:
|
||||
print inst
|
||||
|
||||
else:
|
||||
print "Command not found or not supported"
|
|
@ -15,7 +15,7 @@ To install:
|
|||
|
||||
If you build yourself, you will either need to modify the paths in
|
||||
the .desktop file or copy or symlink your dogecoin-qt binary to `/usr/bin`
|
||||
and the `../../share/pixmaps/dogecoin128.png` to `/usr/share/pixmaps`
|
||||
and the `../../share/pixmaps/bitcoin128.png` to `/usr/share/pixmaps`
|
||||
|
||||
dogecoin-qt.protocol (KDE)
|
||||
|
||||
|
|
|
@ -1,152 +1,3 @@
|
|||
bitcoin (0.14.1-trusty4) trusty; urgency=medium
|
||||
|
||||
* Re-enable UPnP support.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 05 May 2017 13:28:00 -0400
|
||||
|
||||
bitcoin (0.14.1-trusty3) trusty; urgency=medium
|
||||
|
||||
* Build with qt5 if we are on a non-Ubuntu (ie non-Unity) distro.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 04 May 2017 17:13:00 -0400
|
||||
|
||||
bitcoin (0.14.1-trusty2) trusty; urgency=medium
|
||||
|
||||
* Bump minimum boost version in deps.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 04 May 2017 17:12:00 -0400
|
||||
|
||||
bitcoin (0.14.1-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Sat, 22 Apr 2017 17:10:00 -0400
|
||||
|
||||
bitcoin (0.14.0-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 08 Mar 2017 10:30:00 -0500
|
||||
|
||||
bitcoin (0.13.2-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 05 Jan 2017 09:59:00 -0500
|
||||
|
||||
bitcoin (0.13.1-trusty2) trusty; urgency=medium
|
||||
|
||||
* Revert to Qt4, due to https://github.com/bitcoin/bitcoin/issues/9038
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 31 Oct 2016 11:16:00 -0400
|
||||
|
||||
bitcoin (0.13.1-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Backport updated bitcoin-qt.desktop from upstream master
|
||||
* Add zmq dependency
|
||||
* Switch to Qt5 (breaks precise, but that was already broken by C++11)
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 27 Oct 2016 17:32:00 -0400
|
||||
|
||||
bitcoin (0.13.0-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Sun, 04 Sep 2016 22:09:00 -0400
|
||||
|
||||
bitcoin (0.12.1-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 18 Apr 2016 14:26:00 -0700
|
||||
|
||||
bitcoin (0.12.0-trusty6) trusty; urgency=medium
|
||||
|
||||
* Fix program-options dep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 25 Mar 2016 21:41:00 -0700
|
||||
|
||||
bitcoin (0.12.0-trusty5) trusty; urgency=medium
|
||||
|
||||
* Test explicit --with-gui
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 23:25:00 -0800
|
||||
|
||||
bitcoin (0.12.0-trusty4) trusty; urgency=medium
|
||||
|
||||
* Fix libevent-dev dep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 23:25:00 -0800
|
||||
|
||||
bitcoin (0.12.0-trusty3) trusty; urgency=medium
|
||||
|
||||
* Fix precise boost dep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:55:00 -0800
|
||||
|
||||
bitcoin (0.12.0-trusty2) trusty; urgency=medium
|
||||
|
||||
* Fix libevent dep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:53:00 -0800
|
||||
|
||||
bitcoin (0.12.0-trusty1) trusty; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Various updates to contrib/debian were merged, a few were not
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:29:00 -0800
|
||||
|
||||
bitcoin (0.11.2-trusty1) trusty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 13 Nov 2015 18:39:00 -0800
|
||||
|
||||
bitcoin (0.11.1-trusty2) trusty; urgency=low
|
||||
|
||||
* Remove minupnpc builddep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 14 Oct 2015 23:06:00 -1000
|
||||
|
||||
bitcoin (0.11.1-trusty1) trusty; urgency=high
|
||||
|
||||
* New upstream release.
|
||||
* Disable all UPnP support.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 14 Oct 2015 13:57:00 -1000
|
||||
|
||||
bitcoin (0.11.0-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 14 Jul 2015 14:39:00 -1000
|
||||
|
||||
bitcoin (0.10.2-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 29 Jun 2015 17:33:00 -1000
|
||||
|
||||
bitcoin (0.10.1-precise3) precise; urgency=medium
|
||||
|
||||
* Fix build dep (include python).
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 09:28:00 -1000
|
||||
|
||||
bitcoin (0.10.1-precise2) precise; urgency=medium
|
||||
|
||||
* Fix miniupnpc dep.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 00:33:00 -1000
|
||||
|
||||
bitcoin (0.10.1-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 00:07:00 -1000
|
||||
|
||||
bitcoin (0.10.0-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream releases.
|
||||
|
|
|
@ -1,30 +1,26 @@
|
|||
Source: dogecoin
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Matt Corallo <matt@mattcorallo.com>
|
||||
Uploaders: Matt Corallo <matt@mattcorallo.com>
|
||||
Maintainer: Jonas Smedegaard <dr@jones.dk>
|
||||
Uploaders: Micah Anderson <micah@debian.org>
|
||||
Build-Depends: debhelper,
|
||||
devscripts,
|
||||
automake,
|
||||
libtool,
|
||||
bash-completion,
|
||||
libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
|
||||
libdb4.8++-dev,
|
||||
libssl-dev,
|
||||
pkg-config,
|
||||
libevent-dev,
|
||||
libboost-system1.48-dev | libboost-system-dev (>> 1.47),
|
||||
libboost-filesystem1.48-dev | libboost-filesystem-dev (>> 1.47),
|
||||
libboost-program-options1.48-dev | libboost-program-options-dev (>> 1.47),
|
||||
libboost-thread1.48-dev | libboost-thread-dev (>> 1.47),
|
||||
libboost-test1.48-dev | libboost-test-dev (>> 1.47),
|
||||
libboost-chrono1.48-dev | libboost-chrono-dev (>> 1.47),
|
||||
libminiupnpc8-dev | libminiupnpc-dev,
|
||||
qt4-qmake, libqt4-dev,
|
||||
qttools5-dev-tools, qttools5-dev,
|
||||
libminiupnpc8-dev | libminiupnpc-dev (>> 1.6),
|
||||
libboost-filesystem-dev (>> 1.35) | libboost-filesystem1.35-dev,
|
||||
libboost-program-options-dev (>> 1.35) | libboost-program-options1.35-dev,
|
||||
libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev,
|
||||
libboost-test-dev (>> 1.35) | libboost-test1.35-dev,
|
||||
qt4-qmake,
|
||||
libqt4-dev,
|
||||
libqrencode-dev,
|
||||
libprotobuf-dev, protobuf-compiler,
|
||||
python,
|
||||
libzmq3-dev
|
||||
libprotobuf-dev, protobuf-compiler
|
||||
Standards-Version: 3.9.2
|
||||
Homepage: http://www.dogecoin.com/
|
||||
Vcs-Git: git://github.com/dogecoin/dogecoin.git
|
||||
|
@ -56,18 +52,7 @@ Description: peer-to-peer network based digital currency - Qt GUI
|
|||
transact directly with each other, with the help of a P2P network to
|
||||
check for double-spending.
|
||||
.
|
||||
This package provides Dogecoin-Qt, a GUI for Dogecoin based on Qt.
|
||||
|
||||
Package: dogecoin-tx
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: peer-to-peer digital currency - standalone transaction tool
|
||||
Dogecoin is a free open source peer-to-peer electronic cash system that
|
||||
is completely decentralized, without the need for a central server or
|
||||
trusted parties. Users hold the crypto keys to their own money and
|
||||
transact directly with each other, with the help of a P2P network to
|
||||
check for double-spending.
|
||||
Full transaction history is stored locally at each client. This
|
||||
requires 20+ GB of space, slowly growing.
|
||||
.
|
||||
This package provides dogecoin-tx, a command-line transaction creation
|
||||
tool which can be used without a dogecoin daemon. Some means of
|
||||
exchanging minimal transaction data with peers is still required.
|
||||
This package provides Dogecoin-Qt, a GUI for Dogecoin based on Qt.
|
||||
|
|
|
@ -1,90 +1,82 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
|
||||
Upstream-Name: Bitcoin
|
||||
Upstream-Contact: Satoshi Nakamoto <satoshin@gmx.com>
|
||||
irc://#bitcoin@freenode.net
|
||||
Source: https://github.com/bitcoin/bitcoin
|
||||
|
||||
Files: *
|
||||
Copyright: 2009-2017, Bitcoin Core Developers
|
||||
Copyright: 2009-2012, Bitcoin Core Developers
|
||||
License: Expat
|
||||
Comment: The Bitcoin Core Developers encompasses the current developers listed on bitcoin.org,
|
||||
as well as the numerous contributors to the project.
|
||||
|
||||
Files: src/json/*
|
||||
Copyright: 2007-2009, John W. Wilkinson
|
||||
License: Expat
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
|
||||
2011, Matt Corallo <matt@bluematt.me>
|
||||
License: GPL-2+
|
||||
|
||||
Files: src/qt/res/icons/add.png
|
||||
src/qt/res/icons/address-book.png
|
||||
src/qt/res/icons/chevron.png
|
||||
src/qt/res/icons/configure.png
|
||||
src/qt/res/icons/debugwindow.png
|
||||
src/qt/res/icons/edit.png
|
||||
src/qt/res/icons/editcopy.png
|
||||
src/qt/res/icons/editpaste.png
|
||||
src/qt/res/icons/export.png
|
||||
src/qt/res/icons/eye.png
|
||||
src/qt/res/icons/filesave.png
|
||||
src/qt/res/icons/history.png
|
||||
src/qt/res/icons/info.png
|
||||
src/qt/res/icons/key.png
|
||||
src/qt/res/icons/lock_*.png
|
||||
src/qt/res/icons/open.png
|
||||
src/qt/res/icons/overview.png
|
||||
src/qt/res/icons/quit.png
|
||||
src/qt/res/icons/receive.png
|
||||
src/qt/res/icons/remove.png
|
||||
src/qt/res/icons/send.png
|
||||
src/qt/res/icons/synced.png
|
||||
src/qt/res/icons/transaction*.png
|
||||
src/qt/res/icons/tx_output.png
|
||||
src/qt/res/icons/warning.png
|
||||
Copyright: Stephen Hutchings (and more)
|
||||
http://typicons.com
|
||||
Files: debian/manpages/*
|
||||
Copyright: Micah Anderson <micah@debian.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
|
||||
src/qt/res/src/*.svg
|
||||
Copyright: Wladimir van der Laan
|
||||
License: Expat
|
||||
Comment: Site: https://github.com/stephenhutchings/typicons.font
|
||||
|
||||
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
|
||||
Copyright: David Vignoni (david@icon-king.com)
|
||||
ICON KING - www.icon-king.com
|
||||
License: LGPL
|
||||
Comment: NUVOLA ICON THEME for KDE 3.x
|
||||
Original icons: kaddressbook, klipper_dock, view-list-text,
|
||||
key-password, encrypted/decrypted, go-home, go-down,
|
||||
go-next, dialog-ok
|
||||
Site: http://www.icon-king.com/projects/nuvola/
|
||||
|
||||
Files: src/qt/res/icons/connect*.png
|
||||
src/qt/res/src/connect-*.svg
|
||||
src/qt/res/icons/network_disabled.png
|
||||
src/qt/res/src/network_disabled.svg
|
||||
Copyright: Marco Falke
|
||||
Luke Dashjr
|
||||
License: Expat
|
||||
Comment: Inspired by Stephan Hutchings Typicons
|
||||
Copyright: schollidesign
|
||||
License: GPL-3+
|
||||
Comment: Icon Pack: Human-O2
|
||||
Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
|
||||
|
||||
Files: src/qt/res/icons/tx_mined.png
|
||||
src/qt/res/src/mine.svg
|
||||
src/qt/res/icons/fontbigger.png
|
||||
src/qt/res/icons/fontsmaller.png
|
||||
src/qt/res/icons/hd_disabled.png
|
||||
src/qt/res/src/hd_disabled.svg
|
||||
src/qt/res/icons/hd_enabled.png
|
||||
src/qt/res/src/hd_enabled.svg
|
||||
Copyright: Jonas Schnelli
|
||||
Files: src/qt/res/icons/transaction*.png
|
||||
Copyright: md2k7
|
||||
License: Expat
|
||||
Comment:
|
||||
Comment: Site: https://bitcointalk.org/index.php?topic=15276.0
|
||||
|
||||
Files: src/qt/res/icons/clock*.png
|
||||
src/qt/res/icons/eye_*.png
|
||||
src/qt/res/icons/verify.png
|
||||
src/qt/res/icons/tx_in*.png
|
||||
src/qt/res/src/clock_*.svg
|
||||
src/qt/res/src/tx_*.svg
|
||||
src/qt/res/src/verify.svg
|
||||
Copyright: Stephan Hutching, Jonas Schnelli
|
||||
License: Expat
|
||||
Comment: Modifications of Stephan Hutchings Typicons
|
||||
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,
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/remove.png
|
||||
Copyright: http://www.everaldo.com
|
||||
License: LGPL
|
||||
Comment: Icon Pack: Crystal SVG
|
||||
|
||||
Files: src/qt/res/icons/about.png
|
||||
src/qt/res/icons/bitcoin.*
|
||||
share/pixmaps/bitcoin*
|
||||
src/qt/res/src/bitcoin.svg
|
||||
Copyright: Bitboy, Jonas Schnelli
|
||||
License: public-domain
|
||||
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
|
||||
|
||||
Files: scripts/img/reload.xcf, src/qt/res/movies/*.png
|
||||
Copyright: Everaldo (Everaldo Coelho)
|
||||
License: GPL-3+
|
||||
Comment: Icon Pack: Kids
|
||||
Site: http://findicons.com/icon/17102/reload?id=17102
|
||||
|
||||
Files: src/qt/res/images/splash2.jpg
|
||||
License: PUB-DOM
|
||||
Copyright: Crobbo (forum)
|
||||
Comment: Site: https://bitcointalk.org/index.php?topic=32273.0
|
||||
|
||||
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
@ -106,6 +98,20 @@ License: Expat
|
|||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License: ISC
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
|
@ -134,5 +140,22 @@ Comment:
|
|||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: public-domain
|
||||
License: LGPL
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program 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 General Public License for more details.
|
||||
Comment:
|
||||
On Debian systems the GNU Lesser General Public License (LGPL) is
|
||||
located in '/usr/share/common-licenses/LGPL'.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: PUB-DOM
|
||||
This work is in the public domain.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=Dogecoin Core
|
||||
Comment=Connect to the Dogecoin P2P Network
|
||||
Comment[de]=Verbinde mit dem Dogecoin peer-to-peer Netzwerk
|
||||
Encoding=UTF-8
|
||||
Name=Dogecoin
|
||||
Comment=Dogecoin P2P Cryptocurrency
|
||||
Comment[fr]=Dogecoin, monnaie virtuelle cryptographique pair à pair
|
||||
Comment[tr]=Dogecoin, eşten eşe kriptografik sanal para birimi
|
||||
Exec=dogecoin-qt %u
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
usr/local/bin/dogecoin-qt usr/bin
|
||||
share/pixmaps/dogecoin32.xpm usr/share/pixmaps
|
||||
share/pixmaps/dogecoin16.xpm usr/share/pixmaps
|
||||
share/pixmaps/dogecoin128.png usr/share/pixmaps
|
||||
share/pixmaps/bitcoin32.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin16.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin128.png usr/share/pixmaps
|
||||
debian/dogecoin-qt.desktop usr/share/applications
|
||||
debian/dogecoin-qt.protocol usr/share/kde4/services/
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
doc/man/dogecoin-qt.1
|
|
@ -1 +0,0 @@
|
|||
contrib/dogecoin-tx.bash-completion dogecoin-tx
|
|
@ -1 +0,0 @@
|
|||
usr/local/bin/dogecoin-tx usr/bin
|
|
@ -1 +0,0 @@
|
|||
doc/man/dogecoin-tx.1
|
|
@ -1,2 +1 @@
|
|||
contrib/dogecoind.bash-completion dogecoind
|
||||
contrib/dogecoin-cli.bash-completion dogecoin-cli
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
usr/local/bin/dogecoind usr/bin
|
||||
usr/local/bin/dogecoin-cli usr/bin
|
||||
usr/local/bin/dogecoin-cli usr/bin
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
doc/man/dogecoind.1
|
||||
doc/man/dogecoin-cli.1
|
||||
debian/manpages/dogecoind.1
|
||||
debian/manpages/dogecoin.conf.5
|
||||
debian/manpages/dogecoin-cli.1
|
||||
|
|
|
@ -60,41 +60,20 @@
|
|||
# JSON-RPC options (for controlling a running Dogecoin/dogecoind process)
|
||||
#
|
||||
|
||||
# server=1 tells Dogecoin-Qt and dogecoind to accept JSON-RPC commands
|
||||
# server=1 tells Dogecoin-QT and dogecoind to accept JSON-RPC commands
|
||||
#server=0
|
||||
|
||||
# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
|
||||
# This option can be specified multiple times (default: bind to all interfaces)
|
||||
#rpcbind=<addr>
|
||||
|
||||
# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
|
||||
# is .cookie and found in the `-datadir` being used for dogecoind. This option is typically used
|
||||
# when the server and client are run as the same user.
|
||||
#
|
||||
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
|
||||
# method(DEPRECATED) is to set this pair for the server and client:
|
||||
# You must set rpcuser and rpcpassword to secure the JSON-RPC api
|
||||
#rpcuser=Ulysseys
|
||||
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
|
||||
#
|
||||
# The second method `rpcauth` can be added to server startup argument. It is set at intialization time
|
||||
# using the output from the script in share/rpcuser/rpcuser.py after providing a username:
|
||||
#
|
||||
# ./share/rpcuser/rpcuser.py alice
|
||||
# String to be appended to dogecoin.conf:
|
||||
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
|
||||
# Your password:
|
||||
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
|
||||
#
|
||||
# On client-side, you add the normal user/password pair to send commands:
|
||||
#rpcuser=alice
|
||||
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
|
||||
#
|
||||
# You can even add multiple entries of these to the server conf file, and client can use any of them:
|
||||
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
|
||||
|
||||
# How many seconds dogecoin will wait for a complete RPC HTTP request.
|
||||
# after the HTTP connection is established.
|
||||
#rpcclienttimeout=30
|
||||
#rpctimeout=30
|
||||
|
||||
# By default, only RPC connections from localhost are allowed.
|
||||
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
|
||||
|
@ -103,8 +82,8 @@
|
|||
# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
|
||||
# because the rpcpassword is transmitted over the network unencrypted.
|
||||
|
||||
# server=1 tells Dogecoin-Qt to accept JSON-RPC commands.
|
||||
# it is also read by dogecoind to determine if RPC should be enabled
|
||||
# server=1 tells Dogecoin-QT to accept JSON-RPC commands.
|
||||
# it is also read by dogecoind to determine if RPC should be enabled
|
||||
#rpcallowip=10.1.1.34/255.255.255.0
|
||||
#rpcallowip=1.2.3.4/24
|
||||
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
|
||||
|
@ -116,6 +95,15 @@
|
|||
# running on another host using this option:
|
||||
#rpcconnect=127.0.0.1
|
||||
|
||||
# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
|
||||
# with Dogecoin -server or dogecoind
|
||||
#rpcssl=1
|
||||
|
||||
# OpenSSL settings used when rpcssl=1
|
||||
#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
|
||||
#rpcsslcertificatechainfile=server.cert
|
||||
#rpcsslprivatekeyfile=server.pem
|
||||
|
||||
# Transaction Fee Changes in 0.10.0
|
||||
|
||||
# Send transactions as zero-fee transactions if possible (default: 0)
|
||||
|
|
48
contrib/debian/manpages/dogecoin-cli.1
Normal file
48
contrib/debian/manpages/dogecoin-cli.1
Normal file
|
@ -0,0 +1,48 @@
|
|||
.TH DOGECOIN-CLI "1" "February 2015" "dogecoin-cli 0.10"
|
||||
.SH NAME
|
||||
dogecoin-cli \- a remote procedure call client for Dogecoin Core.
|
||||
.SH SYNOPSIS
|
||||
dogecoin-cli [options] <command> [params] \- Send command to Dogecoin Core.
|
||||
.TP
|
||||
dogecoin-cli [options] help \- Asks Dogecoin Core for a list of supported commands.
|
||||
.SH DESCRIPTION
|
||||
This manual page documents the dogecoin-cli program. dogecoin-cli is an RPC client used to send commands to Dogecoin Core.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-?\fR
|
||||
Show the help message.
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: dogecoin.conf).
|
||||
.TP
|
||||
\fB\-datadir=\fR<dir>
|
||||
Specify data directory.
|
||||
.TP
|
||||
\fB\-testnet\fR
|
||||
Connect to a Dogecoin Core instance running in testnet mode.
|
||||
.TP
|
||||
\fB\-regtest\fR
|
||||
Connect to a Dogecoin Core instance running in regtest mode (see documentation for -regtest on dogecoind).
|
||||
.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: 22555 or testnet: 44555).
|
||||
.TP
|
||||
\fB\-rpcconnect=\fR<ip>
|
||||
Send commands to node running on <ip> (default: 127.0.0.1).
|
||||
.TP
|
||||
\fB\-rpcssl\fR=\fI1\fR
|
||||
Use OpenSSL (https) for JSON\-RPC connections (see the Bitcoin Wiki for SSL setup instructions).
|
||||
|
||||
.SH "SEE ALSO"
|
||||
\fBdogecoind\fP, \fBdogecoin.conf\fP
|
||||
.SH AUTHOR
|
||||
This manual page was written by Ciemon Dunville <ciemon@gmail.com>. Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License.
|
||||
|
||||
The complete text of the MIT License can be found on the web at \fIhttp://opensource.org/licenses/MIT\fP.
|
203
contrib/debian/manpages/dogecoin-qt.1
Normal file
203
contrib/debian/manpages/dogecoin-qt.1
Normal file
|
@ -0,0 +1,203 @@
|
|||
.TH DOGECOIN-QT "1" "April 2013" "dogecoin-qt 1"
|
||||
.SH NAME
|
||||
dogecoin-qt \- peer-to-peer network based digital currency
|
||||
.SH DESCRIPTION
|
||||
.SS "Usage:"
|
||||
.IP
|
||||
dogecoin\-qt [command\-line options]
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\-?
|
||||
This help message
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: dogecoin.conf)
|
||||
.TP
|
||||
\fB\-pid=\fR<file>
|
||||
Specify pid file (default: dogecoind.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 SOCKS5 proxy
|
||||
.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: 22556 or testnet: 44556)
|
||||
.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: 22555 or testnet: 44555)
|
||||
.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 Dogecoin 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)
|
89
contrib/debian/manpages/dogecoin.conf.5
Normal file
89
contrib/debian/manpages/dogecoin.conf.5
Normal file
|
@ -0,0 +1,89 @@
|
|||
.TH DOGECOIN.CONF "5" "January 2011" "dogecoin.conf 3.19"
|
||||
.SH NAME
|
||||
dogecoin.conf \- dogecoin configuration file
|
||||
.SH SYNOPSIS
|
||||
All command-line options (except for '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
|
||||
.TP
|
||||
The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
|
||||
.TP
|
||||
The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, dogecoind(1) will look for a file named dogecoin.conf(5) in the dogecoin 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
|
||||
dogecoin.conf should be located in $HOME/.dogecoin
|
||||
.SH NETWORK-RELATED SETTINGS
|
||||
.TP
|
||||
.TP
|
||||
\fBtestnet=\fR[\fI'1'\fR|\fI'0'\fR]
|
||||
Enable or disable run on the test network instead of the real *dogecoin* network.
|
||||
.TP
|
||||
\fBproxy=\fR\fI'127.0.0.1:9050'\fR
|
||||
Connect via a socks4 proxy.
|
||||
.TP
|
||||
\fBaddnode=\fR\fI'10.0.0.2:22556'\fR
|
||||
Use as many *addnode=* settings as you like to connect to specific peers.
|
||||
.TP
|
||||
\fBconnect=\fR\fI'10.0.0.1:22556'\fR
|
||||
Use as many *connect=* settings as you like to connect ONLY to specific peers.
|
||||
.TP
|
||||
\fRmaxconnections=\fR\fI'value'\fR
|
||||
Maximum number of inbound+outbound connections.
|
||||
.SH JSON-RPC OPTIONS
|
||||
.TP
|
||||
\fBserver=\fR[\fI'1'\fR|\fI'0'\fR]
|
||||
Tells *dogecoin* to accept or not accept JSON-RPC commands.
|
||||
.TP
|
||||
\fBrpcuser=\fR\fI'username'\fR
|
||||
You must set *rpcuser* to secure the JSON-RPC api.
|
||||
.TP
|
||||
\fBrpcpassword=\fR\fI'password'\fR
|
||||
You must set *rpcpassword* to secure the JSON-RPC api.
|
||||
.TP
|
||||
\fBrpcallowip=\fR\fI'192.168.1.*'\fR
|
||||
By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
|
||||
.TP
|
||||
\fBrpcport=\fR\fI'22555'\fR
|
||||
Listen for RPC connections on this TCP port.
|
||||
.TP
|
||||
\fBrpcconnect=\fR\fI'127.0.0.1'\fR
|
||||
You can use *dogecoin* or *dogecoind(1)* to send commands to *dogecoin*/*dogecoind(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 *dogecoin* '\-server' or *dogecoind(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)
|
||||
.TP
|
||||
\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
|
||||
.TP
|
||||
\fBrpcsslprivatekeyfile=\fR\fI'server.pem'\fR
|
||||
.TP
|
||||
.SH MISCELLANEOUS OPTIONS
|
||||
.TP
|
||||
\fBgen=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable attempt to generate dogecoins.
|
||||
.TP
|
||||
\fB4way=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable use SSE instructions to try to generate dogecoins faster.
|
||||
.TP
|
||||
\fBkeypool=\fR\fI'100'\fR
|
||||
Pre-generate this many public/private key pairs, so wallet backups will be valid for both prior transactions and several dozen future transactions.
|
||||
.TP
|
||||
\fBpaytxfee=\fR\fI'0.00'\fR
|
||||
Pay an optional transaction fee every time you send dogecoins. Transactions with fees are more likely than free transactions to be included in generated blocks, so may be validated sooner.
|
||||
.TP
|
||||
\fBallowreceivebyip=\fR\fI'1'\fR
|
||||
Allow direct connections for the 'pay via IP address' feature.
|
||||
.TP
|
||||
.SH USER INTERFACE OPTIONS
|
||||
.TP
|
||||
\fBmin=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable start dogecoind minimized.
|
||||
.TP
|
||||
\fBminimizetotray=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable minimize to the system tray.
|
||||
.SH "SEE ALSO"
|
||||
dogecoind(1)
|
||||
.SH AUTHOR
|
||||
This manual page was written by Micah Anderson <micah@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
|
||||
|
||||
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
|
||||
|
208
contrib/debian/manpages/dogecoind.1
Normal file
208
contrib/debian/manpages/dogecoind.1
Normal file
|
@ -0,0 +1,208 @@
|
|||
.TH DOGECOIND "1" "January 2011" "dogecoind 3.19"
|
||||
.SH NAME
|
||||
dogecoind \- peer-to-peer network based digital currency
|
||||
.SH SYNOPSIS
|
||||
dogecoin [options] <command> [params]
|
||||
.TP
|
||||
dogecoin [options] help <command> \- Get help for a command
|
||||
.SH DESCRIPTION
|
||||
This manual page documents the dogecoind program. Dogecoin 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:
|
||||
|
||||
Dogecoins can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Dogecoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: dogecoin.conf)
|
||||
.TP
|
||||
\fB\-gen\fR
|
||||
Generate coins
|
||||
.TP
|
||||
\fB\-gen\fR=\fI0\fR
|
||||
Don't generate coins
|
||||
.TP
|
||||
\fB\-min\fR
|
||||
Start minimized
|
||||
.TP
|
||||
\fB\-datadir=\fR<dir>
|
||||
Specify data directory
|
||||
.TP
|
||||
\fB\-proxy=\fR<ip:port>
|
||||
Connect through SOCKS5 proxy
|
||||
.TP
|
||||
\fB\-addnode=\fR<ip>
|
||||
Add a node to connect to
|
||||
.TP
|
||||
\fB\-connect=\fR<ip>
|
||||
Connect only to the specified node
|
||||
.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\-daemon\fR
|
||||
Run in the background as a daemon and accept commands
|
||||
.TP
|
||||
\fB\-testnet\fR
|
||||
Use the test network
|
||||
.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>
|
||||
.TP
|
||||
\fB\-rpcallowip=\fR<ip>
|
||||
Allow JSON\-RPC connections from specified IP address
|
||||
.TP
|
||||
\fB\-rpcconnect=\fR<ip>
|
||||
Send commands to node running on <ip>
|
||||
.PP
|
||||
SSL options: (see the Dogecoin Wiki for SSL setup instructions)
|
||||
.TP
|
||||
\fB\-rpcssl\fR=\fI1\fR
|
||||
Use OpenSSL (https) for JSON\-RPC connections
|
||||
.TP
|
||||
\fB\-rpcsslcertificatchainfile=\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)
|
||||
.TP
|
||||
\-?
|
||||
This help message
|
||||
.SH COMMANDS
|
||||
.TP
|
||||
\fBbackupwallet 'destination'\fR
|
||||
Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename.
|
||||
.TP
|
||||
\fBgetaccount 'dogecoinaddress'\fR
|
||||
DEPRECATED. Returns the account associated with the given address.
|
||||
.TP
|
||||
\fBsetaccount 'dogecoinaddress' ['account']\fR
|
||||
DEPRECATED. Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
|
||||
.TP
|
||||
\fBgetaccountaddress 'account'\fR
|
||||
DEPRECATED. Returns a new dogecoin address for 'account'.
|
||||
.TP
|
||||
\fBgetaddressesbyaccount 'account'\fR
|
||||
DEPRECATED. Returns the list of addresses associated with the given 'account'.
|
||||
.TP
|
||||
\fBgetbalance 'account'\fR
|
||||
Returns the server's available balance, or the balance for 'account' (accounts are deprecated).
|
||||
.TP
|
||||
\fBgetblockcount\fR
|
||||
Returns the number of blocks in the longest block chain.
|
||||
.TP
|
||||
\fBgetblocknumber\fR
|
||||
Returns the block number of the latest block in the longest block chain.
|
||||
.TP
|
||||
\fBgetconnectioncount\fR
|
||||
Returns the number of connections to other nodes.
|
||||
.TP
|
||||
\fBgetdifficulty\fR
|
||||
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
|
||||
.TP
|
||||
\fBgetgenerate\fR
|
||||
Returns boolean true if server is trying to generate dogecoins, false otherwise.
|
||||
.TP
|
||||
\fBsetgenerate 'generate' ['genproclimit']\fR
|
||||
Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
|
||||
.TP
|
||||
\fBgethashespersec\fR
|
||||
Returns a recent hashes per second performance measurement while generating.
|
||||
.TP
|
||||
\fBgetinfo\fR
|
||||
Returns an object containing server information.
|
||||
.TP
|
||||
\fBgetnewaddress 'account'\fR
|
||||
Returns a new dogecoin address for receiving payments. If 'account' is specified (deprecated), it is added to the address book so payments received with the address will be credited to 'account'.
|
||||
.TP
|
||||
\fBgetreceivedbyaccount 'account' ['minconf=1']\fR
|
||||
DEPRECATED. Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
|
||||
.TP
|
||||
\fBgetreceivedbyaddress 'dogecoinaddress' ['minconf=1']\fR
|
||||
Returns the total amount received by 'dogecoinaddress' in transactions with at least ['minconf'] confirmations.
|
||||
.TP
|
||||
\fBgettransaction 'txid'\fR
|
||||
Returns information about a specific transaction, given hexadecimal transaction ID.
|
||||
.TP
|
||||
\fBgetwork 'data'\fR
|
||||
If 'data' is specified, tries to solve the block and returns true if it was successful. If 'data' is not specified, returns formatted hash 'data' to work on:
|
||||
|
||||
"midstate" : precomputed hash state after hashing the first half of the data.
|
||||
"data" : block data.
|
||||
"hash1" : formatted hash buffer for second hash.
|
||||
"target" : little endian hash target.
|
||||
.TP
|
||||
\fBhelp 'command'\fR
|
||||
List commands, or get help for a command.
|
||||
.TP
|
||||
\fBlistaccounts ['minconf=1']\fR
|
||||
DEPRECATED. List accounts and their current balances.
|
||||
.TP
|
||||
\fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
|
||||
['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
|
||||
|
||||
"account" : DEPRECATED. the account of the receiving address.
|
||||
"amount" : total amount received by the address.
|
||||
"confirmations" : number of confirmations of the most recent transaction included.
|
||||
.TP
|
||||
\fBlistreceivedbyaddress ['minconf=1'] ['includeempty=false']\fR
|
||||
['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
|
||||
|
||||
"address" : receiving address.
|
||||
"account" : DEPRECATED. the account of the receiving address.
|
||||
"amount" : total amount received by the address.
|
||||
"confirmations" : number of confirmations of the most recent transaction included.
|
||||
.TP
|
||||
\fBlisttransactions 'account' ['count=10']\fR
|
||||
Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
|
||||
|
||||
"category" : will be generate, send, receive, or move.
|
||||
"amount" : amount of transaction.
|
||||
"fee" : Fee (if any) paid (only for send transactions).
|
||||
"confirmations" : number of confirmations (only for generate/send/receive).
|
||||
"txid" : transaction ID (only for generate/send/receive).
|
||||
"otheraccount" : account funds were moved to or from (only for move).
|
||||
"message" : message associated with transaction (only for send).
|
||||
"to" : message-to associated with transaction (only for send).
|
||||
|
||||
*note: requires dogecoin 0.3.20 or later.
|
||||
.TP
|
||||
\fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
|
||||
DEPRECATED. Moves funds between accounts.
|
||||
.TP
|
||||
\fBsendfrom* <'account'> <'dogecoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
|
||||
DEPRECATED. Sends amount from account's balance to 'dogecoinaddress'. This method will fail if there is less than amount dogecoins with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
|
||||
.TP
|
||||
\fBsendtoaddress 'dogecoinaddress' 'amount' ['comment'] ['comment-to']\fR
|
||||
Sends amount from the server's available balance to 'dogecoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
|
||||
.TP
|
||||
\fBstop\fR
|
||||
Stops the dogecoin server.
|
||||
.TP
|
||||
\fBvalidateaddress 'dogecoinaddress'\fR
|
||||
Checks that 'dogecoinaddress' looks like a proper dogecoin address. Returns an object containing:
|
||||
|
||||
"isvalid" : true or false.
|
||||
"ismine" : true if the address is in the server's wallet.
|
||||
"address" : dogecoinaddress.
|
||||
|
||||
*note: ismine and address are only returned if the address is valid.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
dogecoin.conf(5)
|
||||
.SH AUTHOR
|
||||
This manual page was written by Micah Anderson <micah@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
|
||||
|
||||
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#!/usr/bin/make -f
|
||||
# -*- mode: makefile; coding: utf-8 -*-
|
||||
|
||||
|
@ -5,6 +6,9 @@
|
|||
#build/dogecoind::
|
||||
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_dogecoin)
|
||||
|
||||
DEB_INSTALL_EXAMPLES_dogecoind += debian/examples/*
|
||||
DEB_INSTALL_MANPAGES_dogecoind += debian/manpages/*
|
||||
|
||||
%:
|
||||
dh --with bash-completion $@
|
||||
|
||||
|
@ -12,12 +16,10 @@ override_dh_auto_clean:
|
|||
if [ -f Makefile ]; then $(MAKE) distclean; fi
|
||||
rm -rf Makefile.in aclocal.m4 configure src/Makefile.in src/bitcoin-config.h.in src/build-aux src/qt/Makefile.in src/qt/test/Makefile.in src/test/Makefile.in
|
||||
|
||||
QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
|
||||
|
||||
# Yea, autogen should be run on the source archive, but I like doing git archive
|
||||
override_dh_auto_configure:
|
||||
./autogen.sh
|
||||
./configure --with-gui=$(QT)
|
||||
./configure
|
||||
|
||||
override_dh_auto_test:
|
||||
make check
|
||||
|
|
|
@ -1,115 +1,15 @@
|
|||
Contents
|
||||
========
|
||||
===========
|
||||
This directory contains tools for developers working on this repository.
|
||||
|
||||
check-doc.py
|
||||
============
|
||||
|
||||
Check if all command line args are documented. The return value indicates the
|
||||
number of undocumented args.
|
||||
|
||||
clang-format-diff.py
|
||||
===================
|
||||
|
||||
A script to format unified git diffs according to [.clang-format](../../src/.clang-format).
|
||||
|
||||
For instance, to format the last commit with 0 lines of context,
|
||||
the script should be called from the git root folder as follows.
|
||||
|
||||
```
|
||||
git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
|
||||
```
|
||||
|
||||
copyright\_header.py
|
||||
====================
|
||||
|
||||
Provides utilities for managing copyright headers of `The Bitcoin Core
|
||||
developers` in repository source files. It has three subcommands:
|
||||
|
||||
```
|
||||
$ ./copyright_header.py report <base_directory> [verbose]
|
||||
$ ./copyright_header.py update <base_directory>
|
||||
$ ./copyright_header.py insert <file>
|
||||
```
|
||||
Running these subcommands without arguments displays a usage string.
|
||||
|
||||
copyright\_header.py report \<base\_directory\> [verbose]
|
||||
---------------------------------------------------------
|
||||
|
||||
Produces a report of all copyright header notices found inside the source files
|
||||
of a repository. Useful to quickly visualize the state of the headers.
|
||||
Specifying `verbose` will list the full filenames of files of each category.
|
||||
|
||||
copyright\_header.py update \<base\_directory\> [verbose]
|
||||
---------------------------------------------------------
|
||||
Updates all the copyright headers of `The Bitcoin Core developers` which were
|
||||
changed in a year more recent than is listed. For example:
|
||||
```
|
||||
// Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers
|
||||
```
|
||||
will be updated to:
|
||||
```
|
||||
// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers
|
||||
```
|
||||
where `<lastModifiedYear>` is obtained from the `git log` history.
|
||||
|
||||
This subcommand also handles copyright headers that have only a single year. In
|
||||
those cases:
|
||||
```
|
||||
// Copyright (c) <year> The Bitcoin Core developers
|
||||
```
|
||||
will be updated to:
|
||||
```
|
||||
// Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers
|
||||
```
|
||||
where the update is appropriate.
|
||||
|
||||
copyright\_header.py insert \<file\>
|
||||
------------------------------------
|
||||
Inserts a copyright header for `The Bitcoin Core developers` at the top of the
|
||||
file in either Python or C++ style as determined by the file extension. If the
|
||||
file is a Python file and it has `#!` starting the first line, the header is
|
||||
inserted in the line below it.
|
||||
|
||||
The copyright dates will be set to be `<year_introduced>-<current_year>` where
|
||||
`<year_introduced>` is according to the `git log` history. If
|
||||
`<year_introduced>` is equal to `<current_year>`, it will be set as a single
|
||||
year rather than two hyphenated years.
|
||||
|
||||
If the file already has a copyright for `The Bitcoin Core developers`, the
|
||||
script will exit.
|
||||
|
||||
gen-manpages.sh
|
||||
===============
|
||||
|
||||
A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
|
||||
This requires help2man which can be found at: https://www.gnu.org/software/help2man/
|
||||
|
||||
git-subtree-check.sh
|
||||
====================
|
||||
|
||||
Run this script from the root of the repository to verify that a subtree matches the contents of
|
||||
the commit it claims to have been updated to.
|
||||
|
||||
To use, make sure that you have fetched the upstream repository branch in which the subtree is
|
||||
maintained:
|
||||
* for `src/secp256k1`: https://github.com/bitcoin-core/secp256k1.git (branch master)
|
||||
* for `src/leveldb`: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork)
|
||||
* for `src/univalue`: https://github.com/bitcoin-core/univalue.git (branch master)
|
||||
* for `src/crypto/ctaes`: https://github.com/bitcoin-core/ctaes.git (branch master)
|
||||
|
||||
Usage: `git-subtree-check.sh DIR (COMMIT)`
|
||||
|
||||
`COMMIT` may be omitted, in which case `HEAD` is used.
|
||||
|
||||
github-merge.py
|
||||
===============
|
||||
github-merge.sh
|
||||
==================
|
||||
|
||||
A small script to automate merging pull-requests securely and sign them with GPG.
|
||||
|
||||
For example:
|
||||
|
||||
./github-merge.py 3077
|
||||
./github-merge.sh bitcoin/bitcoin 3077
|
||||
|
||||
(in any git repository) will help you merge pull request #3077 for the
|
||||
bitcoin/bitcoin repository.
|
||||
|
@ -125,7 +25,7 @@ check or whatever).
|
|||
|
||||
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
|
||||
merge), and when using GPG signatures, that even a compromised github
|
||||
couldn't mess with the sources.
|
||||
|
||||
Setup
|
||||
|
@ -136,22 +36,24 @@ Configuring the github-merge tool for the bitcoin repository is done in the foll
|
|||
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
|
||||
git config --global user.signingkey mykeyid (if you want to GPG sign)
|
||||
|
||||
optimize-pngs.py
|
||||
================
|
||||
fix-copyright-headers.py
|
||||
===========================
|
||||
|
||||
A script to optimize png files in the bitcoin
|
||||
repository (requires pngcrush).
|
||||
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.
|
||||
|
||||
security-check.py and test-security-check.py
|
||||
============================================
|
||||
For example a file changed in 2014 (with 2014 being the current year):
|
||||
```// Copyright (c) 2009-2013 The Bitcoin Core developers```
|
||||
|
||||
Perform basic ELF security checks on a series of executables.
|
||||
would be changed to:
|
||||
```// Copyright (c) 2009-2014 The Bitcoin Core developers```
|
||||
|
||||
symbol-check.py
|
||||
===============
|
||||
==================
|
||||
|
||||
A script to check that the (Linux) executables produced by gitian only contain
|
||||
allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
|
||||
allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
|
||||
still compatible with the minimum supported Linux distribution versions.
|
||||
|
||||
Example usage after a gitian build:
|
||||
|
@ -168,7 +70,7 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this
|
|||
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
|
||||
|
||||
update-translations.py
|
||||
======================
|
||||
=======================
|
||||
|
||||
Run this script from the root of the repository to update all translations from transifex.
|
||||
It will do the following automatically:
|
||||
|
@ -178,3 +80,17 @@ It will do the following automatically:
|
|||
- add missing translations to the build system (TODO)
|
||||
|
||||
See doc/translation-process.md for more information.
|
||||
|
||||
git-subtree-check.sh
|
||||
====================
|
||||
|
||||
Run this script from the root of the repository to verify that a subtree matches the contents of
|
||||
the commit it claims to have been updated to.
|
||||
|
||||
To use, make sure that you have fetched the upstream repository branch in which the subtree is
|
||||
maintained:
|
||||
* for src/secp256k1: https://github.com/bitcoin/secp256k1.git (branch master)
|
||||
* for sec/leveldb: https://github.com/bitcoin/leveldb.git (branch bitcoin-fork)
|
||||
|
||||
Usage: git-subtree-check.sh DIR COMMIT
|
||||
COMMIT may be omitted, in which case HEAD is used.
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) 2015-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
'''
|
||||
This checks if all command line args are documented.
|
||||
Return value is 0 to indicate no error.
|
||||
|
||||
Author: @MarcoFalke
|
||||
'''
|
||||
|
||||
from subprocess import check_output
|
||||
import re
|
||||
|
||||
FOLDER_GREP = 'src'
|
||||
FOLDER_TEST = 'src/test/'
|
||||
CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/%s' % FOLDER_GREP
|
||||
CMD_GREP_ARGS = r"egrep -r -I '(map(Multi)?Args(\.count\(|\[)|Get(Bool)?Arg\()\"\-[^\"]+?\"' %s | grep -v '%s'" % (CMD_ROOT_DIR, FOLDER_TEST)
|
||||
CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' %s" % (CMD_ROOT_DIR)
|
||||
REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
|
||||
REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
|
||||
# list unsupported, deprecated and duplicate args as they need no documentation
|
||||
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags', '-blockminsize'])
|
||||
|
||||
def main():
|
||||
used = check_output(CMD_GREP_ARGS, shell=True)
|
||||
docd = check_output(CMD_GREP_DOCS, shell=True)
|
||||
|
||||
args_used = set(re.findall(REGEX_ARG,used))
|
||||
args_docd = set(re.findall(REGEX_DOC,docd)).union(SET_DOC_OPTIONAL)
|
||||
args_need_doc = args_used.difference(args_docd)
|
||||
args_unknown = args_docd.difference(args_used)
|
||||
|
||||
print "Args used : %s" % len(args_used)
|
||||
print "Args documented : %s" % len(args_docd)
|
||||
print "Args undocumented: %s" % len(args_need_doc)
|
||||
print args_need_doc
|
||||
print "Args unknown : %s" % len(args_unknown)
|
||||
print args_unknown
|
||||
|
||||
exit(len(args_need_doc))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,164 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License.
|
||||
#
|
||||
# ============================================================
|
||||
#
|
||||
# University of Illinois/NCSA
|
||||
# Open Source License
|
||||
#
|
||||
# Copyright (c) 2007-2015 University of Illinois at Urbana-Champaign.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Developed by:
|
||||
#
|
||||
# LLVM Team
|
||||
#
|
||||
# University of Illinois at Urbana-Champaign
|
||||
#
|
||||
# http://llvm.org
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal with
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimers.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimers in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of the LLVM Team, University of Illinois at
|
||||
# Urbana-Champaign, nor the names of its contributors may be used to
|
||||
# endorse or promote products derived from this Software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# ============================================================
|
||||
#
|
||||
#===------------------------------------------------------------------------===#
|
||||
|
||||
r"""
|
||||
ClangFormat Diff Reformatter
|
||||
============================
|
||||
|
||||
This script reads input from a unified diff and reformats all the changed
|
||||
lines. This is useful to reformat all the lines touched by a specific patch.
|
||||
Example usage for git/svn users:
|
||||
|
||||
git diff -U0 HEAD^ | clang-format-diff.py -p1 -i
|
||||
svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
|
||||
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import difflib
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import StringIO
|
||||
import sys
|
||||
|
||||
|
||||
# Change this to the full path if clang-format is not on the path.
|
||||
binary = 'clang-format'
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=
|
||||
'Reformat changed lines in diff. Without -i '
|
||||
'option just output the diff that would be '
|
||||
'introduced.')
|
||||
parser.add_argument('-i', action='store_true', default=False,
|
||||
help='apply edits to files instead of displaying a diff')
|
||||
parser.add_argument('-p', metavar='NUM', default=0,
|
||||
help='strip the smallest prefix containing P slashes')
|
||||
parser.add_argument('-regex', metavar='PATTERN', default=None,
|
||||
help='custom pattern selecting file paths to reformat '
|
||||
'(case sensitive, overrides -iregex)')
|
||||
parser.add_argument('-iregex', metavar='PATTERN', default=
|
||||
r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto'
|
||||
r'|protodevel|java)',
|
||||
help='custom pattern selecting file paths to reformat '
|
||||
'(case insensitive, overridden by -regex)')
|
||||
parser.add_argument('-sort-includes', action='store_true', default=False,
|
||||
help='let clang-format sort include blocks')
|
||||
parser.add_argument('-v', '--verbose', action='store_true',
|
||||
help='be more verbose, ineffective without -i')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Extract changed lines for each file.
|
||||
filename = None
|
||||
lines_by_file = {}
|
||||
for line in sys.stdin:
|
||||
match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
|
||||
if match:
|
||||
filename = match.group(2)
|
||||
if filename == None:
|
||||
continue
|
||||
|
||||
if args.regex is not None:
|
||||
if not re.match('^%s$' % args.regex, filename):
|
||||
continue
|
||||
else:
|
||||
if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
|
||||
continue
|
||||
|
||||
match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
|
||||
if match:
|
||||
start_line = int(match.group(1))
|
||||
line_count = 1
|
||||
if match.group(3):
|
||||
line_count = int(match.group(3))
|
||||
if line_count == 0:
|
||||
continue
|
||||
end_line = start_line + line_count - 1
|
||||
lines_by_file.setdefault(filename, []).extend(
|
||||
['-lines', str(start_line) + ':' + str(end_line)])
|
||||
|
||||
# Reformat files containing changes in place.
|
||||
for filename, lines in lines_by_file.iteritems():
|
||||
if args.i and args.verbose:
|
||||
print 'Formatting', filename
|
||||
command = [binary, filename]
|
||||
if args.i:
|
||||
command.append('-i')
|
||||
if args.sort_includes:
|
||||
command.append('-sort-includes')
|
||||
command.extend(lines)
|
||||
command.extend(['-style=file', '-fallback-style=none'])
|
||||
p = subprocess.Popen(command, stdout=subprocess.PIPE,
|
||||
stderr=None, stdin=subprocess.PIPE)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
sys.exit(p.returncode)
|
||||
|
||||
if not args.i:
|
||||
with open(filename) as f:
|
||||
code = f.readlines()
|
||||
formatted_code = StringIO.StringIO(stdout).readlines()
|
||||
diff = difflib.unified_diff(code, formatted_code,
|
||||
filename, filename,
|
||||
'(before formatting)', '(after formatting)')
|
||||
diff_string = string.join(diff, '')
|
||||
if len(diff_string) > 0:
|
||||
sys.stdout.write(diff_string)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2017-2020 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# This simple script checks for commits beginning with: scripted-diff:
|
||||
# If found, looks for a script between the lines -BEGIN VERIFY SCRIPT- and
|
||||
# -END VERIFY SCRIPT-. If no ending is found, it reads until the end of the
|
||||
# commit message.
|
||||
|
||||
# The resulting script should exactly transform the previous commit into the current
|
||||
# one. Any remaining diff signals an error.
|
||||
|
||||
export LC_ALL=C
|
||||
if test -z $1; then
|
||||
echo "Usage: $0 <commit>..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RET=0
|
||||
PREV_BRANCH=$(git name-rev --name-only HEAD)
|
||||
PREV_HEAD=$(git rev-parse HEAD)
|
||||
for commit in $(git rev-list --reverse $1); do
|
||||
if git rev-list -n 1 --pretty="%s" $commit | grep -q "^scripted-diff:"; then
|
||||
git checkout --quiet $commit^ || exit
|
||||
SCRIPT="$(git rev-list --format=%b -n1 $commit | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
|
||||
if test -z "$SCRIPT"; then
|
||||
echo "Error: missing script for: $commit"
|
||||
echo "Failed"
|
||||
RET=1
|
||||
else
|
||||
echo "Running script for: $commit"
|
||||
echo "$SCRIPT"
|
||||
(eval "$SCRIPT")
|
||||
git --no-pager diff --exit-code $commit && echo "OK" || (echo "Failed"; false) || RET=1
|
||||
fi
|
||||
git reset --quiet --hard HEAD
|
||||
else
|
||||
if git rev-list "--format=%b" -n1 $commit | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
|
||||
echo "Error: script block marker but no scripted-diff in title of commit $commit"
|
||||
echo "Failed"
|
||||
RET=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
git checkout --quiet $PREV_BRANCH 2>/dev/null || git checkout --quiet $PREV_HEAD
|
||||
exit $RET
|
|
@ -1,610 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
import re
|
||||
import fnmatch
|
||||
import sys
|
||||
import subprocess
|
||||
import datetime
|
||||
import os
|
||||
|
||||
################################################################################
|
||||
# file filtering
|
||||
################################################################################
|
||||
|
||||
EXCLUDE = [
|
||||
# libsecp256k1:
|
||||
'src/secp256k1/include/secp256k1.h',
|
||||
'src/secp256k1/include/secp256k1_ecdh.h',
|
||||
'src/secp256k1/include/secp256k1_recovery.h',
|
||||
'src/secp256k1/include/secp256k1_schnorr.h',
|
||||
'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c',
|
||||
'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h',
|
||||
'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c',
|
||||
'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h',
|
||||
# auto generated:
|
||||
'src/univalue/lib/univalue_escapes.h',
|
||||
'src/qt/bitcoinstrings.cpp',
|
||||
'src/chainparamsseeds.h',
|
||||
# other external copyrights:
|
||||
'src/tinyformat.h',
|
||||
'src/leveldb/util/env_win.cc',
|
||||
'src/crypto/ctaes/bench.c',
|
||||
'qa/rpc-tests/test_framework/bignum.py',
|
||||
# python init:
|
||||
'*__init__.py',
|
||||
]
|
||||
EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE]))
|
||||
|
||||
INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.py']
|
||||
INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE]))
|
||||
|
||||
def applies_to_file(filename):
|
||||
return ((EXCLUDE_COMPILED.match(filename) is None) and
|
||||
(INCLUDE_COMPILED.match(filename) is not None))
|
||||
|
||||
################################################################################
|
||||
# obtain list of files in repo according to INCLUDE and EXCLUDE
|
||||
################################################################################
|
||||
|
||||
GIT_LS_CMD = 'git ls-files'
|
||||
|
||||
def call_git_ls():
|
||||
out = subprocess.check_output(GIT_LS_CMD.split(' '))
|
||||
return [f for f in out.decode("utf-8").split('\n') if f != '']
|
||||
|
||||
def get_filenames_to_examine():
|
||||
filenames = call_git_ls()
|
||||
return sorted([filename for filename in filenames if
|
||||
applies_to_file(filename)])
|
||||
|
||||
################################################################################
|
||||
# define and compile regexes for the patterns we are looking for
|
||||
################################################################################
|
||||
|
||||
|
||||
COPYRIGHT_WITH_C = 'Copyright \(c\)'
|
||||
COPYRIGHT_WITHOUT_C = 'Copyright'
|
||||
ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C)
|
||||
|
||||
YEAR = "20[0-9][0-9]"
|
||||
YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
|
||||
YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR)
|
||||
ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST)
|
||||
ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE,
|
||||
ANY_YEAR_STYLE))
|
||||
|
||||
ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE)
|
||||
|
||||
def compile_copyright_regex(copyright_style, year_style, name):
|
||||
return re.compile('%s %s %s' % (copyright_style, year_style, name))
|
||||
|
||||
EXPECTED_HOLDER_NAMES = [
|
||||
"Satoshi Nakamoto\n",
|
||||
"The Bitcoin Core developers\n",
|
||||
"The Bitcoin Core developers \n",
|
||||
"Bitcoin Core Developers\n",
|
||||
"the Bitcoin Core developers\n",
|
||||
"The Bitcoin developers\n",
|
||||
"The LevelDB Authors\. All rights reserved\.\n",
|
||||
"BitPay Inc\.\n",
|
||||
"BitPay, Inc\.\n",
|
||||
"University of Illinois at Urbana-Champaign\.\n",
|
||||
"MarcoFalke\n",
|
||||
"Pieter Wuille\n",
|
||||
"Pieter Wuille +\*\n",
|
||||
"Pieter Wuille, Gregory Maxwell +\*\n",
|
||||
"Pieter Wuille, Andrew Poelstra +\*\n",
|
||||
"Andrew Poelstra +\*\n",
|
||||
"Wladimir J. van der Laan\n",
|
||||
"Jeff Garzik\n",
|
||||
"Diederik Huys, Pieter Wuille +\*\n",
|
||||
"Thomas Daede, Cory Fields +\*\n",
|
||||
"Jan-Klaas Kollhof\n",
|
||||
"Sam Rushing\n",
|
||||
"ArtForz -- public domain half-a-node\n",
|
||||
]
|
||||
|
||||
DOMINANT_STYLE_COMPILED = {}
|
||||
YEAR_LIST_STYLE_COMPILED = {}
|
||||
WITHOUT_C_STYLE_COMPILED = {}
|
||||
|
||||
for holder_name in EXPECTED_HOLDER_NAMES:
|
||||
DOMINANT_STYLE_COMPILED[holder_name] = (
|
||||
compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name))
|
||||
YEAR_LIST_STYLE_COMPILED[holder_name] = (
|
||||
compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name))
|
||||
WITHOUT_C_STYLE_COMPILED[holder_name] = (
|
||||
compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE,
|
||||
holder_name))
|
||||
|
||||
################################################################################
|
||||
# search file contents for copyright message of particular category
|
||||
################################################################################
|
||||
|
||||
def get_count_of_copyrights_of_any_style_any_holder(contents):
|
||||
return len(ANY_COPYRIGHT_COMPILED.findall(contents))
|
||||
|
||||
def file_has_dominant_style_copyright_for_holder(contents, holder_name):
|
||||
match = DOMINANT_STYLE_COMPILED[holder_name].search(contents)
|
||||
return match is not None
|
||||
|
||||
def file_has_year_list_style_copyright_for_holder(contents, holder_name):
|
||||
match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents)
|
||||
return match is not None
|
||||
|
||||
def file_has_without_c_style_copyright_for_holder(contents, holder_name):
|
||||
match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents)
|
||||
return match is not None
|
||||
|
||||
################################################################################
|
||||
# get file info
|
||||
################################################################################
|
||||
|
||||
def read_file(filename):
|
||||
return open(os.path.abspath(filename), 'r').read()
|
||||
|
||||
def gather_file_info(filename):
|
||||
info = {}
|
||||
info['filename'] = filename
|
||||
c = read_file(filename)
|
||||
info['contents'] = c
|
||||
|
||||
info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c)
|
||||
|
||||
info['classified_copyrights'] = 0
|
||||
info['dominant_style'] = {}
|
||||
info['year_list_style'] = {}
|
||||
info['without_c_style'] = {}
|
||||
for holder_name in EXPECTED_HOLDER_NAMES:
|
||||
has_dominant_style = (
|
||||
file_has_dominant_style_copyright_for_holder(c, holder_name))
|
||||
has_year_list_style = (
|
||||
file_has_year_list_style_copyright_for_holder(c, holder_name))
|
||||
has_without_c_style = (
|
||||
file_has_without_c_style_copyright_for_holder(c, holder_name))
|
||||
info['dominant_style'][holder_name] = has_dominant_style
|
||||
info['year_list_style'][holder_name] = has_year_list_style
|
||||
info['without_c_style'][holder_name] = has_without_c_style
|
||||
if has_dominant_style or has_year_list_style or has_without_c_style:
|
||||
info['classified_copyrights'] = info['classified_copyrights'] + 1
|
||||
return info
|
||||
|
||||
################################################################################
|
||||
# report execution
|
||||
################################################################################
|
||||
|
||||
SEPARATOR = '-'.join(['' for _ in range(80)])
|
||||
|
||||
def print_filenames(filenames, verbose):
|
||||
if not verbose:
|
||||
return
|
||||
for filename in filenames:
|
||||
print("\t%s" % filename)
|
||||
|
||||
def print_report(file_infos, verbose):
|
||||
print(SEPARATOR)
|
||||
examined = [i['filename'] for i in file_infos]
|
||||
print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" %
|
||||
len(examined))
|
||||
print_filenames(examined, verbose)
|
||||
|
||||
print(SEPARATOR)
|
||||
print('')
|
||||
zero_copyrights = [i['filename'] for i in file_infos if
|
||||
i['all_copyrights'] == 0]
|
||||
print("%4d with zero copyrights" % len(zero_copyrights))
|
||||
print_filenames(zero_copyrights, verbose)
|
||||
one_copyright = [i['filename'] for i in file_infos if
|
||||
i['all_copyrights'] == 1]
|
||||
print("%4d with one copyright" % len(one_copyright))
|
||||
print_filenames(one_copyright, verbose)
|
||||
two_copyrights = [i['filename'] for i in file_infos if
|
||||
i['all_copyrights'] == 2]
|
||||
print("%4d with two copyrights" % len(two_copyrights))
|
||||
print_filenames(two_copyrights, verbose)
|
||||
three_copyrights = [i['filename'] for i in file_infos if
|
||||
i['all_copyrights'] == 3]
|
||||
print("%4d with three copyrights" % len(three_copyrights))
|
||||
print_filenames(three_copyrights, verbose)
|
||||
four_or_more_copyrights = [i['filename'] for i in file_infos if
|
||||
i['all_copyrights'] >= 4]
|
||||
print("%4d with four or more copyrights" % len(four_or_more_copyrights))
|
||||
print_filenames(four_or_more_copyrights, verbose)
|
||||
print('')
|
||||
print(SEPARATOR)
|
||||
print('Copyrights with dominant style:\ne.g. "Copyright (c)" and '
|
||||
'"<year>" or "<startYear>-<endYear>":\n')
|
||||
for holder_name in EXPECTED_HOLDER_NAMES:
|
||||
dominant_style = [i['filename'] for i in file_infos if
|
||||
i['dominant_style'][holder_name]]
|
||||
if len(dominant_style) > 0:
|
||||
print("%4d with '%s'" % (len(dominant_style),
|
||||
holder_name.replace('\n', '\\n')))
|
||||
print_filenames(dominant_style, verbose)
|
||||
print('')
|
||||
print(SEPARATOR)
|
||||
print('Copyrights with year list style:\ne.g. "Copyright (c)" and '
|
||||
'"<year1>, <year2>, ...":\n')
|
||||
for holder_name in EXPECTED_HOLDER_NAMES:
|
||||
year_list_style = [i['filename'] for i in file_infos if
|
||||
i['year_list_style'][holder_name]]
|
||||
if len(year_list_style) > 0:
|
||||
print("%4d with '%s'" % (len(year_list_style),
|
||||
holder_name.replace('\n', '\\n')))
|
||||
print_filenames(year_list_style, verbose)
|
||||
print('')
|
||||
print(SEPARATOR)
|
||||
print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "<year>" or '
|
||||
'"<startYear>-<endYear>":\n')
|
||||
for holder_name in EXPECTED_HOLDER_NAMES:
|
||||
without_c_style = [i['filename'] for i in file_infos if
|
||||
i['without_c_style'][holder_name]]
|
||||
if len(without_c_style) > 0:
|
||||
print("%4d with '%s'" % (len(without_c_style),
|
||||
holder_name.replace('\n', '\\n')))
|
||||
print_filenames(without_c_style, verbose)
|
||||
|
||||
print('')
|
||||
print(SEPARATOR)
|
||||
|
||||
unclassified_copyrights = [i['filename'] for i in file_infos if
|
||||
i['classified_copyrights'] < i['all_copyrights']]
|
||||
print("%d with unexpected copyright holder names" %
|
||||
len(unclassified_copyrights))
|
||||
print_filenames(unclassified_copyrights, verbose)
|
||||
print(SEPARATOR)
|
||||
|
||||
def exec_report(base_directory, verbose):
|
||||
original_cwd = os.getcwd()
|
||||
os.chdir(base_directory)
|
||||
filenames = get_filenames_to_examine()
|
||||
file_infos = [gather_file_info(f) for f in filenames]
|
||||
print_report(file_infos, verbose)
|
||||
os.chdir(original_cwd)
|
||||
|
||||
################################################################################
|
||||
# report cmd
|
||||
################################################################################
|
||||
|
||||
REPORT_USAGE = """
|
||||
Produces a report of all copyright header notices found inside the source files
|
||||
of a repository.
|
||||
|
||||
Usage:
|
||||
$ ./copyright_header.py report <base_directory> [verbose]
|
||||
|
||||
Arguments:
|
||||
<base_directory> - The base directory of a bitcoin source code repository.
|
||||
[verbose] - Includes a list of every file of each subcategory in the report.
|
||||
"""
|
||||
|
||||
def report_cmd(argv):
|
||||
if len(argv) == 2:
|
||||
sys.exit(REPORT_USAGE)
|
||||
|
||||
base_directory = argv[2]
|
||||
if not os.path.exists(base_directory):
|
||||
sys.exit("*** bad <base_directory>: %s" % base_directory)
|
||||
|
||||
if len(argv) == 3:
|
||||
verbose = False
|
||||
elif argv[3] == 'verbose':
|
||||
verbose = True
|
||||
else:
|
||||
sys.exit("*** unknown argument: %s" % argv[2])
|
||||
|
||||
exec_report(base_directory, verbose)
|
||||
|
||||
################################################################################
|
||||
# query git for year of last change
|
||||
################################################################################
|
||||
|
||||
GIT_LOG_CMD = "git log --pretty=format:%%ai %s"
|
||||
|
||||
def call_git_log(filename):
|
||||
out = subprocess.check_output((GIT_LOG_CMD % filename).split(' '))
|
||||
return out.decode("utf-8").split('\n')
|
||||
|
||||
def get_git_change_years(filename):
|
||||
git_log_lines = call_git_log(filename)
|
||||
if len(git_log_lines) == 0:
|
||||
return [datetime.date.today().year]
|
||||
# timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600"
|
||||
return [line.split(' ')[0].split('-')[0] for line in git_log_lines]
|
||||
|
||||
def get_most_recent_git_change_year(filename):
|
||||
return max(get_git_change_years(filename))
|
||||
|
||||
################################################################################
|
||||
# read and write to file
|
||||
################################################################################
|
||||
|
||||
def read_file_lines(filename):
|
||||
f = open(os.path.abspath(filename), 'r')
|
||||
file_lines = f.readlines()
|
||||
f.close()
|
||||
return file_lines
|
||||
|
||||
def write_file_lines(filename, file_lines):
|
||||
f = open(os.path.abspath(filename), 'w')
|
||||
f.write(''.join(file_lines))
|
||||
f.close()
|
||||
|
||||
################################################################################
|
||||
# update header years execution
|
||||
################################################################################
|
||||
|
||||
COPYRIGHT = 'Copyright \(c\)'
|
||||
YEAR = "20[0-9][0-9]"
|
||||
YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
|
||||
HOLDER = 'The Bitcoin Core developers'
|
||||
UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER]))
|
||||
|
||||
def get_updatable_copyright_line(file_lines):
|
||||
index = 0
|
||||
for line in file_lines:
|
||||
if UPDATEABLE_LINE_COMPILED.search(line) is not None:
|
||||
return index, line
|
||||
index = index + 1
|
||||
return None, None
|
||||
|
||||
def parse_year_range(year_range):
|
||||
year_split = year_range.split('-')
|
||||
start_year = year_split[0]
|
||||
if len(year_split) == 1:
|
||||
return start_year, start_year
|
||||
return start_year, year_split[1]
|
||||
|
||||
def year_range_to_str(start_year, end_year):
|
||||
if start_year == end_year:
|
||||
return start_year
|
||||
return "%s-%s" % (start_year, end_year)
|
||||
|
||||
def create_updated_copyright_line(line, last_git_change_year):
|
||||
copyright_splitter = 'Copyright (c) '
|
||||
copyright_split = line.split(copyright_splitter)
|
||||
# Preserve characters on line that are ahead of the start of the copyright
|
||||
# notice - they are part of the comment block and vary from file-to-file.
|
||||
before_copyright = copyright_split[0]
|
||||
after_copyright = copyright_split[1]
|
||||
|
||||
space_split = after_copyright.split(' ')
|
||||
year_range = space_split[0]
|
||||
start_year, end_year = parse_year_range(year_range)
|
||||
if end_year == last_git_change_year:
|
||||
return line
|
||||
return (before_copyright + copyright_splitter +
|
||||
year_range_to_str(start_year, last_git_change_year) + ' ' +
|
||||
' '.join(space_split[1:]))
|
||||
|
||||
def update_updatable_copyright(filename):
|
||||
file_lines = read_file_lines(filename)
|
||||
index, line = get_updatable_copyright_line(file_lines)
|
||||
if not line:
|
||||
print_file_action_message(filename, "No updatable copyright.")
|
||||
return
|
||||
last_git_change_year = get_most_recent_git_change_year(filename)
|
||||
new_line = create_updated_copyright_line(line, last_git_change_year)
|
||||
if line == new_line:
|
||||
print_file_action_message(filename, "Copyright up-to-date.")
|
||||
return
|
||||
file_lines[index] = new_line
|
||||
write_file_lines(filename, file_lines)
|
||||
print_file_action_message(filename,
|
||||
"Copyright updated! -> %s" % last_git_change_year)
|
||||
|
||||
def exec_update_header_year(base_directory):
|
||||
original_cwd = os.getcwd()
|
||||
os.chdir(base_directory)
|
||||
for filename in get_filenames_to_examine():
|
||||
update_updatable_copyright(filename)
|
||||
os.chdir(original_cwd)
|
||||
|
||||
################################################################################
|
||||
# update cmd
|
||||
################################################################################
|
||||
|
||||
UPDATE_USAGE = """
|
||||
Updates all the copyright headers of "The Bitcoin Core developers" which were
|
||||
changed in a year more recent than is listed. For example:
|
||||
|
||||
// Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers
|
||||
|
||||
will be updated to:
|
||||
|
||||
// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers
|
||||
|
||||
where <lastModifiedYear> is obtained from the 'git log' history.
|
||||
|
||||
This subcommand also handles copyright headers that have only a single year. In those cases:
|
||||
|
||||
// Copyright (c) <year> The Bitcoin Core developers
|
||||
|
||||
will be updated to:
|
||||
|
||||
// Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers
|
||||
|
||||
where the update is appropriate.
|
||||
|
||||
Usage:
|
||||
$ ./copyright_header.py update <base_directory>
|
||||
|
||||
Arguments:
|
||||
<base_directory> - The base directory of a bitcoin source code repository.
|
||||
"""
|
||||
|
||||
def print_file_action_message(filename, action):
|
||||
print("%-52s %s" % (filename, action))
|
||||
|
||||
def update_cmd(argv):
|
||||
if len(argv) != 3:
|
||||
sys.exit(UPDATE_USAGE)
|
||||
|
||||
base_directory = argv[2]
|
||||
if not os.path.exists(base_directory):
|
||||
sys.exit("*** bad base_directory: %s" % base_directory)
|
||||
exec_update_header_year(base_directory)
|
||||
|
||||
################################################################################
|
||||
# inserted copyright header format
|
||||
################################################################################
|
||||
|
||||
def get_header_lines(header, start_year, end_year):
|
||||
lines = header.split('\n')[1:-1]
|
||||
lines[0] = lines[0] % year_range_to_str(start_year, end_year)
|
||||
return [line + '\n' for line in lines]
|
||||
|
||||
CPP_HEADER = '''
|
||||
// Copyright (c) %s The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
|
||||
def get_cpp_header_lines_to_insert(start_year, end_year):
|
||||
return reversed(get_header_lines(CPP_HEADER, start_year, end_year))
|
||||
|
||||
PYTHON_HEADER = '''
|
||||
# Copyright (c) %s The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
|
||||
def get_python_header_lines_to_insert(start_year, end_year):
|
||||
return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year))
|
||||
|
||||
################################################################################
|
||||
# query git for year of last change
|
||||
################################################################################
|
||||
|
||||
def get_git_change_year_range(filename):
|
||||
years = get_git_change_years(filename)
|
||||
return min(years), max(years)
|
||||
|
||||
################################################################################
|
||||
# check for existing core copyright
|
||||
################################################################################
|
||||
|
||||
def file_already_has_core_copyright(file_lines):
|
||||
index, _ = get_updatable_copyright_line(file_lines)
|
||||
return index != None
|
||||
|
||||
################################################################################
|
||||
# insert header execution
|
||||
################################################################################
|
||||
|
||||
def file_has_hashbang(file_lines):
|
||||
if len(file_lines) < 1:
|
||||
return False
|
||||
if len(file_lines[0]) <= 2:
|
||||
return False
|
||||
return file_lines[0][:2] == '#!'
|
||||
|
||||
def insert_python_header(filename, file_lines, start_year, end_year):
|
||||
if file_has_hashbang(file_lines):
|
||||
insert_idx = 1
|
||||
else:
|
||||
insert_idx = 0
|
||||
header_lines = get_python_header_lines_to_insert(start_year, end_year)
|
||||
for line in header_lines:
|
||||
file_lines.insert(insert_idx, line)
|
||||
write_file_lines(filename, file_lines)
|
||||
|
||||
def insert_cpp_header(filename, file_lines, start_year, end_year):
|
||||
header_lines = get_cpp_header_lines_to_insert(start_year, end_year)
|
||||
for line in header_lines:
|
||||
file_lines.insert(0, line)
|
||||
write_file_lines(filename, file_lines)
|
||||
|
||||
def exec_insert_header(filename, style):
|
||||
file_lines = read_file_lines(filename)
|
||||
if file_already_has_core_copyright(file_lines):
|
||||
sys.exit('*** %s already has a copyright by The Bitcoin Core developers'
|
||||
% (filename))
|
||||
start_year, end_year = get_git_change_year_range(filename)
|
||||
if style == 'python':
|
||||
insert_python_header(filename, file_lines, start_year, end_year)
|
||||
else:
|
||||
insert_cpp_header(filename, file_lines, start_year, end_year)
|
||||
|
||||
################################################################################
|
||||
# insert cmd
|
||||
################################################################################
|
||||
|
||||
INSERT_USAGE = """
|
||||
Inserts a copyright header for "The Bitcoin Core developers" at the top of the
|
||||
file in either Python or C++ style as determined by the file extension. If the
|
||||
file is a Python file and it has a '#!' starting the first line, the header is
|
||||
inserted in the line below it.
|
||||
|
||||
The copyright dates will be set to be:
|
||||
|
||||
"<year_introduced>-<current_year>"
|
||||
|
||||
where <year_introduced> is according to the 'git log' history. If
|
||||
<year_introduced> is equal to <current_year>, the date will be set to be:
|
||||
|
||||
"<current_year>"
|
||||
|
||||
If the file already has a copyright for "The Bitcoin Core developers", the
|
||||
script will exit.
|
||||
|
||||
Usage:
|
||||
$ ./copyright_header.py insert <file>
|
||||
|
||||
Arguments:
|
||||
<file> - A source file in the bitcoin repository.
|
||||
"""
|
||||
|
||||
def insert_cmd(argv):
|
||||
if len(argv) != 3:
|
||||
sys.exit(INSERT_USAGE)
|
||||
|
||||
filename = argv[2]
|
||||
if not os.path.isfile(filename):
|
||||
sys.exit("*** bad filename: %s" % filename)
|
||||
_, extension = os.path.splitext(filename)
|
||||
if extension not in ['.h', '.cpp', '.cc', '.c', '.py']:
|
||||
sys.exit("*** cannot insert for file extension %s" % extension)
|
||||
|
||||
if extension == '.py':
|
||||
style = 'python'
|
||||
else:
|
||||
style = 'cpp'
|
||||
exec_insert_header(filename, style)
|
||||
|
||||
################################################################################
|
||||
# UI
|
||||
################################################################################
|
||||
|
||||
USAGE = """
|
||||
copyright_header.py - utilities for managing copyright headers of 'The Bitcoin
|
||||
Core developers' in repository source files.
|
||||
|
||||
Usage:
|
||||
$ ./copyright_header <subcommand>
|
||||
|
||||
Subcommands:
|
||||
report
|
||||
update
|
||||
insert
|
||||
|
||||
To see subcommand usage, run them without arguments.
|
||||
"""
|
||||
|
||||
SUBCOMMANDS = ['report', 'update', 'insert']
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) == 1:
|
||||
sys.exit(USAGE)
|
||||
subcommand = sys.argv[1]
|
||||
if subcommand not in SUBCOMMANDS:
|
||||
sys.exit(USAGE)
|
||||
if subcommand == 'report':
|
||||
report_cmd(sys.argv)
|
||||
elif subcommand == 'update':
|
||||
update_cmd(sys.argv)
|
||||
elif subcommand == 'insert':
|
||||
insert_cmd(sys.argv)
|
53
contrib/devtools/fix-copyright-headers.py
Executable file
53
contrib/devtools/fix-copyright-headers.py
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/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 Core developers
|
||||
|
||||
it will change it to
|
||||
|
||||
// Copyright (c) 2009-2014 The Bitcoin Core 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,29 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
||||
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||
|
||||
BITCOIND=${BITCOIND:-$SRCDIR/dogecoind}
|
||||
BITCOINCLI=${BITCOINCLI:-$SRCDIR/dogecoin-cli}
|
||||
BITCOINTX=${BITCOINTX:-$SRCDIR/dogecoin-tx}
|
||||
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/dogecoin-qt}
|
||||
|
||||
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
|
||||
|
||||
# The autodetected version git tag can screw up manpage output a little bit
|
||||
BTCVER=($($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
|
||||
|
||||
# Create a footer file with copyright content.
|
||||
# This gets autodetected fine for dogecoind if --version-string is not set,
|
||||
# but has different outcomes for dogecoin-qt and dogecoin-cli.
|
||||
echo "[COPYRIGHT]" > footer.h2m
|
||||
$BITCOIND --version | sed -n '1!p' >> footer.h2m
|
||||
|
||||
for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $BITCOINQT; do
|
||||
cmdname="${cmd##*/}"
|
||||
help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||
sed -i "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||
done
|
||||
|
||||
rm -f footer.h2m
|
|
@ -1,7 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2015 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
DIR="$1"
|
||||
COMMIT="$2"
|
||||
|
|
|
@ -1,251 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# 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.
|
||||
from __future__ import division,print_function,unicode_literals
|
||||
import os
|
||||
from sys import stdin,stdout,stderr
|
||||
import argparse
|
||||
import subprocess
|
||||
import json,codecs
|
||||
try:
|
||||
from urllib.request import Request,urlopen
|
||||
except:
|
||||
from urllib2 import Request,urlopen
|
||||
|
||||
# External tools (can be overridden using environment)
|
||||
GIT = os.getenv('GIT','git')
|
||||
BASH = os.getenv('BASH','bash')
|
||||
|
||||
# OS specific configuration for terminal attributes
|
||||
ATTR_RESET = ''
|
||||
ATTR_PR = ''
|
||||
COMMIT_FORMAT = '%h %s (%an)%d'
|
||||
if os.name == 'posix': # if posix, assume we can use basic terminal escapes
|
||||
ATTR_RESET = '\033[0m'
|
||||
ATTR_PR = '\033[1;36m'
|
||||
COMMIT_FORMAT = '%C(bold blue)%h%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
|
||||
|
||||
def git_config_get(option, default=None):
|
||||
'''
|
||||
Get named configuration option from git repository.
|
||||
'''
|
||||
try:
|
||||
return subprocess.check_output([GIT,'config','--get',option]).rstrip().decode('utf-8')
|
||||
except subprocess.CalledProcessError as e:
|
||||
return default
|
||||
|
||||
def retrieve_pr_info(repo,pull):
|
||||
'''
|
||||
Retrieve pull request information from github.
|
||||
Return None if no title can be found, or an error happens.
|
||||
'''
|
||||
try:
|
||||
req = Request("https://api.github.com/repos/"+repo+"/pulls/"+pull)
|
||||
result = urlopen(req)
|
||||
reader = codecs.getreader('utf-8')
|
||||
obj = json.load(reader(result))
|
||||
return obj
|
||||
except Exception as e:
|
||||
print('Warning: unable to retrieve pull information from github: %s' % e)
|
||||
return None
|
||||
|
||||
def ask_prompt(text):
|
||||
print(text,end=" ",file=stderr)
|
||||
stderr.flush()
|
||||
reply = stdin.readline().rstrip()
|
||||
print("",file=stderr)
|
||||
return reply
|
||||
|
||||
def parse_arguments():
|
||||
epilog = '''
|
||||
In addition, you can set the following git configuration variables:
|
||||
githubmerge.repository (mandatory),
|
||||
user.signingkey (mandatory),
|
||||
githubmerge.host (default: git@github.com),
|
||||
githubmerge.branch (no default),
|
||||
githubmerge.testcmd (default: none).
|
||||
'''
|
||||
parser = argparse.ArgumentParser(description='Utility to merge, sign and push github pull requests',
|
||||
epilog=epilog)
|
||||
parser.add_argument('pull', metavar='PULL', type=int, nargs=1,
|
||||
help='Pull request ID to merge')
|
||||
parser.add_argument('branch', metavar='BRANCH', type=str, nargs='?',
|
||||
default=None, help='Branch to merge against (default: githubmerge.branch setting, or base branch for pull, or \'master\')')
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
# Extract settings from git repo
|
||||
repo = git_config_get('githubmerge.repository')
|
||||
host = git_config_get('githubmerge.host','git@github.com')
|
||||
opt_branch = git_config_get('githubmerge.branch',None)
|
||||
testcmd = git_config_get('githubmerge.testcmd')
|
||||
signingkey = git_config_get('user.signingkey')
|
||||
if repo is None:
|
||||
print("ERROR: No repository configured. Use this command to set:", file=stderr)
|
||||
print("git config githubmerge.repository <owner>/<repo>", file=stderr)
|
||||
exit(1)
|
||||
if signingkey is None:
|
||||
print("ERROR: No GPG signing key set. Set one using:",file=stderr)
|
||||
print("git config --global user.signingkey <key>",file=stderr)
|
||||
exit(1)
|
||||
|
||||
host_repo = host+":"+repo # shortcut for push/pull target
|
||||
|
||||
# Extract settings from command line
|
||||
args = parse_arguments()
|
||||
pull = str(args.pull[0])
|
||||
|
||||
# Receive pull information from github
|
||||
info = retrieve_pr_info(repo,pull)
|
||||
if info is None:
|
||||
exit(1)
|
||||
title = info['title']
|
||||
# precedence order for destination branch argument:
|
||||
# - command line argument
|
||||
# - githubmerge.branch setting
|
||||
# - base branch for pull (as retrieved from github)
|
||||
# - 'master'
|
||||
branch = args.branch or opt_branch or info['base']['ref'] or 'master'
|
||||
|
||||
# Initialize source branches
|
||||
head_branch = 'pull/'+pull+'/head'
|
||||
base_branch = 'pull/'+pull+'/base'
|
||||
merge_branch = 'pull/'+pull+'/merge'
|
||||
local_merge_branch = 'pull/'+pull+'/local-merge'
|
||||
|
||||
devnull = open(os.devnull,'w')
|
||||
try:
|
||||
subprocess.check_call([GIT,'checkout','-q',branch])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot check out branch %s." % (branch), file=stderr)
|
||||
exit(3)
|
||||
try:
|
||||
subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/pull/'+pull+'/*:refs/heads/pull/'+pull+'/*'])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot find pull request #%s on %s." % (pull,host_repo), file=stderr)
|
||||
exit(3)
|
||||
try:
|
||||
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+head_branch], stdout=devnull, stderr=stdout)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot find head of pull request #%s on %s." % (pull,host_repo), file=stderr)
|
||||
exit(3)
|
||||
try:
|
||||
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+merge_branch], stdout=devnull, stderr=stdout)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot find merge of pull request #%s on %s." % (pull,host_repo), file=stderr)
|
||||
exit(3)
|
||||
try:
|
||||
subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/heads/'+branch+':refs/heads/'+base_branch])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot find branch %s on %s." % (branch,host_repo), file=stderr)
|
||||
exit(3)
|
||||
subprocess.check_call([GIT,'checkout','-q',base_branch])
|
||||
subprocess.call([GIT,'branch','-q','-D',local_merge_branch], stderr=devnull)
|
||||
subprocess.check_call([GIT,'checkout','-q','-b',local_merge_branch])
|
||||
|
||||
try:
|
||||
# Create unsigned merge commit.
|
||||
if title:
|
||||
firstline = 'Merge #%s: %s' % (pull,title)
|
||||
else:
|
||||
firstline = 'Merge #%s' % (pull,)
|
||||
message = firstline + '\n\n'
|
||||
message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
|
||||
try:
|
||||
subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Cannot be merged cleanly.",file=stderr)
|
||||
subprocess.check_call([GIT,'merge','--abort'])
|
||||
exit(4)
|
||||
logmsg = subprocess.check_output([GIT,'log','--pretty=format:%s','-n','1']).decode('utf-8')
|
||||
if logmsg.rstrip() != firstline.rstrip():
|
||||
print("ERROR: Creating merge failed (already merged?).",file=stderr)
|
||||
exit(4)
|
||||
|
||||
print('%s#%s%s %s %sinto %s%s' % (ATTR_RESET+ATTR_PR,pull,ATTR_RESET,title,ATTR_RESET+ATTR_PR,branch,ATTR_RESET))
|
||||
subprocess.check_call([GIT,'log','--graph','--topo-order','--pretty=format:'+COMMIT_FORMAT,base_branch+'..'+head_branch])
|
||||
print()
|
||||
# Run test command if configured.
|
||||
if testcmd:
|
||||
# Go up to the repository's root.
|
||||
toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel']).strip()
|
||||
os.chdir(toplevel)
|
||||
if subprocess.call(testcmd,shell=True):
|
||||
print("ERROR: Running %s failed." % testcmd,file=stderr)
|
||||
exit(5)
|
||||
|
||||
# Show the created merge.
|
||||
diff = subprocess.check_output([GIT,'diff',merge_branch+'..'+local_merge_branch])
|
||||
subprocess.check_call([GIT,'diff',base_branch+'..'+local_merge_branch])
|
||||
if diff:
|
||||
print("WARNING: merge differs from github!",file=stderr)
|
||||
reply = ask_prompt("Type 'ignore' to continue.")
|
||||
if reply.lower() == 'ignore':
|
||||
print("Difference with github ignored.",file=stderr)
|
||||
else:
|
||||
exit(6)
|
||||
reply = ask_prompt("Press 'd' to accept the diff.")
|
||||
if reply.lower() == 'd':
|
||||
print("Diff accepted.",file=stderr)
|
||||
else:
|
||||
print("ERROR: Diff rejected.",file=stderr)
|
||||
exit(6)
|
||||
else:
|
||||
# Verify the result manually.
|
||||
print("Dropping you on a shell so you can try building/testing the merged source.",file=stderr)
|
||||
print("Run 'git diff HEAD~' to show the changes being merged.",file=stderr)
|
||||
print("Type 'exit' when done.",file=stderr)
|
||||
if os.path.isfile('/etc/debian_version'): # Show pull number on Debian default prompt
|
||||
os.putenv('debian_chroot',pull)
|
||||
subprocess.call([BASH,'-i'])
|
||||
reply = ask_prompt("Type 'm' to accept the merge.")
|
||||
if reply.lower() == 'm':
|
||||
print("Merge accepted.",file=stderr)
|
||||
else:
|
||||
print("ERROR: Merge rejected.",file=stderr)
|
||||
exit(7)
|
||||
|
||||
# Sign the merge commit.
|
||||
reply = ask_prompt("Type 's' to sign off on the merge.")
|
||||
if reply == 's':
|
||||
try:
|
||||
subprocess.check_call([GIT,'commit','-q','--gpg-sign','--amend','--no-edit'])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Error signing, exiting.",file=stderr)
|
||||
exit(1)
|
||||
else:
|
||||
print("Not signing off on merge, exiting.",file=stderr)
|
||||
exit(1)
|
||||
|
||||
# Put the result in branch.
|
||||
subprocess.check_call([GIT,'checkout','-q',branch])
|
||||
subprocess.check_call([GIT,'reset','-q','--hard',local_merge_branch])
|
||||
finally:
|
||||
# Clean up temporary branches.
|
||||
subprocess.call([GIT,'checkout','-q',branch])
|
||||
subprocess.call([GIT,'branch','-q','-D',head_branch],stderr=devnull)
|
||||
subprocess.call([GIT,'branch','-q','-D',base_branch],stderr=devnull)
|
||||
subprocess.call([GIT,'branch','-q','-D',merge_branch],stderr=devnull)
|
||||
subprocess.call([GIT,'branch','-q','-D',local_merge_branch],stderr=devnull)
|
||||
|
||||
# Push the result.
|
||||
reply = ask_prompt("Type 'push' to push the result to %s, branch %s." % (host_repo,branch))
|
||||
if reply.lower() == 'push':
|
||||
subprocess.check_call([GIT,'push',host_repo,'refs/heads/'+branch])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
181
contrib/devtools/github-merge.sh
Executable file
181
contrib/devtools/github-merge.sh
Executable file
|
@ -0,0 +1,181 @@
|
|||
#!/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 -q -1 "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then
|
||||
echo "ERROR: Cannot find head of pull request #$PULL on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
if ! git log -q -1 "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then
|
||||
echo "ERROR: Cannot find merge of pull request #$PULL on $HOST:$REPO." >&2
|
||||
exit 3
|
||||
fi
|
||||
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
|
||||
if [[ -f /etc/debian_version ]]; then # Show pull number in prompt on Debian default prompt
|
||||
export debian_chroot="$PULL"
|
||||
fi
|
||||
bash -i
|
||||
read -p "Press 'm' to accept the merge. " -n 1 -r >&2
|
||||
echo
|
||||
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 "ERROR: No GPG signing key set, not signing. Set one using:" >&2
|
||||
echo "git config --global user.signingkey <key>" >&2
|
||||
cleanup
|
||||
exit 1
|
||||
else
|
||||
git commit -q --gpg-sign --amend --no-edit
|
||||
fi
|
||||
else
|
||||
echo "Not signing off on merge, exiting."
|
||||
cleanup
|
||||
exit 1
|
||||
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
|
|
@ -1,9 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) 2014-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
|
||||
Run this scrip every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
|
||||
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
|
||||
'''
|
||||
import os
|
||||
|
@ -21,12 +18,12 @@ def content_hash(filename):
|
|||
'''Return hash of RGBA contents of image'''
|
||||
i = Image.open(filename)
|
||||
i = i.convert('RGBA')
|
||||
data = i.tobytes()
|
||||
data = i.tostring()
|
||||
return hashlib.sha256(data).hexdigest()
|
||||
|
||||
pngcrush = 'pngcrush'
|
||||
git = 'git'
|
||||
folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"]
|
||||
folders = ["src/qt/res/movies", "src/qt/res/icons"]
|
||||
basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')
|
||||
totalSaveBytes = 0
|
||||
noHashChange = True
|
||||
|
@ -39,7 +36,7 @@ for folder in folders:
|
|||
if extension.lower() == '.png':
|
||||
print("optimizing "+file+"..."),
|
||||
file_path = os.path.join(absFolder, file)
|
||||
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
|
||||
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};
|
||||
fileMetaMap['contentHashPre'] = content_hash(file_path)
|
||||
|
||||
pngCrushOutput = ""
|
||||
|
|
|
@ -1,216 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) 2015-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
Perform basic ELF security checks on a series of executables.
|
||||
Exit status will be 0 if successful, and the program will be silent.
|
||||
Otherwise the exit status will be 1 and it will log which executables failed which checks.
|
||||
Needs `readelf` (for ELF) and `objdump` (for PE).
|
||||
'''
|
||||
from __future__ import division,print_function,unicode_literals
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
|
||||
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
|
||||
NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning
|
||||
|
||||
def check_ELF_PIE(executable):
|
||||
'''
|
||||
Check for position independent executable (PIE), allowing for address space randomization.
|
||||
'''
|
||||
p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
|
||||
ok = False
|
||||
for line in stdout.split(b'\n'):
|
||||
line = line.split()
|
||||
if len(line)>=2 and line[0] == b'Type:' and line[1] == b'DYN':
|
||||
ok = True
|
||||
return ok
|
||||
|
||||
def get_ELF_program_headers(executable):
|
||||
'''Return type and flags for ELF program headers'''
|
||||
p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
in_headers = False
|
||||
count = 0
|
||||
headers = []
|
||||
for line in stdout.split(b'\n'):
|
||||
if line.startswith(b'Program Headers:'):
|
||||
in_headers = True
|
||||
if line == b'':
|
||||
in_headers = False
|
||||
if in_headers:
|
||||
if count == 1: # header line
|
||||
ofs_typ = line.find(b'Type')
|
||||
ofs_offset = line.find(b'Offset')
|
||||
ofs_flags = line.find(b'Flg')
|
||||
ofs_align = line.find(b'Align')
|
||||
if ofs_typ == -1 or ofs_offset == -1 or ofs_flags == -1 or ofs_align == -1:
|
||||
raise ValueError('Cannot parse elfread -lW output')
|
||||
elif count > 1:
|
||||
typ = line[ofs_typ:ofs_offset].rstrip()
|
||||
flags = line[ofs_flags:ofs_align].rstrip()
|
||||
headers.append((typ, flags))
|
||||
count += 1
|
||||
return headers
|
||||
|
||||
def check_ELF_NX(executable):
|
||||
'''
|
||||
Check that no sections are writable and executable (including the stack)
|
||||
'''
|
||||
have_wx = False
|
||||
have_gnu_stack = False
|
||||
for (typ, flags) in get_ELF_program_headers(executable):
|
||||
if typ == b'GNU_STACK':
|
||||
have_gnu_stack = True
|
||||
if b'W' in flags and b'E' in flags: # section is both writable and executable
|
||||
have_wx = True
|
||||
return have_gnu_stack and not have_wx
|
||||
|
||||
def check_ELF_RELRO(executable):
|
||||
'''
|
||||
Check for read-only relocations.
|
||||
GNU_RELRO program header must exist
|
||||
Dynamic section must have BIND_NOW flag
|
||||
'''
|
||||
have_gnu_relro = False
|
||||
for (typ, flags) in get_ELF_program_headers(executable):
|
||||
# Note: not checking flags == 'R': here as linkers set the permission differently
|
||||
# This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions.
|
||||
# However, the dynamic linker need to write to this area so these are RW.
|
||||
# Glibc itself takes care of mprotecting this area R after relocations are finished.
|
||||
# See also http://permalink.gmane.org/gmane.comp.gnu.binutils/71347
|
||||
if typ == b'GNU_RELRO':
|
||||
have_gnu_relro = True
|
||||
|
||||
have_bindnow = False
|
||||
p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
for line in stdout.split(b'\n'):
|
||||
tokens = line.split()
|
||||
if len(tokens)>1 and tokens[1] == b'(BIND_NOW)' or (len(tokens)>2 and tokens[1] == b'(FLAGS)' and b'BIND_NOW' in tokens[2]):
|
||||
have_bindnow = True
|
||||
return have_gnu_relro and have_bindnow
|
||||
|
||||
def check_ELF_Canary(executable):
|
||||
'''
|
||||
Check for use of stack canary
|
||||
'''
|
||||
p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
ok = False
|
||||
for line in stdout.split(b'\n'):
|
||||
if b'__stack_chk_fail' in line:
|
||||
ok = True
|
||||
return ok
|
||||
|
||||
def get_PE_dll_characteristics(executable):
|
||||
'''
|
||||
Get PE DllCharacteristics bits.
|
||||
Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
|
||||
and bits is the DllCharacteristics value.
|
||||
'''
|
||||
p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
arch = ''
|
||||
bits = 0
|
||||
for line in stdout.split('\n'):
|
||||
tokens = line.split()
|
||||
if len(tokens)>=2 and tokens[0] == 'architecture:':
|
||||
arch = tokens[1].rstrip(',')
|
||||
if len(tokens)>=2 and tokens[0] == 'DllCharacteristics':
|
||||
bits = int(tokens[1],16)
|
||||
return (arch,bits)
|
||||
|
||||
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020
|
||||
IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040
|
||||
IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100
|
||||
|
||||
def check_PE_DYNAMIC_BASE(executable):
|
||||
'''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
|
||||
return (bits & reqbits) == reqbits
|
||||
|
||||
# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE
|
||||
# to have secure ASLR.
|
||||
def check_PE_HIGH_ENTROPY_VA(executable):
|
||||
'''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
if arch == 'i386:x86-64':
|
||||
reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
|
||||
else: # Unnecessary on 32-bit
|
||||
assert(arch == 'i386')
|
||||
reqbits = 0
|
||||
return (bits & reqbits) == reqbits
|
||||
|
||||
def check_PE_NX(executable):
|
||||
'''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)'''
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
|
||||
|
||||
CHECKS = {
|
||||
'ELF': [
|
||||
('PIE', check_ELF_PIE),
|
||||
('NX', check_ELF_NX),
|
||||
('RELRO', check_ELF_RELRO),
|
||||
('Canary', check_ELF_Canary)
|
||||
],
|
||||
'PE': [
|
||||
('DYNAMIC_BASE', check_PE_DYNAMIC_BASE),
|
||||
('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
|
||||
('NX', check_PE_NX)
|
||||
]
|
||||
}
|
||||
|
||||
def identify_executable(executable):
|
||||
with open(filename, 'rb') as f:
|
||||
magic = f.read(4)
|
||||
if magic.startswith(b'MZ'):
|
||||
return 'PE'
|
||||
elif magic.startswith(b'\x7fELF'):
|
||||
return 'ELF'
|
||||
return None
|
||||
|
||||
if __name__ == '__main__':
|
||||
retval = 0
|
||||
for filename in sys.argv[1:]:
|
||||
try:
|
||||
etype = identify_executable(filename)
|
||||
if etype is None:
|
||||
print('%s: unknown format' % filename)
|
||||
retval = 1
|
||||
continue
|
||||
|
||||
failed = []
|
||||
warning = []
|
||||
for (name, func) in CHECKS[etype]:
|
||||
if not func(filename):
|
||||
if name in NONFATAL:
|
||||
warning.append(name)
|
||||
else:
|
||||
failed.append(name)
|
||||
if failed:
|
||||
print('%s: failed %s' % (filename, ' '.join(failed)))
|
||||
retval = 1
|
||||
if warning:
|
||||
print('%s: warning %s' % (filename, ' '.join(warning)))
|
||||
except IOError:
|
||||
print('%s: cannot open' % filename)
|
||||
retval = 1
|
||||
exit(retval)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 3 ];
|
||||
then echo "usage: $0 <input> <stripped-binary> <debug-binary>"
|
||||
fi
|
||||
|
||||
@OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3
|
||||
@OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2
|
||||
@STRIP@ --enable-deterministic-archives -p -s $2
|
||||
@OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
# Copyright (c) 2014 Wladimir J. van der Laan
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
@ -11,11 +11,10 @@ Example usage:
|
|||
|
||||
find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
|
||||
'''
|
||||
from __future__ import division, print_function, unicode_literals
|
||||
from __future__ import division, print_function
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Debian 6.0.9 (Squeeze) has:
|
||||
#
|
||||
|
@ -40,40 +39,14 @@ MAX_VERSIONS = {
|
|||
'GCC': (4,4,0),
|
||||
'CXXABI': (1,3,3),
|
||||
'GLIBCXX': (3,4,13),
|
||||
'GLIBC': (2,11),
|
||||
'V': (0,5,0) # xkb (qt only)
|
||||
'GLIBC': (2,11)
|
||||
}
|
||||
# See here for a description of _IO_stdin_used:
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
|
||||
|
||||
# Ignore symbols that are exported as part of every executable
|
||||
IGNORE_EXPORTS = {
|
||||
b'_edata', b'_end', b'_init', b'__bss_start', b'_fini', b'_IO_stdin_used',
|
||||
b'stdin', b'stdout', b'stderr'
|
||||
}
|
||||
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
|
||||
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
|
||||
# Allowed NEEDED libraries
|
||||
ALLOWED_LIBRARIES = {
|
||||
# bitcoind and bitcoin-qt
|
||||
b'libgcc_s.so.1', # GCC base support
|
||||
b'libc.so.6', # C library
|
||||
b'libpthread.so.0', # threading
|
||||
b'libanl.so.1', # DNS resolve
|
||||
b'libm.so.6', # math library
|
||||
b'librt.so.1', # real-time (clock)
|
||||
b'ld-linux-x86-64.so.2', # 64-bit dynamic linker
|
||||
b'ld-linux.so.2', # 32-bit dynamic linker
|
||||
# bitcoin-qt only
|
||||
b'libX11-xcb.so.1', # part of X11
|
||||
b'libX11.so.6', # part of X11
|
||||
b'libxcb.so.1', # part of X11
|
||||
b'libxkbcommon.so.0', # keyboard keymapping
|
||||
b'libxkbcommon-x11.so.0', # keyboard keymapping
|
||||
b'libfontconfig.so.1', # font support
|
||||
b'libfreetype.so.6', # font parsing
|
||||
b'libdl.so.2' # programming interface to dynamic linker
|
||||
'_edata', '_end', '_init', '__bss_start', '_fini'
|
||||
}
|
||||
READELF_CMD = '/usr/bin/readelf'
|
||||
CPPFILT_CMD = '/usr/bin/c++filt'
|
||||
|
||||
class CPPFilt(object):
|
||||
'''
|
||||
|
@ -85,8 +58,7 @@ class CPPFilt(object):
|
|||
self.proc = subprocess.Popen(CPPFILT_CMD, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
|
||||
def __call__(self, mangled):
|
||||
self.proc.stdin.write(mangled + b'\n')
|
||||
self.proc.stdin.flush()
|
||||
self.proc.stdin.write(mangled + '\n')
|
||||
return self.proc.stdout.readline().rstrip()
|
||||
|
||||
def close(self):
|
||||
|
@ -104,44 +76,28 @@ def read_symbols(executable, imports=True):
|
|||
if p.returncode:
|
||||
raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip()))
|
||||
syms = []
|
||||
for line in stdout.split(b'\n'):
|
||||
for line in stdout.split('\n'):
|
||||
line = line.split()
|
||||
if len(line)>7 and re.match(b'[0-9]+:$', line[0]):
|
||||
(sym, _, version) = line[7].partition(b'@')
|
||||
is_import = line[6] == b'UND'
|
||||
if version.startswith(b'@'):
|
||||
if len(line)>7 and re.match('[0-9]+:$', line[0]):
|
||||
(sym, _, version) = line[7].partition('@')
|
||||
is_import = line[6] == 'UND'
|
||||
if version.startswith('@'):
|
||||
version = version[1:]
|
||||
if is_import == imports:
|
||||
syms.append((sym, version))
|
||||
return syms
|
||||
|
||||
def check_version(max_versions, version):
|
||||
if b'_' in version:
|
||||
(lib, _, ver) = version.rpartition(b'_')
|
||||
if '_' in version:
|
||||
(lib, _, ver) = version.rpartition('_')
|
||||
else:
|
||||
lib = version
|
||||
ver = '0'
|
||||
ver = tuple([int(x) for x in ver.split(b'.')])
|
||||
ver = tuple([int(x) for x in ver.split('.')])
|
||||
if not lib in max_versions:
|
||||
return False
|
||||
return ver <= max_versions[lib]
|
||||
|
||||
def read_libraries(filename):
|
||||
p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
libraries = []
|
||||
for line in stdout.split(b'\n'):
|
||||
tokens = line.split()
|
||||
if len(tokens)>2 and tokens[1] == b'(NEEDED)':
|
||||
match = re.match(b'^Shared library: \[(.*)\]$', b' '.join(tokens[2:]))
|
||||
if match:
|
||||
libraries.append(match.group(1))
|
||||
else:
|
||||
raise ValueError('Unparseable (NEEDED) specification')
|
||||
return libraries
|
||||
|
||||
if __name__ == '__main__':
|
||||
cppfilt = CPPFilt()
|
||||
retval = 0
|
||||
|
@ -149,18 +105,15 @@ if __name__ == '__main__':
|
|||
# Check imported symbols
|
||||
for sym,version in read_symbols(filename, True):
|
||||
if version and not check_version(MAX_VERSIONS, version):
|
||||
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym).decode('utf-8'), version.decode('utf-8')))
|
||||
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
|
||||
retval = 1
|
||||
# Check exported symbols
|
||||
for sym,version in read_symbols(filename, False):
|
||||
if sym in IGNORE_EXPORTS:
|
||||
continue
|
||||
print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym).decode('utf-8')))
|
||||
print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
|
||||
retval = 1
|
||||
# Check dependency libraries
|
||||
for library_name in read_libraries(filename):
|
||||
if library_name not in ALLOWED_LIBRARIES:
|
||||
print('%s: NEEDED library %s is not allowed' % (filename, library_name.decode('utf-8')))
|
||||
retval = 1
|
||||
|
||||
exit(retval)
|
||||
|
||||
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2015-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
Test script for security-check.py
|
||||
'''
|
||||
from __future__ import division,print_function
|
||||
import subprocess
|
||||
import unittest
|
||||
|
||||
def write_testcode(filename):
|
||||
with open(filename, 'w') as f:
|
||||
f.write('''
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("the quick brown fox jumps over the lazy god\\n");
|
||||
return 0;
|
||||
}
|
||||
''')
|
||||
|
||||
def call_security_check(cc, source, executable, options):
|
||||
subprocess.check_call([cc,source,'-o',executable] + options)
|
||||
p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
return (p.returncode, stdout.rstrip())
|
||||
|
||||
class TestSecurityChecks(unittest.TestCase):
|
||||
def test_ELF(self):
|
||||
source = 'test1.c'
|
||||
executable = 'test1'
|
||||
cc = 'gcc'
|
||||
write_testcode(source)
|
||||
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro']),
|
||||
(1, executable+': failed PIE NX RELRO Canary'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro']),
|
||||
(1, executable+': failed PIE RELRO Canary'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro']),
|
||||
(1, executable+': failed PIE RELRO'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE']),
|
||||
(1, executable+': failed RELRO'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE']),
|
||||
(0, ''))
|
||||
|
||||
def test_PE(self):
|
||||
source = 'test1.c'
|
||||
executable = 'test1.exe'
|
||||
cc = 'i686-w64-mingw32-gcc'
|
||||
write_testcode(source)
|
||||
|
||||
self.assertEqual(call_security_check(cc, source, executable, []),
|
||||
(1, executable+': failed PIE NX'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']),
|
||||
(1, executable+': failed PIE'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']),
|
||||
(0, ''))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
# Copyright (c) 2014 Wladimir J. van der Laan
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
@ -29,8 +29,6 @@ TX = 'tx'
|
|||
SOURCE_LANG = 'bitcoin_en.ts'
|
||||
# Directory with locale files
|
||||
LOCALE_DIR = 'src/qt/locale'
|
||||
# Minimum number of messages for translation to be considered at all
|
||||
MIN_NUM_MESSAGES = 10
|
||||
|
||||
def check_at_repository_root():
|
||||
if not os.path.exists('.git'):
|
||||
|
@ -39,7 +37,7 @@ def check_at_repository_root():
|
|||
exit(1)
|
||||
|
||||
def fetch_all_translations():
|
||||
if subprocess.call([TX, 'pull', '-f', '-a']):
|
||||
if subprocess.call([TX, 'pull', '-f']):
|
||||
print('Error while fetching translations', file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
|
@ -65,14 +63,6 @@ def split_format_specifiers(specifiers):
|
|||
else:
|
||||
other.append(s)
|
||||
|
||||
# If both numeric format specifiers and "others" are used, assume we're dealing
|
||||
# with a Qt-formatted message. In the case of Qt formatting (see https://doc.qt.io/qt-5/qstring.html#arg)
|
||||
# only numeric formats are replaced at all. This means "(percentage: %1%)" is valid, without needing
|
||||
# any kind of escaping that would be necessary for strprintf. Without this, this function
|
||||
# would wrongly detect '%)' as a printf format specifier.
|
||||
if numeric:
|
||||
other = []
|
||||
|
||||
# numeric (Qt) can be present in any order, others (strprintf) must be in specified order
|
||||
return set(numeric),other
|
||||
|
||||
|
@ -80,7 +70,7 @@ def sanitize_string(s):
|
|||
'''Sanitize string for printing'''
|
||||
return s.replace('\n',' ')
|
||||
|
||||
def check_format_specifiers(source, translation, errors, numerus):
|
||||
def check_format_specifiers(source, translation, errors):
|
||||
source_f = split_format_specifiers(find_format_specifiers(source))
|
||||
# assert that no source messages contain both Qt and strprintf format specifiers
|
||||
# if this fails, go change the source as this is hacky and confusing!
|
||||
|
@ -88,13 +78,10 @@ def check_format_specifiers(source, translation, errors, numerus):
|
|||
try:
|
||||
translation_f = split_format_specifiers(find_format_specifiers(translation))
|
||||
except IndexError:
|
||||
errors.append("Parse error in translation for '%s': '%s'" % (sanitize_string(source), sanitize_string(translation)))
|
||||
errors.append("Parse error in translation '%s'" % sanitize_string(translation))
|
||||
return False
|
||||
else:
|
||||
if source_f != translation_f:
|
||||
if numerus and source_f == (set(), ['n']) and translation_f == (set(), []) and translation.find('%') == -1:
|
||||
# Allow numerus translations to omit %n specifier (usually when it only has one possible value)
|
||||
return True
|
||||
errors.append("Mismatch between '%s' and '%s'" % (sanitize_string(source), sanitize_string(translation)))
|
||||
return False
|
||||
return True
|
||||
|
@ -161,7 +148,7 @@ def postprocess_translations(reduce_diff_hacks=False):
|
|||
if translation is None:
|
||||
continue
|
||||
errors = []
|
||||
valid = check_format_specifiers(source, translation, errors, numerus)
|
||||
valid = check_format_specifiers(source, translation, errors)
|
||||
|
||||
for error in errors:
|
||||
print('%s: %s' % (filename, error))
|
||||
|
@ -179,15 +166,6 @@ def postprocess_translations(reduce_diff_hacks=False):
|
|||
if translation_node.get('type') == 'unfinished':
|
||||
context.remove(message)
|
||||
|
||||
# check if document is (virtually) empty, and remove it if so
|
||||
num_messages = 0
|
||||
for context in root.findall('context'):
|
||||
for message in context.findall('message'):
|
||||
num_messages += 1
|
||||
if num_messages < MIN_NUM_MESSAGES:
|
||||
print('Removing %s, as it contains only %i messages' % (filepath, num_messages))
|
||||
continue
|
||||
|
||||
# write fixed-up tree
|
||||
# if diff reduction requested, replace some XML to 'sanitize' to qt formatting
|
||||
if reduce_diff_hacks:
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
# bash programmable completion for bitcoin-cli(1)
|
||||
# Copyright (c) 2012-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# call $bitcoin-cli for RPC
|
||||
_bitcoin_rpc() {
|
||||
# determine already specified args necessary for RPC
|
||||
local rpcargs=()
|
||||
for i in ${COMP_LINE}; do
|
||||
case "$i" in
|
||||
-conf=*|-datadir=*|-regtest|-rpc*|-testnet)
|
||||
rpcargs=( "${rpcargs[@]}" "$i" )
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$bitcoin_cli "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add wallet accounts to COMPREPLY
|
||||
_bitcoin_accounts() {
|
||||
local accounts
|
||||
accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }')
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
||||
}
|
||||
|
||||
_bitcoin_cli() {
|
||||
local cur prev words=() cword
|
||||
local bitcoin_cli
|
||||
|
||||
# save and use original argument to invoke bitcoin-cli for -help, help and RPC
|
||||
# as bitcoin-cli might not be in $PATH
|
||||
bitcoin_cli="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
if ((cword > 5)); then
|
||||
case ${words[cword-5]} in
|
||||
sendtoaddress)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 4)); then
|
||||
case ${words[cword-4]} in
|
||||
importaddress|listtransactions|setban)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
signrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 3)); then
|
||||
case ${words[cword-3]} in
|
||||
addmultisigaddress)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 2)); then
|
||||
case ${words[cword-2]} in
|
||||
addnode)
|
||||
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
setban)
|
||||
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet|dumpwallet|importwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
getaddednodeinfo|getrawmempool|lockunspent|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=*)
|
||||
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=$($bitcoin_cli -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 '$1 ~ /^[a-z]/ { 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 _bitcoin_cli bitcoin-cli
|
||||
|
||||
# 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,57 +0,0 @@
|
|||
# bash programmable completion for bitcoin-tx(1)
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
_bitcoin_tx() {
|
||||
local cur prev words=() cword
|
||||
local bitcoin_tx
|
||||
|
||||
# save and use original argument to invoke bitcoin-tx for -help
|
||||
# it might not be in $PATH
|
||||
bitcoin_tx="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n =: cur prev words cword
|
||||
|
||||
case "$cur" in
|
||||
load=*:*)
|
||||
cur="${cur#load=*:}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
*=*) # prevent attempts to complete other arguments
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
|
||||
# only options (or an uncompletable hex-string) allowed
|
||||
# parse bitcoin-tx -help for options
|
||||
local helpopts
|
||||
helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
else
|
||||
# only commands are allowed
|
||||
# parse -help for commands
|
||||
local helpcmds
|
||||
helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
|
||||
fi
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _bitcoin_tx bitcoin-tx
|
||||
|
||||
# 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,21 +1,102 @@
|
|||
# bash programmable completion for dogecoind(1) and bitcoin-qt(1)
|
||||
# Copyright (c) 2012-2016 The Bitcoin Core developers
|
||||
# bash programmable completion for dogecoind(1) and dogecoin-cli(1)
|
||||
# Copyright (c) 2012,2014 Christian von Roques <roques@mti.ag>
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
have dogecoind && {
|
||||
|
||||
# call $dogecoind for RPC
|
||||
_dogecoin_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
|
||||
$dogecoind "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add dogecoin accounts to COMPREPLY
|
||||
_dogecoin_accounts() {
|
||||
local accounts
|
||||
accounts=$(_dogecoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
||||
}
|
||||
|
||||
_dogecoind() {
|
||||
local cur prev words=() cword
|
||||
local dogecoind
|
||||
|
||||
# save and use original argument to invoke dogecoind for -help
|
||||
# it might not be in $PATH
|
||||
# save and use original argument to invoke dogecoind
|
||||
# dogecoind might not be in $PATH
|
||||
dogecoind="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
if ((cword > 4)); then
|
||||
case ${words[cword-4]} in
|
||||
listtransactions)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
signrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 3)); then
|
||||
case ${words[cword-3]} in
|
||||
addmultisigaddress)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 2)); then
|
||||
case ${words[cword-2]} in
|
||||
addnode)
|
||||
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
getblock|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_dogecoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet|dumpwallet|importwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
getmempool|lockunspent|setgenerate)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
|
||||
_dogecoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*)
|
||||
-conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
|
@ -29,14 +110,20 @@ _dogecoind() {
|
|||
return 0
|
||||
;;
|
||||
*)
|
||||
local helpopts commands
|
||||
|
||||
# only parse -help if senseful
|
||||
# only parse --help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
local helpopts
|
||||
helpopts=$($dogecoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
helpopts=$($dogecoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
fi
|
||||
|
||||
# only parse help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
||||
commands=$(_dogecoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
|
||||
fi
|
||||
|
||||
COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
|
@ -44,8 +131,10 @@ _dogecoind() {
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
} &&
|
||||
complete -F _dogecoind dogecoind bitcoin-qt
|
||||
}
|
||||
|
||||
complete -F _dogecoind dogecoind dogecoin-cli
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
|
|
|
@ -1,406 +0,0 @@
|
|||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Copyright (c) 2021 The Dogecoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# What to do
|
||||
sign=false
|
||||
verify=false
|
||||
build=false
|
||||
setupenv=false
|
||||
|
||||
# Systems to build
|
||||
linux=true
|
||||
windows=true
|
||||
osx=true
|
||||
|
||||
# Other Basic variables
|
||||
SIGNER=
|
||||
VERSION=
|
||||
commit=false
|
||||
url=https://github.com/dogecoin/dogecoin
|
||||
proc=2
|
||||
mem=2000
|
||||
lxc=true
|
||||
osslTarUrl=https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/osslsigncode/1.7.1-1/osslsigncode_1.7.1.orig.tar.gz
|
||||
osslPatchUrl=https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
|
||||
scriptName=$(basename -- "$0")
|
||||
signProg="gpg --detach-sign"
|
||||
commitFiles=true
|
||||
|
||||
# Help Message
|
||||
read -d '' usage <<- EOF
|
||||
Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version
|
||||
|
||||
Run this script from the directory containing the dogecoin, gitian-builder, gitian.sigs, and dogecoin-detached-sigs.
|
||||
|
||||
Arguments:
|
||||
signer GPG signer to sign each build assert file
|
||||
version Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified
|
||||
|
||||
Options:
|
||||
-c|--commit Indicate that the version argument is for a commit or branch
|
||||
-u|--url Specify the URL of the repository. Default is https://github.com/dogecoin/dogecoin
|
||||
-v|--verify Verify the gitian build
|
||||
-b|--build Do a gitian build
|
||||
-s|--sign Make signed binaries for Windows and Mac OSX
|
||||
-B|--buildsign Build both signed and unsigned binaries
|
||||
-o|--os Specify which Operating Systems the build is for. Default is lwx. l for linux, w for windows, x for osx
|
||||
-j Number of processes to use. Default 2
|
||||
-m Memory to allocate in MiB. Default 2000
|
||||
--kvm Use KVM instead of LXC
|
||||
--setup Setup the gitian building environment. Uses KVM. If you want to use lxc, use the --lxc option. Only works on Debian-based systems (Ubuntu, Debian)
|
||||
--detach-sign Create the assert file for detached signing. Will not commit anything.
|
||||
--no-commit Do not commit anything to git
|
||||
-h|--help Print this help message
|
||||
EOF
|
||||
|
||||
# Get options and arguments
|
||||
while :; do
|
||||
case $1 in
|
||||
# Verify
|
||||
-v|--verify)
|
||||
verify=true
|
||||
;;
|
||||
# Build
|
||||
-b|--build)
|
||||
build=true
|
||||
;;
|
||||
# Sign binaries
|
||||
-s|--sign)
|
||||
sign=true
|
||||
;;
|
||||
# Build then Sign
|
||||
-B|--buildsign)
|
||||
sign=true
|
||||
build=true
|
||||
;;
|
||||
# PGP Signer
|
||||
-S|--signer)
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
SIGNER=$2
|
||||
shift
|
||||
else
|
||||
echo 'Error: "--signer" requires a non-empty argument.'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
# Operating Systems
|
||||
-o|--os)
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
linux=false
|
||||
windows=false
|
||||
osx=false
|
||||
if [[ "$2" = *"l"* ]]
|
||||
then
|
||||
linux=true
|
||||
fi
|
||||
if [[ "$2" = *"w"* ]]
|
||||
then
|
||||
windows=true
|
||||
fi
|
||||
if [[ "$2" = *"x"* ]]
|
||||
then
|
||||
osx=true
|
||||
fi
|
||||
shift
|
||||
else
|
||||
echo 'Error: "--os" requires an argument containing an l (for linux), w (for windows), or x (for Mac OSX)\n'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
# Help message
|
||||
-h|--help)
|
||||
echo "$usage"
|
||||
exit 0
|
||||
;;
|
||||
# Commit or branch
|
||||
-c|--commit)
|
||||
commit=true
|
||||
;;
|
||||
# Number of Processes
|
||||
-j)
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
proc=$2
|
||||
shift
|
||||
else
|
||||
echo 'Error: "-j" requires an argument'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
# Memory to allocate
|
||||
-m)
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
mem=$2
|
||||
shift
|
||||
else
|
||||
echo 'Error: "-m" requires an argument'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
# URL
|
||||
-u)
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
url=$2
|
||||
shift
|
||||
else
|
||||
echo 'Error: "-u" requires an argument'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
# kvm
|
||||
--kvm)
|
||||
lxc=false
|
||||
;;
|
||||
# Detach sign
|
||||
--detach-sign)
|
||||
signProg="true"
|
||||
commitFiles=false
|
||||
;;
|
||||
# Commit files
|
||||
--no-commit)
|
||||
commitFiles=false
|
||||
;;
|
||||
# Setup
|
||||
--setup)
|
||||
setup=true
|
||||
;;
|
||||
*) # Default case: If no more options then break out of the loop.
|
||||
break
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Set up LXC
|
||||
if [[ $lxc = true ]]
|
||||
then
|
||||
export USE_LXC=1
|
||||
export LXC_BRIDGE=br0
|
||||
fi
|
||||
|
||||
# Check for OSX SDK
|
||||
if [[ ! -e "gitian-builder/inputs/MacOSX10.11.sdk.tar.gz" && $osx == true ]]
|
||||
then
|
||||
echo "Cannot build for OSX, SDK does not exist. Will build for other OSes"
|
||||
osx=false
|
||||
fi
|
||||
|
||||
# Get signer
|
||||
if [[ -n"$1" ]]
|
||||
then
|
||||
SIGNER=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
# Get version
|
||||
if [[ -n "$1" ]]
|
||||
then
|
||||
VERSION=$1
|
||||
COMMIT=$VERSION
|
||||
shift
|
||||
fi
|
||||
|
||||
# Check that a signer is specified
|
||||
if [[ $SIGNER == "" ]]
|
||||
then
|
||||
echo "$scriptName: Missing signer."
|
||||
echo "Try $scriptName --help for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check that a version is specified
|
||||
if [[ $VERSION == "" ]]
|
||||
then
|
||||
echo "$scriptName: Missing version."
|
||||
echo "Try $scriptName --help for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add a "v" if no -c
|
||||
if [[ $commit = false ]]
|
||||
then
|
||||
COMMIT="v${VERSION}"
|
||||
fi
|
||||
echo ${COMMIT}
|
||||
|
||||
# Setup build environment
|
||||
if [[ $setup = true ]]
|
||||
then
|
||||
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils
|
||||
# GIT --date=format-local support
|
||||
MIN_GIT_VERSION=2.7.0
|
||||
LASTEST_GIT_VERSION=2.32.0
|
||||
if ! (echo a version ${MIN_GIT_VERSION}; git --version) | sort -Vk3 | tail -1 | grep -q git; then
|
||||
sudo apt-get install build-essential make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
|
||||
wget https://github.com/git/git/archive/v${LASTEST_GIT_VERSION}.zip -O v${LASTEST_GIT_VERSION}.zip
|
||||
unzip v${LASTEST_GIT_VERSION}.zip
|
||||
pushd ./git-${LASTEST_GIT_VERSION}
|
||||
make -j "${proc}" prefix=/usr/local all
|
||||
make -j "${proc}" prefix=/usr/local install
|
||||
popd
|
||||
fi
|
||||
|
||||
# GIT CLONE
|
||||
git clone https://github.com/dogecoin/gitian.sigs.git
|
||||
git clone https://github.com/dogecoin/dogecoin-detached-sigs.git
|
||||
git clone https://github.com/devrandom/gitian-builder.git
|
||||
pushd ./gitian-builder
|
||||
if [[ -n "$USE_LXC" ]]
|
||||
then
|
||||
sudo apt-get install lxc
|
||||
bin/make-base-vm --suite trusty --arch amd64 --lxc
|
||||
else
|
||||
bin/make-base-vm --suite trusty --arch amd64
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
|
||||
# Set up build
|
||||
pushd ./dogecoin
|
||||
git fetch
|
||||
git checkout ${COMMIT}
|
||||
popd
|
||||
|
||||
# Build
|
||||
if [[ $build = true ]]
|
||||
then
|
||||
# Make output folder
|
||||
mkdir -p ./dogecoin-binaries/${VERSION}
|
||||
|
||||
# Build Dependencies
|
||||
echo ""
|
||||
echo "Building Dependencies"
|
||||
echo ""
|
||||
pushd ./gitian-builder
|
||||
mkdir -p inputs
|
||||
wget -N -P inputs $osslPatchUrl
|
||||
wget -N -P inputs $osslTarUrl
|
||||
make -j "${proc}" -C ../dogecoin/depends download SOURCES_PATH=`pwd`/cache/common
|
||||
|
||||
# Linux
|
||||
if [[ $linux = true ]]
|
||||
then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Linux"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dogecoin=${COMMIT} --url dogecoin=${url} ../dogecoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../dogecoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
mv build/out/dogecoin-*.tar.gz build/out/src/dogecoin-*.tar.gz ../dogecoin-binaries/${VERSION}
|
||||
fi
|
||||
# Windows
|
||||
if [[ $windows = true ]]
|
||||
then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dogecoin=${COMMIT} --url dogecoin=${url} ../dogecoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../dogecoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
mv build/out/dogecoin-*-win-unsigned.tar.gz inputs/dogecoin-win-unsigned.tar.gz
|
||||
mv build/out/dogecoin-*.zip build/out/dogecoin-*.exe ../dogecoin-binaries/${VERSION}
|
||||
fi
|
||||
# Mac OSX
|
||||
if [[ $osx = true ]]
|
||||
then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dogecoin=${COMMIT} --url dogecoin=${url} ../dogecoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../dogecoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
mv build/out/dogecoin-*-osx-unsigned.tar.gz inputs/dogecoin-osx-unsigned.tar.gz
|
||||
mv build/out/dogecoin-*.tar.gz build/out/dogecoin-*.dmg ../dogecoin-binaries/${VERSION}
|
||||
fi
|
||||
popd
|
||||
|
||||
if [[ $commitFiles = true ]]
|
||||
then
|
||||
# Commit to gitian.sigs repo
|
||||
echo ""
|
||||
echo "Committing ${VERSION} Unsigned Sigs"
|
||||
echo ""
|
||||
pushd gitian.sigs
|
||||
git add ${VERSION}-linux/${SIGNER}
|
||||
git add ${VERSION}-win-unsigned/${SIGNER}
|
||||
git add ${VERSION}-osx-unsigned/${SIGNER}
|
||||
git commit -a -m "Add ${VERSION} unsigned sigs for ${SIGNER}"
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
# Verify the build
|
||||
if [[ $verify = true ]]
|
||||
then
|
||||
# Linux
|
||||
pushd ./gitian-builder
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Linux"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../dogecoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
# Windows
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../dogecoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
# Mac OSX
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../dogecoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
# Signed Windows
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Signed Windows"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../dogecoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
# Signed Mac OSX
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Signed Mac OSX"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../dogecoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
popd
|
||||
fi
|
||||
|
||||
# Sign binaries
|
||||
if [[ $sign = true ]]
|
||||
then
|
||||
|
||||
pushd ./gitian-builder
|
||||
# Sign Windows
|
||||
if [[ $windows = true ]]
|
||||
then
|
||||
echo ""
|
||||
echo "Signing ${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../dogecoin/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../dogecoin/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
mv build/out/dogecoin-*win64-setup.exe ../dogecoin-binaries/${VERSION}
|
||||
mv build/out/dogecoin-*win32-setup.exe ../dogecoin-binaries/${VERSION}
|
||||
fi
|
||||
# Sign Mac OSX
|
||||
if [[ $osx = true ]]
|
||||
then
|
||||
echo ""
|
||||
echo "Signing ${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../dogecoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../dogecoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
mv build/out/dogecoin-osx-signed.dmg ../dogecoin-binaries/${VERSION}/dogecoin-${VERSION}-osx.dmg
|
||||
fi
|
||||
popd
|
||||
|
||||
if [[ $commitFiles = true ]]
|
||||
then
|
||||
# Commit Sigs
|
||||
pushd gitian.sigs
|
||||
echo ""
|
||||
echo "Committing ${VERSION} Signed Sigs"
|
||||
echo ""
|
||||
git add ${VERSION}-win-signed/${SIGNER}
|
||||
git add ${VERSION}-osx-signed/${SIGNER}
|
||||
git commit -a -m "Add ${VERSION} signed binary sigs for ${SIGNER}"
|
||||
popd
|
||||
fi
|
||||
fi
|
|
@ -1,7 +1,8 @@
|
|||
### Based on Gavin's notes on getting gitian builds up and running using KVM:
|
||||
### Based on 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).
|
||||
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.
|
||||
|
||||
|
@ -26,20 +27,20 @@ Once you've got the right hardware and software:
|
|||
|
||||
# Create base images
|
||||
cd gitian-builder
|
||||
bin/make-base-vm --suite trusty --arch amd64
|
||||
bin/make-base-vm --suite precise --arch amd64
|
||||
cd ..
|
||||
|
||||
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
|
||||
...
|
||||
|
||||
# For further build instructions see doc/release-process.md
|
||||
# For further build instructions see doc/release-notes.md
|
||||
...
|
||||
|
||||
---------------------
|
||||
|
||||
`gitian-builder` now also supports building using LXC. See
|
||||
[help.ubuntu.com](https://help.ubuntu.com/14.04/serverguide/lxc.html)
|
||||
for how to get LXC up and running under Ubuntu.
|
||||
[ 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
|
||||
|
|
|
@ -1,47 +1,32 @@
|
|||
---
|
||||
name: "dogecoin-linux-1.14"
|
||||
name: "dogecoin-linux-1.10"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "curl"
|
||||
- "g++-aarch64-linux-gnu"
|
||||
- "g++-7-aarch64-linux-gnu"
|
||||
- "gcc-7-aarch64-linux-gnu"
|
||||
- "binutils-aarch64-linux-gnu"
|
||||
- "g++-arm-linux-gnueabihf"
|
||||
- "g++-7-arm-linux-gnueabihf"
|
||||
- "gcc-7-arm-linux-gnueabihf"
|
||||
- "binutils-arm-linux-gnueabihf"
|
||||
- "g++-7-multilib"
|
||||
- "gcc-7-multilib"
|
||||
- "binutils-gold"
|
||||
packages:
|
||||
- "g++-multilib"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "autoconf2.13"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bison"
|
||||
- "bsdmainutils"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
- "binutils-gold"
|
||||
- "libstdc++6-4.6-pic"
|
||||
reference_datetime: "2015-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin.git"
|
||||
"dir": "dogecoin"
|
||||
files: []
|
||||
script: |
|
||||
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
|
||||
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
|
||||
HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
|
||||
CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="date ar ranlib nm"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
HOST_CXXFLAGS="-O2 -g"
|
||||
HOST_LDFLAGS=-static-libstdc++
|
||||
FAKETIME_PROGS="date ar ranlib nm strip"
|
||||
|
||||
export QT_RCC_TEST=1
|
||||
export GZIP="-9n"
|
||||
|
@ -55,86 +40,47 @@ script: |
|
|||
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
||||
fi
|
||||
|
||||
function create_global_faketime_wrappers {
|
||||
# Create global faketime wrappers
|
||||
for prog in ${FAKETIME_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
||||
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function create_per-host_faketime_wrappers {
|
||||
# Create per-host faketime wrappers
|
||||
for i in $HOSTS; do
|
||||
for prog in ${FAKETIME_HOST_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
||||
chmod +x ${WRAP_DIR}/${i}-${prog}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Faketime for depends so intermediate results are comparable
|
||||
export PATH_orig=${PATH}
|
||||
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
EXTRA_INCLUDES_BASE=$WRAP_DIR/extra_includes
|
||||
mkdir -p $EXTRA_INCLUDES_BASE
|
||||
|
||||
# x86 needs /usr/include/i386-linux-gnu/asm pointed to /usr/include/x86_64-linux-gnu/asm,
|
||||
# but we can't write there. Instead, create a link here and force it to be included in the
|
||||
# search paths by wrapping gcc/g++.
|
||||
|
||||
mkdir -p $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu
|
||||
rm -f $WRAP_DIR/extra_includes/i686-pc-linux-gnu/asm
|
||||
ln -s /usr/include/x86_64-linux-gnu/asm $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu/asm
|
||||
|
||||
for prog in gcc g++; do
|
||||
rm -f ${WRAP_DIR}/${prog}
|
||||
cat << EOF > ${WRAP_DIR}/${prog}
|
||||
#!/bin/bash
|
||||
REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
|
||||
for var in "\$@"
|
||||
do
|
||||
if [ "\$var" = "-m32" ]; then
|
||||
export C_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
|
||||
export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
|
||||
break
|
||||
fi
|
||||
done
|
||||
\$REAL \$@
|
||||
EOF
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
|
||||
cd dogecoin
|
||||
BASEPREFIX=`pwd`/depends
|
||||
# Build dependencies for each host
|
||||
for i in $HOSTS; do
|
||||
EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i"
|
||||
if [ -d "$EXTRA_INCLUDES" ]; then
|
||||
export HOST_ID_SALT="$EXTRA_INCLUDES"
|
||||
fi
|
||||
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
||||
unset HOST_ID_SALT
|
||||
done
|
||||
|
||||
# Faketime for binaries
|
||||
export PATH=${PATH_orig}
|
||||
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
# Ubuntu precise hack: Not an issue in later versions.
|
||||
# Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
|
||||
# package which provides libstdc++_pic.a, but the linker can't find it.
|
||||
# Symlink it to a path that will be included in our link-line so that the
|
||||
# linker picks it up before the default libstdc++.a.
|
||||
# This is only necessary for 64bit.
|
||||
ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
|
||||
|
||||
# Create the release tarball using (arbitrarily) the first host
|
||||
./autogen.sh
|
||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
|
@ -155,31 +101,18 @@ script: |
|
|||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
|
||||
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
||||
make ${MAKEOPTS}
|
||||
make ${MAKEOPTS} -C src check-security
|
||||
|
||||
#TODO: This is a quick hack that disables symbol checking for arm.
|
||||
# Instead, we should investigate why these are popping up.
|
||||
# For aarch64, we'll need to bump up the min GLIBC version, as the abi
|
||||
# support wasn't introduced until 2.17.
|
||||
case $i in
|
||||
aarch64-*) : ;;
|
||||
arm-*) : ;;
|
||||
*) make ${MAKEOPTS} -C src check-symbols ;;
|
||||
esac
|
||||
|
||||
make install DESTDIR=${INSTALLPATH}
|
||||
make install-strip
|
||||
cd installed
|
||||
find . -name "lib*.la" -delete
|
||||
find . -name "lib*.a" -delete
|
||||
rm -rf ${DISTNAME}/lib/pkgconfig
|
||||
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
|
||||
find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
|
||||
find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
||||
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
|
||||
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
||||
cd ../../
|
||||
rm -rf distsrc-${i}
|
||||
done
|
||||
mkdir -p $OUTDIR/src
|
||||
mv $SOURCEDIST $OUTDIR/src
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
|
||||
mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
name: "dogecoin-dmg-signer"
|
||||
suites:
|
||||
- "bionic"
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libc6:i386"
|
||||
- "faketime"
|
||||
reference_datetime: "2015-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
|
||||
"dir": "signature"
|
||||
|
@ -21,7 +23,7 @@ script: |
|
|||
for prog in ${FAKETIME_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
||||
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
|
@ -31,7 +33,6 @@ script: |
|
|||
SIGNED=dogecoin-osx-signed.dmg
|
||||
|
||||
tar -xf ${UNSIGNED}
|
||||
OSX_VOLNAME="$(cat osx_volname)"
|
||||
./detached-sig-apply.sh ${UNSIGNED} signature/osx
|
||||
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
|
||||
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Dogecoin-Core" -no-pad -r -apple -o uncompressed.dmg signed-app
|
||||
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
|
||||
|
|
|
@ -1,41 +1,33 @@
|
|||
---
|
||||
name: "dogecoin-osx-1.14"
|
||||
name: "dogecoin-osx-1.10"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "ca-certificates"
|
||||
- "curl"
|
||||
packages:
|
||||
- "g++"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "librsvg2-bin"
|
||||
- "libtiff-tools"
|
||||
- "autoconf2.13"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
- "cmake"
|
||||
- "imagemagick"
|
||||
- "libcap-dev"
|
||||
- "libz-dev"
|
||||
- "libbz2-dev"
|
||||
- "python"
|
||||
- "python-dev"
|
||||
- "python-setuptools"
|
||||
- "fonts-tuffy"
|
||||
reference_datetime: "2015-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin.git"
|
||||
"dir": "dogecoin"
|
||||
files:
|
||||
- "MacOSX10.11.sdk.tar.gz"
|
||||
- "MacOSX10.9.sdk.tar.gz"
|
||||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="x86_64-apple-darwin11"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
|
||||
CONFIGFLAGS="--enable-upnp-default --enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
|
||||
|
||||
|
@ -53,56 +45,43 @@ script: |
|
|||
|
||||
export ZERO_AR_DATE=1
|
||||
|
||||
function create_global_faketime_wrappers {
|
||||
# Create global faketime wrappers
|
||||
for prog in ${FAKETIME_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
||||
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function create_per-host_faketime_wrappers {
|
||||
# Create per-host faketime wrappers
|
||||
for i in $HOSTS; do
|
||||
for prog in ${FAKETIME_HOST_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
||||
chmod +x ${WRAP_DIR}/${i}-${prog}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Faketime for depends so intermediate results are comparable
|
||||
export PATH_orig=${PATH}
|
||||
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
cd dogecoin
|
||||
BASEPREFIX=`pwd`/depends
|
||||
|
||||
mkdir -p ${BASEPREFIX}/SDKs
|
||||
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
|
||||
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.gz
|
||||
|
||||
# Build dependencies for each host
|
||||
for i in $HOSTS; do
|
||||
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
||||
done
|
||||
|
||||
# Faketime for binaries
|
||||
export PATH=${PATH_orig}
|
||||
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
# Create the release tarball using (arbitrarily) the first host
|
||||
./autogen.sh
|
||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
|
@ -124,15 +103,12 @@ script: |
|
|||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
||||
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
||||
make ${MAKEOPTS}
|
||||
make install-strip DESTDIR=${INSTALLPATH}
|
||||
make install-strip
|
||||
|
||||
make osx_volname
|
||||
make deploydir
|
||||
OSX_VOLNAME="$(cat osx_volname)"
|
||||
mkdir -p unsigned-app-${i}
|
||||
cp osx_volname unsigned-app-${i}/
|
||||
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
|
||||
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
|
||||
cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
|
||||
|
@ -144,7 +120,7 @@ script: |
|
|||
popd
|
||||
|
||||
make deploy
|
||||
${WRAP_DIR}/dmg dmg "${OSX_VOLNAME}.dmg" ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
|
||||
${WRAP_DIR}/dmg dmg Dogecoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
|
||||
|
||||
cd installed
|
||||
find . -name "lib*.la" -delete
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
---
|
||||
name: "dogecoin-win-signer"
|
||||
suites:
|
||||
- "bionic"
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libssl-dev"
|
||||
- "autoconf"
|
||||
reference_datetime: "2015-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
|
||||
"dir": "signature"
|
||||
files:
|
||||
- "osslsigncode_1.7.1.orig.tar.gz"
|
||||
- "osslsigncode-1.7.1.tar.gz"
|
||||
- "osslsigncode-Backports-to-1.7.1.patch"
|
||||
- "dogecoin-win-unsigned.tar.gz"
|
||||
script: |
|
||||
|
@ -19,13 +20,13 @@ script: |
|
|||
SIGDIR=${BUILD_DIR}/signature/win
|
||||
UNSIGNED_DIR=${BUILD_DIR}/unsigned
|
||||
|
||||
echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 osslsigncode_1.7.1.orig.tar.gz" | sha256sum -c
|
||||
echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 osslsigncode-1.7.1.tar.gz" | sha256sum -c
|
||||
echo "a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 osslsigncode-Backports-to-1.7.1.patch" | sha256sum -c
|
||||
|
||||
mkdir -p ${UNSIGNED_DIR}
|
||||
tar -C ${UNSIGNED_DIR} -xf dogecoin-win-unsigned.tar.gz
|
||||
|
||||
tar xf osslsigncode_1.7.1.orig.tar.gz
|
||||
tar xf osslsigncode-1.7.1.tar.gz
|
||||
cd osslsigncode-1.7.1
|
||||
patch -p1 < ${BUILD_DIR}/osslsigncode-Backports-to-1.7.1.patch
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
name: "dogecoin-win-1.14"
|
||||
name: "dogecoin-win-1.10"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "curl"
|
||||
packages:
|
||||
- "g++"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "autoconf2.13"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
|
@ -19,21 +18,17 @@ packages:
|
|||
- "g++-mingw-w64"
|
||||
- "nsis"
|
||||
- "zip"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
- "rename"
|
||||
reference_datetime: "2015-06-01 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin.git"
|
||||
"dir": "dogecoin"
|
||||
files: []
|
||||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
|
||||
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
|
||||
HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
|
||||
CONFIGFLAGS="--enable-upnp-default --enable-reduce-exports"
|
||||
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
|
||||
FAKETIME_PROGS="date makensis zip"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
HOST_CXXFLAGS="-O2 -g"
|
||||
|
||||
export QT_RCC_TEST=1
|
||||
export GZIP="-9n"
|
||||
|
@ -47,51 +42,27 @@ script: |
|
|||
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
||||
fi
|
||||
|
||||
function create_global_faketime_wrappers {
|
||||
# Create global faketime wrappers
|
||||
for prog in ${FAKETIME_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
||||
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function create_per-host_faketime_wrappers {
|
||||
# Create per-host faketime wrappers
|
||||
for i in $HOSTS; do
|
||||
for prog in ${FAKETIME_HOST_PROGS}; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
||||
chmod +x ${WRAP_DIR}/${i}-${prog}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
function create_per-host_compiler_wrapper {
|
||||
# -posix variant is required for c++11 threading.
|
||||
for i in $HOSTS; do
|
||||
mkdir -p ${WRAP_DIR}/${i}
|
||||
for prog in gcc g++; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
||||
chmod +x ${WRAP_DIR}/${i}-${prog}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Faketime for depends so intermediate results are comparable
|
||||
export PATH_orig=${PATH}
|
||||
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_compiler_wrapper "2000-01-01 12:00:00"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
cd dogecoin
|
||||
|
@ -101,16 +72,9 @@ script: |
|
|||
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
||||
done
|
||||
|
||||
# Faketime for binaries
|
||||
export PATH=${PATH_orig}
|
||||
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_compiler_wrapper "${REFERENCE_DATETIME}"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
# Create the release tarball using (arbitrarily) the first host
|
||||
./autogen.sh
|
||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
|
@ -134,28 +98,21 @@ script: |
|
|||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
|
||||
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
||||
make ${MAKEOPTS}
|
||||
make ${MAKEOPTS} -C src check-security
|
||||
make deploy
|
||||
make install DESTDIR=${INSTALLPATH}
|
||||
make install-strip
|
||||
cp -f dogecoin-*setup*.exe $OUTDIR/
|
||||
cd installed
|
||||
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
||||
find . -name "lib*.la" -delete
|
||||
find . -name "lib*.a" -delete
|
||||
rm -rf ${DISTNAME}/lib/pkgconfig
|
||||
find ${DISTNAME}/bin -type f -executable -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
||||
find ${DISTNAME}/lib -type f -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
||||
find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
|
||||
find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}-debug.zip
|
||||
cd ../../
|
||||
rm -rf distsrc-${i}
|
||||
find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
|
||||
cd ../..
|
||||
done
|
||||
cd $OUTDIR
|
||||
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
||||
find . -name "*-setup-unsigned.exe" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
|
||||
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip
|
||||
mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip
|
||||
|
|
30
contrib/gitian-downloader/linux-download-config
Normal file
30
contrib/gitian-downloader/linux-download-config
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
name: dogecoin
|
||||
urls:
|
||||
- http://dogecoin.com/dogecoin-latest-linux-gitian.zip
|
||||
rss:
|
||||
- url:
|
||||
xpath: //item/link/text()
|
||||
pattern: bitcoin-\d+.\d+.\d+-linux-gitian.zip
|
||||
signers:
|
||||
90DC2AC256201AD9377E15049142E5F7E533CE3B:
|
||||
weight: 40
|
||||
name: rnicoll
|
||||
key: rnicoll
|
||||
1DDC450B45DB5ADCCF5DDA7F8E4217C6D47D946D:
|
||||
weight: 40
|
||||
name: langerhans
|
||||
key: langerhans
|
||||
6E9C3630F63C1541054C9503B1C60A65E5E64D7B:
|
||||
weight: 20
|
||||
name: "Patrick Lodder"
|
||||
key: patricklodder-key
|
||||
B8273C8A55820B19C2152407279566AD6D852A36:
|
||||
weight: 20
|
||||
name: stapler117
|
||||
key: stapler117
|
||||
BEC5406F9FE5B07FD93964073AF52B1CB90A06E5:
|
||||
weight: 20
|
||||
name: whit
|
||||
key: whit
|
||||
minimum_weight: 120
|
38
contrib/gitian-downloader/patricklodder-key.pgp
Normal file
38
contrib/gitian-downloader/patricklodder-key.pgp
Normal file
|
@ -0,0 +1,38 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1
|
||||
|
||||
mQENBFObDPcBCADjZ5or5/p72Scw8n2znFaZT5W9vz9IcCT13fZGlN3QpNnHu772
|
||||
obv6OrDpiLA7ltshD0RjebSYGlSWYG0UXiN13KM/BPiFdZx/lkS6NPEm78t9NQ36
|
||||
IuqVXL8A4K+A2ihB92mfS+oaim8HmO/GmJm6dDgQlwadNBaPnLezBHNf5msoym0a
|
||||
1x8hfY+3Fi7Kwz4hf8njO7cUze/av/7fGFzMCUc5aQpD2SNGNDt20EBjW8z3MCeL
|
||||
6rCn2NYmDHrHgY3yBHQBkOWmZli6NEENCmbyr9Ab20GTeom4yq7enJ7lN/vmM3Cm
|
||||
e060xH6/R2iEXrapQ8s90OtsoocZBtbc8v2NABEBAAG0QWdpdGh1Yi5jb20vcGF0
|
||||
cmlja2xvZGRlciA8cGF0cmlja2xvZGRlckB1c2Vycy5ub3JlcGx5LmdpdGh1Yi5j
|
||||
b20+iQE+BBMBAgAoBQJTnUu7AhsjBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIe
|
||||
AQIXgAAKCRCxxgpl5eZNe1PZB/sGobt+xHMIj5yBFUesSjNHrJL/cnuQAN+2cl2Z
|
||||
Y/zBo2iuVLfoC3TQohICVZjd4rh98yeim2ODZekb1HE9muXBblLSIK2QV1zwWNCX
|
||||
beEJlXh7tNqjDpLSrhoyjPRBKuqYqnZJpdMLr/4CiT3Cit0AenCYH+rpHEcQVcYj
|
||||
NWc92lCux7TPn9QYEdUO00hhQwh3SlSFMItGRkhplPuWwHbm4JEBw5Wah4tac+f8
|
||||
MR4MEfwwY9Q4MbJNzYgtou2dIJrtIYrQz9NxKYM0MvBNpk8IdZ7T7aLKBC32e02r
|
||||
243Mz/nTq75Ks0+lnqjoH3ihTIUoJhBFcVFJ9Nt21nRSLFtNtB1QYXRyaWNrIExv
|
||||
ZGRlciA8cGF0QHBsZGRyLmV1PokBQQQTAQIAKwIbIwUJCWYBgAYLCQgHAwIGFQgC
|
||||
CQoLBBYCAwECHgECF4AFAlOdS8oCGQEACgkQscYKZeXmTXue+wf5AQgW7rAO/0UO
|
||||
1b+8CJIpmOdnAcTetR+1x3xTwnAIfrMIzKelLq4ddEy/dyRcTeYcHJENBztKqi+S
|
||||
oGbE+FzwMabPdl3XerdU9l9mhjN6xO62NIjD/lrpv4i8Ce32mswYFCcQn0SgAw66
|
||||
zisBTEff3XGcZgTZreEUdIIBijlRR5okbuOKmtLSSyc7mZ+2PsGnZ3x6sutWpPFb
|
||||
xg/TY56JXOVG4pVXPmZ2SF2CYPFmK2hoGX17WCpU39HCKE0GdLGcTw2bmO3loE6y
|
||||
Jlvmpaa/jjmGuWvTvGd571KFYsbW5nD32shoq1ejZqhvQLmFgAUC4YfyZ6MsiXO/
|
||||
DWpOOa7zR7kBDQRTmwz3AQgA7E2xHtwG4oCWy1b1pDGrwn1NlyBSXq68pNGE3rsX
|
||||
N7os84mzikBQFyLKJg1pjoTSkab/zXL6JC6YNO9/2mmTytsR57ICP0vCJ9Hm/dBp
|
||||
plngVPS7Q1CbaNz6zAsOl61gb5lsYUIiqr0AZ7YcJy1rb9cg3b8q81OiRPlsFu0E
|
||||
DejmKifvr2re59EuM61lHUQgeI8pJaja6wcY0lIJZqR/OHwWe7+/hr1zfEx2V7P6
|
||||
J3/52RYmK6F6hkknHdh9aJwADa8XM+w9iDSXha95isg4Oe14TWMbE6bBwuqnOYR8
|
||||
l5FfWrb5/KQrSiA0ngSAndkeX7K13GuuMqmKqQXlPpEBFQARAQABiQElBBgBAgAP
|
||||
BQJTmwz3AhsMBQkJZgGAAAoJELHGCmXl5k17L2MIANjbWb2K+81Uganw/Iwp4Mgt
|
||||
dtCXlw6F+fISFybGzvBOiKuHUyclcpzydsUqRb7yWGOkNvpTrtdFigU7wbqg5+Hr
|
||||
xfJYjECjFmOIZjoLu0zAMtKcIEwj2B1GaU34xLgM6BaCj3NUSB8MFeXmkXfbF8Zd
|
||||
iysI5sheancm/qbODka9wVeCdHxiGMpaZdOAoSP9IHIN5dcNiaaWCghT/jwnFlUR
|
||||
UXUePECFVgVhHugLPsYwzF7YlObck7rRZoRUD6F8LRmgG3ORB+x1Tcml0oLySm9/
|
||||
vH10auHHAmPGB2TPF2hSB/zlyblt/XQKj6pKdqWZN7AKACAbjc+uLw1tcF39Cyk=
|
||||
=MdkT
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
30
contrib/gitian-downloader/rnicoll-key.pgp
Normal file
30
contrib/gitian-downloader/rnicoll-key.pgp
Normal file
|
@ -0,0 +1,30 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
mQENBFMx8ogBCAC9NqO+zmOI2OxulbP8alNBQIGt0uH7iT/EAyaVseA8E0bijcbi
|
||||
ZRVzIr53Bcn9npbQy0EYW9J6XxDyblRY3YLgLbjeZLghucUhF27DCR2x6jY/LU/p
|
||||
7AEN1lZN9Aq22nijsPnQ6repd+fcSpHobFK38BPgeaCpePTMvQRwNPwKKlKz1jWU
|
||||
ldQydgOcAYQPhp8RXCUXLnRHHoHHg+t16uiWU6hZTzxX6SgIJ8tHMEhIxTBNmhNI
|
||||
+WIfeL8UMIDpCVlFEnIt9KuBjaG7qI6swZHLo2K/Mz6AR9DDo6ZQRvpMhbj5krde
|
||||
czFaBcfd4C3wp+s5lChWaLVev4mC90tpO16hABEBAAG0HUogUm9zcyBOaWNvbGwg
|
||||
PGpybkBqcm4ubWUudWs+iQE+BBMBAgAoBQJTMfKIAhsDBQkJZgGABgsJCAcDAgYV
|
||||
CAIJCgsEFgIDAQIeAQIXgAAKCRCRQuX35TPOO3ekB/wNV3/1ZJjvIAVuq9tTO9Gn
|
||||
SW4agENY44Bk73pOxFJTNSAwUL1X+EUkU+asKz/vja0f+iZf3SayGNrL8vH7Y3hn
|
||||
PpTlZhQBUjgJi6EFIdlp/GiJAkp0tNAZMPtwz3tHYLKq6dSy7bScGeGs1mnNi/Lq
|
||||
7UiLJVLXmvo5NxrC0N1g/zzvptoMfw7Ca0yV5n5voWj3pMGlNEiVjPSENF7IdpMY
|
||||
zr/F0N5LFfiQRrqckan5ohWWlUoGFHE+tjtGy4IcDnCgEf/40L7pT+L660a0xkC5
|
||||
LZpEx+BhnJsjQ1t85e6CzbFWB4Gii8O2Rhu7BOBjfYnapCP8AtKvfsg6g0BUSDAL
|
||||
uQENBFMx8ogBCAD7kvsUub5dv+7+4G6nD5kyw3uo9PCRg3PCwbBt5E/wypjqOiUv
|
||||
Glhk6HTL69ri5xwo8EgMl3To92sXLBlB0aHUmvbUonZHPo00QKQTJ304u3H+x82f
|
||||
hvUPoBbKumfjJ7u1k/Nq+4UaYiKmaKrPM2l/niDb+j6ND8Vc1XUJV+F1g6eytp5I
|
||||
MgCkgJSagIPWTc1tWNwQoSvWSDjOJOovl9gEgRKZK11cP01XlwyD2c/OQIyJcAEC
|
||||
eYiIIha/FIh9VgCpin2O5LUOqcxmS37VvsF0OHfqNJWcWo0Zka5wEUujE9hqZ/tq
|
||||
xJKN73C1Is6+7jFPPNOhLR4HAcVEYGvMH3clABEBAAGJASUEGAECAA8FAlMx8ogC
|
||||
GwwFCQlmAYAACgkQkULl9+UzzjsLWAgAsQfe8Fn8oM9ciNnAEnbp/iB+NnD1F71B
|
||||
2c4yp2HHUCmzITqgWAMPjBA7Vg/V1hrsuH7VMPy7EuvDuxXRFpQYQsonS7eRAWX4
|
||||
/qqmz/8prIxqRMTSKEmIKnjwroCe/zupfL0wJrvd9+q9WAcsMt702OcjaLE34N7C
|
||||
9ZxbX6uLIFnNPAHZtgC8Jxd4tHWxUzg3LsanbsJ8FmXAAWlJw55Rad+jrQ0As54f
|
||||
zqjbaKQyQCaodxIFISvu+zXqwOgsrUeGvu3o8H/Ajz+XyyHoY3GXIF35YBjem06/
|
||||
fdIVuFLTEQNRoYOmnNxV9ppByntget3rq9oN3bNq7LUbwmyxFZ/9oA==
|
||||
=tSaM
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
29
contrib/gitian-downloader/win32-download-config
Normal file
29
contrib/gitian-downloader/win32-download-config
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
name: dogecoin
|
||||
urls:
|
||||
- http://dogecoin.com/dogecoin-latest-win32-gitian.zip
|
||||
rss:
|
||||
- url:
|
||||
xpath: //item/link/text()
|
||||
pattern: dogecoin-\d+.\d+.\d+-win32-gitian.zip
|
||||
signers:
|
||||
90DC2AC256201AD9377E15049142E5F7E533CE3B:
|
||||
weight: 40
|
||||
name: rnicoll
|
||||
key: rnicoll
|
||||
1DDC450B45DB5ADCCF5DDA7F8E4217C6D47D946D:
|
||||
weight: 40
|
||||
name: langerhans
|
||||
key: langerhans
|
||||
6E9C3630F63C1541054C9503B1C60A65E5E64D7B:
|
||||
weight: 20
|
||||
name: "Patrick Lodder"
|
||||
key: patricklodder-key
|
||||
B8273C8A55820B19C2152407279566AD6D852A36:
|
||||
weight: 20
|
||||
name: stapler117
|
||||
key: stapler117
|
||||
BEC5406F9FE5B07FD93964073AF52B1CB90A06E5:
|
||||
weight: 20
|
||||
name: whit
|
||||
key: whit
|
|
@ -1,16 +0,0 @@
|
|||
PGP keys
|
||||
========
|
||||
|
||||
This folder contains the public keys of developers and active contributors.
|
||||
|
||||
The keys are mainly used to sign git commits or the build results of gitian
|
||||
builds.
|
||||
|
||||
You can import the keys into gpg as follows. Also, make sure to fetch the
|
||||
latest version from the key server to see if any key was revoked in the
|
||||
meantime.
|
||||
|
||||
```sh
|
||||
gpg --import ./*.pgp
|
||||
gpg --refresh-keys
|
||||
```
|
|
@ -1,53 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: Keybase OpenPGP JS 0.0.1
|
||||
Comment: https://keybase.io/crypto
|
||||
|
||||
xsFNBFMO4sgBEAChyAICcaqIBhR0uych9PUiruFtARUZgmmgeB66DHESLjm/Lbb1
|
||||
vjUT1GF00jd5Sb8ue4H/GL8q+Ngn9fiR5NtxfKY4+/5+RGbyl7y3SxvKSt09oilu
|
||||
L4VyeB95OnoFNfLDzRMNfMEYbCWkJM9B+d1koE2R8Ehly45DuBn4OvnNWKu70Hyk
|
||||
TozhCkpA9KiBXxOGyUiu3bhFQtchBaf9vaVUoxkv70iqZImtJlhqWJI52RauSck+
|
||||
9mKURe7uH9JfdL6V2VcY2Mkz2xFPIXB1LkRhNZoUDtyYmwfUFYiz4qh/WoAogFw8
|
||||
woEHySEpRxKw3ibMlRU7JYW+JHZf5mKzKpZT7ge6Tlv1fqAlLC0MaWCzSNev0nZ7
|
||||
IOSELSJBZEpF9sknWSbL7RKwqMPRWby7LBSd1VsPzfJZevIraMHWWVPq78iU38k1
|
||||
3wLwMaJrLvNkMz+5AZT7JPtvzzY5EPNTGdN9gI1G6Tb12BxkaYBpO/zLUCSRoNRi
|
||||
bP63FvYHd2yIIMqXDVPwg4ckA6t2KIuzjif8wc0yOEK1t/dTjgEdxP0o73RFsqxN
|
||||
lNaHFkwd+aOdLbBkHQN/e6D5ZqQT/Hy7U+cY8lor4RKrec+mnnBNOTdGTu7cCFyh
|
||||
7cuOVKJlfKgXXQExBA1gxFTJvUiCyvfEfbWht7xCZvlY6mxl53n2ZMZ8SwARAQAB
|
||||
zSxrZXliYXNlLmlvL21pY2hpICh2MC4wLjEpIDxtaWNoaUBrZXliYXNlLmlvPsLB
|
||||
cwQQAQoAHQUCUw7iyAIbLwUJEswDAAMLCQcDFQoIAh4BAheAAAoJEFILU64p6Yhh
|
||||
0sQP/17gVfuKU7Axwm5TxCcK4PLseqY3uqnc1ueERV7fCI56xIcqLgxUx8TD2jkQ
|
||||
TL3s9a8l0y7TI8SbTjfYDsnV2oMeJ3qzZogMMIRf5zorwQmsfvJS2vggMYldCZ6T
|
||||
Op05oVti6w3cIhU9P9Xaxsh/0Qf9SxB28HZnNOorMq8BlS/R3dI8evZ32jK4KxHt
|
||||
JNyNNFGEPXrYOEuL/rxyYd81ODHsAO+xMGZV7H1D9ttfrQEA0sdpiE6KrxAH9ls8
|
||||
KjP9TcJe8dggjmt5EAhsSDtExftu8xUUEVC7Q03GkfHg+LfHSAqK79FI39++coSf
|
||||
QcKAgjReE5uYmqeMCrbcr4VXAAuo+3hMlH5JHIwfnv19KuVZz6xkUcD/BrrCU3Vn
|
||||
IegO4yH1wdhqwnBzsqsmm2Ue1RaG9iXRxILyOPi3hIGXi4LlvZzxL0vGWMPKytlN
|
||||
3AlZhrAY6SvtXbPFuU96xvnohvRVnnNPAYggBPCXv10QCL234DJvXtBEel6izEDl
|
||||
gUtYASrwkyLp3m0DySoBavctntKFucv7x9jalsDOvRwCW7N7c0LfAd8RxiUdfmko
|
||||
b5kw4jwdec6uHsvBVAb+xmx3KmSBfgDkoizCZvLaXBrxK9Kr1vkxPBI9fInqGCKa
|
||||
0PCE3BrcBVaWSMTnIP5hDZfF2OmYpUxAJhOvhEH6E8VvnrswzsBNBFMO4sgBCACa
|
||||
DB0nw4byoiMwUs9BkmV90n0hCWG20xlX0NKZFhIVewRVhVPeUWRSB4jhVJ78q4M6
|
||||
lVidEBHwKpqDS2XcxRu3lUIWH2kQurVVfYakEtH+WO9IvB9y+5lMDswETkDSChH9
|
||||
iFRuVwxDbo9knQBbmvzDMH1VtVy5YuJUlElxPgPb9a05/5EDs+T14gCEbiA7cGfD
|
||||
ZRb5/siE6kNopJeMDaa8t+g7R5SlucQasYIchq6lIA03x66P7KcpI8z0WiH/4bqk
|
||||
Qg+7uDcd0Hy681QES3XE0mlzcbpDLDDSP8EnXldq0aJRz7eI2WvBASehZebfFuru
|
||||
3BICsCMkVuDnTIWhCKLJABEBAAHCwoQEGAEKAA8FAlMO4sgFCQHhM4ACGy4BKQkQ
|
||||
UgtTrinpiGHAXSAEGQEKAAYFAlMO4sgACgkQ3A8+xoA/tFySegf/XwFCj8vsrliO
|
||||
cNDEHwM/LBteipctcHg0imMuXSjnhwW2Wq8E+W8NfEKftxg+1o24GppYUoEDWSYM
|
||||
jvy+G5woEYRGLDzI0s92Cx408yJbwQaNE4cp5przvfJ5IjV6f5NxizZ71byRRtd8
|
||||
8MGFIUCtegX4nBwVhGhDj9Y27R4XxAzZR178yTGBSZ59rICAzHkT5Jaohr7K0XB2
|
||||
iUyR6/cAxxEtu/+cbAQgQ+qYxW4/amOcuV63t6tB3nejAbP1PQDJdgzxGfCO7PX9
|
||||
imsODNouDjfRfJoodS5aCp2DO4EYpGEtGYap0K1SIXSzIUs8vOyrxdK56BHPxDDQ
|
||||
OXanAkmFq+UkD/4splgdyKgRqpQiZSdWJH7KBlaZQ3hQPHLqmo8uevvK7tVNvaqR
|
||||
3c53QrWyFaWOIkRRufjkA31QQVANLI2vum606PquLzxtrqqddXKv1APlFs+Vryio
|
||||
RXOUutgI4p0xizo/wx0M6hRKM72Fqp24Vb3HB04QzdDsB6AReOQbb0/avWU6wyTJ
|
||||
IqDagzPZWdgPM2FnJjKwE0DMjbiUjYExKofuNlyCO4/16Q92HKRgNGy9hkYi1B6D
|
||||
wf2LznY11T9O+PjIWwlx6RyMpY/NYDKP010Wp62o0/S48yVu7LE/0riyX0JT7hGt
|
||||
fWK1+0HO6jlNZ8T3PgPQcJ24fyJTRc8jXoi8AUUyKm/IFIBsZndxUt34tA4IDh+r
|
||||
e9sGOj3yU+OaKMdhy3qLz2qEdPO8fQB7XrmZLYvU9eLypK0for09ZNsmR8V6SIGy
|
||||
49z+4K4bxS9+o5t0w8MWZ/d6UB/WO8+XzwGrMA4gWbc6DRo302oJA8YISN9fH123
|
||||
Wr6XsokZYmdnr4FM+u3Bembn5E8vj2Va8hnqj6+Q+W8tA0t+r+FxMBRK3sQ7g7RN
|
||||
2/6rBOkjI3bu3GJiytITP/QISicquVSJk/9GRDVJpAYbqiLuVWTi5cWTv7hbU6nJ
|
||||
d19adzzCJGwf9fIpFhu5IoUdwcYaEnZHGvfOGRBYBToI3w+y50H3S1asCg==
|
||||
=xHA/
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -1,31 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBF8V/EkBCAC8YTo6YJLNY0To+25b+dcSRcMCo/g9TJlraoJagO9Hr0Njbryg
|
||||
jG5iptxi6UjDD+8xPK7YYRhaKyzJq1yTjGe5u5WEEtMfNaiVgA6dSEOXTdH4xT6q
|
||||
v3VundebzZ7TFue7kj7fzEh7t9x2k5+RI2RvOs26ANEBKgJliQIZDXKOLcQuW7k9
|
||||
9pWvqMWqRyn8WVGNf/UGBoFDcXQ1wo3h6m/LMJIO5L2IGlQWPmc8WT3uHJ/X/5Ln
|
||||
slQ1ml7h+JjNwN0rAY/ZaJHSEi2y0RtLRzISP0EsA6EbqvJNGI8jqs5rpImgUn9U
|
||||
8Q8Xz6hLPAiVTmteF63LlKo03wRcH8d/FVSvABEBAAG0N1BhdHJpY2sgTG9kZGVy
|
||||
IDxwYXRyaWNrbG9kZGVyQHVzZXJzLm5vcmVwbHkuZ2l0aHViLmNvbT6JAVQEEwEI
|
||||
AD4WIQTcbvSov58bHk3h7lItOjRbmNDcHwUCXxX8SQIbAwUJA8JnAAULCQgHAgYV
|
||||
CgkICwIEFgIDAQIeAQIXgAAKCRAtOjRbmNDcHwHQB/9mzj5kuBwPqTT93iec/zKM
|
||||
5yRo3oINJOdXW1Mix3HI2xO0t/NnQFRkLxM/aAcsCFVm+ODcG+FBlcvy87MrEh9M
|
||||
RTMDEx8K5WOK+pSMcEgWqXQb4P0QrEAcNQmdyUswnVyUU8DryB4zp0KwXTgrg8AR
|
||||
V+6ebmMnXiAbTJkCvItJrA/JJpRa5hk5nl6ED4SRBrUiEOeFFrnTq8NlMgoRldyB
|
||||
Mx7v5pSamUZh+ZLpEU7lWvOA5C/zo3iVF2ruZnyZPozP1hFORNuUbxnZEaBpwQKi
|
||||
i1SMC3HOzh8EzatohbOW1rH8iki7IlG6a76kWNJABrsYBmDSOnj9crgvVNxNNHNt
|
||||
uQENBF8V/EkBCADN8eWUf0OtQdthNoWhRgotz/EzLI9r3sVv2SqbA++rHW9TC7mB
|
||||
Wl/3e5emXWgKI1EK1Poz5HeKnL3SRx3xizgBTK6+RNQK6svvaLwcx06y8pZP9RqX
|
||||
jLaRR67fXZCL+ulPtTcbt/JwlaTaokwWsgfy3UZRcK33llLbvWFjht2OGfx8B6Z9
|
||||
UFRxW4sP0HuE3RrnMATGymWvOZlwYDr73HltksnOEFkz4lVP5VK9kdbndQjIB3Cf
|
||||
zw/waTqjX+xXjJsFMYZhEDARhP5BQIoQvEv8KRtptNoLJGFZ9RGf+fIHiar2GAZL
|
||||
4WZbZ0IuGLj419TkgvsUkI83Bx97DkS5Xa+jABEBAAGJATwEGAEIACYWIQTcbvSo
|
||||
v58bHk3h7lItOjRbmNDcHwUCXxX8SQIbDAUJA8JnAAAKCRAtOjRbmNDcH4iPCACB
|
||||
3qf7roCdadPSQNRdt1z/97wjbAC9IUC0WPQMU8gsmF2AeFD6O7gM+vMYhOdkpk0l
|
||||
86FsqgMpZ81mpkitY6XsXgaZmPCfDbe2ou1WuXGGv4TAk0TOOCzJptsoLhxF2sZK
|
||||
hncnhcx3BxYLQd5YbA5bJRUFfLcY1aMx16NPMkiVyCqvtrg3h3ZsMm3sDPJXih5l
|
||||
QeqBN6W9CeTaqQC2pv0vqBEFrBIRy38lr2tJTW+LGEjAHk2uZ5bXW0CXRQksfRVy
|
||||
qGKl8R/YFYzOxElPomFm3bcAYC538E9vWCofiTaDJ72XMLG3nIGNPZz9RJuFvxs0
|
||||
7E2Vs0AwJc9ZDM4fVMV4
|
||||
=n+nj
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -1,58 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFyTrWUBEACgfyQlnv2yluwdan4xT2pCvNOolkfN94T8Wj59kQEDM9vfIm7J
|
||||
P8H9bRK2UBeHA6jG/SyNwRB+tNnY/waS7bYvomXxK7N1ot8ZWLWa89sF/wMgCjn7
|
||||
hglMaJMyX6ngI199noPGIopv0fJRz4IMl0h7a/WZUsDCInoMpZTtn/UuzGcm67SQ
|
||||
HLnbY4hgPeS/I/C2OG7NH3vUg9HkluUfpuq3Qgc6z8Z7p36hKPlf5OUMJZwhKDYx
|
||||
lKepGC4+9UjIn5CARExljEZtaHIY1R/wY70dja9qFp4nCUckiPwgBxsR2uogXOqy
|
||||
6xstpHDwkPsru/sEUqVjY1d4jBw3U5Y7g18XvZIIEYnNr0zoupizSTbM/j4yXZJP
|
||||
mhag5YAkUo/QHp5KEc9Y4F52NwCCIV09O4+Ks6yyHBHnKvIrPrP7VVw/Od+wjClA
|
||||
uE93NJJtIUMXs9r3hZ2ek51PtABzX93j26l0CF3FZ+GLi2stn+d3ko+hqgH9wNLT
|
||||
zMxS+G4dm4yz3dzeHl7rsaDDQ3olefXYKVR6Uizc5liC8S/3oLAOZmiK3P32ETEC
|
||||
iMiVjwAoEbP8JbyFoIdw+UOZhjla6HTfTuz6t+V7ySyRxOk47XJ4/vG+QdFgZTY8
|
||||
ng7b+MRX1zQvHWl/KnOLQ/sjoiMCmw1BLgkr/xTSC8Q8YxyElQnj3ghYlwARAQAB
|
||||
tB1KIFJvc3MgTmljb2xsIDxqcm5AanJuLm1lLnVrPokCVAQTAQgAPhYhBFGi10au
|
||||
ilikEBpAMOZ54wwxK5TgBQJck61lAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMB
|
||||
Ah4BAheAAAoJEOZ54wwxK5Tg/MUP/RLyGbb9vhzv3hXPPiaw96aDxx53KP+dsyyA
|
||||
Z93rVgxji1YWroQNZMCNR2kjHYZlA1WsZTfNjzphSqjHZun93xQHdGaYbvRV5ZV6
|
||||
BxaY2JrRUVm6Wvph6ufL/xDhZUJFEvJEqyCh5mwNxl5Cvsva4bF5SEOhBevDXSvF
|
||||
JLrMMySmqa7mZGpQxrIi6Shwj6LEzUJFQXnstLGCsKOzYhp0OsTNwA0bG+qUoux3
|
||||
K4HTXhVC+C54NemJv4SmxNpUbOxD3xthe8cbO7lpmoJN2y4ZKJKMLxdU7dM7+Zwe
|
||||
wpdlYce7+k7RWjqnT9jI7cHh+ZDIQ2Na64FkDeqlGqkJXPeURueZ9R4OGXwfwNk9
|
||||
zUDUOl489/G03waGXjyyOYMWqYevjHdnAHnfNs24DzTeLCysqX7EgpArn4L82gsX
|
||||
dW185RsIVdlp9y1GWdorIpu5isiGGa6WiRvh/x5t+xY2k6hIFOF1IxPeta4L5UhG
|
||||
PmsNAka7BsE5efc+fikgBgSV/3lfO7nvO6nHiJFb5zAnAHHyqDBihFvbLG2rqfNW
|
||||
/xed76CvCfcFEwmIYQurXjTQamOO5iknad9vXYfakVcEa7NwiDpYgzJCgBW1/Uqg
|
||||
JWc8vxGoo4mBtmz/8E0bMkb76Ek7GBuNxBRAMz7fhXfXikVo6sXeuaoS2ElxEi5d
|
||||
gpyJ4uwZiQEzBBABCAAdFiEEkNwqwlYgGtk3fhUEkULl9+UzzjsFAlyTrf4ACgkQ
|
||||
kULl9+Uzzjub9Af/fOyBLVETk0GSmcnnGHQqqcPSl1HLqhQs9fD/IfR4ZHFK53uG
|
||||
LcSqU3NdGbB/yJJnPhO6nhQP/q1i4t+R3oBQu3TDZclBlrs2x/VNqUUyJrmEBg0s
|
||||
4rwc7c7J+7G68x8Dy1D7VMBWavlHj13I5sWMT/4oghyxUTLsN8UT+bUAsgJAeM3S
|
||||
6nthnKBsM/XUvu5OS6WgXXsSLy1a601xRqFaFkq/DBd0e1ksRpwqGrU5ptevTPhD
|
||||
Rs9uosNlx1IXj3svktNdZUSW4avJdsfYnGXtvwRL1OdZ9qjnqUZ6R1iPk8l3VCDh
|
||||
C/l0LnFTKvlnIyuOCC7W84g6sfS8jXFHxyGHvbkCDQRck61lARAA27toS+Sh6hMP
|
||||
q63vgnv7qbKMei9fKo9+A8XpnWXLU9n6KysqbcJg0XI8iTKQTZqkYdtOycNPgy17
|
||||
KeN0IEwDGjAjMJK9d8gvayuPIyUMznQ/gSWnSJoSP72dehx8luwmMDwxdqGh4G0V
|
||||
cpO2bzW5ntg9MYQWDSdUoOqFU0T3AXZieKMOyDcA8LIyBz98ZyS9D1LMGfX/vD4E
|
||||
gKS2pSwMrjRrHd0WS5vbWwzS3vGHTytUfjhilUzuhV9hPJFSrGmmxIxcwCFEOXda
|
||||
pEaXGBO/cXbEuxNshx7nOMl9ZpEjLVG7qA3vhlAjKpdxYSchCODzcwvbD3cKqHeH
|
||||
n4zRX6e76yggoz9/PXHodcUDF7NJfqFUY4sVyn7mCUA7NZDR3c8ZXHDffiD///Dp
|
||||
O+LVYLwkogrcxJkxMhUhMz+ERnFgwD+6HU+gcIfrkhiPD+5npMlj2SX9jglDX+lq
|
||||
RKEdxlW5u+7vrGuBKqT2xkUGKZcJ9m/ceCh9YEr4Se+S74LqyIy5Isb4QVY5xWXr
|
||||
t/uX03kOhQKOl0jwl3F0m2LNostz3+AV/ta/zKCiKzXAsGO2I/gdDggQPL0ImXUu
|
||||
r97ZIaQa/cakXTUEHZkdPxF7JkNby2bFKJqz1Ns8A0s4jk3ebnAyaksFtZ+Lm4IY
|
||||
aXOMDfjHik5NgOkm3hKcI8Lsh0zFC9cAEQEAAYkCPAQYAQgAJhYhBFGi10auilik
|
||||
EBpAMOZ54wwxK5TgBQJck61lAhsMBQkJZgGAAAoJEOZ54wwxK5Tg9YwP/j3aFO6i
|
||||
kd2Nr25jrkCtky3fTGM8M9EuBLOrXU+jMj1CPp/Bt0KPD620YPUqLyPnMIPuaErM
|
||||
290rvHoWeumALF2dAHcqqx07enC0iD5pf8i9Gguro9H8UI+hcHchCNskIwtgu/uK
|
||||
bLMojGEJrY6/lAH2+Ncih8f55Og1s87IW/+bQgN6kRhdFKv55Xsj3i7j/fIGQuHU
|
||||
BlgXrkSr7XdQW+Bnxu3/4FcSqueSkGv6LIP/MTGDjqyB8SNE+KDohWZH87Q497e+
|
||||
pdMSKnGz3N0vlZjVmDDYG7lf0SpWvUbdUVhxvNSikzRLhPkdMXmNK1O92jkgxMdX
|
||||
+ywREr9rZ4ov3Bsxwgx87oAGixXbVnE6YIBiiv14Uw6VOgPfL/4Jijt6K+Kpz7TI
|
||||
Kb1qev7Ffrp9RZUoUkSY5a5HcqE2sZWDGjUsETQ5TRfqP06gyjBTPfKHT5kMpYlM
|
||||
FdLA4ArDieiNNTfCHQauL6CVYBvE7kM8nxuXCOB6ftJhz2k4THacfkolPXVESCOu
|
||||
UAgleCJOBNoNTgaOGaUaGbj7TXF7YJmmOSnbNqoWUhZ9WDTjcSNdJG9ewFSOoYII
|
||||
RpHwHTD6Cqgrg4QBz8BodhQsnuoG3PpnELhzitEP4zQ/bCYAgaOZ+++pycW470lb
|
||||
FKYLNPqwOusuv9DRJikyic1lwV5NOdATdlFo
|
||||
=B4YF
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -5,7 +5,6 @@ Upstart: dogecoind.conf
|
|||
OpenRC: dogecoind.openrc
|
||||
dogecoind.openrcconf
|
||||
CentOS: dogecoind.init
|
||||
OS X: org.dogecoin.dogecoind.plist
|
||||
|
||||
have been made available to assist packagers in creating node packages here.
|
||||
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
# This variant of the unit file is for local installations that are installed with `make install`.
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/usr/local/bin/dogecoind
|
||||
#/usr/local/etc/dogecoin/
|
||||
#/var/local/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/dogecoind -conf=/usr/local/etc/dogecoin/dogecoin.conf -datadir=/var/local/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/usr/local/bin/dogecoind /usr/local/etc/dogecoin/
|
||||
BindPaths=/var/local/dogecoin/
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -3,40 +3,36 @@
|
|||
# backward compatibility for existing gentoo layout
|
||||
#
|
||||
if [ -d "/var/lib/dogecoin/.dogecoin" ]; then
|
||||
BITCOIND_DEFAULT_DATADIR="/var/lib/dogecoin/.dogecoin"
|
||||
DOGECOIND_DEFAULT_DATADIR="/var/lib/dogecoin/.dogecoin"
|
||||
else
|
||||
BITCOIND_DEFAULT_DATADIR="/var/lib/dogecoind"
|
||||
DOGECOIND_DEFAULT_DATADIR="/var/lib/dogecoind"
|
||||
fi
|
||||
|
||||
BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/dogecoin/dogecoin.conf}
|
||||
BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/dogecoind}
|
||||
BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/dogecoind.pid}
|
||||
BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
|
||||
BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-dogecoin}}
|
||||
BITCOIND_GROUP=${BITCOIND_GROUP:-dogecoin}
|
||||
BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/dogecoind}
|
||||
BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
|
||||
BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
|
||||
DOGECOIND_CONFIGFILE=${DOGECOIND_CONFIGFILE:-/etc/dogecoin/dogecoin.conf}
|
||||
DOGECOIND_PIDDIR=${DOGECOIND_PIDDIR:-/var/run/dogecoind}
|
||||
DOGECOIND_PIDFILE=${DOGECOIND_PIDFILE:-${DOGECOIND_PIDDIR}/dogecoind.pid}
|
||||
DOGECOIND_DATADIR=${DOGECOIND_DATADIR:-${DOGECOIND_DEFAULT_DATADIR}}
|
||||
DOGECOIND_USER=${DOGECOIND_USER:-${DOGECOIN_USER:-dogecoin}}
|
||||
DOGECOIND_GROUP=${DOGECOIND_GROUP:-dogecoin}
|
||||
DOGECOIND_BIN=${DOGECOIND_BIN:-/usr/bin/dogecoind}
|
||||
DOGECOIND_NICE=${DOGECOIND_NICE:-${NICELEVEL:-0}}
|
||||
DOGECOIND_OPTS="${DOGECOIND_OPTS:-${DOGECOIN_OPTS}}"
|
||||
|
||||
name="Bitcoin Core Daemon"
|
||||
description="Bitcoin cryptocurrency P2P network daemon"
|
||||
name="Dogecoin Core Daemon"
|
||||
description="Dogecoin cryptocurrency P2P network daemon"
|
||||
|
||||
command="/usr/bin/dogecoind"
|
||||
command_args="-pid=\"${BITCOIND_PIDFILE}\" \
|
||||
-conf=\"${BITCOIND_CONFIGFILE}\" \
|
||||
-datadir=\"${BITCOIND_DATADIR}\" \
|
||||
command_args="-pid=\"${DOGECOIND_PIDFILE}\" \
|
||||
-conf=\"${DOGECOIND_CONFIGFILE}\" \
|
||||
-datadir=\"${DOGECOIND_DATADIR}\" \
|
||||
-daemon \
|
||||
${BITCOIND_OPTS}"
|
||||
${DOGECOIND_OPTS}"
|
||||
|
||||
required_files="${BITCOIND_CONFIGFILE}"
|
||||
start_stop_daemon_args="-u ${BITCOIND_USER} \
|
||||
-N ${BITCOIND_NICE} -w 2000"
|
||||
pidfile="${BITCOIND_PIDFILE}"
|
||||
|
||||
# The retry schedule to use when stopping the daemon. Could be either
|
||||
# a timeout in seconds or multiple signal/timeout pairs (like
|
||||
# "SIGKILL/180 SIGTERM/300")
|
||||
retry="${BITCOIND_SIGTERM_TIMEOUT}"
|
||||
required_files="${DOGECOIND_CONFIGFILE}"
|
||||
start_stop_daemon_args="-u ${DOGECOIND_USER} \
|
||||
-N ${DOGECOIND_NICE} -w 2000"
|
||||
pidfile="${DOGECOIND_PIDFILE}"
|
||||
retry=60
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
|
@ -50,29 +46,29 @@ start_pre() {
|
|||
checkpath \
|
||||
-d \
|
||||
--mode 0750 \
|
||||
--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
|
||||
"${BITCOIND_DATADIR}"
|
||||
--owner "${DOGECOIND_USER}:${DOGECOIND_GROUP}" \
|
||||
"${DOGECOIND_DATADIR}"
|
||||
|
||||
checkpath \
|
||||
-d \
|
||||
--mode 0755 \
|
||||
--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
|
||||
"${BITCOIND_PIDDIR}"
|
||||
--owner "${DOGECOIND_USER}:${DOGECOIND_GROUP}" \
|
||||
"${DOGECOIND_PIDDIR}"
|
||||
|
||||
checkpath -f \
|
||||
-o ${BITCOIND_USER}:${BITCOIND_GROUP} \
|
||||
-o ${DOGECOIND_USER}:${DOGECOIND_GROUP} \
|
||||
-m 0660 \
|
||||
${BITCOIND_CONFIGFILE}
|
||||
${DOGECOIND_CONFIGFILE}
|
||||
|
||||
checkconfig || return 1
|
||||
}
|
||||
|
||||
checkconfig()
|
||||
{
|
||||
if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
|
||||
if ! grep -qs '^rpcpassword=' "${DOGECOIND_CONFIGFILE}" ; then
|
||||
eerror ""
|
||||
eerror "ERROR: You must set a secure rpcpassword to run dogecoind."
|
||||
eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
|
||||
eerror "The setting must appear in ${DOGECOIND_CONFIGFILE}"
|
||||
eerror ""
|
||||
eerror "This password is security critical to securing wallets "
|
||||
eerror "and must not be the same as the rpcuser setting."
|
||||
|
@ -84,7 +80,7 @@ checkconfig()
|
|||
eerror "It is also recommended that you also set alertnotify so you are "
|
||||
eerror "notified of problems:"
|
||||
eerror ""
|
||||
eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
|
||||
eerror "ie: alertnotify=echo %%s | mail -s \"Dogecoin Alert\"" \
|
||||
"admin@foo.com"
|
||||
eerror ""
|
||||
return 1
|
||||
|
|
|
@ -25,9 +25,3 @@
|
|||
# Additional options (avoid -conf and -datadir, use flags above)
|
||||
DOGECOIND_OPTS="-disablewallet"
|
||||
|
||||
# The timeout in seconds OpenRC will wait for dogecoind to terminate
|
||||
# after a SIGTERM has been raised.
|
||||
# Note that this will be mapped as argument to start-stop-daemon's
|
||||
# '--retry' option, which means you can specify a retry schedule
|
||||
# here. For more information see man 8 start-stop-daemon.
|
||||
DOGECOIND_SIGTERM_TIMEOUT=60
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
# This variant of the unit file is for "opt" add-on installations that do not form part of the default installation.
|
||||
# (i.e. out of band installations by the user, not installed by a system package manager like "apt")
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/opt/dogecoin/dogecoind
|
||||
#/etc/opt/dogecoin/
|
||||
#/var/opt/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/dogecoin/bin/dogecoind -conf=/etc/opt/dogecoin/dogecoin.conf -datadir=/var/opt/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/opt/dogecoin/ /etc/opt/dogecoin/
|
||||
BindPaths=/var/opt/dogecoin/
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,73 +1,22 @@
|
|||
# This variant of the unit file is for package installations.
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/usr/bin/dogecoind
|
||||
#/etc/dogecoin/
|
||||
#/var/lib/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/dogecoind -conf=/etc/dogecoin/dogecoin.conf -datadir=/var/lib/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
Type=forking
|
||||
PIDFile=/var/lib/dogecoind/dogecoind.pid
|
||||
ExecStart=/usr/bin/dogecoind -daemon -pid=/var/lib/dogecoind/dogecoind.pid \
|
||||
-conf=/etc/dogecoin/dogecoin.conf -datadir=/var/lib/dogecoind -disablewallet
|
||||
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/usr/bin/dogecoind /etc/dogecoin/
|
||||
BindPaths=/var/lib/dogecoin
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
Restart=always
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
TimeoutStopSec=60s
|
||||
TimeoutStartSec=2s
|
||||
StartLimitInterval=120s
|
||||
StartLimitBurst=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.dogecoin.dogecoind</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/dogecoind</string>
|
||||
<string>-daemon</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,54 +1,33 @@
|
|||
# Linearize
|
||||
Construct a linear, no-fork, best version of the Dogecoin blockchain. The scripts
|
||||
run using Python 3 but are compatible with Python 2.
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
|
||||
## Step 1: Download hash list
|
||||
|
||||
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
|
||||
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
|
||||
|
||||
Required configuration file settings for linearize-hashes:
|
||||
* RPC: `rpcuser`, `rpcpassword`
|
||||
* RPC: rpcuser, rpcpassword
|
||||
|
||||
Optional config file setting for linearize-hashes:
|
||||
* RPC: `host` (Default: `127.0.0.1`)
|
||||
* RPC: `port` (Default: `22555`)
|
||||
* Blockchain: `min_height`, `max_height`
|
||||
* `rev_hash_bytes`: If true, the written block hash list will be
|
||||
byte-reversed. (In other words, the hash returned by getblockhash will have its
|
||||
bytes reversed.) False by default. Intended for generation of
|
||||
standalone hash lists but safe to use with linearize-data.py, which will output
|
||||
the same data no matter which byte format is chosen.
|
||||
|
||||
The `linearize-hashes` script requires a connection, local or remote, to a
|
||||
JSON-RPC server. Running `dogecoind` or `dogecoin-qt -server` will be sufficient.
|
||||
* RPC: host, port
|
||||
* Block chain: min_height, max_height
|
||||
|
||||
## Step 2: Copy local block data
|
||||
|
||||
$ ./linearize-data.py linearize.cfg
|
||||
$ ./linearize-data.py linearize.cfg
|
||||
|
||||
Required configuration file settings:
|
||||
* `output_file`: The file that will contain the final blockchain.
|
||||
* "input": dogecoind blocks/ directory containing blkNNNNN.dat
|
||||
* "hashlist": text file containing list of block hashes, linearized-hashes.py
|
||||
output.
|
||||
* "output_file": bootstrap.dat
|
||||
or
|
||||
* `output`: Output directory for linearized `blocks/blkNNNNN.dat` output.
|
||||
* "output": output directory for linearized blocks/blkNNNNN.dat output
|
||||
|
||||
Optional config file setting for linearize-data:
|
||||
* `debug_output`: Some printouts may not always be desired. If true, such output
|
||||
will be printed.
|
||||
* `file_timestamp`: Set each file's last-accessed and last-modified times,
|
||||
respectively, to the current time and to the timestamp of the most recent block
|
||||
written to the script's blockchain.
|
||||
* `genesis`: The hash of the genesis block in the blockchain.
|
||||
* `input`: dogecoind blocks/ directory containing blkNNNNN.dat
|
||||
* `hashlist`: text file containing list of block hashes created by
|
||||
linearize-hashes.py.
|
||||
* `max_out_sz`: Maximum size for files created by the `output_file` option.
|
||||
(Default: `1000*1000*1000 bytes`)
|
||||
* `netmagic`: Network magic number.
|
||||
* `out_of_order_cache_sz`: If out-of-order blocks are being read, the block can
|
||||
be written to a cache so that the blockchain doesn't have to be seeked again.
|
||||
This option specifies the cache size. (Default: `100*1000*1000 bytes`)
|
||||
* `rev_hash_bytes`: If true, the block hash list written by linearize-hashes.py
|
||||
will be byte-reversed when read by linearize-data.py. See the linearize-hashes
|
||||
entry for more information.
|
||||
* `split_timestamp`: Split blockchain files when a new month is first seen, in
|
||||
addition to reaching a maximum file size (`max_out_sz`).
|
||||
* "netmagic": network magic number
|
||||
* "max_out_sz": maximum output file size (default 1000*1000*1000)
|
||||
* "split_timestamp": Split files when a new month is first seen, in addition to
|
||||
reaching a maximum file size.
|
||||
* "file_timestamp": Set each file's last-modified time to that of the
|
||||
most recent block in that file.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
# dogecoind RPC settings (linearize-hashes)
|
||||
rpcuser=someuser
|
||||
rpcpassword=somepassword
|
||||
|
@ -6,7 +7,7 @@ port=22555
|
|||
#port=44555
|
||||
|
||||
# bootstrap.dat hashlist settings (linearize-hashes)
|
||||
max_height=313000
|
||||
max_height=845000
|
||||
|
||||
# bootstrap.dat input/output settings (linearize-data)
|
||||
|
||||
|
@ -16,27 +17,13 @@ genesis=1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691
|
|||
input=/home/example/.dogecoin/blocks
|
||||
|
||||
# testnet
|
||||
#netmagic=0b110907
|
||||
#netmagic=fcc1b7dc
|
||||
#genesis=bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e
|
||||
#input=/home/example/.dogecoin/testnet3/blocks
|
||||
|
||||
# "output" option causes blockchain files to be written to the given location,
|
||||
# with "output_file" ignored. If not used, "output_file" is used instead.
|
||||
# output=/home/example/blockchain_directory
|
||||
output_file=/home/example/Downloads/bootstrap.dat
|
||||
hashlist=hashlist.txt
|
||||
split_year=1
|
||||
|
||||
# Maximum size in bytes of out-of-order blocks cache in memory
|
||||
# Maxmimum size in bytes of out-of-order blocks cache in memory
|
||||
out_of_order_cache_sz = 100000000
|
||||
|
||||
# Do we want the reverse the hash bytes coming from getblockhash?
|
||||
rev_hash_bytes = False
|
||||
|
||||
# On a new month, do we want to set the access and modify times of the new
|
||||
# blockchain file?
|
||||
file_timestamp = 0
|
||||
# Do we want to split the blockchain files given a new month or specific height?
|
||||
split_timestamp = 0
|
||||
|
||||
# Do we want debug printouts?
|
||||
debug_output = False
|
||||
|
|
|
@ -1,34 +1,29 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# linearize-data.py: Construct a linear, no-fork version of the chain.
|
||||
#
|
||||
# Copyright (c) 2013-2016 The Bitcoin Core developers
|
||||
# Copyright (c) 2013-2014 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
||||
from __future__ import print_function, division
|
||||
import json
|
||||
import struct
|
||||
import re
|
||||
import os
|
||||
import os.path
|
||||
import base64
|
||||
import httplib
|
||||
import sys
|
||||
import hashlib
|
||||
import datetime
|
||||
import time
|
||||
from collections import namedtuple
|
||||
from binascii import hexlify, unhexlify
|
||||
|
||||
settings = {}
|
||||
|
||||
##### Switch endian-ness #####
|
||||
def hex_switchEndian(s):
|
||||
""" Switches the endianness of a hex string (in pairs of hex chars) """
|
||||
pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
|
||||
return b''.join(pairList[::-1]).decode()
|
||||
|
||||
def uint32(x):
|
||||
return x & 0xffffffff
|
||||
return x & 0xffffffffL
|
||||
|
||||
def bytereverse(x):
|
||||
return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
|
||||
|
@ -39,14 +34,14 @@ def bufreverse(in_buf):
|
|||
for i in range(0, len(in_buf), 4):
|
||||
word = struct.unpack('@I', in_buf[i:i+4])[0]
|
||||
out_words.append(struct.pack('@I', bytereverse(word)))
|
||||
return b''.join(out_words)
|
||||
return ''.join(out_words)
|
||||
|
||||
def wordreverse(in_buf):
|
||||
out_words = []
|
||||
for i in range(0, len(in_buf), 4):
|
||||
out_words.append(in_buf[i:i+4])
|
||||
out_words.reverse()
|
||||
return b''.join(out_words)
|
||||
return ''.join(out_words)
|
||||
|
||||
def calc_hdr_hash(blk_hdr):
|
||||
hash1 = hashlib.sha256()
|
||||
|
@ -63,7 +58,7 @@ def calc_hash_str(blk_hdr):
|
|||
hash = calc_hdr_hash(blk_hdr)
|
||||
hash = bufreverse(hash)
|
||||
hash = wordreverse(hash)
|
||||
hash_str = hexlify(hash).decode('utf-8')
|
||||
hash_str = hash.encode('hex')
|
||||
return hash_str
|
||||
|
||||
def get_blk_dt(blk_hdr):
|
||||
|
@ -73,21 +68,17 @@ def get_blk_dt(blk_hdr):
|
|||
dt_ym = datetime.datetime(dt.year, dt.month, 1)
|
||||
return (dt_ym, nTime)
|
||||
|
||||
# When getting the list of block hashes, undo any byte reversals.
|
||||
def get_block_hashes(settings):
|
||||
blkindex = []
|
||||
f = open(settings['hashlist'], "r")
|
||||
for line in f:
|
||||
line = line.rstrip()
|
||||
if settings['rev_hash_bytes'] == 'true':
|
||||
line = hex_switchEndian(line)
|
||||
blkindex.append(line)
|
||||
|
||||
print("Read " + str(len(blkindex)) + " hashes")
|
||||
|
||||
return blkindex
|
||||
|
||||
# The block map shouldn't give or receive byte-reversed hashes.
|
||||
def mkblockmap(blkindex):
|
||||
blkmap = {}
|
||||
for height,hash in enumerate(blkindex):
|
||||
|
@ -124,30 +115,29 @@ class BlockDataCopier:
|
|||
self.setFileTime = True
|
||||
if settings['split_timestamp'] != 0:
|
||||
self.timestampSplit = True
|
||||
# Extents and cache for out-of-order blocks
|
||||
# Extents and cache for out-of-order blocks
|
||||
self.blockExtents = {}
|
||||
self.outOfOrderData = {}
|
||||
self.outOfOrderSize = 0 # running total size for items in outOfOrderData
|
||||
|
||||
def writeBlock(self, inhdr, blk_hdr, rawblock):
|
||||
blockSizeOnDisk = len(inhdr) + len(blk_hdr) + len(rawblock)
|
||||
if not self.fileOutput and ((self.outsz + blockSizeOnDisk) > self.maxOutSz):
|
||||
if not self.fileOutput and ((self.outsz + self.inLen) > self.maxOutSz):
|
||||
self.outF.close()
|
||||
if self.setFileTime:
|
||||
os.utime(self.outFname, (int(time.time()), self.highTS))
|
||||
os.utime(outFname, (int(time.time()), highTS))
|
||||
self.outF = None
|
||||
self.outFname = None
|
||||
self.outFn = self.outFn + 1
|
||||
self.outFn = outFn + 1
|
||||
self.outsz = 0
|
||||
|
||||
(blkDate, blkTS) = get_blk_dt(blk_hdr)
|
||||
if self.timestampSplit and (blkDate > self.lastDate):
|
||||
print("New month " + blkDate.strftime("%Y-%m") + " @ " + self.hash_str)
|
||||
self.lastDate = blkDate
|
||||
if self.outF:
|
||||
self.outF.close()
|
||||
if self.setFileTime:
|
||||
os.utime(self.outFname, (int(time.time()), self.highTS))
|
||||
print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
|
||||
lastDate = blkDate
|
||||
if outF:
|
||||
outF.close()
|
||||
if setFileTime:
|
||||
os.utime(outFname, (int(time.time()), highTS))
|
||||
self.outF = None
|
||||
self.outFname = None
|
||||
self.outFn = self.outFn + 1
|
||||
|
@ -155,11 +145,11 @@ class BlockDataCopier:
|
|||
|
||||
if not self.outF:
|
||||
if self.fileOutput:
|
||||
self.outFname = self.settings['output_file']
|
||||
outFname = self.settings['output_file']
|
||||
else:
|
||||
self.outFname = os.path.join(self.settings['output'], "blk%05d.dat" % self.outFn)
|
||||
print("Output file " + self.outFname)
|
||||
self.outF = open(self.outFname, "wb")
|
||||
outFname = "%s/blk%05d.dat" % (self.settings['output'], outFn)
|
||||
print("Output file " + outFname)
|
||||
self.outF = open(outFname, "wb")
|
||||
|
||||
self.outF.write(inhdr)
|
||||
self.outF.write(blk_hdr)
|
||||
|
@ -175,7 +165,7 @@ class BlockDataCopier:
|
|||
(self.blkCountIn, self.blkCountOut, len(self.blkindex), 100.0 * self.blkCountOut / len(self.blkindex)))
|
||||
|
||||
def inFileName(self, fn):
|
||||
return os.path.join(self.settings['input'], "blk%05d.dat" % fn)
|
||||
return "%s/blk%05d.dat" % (self.settings['input'], fn)
|
||||
|
||||
def fetchBlock(self, extent):
|
||||
'''Fetch block contents from disk given extents'''
|
||||
|
@ -215,7 +205,7 @@ class BlockDataCopier:
|
|||
|
||||
inMagic = inhdr[:4]
|
||||
if (inMagic != self.settings['netmagic']):
|
||||
print("Invalid magic: " + hexlify(inMagic).decode('utf-8'))
|
||||
print("Invalid magic: " + inMagic.encode('hex'))
|
||||
return
|
||||
inLenLE = inhdr[4:]
|
||||
su = struct.unpack("<I", inLenLE)
|
||||
|
@ -223,16 +213,13 @@ class BlockDataCopier:
|
|||
blk_hdr = self.inF.read(80)
|
||||
inExtent = BlockExtent(self.inFn, self.inF.tell(), inhdr, blk_hdr, inLen)
|
||||
|
||||
self.hash_str = calc_hash_str(blk_hdr)
|
||||
if not self.hash_str in blkmap:
|
||||
# Because blocks can be written to files out-of-order as of 0.10, the script
|
||||
# may encounter blocks it doesn't know about. Treat as debug output.
|
||||
if settings['debug_output'] == 'true':
|
||||
print("Skipping unknown block " + self.hash_str)
|
||||
hash_str = calc_hash_str(blk_hdr)
|
||||
if not hash_str in blkmap:
|
||||
print("Skipping unknown block " + hash_str)
|
||||
self.inF.seek(inLen, os.SEEK_CUR)
|
||||
continue
|
||||
|
||||
blkHeight = self.blkmap[self.hash_str]
|
||||
blkHeight = self.blkmap[hash_str]
|
||||
self.blkCountIn += 1
|
||||
|
||||
if self.blkCountOut == blkHeight:
|
||||
|
@ -276,12 +263,6 @@ if __name__ == '__main__':
|
|||
settings[m.group(1)] = m.group(2)
|
||||
f.close()
|
||||
|
||||
# Force hash byte format setting to be lowercase to make comparisons easier.
|
||||
# Also place upfront in case any settings need to know about it.
|
||||
if 'rev_hash_bytes' not in settings:
|
||||
settings['rev_hash_bytes'] = 'false'
|
||||
settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower()
|
||||
|
||||
if 'netmagic' not in settings:
|
||||
settings['netmagic'] = 'c0c0c0c0'
|
||||
if 'genesis' not in settings:
|
||||
|
@ -295,18 +276,15 @@ if __name__ == '__main__':
|
|||
if 'split_timestamp' not in settings:
|
||||
settings['split_timestamp'] = 0
|
||||
if 'max_out_sz' not in settings:
|
||||
settings['max_out_sz'] = 1000 * 1000 * 1000
|
||||
settings['max_out_sz'] = 1000L * 1000 * 1000
|
||||
if 'out_of_order_cache_sz' not in settings:
|
||||
settings['out_of_order_cache_sz'] = 100 * 1000 * 1000
|
||||
if 'debug_output' not in settings:
|
||||
settings['debug_output'] = 'false'
|
||||
|
||||
settings['max_out_sz'] = int(settings['max_out_sz'])
|
||||
settings['max_out_sz'] = long(settings['max_out_sz'])
|
||||
settings['split_timestamp'] = int(settings['split_timestamp'])
|
||||
settings['file_timestamp'] = int(settings['file_timestamp'])
|
||||
settings['netmagic'] = unhexlify(settings['netmagic'].encode('utf-8'))
|
||||
settings['netmagic'] = settings['netmagic'].decode('hex')
|
||||
settings['out_of_order_cache_sz'] = int(settings['out_of_order_cache_sz'])
|
||||
settings['debug_output'] = settings['debug_output'].lower()
|
||||
|
||||
if 'output_file' not in settings and 'output' not in settings:
|
||||
print("Missing output file / directory")
|
||||
|
@ -315,8 +293,9 @@ if __name__ == '__main__':
|
|||
blkindex = get_block_hashes(settings)
|
||||
blkmap = mkblockmap(blkindex)
|
||||
|
||||
# Block hash map won't be byte-reversed. Neither should the genesis hash.
|
||||
if not settings['genesis'] in blkmap:
|
||||
print("Genesis block not found in hashlist")
|
||||
else:
|
||||
BlockDataCopier(settings, blkindex, blkmap).run()
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue