Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with the main repo #121

Merged
merged 1,247 commits into from
May 28, 2022
Merged
Changes from all commits
Commits
Show all changes
1247 commits
Select commit Hold shift + click to select a range
fa76b2f
ci: Avoid boost test warnings
Mar 29, 2022
0bca5f2
[net processing] PushNodeVersion() takes a const Peer&
jnewbery Mar 29, 2022
a40978d
[fuzz] Assert that Peer.m_tx_relay.m_relay_txs has been set correctly
jnewbery Mar 29, 2022
ecf692b
Merge bitcoin/bitcoin#24540: ci: Integrate ccache into MSVC build
Mar 29, 2022
aeee419
wallet, refactor: Add wallet::NotifyWalletLoaded() function
hebasto Mar 29, 2022
49090ec
Add sendall RPC née sweep
murchandamus Jan 12, 2022
bb84b71
add tests for no recipient and using send_max while inputs are specified
ishaanam Feb 21, 2022
1764849
doc: Speed up functional test runs using ramdisk
willcl-ark Mar 29, 2022
f089a08
Merge bitcoin/bitcoin#24692: refactoring: [Net Processing] Follow-ups…
fanquake Mar 30, 2022
f4fba57
Merge bitcoin/bitcoin#24704: compat: remove strnlen back-compat code
Mar 30, 2022
7c9fe25
wallet: move Assert() check into constructor
ajtowns Mar 26, 2022
896beca
Merge bitcoin/bitcoin#24708: ci: Avoid boost test warnings
fanquake Mar 30, 2022
bdbabc5
Merge bitcoin/bitcoin#24561: guix: use LIEF 0.12.0
laanwj Mar 30, 2022
f9aedbc
Merge bitcoin/bitcoin#24690: util: Add inotify_rm_watch to syscall sa…
fanquake Mar 30, 2022
fa73f8a
ci: Use clang-12 and libcxx-12 for msan
Sep 17, 2021
dc0774c
build, test: Fix test logfile name
hebasto Mar 30, 2022
8b517fa
build, refactor: Replace tabs with spaces
hebasto Mar 30, 2022
50c806f
Merge bitcoin/bitcoin#24693: builder-keys: Add dunxen
laanwj Mar 30, 2022
171f6f2
Merge bitcoin/bitcoin#24374: contrib: refactor: simplify linearize sc…
laanwj Mar 30, 2022
0598f36
refactor: account for requiring libevent 2.1.8+
fanquake Mar 30, 2022
f4e5d70
Merge bitcoin/bitcoin#24118: Add 'sendall' RPC née sweep
Mar 30, 2022
2ef47ba
util/check: stop using lambda for Assert/Assume
ajtowns Mar 26, 2022
71038a1
rpc: Fix documentation assertion for `getrawtransaction`
laanwj Mar 30, 2022
21520b9
fuzz: add target for coinselection
mzumsande Mar 17, 2022
74b011b
Merge bitcoin/bitcoin#23008: ci: Use clang-12 and libcxx-12 for msan
fanquake Mar 30, 2022
828a094
refactor: merge ScriptPubKeyToUniv & ScriptToUniv into one function
mjdietzx Sep 28, 2021
22f25a6
refactor: prefer snake case, TxToUniv arg hashBlock renamed block_hash
mjdietzx Sep 29, 2021
8b9efeb
refactor: use named args when ScriptToUniv or TxToUniv are invoked
mjdietzx Sep 29, 2021
9563a64
refactor: add stdd:: includes to core_write
fanquake Mar 30, 2022
0c12f01
wallet: Postpone NotifyWalletLoaded() for encrypted wallets
hebasto Mar 29, 2022
87dc1dc
Merge bitcoin/bitcoin#24714: util/check: Don't use a lambda for Asser…
Mar 31, 2022
d2b4355
Merge bitcoin/bitcoin#24715: build, test: Fix test logfile name
Mar 31, 2022
a2e1590
Merge bitcoin/bitcoin#24673: refactor: followup of remove -deprecated…
Mar 31, 2022
e1e6a33
Merge bitcoin/bitcoin#24707: doc: Speed up functional test runs using…
Mar 31, 2022
c8ac7e6
Merge bitcoin/bitcoin#24698: test: -peerblockfilters without -blockfi…
Mar 31, 2022
1a54c06
Merge bitcoin/bitcoin#24716: rpc: Fix documentation assertion for `ge…
Mar 31, 2022
fa58427
doc: Use DecodeTxDoc helper
Mar 31, 2022
3b82608
options: add a comment for -listenonion and dedup a long expression
vasild Mar 24, 2022
243197b
Merge bitcoin/bitcoin#24721: doc: Use DecodeTxDoc helper
Mar 31, 2022
bf77fea
test: fix incorrect named args in txpackage tests
fanquake Mar 24, 2022
b7d78e6
Merge bitcoin/bitcoin#24711: wallet: Postpone wallet loading notifica…
achow101 Mar 31, 2022
1021e4c
Merge bitcoin/bitcoin#24602: fuzz: add target for coinselection algor…
achow101 Mar 31, 2022
a24ef27
build: patch around qt duplicate symbol issue
fanquake Mar 31, 2022
0add4db
util/check: avoid unused parameter warnings
ajtowns Apr 1, 2022
7ab9fc3
Merge bitcoin/bitcoin#24724: test: fix incorrect named args in txpack…
Apr 1, 2022
7762c56
build: Fix "ERR: Unsigned tarballs do not exist"
hebasto Apr 1, 2022
4d4dca4
test: add regression test for bitcoin-core/gui/issues/567
vasild Mar 24, 2022
fa38b1c
Remove buggy and confusing IncrementExtraNonce
Apr 1, 2022
afac75f
Merge bitcoin/bitcoin#24733: build: Fix "ERR: Unsigned tarballs do no…
laanwj Apr 1, 2022
3d70c05
build: remove faketime unsetting and comments from configure.ac
fanquake Mar 29, 2022
d6fae98
guix: fix vmov alignment issues with gcc 10.3.0 & mingw-w64
fanquake Apr 1, 2022
a7f0c37
Merge bitcoin/bitcoin#24722: build: patch around qt duplicate symbol …
fanquake Apr 1, 2022
87f3c04
doc: remove incorrect mention of PR_GET_NAME
fanquake Apr 1, 2022
e8fc236
refactor: add missing std:: includes to threadnames.cpp
fanquake Apr 1, 2022
19538dd
Add concrete steps in doc/cjdns.md to easily find a friend
jonatack Mar 29, 2022
6a02355
Add and improve informational links in doc/cjdns.md
jonatack Mar 29, 2022
ef20add
build, qt: bump Qt5 version to 5.15.3
prusnak Mar 25, 2022
826cbc4
build, qt: drop fix_no_printer.patch
hebasto Mar 26, 2022
7f60428
build, qt: use one patch per line in depends/packages/qt.mk
prusnak Apr 1, 2022
09f32cf
[docs] package feerate
glozow Jan 21, 2022
03251b6
Merge bitcoin/bitcoin#24594: doc: update release-process.md
fanquake Apr 2, 2022
d018db9
Merge bitcoin/bitcoin#24740: doc: remove incorrect mention of PR_GET_…
fanquake Apr 2, 2022
0d01272
build: don't use Boost multi_index serialization
fanquake Mar 14, 2022
e40779a
refactor: Remove outdated libevent logging code
fjahr Apr 2, 2022
55ea6fd
Merge bitcoin/bitcoin#24738: build: remove faketime unsetting and com…
fanquake Apr 2, 2022
bc7cc57
doc: explain why we clear CXXFLAGS with enable-debug
fanquake Feb 18, 2022
31b1c67
Merge bitcoin-core/gui#557: Revert "qt: Do not use QObject::tr plural…
hebasto Apr 3, 2022
112a7ab
refactor: remove macOS MAP_ANONYMOUS work around
fanquake Apr 3, 2022
35c3fd4
build: stop overriding user CPPFLAGS
fanquake Feb 17, 2022
3e2ef23
build: stop overriding user LDFLAGS
fanquake Feb 17, 2022
7b00595
build: stop overriding user CXXFLAGS
fanquake Feb 17, 2022
62efdfb
Merge bitcoin/bitcoin#24558: build: explicitly disable Boost multi_in…
Apr 4, 2022
37a16ff
refactor: fix clang-tidy named args usage
fanquake Apr 2, 2022
0da559e
Merge bitcoin/bitcoin#24661: refactor: Use clang-tidy syntax for C++ …
Apr 4, 2022
52f0f7a
Merge bitcoin/bitcoin#24668: build, qt: bump Qt5 version to 5.15.3
fanquake Apr 4, 2022
7c218da
build: specify cmake build dir for multiprocess depends build
fanquake Apr 4, 2022
b0740fd
ci: use DWARF-4 for Valgrind CI job
fanquake Apr 1, 2022
15893a0
supp: remove Boost Valgrind suppression
fanquake Feb 19, 2022
83b26cb
Merge bitcoin/bitcoin#24736: guix: fix vmov alignment issues with gcc…
laanwj Apr 4, 2022
fab24f8
ci: Add clang-tidy task
Apr 4, 2022
67dc002
Merge bitcoin/bitcoin#24735: ci: use DWARF-4 for Valgrind jobs
Apr 4, 2022
6348bc6
Merge bitcoin/bitcoin#24746: refactor: remove macOS MAP_ANONYMOUS wor…
laanwj Apr 4, 2022
4faf7a1
Merge bitcoin/bitcoin#24729: util/check: avoid unused parameter warnings
Apr 4, 2022
d2ba43f
test: use MiniWallet for mempool_unbroadcast.py
ayush933 Apr 4, 2022
47bac47
Merge bitcoin-core/gui#569: test: add regression test for #567
hebasto Apr 4, 2022
fa82e89
Move lint script and data file to avoid lint- prefix
Apr 4, 2022
fae211c
lint: Start to use py lint scripts
Apr 4, 2022
4262100
Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts
Apr 5, 2022
24c6b20
Merge bitcoin/bitcoin#24583: doc: Add template for empty release notes
Apr 5, 2022
44e7d6d
Merge bitcoin/bitcoin#24754: build: specify cmake build dir for multi…
fanquake Apr 5, 2022
0baf6ad
Merge bitcoin/bitcoin#24391: build: stop overriding user autoconf flags
fanquake Apr 5, 2022
39a34b6
Put lock logging behind DEBUG_LOCKCONTENTION preprocessor directive
jonatack Apr 1, 2022
4394733
Add DEBUG_LOCKCONTENTION documentation to the developer notes
jonatack Apr 4, 2022
cccc4e8
Remove nHeightEnd and nHeight in generateBlocks helper
Apr 5, 2022
d492dc1
Merge bitcoin/bitcoin#24147: Miniscript integration
laanwj Apr 5, 2022
fa0c2aa
init: Disable syscall sandbox in the bitcoin-qt process
Apr 4, 2022
fabdf9f
Remove gui-only syscalls
Apr 4, 2022
ee9af95
Merge bitcoin/bitcoin#24749: test: use MiniWallet for mempool_unbroad…
Apr 5, 2022
f421de5
Merge bitcoin/bitcoin#24236: Remove utxo db upgrade code
laanwj Apr 5, 2022
dac6936
build: perform all .tiff copying in macdeployqtplus
fanquake Jan 5, 2022
fe66dad
Merge bitcoin/bitcoin#24710: Add concrete steps in doc/cjdns.md to ea…
laanwj Apr 5, 2022
3d41521
build: perform /Applications symlink generation in macdeployqtplus
fanquake Jan 5, 2022
9ce1c50
Merge bitcoin/bitcoin#24216: validation: improve connect bench logging
laanwj Apr 5, 2022
a4f4f89
Replace uint256 specific implementations of base_uint::GetHex() and b…
TheQuantumPhysicist Jan 15, 2022
2391fb7
build, refactor: Add set_properties() to msvc-autogen.py
hebasto Apr 5, 2022
ba0bf79
build: Do not modify `common.init.vcxproj` directly
hebasto Apr 5, 2022
f959fc0
Update /<count>/ endpoints to use a '?count=' query parameter instead
stickies-v Jan 27, 2022
54b39cf
Add release notes
stickies-v Jan 18, 2022
7d755bb
contrib: testgen: avoid need for manually setting PYTHONPATH
theStack Mar 15, 2022
11c63e3
contrib: testgen: import OP_* constants from test framework
theStack Mar 15, 2022
605fecf
scripted-diff: rename `chars` to `b58chars` in test_framework.address
theStack Mar 15, 2022
219d2c7
contrib: testgen: use base58 methods from test framework
theStack Mar 15, 2022
65c49ac
test: throw `ValueError` for invalid base58 checksum
theStack Apr 5, 2022
15220ec
Merge bitcoin/bitcoin#24775: build: Do not modify `common.init.vcxpro…
Apr 5, 2022
77f98df
lint: convert spell check lint test to python
fjahr Apr 4, 2022
4685463
doc: Update lint test docs
fjahr Apr 4, 2022
17a8ffd
[packages/policy] use package feerate in package validation
glozow Jul 20, 2021
1b93748
[validation] try individual validation before package validation
glozow Jan 25, 2022
51edcff
[unit test] package feerate and package cpfp
glozow Jan 25, 2022
9bebf35
[validation] don't package validate if not policy or missing inputs
glozow Feb 23, 2022
076cd68
lint: Convert Python dead code linter to Python
fjahr Apr 5, 2022
c9c4e6c
build: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally
hebasto Feb 14, 2022
d3ff026
Merge bitcoin/bitcoin#24778: lint: Convert Python dead code linter te…
Apr 6, 2022
70c5220
Merge bitcoin/bitcoin#24766: lint: convert spellchecking lint test to…
Apr 6, 2022
27cfaee
Merge bitcoin/bitcoin#24098: rest: Use query parameters to control re…
Apr 6, 2022
372f1a3
Merge bitcoin/bitcoin#24753: ci: Add clang-tidy task
fanquake Apr 6, 2022
79bf1a0
Merge bitcoin/bitcoin#24732: Remove buggy and confusing IncrementExtr…
Apr 6, 2022
f3e3563
Merge bitcoin/bitcoin#24652: doc: rewrite OpenBSD build docs for 7.0
fanquake Apr 6, 2022
c5c4fb3
Merge bitcoin/bitcoin#24758: Disable the syscall sandbox for bitcoin-…
laanwj Apr 6, 2022
696d394
Merge bitcoin/bitcoin#24669: build: further consolidate macOS deployment
laanwj Apr 6, 2022
b307279
Merge bitcoin/bitcoin#24552: guix: make it possible to override gpg b…
laanwj Apr 6, 2022
faa7ae8
ci: Build all optional tools in tidy task
Apr 6, 2022
6c9460e
Merge bitcoin/bitcoin#24358: test: USDT tracepoint interface tests
laanwj Apr 6, 2022
bbb83f0
Merge bitcoin/bitcoin#24145: mempool: Clear vTxHashes when mapTx is c…
laanwj Apr 6, 2022
d906329
Merge bitcoin/bitcoin#24681: build: Bump libevent minimum version up …
fanquake Apr 6, 2022
fff9141
refactor: Remove deduplication of data in rollingbloom bench
phyBrackets Feb 19, 2022
10f629e
Merge bitcoin/bitcoin#24576: contrib: testgen: remove redundant base5…
fanquake Apr 6, 2022
4105a54
lint: remove boost::bind linter
fanquake Apr 6, 2022
c02a3da
Merge bitcoin/bitcoin#24779: ci: Build all optional dependencies in t…
fanquake Apr 6, 2022
ce33194
Merge bitcoin/bitcoin#24785: lint: remove boost::bind lint
Apr 6, 2022
ffffb7a
doc: Convert remaining comments to clang-tidy format
Apr 6, 2022
41720a1
Merge bitcoin/bitcoin#24786: doc: Convert remaining comments to clang…
fanquake Apr 6, 2022
b72925e
lint: remove qt SIGNAL/SLOT lint
fanquake Apr 6, 2022
afb7a6f
Squashed 'src/secp256k1/' changes from 0559fc6e41..8746600eec
fanquake Apr 6, 2022
2619657
Update secp256k1 subtree to latest upstream master
fanquake Apr 6, 2022
0f7dc89
test: compare `/chaininfo` response with `getblockchaininfo` RPC
brunoerg Apr 6, 2022
ba44aae
gui: add test runner summary
jonatack Apr 6, 2022
2489b6f
gui: count test failures in test runner summary
jonatack Apr 6, 2022
d025d7f
gui, refactor: rename fInvalid to num_test_failures in test_main.cpp
jonatack Apr 6, 2022
d844b5e
Merge bitcoin/bitcoin#24152: policy / validation: CPFP fee bumping wi…
fanquake Apr 7, 2022
5c80d9b
Merge bitcoin/bitcoin#24790: lint: remove qt SIGNAL/SLOT lint
fanquake Apr 7, 2022
323d4c0
Merge bitcoin/bitcoin#24784: refactor: deduplicate integer serializat…
Apr 7, 2022
eaf712c
lint: codespell 2.1.0
fanquake Apr 6, 2022
38031ad
lint: flake8 4.0.1
fanquake Apr 6, 2022
864772c
lint: mypy 0.942
fanquake Apr 7, 2022
f87f259
refactor: fixup named args in txpackage tests
fanquake Apr 7, 2022
38d3d0b
Merge bitcoin/bitcoin#24796: lint: misc updates & fixes
Apr 7, 2022
d960d4f
build: fix MSVC build after subtree update
dhruv Feb 1, 2022
2656629
build: remove --enable-experimental from libsecp256k1 configure
fanquake Mar 29, 2022
ee30bf7
build: remove some no-longer-needed var unexporting from configure
fanquake Mar 17, 2022
404c530
key: use secp256k1_schnorrsig_sign32 over deprecated secp256k1_schnor…
fanquake Mar 29, 2022
88917f9
RPC: Switch getblockfrompeer back to standard param name blockhash
luke-jr Feb 9, 2022
c1059c9
Merge bitcoin/bitcoin#24770: Put lock logging behind DEBUG_LOCKCONTEN…
fanquake Apr 8, 2022
e0680bb
Merge bitcoin/bitcoin#24806: RPC: Switch getblockfrompeer back to sta…
fanquake Apr 8, 2022
8b3f1e3
Update RPC argument and field naming guideline in developer notes
jonatack Apr 8, 2022
0cea7b1
print `(none)` if no warnings in -getinfo
1440000bytes Mar 21, 2022
e8e48fa
Converted lint-python-mutable-default-parameters.sh to python
Apr 7, 2022
6f1e162
qt: Fix headers
hebasto Apr 8, 2022
c7add88
qt: Use `|` instead of `+` for key modifiers
hebasto Apr 8, 2022
6312575
qt: Update deprecated enum value
hebasto Apr 8, 2022
87c7dcc
Merge bitcoin/bitcoin#24808: doc: update RPC argument and field namin…
Apr 9, 2022
747cdf1
Merge bitcoin/bitcoin#24792: Update libsecp256k1 subtree to current m…
fanquake Apr 9, 2022
494455f
test: use MiniWallet for feature_fee_estimation.py
theStack Apr 9, 2022
4a58b6a
Merge bitcoin/bitcoin#24797: test: compare `/chaininfo` response with…
Apr 11, 2022
cd110cd
Merge bitcoin/bitcoin#24817: test: use MiniWallet for feature_fee_est…
Apr 11, 2022
22e3b6f
Merge bitcoin/bitcoin#24800: lint: convert lint-python-mutable-defaul…
Apr 11, 2022
7626e54
Merge bitcoin/bitcoin#24337: build: Do not define `PROVIDE_FUZZ_MAIN_…
fanquake Apr 11, 2022
795dd70
builder-keys: Add will8clark
willcl-ark Apr 11, 2022
2b5a741
Merge bitcoin/bitcoin#24826: builder-keys: Add will8clark
fanquake Apr 11, 2022
dde33ec
test: determine path to `bitcoin-util` in test framework
theStack Apr 11, 2022
449b96e
test: add `is_bitcoin_util_compiled` helper
theStack Apr 11, 2022
0f46e73
Merge bitcoin-core/gui#543: peers-tab: add connection duration column…
hebasto Apr 12, 2022
f509760
Merge bitcoin-core/gui#576: Add qt unit test runner summary
hebasto Apr 12, 2022
f60a63c
Merge bitcoin-core/gui#577: Getting ready to Qt 6 (1/n)
hebasto Apr 12, 2022
457148a
guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues
fanquake Apr 13, 2022
66d58ad
qt, refactor: remove unused field `qint64 TransactionStatus::open_for`
w0xlt Feb 21, 2022
343f83d
qt, refactor: Use member initializers in TransactionStatus
w0xlt Feb 18, 2022
3bbc46d
Merge bitcoin/bitcoin#24632: add `(none)` in -getinfo `Warnings:` if …
laanwj Apr 13, 2022
9b7eb58
Merge bitcoin/bitcoin#24285: build, refactor: Drop useless `call` Mak…
laanwj Apr 13, 2022
decde9b
Merge bitcoin/bitcoin#24355: util, refactor: Add UNIQUE_NAME helper m…
laanwj Apr 13, 2022
5561f17
ci: Make Qt configure option change invalidate "msvc_qt_built_cache"
hebasto Apr 13, 2022
ca40d64
ci: Bump vcpkg to the latest version
hebasto Apr 13, 2022
b2c3d10
Revert "build: Specify `zeromq` port explicitly for MSVC builds"
hebasto Apr 13, 2022
038d2a6
test: add test for signet miner script
theStack Mar 14, 2022
e9d2771
lint: Convert lint-logs.sh to Python
Kvaciral Apr 14, 2022
d0f7493
Merge bitcoin/bitcoin#24849: lint: Convert lint-logs.sh to Python
Apr 4, 2022
8e3c266
Merge bitcoin/bitcoin#24077: util: Make base_uint::GetHex() and base_…
laanwj Apr 14, 2022
6c9bc14
Merge bitcoin/bitcoin#24842: guix: fix GCC 10.3.0 + mingw-w64 setjmp/…
laanwj Apr 14, 2022
1e3ed01
Merge bitcoin/bitcoin#23416: doc: Remove fee delta TODO from txmempoo…
laanwj Apr 14, 2022
b69fd5e
Merge bitcoin/bitcoin#22052: net: remove non-blocking bool from inter…
laanwj Apr 14, 2022
7f65088
depends: Add file-based logging for individual packages
hebasto Jan 3, 2022
86c2889
ci: Make log verbose in error case only
hebasto Jan 3, 2022
cf0a8b9
Merge bitcoin/bitcoin#24559: test: add test for signet miner script
laanwj Apr 14, 2022
e14f0fa
Merge bitcoin/bitcoin#19952: build, ci: Add file-based logging for in…
laanwj Apr 14, 2022
c457fb1
improve clarity and up max ipv6 ASNs
RF5 Apr 10, 2022
7da4f65
Merge bitcoin/bitcoin#24818: net: improve and address issues in makes…
laanwj Apr 15, 2022
333a418
Merge bitcoin/bitcoin#24172: doc: Add pre-splitoff translation update…
laanwj Apr 15, 2022
012d33f
Merge bitcoin/bitcoin#24847: ci: Bump vcpkg to the latest version `20…
Apr 15, 2022
7190de9
Merge bitcoin-core/gui#552: Refactor `TransactionDesc::FormatTxStatus…
hebasto Apr 15, 2022
b1a73db
Revert "qml: update UI elements to use Theme color definitions"
hebasto May 26, 2022
b420a7d
Revert "qml: Used verificationProgress in stub.qml"
hebasto May 26, 2022
c60866c
Revert "qml: demo Header control"
hebasto May 26, 2022
dd47039
Revert "scripted-diff: Bump Qt Quick module versions"
hebasto May 26, 2022
ed06305
Revert "qml: Demo ProgressIndicator control"
hebasto May 26, 2022
2668eff
Revert "qml: Show ConnectionOptions"
hebasto May 26, 2022
23609ef
Revert "qml: Use ColumnLayout in application window"
hebasto May 26, 2022
737cb7c
Revert "qml: Drop import qualifier BitcoinCoreComponents"
hebasto May 26, 2022
d99a5b2
Revert "doc: Drop unneeded runtime dependencies"
hebasto May 26, 2022
dccd6d8
Revert "multiprocess: add new bitcoin-qt init implementation to qml-gui"
hebasto May 26, 2022
556c4f1
Revert "qml: Set tab focus behavior"
hebasto May 26, 2022
0107368
Revert "qml: Drop erroneous `#include <QStringLiteral>`"
hebasto May 26, 2022
f1b624f
Revert "qml, doc: Add import QtQuick.Layouts"
hebasto May 26, 2022
7aa5302
Revert "qml: Add qInstallMessageHandler"
hebasto May 26, 2022
efc8b24
Revert "build, qt: Apply workaround for Qt build system bug for riscv64"
hebasto May 26, 2022
412346a
Revert "build, qml: Add qtquickcontrols2 module"
hebasto May 26, 2022
e6dee72
Revert "build, qml: Add qtdeclarative module"
hebasto May 26, 2022
feb2519
Revert "ci: Replace bionic with hirsute for system Qt 5.15.2"
hebasto May 26, 2022
02e0a91
Revert "ci, qml: Add required Qt Quick dev packages"
hebasto May 26, 2022
1712848
Revert "build, qml: Fix compiling with GCC 11"
hebasto May 26, 2022
d0b5f3e
Revert "ci: temporarily disable failing ci task"
hebasto May 26, 2022
f58cc12
Merge commit '7190de9fb889bc14cfe8f697ae05e751c6bda54b' into main
hebasto May 26, 2022
3fc6ec8
depends, qml: Add Qt 5.15.3 Declarative module
hebasto May 26, 2022
c983645
depends, qml: Add Qt 5.15.3 Quick Controls 2 module
hebasto May 26, 2022
7902e08
build, qml: Update bitcoin_qt.m4 with QML paths and plugins
hebasto May 26, 2022
46af006
qml: Import static plugins
hebasto May 26, 2022
d51ac6c
doc, qml: Update runtime dependencies
hebasto May 26, 2022
ae5a391
qml: Add import QtQuick.Layouts
hebasto May 26, 2022
d0a2ce6
qml: Add qInstallMessageHandler
hebasto Oct 2, 2021
8eba071
qml: Set tab focus behavior
promag Oct 21, 2021
b69bc29
multiprocess: add new bitcoin-qt init implementation to qml-gui
jarolrod Oct 27, 2021
64e6154
qml: Drop import qualifier BitcoinCoreComponents
promag Oct 21, 2021
18db286
qml: Use ColumnLayout in application window
promag Oct 22, 2021
34e2ee1
qml: Show ConnectionOptions
promag Oct 22, 2021
915ed0e
qml: Demo ProgressIndicator control
promag Oct 22, 2021
a32fa30
scripted-diff: Bump Qt Quick module versions
hebasto Dec 24, 2021
61380a5
qml: demo Header control
jarolrod Jan 3, 2022
328bf76
qml: Used verificationProgress in stub.qml
shaavan Jan 6, 2022
dbcd29a
qml: update UI elements to use Theme color definitions
jarolrod Jan 6, 2022
a92f553
ci, qml: Add required Qt Quick dev packages
hebasto May 27, 2022
229c56b
ci: Fix Win64 task
hebasto May 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
82 changes: 53 additions & 29 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ env: # Global defaults
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
MAKEJOBS: "-j10"
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
@@ -71,6 +72,19 @@ task:
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV

task:
name: 'tidy [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:jammy
cpu: 2
memory: 5G
# For faster CI feedback, immediately schedule the linters
<< : *CREDITS_TEMPLATE
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"

task:
name: "Win64 native [msvc]"
<< : *FILTER_TEMPLATE
@@ -82,14 +96,17 @@ task:
env:
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
PYTHONUTF8: 1
CI_VCPKG_TAG: '2021.05.12'
CI_VCPKG_TAG: '2022.04.12'
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3'
QTBASEDIR: 'C:\Qt_static'
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
IgnoreWarnIntDirInTempDetected: 'true'
merge_script:
- git config --global user.email "ci@ci.ci"
@@ -104,7 +121,7 @@ task:
folder: "%QTBASEDIR%"
reupload_on_changes: false
fingerprint_script:
- echo %QT_DOWNLOAD_URL%
- echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND%
- msbuild -version
populate_script:
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
@@ -116,7 +133,7 @@ task:
- cd %QT_SOURCE_DIR%
- mkdir build
- cd build
- ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix %QTBASEDIR%
- '%QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%'
- jom
- jom install
vcpkg_tools_cache:
@@ -130,12 +147,17 @@ task:
reupload_on_changes: true
fingerprint_script:
- echo %CI_VCPKG_TAG%
- type build_msvc\vcpkg.json
- msbuild -version
populate_script:
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
install_python_script:
ccache_cache:
folder: '%CCACHE_DIR%'
install_tools_script:
- choco install --yes --no-progress ccache
- choco install --yes --no-progress python3 --version=3.9.6
- pip install zmq
- ccache --version
- python -VV
install_vcpkg_script:
- cd ..
@@ -147,9 +169,12 @@ task:
- .\vcpkg integrate install
- .\vcpkg version
build_script:
- '%x64_NATIVE_TOOLS%'
- cd %CIRRUS_WORKING_DIR%
- ccache --zero-stats
- python build_msvc\msvc-autogen.py
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- ccache --show-stats
unit_tests_script:
- src\test_bitcoin.exe -l test_suite
- src\bench_bitcoin.exe > NUL
@@ -176,11 +201,11 @@ task:
QEMU_USER_CMD: "" # Disable qemu and run the test natively

task:
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
alias: win64
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
@@ -189,23 +214,23 @@ task:
insecure_win_gui_artifacts:
path: "insecure_win_gui.exe"

#task:
# name: '32-bit + dash [gui] [CentOS 8]'
# << : *GLOBAL_TASK_TEMPLATE
# container:
# image: centos:8
# env:
# << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
# PACKAGE_MANAGER_INSTALL: "yum install -y"
# FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
task:
name: '32-bit + dash [gui] [CentOS 8]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: quay.io/centos/centos:stream8
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
PACKAGE_MANAGER_INSTALL: "yum install -y"
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"

task:
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [hirsute]'
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bullseye]'
previous_releases_cache:
folder: "releases"
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:hirsute
image: debian:bullseye
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
@@ -242,11 +267,10 @@ task:
MAKEJOBS: "-j4" # Avoid excessive memory use

task:
name: '[fuzzer,address,undefined,integer, no depends] [focal]'
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH
name: '[fuzzer,address,undefined,integer, no depends] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
cpu: 4 # Increase CPU and memory to avoid timeout
memory: 16G
env:
@@ -265,13 +289,13 @@ task:
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"

task:
name: '[no wallet] [bionic]'
name: '[no wallet, libbitcoinkernel] [bionic]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:bionic
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

task:
name: 'macOS 10.15 [gui, no tests] [focal]'
@@ -284,7 +308,7 @@ task:
container:
image: ubuntu:focal
env:
MACOS_SDK: "Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers"
MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
copy_artifacts_script:
@@ -299,9 +323,9 @@ task:
brew_install_script:
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
<< : *GLOBAL_TASK_TEMPLATE
osx_instance:
macos_instance:
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
image: monterey-xcode-13.2 # https://cirrus-ci.org/guide/macOS
image: monterey-xcode-13.3 # https://cirrus-ci.org/guide/macOS
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
CI_USE_APT_INSTALL: "no"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ src/bitcoin-gui
src/bitcoin-node
src/bitcoin-tx
src/bitcoin-util
src/bitcoin-chainstate
src/bitcoin-wallet
src/test/fuzz/fuzz
src/test/test_bitcoin
@@ -150,3 +151,5 @@ osx_volname
dist/

/guix-build-*

/ci/scratch/
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[bitcoin.qt-translation-022x]
[bitcoin.qt-translation-023x]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en
29 changes: 19 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ revolves around a meritocracy where contributors earn trust from the developer
community over time. Nevertheless, some hierarchy is necessary for practical
purposes. As such, there are repository "maintainers" who are responsible for
merging pull requests, as well as a "lead maintainer" who is responsible for the
release cycle as well as overall merging, moderation and appointment of
maintainers.
[release cycle](/doc/release-process.md) as well as overall merging, moderation
and appointment of maintainers.

Getting Started
---------------
@@ -153,7 +153,8 @@ the pull request affects. Valid areas as:
- `test`, `qa` or `ci` for changes to the unit tests, QA tests or CI code
- `util` or `lib` for changes to the utils or libraries
- `wallet` for changes to the wallet code
- `build` for changes to the GNU Autotools or reproducible builds
- `build` for changes to the GNU Autotools or MSVC builds
- `guix` for changes to the GUIX reproducible builds

Examples:

@@ -189,9 +190,14 @@ in the body of the pull request to indicate tasks are pending.

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 all feedback.
to your fork.

Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NACK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes.
You are expected to reply to any review comments before your pull request is
merged. You may update the code or reject the feedback if you do not agree with
it, but you should express so in a reply. If there is outstanding feedback and
you are not actively working on it, your pull request may be closed.

Please refer to the [peer review](#peer-review) section below for more details.

### Squashing Commits

@@ -322,6 +328,14 @@ maintainers take into account the peer review when determining if there is
consensus to merge a pull request (remember that discussions may have been
spread out over GitHub, mailing list and IRC discussions).

Code review is a burdensome but important part of the development process, and
as such, certain types of pull requests are rejected. In general, if the
**improvements** do not warrant the **review effort** required, the PR has a
high chance of being rejected. It is up to the PR author to convince the
reviewers that the changes warrant the review effort, and if reviewers are
"Concept NACK'ing" the PR, the author may need to present arguments and/or do
research backing their suggested changes.

#### Conceptual Review

A review can be a conceptual review, where the reviewer leaves a comment
@@ -422,11 +436,6 @@ https://github.com/bitcoin/bitcoin/pull/16189).
Also see the [backport.py script](
https://github.com/bitcoin-core/bitcoin-maintainer-tools#backport).

Release Policy
--------------

The project leader is the release manager for each Bitcoin Core release.

Copyright
---------

20 changes: 4 additions & 16 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ OSX_APP=Bitcoin-Qt.app
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
OSX_DMG = $(OSX_VOLNAME).dmg
OSX_TEMP_ISO = $(OSX_DMG:.dmg=).temp.iso
OSX_BACKGROUND_IMAGE=$(top_srcdir)/contrib/macdeploy/background.tiff
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
@@ -48,7 +47,8 @@ DIST_CONTRIB = \
$(top_srcdir)/test/sanitizer_suppressions/tsan \
$(top_srcdir)/test/sanitizer_suppressions/ubsan \
$(top_srcdir)/contrib/linearize/linearize-data.py \
$(top_srcdir)/contrib/linearize/linearize-hashes.py
$(top_srcdir)/contrib/linearize/linearize-hashes.py \
$(top_srcdir)/contrib/signet/miner

DIST_SHARE = \
$(top_srcdir)/share/genbuild.sh \
@@ -64,7 +64,6 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
$(top_srcdir)/doc/README_windows.txt

OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh

COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \
@@ -130,28 +129,17 @@ $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
deploydir: $(OSX_DMG)
else !BUILD_DARWIN
APP_DIST_DIR=$(top_builddir)/dist
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/background.tiff $(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/Bitcoin-Qt

$(OSX_TEMP_ISO): $(APP_DIST_EXTRAS)
$(OSX_TEMP_ISO): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))

$(OSX_DMG): $(OSX_TEMP_ISO)
$(DMG) dmg "$<" "$@"

$(APP_DIST_DIR)/.background/background.tiff:
$(MKDIR_P) $(@D)
cp $(OSX_BACKGROUND_IMAGE) $@

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)

deploydir: $(APP_DIST_EXTRAS)
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
endif !BUILD_DARWIN

appbundle: $(OSX_APP_BUILT)
3 changes: 1 addition & 2 deletions REVIEWERS
Original file line number Diff line number Diff line change
@@ -18,12 +18,11 @@


# Maintainers
# @achow101
# @fanquake
# @hebasto
# @jonasschnelli
# @laanwj
# @marcofalke
# @meshcollider
# @sipa

# Docs
118 changes: 0 additions & 118 deletions build-aux/m4/ax_boost_filesystem.m4

This file was deleted.

121 changes: 0 additions & 121 deletions build-aux/m4/ax_boost_system.m4

This file was deleted.

137 changes: 0 additions & 137 deletions build-aux/m4/ax_boost_unit_test_framework.m4

This file was deleted.

64 changes: 59 additions & 5 deletions build-aux/m4/ax_cxx_compile_stdcxx.m4
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@
#
# 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).
# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
# the respective C++ standard version.
#
# 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.
# preference for no added switch, and then for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
@@ -35,13 +35,15 @@
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.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 11
#serial 14

dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
@@ -50,6 +52,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[$1], [20], [ax_cxx_compile_alternatives="20"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
@@ -62,6 +65,16 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
AC_LANG_PUSH([C++])dnl
ac_success=no
m4_if([$2], [], [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 alternative in ${ax_cxx_compile_alternatives}; do
@@ -140,20 +153,31 @@ 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 Test body for checking C++17 support

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)

dnl Test body for checking C++20 support

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20
)


dnl Tests for new features in C++11

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
@@ -949,3 +973,33 @@ namespace cxx17
#endif // __cplusplus < 201703L
]])


dnl Tests for new features in C++20

m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 202002L
#error "This is not a C++20 compiler"
#else
#include <version>
namespace cxx20
{
// As C++20 supports feature test macros in the standard, there is no
// immediate need to actually test for feature availability on the
// Autoconf side.
} // namespace cxx20
#endif // __cplusplus < 202002L
]])
10 changes: 5 additions & 5 deletions build-aux/m4/bitcoin_qt.m4
Original file line number Diff line number Diff line change
@@ -122,8 +122,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
BITCOIN_QT_CHECK([
TEMP_CPPFLAGS=$CPPFLAGS
TEMP_CXXFLAGS=$CXXFLAGS
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
_BITCOIN_QT_IS_STATIC
if test "$bitcoin_cv_static_qt" = "yes"; then
_BITCOIN_QT_CHECK_STATIC_LIBS
@@ -233,8 +233,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
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"
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QtCore/qconfig.h>
#ifndef QT_VERSION
@@ -256,7 +256,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
BITCOIN_QT_CHECK([
AC_MSG_CHECKING([whether -fPIC is needed with this Qt config])
TEMP_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QtCore/qconfig.h>
#ifndef QT_VERSION
47 changes: 47 additions & 0 deletions build-aux/m4/l_filesystem.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
dnl Copyright (c) 2022 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.

# GCC 8.1 and earlier requires -lstdc++fs
# Clang 8.0.0 (libc++) and earlier requires -lc++fs

m4_define([_CHECK_FILESYSTEM_testbody], [[
#include <filesystem>
namespace fs = std::filesystem;
int main() {
(void)fs::current_path().root_name();
return 0;
}
]])

AC_DEFUN([CHECK_FILESYSTEM], [
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([whether std::filesystem can be used without link library])
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
SAVED_LIBS="$LIBS"
LIBS="$SAVED_LIBS -lstdc++fs"
AC_MSG_CHECKING([whether std::filesystem needs -lstdc++fs])
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_CHECKING([whether std::filesystem needs -lc++fs])
LIBS="$SAVED_LIBS -lc++fs"
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
AC_MSG_RESULT([yes])
],[
AC_MSG_FAILURE([cannot figure out how to use std::filesystem])
])
])
])
AC_LANG_POP
])
3 changes: 3 additions & 0 deletions build_msvc/.gitignore
Original file line number Diff line number Diff line change
@@ -21,6 +21,9 @@ libbitcoin_zmq/libbitcoin_zmq.vcxproj
bench_bitcoin/bench_bitcoin.vcxproj
libtest_util/libtest_util.vcxproj

/bitcoin_config.h
/common.init.vcxproj

*/Win32
libbitcoin_qt/QtGeneratedFiles/*
test_bitcoin-qt/QtGeneratedFiles/*
4 changes: 2 additions & 2 deletions build_msvc/README.md
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ Qt
---------------------
To build Bitcoin Core with the GUI, a static build of Qt is required.

1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-src-5.15.2.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.3.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.

2. Open "x64 Native Tools Command Prompt for VS 2019", and input the following commands:
```cmd
@@ -83,4 +83,4 @@ If is it enabled then in the output `Dynamic base` will be listed in the `DLL ch
Terminal Server Aware
```

This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.
This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.
13 changes: 0 additions & 13 deletions build_msvc/bitcoin_config.h.in
Original file line number Diff line number Diff line change
@@ -44,18 +44,9 @@
/* define if the Boost library is available */
#define HAVE_BOOST /**/

/* define if the Boost::Filesystem library is available */
#define HAVE_BOOST_FILESYSTEM /**/

/* define if external signer support is enabled (requires Boost::Process) */
#define ENABLE_EXTERNAL_SIGNER /**/

/* define if the Boost::System library is available */
#define HAVE_BOOST_SYSTEM /**/

/* define if the Boost::Unit_Test_Framework library is available */
#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/

/* Define this symbol if the consensus lib has been built */
#define HAVE_CONSENSUS_LIB 1

@@ -134,10 +125,6 @@
don't. */
#define HAVE_DECL_STRERROR_R 0

/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
don't. */
#define HAVE_DECL_STRNLEN 1

/* Define if the dllexport attribute is supported. */
#define HAVE_DLLEXPORT_ATTRIBUTE 1

Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<LinkIncremental>false</LinkIncremental>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>@TOOLSET@</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<GenerateManifest>No</GenerateManifest>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
@@ -49,7 +49,7 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<LinkIncremental>true</LinkIncremental>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>@TOOLSET@</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
2 changes: 2 additions & 0 deletions build_msvc/libsecp256k1/libsecp256k1.vcxproj
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\secp256k1\src\precomputed_ecmult.c" />
<ClCompile Include="..\..\src\secp256k1\src\precomputed_ecmult_gen.c" />
<ClCompile Include="..\..\src\secp256k1\src\secp256k1.c" />
</ItemGroup>
<ItemDefinitionGroup>
23 changes: 9 additions & 14 deletions build_msvc/msvc-autogen.py
Original file line number Diff line number Diff line change
@@ -50,13 +50,6 @@ def parse_makefile(makefile):
lib_sources[current_lib] = []
break

def set_common_properties(toolset):
with open(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), 'r', encoding='utf-8') as rfile:
s = rfile.read()
s = re.sub('<PlatformToolset>.*?</PlatformToolset>', '<PlatformToolset>'+toolset+'</PlatformToolset>', s)
with open(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), 'w', encoding='utf-8',newline='\n') as wfile:
wfile.write(s)

def parse_config_into_btc_config():
def find_between( s, first, last ):
try:
@@ -92,13 +85,18 @@ def find_between( s, first, last ):
with open(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h'), "w", encoding="utf8") as btc_config:
btc_config.writelines(template)

def set_properties(vcxproj_filename, placeholder, content):
with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file:
with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file:
vcxproj_file.write(vcxproj_in_file.read().replace(placeholder, content))

def main():
parser = argparse.ArgumentParser(description='Bitcoin-core msbuild configuration initialiser.')
parser.add_argument('-toolset', nargs='?',help='Optionally sets the msbuild platform toolset, e.g. v142 for Visual Studio 2019.'
parser.add_argument('-toolset', nargs='?', default=DEFAULT_PLATFORM_TOOLSET,
help='Optionally sets the msbuild platform toolset, e.g. v142 for Visual Studio 2019.'
' default is %s.'%DEFAULT_PLATFORM_TOOLSET)
args = parser.parse_args()
if args.toolset:
set_common_properties(args.toolset)
set_properties(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), '@TOOLSET@', args.toolset)

for makefile_name in os.listdir(SOURCE_DIR):
if 'Makefile' in makefile_name:
@@ -110,10 +108,7 @@ def main():
content += ' <ClCompile Include="..\\..\\src\\' + source_filename + '">\n'
content += ' <ObjectFileName>$(IntDir)' + object_filename + '</ObjectFileName>\n'
content += ' </ClCompile>\n'
with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file:
with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file:
vcxproj_file.write(vcxproj_in_file.read().replace(
'@SOURCE_FILES@\n', content))
set_properties(vcxproj_filename, '@SOURCE_FILES@\n', content)
parse_config_into_btc_config()
copyfile(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h'), os.path.join(SOURCE_DIR, 'config/bitcoin-config.h'))
copyfile(os.path.join(SOURCE_DIR,'../build_msvc/libsecp256k1_config.h'), os.path.join(SOURCE_DIR, 'secp256k1/src/libsecp256k1-config.h'))
3 changes: 3 additions & 0 deletions build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
<ClCompile Include="..\..\src\qt\test\optiontests.cpp" />
<ClCompile Include="..\..\src\qt\test\rpcnestedtests.cpp" />
<ClCompile Include="..\..\src\qt\test\test_main.cpp" />
<ClCompile Include="..\..\src\qt\test\uritests.cpp" />
@@ -20,6 +21,7 @@
<ClCompile Include="..\..\src\wallet\test\wallet_test_fixture.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_addressbooktests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_apptests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_optiontests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_rpcnestedtests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_uritests.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
@@ -88,6 +90,7 @@
<ItemGroup>
<MocTestFiles Include="..\..\src\qt\test\addressbooktests.h" />
<MocTestFiles Include="..\..\src\qt\test\apptests.h" />
<MocTestFiles Include="..\..\src\qt\test\optiontests.h" />
<MocTestFiles Include="..\..\src\qt\test\rpcnestedtests.h" />
<MocTestFiles Include="..\..\src\qt\test\uritests.h" />
<MocTestFiles Include="..\..\src\qt\test\wallettests.h" />
2 changes: 0 additions & 2 deletions build_msvc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -3,13 +3,11 @@
"version-string": "1",
"dependencies": [
"berkeleydb",
"boost-filesystem",
"boost-multi-index",
"boost-process",
"boost-signals2",
"boost-test",
"sqlite3",
"double-conversion",
{
"name": "libevent",
"features": ["thread"]
6 changes: 3 additions & 3 deletions ci/lint/04_install.sh
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ ${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq
update-alternatives --install /usr/bin/clang-format clang-format "$(which clang-format-9 )" 100
update-alternatives --install /usr/bin/clang-format-diff clang-format-diff "$(which clang-format-diff-9)" 100

${CI_RETRY_EXE} pip3 install codespell==2.0.0
${CI_RETRY_EXE} pip3 install flake8==3.8.3
${CI_RETRY_EXE} pip3 install mypy==0.910
${CI_RETRY_EXE} pip3 install codespell==2.1.0
${CI_RETRY_EXE} pip3 install flake8==4.0.1
${CI_RETRY_EXE} pip3 install mypy==0.942
${CI_RETRY_EXE} pip3 install pyzmq==22.3.0
${CI_RETRY_EXE} pip3 install vulture==2.3

1 change: 1 addition & 0 deletions ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}

export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
export RUN_TIDY=${RUN_TIDY:-false}
export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
# By how much to scale the test_runner timeouts (option --timeout-factor).
# This is needed because some ci machines have slow CPU or disk, so sanitizers
6 changes: 3 additions & 3 deletions ci/test/00_setup_env_i686_centos.sh
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@
export LC_ALL=C.UTF-8

export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_centos_8
export DOCKER_NAME_TAG=centos:8
export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-zmq which patch lbzip2 dash rsync coreutils bison"
export CONTAINER_NAME=ci_i686_centos
export DOCKER_NAME_TAG=quay.io/centos/centos:stream8
export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-zmq which patch lbzip2 xz procps-ng dash rsync coreutils bison"
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"
export CONFIG_SHELL="/bin/dash"
1 change: 0 additions & 1 deletion ci/test/00_setup_env_i686_multiprocess.sh
Original file line number Diff line number Diff line change
@@ -15,4 +15,3 @@ export GOAL="install"
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' LDFLAGS='--rtlib=compiler-rt -lgcc_s'"
export TEST_RUNNER_ENV="BITCOIND=bitcoin-node"
export TEST_RUNNER_EXTRA="--nosandbox"
export PIP_PACKAGES="lief"
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_mac.sh
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ export CONTAINER_NAME=ci_macos_cross
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that Focal can cross-compile to macos
export HOST=x86_64-apple-darwin
export PACKAGES="cmake libz-dev libtinfo5 python3-setuptools xorriso"
export XCODE_VERSION=12.1
export XCODE_BUILD_ID=12A7403
export XCODE_VERSION=12.2
export XCODE_BUILD_ID=12B45b
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_native_asan.sh
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_asan
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qtquickcontrols2-5-dev libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qtquickcontrols2-5-dev libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
export DOCKER_NAME_TAG=ubuntu:22.04
export NO_DEPENDS=1
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"
export BITCOIN_CONFIG="--enable-c++20 --enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_native_fuzz.sh
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@

export LC_ALL=C.UTF-8

export DOCKER_NAME_TAG="ubuntu:20.04"
export DOCKER_NAME_TAG="ubuntu:22.04"
export CONTAINER_NAME=ci_native_fuzz
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libsqlite3-dev"
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libsqlite3-dev"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
7 changes: 4 additions & 3 deletions ci/test/00_setup_env_native_fuzz_with_msan.sh
Original file line number Diff line number Diff line change
@@ -13,10 +13,11 @@ LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"

export CONTAINER_NAME="ci_native_msan"
export PACKAGES="clang-9 llvm-9 cmake"
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' boost_cxxflags='-std=c++17 -fvisibility=hidden -fPIC ${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
export PACKAGES="clang-12 llvm-12 cmake"
# BDB generates false-positives and will be removed in future
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' sqlite_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export USE_MEMORY_SANITIZER="true"
export RUN_UNIT_TESTS="false"
export RUN_FUNCTIONAL_TESTS="false"
7 changes: 4 additions & 3 deletions ci/test/00_setup_env_native_fuzz_with_valgrind.sh
Original file line number Diff line number Diff line change
@@ -6,14 +6,15 @@

export LC_ALL=C.UTF-8

export DOCKER_NAME_TAG="ubuntu:20.04"
export DOCKER_NAME_TAG="ubuntu:22.04"
export CONTAINER_NAME=ci_native_fuzz_valgrind
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libsqlite3-dev valgrind"
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libsqlite3-dev valgrind"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=true
export FUZZ_TESTS_CONFIG="--valgrind"
export GOAL="install"
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++"
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'"
export CCACHE_SIZE=200M
8 changes: 4 additions & 4 deletions ci/test/00_setup_env_native_msan.sh
Original file line number Diff line number Diff line change
@@ -11,13 +11,13 @@ LIBCXX_DIR="${BASE_SCRATCH_DIR}/msan/build/"
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_DIR}include -I${LIBCXX_DIR}include/c++/v1 -lpthread -Wl,-rpath,${LIBCXX_DIR}lib -Wno-unused-command-line-argument"
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
export BDB_PREFIX="${BASE_ROOT_DIR}/db4"

export CONTAINER_NAME="ci_native_msan"
export PACKAGES="clang-9 llvm-9 cmake"
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' boost_cxxflags='-std=c++17 -fvisibility=hidden -fPIC ${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' sqlite_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
export PACKAGES="clang-12 llvm-12 cmake"
# BDB generates false-positives and will be removed in future
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' sqlite_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-wallet --with-sanitizers=memory --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' BDB_LIBS='-L${BDB_PREFIX}/lib -ldb_cxx-4.8' BDB_CFLAGS='-I${BDB_PREFIX}/include'"
export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export USE_MEMORY_SANITIZER="true"
export RUN_FUNCTIONAL_TESTS="false"
export CCACHE_SIZE=250M
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@

export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_nowallet
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
export PACKAGES="python3-zmq clang-7 llvm-7 libc++abi-7-dev libc++-7-dev" # Use clang-7 to test C++17 compatibility, see doc/dependencies.md
export DEP_OPTS="NO_WALLET=1 CC=clang-7 CXX='clang++-7 -stdlib=libc++'"
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev" # Use clang-8 to test C++17 compatibility, see doc/dependencies.md
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-7 CXX='clang++-7 -stdlib=libc++'"
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate"
10 changes: 5 additions & 5 deletions ci/test/00_setup_env_native_qt5.sh
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_qt5
export DOCKER_NAME_TAG=ubuntu:21.04 # Check that hirsute gcc-8 can compile our C++17 and run our functional tests in python3, see doc/dependencies.md
export PACKAGES="gcc-8 g++-8 python3-zmq qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qtquickcontrols2-5-dev libdbus-1-dev libharfbuzz-dev"
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-8 CXX=g++-8"
export DOCKER_NAME_TAG=debian:bullseye # System Qt 5.15 is required for QML GUI.
export PACKAGES="gcc-9 g++-9 python3-zmq qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qtquickcontrols2-5-dev libdbus-1-dev libharfbuzz-dev"
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-9 CXX=g++-9"
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
export RUN_UNIT_TESTS_SEQUENTIAL="true"
export RUN_UNIT_TESTS="false"
export GOAL="install"
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1 v0.20.1"
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.14.3 v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1 v0.20.1 v0.21.0 v22.0"
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports \
--enable-debug --disable-fuzz-binary CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-8 CXX=g++-8"
--enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-9 CXX=g++-9"
19 changes: 19 additions & 0 deletions ci/test/00_setup_env_native_tidy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C.UTF-8

export DOCKER_NAME_TAG="ubuntu:22.04"
export CONTAINER_NAME=ci_native_tidy
export PACKAGES="clang llvm clang-tidy bear libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=false
export RUN_TIDY=true
export GOAL="install"
export BITCOIN_CONFIG="CC=clang CXX=clang++ --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
export CCACHE_SIZE=200M
6 changes: 3 additions & 3 deletions ci/test/00_setup_env_native_tsan.sh
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_tsan
export DOCKER_NAME_TAG=ubuntu:22.04
export PACKAGES="clang llvm libc++abi-dev libc++-dev python3-zmq"
export DEP_OPTS="CC=clang CXX='clang++ -stdlib=libc++'"
export PACKAGES="clang-13 llvm-13 libc++abi-13-dev libc++-13-dev python3-zmq"
export DEP_OPTS="CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' CXXFLAGS='-g' --with-sanitizers=thread CC=clang CXX='clang++ -stdlib=libc++'"
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' CXXFLAGS='-g' --with-sanitizers=thread CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
9 changes: 5 additions & 4 deletions ci/test/00_setup_env_native_valgrind.sh
Original file line number Diff line number Diff line change
@@ -6,11 +6,12 @@

export LC_ALL=C.UTF-8

export DOCKER_NAME_TAG="ubuntu:20.04"
export DOCKER_NAME_TAG="ubuntu:22.04"
export CONTAINER_NAME=ci_native_valgrind
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
export USE_VALGRIND=1
export NO_DEPENDS=1
export TEST_RUNNER_EXTRA="--nosandbox --exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--nosandbox --exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++" # TODO enable GUI
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'" # TODO enable GUI
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_s390x.sh
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ fi
export CONTAINER_NAME=ci_s390x
export DOCKER_NAME_TAG="debian:bookworm"
export TEST_RUNNER_ENV="LC_ALL=C"
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export RUN_FUNCTIONAL_TESTS=true
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
6 changes: 3 additions & 3 deletions ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_win64
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that Focal can cross-compile to win64
export DOCKER_NAME_TAG=ubuntu:22.04 # Check that Jammy can cross-compile to win64
export HOST=x86_64-w64-mingw32
export DPKG_ADD_ARCH="i386"
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 wine32 file"
export PACKAGES="python3 nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --disable-external-signer"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"
54 changes: 27 additions & 27 deletions ci/test/04_install.sh
Original file line number Diff line number Diff line change
@@ -55,21 +55,21 @@ else
echo "Running on host system without docker wrapper"
fi

DOCKER_EXEC () {
CI_EXEC () {
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
}
export -f DOCKER_EXEC
export -f CI_EXEC

if [ -n "$DPKG_ADD_ARCH" ]; then
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
CI_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
fi

if [[ $DOCKER_NAME_TAG == centos* ]]; then
${CI_RETRY_EXE} DOCKER_EXEC dnf -y install epel-release
${CI_RETRY_EXE} DOCKER_EXEC dnf -y --allowerasing install "$DOCKER_PACKAGES" "$PACKAGES"
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
${CI_RETRY_EXE} CI_EXEC dnf -y install epel-release
${CI_RETRY_EXE} CI_EXEC dnf -y --allowerasing install "$DOCKER_PACKAGES" "$PACKAGES"
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
${CI_RETRY_EXE} CI_EXEC apt-get update
${CI_RETRY_EXE} CI_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
if [ -n "$PIP_PACKAGES" ]; then
# shellcheck disable=SC2086
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
@@ -80,50 +80,50 @@ if [ "$CI_OS_NAME" == "macos" ]; then
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
else
DOCKER_EXEC free -m -h
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
DOCKER_EXEC echo "$(lscpu | grep Endian)"
CI_EXEC free -m -h
CI_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
CI_EXEC echo "$(lscpu | grep Endian)"
fi
DOCKER_EXEC echo "Free disk space:"
DOCKER_EXEC df -h
CI_EXEC echo "Free disk space:"
CI_EXEC df -h

if [ "$RUN_FUZZ_TESTS" = "true" ]; then
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
if [ ! -d "$DIR_FUZZ_IN" ]; then
DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
CI_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
fi
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
DOCKER_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
DOCKER_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
CI_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
CI_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
fi
fi

DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"

if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
DOCKER_EXEC "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-9) 100"
DOCKER_EXEC "update-alternatives --install /usr/bin/clang clang \$(which clang-9) 100"
DOCKER_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/"
DOCKER_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project"
DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx"
CI_EXEC "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-12) 100"
CI_EXEC "update-alternatives --install /usr/bin/clang clang \$(which clang-12) 100"
CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/"
CI_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project"
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx"
fi

if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Create $BASE_ROOT_DIR"
DOCKER_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
CI_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
fi

if [ "$USE_BUSY_BOX" = "true" ]; then
echo "Setup to use BusyBox utils"
DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
# shellcheck disable=SC1010
DOCKER_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
# Print BusyBox version
DOCKER_EXEC patch --help
CI_EXEC patch --help
fi
34 changes: 12 additions & 22 deletions ci/test/05_before_script.sh
Original file line number Diff line number Diff line change
@@ -10,53 +10,43 @@ export LC_ALL=C.UTF-8
if [ "$CI_OS_NAME" == "macos" ]; then
echo > "${HOME}/Library/Application Support/Bitcoin"
else
DOCKER_EXEC echo \> \$HOME/.bitcoin
CI_EXEC echo \> \$HOME/.bitcoin
fi

DOCKER_EXEC mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
CI_EXEC mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"

OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers"

if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]; then
OSX_SDK_FILENAME="${OSX_SDK_BASENAME}.tar.gz"
OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_FILENAME}"
if [ ! -f "$OSX_SDK_PATH" ]; then
DOCKER_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
CI_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
fi
DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
CI_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
fi

if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then
ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip
if [ ! -f "$ANDROID_TOOLS_PATH" ]; then
DOCKER_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
CI_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
fi
DOCKER_EXEC mkdir -p "${ANDROID_HOME}/cmdline-tools"
DOCKER_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "${ANDROID_HOME}/cmdline-tools"
DOCKER_EXEC "yes | ${ANDROID_HOME}/cmdline-tools/tools/bin/sdkmanager --install \"build-tools;${ANDROID_BUILD_TOOLS_VERSION}\" \"platform-tools\" \"platforms;android-${ANDROID_API_LEVEL}\" \"ndk;${ANDROID_NDK_VERSION}\""
CI_EXEC mkdir -p "${ANDROID_HOME}/cmdline-tools"
CI_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "${ANDROID_HOME}/cmdline-tools"
CI_EXEC "yes | ${ANDROID_HOME}/cmdline-tools/tools/bin/sdkmanager --install \"build-tools;${ANDROID_BUILD_TOOLS_VERSION}\" \"platform-tools\" \"platforms;android-${ANDROID_API_LEVEL}\" \"ndk;${ANDROID_NDK_VERSION}\""
fi

if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
# Use BDB compiled using install_db4.sh script to work around linking issue when using BDB
# from depends. See https://github.com/bitcoin/bitcoin/pull/18288#discussion_r433189350 for
# details.
DOCKER_EXEC "contrib/install_db4.sh \$(pwd) --enable-umrw CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
fi

if [[ $HOST = *-mingw32 ]]; then
DOCKER_EXEC update-alternatives --set "${HOST}-g++" \$\(which "${HOST}-g++-posix"\)
fi
if [ -z "$NO_DEPENDS" ]; then
if [[ $DOCKER_NAME_TAG == centos* ]]; then
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
# CentOS has problems building the depends if the config shell is not explicitly set
# (i.e. for libevent a Makefile with an empty SHELL variable is generated, leading to
# an error as the first command is executed)
SHELL_OPTS="LC_ALL=en_US.UTF-8 CONFIG_SHELL=/bin/bash"
SHELL_OPTS="LC_ALL=en_US.UTF-8 CONFIG_SHELL=/bin/dash"
else
SHELL_OPTS="CONFIG_SHELL="
fi
DOCKER_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS"
CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
fi
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
DOCKER_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
fi
41 changes: 23 additions & 18 deletions ci/test/06_script_a.sh
Original file line number Diff line number Diff line change
@@ -7,49 +7,54 @@
export LC_ALL=C.UTF-8

if [ -n "$ANDROID_TOOLS_URL" ]; then
DOCKER_EXEC make distclean || true
DOCKER_EXEC ./autogen.sh
DOCKER_EXEC ./configure "$BITCOIN_CONFIG" --prefix="${DEPENDS_DIR}/aarch64-linux-android" || ( (DOCKER_EXEC cat config.log) && false)
DOCKER_EXEC "make $MAKEJOBS && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk"
CI_EXEC make distclean || true
CI_EXEC ./autogen.sh
CI_EXEC ./configure "$BITCOIN_CONFIG" --prefix="${DEPENDS_DIR}/aarch64-linux-android" || ( (CI_EXEC cat config.log) && false)
CI_EXEC "make $MAKEJOBS && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk"
exit 0
fi

BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
BITCOIN_CONFIG_ALL="--enable-external-signer --enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
if [ -z "$NO_WERROR" ]; then
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
fi
DOCKER_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE"
CI_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE"

if [ -n "$CONFIG_SHELL" ]; then
DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
CI_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
else
DOCKER_EXEC ./autogen.sh
CI_EXEC ./autogen.sh
fi

DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}"
CI_EXEC mkdir -p "${BASE_BUILD_DIR}"
export P_CI_DIR="${BASE_BUILD_DIR}"

DOCKER_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (DOCKER_EXEC cat config.log) && false)
CI_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (CI_EXEC cat config.log) && false)

DOCKER_EXEC make distdir VERSION="$HOST"
CI_EXEC make distdir VERSION="$HOST"

export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST"

DOCKER_EXEC ./configure --cache-file=../config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (DOCKER_EXEC cat config.log) && false)
CI_EXEC ./configure --cache-file=../config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (CI_EXEC cat config.log) && false)

set -o errtrace
trap 'DOCKER_EXEC "cat ${BASE_SCRATCH_DIR}/sanitizer-output/* 2> /dev/null"' ERR
trap 'CI_EXEC "cat ${BASE_SCRATCH_DIR}/sanitizer-output/* 2> /dev/null"' ERR

if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
# MemorySanitizer (MSAN) does not support tracking memory initialization done by
# using the Linux getrandom syscall. Avoid using getrandom by undefining
# HAVE_SYS_GETRANDOM. See https://github.com/google/sanitizers/issues/852 for
# details.
DOCKER_EXEC 'grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h'
CI_EXEC 'grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h'
fi

DOCKER_EXEC make "$MAKEJOBS" "$GOAL" || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make "$GOAL" V=1 ; false )
if [[ "${RUN_TIDY}" == "true" ]]; then
MAYBE_BEAR="bear"
MAYBE_TOKEN="--"
fi

CI_EXEC "${MAYBE_BEAR}" "${MAYBE_TOKEN}" make "$MAKEJOBS" "$GOAL" || ( echo "Build failure. Verbose build follows." && CI_EXEC make "$GOAL" V=1 ; false )

DOCKER_EXEC "ccache --version | head -n 1 && ccache --show-stats"
DOCKER_EXEC du -sh "${DEPENDS_DIR}"/*/
DOCKER_EXEC du -sh "${PREVIOUS_RELEASES_DIR}"
CI_EXEC "ccache --version | head -n 1 && ccache --show-stats"
CI_EXEC du -sh "${DEPENDS_DIR}"/*/
CI_EXEC du -sh "${PREVIOUS_RELEASES_DIR}"
25 changes: 15 additions & 10 deletions ci/test/06_script_b.sh
Original file line number Diff line number Diff line change
@@ -8,36 +8,41 @@ export LC_ALL=C.UTF-8

if [[ $HOST = *-mingw32 ]]; then
# Generate all binaries, so that they can be wrapped
DOCKER_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
fi

if [ -n "$QEMU_USER_CMD" ]; then
# Generate all binaries, so that they can be wrapped
DOCKER_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
fi

if [ -n "$USE_VALGRIND" ]; then
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
fi

if [ "$RUN_UNIT_TESTS" = "true" ]; then
DOCKER_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "$MAKEJOBS" check VERBOSE=1
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "$MAKEJOBS" check VERBOSE=1
fi

if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
DOCKER_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_BUILD_DIR}/bitcoin-*/src/test/test_bitcoin*" --catch_system_errors=no -l test_suite
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}/bin/test_bitcoin" --catch_system_errors=no -l test_suite
fi

if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
DOCKER_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${TEST_RUNNER_ENV}" test/functional/test_runner.py --ci "$MAKEJOBS" --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA}" --quiet --failfast
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${TEST_RUNNER_ENV}" test/functional/test_runner.py --ci "$MAKEJOBS" --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA}" --quiet --failfast
fi

if [ "${RUN_TIDY}" = "true" ]; then
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
CI_EXEC run-clang-tidy "${MAKEJOBS}"
fi

if [ "$RUN_SECURITY_TESTS" = "true" ]; then
DOCKER_EXEC make test-security-check
CI_EXEC make test-security-check
fi

if [ "$RUN_FUZZ_TESTS" = "true" ]; then
DOCKER_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
fi
1 change: 1 addition & 0 deletions ci/test/wrapped-cl.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ccache cl %*
329 changes: 198 additions & 131 deletions configure.ac

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions contrib/builder-keys/keys.txt
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ F20F56EF6A067F70E8A5C99FFF95FAA971697405 centaur (centaur)
C060A6635913D98A3587D7DB1C2491FFEB0EF770 Cory Fields (cfields)
BF6273FAEF7CC0BA1F562E50989F6B3048A116B5 Dev Random (devrandom)
6D3170C1DC2C6FD0AEEBCA6743811D1A26623924 Douglas Roark (droark)
948444FCE03B05BA5AB0591EC37B1C1D44C786EE Duncan Dean (dunxen)
1C6621605EC50319C463D56C7F81D87985D61612 Emanuele Cisbani (cisba)
9A1689B60D1B3CCE9262307A2F40A9BF167FBA47 Erik Mossberg (erkmos)
D35176BE9264832E4ACA8986BF0792FBE95DC863 fivepiece (fivepiece)
@@ -50,5 +51,6 @@ ED9BDF7AD6A55E232E84524257FF9BDBCC301009 Sjors Provoost (sjors)
9EDAFF80E080659604F4A76B2EBB056FD847F8A7 Stephan Oeste (Emzy)
6DEEF79B050C4072509B743F8C275BC595448867 Tomas Kanocz (KanoczTomas)
AEC1884398647C47413C1C3FB1179EB7347DC10D Warren Togami (wtogami)
74E2DEF5D77260B98BC19438099BAD163C70FBFA Will Clark (will8clark)
79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF Willy Ko (willyko)
71A3B16735405025D447E8F274810B012346C9A6 Wladimir J. van der Laan (laanwj)
4 changes: 2 additions & 2 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ 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
gen-manpages.py
===============

A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
@@ -87,7 +87,7 @@ repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
example:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
```

security-check.py and test-security-check.py
71 changes: 71 additions & 0 deletions contrib/devtools/gen-manpages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python3
# Copyright (c) 2022 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 os
import subprocess
import sys
import tempfile

BINARIES = [
'src/bitcoind',
'src/bitcoin-cli',
'src/bitcoin-tx',
'src/bitcoin-wallet',
'src/bitcoin-util',
'src/qt/bitcoin-qt',
]

# Paths to external utilities.
git = os.getenv('GIT', 'git')
help2man = os.getenv('HELP2MAN', 'help2man')

# If not otherwise specified, get top directory from git.
topdir = os.getenv('TOPDIR')
if not topdir:
r = subprocess.run([git, 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE, check=True, universal_newlines=True)
topdir = r.stdout.rstrip()

# Get input and output directories.
builddir = os.getenv('BUILDDIR', topdir)
mandir = os.getenv('MANDIR', os.path.join(topdir, 'doc/man'))

# Verify that all the required binaries are usable, and extract copyright
# message in a first pass.
versions = []
for relpath in BINARIES:
abspath = os.path.join(builddir, relpath)
try:
r = subprocess.run([abspath, '--version'], stdout=subprocess.PIPE, universal_newlines=True)
except IOError:
print(f'{abspath} not found or not an executable', file=sys.stderr)
sys.exit(1)
# take first line (which must contain version)
verstr = r.stdout.splitlines()[0]
# last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
verstr = verstr.split()[-1]
assert verstr.startswith('v')
# remaining lines are copyright
copyright = r.stdout.split('\n')[1:]
assert copyright[0].startswith('Copyright (C)')

versions.append((abspath, verstr, copyright))

if any(verstr.endswith('-dirty') for (_, verstr, _) in versions):
print("WARNING: Binaries were built from a dirty tree.")
print('man pages generated from dirty binaries should NOT be committed.')
print('To properly generate man pages, please commit your changes (or discard them), rebuild, then run this script again.')
print()

with tempfile.NamedTemporaryFile('w', suffix='.h2m') as footer:
# Create copyright footer, and write it to a temporary include file.
# Copyright is the same for all binaries, so just use the first.
footer.write('[COPYRIGHT]\n')
footer.write('\n'.join(versions[0][2]).strip())
footer.flush()

# Call the binaries through help2man to produce a manual page for each of them.
for (abspath, verstr, _) in versions:
outname = os.path.join(mandir, os.path.basename(abspath) + '.1')
print(f'Generating {outname}…')
subprocess.run([help2man, '-N', '--version-string=' + verstr, '--include=' + footer.name, '-o', outname, abspath], check=True)
53 changes: 0 additions & 53 deletions contrib/devtools/gen-manpages.sh

This file was deleted.

39 changes: 21 additions & 18 deletions contrib/devtools/security-check.py
Original file line number Diff line number Diff line change
@@ -12,10 +12,6 @@

import lief #type:ignore

# temporary constant, to be replaced with lief.ELF.ARCH.RISCV
# https://github.com/lief-project/LIEF/pull/562
LIEF_ELF_ARCH_RISCV = lief.ELF.ARCH(243)

def check_ELF_RELRO(binary) -> bool:
'''
Check for read-only relocations.
@@ -101,7 +97,6 @@ def check_ELF_separate_code(binary):
for segment in binary.segments:
if segment.type == lief.ELF.SEGMENT_TYPES.LOAD:
for section in segment.sections:
assert(section.name not in flags_per_section)
flags_per_section[section.name] = segment.flags
# Spot-check ELF LOAD program header flags per section
# If these sections exist, check them against the expected R/W/E flags
@@ -111,6 +106,17 @@ def check_ELF_separate_code(binary):
return False
return True

def check_ELF_control_flow(binary) -> bool:
'''
Check for control flow instrumentation
'''
main = binary.get_function_address('main')
content = binary.get_content_from_virtual_address(main, 4, lief.Binary.VA_TYPES.AUTO)

if content == [243, 15, 30, 250]: # endbr64
return True
return False

def check_PE_DYNAMIC_BASE(binary) -> bool:
'''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
return lief.PE.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists
@@ -172,7 +178,7 @@ def check_NX(binary) -> bool:
'''
return binary.has_nx

def check_control_flow(binary) -> bool:
def check_MACHO_control_flow(binary) -> bool:
'''
Check for control flow instrumentation
'''
@@ -200,27 +206,27 @@ def check_control_flow(binary) -> bool:
]

BASE_MACHO = [
('PIE', check_PIE),
('NOUNDEFS', check_MACHO_NOUNDEFS),
('NX', check_NX),
('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS),
('Canary', check_MACHO_Canary),
('CONTROL_FLOW', check_control_flow),
]

CHECKS = {
lief.EXE_FORMATS.ELF: {
lief.ARCHITECTURES.X86: BASE_ELF,
lief.ARCHITECTURES.X86: BASE_ELF + [('CONTROL_FLOW', check_ELF_control_flow)],
lief.ARCHITECTURES.ARM: BASE_ELF,
lief.ARCHITECTURES.ARM64: BASE_ELF,
lief.ARCHITECTURES.PPC: BASE_ELF,
LIEF_ELF_ARCH_RISCV: BASE_ELF,
lief.ARCHITECTURES.RISCV: BASE_ELF,
},
lief.EXE_FORMATS.PE: {
lief.ARCHITECTURES.X86: BASE_PE,
},
lief.EXE_FORMATS.MACHO: {
lief.ARCHITECTURES.X86: BASE_MACHO,
lief.ARCHITECTURES.X86: BASE_MACHO + [('PIE', check_PIE),
('NX', check_NX),
('CONTROL_FLOW', check_MACHO_control_flow)],
lief.ARCHITECTURES.ARM64: BASE_MACHO,
}
}

@@ -239,12 +245,9 @@ def check_control_flow(binary) -> bool:
continue

if arch == lief.ARCHITECTURES.NONE:
if binary.header.machine_type == LIEF_ELF_ARCH_RISCV:
arch = LIEF_ELF_ARCH_RISCV
else:
print(f'{filename}: unknown architecture')
retval = 1
continue
print(f'{filename}: unknown architecture')
retval = 1
continue

failed: List[str] = []
for (name, func) in CHECKS[etype][arch]:
12 changes: 4 additions & 8 deletions contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
@@ -15,10 +15,6 @@

import lief #type:ignore

# temporary constant, to be replaced with lief.ELF.ARCH.RISCV
# https://github.com/lief-project/LIEF/pull/562
LIEF_ELF_ARCH_RISCV = lief.ELF.ARCH(243)

# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
#
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
@@ -44,7 +40,7 @@
lief.ELF.ARCH.ARM: (2,18),
lief.ELF.ARCH.AARCH64:(2,18),
lief.ELF.ARCH.PPC64: (2,18),
LIEF_ELF_ARCH_RISCV: (2,27),
lief.ELF.ARCH.RISCV: (2,27),
},
'LIBATOMIC': (1,0),
'V': (0,5,0), # xkb (bitcoin-qt only)
@@ -78,7 +74,7 @@
lief.ENDIANNESS.BIG: "/lib64/ld64.so.1",
lief.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
},
LIEF_ELF_ARCH_RISCV: {
lief.ELF.ARCH.RISCV: {
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
},
}
@@ -202,7 +198,7 @@ def check_exported_symbols(binary) -> bool:
if not symbol.exported:
continue
name = symbol.name
if binary.header.machine_type == LIEF_ELF_ARCH_RISCV or name in IGNORE_EXPORTS:
if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS:
continue
print(f'{binary.name}: export of symbol {name} not allowed!')
ok = False
@@ -231,7 +227,7 @@ def check_MACHO_min_os(binary) -> bool:
return False

def check_MACHO_sdk(binary) -> bool:
if binary.build_version.sdk == [10, 15, 6]:
if binary.build_version.sdk == [11, 0, 0]:
return True
return False

90 changes: 64 additions & 26 deletions contrib/devtools/test-security-check.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
'''
Test script for security-check.py
'''
import lief #type:ignore
import os
import subprocess
from typing import List
@@ -41,25 +42,49 @@ def call_security_check(cc, source, executable, options):
p = subprocess.run(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True)
return (p.returncode, p.stdout.rstrip())

def get_arch(cc, source, executable):
subprocess.run([*cc, source, '-o', executable], check=True)
binary = lief.parse(executable)
arch = binary.abstract.header.architecture
os.remove(executable)
return arch

class TestSecurityChecks(unittest.TestCase):
def test_ELF(self):
source = 'test1.c'
executable = 'test1'
cc = determine_wellknown_cmd('CC', 'gcc')
write_testcode(source)
arch = get_arch(cc, source, executable)

self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE NX RELRO Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
(1, executable+': failed RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
(1, executable+': failed separate_code'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
(0, ''))
if arch == lief.ARCHITECTURES.X86:
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE NX RELRO Canary CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO Canary CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
(1, executable+': failed RELRO CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
(1, executable+': failed separate_code CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
(1, executable+': failed CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code', '-fcf-protection=full']),
(0, ''))
else:
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE NX RELRO Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
(1, executable+': failed PIE RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
(1, executable+': failed RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
(1, executable+': failed separate_code'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
(0, ''))

clean_files(source, executable)

@@ -91,21 +116,34 @@ def test_MACHO(self):
executable = 'test1'
cc = determine_wellknown_cmd('CC', 'clang')
write_testcode(source)
arch = get_arch(cc, source, executable)

if arch == lief.ARCHITECTURES.X86:
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE NX CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']),
(1, executable+': failed LAZY_BINDINGS PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']),
(1, executable+': failed PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
(1, executable+': failed PIE'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
(0, ''))
else:
# arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all']),
(1, executable+': failed NOUNDEFS LAZY_BINDINGS'))
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all']),
(1, executable+': failed LAZY_BINDINGS'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-bind_at_load','-fstack-protector-all']),
(0, ''))

self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
(1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']),
(1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']),
(1, executable+': failed PIE NOUNDEFS LAZY_BINDINGS CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']),
(1, executable+': failed PIE LAZY_BINDINGS CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']),
(1, executable+': failed PIE CONTROL_FLOW'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
(1, executable+': failed PIE'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
(0, ''))

clean_files(source, executable)

2 changes: 1 addition & 1 deletion contrib/devtools/test-symbol-check.py
Original file line number Diff line number Diff line change
@@ -187,7 +187,7 @@ def test_PE(self):
executable = 'test3.exe'
with open(source, 'w', encoding="utf8") as f:
f.write('''
#include <windows.h>
#include <combaseapi.h>
int main()
{
6 changes: 3 additions & 3 deletions contrib/guix/README.md
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ crucial differences:

1. Since only Windows and macOS build outputs require codesigning, the `HOSTS`
environment variable will have a sane default value of `x86_64-w64-mingw32
x86_64-apple-darwin` instead of all the platforms.
x86_64-apple-darwin arm64-apple-darwin` instead of all the platforms.
2. The `guix-codesign` command ***requires*** a `DETACHED_SIGS_REPO` flag.
* _**DETACHED_SIGS_REPO**_

@@ -224,7 +224,7 @@ details.

_(defaults to "x86\_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu
riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
x86\_64-w64-mingw32 x86\_64-apple-darwin")_
x86\_64-w64-mingw32 x86\_64-apple-darwin arm64-apple-darwin")_

* _**SOURCES_PATH**_

@@ -249,7 +249,7 @@ details.
Set the path where _extracted_ SDKs can be found. This is passed through to
the depends tree. Note that this is should be set to the _parent_ directory of
the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of
`$HOME/Downloads/macOS-SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers`).
`$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`).

The path that this environment variable points to **must be a directory**, and
**NOT a symlink to a directory**.
22 changes: 15 additions & 7 deletions contrib/guix/guix-attest
Original file line number Diff line number Diff line change
@@ -19,8 +19,16 @@ source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
################

check_tools cat env basename mkdir diff sort

if [ -z "$NO_SIGN" ]; then
check_tools gpg
# make it possible to override the gpg binary
GPG=${GPG:-gpg}

# $GPG can contain extra arguments passed to the binary
# so let's check only the existence of arg[0]
# shellcheck disable=SC2206
GPG_ARRAY=($GPG)
check_tools "${GPG_ARRAY[0]}"
fi

################
@@ -90,7 +98,7 @@ if [ -z "${signer_name}" ]; then
signer_name="$gpg_key_name"
fi

if [ -z "$NO_SIGN" ] && ! gpg --dry-run --list-secret-keys "${gpg_key_name}" >/dev/null 2>&1; then
if [ -z "$NO_SIGN" ] && ! ${GPG} --dry-run --list-secret-keys "${gpg_key_name}" >/dev/null 2>&1; then
echo "ERR: GPG can't seem to find any key named '${gpg_key_name}'"
exit 1
fi
@@ -239,11 +247,11 @@ mkdir -p "$outsigdir"
echo "Signing SHA256SUMS to produce SHA256SUMS.asc"
for i in *.SHA256SUMS; do
if [ ! -e "$i".asc ]; then
gpg --detach-sign \
--digest-algo sha256 \
--local-user "$gpg_key_name" \
--armor \
--output "$i".asc "$i"
${GPG} --detach-sign \
--digest-algo sha256 \
--local-user "$gpg_key_name" \
--armor \
--output "$i".asc "$i"
else
echo "Signature already there"
fi
22 changes: 4 additions & 18 deletions contrib/guix/guix-build
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ mkdir -p "$VERSION_BASE"
# Default to building for all supported HOSTs (overridable by environment)
export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
x86_64-w64-mingw32
x86_64-apple-darwin}"
x86_64-apple-darwin arm64-apple-darwin}"

# Usage: distsrc_for_host HOST
#
@@ -121,7 +121,7 @@ else
fi

################
# When building for darwin, the macOS SDK should exists
# When building for darwin, the macOS SDK should exist
################

for host in $HOSTS; do
@@ -130,6 +130,7 @@ for host in $HOSTS; do
OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=@@g')"
if [ -e "$OSX_SDK" ]; then
echo "Found macOS SDK at '${OSX_SDK}', using..."
break
else
echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, exiting..."
exit 1
@@ -192,7 +193,7 @@ fi

if ! getent services http https ftp > /dev/null 2>&1; then
cat << EOF
ERR: Your system's C library can not find service database entries for at least
ERR: Your system's C library cannot find service database entries for at least
one of the following services: http, https, ftp.
Hint: Most likely, /etc/services does not exist yet (common for docker images
@@ -234,21 +235,6 @@ host_to_commonname() {
# Determine the reference time used for determinism (overridable by environment)
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"

# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
# across time.
time-machine() {
# shellcheck disable=SC2086
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
--commit=fa17abf1af09570708daa28dd40ffbc932ebe25c \
--cores="$JOBS" \
--keep-failed \
--fallback \
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
-- "$@"
}


# Precious directories are those which should not be cleaned between successive
# guix builds
depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
20 changes: 3 additions & 17 deletions contrib/guix/guix-codesign
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ fi
################

# Default to building for all supported HOSTs (overridable by environment)
export HOSTS="${HOSTS:-x86_64-w64-mingw32 x86_64-apple-darwin}"
export HOSTS="${HOSTS:-x86_64-w64-mingw32 x86_64-apple-darwin arm64-apple-darwin}"

# Usage: distsrc_for_host HOST
#
@@ -152,10 +152,10 @@ outdir_for_host() {
unsigned_tarball_for_host() {
case "$1" in
*mingw*)
echo "$(outdir_for_host "$1")/${DISTNAME}-win-unsigned.tar.gz"
echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz"
;;
*darwin*)
echo "$(outdir_for_host "$1")/${DISTNAME}-osx-unsigned.tar.gz"
echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz"
;;
*)
exit 1
@@ -222,20 +222,6 @@ JOBS="${JOBS:-$(nproc)}"
# Determine the reference time used for determinism (overridable by environment)
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"

# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
# across time.
time-machine() {
# shellcheck disable=SC2086
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
--commit=aa34d4d28dfe25ba47d5800d05000fb7221788c0 \
--cores="$JOBS" \
--keep-failed \
--fallback \
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
-- "$@"
}

# Make sure an output directory exists for our builds
OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
mkdir -p "$OUTDIR_BASE"
26 changes: 9 additions & 17 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
@@ -167,7 +167,6 @@ case "$HOST" in
*linux*)
glibc_dynamic_linker=$(
case "$HOST" in
i686-linux-gnu) echo /lib/ld-linux.so.2 ;;
x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;;
arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;;
aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;;
@@ -204,19 +203,12 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
i686_linux_CC=i686-linux-gnu-gcc \
i686_linux_CXX=i686-linux-gnu-g++ \
i686_linux_AR=i686-linux-gnu-ar \
i686_linux_RANLIB=i686-linux-gnu-ranlib \
i686_linux_NM=i686-linux-gnu-nm \
i686_linux_STRIP=i686-linux-gnu-strip \
x86_64_linux_CC=x86_64-linux-gnu-gcc \
x86_64_linux_CXX=x86_64-linux-gnu-g++ \
x86_64_linux_AR=x86_64-linux-gnu-ar \
x86_64_linux_RANLIB=x86_64-linux-gnu-ranlib \
x86_64_linux_NM=x86_64-linux-gnu-nm \
x86_64_linux_STRIP=x86_64-linux-gnu-strip \
qt_config_opts_i686_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
FORCE_USE_SYSTEM_CLANG=1

@@ -340,18 +332,18 @@ mkdir -p "$DISTSRC"
mkdir -p "unsigned-app-${HOST}"
cp --target-directory="unsigned-app-${HOST}" \
osx_volname \
contrib/macdeploy/detached-sig-{apply,create}.sh \
contrib/macdeploy/detached-sig-create.sh \
"${BASEPREFIX}/${HOST}"/native/bin/dmg
mv --target-directory="unsigned-app-${HOST}" dist
(
cd "unsigned-app-${HOST}"
find . -print0 \
| sort --zero-terminated \
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
| gzip -9n > "${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz" && exit 1 )
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 )
)
make deploy ${V:+V=1} OSX_DMG="${OUTDIR}/${DISTNAME}-osx-unsigned.dmg"
make deploy ${V:+V=1} OSX_DMG="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.dmg"
;;
esac
(
@@ -377,7 +369,7 @@ mkdir -p "$DISTSRC"
{
find "${DISTNAME}/bin" -type f -executable -print0
find "${DISTNAME}/lib" -type f -print0
} | xargs -0 -n1 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg
} | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg
;;
esac

@@ -423,8 +415,8 @@ mkdir -p "$DISTSRC"
find "${DISTNAME}" -print0 \
| sort --zero-terminated \
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST//x86_64-apple-darwin/osx64}.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-apple-darwin/osx64}.tar.gz" && exit 1 )
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
;;
esac
) # $DISTSRC/installed
@@ -439,8 +431,8 @@ mkdir -p "$DISTSRC"
find . -print0 \
| sort --zero-terminated \
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
| gzip -9n > "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" && exit 1 )
| gzip -9n > "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" && exit 1 )
)
;;
esac
2 changes: 1 addition & 1 deletion contrib/guix/libexec/codesign.sh
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ mkdir -p "$DISTSRC"
-- -volume_date all_file_dates ="$SOURCE_DATE_EPOCH"

# Compress uncompressed.dmg and output to OUTDIR
./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-osx-signed.dmg"
./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-${HOST}.dmg"
;;
*)
exit 1
16 changes: 16 additions & 0 deletions contrib/guix/libexec/prelude.bash
Original file line number Diff line number Diff line change
@@ -45,6 +45,22 @@ EOF
exit 1
fi

################
# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
# across time.
time-machine() {
# shellcheck disable=SC2086
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
--commit=34e9eae68c9583acce5abc4100add3d88932a5ae \
--cores="$JOBS" \
--keep-failed \
--fallback \
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
-- "$@"
}


################
# Set common variables
################
44 changes: 27 additions & 17 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
@@ -162,13 +162,18 @@ desirable for building Bitcoin Core release binaries."
(define (make-gcc-with-pthreads gcc)
(package-with-extra-configure-variable gcc "--enable-threads" "posix"))

(define (make-mingw-w64-cross-gcc cross-gcc)
(package-with-extra-patches cross-gcc
(search-our-patches "vmov-alignment.patch"
"gcc-broken-longjmp.patch")))

(define (make-mingw-pthreads-cross-toolchain target)
"Create a cross-compilation toolchain package for TARGET"
(let* ((xbinutils (cross-binutils target))
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
(pthreads-xgcc (make-gcc-with-pthreads
(cross-gcc target
#:xgcc (make-ssp-fixed-gcc base-gcc)
#:xgcc (make-ssp-fixed-gcc (make-mingw-w64-cross-gcc base-gcc))
#:xbinutils xbinutils
#:libc pthreads-xlibc))))
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
@@ -197,7 +202,7 @@ chain for " target " development."))
(define-public lief
(package
(name "python-lief")
(version "0.11.5")
(version "0.12.0")
(source
(origin
(method git-fetch)
@@ -207,7 +212,7 @@ chain for " target " development."))
(file-name (git-file-name name version))
(sha256
(base32
"0qahjfg1n0x76ps2mbyljvws1l3qhkqvmxqbahps4qgywl2hbdkj"))))
"026jchj56q25v6gc0754dj9cj5hz5zaza8ij93y5ga94w20kzm9q"))))
(build-system python-build-system)
(native-inputs
`(("cmake" ,cmake)))
@@ -348,7 +353,7 @@ thus should be able to compile on most platforms where these exist.")
#t)))))))

(define-public python-certvalidator
(let ((commit "e5bdb4bfcaa09fa0af355eb8867d00dfeecba08c"))
(let ((commit "a145bf25eb75a9f014b3e7678826132efbba6213"))
(package
(name "python-certvalidator")
(version (git-version "0.1" "1" commit))
@@ -361,7 +366,7 @@ thus should be able to compile on most platforms where these exist.")
(file-name (git-file-name name commit))
(sha256
(base32
"18pvxkvpkfkzgvfylv0kx65pmxfcv1hpsg03cip93krfvrrl4c75"))))
"1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k"))))
(build-system python-build-system)
(propagated-inputs
`(("python-asn1crypto" ,python-asn1crypto)
@@ -481,7 +486,7 @@ and endian independent.")
(license license:expat)))

(define-public python-signapple
(let ((commit "b084cbbf44d5330448ffce0c7d118f75781b64bd"))
(let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
(package
(name "python-signapple")
(version (git-version "0.1" "1" commit))
@@ -494,16 +499,15 @@ and endian independent.")
(file-name (git-file-name name commit))
(sha256
(base32
"0k7inccl2mzac3wq4asbr0kl8s4cghm8982z54kfascqg45shv01"))))
"0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
(build-system python-build-system)
(propagated-inputs
`(("python-asn1crypto" ,python-asn1crypto)
("python-oscrypto" ,python-oscrypto)
("python-certvalidator" ,python-certvalidator)
("python-elfesteem" ,python-elfesteem)
("python-requests" ,python-requests)
("python-macholib" ,python-macholib)
("libcrypto" ,openssl)))
("python-macholib" ,python-macholib)))
;; There are no tests, but attempting to run python setup.py test leads to
;; problems, just disable the test
(arguments '(#:tests? #f))
@@ -574,7 +578,7 @@ inspecting signatures in Mach-O binaries.")
;; Build tools
gnu-make
libtool
autoconf
autoconf-2.71
automake
pkg-config
bison
@@ -584,24 +588,30 @@ inspecting signatures in Mach-O binaries.")
;; Git
git
;; Tests
lief
;; Native gcc 7 toolchain
gcc-toolchain-7
(list gcc-toolchain-7 "static"))
lief)
(let ((target (getenv "HOST")))
(cond ((string-suffix? "-mingw32" target)
;; Windows
(list zip
(list ;; Native GCC 10 toolchain
gcc-toolchain-10
(list gcc-toolchain-10 "static")
zip
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
(make-nsis-for-gcc-10 nsis-x86_64)
osslsigncode))
((string-contains target "-linux-")
(list (cond ((string-contains target "riscv64-")
(list ;; Native GCC 7 toolchain
gcc-toolchain-7
(list gcc-toolchain-7 "static")
(cond ((string-contains target "riscv64-")
(make-bitcoin-cross-toolchain target
#:base-libc glibc-2.27/bitcoin-patched
#:base-kernel-headers linux-libre-headers-4.19))
(else
(make-bitcoin-cross-toolchain target)))))
((string-contains target "darwin")
(list clang-toolchain-10 binutils cmake xorriso python-signapple))
(list ;; Native GCC 10 toolchain
gcc-toolchain-10
(list gcc-toolchain-10 "static")
clang-toolchain-10 binutils cmake xorriso python-signapple))
(else '())))))
Loading