Skip to content

Commit 81cacaf

Browse files
committed
Merge #244: Sync with the main repo
Pull request description: Sync with the main repo up to the latest bitcoin/bitcoin@22ccf4e. Guix builds: ``` 89fffd487de3a1ba624e89c08db1910f753f487361ba9e648ddd7eadea3a4523 guix-build-dc600c21040b/output/aarch64-linux-gnu/SHA256SUMS.part f92f7bf9d11b9a8138bb27e1eca0466116abc56c435ff171994bf8019acb0013 guix-build-dc600c21040b/output/aarch64-linux-gnu/bitcoin-dc600c21040b-aarch64-linux-gnu-debug.tar.gz f5f425848340a0fe702cfae8e82b8bf3dcd23becd1cb162c124af403b561243b guix-build-dc600c21040b/output/aarch64-linux-gnu/bitcoin-dc600c21040b-aarch64-linux-gnu.tar.gz 322de98de4087d8287b396a8a9afee2634ad7c36aa7b9466c3b2d64d1ef37f31 guix-build-dc600c21040b/output/arm-linux-gnueabihf/SHA256SUMS.part 7ec13e88a01a90ec87cfd0c8763487aa18f740585f8d35e83a09ff8a94916e3b guix-build-dc600c21040b/output/arm-linux-gnueabihf/bitcoin-dc600c21040b-arm-linux-gnueabihf-debug.tar.gz 16def67ac4a175bfebe95186adc53591153b0debfaecd0624695ac6f9cc2368f guix-build-dc600c21040b/output/arm-linux-gnueabihf/bitcoin-dc600c21040b-arm-linux-gnueabihf.tar.gz 080f9cc46239e357d04b682ce2be97d13e69cff0d40bb3660f7fb61b44d2691f guix-build-dc600c21040b/output/arm64-apple-darwin/SHA256SUMS.part 1558812eaf558e75007ba48b42d72c83cd79b08a6779701f1eed625f8bce2b34 guix-build-dc600c21040b/output/arm64-apple-darwin/bitcoin-dc600c21040b-arm64-apple-darwin-unsigned.dmg 8259bc2dbd407a5f2246f210295e00f5c4fe2bed0fd9cc1dcfd13e15df190519 guix-build-dc600c21040b/output/arm64-apple-darwin/bitcoin-dc600c21040b-arm64-apple-darwin-unsigned.tar.gz 43f2087c5e42a2bafd4692c0fe438146ba727578b8c4da1fc952149666971e96 guix-build-dc600c21040b/output/arm64-apple-darwin/bitcoin-dc600c21040b-arm64-apple-darwin.tar.gz b994b98ccbe94907c36a7141801c30a7f0f7a0d5325a0356bd61f254156202e2 guix-build-dc600c21040b/output/dist-archive/bitcoin-dc600c21040b.tar.gz 3f13b7f8617b34d6b2dddcb79ebb350b559f448d1df7d19f9d9b8c261ec7e8e0 guix-build-dc600c21040b/output/powerpc64-linux-gnu/SHA256SUMS.part abd1aad2cb3b781c30d380e7ce2d6b75edf1dcec94755e79954b444c42feb76e guix-build-dc600c21040b/output/powerpc64-linux-gnu/bitcoin-dc600c21040b-powerpc64-linux-gnu-debug.tar.gz 5a11e368dd8e26148ba4cfcbd92c1609641e9c1e4663c271c2843c4307ef3eec guix-build-dc600c21040b/output/powerpc64-linux-gnu/bitcoin-dc600c21040b-powerpc64-linux-gnu.tar.gz a118e5a05e977bb24311239e05061c580f82dc8a0eeaaf32033e33160539fd7e guix-build-dc600c21040b/output/powerpc64le-linux-gnu/SHA256SUMS.part 1dbb1d6187b0406e015c9ceaec4ed18adde9f456c2fe32589be78e6151b97bf6 guix-build-dc600c21040b/output/powerpc64le-linux-gnu/bitcoin-dc600c21040b-powerpc64le-linux-gnu-debug.tar.gz 0b214758cb477e49f991413f1108191b0c9c9597e921dab176ffab455c2d5617 guix-build-dc600c21040b/output/powerpc64le-linux-gnu/bitcoin-dc600c21040b-powerpc64le-linux-gnu.tar.gz 0020bd62d907d684b3b0de9fe162494c250c3746a03dbcdf3d7ab79981983607 guix-build-dc600c21040b/output/riscv64-linux-gnu/SHA256SUMS.part 1df123114155fc0f4adbff73666590bfa477a2fa3cd779a0a0b0e7bbcc196411 guix-build-dc600c21040b/output/riscv64-linux-gnu/bitcoin-dc600c21040b-riscv64-linux-gnu-debug.tar.gz ed3bed99fc14ba21f86fc572c432eb4dc5558329351da3946b24ea2de2939b12 guix-build-dc600c21040b/output/riscv64-linux-gnu/bitcoin-dc600c21040b-riscv64-linux-gnu.tar.gz cd67a9f1a828621654d761357335dadc0ac28aa5bcaefdaa59088e3f0a5f2ecd guix-build-dc600c21040b/output/x86_64-apple-darwin/SHA256SUMS.part 236e783cef9b033fb22491050cde10cb484d92ba76cec8736d5650014d889ffc guix-build-dc600c21040b/output/x86_64-apple-darwin/bitcoin-dc600c21040b-x86_64-apple-darwin-unsigned.dmg bbffad436bcec53b618a3da3f80a8711ab14df866608693a99746a18e80d5732 guix-build-dc600c21040b/output/x86_64-apple-darwin/bitcoin-dc600c21040b-x86_64-apple-darwin-unsigned.tar.gz 7ddeb5300b3533a0e7210b4ea61bb92f882ef3fa6ba8d7a5f2122140217928c0 guix-build-dc600c21040b/output/x86_64-apple-darwin/bitcoin-dc600c21040b-x86_64-apple-darwin.tar.gz a25674e17c05289519632916fe273fa6a29feade444b7e726409df2f373d0c81 guix-build-dc600c21040b/output/x86_64-linux-gnu/SHA256SUMS.part 6762a36043345b3269745559c489ee7b491518ac21ff9ed045b00e4c68bea610 guix-build-dc600c21040b/output/x86_64-linux-gnu/bitcoin-dc600c21040b-x86_64-linux-gnu-debug.tar.gz ca743b36e34c7fe15afb96ed552017ff75629117496856bbe6bccbb113043a45 guix-build-dc600c21040b/output/x86_64-linux-gnu/bitcoin-dc600c21040b-x86_64-linux-gnu.tar.gz f16abd063cd5c37b5f21254de171be2f62bb984d34949cf80513a29147f69d0c guix-build-dc600c21040b/output/x86_64-w64-mingw32/SHA256SUMS.part ffe388775123aab14f0fb86fa53af5777f2e96da3fab912a9ffd19d07ce73961 guix-build-dc600c21040b/output/x86_64-w64-mingw32/bitcoin-dc600c21040b-win64-debug.zip 3ce138cb12f252096b3e9a83cf362916e23c54fb6846473e5d30dc578f6d5572 guix-build-dc600c21040b/output/x86_64-w64-mingw32/bitcoin-dc600c21040b-win64-setup-unsigned.exe 7863221de5fb2b7c423754f00436f88859fdd4ddb46640b2ad7da944b11342a6 guix-build-dc600c21040b/output/x86_64-w64-mingw32/bitcoin-dc600c21040b-win64-unsigned.tar.gz c8e3fa8a5ad2451ea79a918f282367ee107c0d6adcf10f05361f0ee6168eff5d guix-build-dc600c21040b/output/x86_64-w64-mingw32/bitcoin-dc600c21040b-win64.zip ``` [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/244) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/244) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/244) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/244) ACKs for top commit: jarolrod: ACK dc600c2 Tree-SHA512: a0add535f4d6647bb9e33b46e4711565a81e17f9237621f8460bb9c1abf586baefb4b88f90c2e2f79bfe821b1c1083273a9e0914df9ede197f7f0a9edbd6dd31
2 parents 48444cb + dc600c2 commit 81cacaf

File tree

352 files changed

+3271
-2212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+3271
-2212
lines changed

.cirrus.yml

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
env: # Global defaults
2+
CIRRUS_CLONE_DEPTH: 1
23
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
34
MAKEJOBS: "-j10"
45
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
@@ -27,7 +28,7 @@ base_template: &BASE_TEMPLATE
2728
# Unconditionally install git (used in fingerprint_script).
2829
- bash -c "$PACKAGE_MANAGER_INSTALL git"
2930
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
30-
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
31+
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
3132
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
3233
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
3334

@@ -65,14 +66,19 @@ compute_credits_template: &CREDITS_TEMPLATE
6566
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
6667

6768
task:
68-
name: 'lint [bionic]'
69+
name: 'lint [jammy]'
6970
<< : *BASE_TEMPLATE
7071
container:
71-
image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
72+
image: ubuntu:jammy
7273
cpu: 1
7374
memory: 1G
7475
# For faster CI feedback, immediately schedule the linters
7576
<< : *CREDITS_TEMPLATE
77+
python_cache:
78+
folder: "/tmp/python"
79+
fingerprint_script: cat .python-version /etc/os-release
80+
unshallow_script:
81+
- git fetch --unshallow --no-tags
7682
lint_script:
7783
- ./ci/lint_run_all.sh
7884
env:
@@ -102,7 +108,7 @@ task:
102108
env:
103109
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
104110
PYTHONUTF8: 1
105-
CI_VCPKG_TAG: '2022.09.27'
111+
CI_VCPKG_TAG: '2023.01.09'
106112
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
107113
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
108114
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
@@ -153,7 +159,7 @@ task:
153159
ccache_cache:
154160
folder: '%CCACHE_DIR%'
155161
install_tools_script:
156-
- choco install --yes --no-progress ccache --version=4.6.1
162+
- choco install --yes --no-progress ccache --version=4.7.4
157163
- choco install --yes --no-progress python3 --version=3.9.6
158164
- pip install zmq
159165
- ccache --version
@@ -185,7 +191,7 @@ task:
185191
- netsh int ipv4 set dynamicport tcp start=1025 num=64511
186192
- netsh int ipv6 set dynamicport tcp start=1025 num=64511
187193
# Exclude feature_dbcrash for now due to timeout
188-
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash
194+
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash
189195

190196
task:
191197
name: 'ARM [unit tests, no functional tests] [bullseye]'
@@ -298,10 +304,10 @@ task:
298304
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
299305

300306
task:
301-
name: '[no wallet, libbitcoinkernel] [bionic]'
307+
name: '[no wallet, libbitcoinkernel] [buster]'
302308
<< : *GLOBAL_TASK_TEMPLATE
303309
container:
304-
image: ubuntu:bionic
310+
image: debian:buster
305311
env:
306312
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
307313
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

.python-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.15
1+
3.7.16

build-aux/m4/ax_boost_base.m4

+7-54
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# DESCRIPTION
1010
#
11-
# Test for the Boost C++ libraries of a particular version (or newer)
11+
# Test for the Boost C++ headers of a particular version (or newer)
1212
#
1313
# If no path to the installed boost library is given the macro searchs
1414
# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates
@@ -17,12 +17,14 @@
1717
#
1818
# This macro calls:
1919
#
20-
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
20+
# AC_SUBST(BOOST_CPPFLAGS)
2121
#
2222
# And sets:
2323
#
2424
# HAVE_BOOST
2525
#
26+
# Note that this macro has been modified compared to upstream.
27+
#
2628
# LICENSE
2729
#
2830
# Copyright (c) 2008 Thomas Porschberg <[email protected]>
@@ -59,26 +61,10 @@ AC_ARG_WITH([boost],
5961
],
6062
[want_boost="yes"])
6163
62-
63-
AC_ARG_WITH([boost-libdir],
64-
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
65-
[Force given directory for boost libraries.
66-
Note that this will override library path detection,
67-
so use this parameter only if default library detection fails
68-
and you know exactly where your boost libraries are located.])],
69-
[
70-
AS_IF([test -d "$withval"],
71-
[_AX_BOOST_BASE_boost_lib_path="$withval"],
72-
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
73-
],
74-
[_AX_BOOST_BASE_boost_lib_path=""])
75-
76-
BOOST_LDFLAGS=""
7764
BOOST_CPPFLAGS=""
7865
AS_IF([test "x$want_boost" = "xyes"],
7966
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
8067
AC_SUBST(BOOST_CPPFLAGS)
81-
AC_SUBST(BOOST_LDFLAGS)
8268
])
8369

8470

@@ -139,7 +125,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
139125
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
140126
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
141127
AC_MSG_RESULT([yes])
142-
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
143128
break;
144129
],
145130
[AC_MSG_RESULT([no])])
@@ -156,27 +141,17 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
156141
for libsubdir in $search_libsubdirs ; do
157142
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
158143
done
159-
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
160144
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
161145
break;
162146
fi
163147
done
164148
])
165149
166-
dnl overwrite ld flags if we have required special directory with
167-
dnl --with-boost-libdir parameter
168-
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
169-
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
170-
171-
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
150+
AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)])
172151
CPPFLAGS_SAVED="$CPPFLAGS"
173152
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
174153
export CPPFLAGS
175154
176-
LDFLAGS_SAVED="$LDFLAGS"
177-
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
178-
export LDFLAGS
179-
180155
AC_REQUIRE([AC_PROG_CXX])
181156
AC_LANG_PUSH(C++)
182157
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
@@ -193,11 +168,8 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
193168
dnl built and installed without the --layout=system option or for a staged(not installed) version
194169
if test "x$succeeded" != "xyes" ; then
195170
CPPFLAGS="$CPPFLAGS_SAVED"
196-
LDFLAGS="$LDFLAGS_SAVED"
197171
BOOST_CPPFLAGS=
198-
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
199-
BOOST_LDFLAGS=
200-
fi
172+
201173
_version=0
202174
if test -n "$_AX_BOOST_BASE_boost_path" ; then
203175
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
@@ -216,14 +188,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
216188
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
217189
fi
218190
fi
219-
dnl if we found something and BOOST_LDFLAGS was unset before
220-
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
221-
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
222-
for libsubdir in $libsubdirs ; do
223-
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
224-
done
225-
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
226-
fi
227191
fi
228192
else
229193
if test "x$cross_compiling" != "xyes" ; then
@@ -242,12 +206,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
242206
243207
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
244208
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
245-
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
246-
for libsubdir in $libsubdirs ; do
247-
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
248-
done
249-
BOOST_LDFLAGS="-L$best_path/$libsubdir"
250-
fi
251209
fi
252210
253211
if test -n "$BOOST_ROOT" ; then
@@ -259,19 +217,16 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
259217
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
260218
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
261219
V_CHECK=`expr $stage_version_shorten \>\= $_version`
262-
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
220+
if test "x$V_CHECK" = "x1" ; then
263221
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
264222
BOOST_CPPFLAGS="-I$BOOST_ROOT"
265-
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
266223
fi
267224
fi
268225
fi
269226
fi
270227
271228
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
272229
export CPPFLAGS
273-
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
274-
export LDFLAGS
275230
276231
AC_LANG_PUSH(C++)
277232
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
@@ -298,6 +253,4 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
298253
fi
299254
300255
CPPFLAGS="$CPPFLAGS_SAVED"
301-
LDFLAGS="$LDFLAGS_SAVED"
302-
303256
])

ci/lint/04_install.sh

+28-10
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,31 @@
77
export LC_ALL=C
88

99
${CI_RETRY_EXE} apt-get update
10-
${CI_RETRY_EXE} apt-get install -y python3-pip curl git gawk jq
11-
(
12-
# Temporary workaround for https://github.com/bitcoin/bitcoin/pull/26130#issuecomment-1260499544
13-
# Can be removed once the underlying image is bumped to something that includes git2.34 or later
14-
sed -i -e 's/bionic/jammy/g' /etc/apt/sources.list
15-
${CI_RETRY_EXE} apt-get update
16-
${CI_RETRY_EXE} apt-get install -y --reinstall git
17-
)
10+
# Lint dependencies:
11+
# - curl/xz-utils (to install shellcheck)
12+
# - git (used in many lint scripts)
13+
# - gpg (used by verify-commits)
14+
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
15+
16+
if [ -z "${SKIP_PYTHON_INSTALL}" ]; then
17+
PYTHON_PATH=/tmp/python
18+
if [ ! -d "${PYTHON_PATH}/bin" ]; then
19+
(
20+
git clone https://github.com/pyenv/pyenv.git
21+
cd pyenv/plugins/python-build || exit 1
22+
./install.sh
23+
)
24+
# For dependencies see https://github.com/pyenv/pyenv/wiki#suggested-build-environment
25+
${CI_RETRY_EXE} apt-get install -y build-essential libssl-dev zlib1g-dev \
26+
libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
27+
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
28+
clang
29+
env CC=clang python-build "$(cat "${BASE_ROOT_DIR}/.python-version")" "${PYTHON_PATH}"
30+
fi
31+
export PATH="${PYTHON_PATH}/bin:${PATH}"
32+
command -v python3
33+
python3 --version
34+
fi
1835

1936
${CI_RETRY_EXE} pip3 install codespell==2.2.1
2037
${CI_RETRY_EXE} pip3 install flake8==5.0.4
@@ -23,5 +40,6 @@ ${CI_RETRY_EXE} pip3 install pyzmq==24.0.1
2340
${CI_RETRY_EXE} pip3 install vulture==2.6
2441

2542
SHELLCHECK_VERSION=v0.8.0
26-
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
27-
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
43+
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \
44+
tar --xz -xf - --directory /tmp/
45+
mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/

ci/lint/06_script.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
export LC_ALL=C
88

9-
if [ -n "$CIRRUS_PR" ]; then
9+
if [ -n "$LOCAL_BRANCH" ]; then
10+
# To faithfully recreate CI linting locally, specify all commits on the current
11+
# branch.
12+
COMMIT_RANGE="$(git merge-base HEAD master)..HEAD"
13+
elif [ -n "$CIRRUS_PR" ]; then
1014
COMMIT_RANGE="HEAD~..HEAD"
1115
echo
1216
git log --no-merges --oneline "$COMMIT_RANGE"

ci/lint/Dockerfile

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# See test/lint/README.md for usage.
2+
#
3+
# This container basically has to live in this directory in order to pull in the CI
4+
# install scripts. If it lived in the root directory, it would have to pull in the
5+
# entire repo as docker context during build; if it lived elsewhere, it wouldn't be
6+
# able to make back-references to pull in the install scripts. So here it lives.
7+
8+
FROM python:3.7-buster
9+
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
ENV LC_ALL=C.UTF-8
12+
13+
# This is used by the 04_install.sh script; we can't read the Python version from
14+
# .python-version for the same reasons as above, and it's more efficient to pull a
15+
# preexisting Python image than it is to build from source.
16+
ENV SKIP_PYTHON_INSTALL=1
17+
18+
# Must be built from ./ci/lint/ for these paths to work.
19+
COPY ./docker-entrypoint.sh /entrypoint.sh
20+
COPY ./04_install.sh /install.sh
21+
22+
RUN /install.sh && \
23+
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
24+
chmod 755 /entrypoint.sh && \
25+
rm -rf /var/lib/apt/lists/*
26+
27+
28+
WORKDIR /bitcoin
29+
ENTRYPOINT ["/entrypoint.sh"]

ci/lint/docker-entrypoint.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
export LC_ALL=C
3+
4+
# Fixes permission issues when there is a container UID/GID mismatch with the owner
5+
# of the mounted bitcoin src dir.
6+
git config --global --add safe.directory /bitcoin
7+
8+
if [ -z "$1" ]; then
9+
LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh"
10+
else
11+
exec "$@"
12+
fi

ci/test/00_setup_env_i686_centos.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export HOST=i686-pc-linux-gnu
1010
export CONTAINER_NAME=ci_i686_centos
1111
export CI_IMAGE_NAME_TAG=quay.io/centos/centos:stream8
12-
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
12+
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python38 python38-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
1313
export PIP_PACKAGES="pyzmq"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"

ci/test/00_setup_env_native_fuzz_with_msan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1515
export CONTAINER_NAME="ci_native_fuzz_msan"
1616
export PACKAGES="clang-12 llvm-12 cmake"
1717
# BDB generates false-positives and will be removed in future
18-
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}'"
18+
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1919
export GOAL="install"
2020
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
2121
export USE_MEMORY_SANITIZER="true"

ci/test/00_setup_env_native_msan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1515
export CONTAINER_NAME="ci_native_msan"
1616
export PACKAGES="clang-12 llvm-12 cmake"
1717
# BDB generates false-positives and will be removed in future
18-
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}'"
18+
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1919
export GOAL="install"
2020
export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
2121
export USE_MEMORY_SANITIZER="true"

ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
10-
export CI_IMAGE_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
11-
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
10+
export CI_IMAGE_NAME_TAG=debian:buster
11+
# Use minimum supported python3.7 and clang-8, see doc/dependencies.md
12+
export PACKAGES="-t buster-backports python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev"
13+
export APPEND_APT_SOURCES_LIST="deb http://deb.debian.org/debian buster-backports main"
1214
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
1315
export GOAL="install"
1416
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"

ci/test/04_install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
9292
# TODO: drop this once we can use newer images in GCE
9393
CI_EXEC_ROOT add-apt-repository ppa:hadret/bpfcc
9494
fi
95+
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
96+
CI_EXEC_ROOT echo "${APPEND_APT_SOURCES_LIST}" \>\> /etc/apt/sources.list
97+
fi
9598
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get update
9699
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$CI_BASE_PACKAGES"
97100
fi

0 commit comments

Comments
 (0)