Compare commits
No commits in common. "1.5alpha2" and "master" have entirely different histories.
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1 +1 @@
|
|||
src/version.cpp export-subst
|
||||
src/clientversion.cpp export-subst
|
||||
|
|
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
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
Normal file
30
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
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
Normal file
227
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,227 @@
|
|||
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
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
# 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
|
108
.gitignore
vendored
108
.gitignore
vendored
|
@ -1,37 +1,127 @@
|
|||
src/*.exe
|
||||
*.tar.gz
|
||||
|
||||
*.exe
|
||||
src/dogecoin
|
||||
src/dogecoind
|
||||
src/test_dogecoin
|
||||
src/dogecoin-cli
|
||||
src/dogecoin-tx
|
||||
src/test/test_dogecoin
|
||||
src/test/test_dogecoin_fuzzy
|
||||
src/qt/test/test_dogecoin-qt
|
||||
|
||||
# autoreconf
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
build-aux/ltmain.sh
|
||||
build-aux/m4/libtool.m4
|
||||
build-aux/m4/lt~obsolete.m4
|
||||
build-aux/m4/ltoptions.m4
|
||||
build-aux/m4/ltsugar.m4
|
||||
build-aux/m4/ltversion.m4
|
||||
build-aux/missing
|
||||
build-aux/compile
|
||||
build-aux/test-driver
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
libtool
|
||||
src/config/bitcoin-config.h
|
||||
src/config/bitcoin-config.h.in
|
||||
src/config/stamp-h1
|
||||
share/setup.nsi
|
||||
share/qt/Info.plist
|
||||
|
||||
src/univalue/gen
|
||||
|
||||
src/qt/*.moc
|
||||
src/qt/moc_*.cpp
|
||||
src/qt/forms/ui_*.h
|
||||
|
||||
src/qt/test/moc*.cpp
|
||||
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
.*.swp
|
||||
*.*~*
|
||||
*.bak
|
||||
*.rej
|
||||
*.orig
|
||||
*.pyc
|
||||
*.o
|
||||
*.o-*
|
||||
*.patch
|
||||
.dogecoin
|
||||
*.a
|
||||
*.pb.cc
|
||||
*.pb.h
|
||||
|
||||
*.log
|
||||
*.trs
|
||||
*.dmg
|
||||
|
||||
*.json.h
|
||||
*.raw.h
|
||||
|
||||
#libtool object files
|
||||
*.lo
|
||||
*.la
|
||||
|
||||
# Compilation and Qt preprocessor part
|
||||
*.qm
|
||||
Makefile
|
||||
dogecoin-qt
|
||||
Dogecoin-Qt.app
|
||||
Bitcoin-Qt.app
|
||||
|
||||
# Unit-tests
|
||||
Makefile.test
|
||||
dogecoin-qt_test
|
||||
src/test/buildenv.py
|
||||
|
||||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# Qt creator
|
||||
*.pro.user
|
||||
|
||||
# Mac specific
|
||||
.DS_Store
|
||||
build
|
||||
|
||||
# Windows specific
|
||||
Thumbs.db
|
||||
#lcov
|
||||
*.gcno
|
||||
*.gcda
|
||||
/*.info
|
||||
test_bitcoin.coverage/
|
||||
total.coverage/
|
||||
coverage_percent.txt
|
||||
|
||||
#build tests
|
||||
linux-coverage-build
|
||||
linux-build
|
||||
win32-build
|
||||
qa/pull-tester/tests_config.py
|
||||
qa/cache/*
|
||||
|
||||
!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
|
||||
|
|
7
.tx/config
Normal file
7
.tx/config
Normal file
|
@ -0,0 +1,7 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[bitcoin.qt-translation-014x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.ts
|
||||
source_file = src/qt/locale/bitcoin_en.ts
|
||||
source_lang = en
|
177
CONTRIBUTING.md
Normal file
177
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,177 @@
|
|||
# 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.
|
7
COPYING
7
COPYING
|
@ -1,6 +1,7 @@
|
|||
Copyright (c) 2009-2013 Bitcoin Developers
|
||||
Copyright (c) 2011-2013 Litecoin Developers
|
||||
Copyright (c) 2013-2014 Dogecoin Developers
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2017 The Bitcoin Core developers
|
||||
Copyright (c) 2013-2021 The Dogecoin 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
|
||||
|
|
9
INSTALL
9
INSTALL
|
@ -1,9 +0,0 @@
|
|||
Building Dogecoin
|
||||
|
||||
See doc/readme-qt.rst for instructions on building Dogecoin-Qt,
|
||||
the intended-for-end-users, nice-graphical-interface, reference
|
||||
implementation of Dogecoin.
|
||||
|
||||
See doc/build-*.txt for instructions on building dogecoind,
|
||||
the intended-for-services, no-graphical-interface, reference
|
||||
implementation of Dogecoin.
|
80
INSTALL.md
Normal file
80
INSTALL.md
Normal file
|
@ -0,0 +1,80 @@
|
|||
# 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.
|
236
Makefile.am
Normal file
236
Makefile.am
Normal file
|
@ -0,0 +1,236 @@
|
|||
# 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)
|
||||
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_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_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 \
|
||||
$(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) \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
|
||||
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
|
||||
|
||||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
|
||||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
|
||||
baseline_filtered.info rpc_test.info rpc_test_filtered.info \
|
||||
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
|
||||
|
||||
dist-hook:
|
||||
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||
|
||||
$(BITCOIN_WIN_INSTALLER): all-recursive
|
||||
$(MKDIR_P) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
|
||||
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
|
||||
@test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
|
||||
echo error: could not build $@
|
||||
@echo built $@
|
||||
|
||||
$(OSX_APP)/Contents/PkgInfo:
|
||||
$(MKDIR_P) $(@D)
|
||||
@echo "APPL????" > $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/dogecoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(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:
|
||||
$(MKDIR_P) $(@D)
|
||||
echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@
|
||||
|
||||
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/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 $@
|
||||
|
||||
deploydir: $(OSX_DMG)
|
||||
else
|
||||
APP_DIST_DIR=$(top_builddir)/dist
|
||||
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
|
||||
|
||||
$(APP_DIST_DIR)/Applications:
|
||||
@rm -f $@
|
||||
@cd $(@D); $(LN_S) /Applications $(@F)
|
||||
|
||||
$(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
|
||||
|
||||
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)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@
|
||||
|
||||
$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
|
||||
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"
|
||||
|
||||
$(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
|
||||
|
||||
deploydir: $(APP_DIST_EXTRAS)
|
||||
endif
|
||||
|
||||
if TARGET_DARWIN
|
||||
appbundle: $(OSX_APP_BUILT)
|
||||
deploy: $(OSX_DMG)
|
||||
endif
|
||||
if TARGET_WINDOWS
|
||||
deploy: $(BITCOIN_WIN_INSTALLER)
|
||||
endif
|
||||
|
||||
$(BITCOIN_QT_BIN): FORCE
|
||||
$(MAKE) -C src qt/$(@F)
|
||||
|
||||
$(BITCOIND_BIN): FORCE
|
||||
$(MAKE) -C src $(@F)
|
||||
|
||||
$(BITCOIN_CLI_BIN): FORCE
|
||||
$(MAKE) -C src $(@F)
|
||||
|
||||
if USE_LCOV
|
||||
|
||||
baseline.info:
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
|
||||
|
||||
baseline_filtered.info: baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
leveldb_baseline.info: baseline_filtered.info
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
|
||||
|
||||
leveldb_baseline_filtered.info: leveldb_baseline.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
|
||||
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
|
||||
|
||||
test_bitcoin.info: baseline_filtered_combined.info
|
||||
$(MAKE) -C src/ check
|
||||
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
test_bitcoin_filtered.info: test_bitcoin.info
|
||||
$(LCOV) -r $< "/usr/include/*" -o $@
|
||||
|
||||
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 $@
|
||||
$(LCOV) -z -d $(abs_builddir)/src
|
||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||
|
||||
rpc_test_filtered.info: rpc_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
|
||||
|
||||
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
total.coverage/.dirstamp: total_coverage.info
|
||||
$(GENHTML) -s $< -o $(@D)
|
||||
@touch $@
|
||||
|
||||
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
|
||||
|
||||
endif
|
||||
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
||||
|
||||
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)
|
||||
|
||||
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__
|
139
README.md
139
README.md
|
@ -1,60 +1,105 @@
|
|||
# Dogecoin [DOGE, Ð] Integration/Staging Tree
|
||||
http://dogecoin.com/
|
||||
<h1 align="center">
|
||||
Dogecoin Core [DOGE, Ð]
|
||||
<br/><br/>
|
||||
<img src="https://static.tumblr.com/ppdj5y9/Ae9mxmxtp/300coin.png" alt="Dogecoin" width="300"/>
|
||||
</h1>
|
||||
|
||||
![DogeCoin](http://static.tumblr.com/ppdj5y9/Ae9mxmxtp/300coin.png)
|
||||
<div align="center">
|
||||
|
||||
## What is DogeCoin? - Such coin
|
||||
Dogecoin is like Bitcoin, but based on Litecoin, and also much more wow.
|
||||
http://dogecoin.com/
|
||||
[![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)
|
||||
|
||||
## 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.
|
||||
</div>
|
||||
|
||||
## Development and contributions - omg developers
|
||||
Developers work in their own trees, then submit pull requests when they think
|
||||
their feature or bug fix is ready.
|
||||
Select language: EN | [CN](./README_zh_CN.md)
|
||||
|
||||
## Very Much Frequently Asked Questions
|
||||
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.
|
||||
|
||||
### How much doge can exist?
|
||||
Total of 100,000,000,000 much coins
|
||||
For information about the default fees used on the Dogecoin network, please
|
||||
refer to the [fee recommendation](doc/fee-recommendation.md).
|
||||
|
||||
### How get doge?
|
||||
Scrypt Proof of Work
|
||||
**Website:** [dogecoin.com](https://dogecoin.com)
|
||||
|
||||
1 Minute Block Targets, 4 Hour Diff Readjustments
|
||||
## Usage 💻
|
||||
|
||||
Special reward system: Random block rewards
|
||||
To start your journey with Dogecoin Core, see the [installation guide](INSTALL.md) and the [getting started](doc/getting-started.md) tutorial.
|
||||
|
||||
1-100,000: 0-1,000,000 Dogecoin Reward
|
||||
|
||||
100,001 — 200,000: 0-500,000 Dogecoin Reward
|
||||
|
||||
200,001 — 300,000: 0-250,000 Dogecoin Reward
|
||||
|
||||
300,001 — 400,000: 0-125,000 Dogecoin Reward
|
||||
|
||||
400,001 — 500,000: 0-62,500 Dogecoin Reward
|
||||
|
||||
500,001 - 600,000: 0-31,250 Dogecoin Reward
|
||||
|
||||
600,000+ — 10,000 Reward (flat)
|
||||
|
||||
### Wow plz make dogecoind
|
||||
|
||||
sudo apt-get install build-essential \
|
||||
libssl-dev \
|
||||
libdb5.1++-dev \
|
||||
libboost-all-dev \
|
||||
libqrencode-dev \
|
||||
libminiupnpc-dev
|
||||
|
||||
cd src/
|
||||
make -f makefile.unix USE_UPNP=1 USE_IPV6=1 USE_QRCODE=1
|
||||
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
|
||||
RPC 22555
|
||||
P2P 22556
|
||||
|
||||
![](http://dogesay.com/wow//////such/coin)
|
||||
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 numbers are following ```major.minor.patch``` semantics.
|
||||
|
||||
### 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.*
|
||||
|
||||
## Contributing 🤝
|
||||
|
||||
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+).
|
||||
|
||||
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.
|
||||
|
||||
## Communities 🚀🍾
|
||||
|
||||
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.
|
||||
|
||||
Here are some places to visit:
|
||||
|
||||
* [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)
|
||||
|
||||
## Very Much Frequently Asked Questions ❓
|
||||
|
||||
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!
|
||||
|
||||
## 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)
|
||||
|
|
125
README_zh_CN.md
Normal file
125
README_zh_CN.md
Normal file
|
@ -0,0 +1,125 @@
|
|||
# 狗狗币核心 (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文件中。
|
15
autogen.sh
Executable file
15
autogen.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/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"
|
||||
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
|
291
build-aux/m4/ax_boost_base.m4
Normal file
291
build-aux/m4/ax_boost_base.m4
Normal file
|
@ -0,0 +1,291 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the
|
||||
# $BOOST_ROOT environment variable. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Peter Adolphs
|
||||
#
|
||||
# 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 27
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
AC_ARG_WITH([boost],
|
||||
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
|
||||
[use Boost library from a standard location (ARG=yes),
|
||||
from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name)
|
||||
fi
|
||||
],
|
||||
[ac_boost_lib_path=""]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
||||
succeeded=no
|
||||
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
|
||||
case ${host_cpu} in
|
||||
i?86)
|
||||
libsubdirs="lib/i386-${host_os} $libsubdirs"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl some arches may advertise a cpu type that doesn't line up with their
|
||||
dnl prefix's cpu type. For example, uname may report armv7l while libs are
|
||||
dnl installed to /usr/lib/arm-linux-gnueabihf. Try getting the compiler's
|
||||
dnl value for an extra chance of finding the correct path.
|
||||
libsubdirs="lib/`$CXX -dumpmachine 2>/dev/null` $libsubdirs"
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
|
||||
|
||||
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
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
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
|
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
|
||||
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
])
|
119
build-aux/m4/ax_boost_chrono.m4
Normal file
119
build-aux/m4/ax_boost_chrono.m4
Normal file
|
@ -0,0 +1,119 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_CHRONO
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for System library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CHRONO_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_CHRONO
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2012 Xiyue Deng <manphiz@gmail.com>
|
||||
#
|
||||
# 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 1
|
||||
|
||||
AC_DEFUN([AX_BOOST_CHRONO],
|
||||
[
|
||||
AC_ARG_WITH([boost-chrono],
|
||||
AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@],
|
||||
[use the Chrono library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-chrono=boost_chrono-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_chrono_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_chrono_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Chrono library is available,
|
||||
ax_cv_boost_chrono,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
|
||||
[[boost::chrono::system_clock::time_point time;]])],
|
||||
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_chrono" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
if test "x$ax_boost_user_chrono_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
if test "x$link_chrono" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
|
||||
[link_chrono="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_chrono library!)
|
||||
fi
|
||||
if test "x$link_chrono" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
119
build-aux/m4/ax_boost_filesystem.m4
Normal file
119
build-aux/m4/ax_boost_filesystem.m4
Normal file
|
@ -0,0 +1,119 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_FILESYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Filesystem library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_FILESYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_FILESYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
|
||||
#
|
||||
# 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 26
|
||||
|
||||
AC_DEFUN([AX_BOOST_FILESYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-filesystem],
|
||||
AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
|
||||
[use the Filesystem library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
LIBS_SAVED=$LIBS
|
||||
LIBS="$LIBS $BOOST_SYSTEM_LIB"
|
||||
export LIBS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
|
||||
ax_cv_boost_filesystem,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
|
||||
[[using namespace boost::filesystem;
|
||||
path my_path( "foo/bar/data.txt" );
|
||||
return 0;]])],
|
||||
ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_filesystem" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
ax_lib=
|
||||
if test "x$ax_boost_user_filesystem_lib" = "x"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_filesystem library!)
|
||||
fi
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
LIBS="$LIBS_SAVED"
|
||||
fi
|
||||
])
|
108
build-aux/m4/ax_boost_program_options.m4
Normal file
108
build-aux/m4/ax_boost_program_options.m4
Normal file
|
@ -0,0 +1,108 @@
|
|||
# ============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_PROGRAM_OPTIONS
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for program options library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_PROGRAM_OPTIONS
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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 24
|
||||
|
||||
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
||||
[
|
||||
AC_ARG_WITH([boost-program-options],
|
||||
AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
|
||||
[use the program options library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
export want_boost
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
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>
|
||||
]],
|
||||
[[boost::program_options::error err("Error message");
|
||||
return 0;]])],
|
||||
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "$ax_cv_boost_program_options" = yes; then
|
||||
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
|
||||
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,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_program_options library!)
|
||||
fi
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
AC_MSG_ERROR([Could not link against [$ax_lib] !])
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
122
build-aux/m4/ax_boost_system.m4
Normal file
122
build-aux/m4/ax_boost_system.m4
Normal file
|
@ -0,0 +1,122 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for System library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
|
||||
#
|
||||
# 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 18
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-system],
|
||||
AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
|
||||
[use the System library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-system=boost_system-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::System library is available,
|
||||
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;]])],
|
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_system" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
if test "x$ax_boost_user_system_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
if test "x$link_system" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_system library!)
|
||||
fi
|
||||
if test "x$link_system" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
150
build-aux/m4/ax_boost_thread.m4
Normal file
150
build-aux/m4/ax_boost_thread.m4
Normal file
|
@ -0,0 +1,150 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_THREAD
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Thread library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_THREAD_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_THREAD
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
#
|
||||
# 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 27
|
||||
|
||||
AC_DEFUN([AX_BOOST_THREAD],
|
||||
[
|
||||
AC_ARG_WITH([boost-thread],
|
||||
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
|
||||
[use the Thread library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Thread library is available,
|
||||
ax_cv_boost_thread,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
CXXFLAGS="-pthreads $CXXFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
CXXFLAGS="-mthreads $CXXFLAGS"
|
||||
else
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
fi
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
||||
[[boost::thread_group thrds;
|
||||
return 0;]])],
|
||||
ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||
else
|
||||
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
LDFLAGS="-pthread $LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
if test "x$ax_boost_user_thread_lib" = "x"; then
|
||||
ax_lib=
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
if test "x$link_thread" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_thread library!)
|
||||
fi
|
||||
if test "x$link_thread" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
else
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
138
build-aux/m4/ax_boost_unit_test_framework.m4
Normal file
138
build-aux/m4/ax_boost_unit_test_framework.m4
Normal file
|
@ -0,0 +1,138 @@
|
|||
# ================================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
|
||||
# ================================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Unit_Test_Framework library from the Boost C++ libraries. The
|
||||
# macro requires a preceding call to AX_BOOST_BASE. Further documentation
|
||||
# is available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_UNIT_TEST_FRAMEWORK
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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 19
|
||||
|
||||
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
||||
[
|
||||
AC_ARG_WITH([boost-unit-test-framework],
|
||||
AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
|
||||
[use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
|
||||
ax_cv_boost_unit_test_framework,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
|
||||
[[using boost::unit_test::test_suite;
|
||||
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])],
|
||||
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
ax_lib=
|
||||
for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
|
||||
if test -r $monitor_library ; then
|
||||
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a.*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.dll* $BOOSTLIBDIR/boost_unit_test_framework*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
|
||||
[link_unit_test_framework="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
break;
|
||||
fi
|
||||
for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
|
||||
if test -r $unittest_library ; then
|
||||
libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the boost_unit_test_framework library!)
|
||||
fi
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
74
build-aux/m4/ax_check_compile_flag.m4
Normal file
74
build-aux/m4/ax_check_compile_flag.m4
Normal file
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# 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.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# 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
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
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()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
74
build-aux/m4/ax_check_link_flag.m4
Normal file
74
build-aux/m4/ax_check_link_flag.m4
Normal file
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the linker or gives an error.
|
||||
# (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
|
||||
# when the check is done. The check is thus made with the flags: "LDFLAGS
|
||||
# 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.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# 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
|
||||
|
||||
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
|
||||
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()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
LDFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_LINK_FLAGS
|
74
build-aux/m4/ax_check_preproc_flag.m4
Normal file
74
build-aux/m4/ax_check_preproc_flag.m4
Normal file
|
@ -0,0 +1,74 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's
|
||||
# preprocessor or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the preprocessor's default
|
||||
# flags when the check is done. The check is thus made with the flags:
|
||||
# "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.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# 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
|
||||
|
||||
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
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()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
CPPFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_PREPROC_FLAGS
|
568
build-aux/m4/ax_cxx_compile_stdcxx.m4
Normal file
568
build-aux/m4/ax_cxx_compile_stdcxx.m4
Normal file
|
@ -0,0 +1,568 @@
|
|||
# ===========================================================================
|
||||
# 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
|
||||
|
||||
]])
|
223
build-aux/m4/ax_gcc_func_attribute.m4
Normal file
223
build-aux/m4/ax_gcc_func_attribute.m4
Normal file
|
@ -0,0 +1,223 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks if the compiler supports one of GCC's function
|
||||
# attributes; many other compilers also provide function attributes with
|
||||
# the same syntax. Compiler warnings are used to detect supported
|
||||
# attributes as unsupported ones are ignored by default so quieting
|
||||
# warnings when using this macro will yield false positives.
|
||||
#
|
||||
# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
||||
#
|
||||
# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
||||
#
|
||||
# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
||||
# variable.
|
||||
#
|
||||
# The macro currently supports the following function attributes:
|
||||
#
|
||||
# alias
|
||||
# aligned
|
||||
# alloc_size
|
||||
# always_inline
|
||||
# artificial
|
||||
# cold
|
||||
# const
|
||||
# constructor
|
||||
# constructor_priority for constructor attribute with priority
|
||||
# deprecated
|
||||
# destructor
|
||||
# dllexport
|
||||
# dllimport
|
||||
# error
|
||||
# externally_visible
|
||||
# flatten
|
||||
# format
|
||||
# format_arg
|
||||
# gnu_inline
|
||||
# hot
|
||||
# ifunc
|
||||
# leaf
|
||||
# malloc
|
||||
# noclone
|
||||
# noinline
|
||||
# nonnull
|
||||
# noreturn
|
||||
# nothrow
|
||||
# optimize
|
||||
# pure
|
||||
# unused
|
||||
# used
|
||||
# visibility
|
||||
# warning
|
||||
# warn_unused_result
|
||||
# weak
|
||||
# weakref
|
||||
#
|
||||
# Unsuppored function attributes will be tested with a prototype returning
|
||||
# an int and not accepting any arguments and the result of the check might
|
||||
# be wrong or meaningless so use with care.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
||||
#
|
||||
# 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 3
|
||||
|
||||
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
|
||||
AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
m4_case([$1],
|
||||
[alias], [
|
||||
int foo( void ) { return 0; }
|
||||
int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[aligned], [
|
||||
int foo( void ) __attribute__(($1(32)));
|
||||
],
|
||||
[alloc_size], [
|
||||
void *foo(int a) __attribute__(($1(1)));
|
||||
],
|
||||
[always_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[artificial], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[cold], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[const], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[constructor_priority], [
|
||||
int foo( void ) __attribute__((__constructor__(65535/2)));
|
||||
],
|
||||
[constructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[deprecated], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[destructor], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[dllexport], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[dllimport], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[error], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[externally_visible], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[flatten], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[format], [
|
||||
int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
||||
],
|
||||
[format_arg], [
|
||||
char *foo(const char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[gnu_inline], [
|
||||
inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[hot], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[ifunc], [
|
||||
int my_foo( void ) { return 0; }
|
||||
static int (*resolve_foo(void))(void) { return my_foo; }
|
||||
int foo( void ) __attribute__(($1("resolve_foo")));
|
||||
],
|
||||
[leaf], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[malloc], [
|
||||
void *foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noclone], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[noinline], [
|
||||
__attribute__(($1)) int foo( void ) { return 0; }
|
||||
],
|
||||
[nonnull], [
|
||||
int foo(char *p) __attribute__(($1(1)));
|
||||
],
|
||||
[noreturn], [
|
||||
void foo( void ) __attribute__(($1));
|
||||
],
|
||||
[nothrow], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[optimize], [
|
||||
__attribute__(($1(3))) int foo( void ) { return 0; }
|
||||
],
|
||||
[pure], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[unused], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[used], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[visibility], [
|
||||
int foo_def( void ) __attribute__(($1("default")));
|
||||
int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
int foo_int( void ) __attribute__(($1("internal")));
|
||||
int foo_pro( void ) __attribute__(($1("protected")));
|
||||
],
|
||||
[warning], [
|
||||
int foo( void ) __attribute__(($1("")));
|
||||
],
|
||||
[warn_unused_result], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weak], [
|
||||
int foo( void ) __attribute__(($1));
|
||||
],
|
||||
[weakref], [
|
||||
static int foo( void ) { return 0; }
|
||||
static int bar( void ) __attribute__(($1("foo")));
|
||||
],
|
||||
[
|
||||
m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
||||
int foo( void ) __attribute__(($1));
|
||||
]
|
||||
)], [])
|
||||
],
|
||||
dnl GCC doesn't exit with an error if an unknown attribute is
|
||||
dnl provided but only outputs a warning, so accept the attribute
|
||||
dnl only if no warning were issued.
|
||||
[AS_IF([test -s conftest.err],
|
||||
[AS_VAR_SET([ac_var], [no])],
|
||||
[AS_VAR_SET([ac_var], [yes])])],
|
||||
[AS_VAR_SET([ac_var], [no])])
|
||||
])
|
||||
|
||||
AS_IF([test yes = AS_VAR_GET([ac_var])],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
||||
[Define to 1 if the system has the `$1' function attribute])], [])
|
||||
|
||||
AS_VAR_POPDEF([ac_var])
|
||||
])
|
485
build-aux/m4/ax_pthread.m4
Normal file
485
build-aux/m4/ax_pthread.m4
Normal file
|
@ -0,0 +1,485 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro figures out how to build C programs using POSIX threads. It
|
||||
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
||||
# flags that are needed. (The user can also force certain compiler
|
||||
# flags/libs to be tested by setting these environment variables.)
|
||||
#
|
||||
# Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||
# multi-threaded programs (defaults to the value of CC otherwise). (This
|
||||
# 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
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threaded programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
# 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).
|
||||
#
|
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||
# PTHREAD_CFLAGS.
|
||||
#
|
||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
||||
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
||||
# will define HAVE_PTHREAD.
|
||||
#
|
||||
# Please let the authors know if this macro fails on any platform, or if
|
||||
# you have any other suggestions or comments. This macro was based on work
|
||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
||||
# grateful for the helpful feedback of numerous users.
|
||||
#
|
||||
# Updated for Autoconf 2.68 by Daniel Richard G.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# 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
|
||||
|
||||
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).
|
||||
# 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"])
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
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_RESULT([$ax_pthread_ok])
|
||||
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"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
# names; the ordering is very important because some systems
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# Create a list of thread flags to try. Items starting with a "-" are
|
||||
# C compiler flags, and other items are library names, except for "none"
|
||||
# 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"
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
|
||||
# pthreads: AIX (must check this before -lpthread)
|
||||
# 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")
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# 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.])])
|
||||
;;
|
||||
|
||||
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).
|
||||
|
||||
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
|
||||
|
||||
AS_IF([test "x$GCC" = "xyes"],
|
||||
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
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"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
||||
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
|
||||
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"
|
||||
;;
|
||||
esac
|
||||
|
||||
ax_pthread_save_CFLAGS="$CFLAGS"
|
||||
ax_pthread_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
# need a special flag -Kthread to make this header compile.)
|
||||
# We check for pthread_join because it is in -lpthread on IRIX
|
||||
# while pthread_create is in libc. We check for pthread_attr_init
|
||||
# due to DEC craziness with -lpthreads. We check for
|
||||
# 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;
|
||||
pthread_create(&th, 0, start_routine, 0);
|
||||
pthread_join(th, 0);
|
||||
pthread_attr_init(&attr);
|
||||
pthread_cleanup_push(routine, 0);
|
||||
pthread_cleanup_pop(0) /* ; */])],
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
AC_MSG_RESULT([$ax_pthread_ok])
|
||||
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
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"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
|
||||
# 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_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_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])
|
||||
])
|
||||
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
|
||||
])
|
||||
|
||||
CFLAGS="$ax_pthread_save_CFLAGS"
|
||||
LIBS="$ax_pthread_save_LIBS"
|
||||
|
||||
# More AIX lossage: compile with *_r variant
|
||||
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])])])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
||||
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
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
|
||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
||||
:
|
||||
else
|
||||
ax_pthread_ok=no
|
||||
$2
|
||||
fi
|
||||
AC_LANG_POP
|
||||
])dnl AX_PTHREAD
|
78
build-aux/m4/bitcoin_find_bdb48.m4
Normal file
78
build-aux/m4/bitcoin_find_bdb48.m4
Normal file
|
@ -0,0 +1,78 @@
|
|||
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)
|
||||
])
|
517
build-aux/m4/bitcoin_qt.m4
Normal file
517
build-aux/m4/bitcoin_qt.m4
Normal file
|
@ -0,0 +1,517 @@
|
|||
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],[
|
||||
if test "x$bitcoin_qt_want_version" = "xauto" && test x$bitcoin_qt_force != xyes; then
|
||||
if test x$bitcoin_enable_qt != xno; then
|
||||
AC_MSG_WARN([$1; dogecoin-qt frontend will not be built])
|
||||
fi
|
||||
bitcoin_enable_qt=no
|
||||
bitcoin_enable_qt_test=no
|
||||
else
|
||||
AC_MSG_ERROR([$1])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BITCOIN_QT_CHECK],[
|
||||
if test "x$bitcoin_enable_qt" != "xno" && test x$bitcoin_qt_want_version != xno; then
|
||||
true
|
||||
$1
|
||||
else
|
||||
true
|
||||
$2
|
||||
fi
|
||||
])
|
||||
|
||||
dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing])
|
||||
dnl Helper for finding the path of programs needed for Qt.
|
||||
dnl Inputs: $1: Variable to be set
|
||||
dnl Inputs: $2: List of programs to search for
|
||||
dnl Inputs: $3: Look for $2 here before $PATH
|
||||
dnl Inputs: $4: If "yes", don't fail if $2 is not found.
|
||||
dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
|
||||
AC_DEFUN([BITCOIN_QT_PATH_PROGS],[
|
||||
BITCOIN_QT_CHECK([
|
||||
if test "x$3" != "x"; then
|
||||
AC_PATH_PROGS($1,$2,,$3)
|
||||
else
|
||||
AC_PATH_PROGS($1,$2)
|
||||
fi
|
||||
if test "x$$1" = "x" && test "x$4" != "xyes"; then
|
||||
BITCOIN_QT_FAIL([$1 not found])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
dnl Initialize qt input.
|
||||
dnl This must be called before any other BITCOIN_QT* macros to ensure that
|
||||
dnl input variables are set correctly.
|
||||
dnl CAUTION: Do not use this inside of a conditional.
|
||||
AC_DEFUN([BITCOIN_QT_INIT],[
|
||||
dnl enable qt support
|
||||
AC_ARG_WITH([gui],
|
||||
[AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
|
||||
[build bitcoin-qt GUI (default=auto, qt5 tried first)])],
|
||||
[
|
||||
bitcoin_qt_want_version=$withval
|
||||
if test x$bitcoin_qt_want_version = xyes; then
|
||||
bitcoin_qt_force=yes
|
||||
bitcoin_qt_want_version=auto
|
||||
fi
|
||||
],
|
||||
[bitcoin_qt_want_version=auto])
|
||||
|
||||
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
|
||||
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
|
||||
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
|
||||
AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], [])
|
||||
AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
|
||||
|
||||
AC_ARG_WITH([qtdbus],
|
||||
[AS_HELP_STRING([--with-qtdbus],
|
||||
[enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
|
||||
[use_dbus=$withval],
|
||||
[use_dbus=auto])
|
||||
|
||||
AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
|
||||
])
|
||||
|
||||
dnl Find the appropriate version of Qt libraries and includes.
|
||||
dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes.
|
||||
dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be
|
||||
dnl tried first.
|
||||
dnl Outputs: See _BITCOIN_QT_FIND_LIBS_*
|
||||
dnl Outputs: Sets variables for all qt-related tools.
|
||||
dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
|
||||
AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
use_pkgconfig=$1
|
||||
|
||||
if test x$use_pkgconfig = x; then
|
||||
use_pkgconfig=yes
|
||||
fi
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
|
||||
else
|
||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
||||
fi
|
||||
|
||||
dnl This is ugly and complicated. Yuck. Works as follows:
|
||||
dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
|
||||
dnl check a header to find out. When Qt is built statically, some plugins must
|
||||
dnl be linked into the final binary as well. These plugins have changed between
|
||||
dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
|
||||
dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
|
||||
dnl assumed for windows builds.
|
||||
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
|
||||
dnl results to QT_LIBS.
|
||||
BITCOIN_QT_CHECK([
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
_BITCOIN_QT_IS_STATIC
|
||||
if test x$bitcoin_cv_static_qt = xyes; then
|
||||
_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])
|
||||
fi
|
||||
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
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
|
||||
elif test x$TARGET_OS = xdarwin; then
|
||||
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
|
||||
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
|
||||
fi
|
||||
else
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
|
||||
Q_IMPORT_PLUGIN(qcncodecs)
|
||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
||||
Q_IMPORT_PLUGIN(qtwcodecs)
|
||||
Q_IMPORT_PLUGIN(qkrcodecs)
|
||||
Q_IMPORT_PLUGIN(AccessibleFactory)
|
||||
Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)],
|
||||
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets -lwindowsprintersupport])
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS=$TEMP_CPPFLAGS
|
||||
CXXFLAGS=$TEMP_CXXFLAGS
|
||||
])
|
||||
|
||||
if test x$use_pkgconfig$qt_bin_path = xyes; then
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
|
||||
fi
|
||||
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)
|
||||
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
|
||||
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
|
||||
|
||||
MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
|
||||
case $host in
|
||||
*darwin*)
|
||||
BITCOIN_QT_CHECK([
|
||||
MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"
|
||||
base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit"
|
||||
AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
|
||||
])
|
||||
;;
|
||||
*mingw*)
|
||||
BITCOIN_QT_CHECK([
|
||||
AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
|
||||
])
|
||||
esac
|
||||
|
||||
|
||||
dnl enable qt support
|
||||
AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI)
|
||||
BITCOIN_QT_CHECK([
|
||||
bitcoin_enable_qt=yes
|
||||
bitcoin_enable_qt_test=yes
|
||||
if test x$have_qt_test = xno; then
|
||||
bitcoin_enable_qt_test=no
|
||||
fi
|
||||
bitcoin_enable_qt_dbus=no
|
||||
if test x$use_dbus != xno && test x$have_qt_dbus = xyes; then
|
||||
bitcoin_enable_qt_dbus=yes
|
||||
fi
|
||||
if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
|
||||
AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.")
|
||||
fi
|
||||
if test x$LUPDATE = x; then
|
||||
AC_MSG_WARN("lupdate is required to update qt translations")
|
||||
fi
|
||||
],[
|
||||
bitcoin_enable_qt=no
|
||||
])
|
||||
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)
|
||||
AC_SUBST(QT_DBUS_INCLUDES)
|
||||
AC_SUBST(QT_DBUS_LIBS)
|
||||
AC_SUBST(QT_TEST_INCLUDES)
|
||||
AC_SUBST(QT_TEST_LIBS)
|
||||
AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
|
||||
AC_SUBST(MOC_DEFS)
|
||||
])
|
||||
|
||||
dnl All macros below are internal and should _not_ be used from the main
|
||||
dnl configure.ac.
|
||||
dnl ----
|
||||
|
||||
dnl Internal. Check if the included version of Qt is Qt5.
|
||||
dnl Requires: INCLUDES must be populated as necessary.
|
||||
dnl Output: bitcoin_cv_qt5=yes|no
|
||||
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
||||
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],
|
||||
[[
|
||||
#if QT_VERSION < 0x050000
|
||||
choke me
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_qt5=yes],
|
||||
[bitcoin_cv_qt5=no])
|
||||
])])
|
||||
|
||||
dnl Internal. Check if the linked version of Qt was built as static libs.
|
||||
dnl Requires: Qt5. This check cannot determine if Qt4 is static.
|
||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||
dnl Output: bitcoin_cv_static_qt=yes|no
|
||||
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
|
||||
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
|
||||
AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <QtCore>]],
|
||||
[[
|
||||
#if defined(QT_STATIC)
|
||||
return 0;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
]])],
|
||||
[bitcoin_cv_static_qt=yes],
|
||||
[bitcoin_cv_static_qt=no])
|
||||
])
|
||||
if test xbitcoin_cv_static_qt = xyes; then
|
||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Internal. Check if the link-requirements for static plugins are met.
|
||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||
dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
|
||||
dnl Inputs: $2: The libraries that resolve $1.
|
||||
dnl Output: QT_LIBS is prepended or configure exits.
|
||||
AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
|
||||
AC_MSG_CHECKING(for static Qt plugins: $2)
|
||||
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
|
||||
LIBS="$2 $QT_LIBS $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define QT_STATICPLUGIN
|
||||
#include <QtPlugin>
|
||||
$1]],
|
||||
[[return 0;]])],
|
||||
[AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
|
||||
[AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)])
|
||||
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.
|
||||
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
|
||||
dnl first.
|
||||
dnl Outputs: All necessary QT_* variables are set.
|
||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
|
||||
m4_ifdef([PKG_CHECK_MODULES],[
|
||||
auto_priority_version=$1
|
||||
if test x$auto_priority_version = x; then
|
||||
auto_priority_version=qt5
|
||||
fi
|
||||
if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
|
||||
QT_LIB_PREFIX=Qt5
|
||||
bitcoin_qt_got_major_vers=5
|
||||
else
|
||||
QT_LIB_PREFIX=Qt
|
||||
bitcoin_qt_got_major_vers=4
|
||||
fi
|
||||
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5PrintSupport"
|
||||
qt4_modules="QtCore QtGui QtNetwork"
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
|
||||
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes],[have_qt=no])
|
||||
elif test x$bitcoin_qt_want_version = xqt4 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt4 ); then
|
||||
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes], [have_qt=no])
|
||||
fi
|
||||
|
||||
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
|
||||
if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
|
||||
if test x$auto_priority_version = xqt5; then
|
||||
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
|
||||
else
|
||||
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
|
||||
fi
|
||||
fi
|
||||
if test x$have_qt != xyes; then
|
||||
have_qt=no
|
||||
BITCOIN_QT_FAIL([Qt dependencies not found])
|
||||
fi
|
||||
])
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_TEST], [${QT_LIB_PREFIX}Test], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no])
|
||||
if test x$use_dbus != xno; then
|
||||
PKG_CHECK_MODULES([QT_DBUS], [${QT_LIB_PREFIX}DBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no])
|
||||
fi
|
||||
])
|
||||
])
|
||||
true; dnl
|
||||
])
|
||||
|
||||
dnl Internal. Find Qt libraries without using pkg-config. Version is deduced
|
||||
dnl from the discovered headers.
|
||||
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
|
||||
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
|
||||
dnl Outputs: All necessary QT_* variables are set.
|
||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||
TEMP_LIBS="$LIBS"
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$qt_include_path != x; then
|
||||
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus -I$qt_include_path/QtPrintSupport"
|
||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))])
|
||||
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))])
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
if test x$bitcoin_qt_want_version = xauto; then
|
||||
_BITCOIN_QT_CHECK_QT5
|
||||
fi
|
||||
if test x$bitcoin_cv_qt5 = xyes || test x$bitcoin_qt_want_version = xqt5; then
|
||||
QT_LIB_PREFIX=Qt5
|
||||
bitcoin_qt_got_major_vers=5
|
||||
else
|
||||
QT_LIB_PREFIX=Qt
|
||||
bitcoin_qt_got_major_vers=4
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="$LIBS -L$qt_lib_path"
|
||||
fi
|
||||
|
||||
if test x$TARGET_OS = xwindows; then
|
||||
AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found))
|
||||
fi
|
||||
])
|
||||
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,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([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
|
||||
if test x$bitcoin_qt_got_major_vers = x5; then
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
|
||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PrintSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPrintSupport not found)))
|
||||
fi
|
||||
QT_LIBS="$LIBS"
|
||||
LIBS="$TEMP_LIBS"
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="-L$qt_lib_path"
|
||||
fi
|
||||
AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no)
|
||||
AC_CHECK_HEADER([QTest],, have_qt_test=no)
|
||||
QT_TEST_LIBS="$LIBS"
|
||||
if test x$use_dbus != xno; then
|
||||
LIBS=
|
||||
if test x$qt_lib_path != x; then
|
||||
LIBS="-L$qt_lib_path"
|
||||
fi
|
||||
AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no)
|
||||
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no)
|
||||
QT_DBUS_LIBS="$LIBS"
|
||||
fi
|
||||
])
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
LIBS="$TEMP_LIBS"
|
||||
])
|
||||
|
18
build-aux/m4/bitcoin_subdir_to_include.m4
Normal file
18
build-aux/m4/bitcoin_subdir_to_include.m4
Normal file
|
@ -0,0 +1,18 @@
|
|||
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],[
|
||||
if test "x$2" = "x"; then
|
||||
AC_MSG_RESULT([default])
|
||||
else
|
||||
echo "#include <$2$3.h>" >conftest.cpp
|
||||
newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
|
||||
AC_MSG_RESULT([${newinclpath}])
|
||||
if test "x${newinclpath}" != "x"; then
|
||||
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||||
fi
|
||||
fi
|
||||
])
|
66
build-aux/m4/dogecoin_find_bdb53.m4
Normal file
66
build-aux/m4/dogecoin_find_bdb53.m4
Normal file
|
@ -0,0 +1,66 @@
|
|||
AC_DEFUN([BITCOIN_FIND_BDB53],[
|
||||
AC_MSG_CHECKING([for Berkeley DB C++ headers])
|
||||
BDB_CPPFLAGS=
|
||||
BDB_LIBS=
|
||||
bdbpath=X
|
||||
bdb53path=X
|
||||
bdbdirlist=
|
||||
for _vn in 5.3 53 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 == 5 && DB_VERSION_MINOR >= 3) || DB_VERSION_MAJOR > 5)
|
||||
#error "failed to find bdb 5.3+"
|
||||
#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 == 5 && DB_VERSION_MINOR == 3)
|
||||
#error "failed to find bdb 5.3"
|
||||
#endif
|
||||
]])],[
|
||||
bdb53path="${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
|
||||
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_ERROR([Found Berkeley DB other than 5.3, 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}"
|
||||
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
|
||||
AC_CHECK_LIB([$searchlib],[main],[
|
||||
BDB_LIBS="-l${searchlib}"
|
||||
break
|
||||
])
|
||||
done
|
||||
if test "x$BDB_LIBS" = "x"; then
|
||||
AC_MSG_ERROR([libdb_cxx missing, Dogecoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
fi
|
||||
AC_SUBST(BDB_LIBS)
|
||||
])
|
46
build-aux/m4/l_atomic.m4
Normal file
46
build-aux/m4/l_atomic.m4
Normal file
|
@ -0,0 +1,46 @@
|
|||
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
|
||||
])
|
1213
configure.ac
Normal file
1213
configure.ac
Normal file
File diff suppressed because it is too large
Load diff
53
contrib/README.md
Normal file
53
contrib/README.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
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.
|
||||
|
||||
### [Verify-Commits](/contrib/verify-commits) ###
|
||||
Tool to verify that every merge commit was signed by a developer using the above `github-merge.py` script.
|
||||
|
||||
### [Linearize](/contrib/linearize) ###
|
||||
Construct a linear, no-fork, best version of the blockchain.
|
||||
|
||||
### [Qos](/contrib/qos) ###
|
||||
|
||||
A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Dogecoin network. This means one can have an always-on dogecoind instance running, and another local dogecoind/dogecoin-qt instance which connects to this node and receives blocks from it.
|
||||
|
||||
### [Seeds](/contrib/seeds) ###
|
||||
Utility to generate the pnSeed[] array that is compiled into the client.
|
||||
|
||||
Build Tools and Keys
|
||||
---------------------
|
||||
|
||||
### [Debian](/contrib/debian) ###
|
||||
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.
|
||||
|
||||
### [Gitian-keys](/contrib/gitian-keys)
|
||||
PGP keys used for signing Dogecoin Core [Gitian release](/doc/release-process.md) results.
|
||||
|
||||
### [MacDeploy](/contrib/macdeploy) ###
|
||||
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
|
||||
---------------------
|
||||
|
||||
### [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.
|
26
contrib/bitcoin-qt.pro
Normal file
26
contrib/bitcoin-qt.pro
Normal file
|
@ -0,0 +1,26 @@
|
|||
FORMS += \
|
||||
../src/qt/forms/aboutdialog.ui \
|
||||
../src/qt/forms/addressbookpage.ui \
|
||||
../src/qt/forms/askpassphrasedialog.ui \
|
||||
../src/qt/forms/coincontroldialog.ui \
|
||||
../src/qt/forms/editaddressdialog.ui \
|
||||
../src/qt/forms/helpmessagedialog.ui \
|
||||
../src/qt/forms/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/sendcoinsdialog.ui \
|
||||
../src/qt/forms/sendcoinsentry.ui \
|
||||
../src/qt/forms/signverifymessagedialog.ui \
|
||||
../src/qt/forms/transactiondescdialog.ui \
|
||||
|
||||
RESOURCES += \
|
||||
../src/qt/bitcoin.qrc
|
||||
|
||||
|
||||
QT += \
|
||||
printsupport
|
|
@ -1,115 +0,0 @@
|
|||
# bash programmable completion for bitcoind(1)
|
||||
# Copyright (c) 2012 Christian von Roques <roques@mti.ag>
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
have bitcoind && {
|
||||
|
||||
# call $bitcoind for RPC
|
||||
_bitcoin_rpc() {
|
||||
# determine already specified args necessary for RPC
|
||||
local rpcargs=()
|
||||
for i in ${COMP_LINE}; do
|
||||
case "$i" in
|
||||
-conf=*|-proxy*|-rpc*)
|
||||
rpcargs=( "${rpcargs[@]}" "$i" )
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$bitcoind "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add bitcoin accounts to COMPREPLY
|
||||
_bitcoin_accounts() {
|
||||
local accounts
|
||||
accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
||||
}
|
||||
|
||||
_bitcoind() {
|
||||
local cur prev words=() cword
|
||||
local bitcoind
|
||||
|
||||
# save and use original argument to invoke bitcoind
|
||||
# bitcoind might not be in $PATH
|
||||
bitcoind="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
if ((cword > 2)); then
|
||||
case ${words[cword-2]} in
|
||||
listreceivedbyaccount|listreceivedbyaddress)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
setgenerate)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
|
||||
_bitcoin_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
-*=*) # prevent nonsense completions
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
local helpopts commands
|
||||
|
||||
# only parse --help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
fi
|
||||
|
||||
# only parse help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
||||
commands=$(_bitcoin_rpc help 2>/dev/null | awk '{ print $1; }')
|
||||
fi
|
||||
|
||||
COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F _bitcoind bitcoind
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
|
@ -1,324 +0,0 @@
|
|||
from jsonrpc import ServiceProxy
|
||||
import sys
|
||||
import string
|
||||
|
||||
# ===== 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:9332")
|
||||
else:
|
||||
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:9332")
|
||||
cmd = sys.argv[1].lower()
|
||||
|
||||
if cmd == "backupwallet":
|
||||
try:
|
||||
path = raw_input("Enter destination path/filename: ")
|
||||
print access.backupwallet(path)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getaccount":
|
||||
try:
|
||||
addr = raw_input("Enter a Bitcoin address: ")
|
||||
print access.getaccount(addr)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getaccountaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaccountaddress(acct)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getaddressesbyaccount":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
print access.getaddressesbyaccount(acct)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getblockbycount":
|
||||
try:
|
||||
height = raw_input("Height: ")
|
||||
print access.getblockbycount(height)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getblockcount":
|
||||
try:
|
||||
print access.getblockcount()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getblocknumber":
|
||||
try:
|
||||
print access.getblocknumber()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getconnectioncount":
|
||||
try:
|
||||
print access.getconnectioncount()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getdifficulty":
|
||||
try:
|
||||
print access.getdifficulty()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getgenerate":
|
||||
try:
|
||||
print access.getgenerate()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "gethashespersec":
|
||||
try:
|
||||
print access.gethashespersec()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getinfo":
|
||||
try:
|
||||
print access.getinfo()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getnewaddress":
|
||||
try:
|
||||
acct = raw_input("Enter an account name: ")
|
||||
try:
|
||||
print access.getnewaddress(acct)
|
||||
except:
|
||||
print access.getnewaddress()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "gettransaction":
|
||||
try:
|
||||
txid = raw_input("Enter a transaction ID: ")
|
||||
print access.gettransaction(txid)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "getwork":
|
||||
try:
|
||||
data = raw_input("Data (optional): ")
|
||||
try:
|
||||
print access.gettransaction(data)
|
||||
except:
|
||||
print access.gettransaction()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "help":
|
||||
try:
|
||||
cmd = raw_input("Command (optional): ")
|
||||
try:
|
||||
print access.help(cmd)
|
||||
except:
|
||||
print access.help()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "listaccounts":
|
||||
try:
|
||||
mc = raw_input("Minimum confirmations (optional): ")
|
||||
try:
|
||||
print access.listaccounts(mc)
|
||||
except:
|
||||
print access.listaccounts()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "setaccount":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
acct = raw_input("Account:")
|
||||
print access.setaccount(addr,acct)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
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:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "settxfee":
|
||||
try:
|
||||
amt = raw_input("Amount:")
|
||||
print access.settxfee(amt)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "stop":
|
||||
try:
|
||||
print access.stop()
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "validateaddress":
|
||||
try:
|
||||
addr = raw_input("Address: ")
|
||||
print access.validateaddress(addr)
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "walletpassphrase":
|
||||
try:
|
||||
pwd = raw_input("Enter wallet passphrase: ")
|
||||
access.walletpassphrase(pwd, 60)
|
||||
print "\n---Wallet unlocked---\n"
|
||||
except:
|
||||
print "\n---An error occurred---\n"
|
||||
|
||||
elif cmd == "walletpassphrasechange":
|
||||
try:
|
||||
pwd = raw_input("Enter old wallet passphrase: ")
|
||||
pwd2 = raw_input("Enter new wallet passphrase: ")
|
||||
access.walletpassphrasechange(pwd, pwd2)
|
||||
print
|
||||
print "\n---Passphrase changed---\n"
|
||||
except:
|
||||
print
|
||||
print "\n---An error occurred---\n"
|
||||
print
|
||||
|
||||
else:
|
||||
print "Command not found or not supported"
|
|
@ -1,20 +0,0 @@
|
|||
This directory contains files used to package bitcoind/bitcoin-qt
|
||||
for Debian-based Linux systems.
|
||||
|
||||
If you compile bitcoind/bitcoin-qt yourself, there are some
|
||||
useful files here:
|
||||
|
||||
bitcoin: URI support
|
||||
--------------------
|
||||
|
||||
bitcoin-qt.desktop (Gnome / Open Desktop)
|
||||
To install:
|
||||
sudo desktop-file-install bitcoin-qt.desktop
|
||||
sudo update-desktop-database
|
||||
|
||||
If you build yourself, you will either need to modify the paths in
|
||||
the .desktop file or copy or symlink your bitcoin-qt binary to /usr/bin
|
||||
and the ../../share/pixmaps/bitcoin128.png to /usr/share/pixmaps
|
||||
|
||||
bitcoin-qt.protocol (KDE)
|
||||
|
21
contrib/debian/README.md
Normal file
21
contrib/debian/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
Debian
|
||||
====================
|
||||
This directory 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.
|
||||
|
||||
## dogecoin: URI support ##
|
||||
|
||||
|
||||
dogecoin-qt.desktop (Gnome / Open Desktop)
|
||||
To install:
|
||||
|
||||
sudo desktop-file-install dogecoin-qt.desktop
|
||||
sudo update-desktop-database
|
||||
|
||||
If you build yourself, you will either need to modify the paths in
|
||||
the .desktop file or copy or symlink your dogecoin-qt binary to `/usr/bin`
|
||||
and the `../../share/pixmaps/dogecoin128.png` to `/usr/share/pixmaps`
|
||||
|
||||
dogecoin-qt.protocol (KDE)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Bitcoin
|
||||
Comment=Bitcoin P2P Cryptocurrency
|
||||
Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
|
||||
Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
|
||||
Exec=/usr/bin/bitcoin-qt %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=/usr/share/pixmaps/bitcoin128.png
|
||||
MimeType=x-scheme-handler/bitcoin;
|
||||
Categories=Office;
|
|
@ -1,6 +0,0 @@
|
|||
bitcoin-qt usr/bin
|
||||
share/pixmaps/bitcoin32.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin16.xpm usr/share/pixmaps
|
||||
share/pixmaps/bitcoin128.png usr/share/pixmaps
|
||||
debian/bitcoin-qt.desktop usr/share/applications
|
||||
debian/bitcoin-qt.protocol usr/share/kde4/services/
|
|
@ -1 +0,0 @@
|
|||
contrib/bitcoind.bash-completion bitcoind
|
|
@ -1 +0,0 @@
|
|||
debian/examples/bitcoin.conf
|
|
@ -1 +0,0 @@
|
|||
src/bitcoind usr/bin
|
|
@ -1,2 +0,0 @@
|
|||
debian/manpages/bitcoind.1
|
||||
debian/manpages/bitcoin.conf.5
|
|
@ -1,3 +1,214 @@
|
|||
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.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 18 Feb 2015 13:22:00 -1000
|
||||
|
||||
bitcoin (0.9.4-precise1) precise; urgency=high
|
||||
|
||||
* New upstream releases.
|
||||
|
||||
-- Matt Corallo (laptop - only while traveling) <matt@mattcorallo.com> Mon, 12 Jan 2015 23:30:00 -1000
|
||||
|
||||
bitcoin (0.9.3-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream releases.
|
||||
|
||||
-- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 26 Sep 2014 12:01:00 -0700
|
||||
|
||||
bitcoin (0.9.1-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Backport pull #4019
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sat, 19 Apr 2014 17:29:00 -0400
|
||||
|
||||
bitcoin (0.9.0-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Thu, 20 Mar 2014 13:10:00 -0400
|
||||
|
||||
bitcoin (0.8.6-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Make .desktop paths non-fixed (suggested by prusnak@github)
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Fri, 13 Dec 2013 13:31:00 -0400
|
||||
|
||||
bitcoin (0.8.5-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Sun, 15 Sep 2013 14:02:00 -0400
|
||||
|
||||
bitcoin (0.8.4-precise1) precise; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 4 Sep 2013 10:25:00 -0400
|
||||
|
||||
bitcoin (0.8.3-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 26 Jun 2013 00:18:00 +0100
|
||||
|
||||
bitcoin (0.8.2-natty1) natty; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matt Corallo <matt@bluematt.me> Wed, 29 Mar 2013 23:23:00 +0100
|
||||
|
||||
bitcoin (0.8.1-natty3) natty; urgency=low
|
||||
|
||||
* New pixmaps
|
||||
|
|
|
@ -1,55 +1,73 @@
|
|||
Source: bitcoin
|
||||
Source: dogecoin
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Jonas Smedegaard <dr@jones.dk>
|
||||
Uploaders: Micah Anderson <micah@debian.org>
|
||||
Maintainer: Matt Corallo <matt@mattcorallo.com>
|
||||
Uploaders: Matt Corallo <matt@mattcorallo.com>
|
||||
Build-Depends: debhelper,
|
||||
devscripts,
|
||||
automake,
|
||||
libtool,
|
||||
bash-completion,
|
||||
libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
|
||||
libdb4.8++-dev,
|
||||
libssl-dev,
|
||||
pkg-config,
|
||||
libminiupnpc8-dev,
|
||||
libboost-filesystem-dev (>> 1.35) | libboost-filesystem1.35-dev,
|
||||
libboost-program-options-dev (>> 1.35) | libboost-program-options1.35-dev,
|
||||
libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev,
|
||||
libboost-test-dev (>> 1.35) | libboost-test1.35-dev,
|
||||
qt4-qmake,
|
||||
libqt4-dev,
|
||||
libqrencode-dev
|
||||
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,
|
||||
libqrencode-dev,
|
||||
libprotobuf-dev, protobuf-compiler,
|
||||
python,
|
||||
libzmq3-dev
|
||||
Standards-Version: 3.9.2
|
||||
Homepage: http://www.bitcoin.org/
|
||||
Vcs-Git: git://github.com/bitcoin/bitcoin.git
|
||||
Vcs-Browser: http://github.com/bitcoin/bitcoin
|
||||
Homepage: http://www.dogecoin.com/
|
||||
Vcs-Git: git://github.com/dogecoin/dogecoin.git
|
||||
Vcs-Browser: http://github.com/dogecoin/dogecoin
|
||||
|
||||
Package: bitcoind
|
||||
Package: dogecoind
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: peer-to-peer network based digital currency - daemon
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that
|
||||
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 2+ GB of space, slowly growing.
|
||||
requires 20+ GB of space, slowly growing.
|
||||
.
|
||||
This package provides bitcoind, a combined daemon and CLI tool to
|
||||
interact with the daemon.
|
||||
This package provides the daemon, dogecoind, and the CLI tool
|
||||
dogecoin-cli to interact with the daemon.
|
||||
|
||||
Package: bitcoin-qt
|
||||
Package: dogecoin-qt
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: peer-to-peer network based digital currency - Qt GUI
|
||||
Bitcoin is a free open source peer-to-peer electronic cash system that
|
||||
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 2+ GB of space, slowly growing.
|
||||
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.
|
||||
.
|
||||
This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
|
||||
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.
|
||||
|
|
|
@ -1,87 +1,90 @@
|
|||
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Bitcoin
|
||||
Upstream-Contact: Satoshi Nakamoto <satoshin@gmx.com>
|
||||
irc://#bitcoin@freenode.net
|
||||
Source: http://sourceforge.net/projects/bitcoin/files/
|
||||
https://github.com/bitcoin/bitcoin
|
||||
Source: https://github.com/bitcoin/bitcoin
|
||||
|
||||
Files: *
|
||||
Copyright: 2009-2012, Bitcoin Developers
|
||||
Copyright: 2009-2017, Bitcoin Core Developers
|
||||
License: Expat
|
||||
Comment: The Bitcoin Developers encompasses the current developers listed on bitcoin.org,
|
||||
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: src/strlcpy.h
|
||||
Copyright: 1998, Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
License: ISC
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
|
||||
2011, Matt Corallo <matt@bluematt.me>
|
||||
License: GPL-2+
|
||||
|
||||
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
|
||||
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
|
||||
License: Expat
|
||||
|
||||
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/
|
||||
Comment: Site: https://github.com/stephenhutchings/typicons.font
|
||||
|
||||
Files: src/qt/res/icons/connect*.png
|
||||
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/transaction*.png
|
||||
Copyright: md2k7
|
||||
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: Site: https://bitcointalk.org/index.php?topic=15276.0
|
||||
Comment: Inspired by 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/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
|
||||
License: Expat
|
||||
Comment:
|
||||
|
||||
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
|
||||
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/about.png
|
||||
src/qt/res/icons/bitcoin.*
|
||||
share/pixmaps/bitcoin*
|
||||
src/qt/res/src/bitcoin.svg
|
||||
Copyright: Bitboy, Jonas Schnelli
|
||||
License: public-domain
|
||||
Comment: Site: https://bitcointalk.org/?topic=1756.0
|
||||
|
||||
Files: scripts/img/reload.xcf, src/qt/res/movies/update_spinner.mng
|
||||
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
|
||||
|
@ -103,20 +106,6 @@ 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
|
||||
|
@ -145,22 +134,5 @@ 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: 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
|
||||
License: public-domain
|
||||
This work is in the public domain.
|
||||
|
|
12
contrib/debian/dogecoin-qt.desktop
Normal file
12
contrib/debian/dogecoin-qt.desktop
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Name=Dogecoin Core
|
||||
Comment=Connect to the Dogecoin P2P Network
|
||||
Comment[de]=Verbinde mit dem Dogecoin peer-to-peer Netzwerk
|
||||
Comment[fr]=Dogecoin, monnaie virtuelle cryptographique pair à pair
|
||||
Comment[tr]=Dogecoin, eşten eşe kriptografik sanal para birimi
|
||||
Exec=dogecoin-qt %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=dogecoin128
|
||||
MimeType=x-scheme-handler/dogecoin;
|
||||
Categories=Office;Finance;
|
6
contrib/debian/dogecoin-qt.install
Normal file
6
contrib/debian/dogecoin-qt.install
Normal file
|
@ -0,0 +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
|
||||
debian/dogecoin-qt.desktop usr/share/applications
|
||||
debian/dogecoin-qt.protocol usr/share/kde4/services/
|
|
@ -1,2 +1,2 @@
|
|||
# Linked code is Expat - only Debian packaging is GPL-2+
|
||||
bitcoin-qt: possible-gpl-code-linked-with-openssl
|
||||
dogecoin-qt: possible-gpl-code-linked-with-openssl
|
1
contrib/debian/dogecoin-qt.manpages
Normal file
1
contrib/debian/dogecoin-qt.manpages
Normal file
|
@ -0,0 +1 @@
|
|||
doc/man/dogecoin-qt.1
|
|
@ -1,6 +1,6 @@
|
|||
[Protocol]
|
||||
exec=bitcoin-qt '%u'
|
||||
protocol=bitcoin
|
||||
exec=dogecoin-qt '%u'
|
||||
protocol=dogecoin
|
||||
input=none
|
||||
output=none
|
||||
helper=true
|
1
contrib/debian/dogecoin-tx.bash-completion
Normal file
1
contrib/debian/dogecoin-tx.bash-completion
Normal file
|
@ -0,0 +1 @@
|
|||
contrib/dogecoin-tx.bash-completion dogecoin-tx
|
1
contrib/debian/dogecoin-tx.install
Normal file
1
contrib/debian/dogecoin-tx.install
Normal file
|
@ -0,0 +1 @@
|
|||
usr/local/bin/dogecoin-tx usr/bin
|
1
contrib/debian/dogecoin-tx.manpages
Normal file
1
contrib/debian/dogecoin-tx.manpages
Normal file
|
@ -0,0 +1 @@
|
|||
doc/man/dogecoin-tx.1
|
2
contrib/debian/dogecoind.bash-completion
Normal file
2
contrib/debian/dogecoind.bash-completion
Normal file
|
@ -0,0 +1,2 @@
|
|||
contrib/dogecoind.bash-completion dogecoind
|
||||
contrib/dogecoin-cli.bash-completion dogecoin-cli
|
1
contrib/debian/dogecoind.examples
Normal file
1
contrib/debian/dogecoind.examples
Normal file
|
@ -0,0 +1 @@
|
|||
debian/examples/dogecoin.conf
|
2
contrib/debian/dogecoind.install
Normal file
2
contrib/debian/dogecoind.install
Normal file
|
@ -0,0 +1,2 @@
|
|||
usr/local/bin/dogecoind usr/bin
|
||||
usr/local/bin/dogecoin-cli usr/bin
|
|
@ -1,2 +1,2 @@
|
|||
# Linked code is Expat - only Debian packaging is GPL-2+
|
||||
bitcoind: possible-gpl-code-linked-with-openssl
|
||||
dogecoind: possible-gpl-code-linked-with-openssl
|
2
contrib/debian/dogecoind.manpages
Normal file
2
contrib/debian/dogecoind.manpages
Normal file
|
@ -0,0 +1,2 @@
|
|||
doc/man/dogecoind.1
|
||||
doc/man/dogecoin-cli.1
|
|
@ -1,84 +0,0 @@
|
|||
# bitcoin.conf configuration file. Lines beginning with # are comments.
|
||||
|
||||
|
||||
# Network-related settings:
|
||||
|
||||
# Run on the test network instead of the real bitcoin network.
|
||||
#testnet=1
|
||||
|
||||
# Connect via a socks4 proxy
|
||||
#proxy=127.0.0.1:9050
|
||||
|
||||
# Use as many addnode= settings as you like to connect to specific peers
|
||||
#addnode=69.164.218.197
|
||||
#addnode=10.0.0.2:9333
|
||||
|
||||
# ... or use as many connect= settings as you like to connect ONLY
|
||||
# to specific peers:
|
||||
#connect=69.164.218.197
|
||||
#connect=10.0.0.1:9333
|
||||
|
||||
# Maximum number of inbound+outbound connections.
|
||||
#maxconnections=
|
||||
|
||||
|
||||
# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
|
||||
|
||||
# server=1 tells Bitcoin to accept JSON-RPC commands.
|
||||
#server=1
|
||||
|
||||
# You must set rpcuser and rpcpassword to secure the JSON-RPC api
|
||||
#rpcuser=Ulysseys
|
||||
#rpcpassword=YourSuperGreatPasswordNumber_385593
|
||||
|
||||
# By default, only RPC connections from localhost are allowed. Specify
|
||||
# as many rpcallowip= settings as you like to allow connections from
|
||||
# other hosts (and you may use * as a wildcard character):
|
||||
#rpcallowip=10.1.1.34
|
||||
#rpcallowip=192.168.1.*
|
||||
|
||||
# Listen for RPC connections on this TCP port:
|
||||
rpcport=9332
|
||||
|
||||
# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
|
||||
# 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 Bitcoin -server or bitcoind
|
||||
#rpcssl=1
|
||||
|
||||
# OpenSSL settings used when rpcssl=1
|
||||
rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
|
||||
rpcsslcertificatechainfile=server.cert
|
||||
rpcsslprivatekeyfile=server.pem
|
||||
|
||||
|
||||
# Miscellaneous options
|
||||
|
||||
# Set gen=1 to attempt to generate bitcoins
|
||||
gen=0
|
||||
|
||||
# Use SSE instructions to try to generate bitcoins faster.
|
||||
#4way=1
|
||||
|
||||
# Pre-generate this many public/private key pairs, so wallet backups will be valid for
|
||||
# both prior transactions and several dozen future transactions.
|
||||
keypool=100
|
||||
|
||||
# Pay an optional transaction fee every time you send bitcoins. Transactions with fees
|
||||
# are more likely than free transactions to be included in generated blocks, so may
|
||||
# be validated sooner.
|
||||
paytxfee=0.00
|
||||
|
||||
# Allow direct connections for the 'pay via IP address' feature.
|
||||
#allowreceivebyip=1
|
||||
|
||||
|
||||
# User interface options
|
||||
|
||||
# Start Bitcoin minimized
|
||||
#min=1
|
||||
|
||||
# Minimize to the system tray
|
||||
#minimizetotray=1
|
145
contrib/debian/examples/dogecoin.conf
Normal file
145
contrib/debian/examples/dogecoin.conf
Normal file
|
@ -0,0 +1,145 @@
|
|||
##
|
||||
## dogecoin.conf configuration file. Lines beginning with # are comments.
|
||||
##
|
||||
|
||||
# Network-related settings:
|
||||
|
||||
# Run on the test network instead of the real dogecoin network.
|
||||
#testnet=0
|
||||
|
||||
# Run a regression test network
|
||||
#regtest=0
|
||||
|
||||
# Connect via a SOCKS5 proxy
|
||||
#proxy=127.0.0.1:9050
|
||||
|
||||
# Bind to given address and always listen on it. Use [host]:port notation for IPv6
|
||||
#bind=<addr>
|
||||
|
||||
# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
|
||||
#whitebind=<addr>
|
||||
|
||||
##############################################################
|
||||
## Quick Primer on addnode vs connect ##
|
||||
## Let's say for instance you use addnode=4.2.2.4 ##
|
||||
## addnode will connect you to and tell you about the ##
|
||||
## nodes connected to 4.2.2.4. In addition it will tell ##
|
||||
## the other nodes connected to it that you exist so ##
|
||||
## they can connect to you. ##
|
||||
## connect will not do the above when you 'connect' to it. ##
|
||||
## It will *only* connect you to 4.2.2.4 and no one else.##
|
||||
## ##
|
||||
## So if you're behind a firewall, or have other problems ##
|
||||
## finding nodes, add some using 'addnode'. ##
|
||||
## ##
|
||||
## If you want to stay private, use 'connect' to only ##
|
||||
## connect to "trusted" nodes. ##
|
||||
## ##
|
||||
## If you run multiple nodes on a LAN, there's no need for ##
|
||||
## all of them to open lots of connections. Instead ##
|
||||
## 'connect' them all to one node that is port forwarded ##
|
||||
## and has lots of connections. ##
|
||||
## Thanks goes to [Noodle] on Freenode. ##
|
||||
##############################################################
|
||||
|
||||
# Use as many addnode= settings as you like to connect to specific peers
|
||||
#addnode=69.164.218.197
|
||||
#addnode=10.0.0.2:22556
|
||||
|
||||
# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
|
||||
#connect=69.164.218.197
|
||||
#connect=10.0.0.1:22556
|
||||
|
||||
# Listening mode, enabled by default except when 'connect' is being used
|
||||
#listen=1
|
||||
|
||||
# Maximum number of inbound+outbound connections.
|
||||
#maxconnections=
|
||||
|
||||
#
|
||||
# JSON-RPC options (for controlling a running Dogecoin/dogecoind process)
|
||||
#
|
||||
|
||||
# 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:
|
||||
#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
|
||||
|
||||
# By default, only RPC connections from localhost are allowed.
|
||||
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
|
||||
# either as a single IPv4/IPv6 or with a subnet specification.
|
||||
|
||||
# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
|
||||
# because the rpcpassword is transmitted over the network unencrypted.
|
||||
|
||||
# server=1 tells 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
|
||||
|
||||
# Listen for RPC connections on this TCP port:
|
||||
#rpcport=22555
|
||||
|
||||
# You can use Dogecoin or dogecoind to send commands to Dogecoin/dogecoind
|
||||
# running on another host using this option:
|
||||
#rpcconnect=127.0.0.1
|
||||
|
||||
# Transaction Fee Changes in 0.10.0
|
||||
|
||||
# Send transactions as zero-fee transactions if possible (default: 0)
|
||||
#sendfreetransactions=0
|
||||
|
||||
# Create transactions that have enough fees (or priority) so they are likely to begin confirmation within n blocks (default: 1).
|
||||
# This setting is over-ridden by the -paytxfee option.
|
||||
#txconfirmtarget=n
|
||||
|
||||
# Miscellaneous options
|
||||
|
||||
# Pre-generate this many public/private key pairs, so wallet backups will be valid for
|
||||
# both prior transactions and several dozen future transactions.
|
||||
#keypool=100
|
||||
|
||||
# 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.
|
||||
#paytxfee=0.00
|
||||
|
||||
# User interface options
|
||||
|
||||
# Start Dogecoin minimized
|
||||
#min=1
|
||||
|
||||
# Minimize to the system tray
|
||||
#minimizetotray=1
|
|
@ -1,206 +0,0 @@
|
|||
.TH BITCOIN-QT "1" "April 2013" "bitcoin-qt 1"
|
||||
.SH NAME
|
||||
bitcoin-qt \- peer-to-peer network based digital currency
|
||||
.SH DESCRIPTION
|
||||
.SS "Usage:"
|
||||
.IP
|
||||
bitcoin\-qt [command\-line options]
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\-?
|
||||
This help message
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: bitcoin.conf)
|
||||
.TP
|
||||
\fB\-pid=\fR<file>
|
||||
Specify pid file (default: bitcoind.pid)
|
||||
.TP
|
||||
\fB\-gen\fR
|
||||
Generate coins
|
||||
.TP
|
||||
\fB\-gen\fR=\fI0\fR
|
||||
Don't generate coins
|
||||
.TP
|
||||
\fB\-datadir=\fR<dir>
|
||||
Specify data directory
|
||||
.TP
|
||||
\fB\-dbcache=\fR<n>
|
||||
Set database cache size in megabytes (default: 25)
|
||||
.TP
|
||||
\fB\-timeout=\fR<n>
|
||||
Specify connection timeout in milliseconds (default: 5000)
|
||||
.TP
|
||||
\fB\-proxy=\fR<ip:port>
|
||||
Connect through socks proxy
|
||||
.TP
|
||||
\fB\-socks=\fR<n>
|
||||
Select the version of socks proxy to use (4\-5, default: 5)
|
||||
.TP
|
||||
\fB\-tor=\fR<ip:port>
|
||||
Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
|
||||
.TP
|
||||
\fB\-dns\fR
|
||||
Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR
|
||||
.TP
|
||||
\fB\-port=\fR<port>
|
||||
Listen for connections on <port> (default: 9333 or testnet: 19333)
|
||||
.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: 9332 or testnet: 19332)
|
||||
.TP
|
||||
\fB\-rpcallowip=\fR<ip>
|
||||
Allow JSON\-RPC connections from specified IP address
|
||||
.TP
|
||||
\fB\-rpcthreads=\fR<n>
|
||||
Set the number of threads to service RPC calls (default: 4)
|
||||
.TP
|
||||
\fB\-blocknotify=\fR<cmd>
|
||||
Execute command when the best block changes (%s in cmd is replaced by block hash)
|
||||
.TP
|
||||
\fB\-walletnotify=\fR<cmd>
|
||||
Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
|
||||
.TP
|
||||
\fB\-alertnotify=\fR<cmd>
|
||||
Execute command when a relevant alert is received (%s in cmd is replaced by message)
|
||||
.TP
|
||||
\fB\-upgradewallet\fR
|
||||
Upgrade wallet to latest format
|
||||
.TP
|
||||
\fB\-keypool=\fR<n>
|
||||
Set key pool size to <n> (default: 100)
|
||||
.TP
|
||||
\fB\-rescan\fR
|
||||
Rescan the block chain for missing wallet transactions
|
||||
.TP
|
||||
\fB\-salvagewallet\fR
|
||||
Attempt to recover private keys from a corrupt wallet.dat
|
||||
.TP
|
||||
\fB\-checkblocks=\fR<n>
|
||||
How many blocks to check at startup (default: 288, 0 = all)
|
||||
.TP
|
||||
\fB\-checklevel=\fR<n>
|
||||
How thorough the block verification is (0\-4, default: 3)
|
||||
.TP
|
||||
\fB\-txindex\fR
|
||||
Maintain a full transaction index (default: 0)
|
||||
.TP
|
||||
\fB\-loadblock=\fR<file>
|
||||
Imports blocks from external blk000??.dat file
|
||||
.TP
|
||||
\fB\-reindex\fR
|
||||
Rebuild block chain index from current blk000??.dat files
|
||||
.TP
|
||||
\fB\-par=\fR<n>
|
||||
Set the number of script verification threads (1\-16, 0=auto, default: 0)
|
||||
.SS "Block creation options:"
|
||||
.TP
|
||||
\fB\-blockminsize=\fR<n>
|
||||
Set minimum block size in bytes (default: 0)
|
||||
.TP
|
||||
\fB\-blockmaxsize=\fR<n>
|
||||
Set maximum block size in bytes (default: 250000)
|
||||
.HP
|
||||
\fB\-blockprioritysize=\fR<n> Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
|
||||
.PP
|
||||
SSL options: (see the Bitcoin Wiki for SSL setup instructions)
|
||||
.TP
|
||||
\fB\-rpcssl\fR
|
||||
Use OpenSSL (https) for JSON\-RPC connections
|
||||
.TP
|
||||
\fB\-rpcsslcertificatechainfile=\fR<file.cert>
|
||||
Server certificate file (default: server.cert)
|
||||
.TP
|
||||
\fB\-rpcsslprivatekeyfile=\fR<file.pem>
|
||||
Server private key (default: server.pem)
|
||||
.TP
|
||||
\fB\-rpcsslciphers=\fR<ciphers>
|
||||
Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
|
||||
.SS "UI options:"
|
||||
.TP
|
||||
\fB\-lang=\fR<lang>
|
||||
Set language, for example "de_DE" (default: system locale)
|
||||
.TP
|
||||
\fB\-min\fR
|
||||
Start minimized
|
||||
.TP
|
||||
\fB\-splash\fR
|
||||
Show splash screen on startup (default: 1)
|
|
@ -1,92 +0,0 @@
|
|||
.TH BITCOIN.CONF "5" "January 2011" "bitcoin.conf 3.19"
|
||||
.SH NAME
|
||||
bitcoin.conf \- bitcoin configuration file
|
||||
.SH SYNOPSIS
|
||||
All command-line options (except for '\-datadir' and '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
|
||||
.TP
|
||||
The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
|
||||
.TP
|
||||
The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, bitcoind(1) will look for a file named bitcoin.conf(5) in the bitcoin data directory, but both the data directory and the configuration file path may be changed using the '\-datadir' and '\-conf' command-line arguments.
|
||||
.SH LOCATION
|
||||
bitcoin.conf should be located in $HOME/.bitcoin
|
||||
.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 *bitcoin* network.
|
||||
.TP
|
||||
\fBproxy=\fR\fI'127.0.0.1:9050'\fR
|
||||
Connect via a socks4 proxy.
|
||||
.TP
|
||||
\fBaddnode=\fR\fI'10.0.0.2:9333'\fR
|
||||
Use as many *addnode=* settings as you like to connect to specific peers.
|
||||
.TP
|
||||
\fBconnect=\fR\fI'10.0.0.1:9333'\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 *bitcoin* 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
|
||||
\fBrpctimeout=\fR\fI'30'\fR
|
||||
How many seconds *bitcoin* will wait for a complete RPC HTTP request, after the HTTP connection is established.
|
||||
.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'9332'\fR
|
||||
Listen for RPC connections on this TCP port.
|
||||
.TP
|
||||
\fBrpcconnect=\fR\fI'127.0.0.1'\fR
|
||||
You can use *bitcoin* or *bitcoind(1)* to send commands to *bitcoin*/*bitcoind(1)* running on another host using this option.
|
||||
.TP
|
||||
\fBrpcssl=\fR\fI'1'\fR
|
||||
Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *bitcoin* '\-server' or *bitcoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
|
||||
.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 bitcoins.
|
||||
.TP
|
||||
\fB4way=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable use SSE instructions to try to generate bitcoins 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 bitcoins. 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 bitcoind minimized.
|
||||
.TP
|
||||
\fBminimizetotray=\fR[\fI'0'\fR|\fI'1'\fR]
|
||||
Enable or disable minimize to the system tray.
|
||||
.SH "SEE ALSO"
|
||||
bitcoind(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.
|
||||
|
|
@ -1,209 +0,0 @@
|
|||
.TH BITCOIND "1" "January 2011" "bitcoind 3.19"
|
||||
.SH NAME
|
||||
bitcoind \- peer-to-peer network based digital currency
|
||||
.SH SYNOPSIS
|
||||
bitcoin [options] <command> [params]
|
||||
.TP
|
||||
bitcoin [options] help <command> \- Get help for a command
|
||||
.SH DESCRIPTION
|
||||
This manual page documents the bitcoind program. Bitcoin is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
|
||||
|
||||
Bitcoins can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Bitcoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-conf=\fR<file>
|
||||
Specify configuration file (default: bitcoin.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 socks4 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 Bitcoin 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 'bitcoinaddress'\fR
|
||||
Returns the account associated with the given address.
|
||||
.TP
|
||||
\fBsetaccount 'bitcoinaddress' ['account']\fR
|
||||
Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
|
||||
.TP
|
||||
\fBgetaccountaddress 'account'\fR
|
||||
Returns a new bitcoin address for 'account'.
|
||||
.TP
|
||||
\fBgetaddressesbyaccount 'account'\fR
|
||||
Returns the list of addresses associated with the given 'account'.
|
||||
.TP
|
||||
\fBgetbalance 'account'\fR
|
||||
Returns the server's available balance, or the balance for 'account'.
|
||||
.TP
|
||||
\fBgetblockcount\fR
|
||||
Returns the number of blocks in the longest block chain.
|
||||
.TP
|
||||
\fBgetblocknumber\fR
|
||||
Returns the block number of the latest block in the longest block chain.
|
||||
.TP
|
||||
\fBgetconnectioncount\fR
|
||||
Returns the number of connections to other nodes.
|
||||
.TP
|
||||
\fBgetdifficulty\fR
|
||||
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
|
||||
.TP
|
||||
\fBgetgenerate\fR
|
||||
Returns boolean true if server is trying to generate bitcoins, 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 bitcoin address for receiving payments. If 'account' is specified (recommended), it is added to the address book so payments received with the address will be credited to 'account'.
|
||||
.TP
|
||||
\fBgetreceivedbyaccount 'account' ['minconf=1']\fR
|
||||
Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
|
||||
.TP
|
||||
\fBgetreceivedbyaddress 'bitcoinaddress' ['minconf=1']\fR
|
||||
Returns the total amount received by 'bitcoinaddress' in transactions with at least ['minconf'] confirmations.
|
||||
.TP
|
||||
\fBgettransaction 'txid'\fR
|
||||
Returns information about a specific transaction, given hexadecimal transaction ID.
|
||||
.TP
|
||||
\fBgetwork 'data'\fR
|
||||
If 'data' is specified, tries to solve the block and returns true if it was successful. If 'data' is not specified, returns formatted hash 'data' to work on:
|
||||
|
||||
"midstate" : precomputed hash state after hashing the first half of the data.
|
||||
"data" : block data.
|
||||
"hash1" : formatted hash buffer for second hash.
|
||||
"target" : little endian hash target.
|
||||
.TP
|
||||
\fBhelp 'command'\fR
|
||||
List commands, or get help for a command.
|
||||
.TP
|
||||
\fBlistaccounts ['minconf=1']\fR
|
||||
List accounts and their current balances.
|
||||
*note: requires bitcoin 0.3.20 or later.
|
||||
.TP
|
||||
\fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
|
||||
['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
|
||||
|
||||
"account" : the account of the receiving address.
|
||||
"amount" : total amount received by the address.
|
||||
"confirmations" : number of confirmations of the most recent transaction included.
|
||||
.TP
|
||||
\fBlistreceivedbyaddress ['minconf=1'] ['includeempty=false']\fR
|
||||
['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
|
||||
|
||||
"address" : receiving address.
|
||||
"account" : the account of the receiving address.
|
||||
"amount" : total amount received by the address.
|
||||
"confirmations" : number of confirmations of the most recent transaction included.
|
||||
.TP
|
||||
\fBlisttransactions 'account' ['count=10']\fR
|
||||
Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
|
||||
|
||||
"category" : will be generate, send, receive, or move.
|
||||
"amount" : amount of transaction.
|
||||
"fee" : Fee (if any) paid (only for send transactions).
|
||||
"confirmations" : number of confirmations (only for generate/send/receive).
|
||||
"txid" : transaction ID (only for generate/send/receive).
|
||||
"otheraccount" : account funds were moved to or from (only for move).
|
||||
"message" : message associated with transaction (only for send).
|
||||
"to" : message-to associated with transaction (only for send).
|
||||
|
||||
*note: requires bitcoin 0.3.20 or later.
|
||||
.TP
|
||||
\fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
|
||||
Moves funds between accounts.
|
||||
.TP
|
||||
\fBsendfrom* <'account'> <'bitcoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
|
||||
Sends amount from account's balance to 'bitcoinaddress'. This method will fail if there is less than amount bitcoins with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
|
||||
.TP
|
||||
\fBsendtoaddress 'bitcoinaddress' 'amount' ['comment'] ['comment-to']\fR
|
||||
Sends amount from the server's available balance to 'bitcoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
|
||||
.TP
|
||||
\fBstop\fR
|
||||
Stops the bitcoin server.
|
||||
.TP
|
||||
\fBvalidateaddress 'bitcoinaddress'\fR
|
||||
Checks that 'bitcoinaddress' looks like a proper bitcoin address. Returns an object containing:
|
||||
|
||||
"isvalid" : true or false.
|
||||
"ismine" : true if the address is in the server's wallet.
|
||||
"address" : bitcoinaddress.
|
||||
|
||||
*note: ismine and address are only returned if the address is valid.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
bitcoin.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.
|
||||
|
32
contrib/debian/rules
Normal file → Executable file
32
contrib/debian/rules
Normal file → Executable file
|
@ -1,33 +1,23 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- mode: makefile; coding: utf-8 -*-
|
||||
|
||||
#DEB_MAKE_CHECK_TARGET = test_bitcoin
|
||||
#build/bitcoind::
|
||||
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
|
||||
|
||||
DEB_INSTALL_EXAMPLES_bitcoind += debian/examples/*
|
||||
DEB_INSTALL_MANPAGES_bitcoind += debian/manpages/*
|
||||
#DEB_MAKE_CHECK_TARGET = test_dogecoin
|
||||
#build/dogecoind::
|
||||
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_dogecoin)
|
||||
|
||||
%:
|
||||
dh --with bash-completion $@
|
||||
|
||||
override_dh_auto_build:
|
||||
cd src; $(MAKE) -f makefile.unix bitcoind
|
||||
$(MAKE)
|
||||
|
||||
override_dh_auto_clean:
|
||||
if [ -f Makefile ]; then $(MAKE) clean; else rm -rf build/; rm -f bitcoin-qt; fi
|
||||
cd src; $(MAKE) -f makefile.unix 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:
|
||||
qmake bitcoin-qt.pro USE_QRCODE=1
|
||||
./autogen.sh
|
||||
./configure --with-gui=$(QT)
|
||||
|
||||
override_dh_auto_test:
|
||||
cd src; $(MAKE) -f makefile.unix test_bitcoin
|
||||
src/test_bitcoin
|
||||
|
||||
# Ensure wrapper is set executable
|
||||
binary-post-install/bitcoind:
|
||||
chmod +x $(cdbs_curdestdir)usr/bin/bitcoind
|
||||
binary-post-install/bitcoin-qt:
|
||||
chmod +x $(cdbs_curdestdir)usr/bin/bitcoin-qt
|
||||
make check
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Run the "uscan" command to check for upstream updates and more.
|
||||
version=3
|
||||
# use qa.debian.org redirector; see man uscan
|
||||
opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/;s/\-src//,dversionmangle=s/~dfsg\d*// \
|
||||
http://sf.net/bitcoin/bitcoin-(\d.*)-linux\.tar\.gz debian
|
||||
opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
|
||||
http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
|
||||
http://githubredir.debian.net/github/dogecoin/dogecoin v(.*).tar.gz
|
||||
|
|
180
contrib/devtools/README.md
Normal file
180
contrib/devtools/README.md
Normal file
|
@ -0,0 +1,180 @@
|
|||
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
|
||||
===============
|
||||
|
||||
A small script to automate merging pull-requests securely and sign them with GPG.
|
||||
|
||||
For example:
|
||||
|
||||
./github-merge.py 3077
|
||||
|
||||
(in any git repository) will help you merge pull request #3077 for the
|
||||
bitcoin/bitcoin repository.
|
||||
|
||||
What it does:
|
||||
* Fetch master and the pull request.
|
||||
* Locally construct a merge commit.
|
||||
* Show the diff that merge results in.
|
||||
* Ask you to verify the resulting source tree (so you can do a make
|
||||
check or whatever).
|
||||
* Ask you whether to GPG sign the merge commit.
|
||||
* Ask you whether to push the result upstream.
|
||||
|
||||
This means that there are no potential race conditions (where a
|
||||
pullreq gets updated while you're reviewing it, but before you click
|
||||
merge), and when using GPG signatures, that even a compromised GitHub
|
||||
couldn't mess with the sources.
|
||||
|
||||
Setup
|
||||
---------
|
||||
Configuring the github-merge tool for the bitcoin repository is done in the following way:
|
||||
|
||||
git config githubmerge.repository bitcoin/bitcoin
|
||||
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
|
||||
git config --global user.signingkey mykeyid (if you want to GPG sign)
|
||||
|
||||
optimize-pngs.py
|
||||
================
|
||||
|
||||
A script to optimize png files in the bitcoin
|
||||
repository (requires pngcrush).
|
||||
|
||||
security-check.py and test-security-check.py
|
||||
============================================
|
||||
|
||||
Perform basic ELF security checks on a series of executables.
|
||||
|
||||
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
|
||||
still compatible with the minimum supported Linux distribution versions.
|
||||
|
||||
Example usage after a gitian build:
|
||||
|
||||
find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
|
||||
|
||||
If only supported symbols are used the return value will be 0 and the output will be empty.
|
||||
|
||||
If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed:
|
||||
|
||||
.../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
|
||||
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
|
||||
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
|
||||
.../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:
|
||||
|
||||
- fetch all translations
|
||||
- post-process them into valid and committable format
|
||||
- add missing translations to the build system (TODO)
|
||||
|
||||
See doc/translation-process.md for more information.
|
45
contrib/devtools/check-doc.py
Executable file
45
contrib/devtools/check-doc.py
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/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()
|
164
contrib/devtools/clang-format-diff.py
Executable file
164
contrib/devtools/clang-format-diff.py
Executable file
|
@ -0,0 +1,164 @@
|
|||
#!/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()
|
47
contrib/devtools/commit-script-check.sh
Executable file
47
contrib/devtools/commit-script-check.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/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
|
610
contrib/devtools/copyright_header.py
Executable file
610
contrib/devtools/copyright_header.py
Executable file
|
@ -0,0 +1,610 @@
|
|||
#!/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)
|
29
contrib/devtools/gen-manpages.sh
Executable file
29
contrib/devtools/gen-manpages.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/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
|
77
contrib/devtools/git-subtree-check.sh
Executable file
77
contrib/devtools/git-subtree-check.sh
Executable file
|
@ -0,0 +1,77 @@
|
|||
#!/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"
|
||||
if [ -z "$COMMIT" ]; then
|
||||
COMMIT=HEAD
|
||||
fi
|
||||
|
||||
# Taken from git-subtree (Copyright (C) 2009 Avery Pennarun <apenwarr@gmail.com>)
|
||||
find_latest_squash()
|
||||
{
|
||||
dir="$1"
|
||||
sq=
|
||||
main=
|
||||
sub=
|
||||
git log --grep="^git-subtree-dir: $dir/*\$" \
|
||||
--pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" |
|
||||
while read a b junk; do
|
||||
case "$a" in
|
||||
START) sq="$b" ;;
|
||||
git-subtree-mainline:) main="$b" ;;
|
||||
git-subtree-split:) sub="$b" ;;
|
||||
END)
|
||||
if [ -n "$sub" ]; then
|
||||
if [ -n "$main" ]; then
|
||||
# a rejoin commit?
|
||||
# Pretend its sub was a squash.
|
||||
sq="$sub"
|
||||
fi
|
||||
echo "$sq" "$sub"
|
||||
break
|
||||
fi
|
||||
sq=
|
||||
main=
|
||||
sub=
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
latest_squash="$(find_latest_squash "$DIR")"
|
||||
if [ -z "$latest_squash" ]; then
|
||||
echo "ERROR: $DIR is not a subtree" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
set $latest_squash
|
||||
old=$1
|
||||
rev=$2
|
||||
if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then
|
||||
echo "ERROR: subtree commit $rev unavailable. Fetch/update the subtree repository" >&2
|
||||
exit 2
|
||||
fi
|
||||
tree_subtree=$(git show -s --format="%T" $rev)
|
||||
echo "$DIR in $COMMIT was last updated to upstream commit $rev (tree $tree_subtree)"
|
||||
tree_actual=$(git ls-tree -d "$COMMIT" "$DIR" | head -n 1)
|
||||
if [ -z "$tree_actual" ]; then
|
||||
echo "FAIL: subtree directory $DIR not found in $COMMIT" >&2
|
||||
exit 1
|
||||
fi
|
||||
set $tree_actual
|
||||
tree_actual_type=$2
|
||||
tree_actual_tree=$3
|
||||
echo "$DIR in $COMMIT currently refers to $tree_actual_type $tree_actual_tree"
|
||||
if [ "d$tree_actual_type" != "dtree" ]; then
|
||||
echo "FAIL: subtree directory $DIR is not a tree in $COMMIT" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "$tree_actual_tree" != "$tree_subtree" ]; then
|
||||
git diff-tree $tree_actual_tree $tree_subtree >&2
|
||||
echo "FAIL: subtree directory tree doesn't match subtree commit tree" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "GOOD"
|
251
contrib/devtools/github-merge.py
Executable file
251
contrib/devtools/github-merge.py
Executable file
|
@ -0,0 +1,251 @@
|
|||
#!/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()
|
||||
|
78
contrib/devtools/optimize-pngs.py
Executable file
78
contrib/devtools/optimize-pngs.py
Executable file
|
@ -0,0 +1,78 @@
|
|||
#!/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).
|
||||
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
|
||||
'''
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import hashlib
|
||||
from PIL import Image
|
||||
|
||||
def file_hash(filename):
|
||||
'''Return hash of raw file contents'''
|
||||
with open(filename, 'rb') as f:
|
||||
return hashlib.sha256(f.read()).hexdigest()
|
||||
|
||||
def content_hash(filename):
|
||||
'''Return hash of RGBA contents of image'''
|
||||
i = Image.open(filename)
|
||||
i = i.convert('RGBA')
|
||||
data = i.tobytes()
|
||||
return hashlib.sha256(data).hexdigest()
|
||||
|
||||
pngcrush = 'pngcrush'
|
||||
git = 'git'
|
||||
folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"]
|
||||
basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')
|
||||
totalSaveBytes = 0
|
||||
noHashChange = True
|
||||
|
||||
outputArray = []
|
||||
for folder in folders:
|
||||
absFolder=os.path.join(basePath, folder)
|
||||
for file in os.listdir(absFolder):
|
||||
extension = os.path.splitext(file)[1]
|
||||
if extension.lower() == '.png':
|
||||
print("optimizing "+file+"..."),
|
||||
file_path = os.path.join(absFolder, file)
|
||||
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
|
||||
fileMetaMap['contentHashPre'] = content_hash(file_path)
|
||||
|
||||
pngCrushOutput = ""
|
||||
try:
|
||||
pngCrushOutput = subprocess.check_output(
|
||||
[pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path],
|
||||
stderr=subprocess.STDOUT).rstrip('\n')
|
||||
except:
|
||||
print "pngcrush is not installed, aborting..."
|
||||
sys.exit(0)
|
||||
|
||||
#verify
|
||||
if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT):
|
||||
print "PNG file "+file+" is corrupted after crushing, check out pngcursh version"
|
||||
sys.exit(1)
|
||||
|
||||
fileMetaMap['sha256New'] = file_hash(file_path)
|
||||
fileMetaMap['contentHashPost'] = content_hash(file_path)
|
||||
|
||||
if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']:
|
||||
print "Image contents of PNG file "+file+" before and after crushing don't match"
|
||||
sys.exit(1)
|
||||
|
||||
fileMetaMap['psize'] = os.path.getsize(file_path)
|
||||
outputArray.append(fileMetaMap)
|
||||
print("done\n"),
|
||||
|
||||
print "summary:\n+++++++++++++++++"
|
||||
for fileDict in outputArray:
|
||||
oldHash = fileDict['sha256Old']
|
||||
newHash = fileDict['sha256New']
|
||||
totalSaveBytes += fileDict['osize'] - fileDict['psize']
|
||||
noHashChange = noHashChange and (oldHash == newHash)
|
||||
print fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n"
|
||||
|
||||
print "completed. Checksum stable: "+str(noHashChange)+". Total reduction: "+str(totalSaveBytes)+" bytes"
|
216
contrib/devtools/security-check.py
Executable file
216
contrib/devtools/security-check.py
Executable file
|
@ -0,0 +1,216 @@
|
|||
#!/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)
|
||||
|
10
contrib/devtools/split-debug.sh.in
Normal file
10
contrib/devtools/split-debug.sh.in
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/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
|
166
contrib/devtools/symbol-check.py
Executable file
166
contrib/devtools/symbol-check.py
Executable file
|
@ -0,0 +1,166 @@
|
|||
#!/usr/bin/env 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.
|
||||
'''
|
||||
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
|
||||
still compatible with the minimum supported Linux distribution versions.
|
||||
|
||||
Example usage:
|
||||
|
||||
find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
|
||||
'''
|
||||
from __future__ import division, print_function, unicode_literals
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Debian 6.0.9 (Squeeze) has:
|
||||
#
|
||||
# - g++ version 4.4.5 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=g%2B%2B)
|
||||
# - libc version 2.11.3 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libc6)
|
||||
# - libstdc++ version 4.4.5 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libstdc%2B%2B6)
|
||||
#
|
||||
# Ubuntu 10.04.4 (Lucid Lynx) has:
|
||||
#
|
||||
# - g++ version 4.4.3 (http://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=lucid§ion=all)
|
||||
# - libc version 2.11.1 (http://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=lucid§ion=all)
|
||||
# - libstdc++ version 4.4.3 (http://packages.ubuntu.com/search?suite=lucid§ion=all&arch=any&keywords=libstdc%2B%2B&searchon=names)
|
||||
#
|
||||
# Taking the minimum of these as our target.
|
||||
#
|
||||
# According to GNU ABI document (http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
|
||||
# GCC 4.4.0: GCC_4.4.0
|
||||
# GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3
|
||||
# (glibc) GLIBC_2_11
|
||||
#
|
||||
MAX_VERSIONS = {
|
||||
'GCC': (4,4,0),
|
||||
'CXXABI': (1,3,3),
|
||||
'GLIBCXX': (3,4,13),
|
||||
'GLIBC': (2,11),
|
||||
'V': (0,5,0) # xkb (qt only)
|
||||
}
|
||||
# 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
|
||||
}
|
||||
|
||||
class CPPFilt(object):
|
||||
'''
|
||||
Demangle C++ symbol names.
|
||||
|
||||
Use a pipe to the 'c++filt' command.
|
||||
'''
|
||||
def __init__(self):
|
||||
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()
|
||||
return self.proc.stdout.readline().rstrip()
|
||||
|
||||
def close(self):
|
||||
self.proc.stdin.close()
|
||||
self.proc.stdout.close()
|
||||
self.proc.wait()
|
||||
|
||||
def read_symbols(executable, imports=True):
|
||||
'''
|
||||
Parse an ELF executable and return a list of (symbol,version) tuples
|
||||
for dynamic, imported symbols.
|
||||
'''
|
||||
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('Could not read symbols for %s: %s' % (executable, stderr.strip()))
|
||||
syms = []
|
||||
for line in stdout.split(b'\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'@'):
|
||||
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'_')
|
||||
else:
|
||||
lib = version
|
||||
ver = '0'
|
||||
ver = tuple([int(x) for x in ver.split(b'.')])
|
||||
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
|
||||
for filename in sys.argv[1:]:
|
||||
# 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')))
|
||||
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')))
|
||||
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)
|
62
contrib/devtools/test-security-check.py
Executable file
62
contrib/devtools/test-security-check.py
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/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()
|
||||
|
208
contrib/devtools/update-translations.py
Executable file
208
contrib/devtools/update-translations.py
Executable file
|
@ -0,0 +1,208 @@
|
|||
#!/usr/bin/env 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.
|
||||
'''
|
||||
Run this script from the root of the repository to update all translations from
|
||||
transifex.
|
||||
It will do the following automatically:
|
||||
|
||||
- fetch all translations using the tx tool
|
||||
- post-process them into valid and committable format
|
||||
- remove invalid control characters
|
||||
- remove location tags (makes diffs less noisy)
|
||||
|
||||
TODO:
|
||||
- auto-add new translations to the build system according to the translation process
|
||||
'''
|
||||
from __future__ import division, print_function
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
import io
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
# Name of transifex tool
|
||||
TX = 'tx'
|
||||
# Name of source language file
|
||||
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'):
|
||||
print('No .git directory found')
|
||||
print('Execute this script at the root of the repository', file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
def fetch_all_translations():
|
||||
if subprocess.call([TX, 'pull', '-f', '-a']):
|
||||
print('Error while fetching translations', file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
def find_format_specifiers(s):
|
||||
'''Find all format specifiers in a string.'''
|
||||
pos = 0
|
||||
specifiers = []
|
||||
while True:
|
||||
percent = s.find('%', pos)
|
||||
if percent < 0:
|
||||
break
|
||||
specifiers.append(s[percent+1])
|
||||
pos = percent+2
|
||||
return specifiers
|
||||
|
||||
def split_format_specifiers(specifiers):
|
||||
'''Split format specifiers between numeric (Qt) and others (strprintf)'''
|
||||
numeric = []
|
||||
other = []
|
||||
for s in specifiers:
|
||||
if s in {'1','2','3','4','5','6','7','8','9'}:
|
||||
numeric.append(s)
|
||||
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
|
||||
|
||||
def sanitize_string(s):
|
||||
'''Sanitize string for printing'''
|
||||
return s.replace('\n',' ')
|
||||
|
||||
def check_format_specifiers(source, translation, errors, numerus):
|
||||
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!
|
||||
assert(not(source_f[0] and source_f[1]))
|
||||
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)))
|
||||
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
|
||||
|
||||
def all_ts_files(suffix=''):
|
||||
for filename in os.listdir(LOCALE_DIR):
|
||||
# process only language files, and do not process source language
|
||||
if not filename.endswith('.ts'+suffix) or filename == SOURCE_LANG+suffix:
|
||||
continue
|
||||
if suffix: # remove provided suffix
|
||||
filename = filename[0:-len(suffix)]
|
||||
filepath = os.path.join(LOCALE_DIR, filename)
|
||||
yield(filename, filepath)
|
||||
|
||||
FIX_RE = re.compile(b'[\x00-\x09\x0b\x0c\x0e-\x1f]')
|
||||
def remove_invalid_characters(s):
|
||||
'''Remove invalid characters from translation string'''
|
||||
return FIX_RE.sub(b'', s)
|
||||
|
||||
# Override cdata escape function to make our output match Qt's (optional, just for cleaner diffs for
|
||||
# comparison, disable by default)
|
||||
_orig_escape_cdata = None
|
||||
def escape_cdata(text):
|
||||
text = _orig_escape_cdata(text)
|
||||
text = text.replace("'", ''')
|
||||
text = text.replace('"', '"')
|
||||
return text
|
||||
|
||||
def postprocess_translations(reduce_diff_hacks=False):
|
||||
print('Checking and postprocessing...')
|
||||
|
||||
if reduce_diff_hacks:
|
||||
global _orig_escape_cdata
|
||||
_orig_escape_cdata = ET._escape_cdata
|
||||
ET._escape_cdata = escape_cdata
|
||||
|
||||
for (filename,filepath) in all_ts_files():
|
||||
os.rename(filepath, filepath+'.orig')
|
||||
|
||||
have_errors = False
|
||||
for (filename,filepath) in all_ts_files('.orig'):
|
||||
# pre-fixups to cope with transifex output
|
||||
parser = ET.XMLParser(encoding='utf-8') # need to override encoding because 'utf8' is not understood only 'utf-8'
|
||||
with open(filepath + '.orig', 'rb') as f:
|
||||
data = f.read()
|
||||
# remove control characters; this must be done over the entire file otherwise the XML parser will fail
|
||||
data = remove_invalid_characters(data)
|
||||
tree = ET.parse(io.BytesIO(data), parser=parser)
|
||||
|
||||
# iterate over all messages in file
|
||||
root = tree.getroot()
|
||||
for context in root.findall('context'):
|
||||
for message in context.findall('message'):
|
||||
numerus = message.get('numerus') == 'yes'
|
||||
source = message.find('source').text
|
||||
translation_node = message.find('translation')
|
||||
# pick all numerusforms
|
||||
if numerus:
|
||||
translations = [i.text for i in translation_node.findall('numerusform')]
|
||||
else:
|
||||
translations = [translation_node.text]
|
||||
|
||||
for translation in translations:
|
||||
if translation is None:
|
||||
continue
|
||||
errors = []
|
||||
valid = check_format_specifiers(source, translation, errors, numerus)
|
||||
|
||||
for error in errors:
|
||||
print('%s: %s' % (filename, error))
|
||||
|
||||
if not valid: # set type to unfinished and clear string if invalid
|
||||
translation_node.clear()
|
||||
translation_node.set('type', 'unfinished')
|
||||
have_errors = True
|
||||
|
||||
# Remove location tags
|
||||
for location in message.findall('location'):
|
||||
message.remove(location)
|
||||
|
||||
# Remove entire message if it is an unfinished translation
|
||||
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:
|
||||
out = io.BytesIO()
|
||||
tree.write(out, encoding='utf-8')
|
||||
out = out.getvalue()
|
||||
out = out.replace(b' />', b'/>')
|
||||
with open(filepath, 'wb') as f:
|
||||
f.write(out)
|
||||
else:
|
||||
tree.write(filepath, encoding='utf-8')
|
||||
return have_errors
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_at_repository_root()
|
||||
fetch_all_translations()
|
||||
postprocess_translations()
|
||||
|
154
contrib/dogecoin-cli.bash-completion
Normal file
154
contrib/dogecoin-cli.bash-completion
Normal file
|
@ -0,0 +1,154 @@
|
|||
# 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
|
57
contrib/dogecoin-tx.bash-completion
Normal file
57
contrib/dogecoin-tx.bash-completion
Normal file
|
@ -0,0 +1,57 @@
|
|||
# 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
|
56
contrib/dogecoind.bash-completion
Normal file
56
contrib/dogecoind.bash-completion
Normal file
|
@ -0,0 +1,56 @@
|
|||
# bash programmable completion for dogecoind(1) and bitcoin-qt(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.
|
||||
|
||||
_dogecoind() {
|
||||
local cur prev words=() cword
|
||||
local dogecoind
|
||||
|
||||
# save and use original argument to invoke dogecoind for -help
|
||||
# it might not be in $PATH
|
||||
dogecoind="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
-*=*) # prevent nonsense completions
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
||||
# 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" ) )
|
||||
fi
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
} &&
|
||||
complete -F _dogecoind dogecoind bitcoin-qt
|
||||
|
||||
# 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
|
406
contrib/gitian-build.sh
Executable file
406
contrib/gitian-build.sh
Executable file
|
@ -0,0 +1,406 @@
|
|||
# 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,86 +0,0 @@
|
|||
Gavin's notes on getting gitian builds up and running using KVM:
|
||||
|
||||
These instructions distilled from:
|
||||
https://help.ubuntu.com/community/KVM/Installation
|
||||
... see there for complete details.
|
||||
|
||||
You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization.
|
||||
|
||||
You probably need to enable hardware virtualization in your machine's BIOS.
|
||||
|
||||
You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites:
|
||||
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm
|
||||
|
||||
Sanity checks:
|
||||
sudo service apt-cacher-ng status # Should return apt-cacher-ng is running
|
||||
ls -l /dev/kvm # Should show a /dev/kvm device
|
||||
|
||||
|
||||
Once you've got the right hardware and software:
|
||||
|
||||
git clone git://github.com/bitcoin/bitcoin.git
|
||||
git clone git://github.com/devrandom/gitian-builder.git
|
||||
mkdir gitian-builder/inputs
|
||||
cd gitian-builder/inputs
|
||||
# Inputs for Linux and Win32:
|
||||
wget -O miniupnpc-1.6.tar.gz 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz'
|
||||
wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2'
|
||||
# Inputs for Win32: (Linux has packages for these)
|
||||
wget 'https://downloads.sourceforge.net/project/boost/boost/1.50.0/boost_1_50_0.tar.bz2'
|
||||
wget 'http://www.openssl.org/source/openssl-1.0.1c.tar.gz'
|
||||
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
|
||||
wget 'https://downloads.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz'
|
||||
wget 'https://downloads.sourceforge.net/project/libpng/libpng15/older-releases/1.5.9/libpng-1.5.9.tar.gz'
|
||||
wget 'http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz'
|
||||
cd ../..
|
||||
|
||||
cd gitian-builder
|
||||
bin/make-base-vm --arch i386
|
||||
bin/make-base-vm --arch amd64
|
||||
cd ..
|
||||
|
||||
# Build Linux release:
|
||||
cd bitcoin
|
||||
git pull
|
||||
cd ../gitian-builder
|
||||
git pull
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian.yml
|
||||
|
||||
# Build Win32 dependencies: (only needs to be done once, or when dependency versions change)
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/boost-win32.yml
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/deps-win32.yml
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/qt-win32.yml
|
||||
|
||||
# Build Win32 release:
|
||||
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml
|
||||
|
||||
---------------------
|
||||
|
||||
gitian-builder now also supports building using LXC. See
|
||||
https://help.ubuntu.com/12.04/serverguide/lxc.html
|
||||
... for how to get LXC up and running under Ubuntu.
|
||||
|
||||
If your main machine is a 64-bit Mac or PC with a few gigabytes of memory
|
||||
and at least 10 gigabytes of free disk space, you can gitian-build using
|
||||
LXC running inside a virtual machine.
|
||||
|
||||
Here's a description of Gavin's setup on OSX 10.6:
|
||||
|
||||
1. Download and install VirtualBox from https://www.virtualbox.org/
|
||||
|
||||
2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from
|
||||
http://www.ubuntu.com/
|
||||
|
||||
3. Run VirtualBox and create a new virtual machine, using the
|
||||
Ubuntu .iso (see the VirtualBox documentation for details).
|
||||
Create it with at least 2 gigabytes of memory and a disk
|
||||
that is at least 20 gigabytes big.
|
||||
|
||||
4. Inside the running Ubuntu desktop, install:
|
||||
sudo apt-get install debootstrap lxc ruby apache2 git apt-cacher-ng python-vm-builder
|
||||
|
||||
5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right
|
||||
hardware and software" instructions above:
|
||||
export USE_LXC=1
|
||||
git clone git://github.com/bitcoin/bitcoin.git
|
||||
... etc
|
65
contrib/gitian-descriptors/README.md
Normal file
65
contrib/gitian-descriptors/README.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
### 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).
|
||||
|
||||
You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization.
|
||||
|
||||
You probably need to enable hardware virtualization in your machine's BIOS.
|
||||
|
||||
You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites:
|
||||
|
||||
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm
|
||||
|
||||
Sanity checks:
|
||||
|
||||
sudo service apt-cacher-ng status # Should return apt-cacher-ng is running
|
||||
ls -l /dev/kvm # Should show a /dev/kvm device
|
||||
|
||||
|
||||
Once you've got the right hardware and software:
|
||||
|
||||
git clone git://github.com/dogecoin/dogecoin.git
|
||||
git clone git://github.com/devrandom/gitian-builder.git
|
||||
mkdir gitian-builder/inputs
|
||||
cd gitian-builder/inputs
|
||||
|
||||
# Create base images
|
||||
cd gitian-builder
|
||||
bin/make-base-vm --suite trusty --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
|
||||
...
|
||||
|
||||
---------------------
|
||||
|
||||
`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.
|
||||
|
||||
If your main machine is a 64-bit Mac or PC with a few gigabytes of memory
|
||||
and at least 10 gigabytes of free disk space, you can `gitian-build` using
|
||||
LXC running inside a virtual machine.
|
||||
|
||||
Here's a description of Gavin's setup on OSX 10.6:
|
||||
|
||||
1. Download and install VirtualBox from [https://www.virtualbox.org/](https://www.virtualbox.org/)
|
||||
|
||||
2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from
|
||||
[http://www.ubuntu.com/](http://www.ubuntu.com/)
|
||||
|
||||
3. Run VirtualBox and create a new virtual machine, using the Ubuntu .iso (see the [VirtualBox documentation](https://www.virtualbox.org/wiki/Documentation) for details). Create it with at least 2 gigabytes of memory and a disk that is at least 20 gigabytes big.
|
||||
|
||||
4. Inside the running Ubuntu desktop, install:
|
||||
|
||||
sudo apt-get install debootstrap lxc ruby apache2 git apt-cacher-ng python-vm-builder
|
||||
|
||||
5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above:
|
||||
|
||||
export USE_LXC=1
|
||||
git clone git://github.com/dogecoin/dogecoin.git
|
||||
... etc
|
|
@ -1,66 +0,0 @@
|
|||
---
|
||||
name: "boost"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "faketime"
|
||||
- "zip"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "boost_1_54_0.tar.bz2"
|
||||
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
|
||||
script: |
|
||||
# Defines
|
||||
INSTALLPREFIX="$OUTDIR/staging/boost"
|
||||
HOST=i686-w64-mingw32
|
||||
# Input Integrity Check
|
||||
echo "047e927de336af106a24bceba30069980c191529fd76b8dff8eb9a328b48ae1d boost_1_54_0.tar.bz2" | shasum -c
|
||||
echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c
|
||||
|
||||
mkdir -p "$INSTALLPREFIX"
|
||||
tar xjf boost_1_54_0.tar.bz2
|
||||
cd boost_1_54_0
|
||||
GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
|
||||
echo "using gcc : $GCCVERSION : $HOST-g++
|
||||
:
|
||||
<rc>$HOST-windres
|
||||
<archiver>$HOST-ar
|
||||
<cxxflags>-frandom-seed=boost1
|
||||
<ranlib>$HOST-ranlib
|
||||
;" > user-config.jam
|
||||
./bootstrap.sh --without-icu
|
||||
|
||||
# Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work
|
||||
# This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost.
|
||||
# Please obtain the exact patch that matches the above sha256sum from one of the following mirrors.
|
||||
#
|
||||
# Read History: https://svn.boost.org/trac/boost/ticket/7262
|
||||
# History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html
|
||||
#
|
||||
# Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
|
||||
# Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
# Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
# Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
patch -p0 < ../boost-mingw-gas-cross-compile-2013-03-03.patch
|
||||
|
||||
# Bug Workaround: boost-1.54.0 broke the ability to disable zlib
|
||||
# https://svn.boost.org/trac/boost/ticket/9156
|
||||
sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2
|
||||
sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2
|
||||
|
||||
# http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html
|
||||
# Note: Might need these options in the future for 64bit builds.
|
||||
# "Please note that address-model=64 must be given to bjam command line on 64bit Windows for 64bit build; otherwise 32bit code will be generated."
|
||||
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
|
||||
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
|
||||
|
||||
cd "$INSTALLPREFIX"
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
zip -r boost-win32-1.54.0-gitian-r6.zip *
|
||||
cp boost-win32-1.54.0-gitian-r6.zip $OUTDIR
|
|
@ -1,93 +0,0 @@
|
|||
---
|
||||
name: "bitcoin-deps"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "git-core"
|
||||
- "zip"
|
||||
- "faketime"
|
||||
- "psmisc"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "openssl-1.0.1c.tar.gz"
|
||||
- "db-4.8.30.NC.tar.gz"
|
||||
- "miniupnpc-1.6.tar.gz"
|
||||
- "zlib-1.2.6.tar.gz"
|
||||
- "libpng-1.5.9.tar.gz"
|
||||
- "qrencode-3.2.0.tar.bz2"
|
||||
script: |
|
||||
#
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
export INSTALLPREFIX=$OUTDIR/staging/deps
|
||||
export HOST=i686-w64-mingw32
|
||||
#
|
||||
mkdir -p $INSTALLPREFIX
|
||||
|
||||
tar xzf openssl-1.0.1c.tar.gz
|
||||
cd openssl-1.0.1c
|
||||
./Configure --cross-compile-prefix=$HOST- mingw --openssldir=$INSTALLPREFIX
|
||||
make
|
||||
make install_sw
|
||||
cd ..
|
||||
#
|
||||
tar xzf db-4.8.30.NC.tar.gz
|
||||
cd db-4.8.30.NC/build_unix
|
||||
../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST --disable-shared
|
||||
make $MAKEOPTS library_build
|
||||
make install_lib install_include
|
||||
cd ../..
|
||||
#
|
||||
tar xzf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
echo "
|
||||
--- miniupnpc-1.6/Makefile.mingw.orig 2013-09-29 18:52:51.014087958 -1000
|
||||
+++ miniupnpc-1.6/Makefile.mingw 2013-09-29 19:09:29.663318691 -1000
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
wingenminiupnpcstrings.o: wingenminiupnpcstrings.c
|
||||
|
||||
-miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
|
||||
- wingenminiupnpcstrings \$< \$@
|
||||
+miniupnpcstrings.h: miniupnpcstrings.h.in
|
||||
+ sed -e 's|OS/version|MSWindows/5.1.2600|' -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"VERSIONHERE\"|' \$< > \$@
|
||||
|
||||
minixml.o: minixml.c minixml.h miniupnpcstrings.h
|
||||
|
||||
" | sed "s/VERSIONHERE/$(cat VERSION)/" | patch -p1
|
||||
mkdir -p dll
|
||||
make -f Makefile.mingw CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a
|
||||
install -d $INSTALLPREFIX/include/miniupnpc
|
||||
install *.h $INSTALLPREFIX/include/miniupnpc
|
||||
install libminiupnpc.a $INSTALLPREFIX/lib
|
||||
cd ..
|
||||
#
|
||||
tar xzf zlib-1.2.6.tar.gz
|
||||
cd zlib-1.2.6
|
||||
CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
#
|
||||
tar xzf libpng-1.5.9.tar.gz
|
||||
cd libpng-1.5.9
|
||||
CFLAGS="-I$INSTALLPREFIX/include" LDFLAGS="-L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST
|
||||
make $MAKEOPTS
|
||||
make install
|
||||
cd ..
|
||||
#
|
||||
tar xjf qrencode-3.2.0.tar.bz2
|
||||
cd qrencode-3.2.0
|
||||
png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
#
|
||||
cd $INSTALLPREFIX
|
||||
zip -r $OUTDIR/bitcoin-deps-win32-gitian-r9.zip include lib
|
185
contrib/gitian-descriptors/gitian-linux.yml
Normal file
185
contrib/gitian-descriptors/gitian-linux.yml
Normal file
|
@ -0,0 +1,185 @@
|
|||
---
|
||||
name: "dogecoin-linux-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
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"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bison"
|
||||
- "bsdmainutils"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
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"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="date ar ranlib nm"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
HOST_CXXFLAGS="-O2 -g"
|
||||
HOST_LDFLAGS=-static-libstdc++
|
||||
|
||||
export QT_RCC_TEST=1
|
||||
export GZIP="-9n"
|
||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||
export TZ="UTC"
|
||||
export BUILD_DIR=`pwd`
|
||||
mkdir -p ${WRAP_DIR}
|
||||
if test -n "$GBUILD_CACHE_ENABLED"; then
|
||||
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
||||
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
|
||||
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
||||
fi
|
||||
|
||||
function 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 "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function 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 "\$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}
|
||||
|
||||
# Create the release tarball using (arbitrarily) the first host
|
||||
./autogen.sh
|
||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
# Correct tar file order
|
||||
mkdir -p temp
|
||||
pushd temp
|
||||
tar xf ../$SOURCEDIST
|
||||
find dogecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||
popd
|
||||
|
||||
ORIGPATH="$PATH"
|
||||
# Extract the release tarball into a dir for each host and build
|
||||
for i in ${HOSTS}; do
|
||||
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
||||
mkdir -p distsrc-${i}
|
||||
cd distsrc-${i}
|
||||
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
||||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
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}"
|
||||
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}
|
||||
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
|
||||
cd ../../
|
||||
rm -rf distsrc-${i}
|
||||
done
|
||||
mkdir -p $OUTDIR/src
|
||||
mv $SOURCEDIST $OUTDIR/src
|
37
contrib/gitian-descriptors/gitian-osx-signer.yml
Normal file
37
contrib/gitian-descriptors/gitian-osx-signer.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
name: "dogecoin-dmg-signer"
|
||||
suites:
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "faketime"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
|
||||
"dir": "signature"
|
||||
files:
|
||||
- "dogecoin-osx-unsigned.tar.gz"
|
||||
script: |
|
||||
WRAP_DIR=$HOME/wrapped
|
||||
mkdir -p ${WRAP_DIR}
|
||||
export PATH=`pwd`:$PATH
|
||||
FAKETIME_PROGS="dmg genisoimage"
|
||||
|
||||
# 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=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
||||
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
|
||||
UNSIGNED=dogecoin-osx-unsigned.tar.gz
|
||||
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}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
|
158
contrib/gitian-descriptors/gitian-osx.yml
Normal file
158
contrib/gitian-descriptors/gitian-osx.yml
Normal file
|
@ -0,0 +1,158 @@
|
|||
---
|
||||
name: "dogecoin-osx-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "ca-certificates"
|
||||
- "curl"
|
||||
- "g++"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "librsvg2-bin"
|
||||
- "libtiff-tools"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
- "cmake"
|
||||
- "imagemagick"
|
||||
- "libcap-dev"
|
||||
- "libz-dev"
|
||||
- "libbz2-dev"
|
||||
- "python"
|
||||
- "python-dev"
|
||||
- "python-setuptools"
|
||||
- "fonts-tuffy"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin.git"
|
||||
"dir": "dogecoin"
|
||||
files:
|
||||
- "MacOSX10.11.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"
|
||||
FAKETIME_HOST_PROGS=""
|
||||
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
|
||||
|
||||
export QT_RCC_TEST=1
|
||||
export GZIP="-9n"
|
||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||
export TZ="UTC"
|
||||
export BUILD_DIR=`pwd`
|
||||
mkdir -p ${WRAP_DIR}
|
||||
if test -n "$GBUILD_CACHE_ENABLED"; then
|
||||
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
||||
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
|
||||
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
||||
fi
|
||||
|
||||
export ZERO_AR_DATE=1
|
||||
|
||||
function 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 "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function 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 "\$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
|
||||
|
||||
# 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=/
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
|
||||
# Correct tar file order
|
||||
mkdir -p temp
|
||||
pushd temp
|
||||
tar xf ../$SOURCEDIST
|
||||
find dogecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||
popd
|
||||
|
||||
ORIGPATH="$PATH"
|
||||
# Extract the release tarball into a dir for each host and build
|
||||
for i in ${HOSTS}; do
|
||||
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
||||
mkdir -p distsrc-${i}
|
||||
cd distsrc-${i}
|
||||
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
||||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
||||
make ${MAKEOPTS}
|
||||
make install-strip DESTDIR=${INSTALLPATH}
|
||||
|
||||
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}
|
||||
cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate
|
||||
cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
|
||||
mv dist unsigned-app-${i}
|
||||
pushd unsigned-app-${i}
|
||||
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
|
||||
popd
|
||||
|
||||
make deploy
|
||||
${WRAP_DIR}/dmg dmg "${OSX_VOLNAME}.dmg" ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
|
||||
|
||||
cd installed
|
||||
find . -name "lib*.la" -delete
|
||||
find . -name "lib*.a" -delete
|
||||
rm -rf ${DISTNAME}/lib/pkgconfig
|
||||
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
||||
cd ../../
|
||||
done
|
||||
mkdir -p $OUTDIR/src
|
||||
mv $SOURCEDIST $OUTDIR/src
|
||||
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
|
38
contrib/gitian-descriptors/gitian-win-signer.yml
Normal file
38
contrib/gitian-descriptors/gitian-win-signer.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
name: "dogecoin-win-signer"
|
||||
suites:
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libssl-dev"
|
||||
- "autoconf"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
|
||||
"dir": "signature"
|
||||
files:
|
||||
- "osslsigncode_1.7.1.orig.tar.gz"
|
||||
- "osslsigncode-Backports-to-1.7.1.patch"
|
||||
- "dogecoin-win-unsigned.tar.gz"
|
||||
script: |
|
||||
BUILD_DIR=`pwd`
|
||||
SIGDIR=${BUILD_DIR}/signature/win
|
||||
UNSIGNED_DIR=${BUILD_DIR}/unsigned
|
||||
|
||||
echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 osslsigncode_1.7.1.orig.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
|
||||
cd osslsigncode-1.7.1
|
||||
patch -p1 < ${BUILD_DIR}/osslsigncode-Backports-to-1.7.1.patch
|
||||
|
||||
./configure --without-gsf --without-curl --disable-dependency-tracking
|
||||
make
|
||||
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
|
||||
INFILE="`basename "${i}"`"
|
||||
OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`"
|
||||
./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
|
||||
done
|
161
contrib/gitian-descriptors/gitian-win.yml
Normal file
161
contrib/gitian-descriptors/gitian-win.yml
Normal file
|
@ -0,0 +1,161 @@
|
|||
---
|
||||
name: "dogecoin-win-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "curl"
|
||||
- "g++"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
- "autoconf"
|
||||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bsdmainutils"
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "nsis"
|
||||
- "zip"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
- "rename"
|
||||
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"
|
||||
FAKETIME_PROGS="date makensis zip"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
HOST_CXXFLAGS="-O2 -g"
|
||||
|
||||
export QT_RCC_TEST=1
|
||||
export GZIP="-9n"
|
||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||
export TZ="UTC"
|
||||
export BUILD_DIR=`pwd`
|
||||
mkdir -p ${WRAP_DIR}
|
||||
if test -n "$GBUILD_CACHE_ENABLED"; then
|
||||
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
||||
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
|
||||
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
||||
fi
|
||||
|
||||
function 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 "\$REAL \$@" >> $WRAP_DIR/${prog}
|
||||
chmod +x ${WRAP_DIR}/${prog}
|
||||
done
|
||||
}
|
||||
|
||||
function 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 "\$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
|
||||
BASEPREFIX=`pwd`/depends
|
||||
# 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}"
|
||||
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=/
|
||||
make dist
|
||||
SOURCEDIST=`echo dogecoin-*.tar.gz`
|
||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
||||
|
||||
# Correct tar file order
|
||||
mkdir -p temp
|
||||
pushd temp
|
||||
tar xf ../$SOURCEDIST
|
||||
find dogecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
||||
mkdir -p $OUTDIR/src
|
||||
cp ../$SOURCEDIST $OUTDIR/src
|
||||
popd
|
||||
|
||||
ORIGPATH="$PATH"
|
||||
# Extract the release tarball into a dir for each host and build
|
||||
for i in ${HOSTS}; do
|
||||
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
||||
mkdir -p distsrc-${i}
|
||||
cd distsrc-${i}
|
||||
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
||||
mkdir -p ${INSTALLPATH}
|
||||
tar --strip-components=1 -xf ../$SOURCEDIST
|
||||
|
||||
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
|
||||
make ${MAKEOPTS}
|
||||
make ${MAKEOPTS} -C src check-security
|
||||
make deploy
|
||||
make install DESTDIR=${INSTALLPATH}
|
||||
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}
|
||||
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
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
name: "litecoin"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "nsis"
|
||||
- "faketime"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/litecoin-project/litecoin.git"
|
||||
"dir": "litecoin"
|
||||
files:
|
||||
- "qt-win32-4.8.3-gitian-r4.zip"
|
||||
- "boost-win32-1.54.0-gitian-r6.zip"
|
||||
- "bitcoin-deps-win32-gitian-r9.zip"
|
||||
script: |
|
||||
#
|
||||
STAGING=$HOME/staging
|
||||
HOST=i686-w64-mingw32
|
||||
#
|
||||
mkdir -p $STAGING
|
||||
cd $STAGING
|
||||
unzip ../build/qt-win32-4.8.3-gitian-r4.zip
|
||||
unzip ../build/boost-win32-1.54.0-gitian-r6.zip
|
||||
unzip ../build/bitcoin-deps-win32-gitian-r9.zip
|
||||
cd $HOME/build/
|
||||
#
|
||||
cd litecoin
|
||||
export PATH=$STAGING/host/bin:$PATH
|
||||
mkdir -p $OUTDIR/src
|
||||
git archive HEAD | tar -x -C $OUTDIR/src
|
||||
cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt
|
||||
cp $OUTDIR/src/COPYING $OUTDIR/COPYING.txt
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
ln -s $STAGING $HOME/qt
|
||||
$HOME/staging/host/bin/qmake -spec unsupported/win32-g++-cross MINIUPNPC_LIB_PATH=$STAGING MINIUPNPC_INCLUDE_PATH=$STAGING BDB_LIB_PATH=$STAGING BDB_INCLUDE_PATH=$STAGING BOOST_LIB_PATH=$STAGING BOOST_INCLUDE_PATH=$STAGING BOOST_LIB_SUFFIX=-mt-s BOOST_THREAD_LIB_SUFFIX=_win32-mt-s OPENSSL_LIB_PATH=$STAGING OPENSSL_INCLUDE_PATH=$STAGING QRENCODE_LIB_PATH=$STAGING QRENCODE_INCLUDE_PATH=$STAGING USE_QRCODE=1 INCLUDEPATH=$STAGING DEFINES=BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 QMAKE_LRELEASE=lrelease QMAKE_CXXFLAGS=-frandom-seed=litecoin USE_BUILD_INFO=1 USE_SSE2=1
|
||||
make $MAKEOPTS
|
||||
$HOST-strip release/litecoin-qt.exe
|
||||
cp release/litecoin-qt.exe $OUTDIR/
|
||||
#
|
||||
cd src
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$STAGING litecoind.exe USE_UPNP=0 DEBUGFLAGS="-frandom-seed=litecoin" USE_SSE2=1
|
||||
$HOST-strip litecoind.exe
|
||||
mkdir $OUTDIR/daemon
|
||||
cp litecoind.exe $OUTDIR/daemon
|
||||
cd ..
|
||||
mkdir nsis
|
||||
git archive HEAD | tar -x -C nsis
|
||||
cd nsis/src
|
||||
mkdir ../release
|
||||
cp ../../release/* ../release/
|
||||
cp ../../src/*.exe .
|
||||
makensis ../share/setup.nsi
|
||||
cp ../share/litecoin-*-win32-setup.exe $OUTDIR/
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
name: "litecoin"
|
||||
suites:
|
||||
- "lucid"
|
||||
architectures:
|
||||
- "i386"
|
||||
- "amd64"
|
||||
packages:
|
||||
- "libdb4.8++-dev"
|
||||
- "qt4-qmake"
|
||||
- "libqt4-dev"
|
||||
- "libboost-system-dev"
|
||||
- "libboost-filesystem-dev"
|
||||
- "libboost-program-options-dev"
|
||||
- "libboost-thread-dev"
|
||||
- "libssl-dev"
|
||||
- "git-core"
|
||||
- "unzip"
|
||||
- "pkg-config"
|
||||
- "libpng12-dev"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/litecoin-project/litecoin.git"
|
||||
"dir": "litecoin"
|
||||
files:
|
||||
- "miniupnpc-1.6.tar.gz"
|
||||
- "qrencode-3.2.0.tar.bz2"
|
||||
script: |
|
||||
INSTDIR="$HOME/install"
|
||||
export LIBRARY_PATH="$INSTDIR/lib"
|
||||
#
|
||||
tar xzf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
tar xjf qrencode-3.2.0.tar.bz2
|
||||
cd qrencode-3.2.0
|
||||
./configure --prefix=$INSTDIR --enable-static --disable-shared
|
||||
make $MAKEOPTS install
|
||||
cd ..
|
||||
#
|
||||
cd litecoin
|
||||
mkdir -p $OUTDIR/src
|
||||
git archive HEAD | tar -x -C $OUTDIR/src
|
||||
cp $OUTDIR/src/doc/README.md $OUTDIR
|
||||
cp $OUTDIR/src/COPYING $OUTDIR
|
||||
cd src
|
||||
make -f makefile.unix STATIC=1 OPENSSL_INCLUDE_PATH="$INSTDIR/include" OPENSSL_LIB_PATH="$INSTDIR/lib" $MAKEOPTS litecoind USE_UPNP=0 DEBUGFLAGS= USE_SSE2=1
|
||||
mkdir -p $OUTDIR/bin/$GBUILD_BITS
|
||||
install -s litecoind $OUTDIR/bin/$GBUILD_BITS
|
||||
cd ..
|
||||
qmake INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" RELEASE=1 USE_QRCODE=1 USE_SSE2=1
|
||||
make $MAKEOPTS
|
||||
install litecoin-qt $OUTDIR/bin/$GBUILD_BITS
|
|
@ -1,63 +0,0 @@
|
|||
---
|
||||
name: "qt"
|
||||
suites:
|
||||
- "precise"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "mingw-w64"
|
||||
- "g++-mingw-w64"
|
||||
- "zip"
|
||||
- "unzip"
|
||||
- "faketime"
|
||||
- "unzip"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes: []
|
||||
files:
|
||||
- "qt-everywhere-opensource-src-4.8.3.tar.gz"
|
||||
- "bitcoin-deps-win32-gitian-r9.zip"
|
||||
script: |
|
||||
#
|
||||
HOST=i686-w64-mingw32
|
||||
INSTDIR="$HOME/qt/"
|
||||
#
|
||||
mkdir $INSTDIR
|
||||
mkdir -p $INSTDIR/host/bin
|
||||
#
|
||||
# Need mingw-compiled openssl from bitcoin-deps:
|
||||
unzip bitcoin-deps-win32-gitian-r9.zip
|
||||
DEPSDIR=`pwd`
|
||||
#
|
||||
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz
|
||||
cd qt-everywhere-opensource-src-4.8.3
|
||||
sed 's/$TODAY/2011-01-30/' -i configure
|
||||
sed "s/i686-pc-mingw32-/$HOST-/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix "s|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/$HOST/include/ -frandom-seed=qtbuild|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix "s/QMAKE_MOC\t\t= $HOST-moc/QMAKE_MOC\t\t= moc/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix "s/QMAKE_RCC\t\t= $HOST-rcc/QMAKE_RCC\t\t= rcc/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
sed --posix "s/QMAKE_UIC\t\t= $HOST-uic/QMAKE_UIC\t\t= uic/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
# ar adds timestamps to every object file included in the static library
|
||||
# providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script...
|
||||
# which somehow cannot be combined with other flags.
|
||||
# use faketime only for ar, as it confuses make/qmake into hanging sometimes
|
||||
sed --posix "s|QMAKE_LIB\t\t= $HOST-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
|
||||
echo '#!/bin/bash' > $HOME/ar
|
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
|
||||
echo "$HOST-ar \"\$@\"" >> $HOME/ar
|
||||
chmod +x $HOME/ar
|
||||
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
export FAKETIME=$REFERENCE_DATETIME
|
||||
export TZ=UTC
|
||||
# Compile static libraries, and use statically linked openssl (-openssl-linked):
|
||||
OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTDIR -bindir $INSTDIR/host/bin -I $DEPSDIR/include -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60 -openssl-linked
|
||||
find . -name *.prl | xargs -l sed 's|/\.||' -i
|
||||
find . -name *.prl | xargs -l sed 's|/$||' -i
|
||||
make $MAKEOPTS install
|
||||
cd $INSTDIR
|
||||
find . -name *.prl | xargs -l sed 's|/$||' -i
|
||||
|
||||
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
|
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r4.zip *
|
|
@ -1,20 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.13 (GNU/Linux)
|
||||
|
||||
mQENBFHHt8wBCADfLkCS9624TrJ4pbFf5Cg88p0Sp7qofcPGjPa6K1Gs9cLfPHLu
|
||||
EX17YvS9zxdmdlogVDGQ3d82O2OrjDCr26yioZteHsK1oPdzgwQJ5tAGxlv75UiW
|
||||
BvhaDKXVfX+rdb+wnK3YMhynNQbG6pxQ0Q1Qujh6Xw0b1wbvg2FNEwpfHmL1ZoYd
|
||||
ba0w6eRmREBMrk50lp8pmDxWjc7+7SdKPxqWsPpWOJTaMBVQNSaVr7ePoCOKwFNI
|
||||
7CQiqMlGJUG1Zb7CnEkbiwNSwEi0VQkz8Ir8gBFzCTEgt2K1EGO8yo0Mq0hNTRdW
|
||||
bC14pamlbu/+nx+LAefSJ9sMx7n/uzTjI1uTABEBAAG0LUFudG9uIFllbWVseWFu
|
||||
b3YgPGFudG9uLnllbWVseWFub3ZAZ21haWwuY29tPokBOQQTAQIAIwUCUce3zAIb
|
||||
DwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEKFZZWb4e+YxUwIIAM7DoCnv
|
||||
lJXX5+z9My0RBIpd99if1udXBVtVxPgaF7lDDIaKY2cBktyXBp/R/G8arYRc9zIK
|
||||
e+0bY+POpTrfMoTioqbiwoxPwhkXu39KwvPfSWY1UBQHTcMpFibMuFjRu6YrAEZ2
|
||||
ZH+CrLcmn6rB66uVm3OPE55sKdAL9C+TGIKU/GIRgQzI3S9/DT8E/F4Oifx/V9sh
|
||||
V2flIXU2QBH4ZOP0G+OTp6QXZRD9TBfmrYRMU+yL5sYMalCjwz79ZZua50CQI5hN
|
||||
5pEBvHxZ4GziWc5V40GSv1RnM/mGgrdmBlzej34OLjfEac2PCrZy8+FnQf04Lhvn
|
||||
cRQpj+5V0a6RIfKIRgQQEQIABgUCUciczAAKCRBr3f6OVKKs8dqgAJ94zRvs99HM
|
||||
pItL1r8v8vS5lXZrHgCfXy5V7AFtL8XvZlPC0uQqdyWKzHo=
|
||||
=Bp2a
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue