mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 16:14:50 +01:00
Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3116ccd790 | ||
|
|
89a5a416de | ||
|
|
b36dff9fa8 | ||
|
|
8af2d2f762 | ||
|
|
16ab124e5f | ||
|
|
ac5b9f37de | ||
|
|
a86b45cafa | ||
|
|
97f5e28830 | ||
|
|
7e9c7ae810 | ||
|
|
abb9fa0c81 | ||
|
|
128da6e41f | ||
|
|
a9a861af2b | ||
|
|
ec7cd33c9c | ||
|
|
36c15d7d5c | ||
|
|
03a16a1da0 | ||
|
|
f344c66053 | ||
|
|
4451e89988 | ||
|
|
15a24781d0 | ||
|
|
dc711fbd32 | ||
|
|
fc8c1a8deb | ||
|
|
3a26b19df2 | ||
|
|
c40b1da2fd | ||
|
|
0bac52d5cf | ||
|
|
9e05de1d70 | ||
|
|
47c4903923 | ||
|
|
a2f8a839d9 | ||
|
|
932a609312 | ||
|
|
cc4e3158c9 | ||
|
|
787affb9ea | ||
|
|
5077e02263 | ||
|
|
c8c85ca16e | ||
|
|
784a754aa4 | ||
|
|
debcfe313a | ||
|
|
ccc72fecd7 | ||
|
|
50dd8b13df | ||
|
|
648b06256d | ||
|
|
ab3bd457cd | ||
|
|
29cdf42226 | ||
|
|
5027e93b6a | ||
|
|
a62c541ae8 | ||
|
|
64e7db6f4f | ||
|
|
b7e242ecb3 | ||
|
|
cff67180b3 | ||
|
|
7cf73dfed5 | ||
|
|
07397cdede | ||
|
|
91f83dbeb1 | ||
|
|
5c824ac5e1 | ||
|
|
428dcd51e6 | ||
|
|
cbcdafa471 | ||
|
|
342abfb3f4 | ||
|
|
2b87e90585 | ||
|
|
5148145b35 | ||
|
|
95ec9604a4 | ||
|
|
50ad39d9d0 | ||
|
|
ce2a072ba8 | ||
|
|
644c0304f5 | ||
|
|
e72313e6b3 | ||
|
|
0da38b6b0e | ||
|
|
0662105e88 | ||
|
|
b3f866a8df | ||
|
|
a9ea715835 | ||
|
|
c119b0a176 | ||
|
|
1b19c894a2 | ||
|
|
3afbc7d67d | ||
|
|
8b726bf556 | ||
|
|
9d73176d00 | ||
|
|
195f0dfd0e | ||
|
|
e5d097b639 | ||
|
|
c8426706de | ||
|
|
e15b306017 | ||
|
|
95fded1069 | ||
|
|
d464b2af30 | ||
|
|
7a97a56ffb | ||
|
|
f668a3a859 | ||
|
|
c1061be14a | ||
|
|
39af5f2164 | ||
|
|
dd314fe0c2 | ||
|
|
0ee1cfe94a | ||
|
|
7b9d904c68 | ||
|
|
7c8e5e69d9 | ||
|
|
dce93b2dd7 | ||
|
|
4cc994e9d6 | ||
|
|
7948fdd060 | ||
|
|
da1e753eeb | ||
|
|
1e4db14df9 | ||
|
|
2a5d9818ed | ||
|
|
42c74a0a4c | ||
|
|
6e4d87e696 | ||
|
|
0a5ea2aa84 | ||
|
|
2159676b6e | ||
|
|
754eefd21c | ||
|
|
bb1fabda30 | ||
|
|
ca5f8f0de2 | ||
|
|
067dc42b79 | ||
|
|
7f2dc610a5 | ||
|
|
14784aa02c | ||
|
|
b1268254ba | ||
|
|
c540f07ec3 | ||
|
|
1727b3bc54 | ||
|
|
3905706b70 | ||
|
|
2e8880abc0 | ||
|
|
a8f014b342 | ||
|
|
33a61018b2 | ||
|
|
d5701900fc | ||
|
|
e4b8c9b2bf | ||
|
|
bf2bf73bcb | ||
|
|
b04f5f9608 | ||
|
|
dedee6af57 | ||
|
|
931db785ee | ||
|
|
bbe864a13a | ||
|
|
4b7d30d026 | ||
|
|
d22cc74837 | ||
|
|
e23def8fcc | ||
|
|
bb5bcf32ba | ||
|
|
032ceb189a | ||
|
|
d68b6abeb8 | ||
|
|
c349096fa2 | ||
|
|
e5aec59e0f | ||
|
|
885366c67a | ||
|
|
e2e4c2969b | ||
|
|
4d42c3a240 | ||
|
|
d810fde8ea | ||
|
|
a9419eff0c | ||
|
|
4abd2ab18e | ||
|
|
1390c96c8e | ||
|
|
9b438f06ec | ||
|
|
43ced0b436 | ||
|
|
fc8f2bfa3a | ||
|
|
a6fb674f96 | ||
|
|
5ad82a09b4 | ||
|
|
997faf6b6c | ||
|
|
7e0bcfbfef | ||
|
|
c97d924880 | ||
|
|
da6fba6fe7 | ||
|
|
3f385c912e | ||
|
|
c1860341a7 | ||
|
|
2e5706d601 | ||
|
|
2730ed2b0d | ||
|
|
21f96f40d1 | ||
|
|
4be489d4d4 | ||
|
|
f34c98a460 | ||
|
|
ca8d2c4b43 | ||
|
|
2a56cc1f58 | ||
|
|
05f7937810 | ||
|
|
ce3cb2bbe7 | ||
|
|
5964b8339a | ||
|
|
def75f0fb5 | ||
|
|
ab4a32b8af | ||
|
|
bd44c69238 | ||
|
|
0637169760 | ||
|
|
7869b169f2 |
142
.cirrus.yml
142
.cirrus.yml
@@ -1,5 +1,4 @@
|
||||
env: # Global defaults
|
||||
CIRRUS_CLONE_DEPTH: 1
|
||||
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
|
||||
@@ -28,9 +27,8 @@ base_template: &BASE_TEMPLATE
|
||||
# Unconditionally install git (used in fingerprint_script).
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL git"
|
||||
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
||||
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
||||
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
||||
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
|
||||
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
|
||||
|
||||
main_template: &MAIN_TEMPLATE
|
||||
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
|
||||
@@ -39,7 +37,7 @@ main_template: &MAIN_TEMPLATE
|
||||
ci_script:
|
||||
- ./ci/test_run_all.sh
|
||||
|
||||
container_depends_template: &CONTAINER_DEPENDS_TEMPLATE
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
container:
|
||||
# https://cirrus-ci.org/faq/#are-there-any-limits
|
||||
@@ -47,13 +45,17 @@ container_depends_template: &CONTAINER_DEPENDS_TEMPLATE
|
||||
cpu: 2
|
||||
greedy: true
|
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
|
||||
dockerfile: ci/test_imagefile # https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment
|
||||
depends_built_cache:
|
||||
folder: "depends/built"
|
||||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:depends)
|
||||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE
|
||||
<< : *CONTAINER_DEPENDS_TEMPLATE
|
||||
macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
check_clang_script:
|
||||
- clang --version
|
||||
brew_install_script:
|
||||
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
compute_credits_template: &CREDITS_TEMPLATE
|
||||
@@ -62,37 +64,31 @@ compute_credits_template: &CREDITS_TEMPLATE
|
||||
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
|
||||
|
||||
task:
|
||||
name: 'lint [bookworm]'
|
||||
name: 'lint [bionic]'
|
||||
<< : *BASE_TEMPLATE
|
||||
container:
|
||||
image: debian:bookworm
|
||||
image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
|
||||
cpu: 1
|
||||
memory: 1G
|
||||
# For faster CI feedback, immediately schedule the linters
|
||||
<< : *CREDITS_TEMPLATE
|
||||
python_cache:
|
||||
folder: "/tmp/python"
|
||||
fingerprint_script: cat .python-version /etc/os-release
|
||||
unshallow_script:
|
||||
- git fetch --unshallow --no-tags
|
||||
lint_script:
|
||||
- ./ci/lint_run_all.sh
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
|
||||
task:
|
||||
name: 'tidy [lunar]'
|
||||
name: 'tidy [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 2
|
||||
memory: 5G
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:lunar
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
|
||||
# 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 [vs2022]"
|
||||
@@ -105,7 +101,7 @@ task:
|
||||
env:
|
||||
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
|
||||
PYTHONUTF8: 1
|
||||
CI_VCPKG_TAG: '2023.01.09'
|
||||
CI_VCPKG_TAG: '2022.06.16.1'
|
||||
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
|
||||
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
|
||||
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
|
||||
@@ -118,7 +114,7 @@ task:
|
||||
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:
|
||||
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git reset --hard FETCH_HEAD; }
|
||||
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git checkout FETCH_HEAD; }
|
||||
msvc_qt_built_cache:
|
||||
folder: "%QTBASEDIR%"
|
||||
reupload_on_changes: false
|
||||
@@ -156,7 +152,7 @@ task:
|
||||
ccache_cache:
|
||||
folder: '%CCACHE_DIR%'
|
||||
install_tools_script:
|
||||
- choco install --yes --no-progress ccache --version=4.7.4
|
||||
- choco install --yes --no-progress ccache --version=4.6.1
|
||||
- choco install --yes --no-progress python3 --version=3.9.6
|
||||
- pip install zmq
|
||||
- ccache --version
|
||||
@@ -175,55 +171,51 @@ task:
|
||||
- cd %CIRRUS_WORKING_DIR%
|
||||
- ccache --zero-stats --max-size=%CCACHE_SIZE%
|
||||
- python build_msvc\msvc-autogen.py
|
||||
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL%;UseMultiToolTask=true;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
|
||||
check_script:
|
||||
unit_tests_script:
|
||||
- src\test_bitcoin.exe -l test_suite
|
||||
- src\bench_bitcoin.exe --sanity-check
|
||||
- src\bench_bitcoin.exe > NUL
|
||||
- python test\util\test_runner.py
|
||||
- python test\util\rpcauth-test.py
|
||||
functional_tests_script:
|
||||
# Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
|
||||
# See: https://learn.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance
|
||||
# See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance
|
||||
- netsh int ipv4 set dynamicport tcp start=1025 num=64511
|
||||
- netsh int ipv6 set dynamicport tcp start=1025 num=64511
|
||||
# Exclude feature_dbcrash for now due to timeout
|
||||
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash
|
||||
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended --exclude feature_dbcrash
|
||||
|
||||
task:
|
||||
name: 'ARM [unit tests, no functional tests] [bullseye]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: debian:bullseye
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
arm_container:
|
||||
image: debian:bullseye
|
||||
cpu: 2
|
||||
memory: 8G
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
QEMU_USER_CMD: "" # Disable qemu and run the test natively
|
||||
|
||||
task:
|
||||
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:jammy
|
||||
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
image: ubuntu:jammy
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
|
||||
|
||||
task:
|
||||
name: '32-bit + dash [gui] [CentOS 8]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: quay.io/centos/centos:stream8
|
||||
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
|
||||
# For faster CI feedback, immediately schedule one task that runs all tests
|
||||
<< : *CREDITS_TEMPLATE
|
||||
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] [buster]'
|
||||
@@ -236,27 +228,24 @@ task:
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
|
||||
|
||||
task:
|
||||
name: '[TSan, depends, gui] [lunar]'
|
||||
name: '[TSan, depends, gui] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 6 # Increase CPU and Memory to avoid timeout
|
||||
memory: 24G
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:lunar
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
|
||||
|
||||
task:
|
||||
name: '[MSan, depends] [lunar]'
|
||||
name: '[MSan, depends] [focal]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:lunar
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
|
||||
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
|
||||
|
||||
task:
|
||||
@@ -278,69 +267,74 @@ task:
|
||||
MAKEJOBS: "-j4" # Avoid excessive memory use
|
||||
|
||||
task:
|
||||
name: '[fuzzer,address,undefined,integer, no depends] [lunar]'
|
||||
name: '[fuzzer,address,undefined,integer, no depends] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 4 # Increase CPU and memory to avoid timeout
|
||||
memory: 16G
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:lunar
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
|
||||
|
||||
task:
|
||||
name: '[multiprocess, i686, DEBUG] [focal]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
cpu: 4
|
||||
memory: 16G # The default memory is sometimes just a bit too small, so double everything
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:focal
|
||||
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
|
||||
|
||||
task:
|
||||
name: '[no wallet, libbitcoinkernel] [focal]'
|
||||
name: '[no wallet, libbitcoinkernel] [bionic]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:focal
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
image: ubuntu:bionic
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
|
||||
|
||||
task:
|
||||
name: 'macOS 10.15 [gui, no tests] [focal]'
|
||||
<< : *CONTAINER_DEPENDS_TEMPLATE
|
||||
container:
|
||||
docker_arguments:
|
||||
CI_IMAGE_NAME_TAG: ubuntu:focal
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
|
||||
<< : *CREDITS_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
macos_sdk_cache:
|
||||
folder: "depends/SDKs/$MACOS_SDK"
|
||||
fingerprint_key: "$MACOS_SDK"
|
||||
<< : *MAIN_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
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"
|
||||
|
||||
task:
|
||||
name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]'
|
||||
macos_instance:
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
|
||||
image: ghcr.io/cirruslabs/macos-ventura-xcode:14.1 # https://cirrus-ci.org/guide/macOS
|
||||
<< : *BASE_TEMPLATE
|
||||
check_clang_script:
|
||||
- clang --version
|
||||
brew_install_script:
|
||||
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
|
||||
<< : *MAIN_TEMPLATE
|
||||
<< : *MACOS_NATIVE_TASK_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
CI_USE_APT_INSTALL: "no"
|
||||
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh"
|
||||
|
||||
task:
|
||||
name: 'ARM64 Android APK [focal]'
|
||||
<< : *BASE_TEMPLATE
|
||||
android_sdk_cache:
|
||||
folder: "depends/SDKs/android"
|
||||
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.2.8568313"
|
||||
depends_sources_cache:
|
||||
folder: "depends/sources"
|
||||
fingerprint_script: git rev-list -1 HEAD ./depends
|
||||
<< : *MAIN_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_android.sh"
|
||||
|
||||
27
.github/ISSUE_TEMPLATE.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue!
|
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at
|
||||
https://github.com/bitcoin-core/gui/issues/
|
||||
-->
|
||||
|
||||
<!-- Describe the issue -->
|
||||
<!--- What behavior did you expect? -->
|
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
|
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
|
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
|
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
|
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
|
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. -->
|
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
|
||||
93
.github/ISSUE_TEMPLATE/bug.yml
vendored
93
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -1,93 +0,0 @@
|
||||
name: Bug report
|
||||
description: Submit a new bug report.
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
* General bitcoin questions and/or support requests should use Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
* For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
* If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running `memtest` and observe CPU temperature with a load-test tool such as `linpack` before creating an issue.
|
||||
|
||||
----
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: current-behaviour
|
||||
attributes:
|
||||
label: Current behaviour
|
||||
description: Tell us what went wrong
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: Expected behaviour
|
||||
description: Tell us what you expected to happen
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: |
|
||||
Tell us how to reproduce your bug. Please attach related screenshots if necessary.
|
||||
* Run-time or compile-time configuration options
|
||||
* Actions taken
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: |
|
||||
Please copy and paste any relevant log output or attach a debug log file.
|
||||
|
||||
You can find the debug.log in your [data dir.](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location)
|
||||
|
||||
Please be aware that the debug log might contain personally identifying information.
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: How did you obtain Bitcoin Core
|
||||
multiple: false
|
||||
options:
|
||||
- Compiled from source
|
||||
- Pre-built binaries
|
||||
- Package manager
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: core-version
|
||||
attributes:
|
||||
label: What version of Bitcoin Core are you using?
|
||||
description: Run `bitcoind --version` or in Bitcoin-QT use `Help > About Bitcoin Core`
|
||||
placeholder: e.g. v24.0.1 or master@e1bf547
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating system and version
|
||||
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: machine-specs
|
||||
attributes:
|
||||
label: Machine specifications
|
||||
description: |
|
||||
What are the specifications of the host machine?
|
||||
e.g. OS/CPU and disk type, network connectivity
|
||||
validations:
|
||||
required: false
|
||||
|
||||
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve (use this for suspected bugs only, if not sure, open a regular issue below)
|
||||
title: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
|
||||
|
||||
<!-- Describe the issue -->
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
<!--- What behavior did you expect? -->
|
||||
|
||||
**Actual behavior**
|
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
|
||||
|
||||
**To reproduce**
|
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
|
||||
|
||||
**System information**
|
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
|
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
|
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
|
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. -->
|
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Bitcoin Core Security Policy
|
||||
url: https://github.com/bitcoin/bitcoin/blob/master/SECURITY.md
|
||||
about: View security policy
|
||||
- name: Bitcoin Core Developers
|
||||
url: https://bitcoincore.org
|
||||
about: Bitcoin Core homepage
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
36
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
36
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Suggest an idea for this project.
|
||||
labels: [Feature]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature
|
||||
attributes:
|
||||
label: Please describe the feature you'd like to see added.
|
||||
description: Attach screenshots or logs if applicable.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: related-problem
|
||||
attributes:
|
||||
label: Is your feature related to a problem, if so please describe it.
|
||||
description: Attach screenshots or logs if applicable.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Describe any alternatives you've considered
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Please leave any additional context
|
||||
validations:
|
||||
required: false
|
||||
22
.github/ISSUE_TEMPLATE/good_first_issue.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/good_first_issue.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Good first issue
|
||||
about: '(Regular devs only): Suggest a new good first issue'
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Needs the label "good first issue" assigned manually before or after opening -->
|
||||
|
||||
<!-- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution -->
|
||||
|
||||
<!-- Motivate the issue and explain the solution briefly -->
|
||||
|
||||
#### Useful skills:
|
||||
|
||||
<!-- (For example, “C++11 std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
|
||||
|
||||
#### Want to work on this issue?
|
||||
|
||||
For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
|
||||
42
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
42
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: Good First Issue
|
||||
description: (Regular devs only) Suggest a new good first issue
|
||||
labels: [good first issue]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please add the label "good first issue" manually before or after opening
|
||||
|
||||
A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution
|
||||
|
||||
Motivate the issue and explain the solution briefly
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: Motivate the issue
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Possible solution
|
||||
description: Describe a possible solution
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: useful-skills
|
||||
attributes:
|
||||
label: Useful Skills
|
||||
description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Guidance for new contributors
|
||||
description: Please leave this to automatically add the footer for new contributors
|
||||
value: |
|
||||
Want to work on this issue?
|
||||
|
||||
For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/gui_issue.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/gui_issue.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: An issue or feature request related to the GUI
|
||||
about: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/
|
||||
title: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/
|
||||
labels: GUI
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at
|
||||
https://github.com/bitcoin-core/gui/issues/
|
||||
18
.github/ISSUE_TEMPLATE/gui_issue.yml
vendored
18
.github/ISSUE_TEMPLATE/gui_issue.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Issue or feature request related to the GUI
|
||||
description: Any report, issue or feature request related to the GUI
|
||||
labels: [GUI]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: acknowledgement
|
||||
attributes:
|
||||
label: Issues, reports or feature requests related to the GUI should be opened directly on the GUI repo
|
||||
description: https://github.com/bitcoin-core/gui/issues/
|
||||
options:
|
||||
- label: I still think this issue should be opened here
|
||||
required: true
|
||||
- type: textarea
|
||||
id: gui-request
|
||||
attributes:
|
||||
label: Report
|
||||
validations:
|
||||
required: true
|
||||
@@ -1 +1 @@
|
||||
3.7.16
|
||||
3.6.12
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-025x]
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-024x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.xlf
|
||||
source_file = src/qt/locale/bitcoin_en.xlf
|
||||
source_lang = en
|
||||
|
||||
4
COPYING
4
COPYING
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2023 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2023 Bitcoin Developers
|
||||
Copyright (c) 2009-2022 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2022 Bitcoin Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
17
REVIEWERS
Normal file
17
REVIEWERS
Normal file
@@ -0,0 +1,17 @@
|
||||
# ==============================================================================
|
||||
# Bitcoin Core REVIEWERS
|
||||
# ==============================================================================
|
||||
|
||||
# Configuration of automated review requests for the bitcoin/bitcoin repo
|
||||
# via DrahtBot.
|
||||
|
||||
# Order is not important; if a modified file or directory matches a fnmatch,
|
||||
# the reviewer will be mentioned in a PR comment requesting a review.
|
||||
|
||||
# Regular contributors are free to add their names to specific directories or
|
||||
# files provided that they are willing to provide a review.
|
||||
|
||||
# Absence from this list should not be interpreted as a discouragement to
|
||||
# review a pull request. Peer review is always welcome and is a critical
|
||||
# component of the progress of the codebase. Information on peer review
|
||||
# guidelines can be found in the CONTRIBUTING.md doc.
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ headers of a particular version (or newer)
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates
|
||||
@@ -17,14 +17,12 @@
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS)
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# Note that this macro has been modified compared to upstream.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
@@ -61,10 +59,26 @@ AC_ARG_WITH([boost],
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries.
|
||||
Note that this will override library path detection,
|
||||
so use this parameter only if default library detection fails
|
||||
and you know exactly where your boost libraries are located.])],
|
||||
[
|
||||
AS_IF([test -d "$withval"],
|
||||
[_AX_BOOST_BASE_boost_lib_path="$withval"],
|
||||
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
|
||||
],
|
||||
[_AX_BOOST_BASE_boost_lib_path=""])
|
||||
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
AS_IF([test "x$want_boost" = "xyes"],
|
||||
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
])
|
||||
|
||||
|
||||
@@ -125,6 +139,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
|
||||
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" ],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
@@ -141,17 +156,27 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)])
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
|
||||
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
|
||||
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
@@ -168,8 +193,11 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
@@ -188,6 +216,14 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
dnl if we found something and BOOST_LDFLAGS was unset before
|
||||
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
@@ -206,6 +242,12 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
@@ -217,9 +259,10 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -227,6 +270,8 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
@@ -253,4 +298,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
|
||||
])
|
||||
|
||||
@@ -7,9 +7,7 @@ Visual Studio 2022 is minimum required to build Bitcoin Core.
|
||||
|
||||
Solution and project files to build with `msbuild` or Visual Studio can be found in the `build_msvc` directory.
|
||||
|
||||
To build Bitcoin Core from the command-line, it is sufficient to only install the [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) component.
|
||||
|
||||
The "Desktop development with C++" workload must be installed as well.
|
||||
To build Bitcoin Core from the command-line, it is sufficient to only install the Visual Studio Build Tools component.
|
||||
|
||||
Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows.md).
|
||||
|
||||
@@ -17,7 +15,7 @@ Building with Visual Studio is an alternative to the Linux based [cross-compiler
|
||||
Prerequisites
|
||||
---------------------
|
||||
To build [dependencies](../doc/dependencies.md) (except for [Qt](#qt)),
|
||||
the default approach is to use the [vcpkg](https://vcpkg.io) package manager from Microsoft:
|
||||
the default approach is to use the [vcpkg](https://docs.microsoft.com/en-us/cpp/vcpkg) package manager from Microsoft:
|
||||
|
||||
1. [Install](https://vcpkg.io/en/getting-started.html) vcpkg.
|
||||
|
||||
@@ -69,7 +67,7 @@ Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio.
|
||||
|
||||
Security
|
||||
---------------------
|
||||
[Base address randomization](https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
|
||||
[Base address randomization](https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-160) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
|
||||
|
||||
To check if `bitcoind` has `RandomizedBaseAddress` enabled or disabled run
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
|
||||
<Project>{0667528c-d734-4009-adf9-c0d6c4a5a5a6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
<Project>{7c87e378-df58-482e-aa2f-1bc129bc19ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_crypto\libbitcoin_crypto.vcxproj">
|
||||
<Project>{6190199c-6cf4-4dad-bfbd-93fa72a760c1}</Project>
|
||||
</ProjectReference>
|
||||
|
||||
@@ -41,12 +41,18 @@
|
||||
/* Define to 1 to enable ZMQ functions */
|
||||
#define ENABLE_ZMQ 1
|
||||
|
||||
/* define if the Boost library is available */
|
||||
#define HAVE_BOOST /**/
|
||||
|
||||
/* define if external signer support is enabled (requires Boost::Process) */
|
||||
#define ENABLE_EXTERNAL_SIGNER /**/
|
||||
|
||||
/* Define this symbol if the consensus lib has been built */
|
||||
#define HAVE_CONSENSUS_LIB 1
|
||||
|
||||
/* define if the compiler supports basic C++20 syntax */
|
||||
#define HAVE_CXX20 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_BE16TOH 0
|
||||
@@ -115,9 +121,49 @@
|
||||
*/
|
||||
#define HAVE_DECL_SETSID 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRERROR_R 0
|
||||
|
||||
/* Define if the dllexport attribute is supported. */
|
||||
#define HAVE_DLLEXPORT_ATTRIBUTE 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/miniupnpc.h> header file. */
|
||||
#define HAVE_MINIUPNPC_MINIUPNPC_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/upnpcommands.h> header file. */
|
||||
#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/upnperrors.h> header file. */
|
||||
#define HAVE_MINIUPNPC_UPNPERRORS_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4018;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\common\url.cpp" />
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\util\url.cpp" />
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_CRC32C=0;HAVE_SNAPPY=0;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HAVE_CRC32C=0;HAVE_SNAPPY=0;__STDC_LIMIT_MACROS;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>..\..\src\leveldb;..\..\src\leveldb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4146;4244;4267;4334</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
<ProjectReference Include="..\libbitcoin_zmq\libbitcoin_zmq.vcxproj">
|
||||
<Project>{792d487f-f14c-49fc-a9de-3fc150f31c3f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libtest_util\libtest_util.vcxproj">
|
||||
<Project>{1e065f03-3566-47d0-8fa9-daa72b084e7d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libleveldb\libleveldb.vcxproj">
|
||||
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
|
||||
</ProjectReference>
|
||||
|
||||
@@ -13,12 +13,5 @@
|
||||
"features": ["thread"]
|
||||
},
|
||||
"zeromq"
|
||||
],
|
||||
"builtin-baseline": "f14984af3738e69f197bf0e647a8dca12de92996",
|
||||
"overrides": [
|
||||
{
|
||||
"name": "libevent",
|
||||
"version": "2.1.12#7"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ Be aware that the tests will be built and run in-place, so please run at your ow
|
||||
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
|
||||
|
||||
The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory.
|
||||
While it should be fine to run
|
||||
While most of the actions are done inside a docker container, this is not possible for all. Thus, cache directories,
|
||||
such as the depends cache, previous release binaries, or ccache, are mounted as read-write into the docker container. While it should be fine to run
|
||||
the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and
|
||||
testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci
|
||||
system in a virtual machine with a Linux operating system of your choice.
|
||||
|
||||
@@ -1,45 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
${CI_RETRY_EXE} apt-get update
|
||||
# Lint dependencies:
|
||||
# - curl/xz-utils (to install shellcheck)
|
||||
# - git (used in many lint scripts)
|
||||
# - gpg (used by verify-commits)
|
||||
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
|
||||
${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
|
||||
|
||||
if [ -z "${SKIP_PYTHON_INSTALL}" ]; then
|
||||
PYTHON_PATH=/tmp/python
|
||||
if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
||||
(
|
||||
git clone https://github.com/pyenv/pyenv.git
|
||||
cd pyenv/plugins/python-build || exit 1
|
||||
./install.sh
|
||||
)
|
||||
# For dependencies see https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
${CI_RETRY_EXE} apt-get install -y build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
|
||||
clang
|
||||
env CC=clang python-build "$(cat "${BASE_ROOT_DIR}/.python-version")" "${PYTHON_PATH}"
|
||||
fi
|
||||
export PATH="${PYTHON_PATH}/bin:${PATH}"
|
||||
command -v python3
|
||||
python3 --version
|
||||
fi
|
||||
|
||||
${CI_RETRY_EXE} pip3 install codespell==2.2.1
|
||||
${CI_RETRY_EXE} pip3 install flake8==5.0.4
|
||||
${CI_RETRY_EXE} pip3 install mypy==0.971
|
||||
${CI_RETRY_EXE} pip3 install pyzmq==24.0.1
|
||||
${CI_RETRY_EXE} pip3 install vulture==2.6
|
||||
${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
|
||||
|
||||
SHELLCHECK_VERSION=v0.8.0
|
||||
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \
|
||||
tar --xz -xf - --directory /tmp/
|
||||
mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
|
||||
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
|
||||
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
if [ -n "$LOCAL_BRANCH" ]; then
|
||||
# To faithfully recreate CI linting locally, specify all commits on the current
|
||||
# branch.
|
||||
COMMIT_RANGE="$(git merge-base HEAD master)..HEAD"
|
||||
elif [ -n "$CIRRUS_PR" ]; then
|
||||
COMMIT_RANGE="HEAD~..HEAD"
|
||||
GIT_HEAD=$(git rev-parse HEAD)
|
||||
if [ -n "$CIRRUS_PR" ]; then
|
||||
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
|
||||
echo
|
||||
git log --no-merges --oneline "$COMMIT_RANGE"
|
||||
echo
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# See test/lint/README.md for usage.
|
||||
#
|
||||
# This container basically has to live in this directory in order to pull in the CI
|
||||
# install scripts. If it lived in the root directory, it would have to pull in the
|
||||
# entire repo as docker context during build; if it lived elsewhere, it wouldn't be
|
||||
# able to make back-references to pull in the install scripts. So here it lives.
|
||||
|
||||
FROM python:3.7-buster
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LC_ALL=C.UTF-8
|
||||
|
||||
# This is used by the 04_install.sh script; we can't read the Python version from
|
||||
# .python-version for the same reasons as above, and it's more efficient to pull a
|
||||
# preexisting Python image than it is to build from source.
|
||||
ENV SKIP_PYTHON_INSTALL=1
|
||||
|
||||
# Must be built from ./ci/lint/ for these paths to work.
|
||||
COPY ./docker-entrypoint.sh /entrypoint.sh
|
||||
COPY ./04_install.sh /install.sh
|
||||
|
||||
RUN /install.sh && \
|
||||
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
|
||||
chmod 755 /entrypoint.sh && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
WORKDIR /bitcoin
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
export LC_ALL=C
|
||||
|
||||
# Fixes permission issues when there is a container UID/GID mismatch with the owner
|
||||
# of the mounted bitcoin src dir.
|
||||
git config --global --add safe.directory /bitcoin
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -8,10 +8,11 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
# The root dir.
|
||||
# The ci system copies this folder.
|
||||
# This is where the depends build is done.
|
||||
BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
|
||||
export BASE_ROOT_DIR
|
||||
# The depends dir.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
||||
export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
|
||||
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
||||
# This folder only exists on the ci host.
|
||||
@@ -44,9 +45,10 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
|
||||
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40}
|
||||
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
|
||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
|
||||
|
||||
export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}
|
||||
export CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG:-ubuntu:20.04}
|
||||
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:20.04}
|
||||
# Randomize test order.
|
||||
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
||||
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
||||
@@ -56,18 +58,15 @@ export CCACHE_SIZE=${CCACHE_SIZE:-100M}
|
||||
export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
|
||||
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
||||
# The cache dir.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
||||
export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
|
||||
# Folder where the build result is put (bin and lib).
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST}
|
||||
# Folder where the build is done (dist and out-of-tree build).
|
||||
export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
|
||||
# The folder for previous release binaries.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST}
|
||||
export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
|
||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison}
|
||||
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison}
|
||||
export GOAL=${GOAL:-install}
|
||||
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
|
||||
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
|
||||
export HOST=aarch64-linux-android
|
||||
export PACKAGES="unzip openjdk-8-jdk gradle"
|
||||
export CONTAINER_NAME=ci_android
|
||||
export CI_IMAGE_NAME_TAG="ubuntu:jammy"
|
||||
export DOCKER_NAME_TAG="ubuntu:focal"
|
||||
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
||||
@@ -18,7 +18,7 @@ if [ -n "$QEMU_USER_CMD" ]; then
|
||||
fi
|
||||
export CONTAINER_NAME=ci_arm_linux
|
||||
# Use debian to avoid 404 apt errors when cross compiling
|
||||
export CI_IMAGE_NAME_TAG="debian:bullseye"
|
||||
export DOCKER_NAME_TAG="debian:bullseye"
|
||||
export USE_BUSY_BOX=true
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -8,11 +8,10 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export CONTAINER_NAME=ci_i686_centos
|
||||
export CI_IMAGE_NAME_TAG=quay.io/centos/centos:stream8
|
||||
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"
|
||||
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-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
|
||||
export PIP_PACKAGES="pyzmq"
|
||||
export GOAL="install"
|
||||
export NO_WERROR=1 # GCC 8
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"
|
||||
export CONFIG_SHELL="/bin/dash"
|
||||
export TEST_RUNNER_ENV="LC_ALL=en_US.UTF-8"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -8,11 +8,10 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export CONTAINER_NAME=ci_i686_multiprocess
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:20.04
|
||||
export DOCKER_NAME_TAG=ubuntu:20.04
|
||||
export PACKAGES="cmake python3 llvm clang g++-multilib"
|
||||
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \
|
||||
LDFLAGS='--rtlib=compiler-rt -lgcc_s' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE'"
|
||||
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"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME=ci_macos_cross
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:20.04 # Check that Focal can cross-compile to macos
|
||||
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.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
# Only install BCC tracing packages in Cirrus CI.
|
||||
if [[ "${CIRRUS_CI}" == "true" ]]; then
|
||||
# We install an up-to-date 'bpfcc-tools' package from an untrusted PPA.
|
||||
# This can be dropped with the next Ubuntu or Debian release that includes up-to-date packages.
|
||||
# See the if-then in ci/test/04_install.sh too.
|
||||
export ADD_UNTRUSTED_BPFCC_PPA=true
|
||||
export BPFCC_PACKAGE="bpfcc-tools"
|
||||
else
|
||||
export ADD_UNTRUSTED_BPFCC_PPA=false
|
||||
export BPFCC_PACKAGE=""
|
||||
fi
|
||||
# We install an up-to-date 'bpfcc-tools' package from an untrusted PPA.
|
||||
# This can be dropped with the next Ubuntu or Debian release that includes up-to-date packages.
|
||||
# See the if-then in ci/test/04_install.sh too.
|
||||
export ADD_UNTRUSTED_BPFCC_PPA=true
|
||||
|
||||
export CONTAINER_NAME=ci_native_asan
|
||||
export PACKAGES="systemtap-sdt-dev clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:22.04
|
||||
export PACKAGES="systemtap-sdt-dev bpfcc-tools clang llvm python3-zmq qtbase5-dev qttools5-dev-tools 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 # May not run in docker unless --enable-usdt is dropped
|
||||
export NO_DEPENDS=1
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-c++20 --enable-usdt --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-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CI_IMAGE_NAME_TAG="ubuntu:23.04" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz
|
||||
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev python3 libevent-dev bsdmainutils libboost-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
|
||||
export RUN_FUZZ_TESTS=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,integer CC='clang-16 -ftrivial-auto-var-init=pattern' CXX='clang++-16 -ftrivial-auto-var-init=pattern'"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,integer CC='clang -ftrivial-auto-var-init=pattern' CXX='clang++ -ftrivial-auto-var-init=pattern'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 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 CI_IMAGE_NAME_TAG="ubuntu:23.04" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
|
||||
export DOCKER_NAME_TAG="ubuntu:20.04"
|
||||
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 CONTAINER_NAME="ci_native_fuzz_msan"
|
||||
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev cmake"
|
||||
export CONTAINER_NAME="ci_native_msan"
|
||||
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}'"
|
||||
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 --disable-hardening --with-asm=no CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' 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"
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CI_IMAGE_NAME_TAG="debian:bookworm"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz_valgrind
|
||||
export PACKAGES="clang llvm libclang-rt-dev python3 libevent-dev bsdmainutils libboost-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"
|
||||
# Temporarily pin dwarf 4, until using Valgrind 3.20 or later
|
||||
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 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 CI_IMAGE_NAME_TAG="ubuntu:23.04" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
|
||||
export DOCKER_NAME_TAG="ubuntu:20.04"
|
||||
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 CONTAINER_NAME="ci_native_msan"
|
||||
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev cmake"
|
||||
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}'"
|
||||
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="--with-sanitizers=memory --disable-hardening --with-asm=no CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
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
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:focal
|
||||
# Use minimum supported python3.7 (or python3.8, as best-effort) and clang-8, see doc/dependencies.md
|
||||
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev"
|
||||
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-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 NO_WERROR=1
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CONTAINER_NAME=ci_native_qt5
|
||||
export CI_IMAGE_NAME_TAG=debian:buster
|
||||
# Use minimum supported python3.7 and gcc-8, see doc/dependencies.md
|
||||
export DOCKER_NAME_TAG=debian:buster # Check that buster 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 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 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 NO_WERROR=1
|
||||
export DOWNLOAD_PREVIOUS_RELEASES="true"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports --enable-debug \
|
||||
CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-8 CXX=g++-8"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports \
|
||||
--enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-8 CXX=g++-8"
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export CI_IMAGE_NAME_TAG="ubuntu:lunar" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_tidy
|
||||
export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 bear cmake 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 PACKAGES="clang libclang-dev llvm-dev clang-tidy bear cmake 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-16 CXX=clang++-16 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-16/lib/clang/16/include'"
|
||||
export BITCOIN_CONFIG="CC=clang CXX=clang++ --enable-c++20 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CONTAINER_NAME=ci_native_tsan
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:23.04 # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
|
||||
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libc++abi-16-dev libc++-16-dev python3-zmq"
|
||||
export DEP_OPTS="CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
|
||||
export DOCKER_NAME_TAG=ubuntu:22.04
|
||||
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 -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread"
|
||||
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CI_IMAGE_NAME_TAG="debian:bookworm"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_valgrind
|
||||
export PACKAGES="valgrind clang llvm libclang-rt-dev python3-zmq libevent-dev bsdmainutils libboost-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 feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export GOAL="install"
|
||||
# Temporarily pin dwarf 4, until using Valgrind 3.20 or later
|
||||
# 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++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" # TODO enable GUI
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -18,7 +18,7 @@ if [ -n "$QEMU_USER_CMD" ]; then
|
||||
fi
|
||||
# Use debian to avoid 404 apt errors
|
||||
export CONTAINER_NAME=ci_s390x
|
||||
export CI_IMAGE_NAME_TAG="debian:bookworm"
|
||||
export DOCKER_NAME_TAG="debian:bookworm"
|
||||
export TEST_RUNNER_ENV="LC_ALL=C"
|
||||
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
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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 CONTAINER_NAME=ci_win64
|
||||
export CI_IMAGE_NAME_TAG=ubuntu:22.04 # Check that Jammy 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-posix wine-binfmt wine64 wine32 file"
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --enable-external-signer --disable-gui-tests"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-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
|
||||
|
||||
CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
|
||||
|
||||
if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
|
||||
echo "Skip base install"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||
dpkg --add-architecture "$DPKG_ADD_ARCH"
|
||||
fi
|
||||
|
||||
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
|
||||
${CI_RETRY_EXE} bash -c "dnf -y install epel-release"
|
||||
${CI_RETRY_EXE} bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
|
||||
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
|
||||
if [[ "${ADD_UNTRUSTED_BPFCC_PPA}" == "true" ]]; then
|
||||
# Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
|
||||
# The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
|
||||
# packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
|
||||
# package.
|
||||
# TODO: drop this once we can use newer images in GCE
|
||||
add-apt-repository ppa:hadret/bpfcc
|
||||
fi
|
||||
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
|
||||
echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
|
||||
fi
|
||||
${CI_RETRY_EXE} apt-get update
|
||||
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES"
|
||||
fi
|
||||
|
||||
if [ -n "$PIP_PACKAGES" ]; then
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
sudo -H pip3 install --upgrade pip
|
||||
# shellcheck disable=SC2086
|
||||
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
|
||||
update-alternatives --install /usr/bin/clang++ clang++ "$(which clang++-16)" 100
|
||||
update-alternatives --install /usr/bin/clang clang "$(which clang-16)" 100
|
||||
git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-16.0.1 "${BASE_SCRATCH_DIR}"/msan/llvm-project
|
||||
cmake -B "${BASE_SCRATCH_DIR}"/msan/build/ -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DLIBCXX_ENABLE_DEBUG_MODE=ON -DLIBCXX_ENABLE_ASSERTIONS=ON -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/runtimes
|
||||
make -C "${BASE_SCRATCH_DIR}"/msan/build/ "$MAKEJOBS"
|
||||
fi
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_16 "${DIR_IWYU}"/include-what-you-use
|
||||
cmake -B "${DIR_IWYU}"/build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-16 -S "${DIR_IWYU}"/include-what-you-use
|
||||
make -C "${DIR_IWYU}"/build/ install "$MAKEJOBS"
|
||||
fi
|
||||
|
||||
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
|
||||
curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
|
||||
fi
|
||||
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
|
||||
curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
|
||||
fi
|
||||
mkdir -p "$ANDROID_HOME"
|
||||
unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME"
|
||||
yes | "${ANDROID_HOME}"/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platform-tools" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${ANDROID_NDK_VERSION}"
|
||||
fi
|
||||
|
||||
git config --global ${CFG_DONE} "true"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -20,60 +20,70 @@ export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/t
|
||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
||||
env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env
|
||||
if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
CI_CONTAINER_CAP="--cap-add SYS_PTRACE"
|
||||
DOCKER_ADMIN="--cap-add SYS_PTRACE"
|
||||
fi
|
||||
|
||||
export P_CI_DIR="$PWD"
|
||||
export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Creating $CI_IMAGE_NAME_TAG container to run in"
|
||||
DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \
|
||||
--file "${BASE_ROOT_DIR}/ci/test_imagefile" \
|
||||
--build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
|
||||
--build-arg "FILE_ENV=${FILE_ENV}" \
|
||||
--tag="${CONTAINER_NAME}" \
|
||||
"${BASE_ROOT_DIR}"
|
||||
docker volume create "${CONTAINER_NAME}_ccache" || true
|
||||
docker volume create "${CONTAINER_NAME}_depends" || true
|
||||
docker volume create "${CONTAINER_NAME}_previous_releases" || true
|
||||
echo "Creating $DOCKER_NAME_TAG container to run in"
|
||||
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
|
||||
|
||||
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
||||
echo "Restart docker before run to stop and clear all containers started with --rm"
|
||||
podman container stop --all # Similar to "systemctl restart docker"
|
||||
echo "Prune all dangling images"
|
||||
docker image prune --force
|
||||
systemctl restart docker
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
CI_CONTAINER_ID=$(docker run $CI_CONTAINER_CAP --rm --interactive --detach --tty \
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN --rm --interactive --detach --tty \
|
||||
--mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" \
|
||||
--mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \
|
||||
--mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \
|
||||
--mount type=bind,src=$PREVIOUS_RELEASES_DIR,dst=$PREVIOUS_RELEASES_DIR \
|
||||
-w $BASE_ROOT_DIR \
|
||||
--env-file /tmp/env \
|
||||
--name $CONTAINER_NAME \
|
||||
$CONTAINER_NAME)
|
||||
export CI_CONTAINER_ID
|
||||
export CI_EXEC_CMD_PREFIX="docker exec ${CI_CONTAINER_ID}"
|
||||
$DOCKER_NAME_TAG)
|
||||
export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID"
|
||||
else
|
||||
echo "Running on host system without docker wrapper"
|
||||
fi
|
||||
|
||||
CI_EXEC () {
|
||||
$CI_EXEC_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
|
||||
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
|
||||
}
|
||||
export -f CI_EXEC
|
||||
|
||||
CI_EXEC rsync --archive --stats --human-readable /ci_base_install/ "${BASE_ROOT_DIR}" || echo "/ci_base_install/ missing"
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh"
|
||||
CI_EXEC rsync --archive --stats --human-readable /ro_base/ "${BASE_ROOT_DIR}" || echo "Nothing to copy from ro_base"
|
||||
# Fixes permission issues when there is a container UID/GID mismatch with the owner
|
||||
# of the git source code directory.
|
||||
CI_EXEC git config --global --add safe.directory \"*\"
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||
CI_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
|
||||
fi
|
||||
|
||||
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
|
||||
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
|
||||
if [[ "${ADD_UNTRUSTED_BPFCC_PPA}" == "true" ]]; then
|
||||
# Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
|
||||
# The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
|
||||
# packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
|
||||
# package.
|
||||
# TODO: drop this once we can use newer images in GCE
|
||||
CI_EXEC add-apt-repository ppa:hadret/bpfcc
|
||||
fi
|
||||
${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"
|
||||
fi
|
||||
|
||||
if [ -n "$PIP_PACKAGES" ]; then
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
sudo -H pip3 install --upgrade pip
|
||||
# shellcheck disable=SC2086
|
||||
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
${CI_RETRY_EXE} CI_EXEC pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
||||
@@ -101,12 +111,38 @@ fi
|
||||
|
||||
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
|
||||
|
||||
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
|
||||
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 [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
|
||||
if [ ! -d "${DIR_IWYU}" ]; then
|
||||
CI_EXEC "mkdir -p ${DIR_IWYU}/build/"
|
||||
CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${DIR_IWYU}/include-what-you-use"
|
||||
CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
|
||||
CI_EXEC "cd ${DIR_IWYU}/build && make install $MAKEJOBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Create $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"
|
||||
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
|
||||
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \)\; do ln -s \$\(command -v busybox\) "${BINS_SCRATCH_DIR}/\$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
|
||||
CI_EXEC patch --help
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -13,8 +13,31 @@ else
|
||||
CI_EXEC echo \> \$HOME/.bitcoin
|
||||
fi
|
||||
|
||||
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
|
||||
CI_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
|
||||
fi
|
||||
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
|
||||
CI_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
|
||||
fi
|
||||
CI_EXEC mkdir -p "$ANDROID_HOME"
|
||||
CI_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME"
|
||||
CI_EXEC "yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=\"${ANDROID_HOME}\" --install \"build-tools;${ANDROID_BUILD_TOOLS_VERSION}\" \"platform-tools\" \"platforms;android-${ANDROID_API_LEVEL}\" \"ndk;${ANDROID_NDK_VERSION}\""
|
||||
fi
|
||||
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
if [[ $CI_IMAGE_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)
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking"
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
|
||||
fi
|
||||
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST"
|
||||
if [ -z "$NO_WERROR" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
||||
fi
|
||||
@@ -26,7 +23,7 @@ if [ -n "$ANDROID_TOOLS_URL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
|
||||
|
||||
if [ -n "$CONFIG_SHELL" ]; then
|
||||
CI_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -9,14 +9,12 @@ export LC_ALL=C.UTF-8
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
# Generate all binaries, so that they can be wrapped
|
||||
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
CI_EXEC make "$MAKEJOBS" -C src minisketch/test.exe 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
|
||||
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
CI_EXEC make "$MAKEJOBS" -C src minisketch/test VERBOSE=1
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
|
||||
fi
|
||||
|
||||
@@ -33,44 +31,33 @@ if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
fi
|
||||
|
||||
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
||||
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=99999999 --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
|
||||
set -eo pipefail
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
|
||||
( CI_EXEC run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
|
||||
( CI_EXEC run-clang-tidy -quiet "${MAKEJOBS}" ) | grep -C5 "error"
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
|
||||
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
|
||||
" src/common/init.cpp"\
|
||||
" src/common/url.cpp"\
|
||||
" src/compat"\
|
||||
" src/dbwrapper.cpp"\
|
||||
" src/init"\
|
||||
" src/kernel"\
|
||||
" src/node/chainstate.cpp"\
|
||||
" src/node/chainstatemanager_args.cpp"\
|
||||
" src/node/mempool_args.cpp"\
|
||||
" src/node/minisketchwrapper.cpp"\
|
||||
" src/node/utxo_snapshot.cpp"\
|
||||
" src/node/validation_cache_args.cpp"\
|
||||
" src/policy/feerate.cpp"\
|
||||
" src/policy/packages.cpp"\
|
||||
" src/policy/settings.cpp"\
|
||||
" src/primitives/transaction.cpp"\
|
||||
" src/random.cpp"\
|
||||
" src/rpc/fees.cpp"\
|
||||
" src/rpc/signmessage.cpp"\
|
||||
" src/test/fuzz/string.cpp"\
|
||||
" src/test/fuzz/txorphan.cpp"\
|
||||
" src/test/fuzz/util/"\
|
||||
" src/test/util/coins.cpp"\
|
||||
" src/uint256.cpp"\
|
||||
" src/threadinterrupt.cpp"\
|
||||
" src/util/bip32.cpp"\
|
||||
" src/util/bytevectorhash.cpp"\
|
||||
" src/util/check.cpp"\
|
||||
" src/util/error.cpp"\
|
||||
" src/util/exception.cpp"\
|
||||
" src/util/getuniquepath.cpp"\
|
||||
" src/util/hasher.cpp"\
|
||||
" src/util/message.cpp"\
|
||||
@@ -80,14 +67,8 @@ if [ "${RUN_TIDY}" = "true" ]; then
|
||||
" src/util/strencodings.cpp"\
|
||||
" src/util/string.cpp"\
|
||||
" src/util/syserror.cpp"\
|
||||
" src/util/threadinterrupt.cpp"\
|
||||
" src/zmq"\
|
||||
" -p . ${MAKEJOBS}"\
|
||||
" -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"\
|
||||
" |& tee /tmp/iwyu_ci.out"
|
||||
export P_CI_DIR="${BASE_ROOT_DIR}/src"
|
||||
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/fix_includes.py --nosafe_headers < /tmp/iwyu_ci.out"
|
||||
CI_EXEC "git --no-pager diff"
|
||||
" src/util/url.cpp"\
|
||||
" -p . ${MAKEJOBS} -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"
|
||||
fi
|
||||
|
||||
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
|
||||
@@ -97,8 +78,3 @@ fi
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
|
||||
fi
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Stop and remove CI container by ID"
|
||||
docker container kill "${CI_CONTAINER_ID}"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
ARG CI_IMAGE_NAME_TAG
|
||||
FROM ${CI_IMAGE_NAME_TAG}
|
||||
|
||||
ARG FILE_ENV
|
||||
ENV FILE_ENV=${FILE_ENV}
|
||||
|
||||
COPY ./ci/retry/retry /usr/bin/retry
|
||||
COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_base_install/ci/test/
|
||||
|
||||
RUN ["bash", "-c", "cd /ci_base_install/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]
|
||||
185
configure.ac
185
configure.ac
@@ -1,10 +1,10 @@
|
||||
AC_PREREQ([2.69])
|
||||
define(_CLIENT_VERSION_MAJOR, 25)
|
||||
define(_CLIENT_VERSION_MINOR, 2)
|
||||
define(_CLIENT_VERSION_MAJOR, 24)
|
||||
define(_CLIENT_VERSION_MINOR, 1)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 1)
|
||||
define(_CLIENT_VERSION_RC, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2023)
|
||||
define(_COPYRIGHT_YEAR, 2022)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
|
||||
AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
|
||||
@@ -76,12 +76,6 @@ dnl we have those under control, re-enable that functionality.
|
||||
case $host in
|
||||
*mingw*)
|
||||
lt_cv_deplibs_check_method="pass_all"
|
||||
|
||||
dnl Remove unwanted -DDLL_EXPORT from these variables.
|
||||
dnl We do not use this macro, but system headers may export unwanted symbols
|
||||
dnl if it's set.
|
||||
lt_cv_prog_compiler_pic="-DPIC"
|
||||
lt_cv_prog_compiler_pic_CXX="-DPIC"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -126,8 +120,8 @@ AC_PATH_TOOL([AR], [ar])
|
||||
AC_PATH_TOOL([GCOV], [gcov])
|
||||
AC_PATH_TOOL([LLVM_COV], [llvm-cov])
|
||||
AC_PATH_PROG([LCOV], [lcov])
|
||||
dnl Python 3.7 is specified in .python-version and should be used if available, see doc/dependencies.md
|
||||
AC_PATH_PROGS([PYTHON], [python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3 python])
|
||||
dnl Python 3.6 is specified in .python-version and should be used if available, see doc/dependencies.md
|
||||
AC_PATH_PROGS([PYTHON], [python3.6 python3.7 python3.8 python3.9 python3.10 python3.11 python3 python])
|
||||
AC_PATH_PROG([GENHTML], [genhtml])
|
||||
AC_PATH_PROG([GIT], [git])
|
||||
AC_PATH_PROG([CCACHE], [ccache])
|
||||
@@ -169,12 +163,24 @@ AC_ARG_WITH([miniupnpc],
|
||||
[use_upnp=$withval],
|
||||
[use_upnp=auto])
|
||||
|
||||
AC_ARG_ENABLE([upnp-default],
|
||||
[AS_HELP_STRING([--enable-upnp-default],
|
||||
[if UPNP is enabled, turn it on at startup (default is no)])],
|
||||
[use_upnp_default=$enableval],
|
||||
[use_upnp_default=no])
|
||||
|
||||
AC_ARG_WITH([natpmp],
|
||||
[AS_HELP_STRING([--with-natpmp],
|
||||
[enable NAT-PMP (default is yes if libnatpmp is found)])],
|
||||
[use_natpmp=$withval],
|
||||
[use_natpmp=auto])
|
||||
|
||||
AC_ARG_ENABLE([natpmp-default],
|
||||
[AS_HELP_STRING([--enable-natpmp-default],
|
||||
[if NAT-PMP is enabled, turn it on at startup (default is no)])],
|
||||
[use_natpmp_default=$enableval],
|
||||
[use_natpmp_default=no])
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
|
||||
[use_tests=$enableval],
|
||||
@@ -442,7 +448,7 @@ if test "$CXXFLAGS_overridden" = "no"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wvla], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wshadow-field], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wthread-safety], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wloop-analysis"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-member-function], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdate-time], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"], [], [$CXXFLAG_WERROR])
|
||||
@@ -582,8 +588,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
|
||||
# ARM
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS"
|
||||
@@ -941,9 +947,7 @@ if test "$TARGET_OS" != "windows"; then
|
||||
AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"])
|
||||
fi
|
||||
|
||||
dnl Versions of gcc prior to 12.1 (commit
|
||||
dnl https://github.com/gcc-mirror/gcc/commit/551aa75778a4c5165d9533cd447c8fc822f583e1)
|
||||
dnl are subject to a bug, see the gccbug_90348 test case and
|
||||
dnl All versions of gcc that we commonly use for building are subject to bug
|
||||
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
|
||||
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
|
||||
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"])
|
||||
@@ -969,11 +973,11 @@ if test "$use_hardening" != "no"; then
|
||||
dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning.
|
||||
dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes.
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=3],[
|
||||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
|
||||
AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
|
||||
])
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=3"
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -1002,7 +1006,7 @@ if test "$TARGET_OS" = "darwin"; then
|
||||
AX_CHECK_LINK_FLAG([-Wl,-bind_at_load], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"], [], [$LDFLAG_WERROR])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
|
||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
|
||||
|
||||
AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
|
||||
[#include <sys/types.h>
|
||||
@@ -1409,7 +1413,7 @@ if test "$use_usdt" != "no"; then
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"])
|
||||
|
||||
if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; then
|
||||
if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then
|
||||
use_upnp=no
|
||||
use_natpmp=no
|
||||
use_zmq=no
|
||||
@@ -1424,15 +1428,14 @@ if test "$use_upnp" != "no"; then
|
||||
[AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS])],
|
||||
[have_miniupnpc=no]
|
||||
)
|
||||
|
||||
dnl The minimum supported miniUPnPc API version is set to 17. This excludes
|
||||
dnl versions with known vulnerabilities.
|
||||
dnl The minimum supported miniUPnPc API version is set to 10. This keeps compatibility
|
||||
dnl with Ubuntu 16.04 LTS and Debian 8 libminiupnpc-dev packages.
|
||||
if test "$have_miniupnpc" != "no"; then
|
||||
AC_MSG_CHECKING([whether miniUPnPc API version is supported])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <miniupnpc/miniupnpc.h>
|
||||
]], [[
|
||||
#if MINIUPNPC_API_VERSION >= 17
|
||||
#if MINIUPNPC_API_VERSION >= 10
|
||||
// Everything is okay
|
||||
#else
|
||||
# error miniUPnPc API version is too old
|
||||
@@ -1441,7 +1444,7 @@ if test "$use_upnp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([miniUPnPc API version < 17 is unsupported, disabling UPnP support.])
|
||||
AC_MSG_WARN([miniUPnPc API version < 10 is unsupported, disabling UPnP support.])
|
||||
have_miniupnpc=no
|
||||
])
|
||||
fi
|
||||
@@ -1458,7 +1461,7 @@ if test "$use_natpmp" != "no"; then
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench" = "nonononononono"; then
|
||||
use_boost=no
|
||||
else
|
||||
use_boost=yes
|
||||
@@ -1476,11 +1479,13 @@ if test "$use_boost" = "yes"; then
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
|
||||
|
||||
dnl Prevent use of std::unary_function, which was removed in C++17,
|
||||
dnl and will generate warnings with newer compilers for Boost
|
||||
dnl older than 1.80.
|
||||
dnl See: https://github.com/boostorg/config/pull/430.
|
||||
AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
|
||||
[AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
|
||||
dnl and will generate warnings with newer compilers.
|
||||
dnl See: https://github.com/boostorg/container_hash/issues/22.
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
|
||||
|
||||
if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
|
||||
fi
|
||||
|
||||
if test "$suppress_external_warnings" != "no"; then
|
||||
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
|
||||
@@ -1488,45 +1493,45 @@ if test "$use_boost" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$use_external_signer" != "no"; then
|
||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
dnl Boost 1.78 requires the following workaround.
|
||||
dnl See: https://github.com/boostorg/process/issues/235
|
||||
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
TEMP_LDFLAGS="$LDFLAGS"
|
||||
dnl Boost 1.73 and older require the following workaround.
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define BOOST_PROCESS_USE_STD_FS
|
||||
#include <boost/process.hpp>
|
||||
]],[[
|
||||
namespace bp = boost::process;
|
||||
bp::opstream stdin_stream;
|
||||
bp::ipstream stdout_stream;
|
||||
bp::child c("dummy", bp::std_out > stdout_stream, bp::std_err > stdout_stream, bp::std_in < stdin_stream);
|
||||
stdin_stream << std::string{"test"} << std::endl;
|
||||
if (c.running()) c.terminate();
|
||||
c.wait();
|
||||
c.exit_code();
|
||||
]])],
|
||||
[have_boost_process="yes"],
|
||||
[have_boost_process="no"])
|
||||
LDFLAGS="$TEMP_LDFLAGS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
AC_MSG_RESULT([$have_boost_process])
|
||||
if test "$have_boost_process" = "yes"; then
|
||||
use_external_signer="yes"
|
||||
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
||||
AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem])
|
||||
else
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported for this Boost version])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
fi
|
||||
case $host in
|
||||
*mingw*)
|
||||
dnl Boost Process uses Boost Filesystem when targeting Windows. Also,
|
||||
dnl since Boost 1.71.0, Process does not work with mingw-w64 without
|
||||
dnl workarounds. See 67669ab425b52a2b6be3d2f3b3b7e3939b676a2c.
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported on Windows])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
dnl Boost 1.78 requires the following workaround.
|
||||
dnl See: https://github.com/boostorg/process/issues/235
|
||||
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
TEMP_LDFLAGS="$LDFLAGS"
|
||||
dnl Boost 1.73 and older require the following workaround.
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
|
||||
[have_boost_process="yes"],
|
||||
[have_boost_process="no"])
|
||||
LDFLAGS="$TEMP_LDFLAGS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
AC_MSG_RESULT([$have_boost_process])
|
||||
if test "$have_boost_process" = "yes"; then
|
||||
use_external_signer="yes"
|
||||
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
||||
else
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported for this Boost version])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "$use_external_signer" = "yes"])
|
||||
|
||||
@@ -1760,10 +1765,17 @@ if test "$have_miniupnpc" = "no"; then
|
||||
else
|
||||
if test "$use_upnp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([whether to build with UPnP enabled by default])
|
||||
use_upnp=yes
|
||||
AC_DEFINE([USE_UPNP], [1], [Define to 1 if UPnP support should be compiled in.])
|
||||
upnp_setting=0
|
||||
if test "$use_upnp_default" != "no"; then
|
||||
use_upnp_default=yes
|
||||
upnp_setting=1
|
||||
fi
|
||||
AC_MSG_RESULT([$use_upnp_default])
|
||||
AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
|
||||
if test "$TARGET_OS" = "windows"; then
|
||||
MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DMINIUPNP_STATICLIB"
|
||||
MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DSTATICLIB -DMINIUPNP_STATICLIB"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -1781,8 +1793,15 @@ if test "$have_natpmp" = "no"; then
|
||||
else
|
||||
if test "$use_natpmp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([whether to build with NAT-PMP enabled by default])
|
||||
use_natpmp=yes
|
||||
AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.])
|
||||
natpmp_setting=0
|
||||
if test "$use_natpmp_default" != "no"; then
|
||||
use_natpmp_default=yes
|
||||
natpmp_setting=1
|
||||
fi
|
||||
AC_MSG_RESULT($use_natpmp_default)
|
||||
AC_DEFINE_UNQUOTED([USE_NATPMP], [$natpmp_setting], [NAT-PMP support not compiled if undefined, otherwise value (0 or 1) determines default state])
|
||||
if test "$TARGET_OS" = "windows"; then
|
||||
NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB"
|
||||
fi
|
||||
@@ -1851,7 +1870,7 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nononononononononono"; then
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
|
||||
fi
|
||||
|
||||
@@ -1965,6 +1984,10 @@ AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
|
||||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
|
||||
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
|
||||
AC_CONFIG_LINKS([contrib/devtools/security-check.py:contrib/devtools/security-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/symbol-check.py:contrib/devtools/symbol-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-security-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/test-symbol-check.py:contrib/devtools/test-symbol-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/iwyu/bitcoin.core.imp:contrib/devtools/iwyu/bitcoin.core.imp])
|
||||
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
|
||||
AC_CONFIG_LINKS([contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff])
|
||||
@@ -1985,7 +2008,15 @@ CPPFLAGS_TEMP="$CPPFLAGS"
|
||||
unset CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS_TEMP"
|
||||
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
|
||||
LDFLAGS_TEMP="$LDFLAGS"
|
||||
unset LDFLAGS
|
||||
LDFLAGS="$LDFLAGS_TEMP"
|
||||
|
||||
LIBS_TEMP="$LIBS"
|
||||
unset LIBS
|
||||
LIBS="$LIBS_TEMP"
|
||||
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig"
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -26,6 +26,9 @@ The [Debian](/contrib/debian) subfolder contains the copyright file.
|
||||
|
||||
All other packaging related files can be found in the [bitcoin-core/packaging](https://github.com/bitcoin-core/packaging) repository.
|
||||
|
||||
### [Builder keys](/contrib/builder-keys)
|
||||
PGP keys used for signing Bitcoin Core [release](/doc/release-process.md) results.
|
||||
|
||||
### [MacDeploy](/contrib/macdeploy) ###
|
||||
Scripts and notes for Mac builds.
|
||||
|
||||
@@ -37,9 +40,3 @@ Utilities to generate test vectors for the data-driven Bitcoin tests.
|
||||
|
||||
### [Verify Binaries](/contrib/verifybinaries) ###
|
||||
This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.
|
||||
|
||||
Command Line Tools
|
||||
---------------------
|
||||
|
||||
### [Completions](/contrib/completions) ###
|
||||
Shell completions for bash and fish.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoin-cli(1)
|
||||
# Copyright (c) 2012-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoin-tx(1)
|
||||
# Copyright (c) 2016-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoind(1) and bitcoin-qt(1)
|
||||
# Copyright (c) 2012-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
33
contrib/builder-keys/README.md
Normal file
33
contrib/builder-keys/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
## PGP keys of builders and Developers
|
||||
|
||||
The file `keys.txt` contains fingerprints of the public keys of builders and
|
||||
active developers.
|
||||
|
||||
The associated keys are mainly used to sign git commits or the build results
|
||||
of Guix builds.
|
||||
|
||||
The most recent version of each pgp key can be found on most pgp key servers.
|
||||
|
||||
Fetch the latest version from the key server to see if any key was revoked in
|
||||
the meantime.
|
||||
To fetch the latest version of all pgp keys in your gpg homedir,
|
||||
|
||||
```sh
|
||||
gpg --refresh-keys
|
||||
```
|
||||
|
||||
To fetch keys of builders and active developers, feed the list of fingerprints
|
||||
of the primary keys into gpg:
|
||||
|
||||
On \*NIX:
|
||||
```sh
|
||||
while read fingerprint keyholder_name; do gpg --keyserver hkps://keys.openpgp.org --recv-keys ${fingerprint}; done < ./keys.txt
|
||||
```
|
||||
|
||||
On Windows (requires Gpg4win >= 4.0.0):
|
||||
```
|
||||
FOR /F "tokens=1" %i IN (keys.txt) DO gpg --keyserver hkps://keys.openpgp.org --recv-keys %i
|
||||
```
|
||||
|
||||
Add your key to the list if you provided Guix attestations for two major or
|
||||
minor releases of Bitcoin Core.
|
||||
57
contrib/builder-keys/keys.txt
Normal file
57
contrib/builder-keys/keys.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C Aaron Clauson (sipsorcery)
|
||||
617C90010B3BD370B0AC7D424BB42E31C79111B8 Akira Takizawa (akx20000)
|
||||
E944AE667CF960B1004BC32FCA662BE18B877A60 Andreas Schildbach (aschildbach)
|
||||
152812300785C96444D3334D17565732E08E5E41 Andrew Chow (achow101)
|
||||
590B7292695AFFA5B672CBB2E13FC145CD3F4304 Antoine Poinsot (darosior)
|
||||
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 Ben Carman (benthecarman)
|
||||
912FD3228387123DC97E0E57D5566241A0295FA9 BtcDrak (btcdrak)
|
||||
04017A2A6D9A0CCDC81D8EC296AB007F1A7ED999 Carl Dong (dongcarl)
|
||||
C519EBCF3B926298946783EFF6430754120EC2F4 Christian Decker (cdecker)
|
||||
18AE2F798E0D239755DA4FD24B79F986CBDF8736 Chun Kuan Le (ken2812221)
|
||||
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 CoinForensics (CoinForensics)
|
||||
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)
|
||||
6F993B250557E7B016ADE5713BDCDA2D87A881D9 Fuzzbawls (Fuzzbawls)
|
||||
01CDF4627A3B88AAE4A571C87588242FBE38D3A8 Gavin Andresen (gavinandresen)
|
||||
6B002C6EA3F91B1B0DF0C9BC8F617F1200A6D25C Gloria Zhao (glozow)
|
||||
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F Hennadii Stepanov (hebasto)
|
||||
A2FD494D0021AA9B4FA58F759102B7AE654A4A5A Ilyas Ridhuan (IlyasRidhuan)
|
||||
2688F5A9A4BE0F295E921E8A25F27A38A47AD566 James O'Beirne (jamesob)
|
||||
D3F22A3A4C366C2DCB66D3722DA9C5A7FA81EA35 Jarol Rodriguez (jarolrod)
|
||||
7480909378D544EA6B6DCEB7535B12980BB8A4D3 Jeffri H Frontz (jhfrontz)
|
||||
D3CC177286005BB8FF673294C5242A1AB3936517 jl2012 (jl2012)
|
||||
82921A4B88FD454B7EB8CE3C796C4109063D4EAF Jon Atack (jonatack)
|
||||
32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC Jonas Schnelli (jonasschnelli)
|
||||
4B4E840451149DD7FB0D633477DFAB5C3108B9A8 Jorge Timon (jtimon)
|
||||
C42AFF7C61B3E44A1454CD3557AF762DB3353322 Karl-Johan Alm (kallewoof)
|
||||
70A1D47DD44F59DF8B22244333E472FE870C7E5D Kristaps Kaupe (kristapsk)
|
||||
30DE693AE0DE9E37B3E7EB6BBFF0F67810C1EED1 Lisa Neigut (niftynei)
|
||||
E463A93F5F3117EEDE6C7316BD02942421F4889F Luke Dashjr (luke-jr)
|
||||
B8B3F1C0E58C15DB6A81D30C3648A882F4316B9B Marco Falke (marco)
|
||||
07DF3E57A548CCFB7530709189BBB8663E2E65CE Matt Corallo (BlueMatt)
|
||||
CA03882CB1FC067B5D3ACFE4D300116E1C875A3D MeshCollider (meshcollider)
|
||||
E777299FC265DD04793070EB944D35F9AC3DB76A Michael Ford (fanquake)
|
||||
AD5764F4ADCE1B99BDFD179E12335A271D4D62EC Michael Tidwell (miketwenty1)
|
||||
9692B91BBF0E8D34DFD33B1882C5C009628ECF0C Michagogo (michagogo)
|
||||
C57E4B42223FDE851D4F69DD28DF2724F241D8EE midnightmagic (midnightmagic)
|
||||
F4FC70F07310028424EFC20A8E4256593F177720 Oliver Gugger (guggero, Oliver Gugger)
|
||||
D62A803E27E7F43486035ADBBCD04D8E9CCCAC2A Paul Rabahy (prab)
|
||||
37EC7D7B0A217CDB4B4E007E7FAB114267E4FA04 Peter Todd (petertodd)
|
||||
D762373D24904A3E42F33B08B9A408E71DAAC974 Pieter Wuille [Location: Leuven, Belgium] (sipa)
|
||||
133EAC179436F14A5CF1B794860FEB804E669320 Pieter Wuille (sipa)
|
||||
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 Sebastian Falbesoner (theStack)
|
||||
A8FC55F3B04BA3146F3492E79303B33A305224CB Sebastian Kung (TheCharlatan)
|
||||
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 Sjors Provoost (sjors)
|
||||
867345026B6763E8B07EE73AB6737117397F5C4F Stephan Oeste (Emzy)
|
||||
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)
|
||||
@@ -1,99 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-cli --no-files
|
||||
|
||||
function __fish_bitcoin_cli_get_commands_helper
|
||||
set --local cmd (commandline -oc)
|
||||
|
||||
# Don't return commands if '-help or -?' in commandline
|
||||
if string match --quiet --regex -- '^-help$|^-\?$' $cmd
|
||||
return
|
||||
end
|
||||
|
||||
# Strip help cmd from token to avoid duplication errors
|
||||
set --local cmd (string match --invert --regex -- '^help$' $cmd)
|
||||
# Strip -stdin* options to avoid waiting for input while we fetch completions
|
||||
# TODO: this appears to be broken when run as tab completion (requires ctrl+c to exit)
|
||||
set --local cmd (string match --invert --regex -- '^-stdin.*$' $cmd)
|
||||
|
||||
# Match, format and return commands
|
||||
for command in ($cmd help 2>&1 | string match --invert -r '^\=\=.*' | string match --invert -r '^\\s*$')
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_bitcoin_cli_get_commands
|
||||
argparse 'nohelp' 'commandsonly' -- $argv
|
||||
set --local commands
|
||||
|
||||
# Exclude description, exclude help
|
||||
if set -q _flag_nohelp; and set -q _flag_commandsonly
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help')
|
||||
# Include description, exclude help
|
||||
else if set -q _flag_nohelp
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help')
|
||||
# Exclude description, include help
|
||||
else if set -q _flag_commandsonly
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '')
|
||||
# Include description, include help
|
||||
else
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t)
|
||||
end
|
||||
|
||||
if string match -q -r '^.*error.*$' $commands[1]
|
||||
# RPC offline or RPC wallet not loaded
|
||||
return
|
||||
else
|
||||
for command in $commands
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function __fish_bitcoin_cli_get_options
|
||||
argparse 'nofiles' -- $argv
|
||||
set --local cmd (commandline -oc)
|
||||
# Don't return options if '-help or -?' in commandline
|
||||
if string match --quiet --regex -- '^-help$|-\?$' $cmd
|
||||
return
|
||||
end
|
||||
set --local options
|
||||
|
||||
if set -q _flag_nofiles
|
||||
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
|
||||
else
|
||||
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
|
||||
end
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Add options with file completion
|
||||
# Don't offer after a command is given
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_options)"
|
||||
# Enable file completions only if the commandline now contains a `*.=` style option
|
||||
complete --command bitcoin-cli \
|
||||
--condition 'string match --regex -- ".*=" (commandline -pt)' \
|
||||
--force-files
|
||||
|
||||
# Add options without file completion
|
||||
# Don't offer after a command is given
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_options --nofiles)"
|
||||
|
||||
# Add commands
|
||||
# Permit command completions after `bitcoin-cli help` but not after other commands
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly --nohelp)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_commands)"
|
||||
@@ -1,35 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-qt --no-files
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoinqt_get_options
|
||||
argparse 'nofiles' -- $argv
|
||||
set --local cmd (commandline -opc)[1]
|
||||
set --local options
|
||||
|
||||
if set -q _flag_nofiles
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
|
||||
else
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
|
||||
end
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Add options with file completion
|
||||
complete \
|
||||
--command bitcoin-qt \
|
||||
--arguments "(__fish_bitcoinqt_get_options)"
|
||||
# Enable file completions only if the commandline now contains a `*.=` style option
|
||||
complete -c bitcoin-qt \
|
||||
--condition 'string match --regex -- ".*=" (commandline -pt)' \
|
||||
--force-files
|
||||
|
||||
# Add options without file completion
|
||||
complete \
|
||||
--command bitcoin-qt \
|
||||
--arguments "(__fish_bitcoinqt_get_options --nofiles)"
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-tx --no-files
|
||||
|
||||
# Modified version of __fish_seen_subcommand_from
|
||||
# Uses regex to detect cmd= syntax
|
||||
function __fish_bitcoin_seen_cmd
|
||||
set -l cmd (commandline -oc)
|
||||
set -e cmd[1]
|
||||
for i in $cmd
|
||||
for j in $argv
|
||||
if string match --quiet --regex -- "^$j.*" $i
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoin_tx_get_options
|
||||
set --local cmd (commandline -oc)[1]
|
||||
if string match --quiet --regex -- '^-help$|-\?$' $cmd
|
||||
return
|
||||
end
|
||||
|
||||
for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Extract commands
|
||||
function __fish_bitcoin_tx_get_commands
|
||||
argparse 'commandsonly' -- $argv
|
||||
set --local cmd (commandline -oc)[1]
|
||||
set --local commands
|
||||
|
||||
if set -q _flag_commandsonly
|
||||
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '' | string replace -r '=.*' '')
|
||||
else
|
||||
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
|
||||
end
|
||||
|
||||
for command in $commands
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
# Add options
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--condition "not __fish_bitcoin_seen_cmd (__fish_bitcoin_tx_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_tx_get_options)" \
|
||||
--no-files
|
||||
|
||||
# Add commands
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--arguments "(__fish_bitcoin_tx_get_commands)" \
|
||||
--no-files
|
||||
|
||||
# Add file completions for load and set commands
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--condition 'string match --regex -- "(load|set)=" (commandline -pt)' \
|
||||
--force-files
|
||||
@@ -1,38 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-util --no-files
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoin_util_get_options
|
||||
set --local cmd (commandline -opc)[1]
|
||||
set --local options
|
||||
|
||||
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Extract commands
|
||||
function __fish_bitcoin_util_get_commands
|
||||
set --local cmd (commandline -opc)[1]
|
||||
set --local commands
|
||||
|
||||
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
|
||||
for command in $commands
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
# Add options
|
||||
complete \
|
||||
--command bitcoin-util \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_util_get_commands)" \
|
||||
--arguments "(__fish_bitcoin_util_get_options)"
|
||||
|
||||
# Add commands
|
||||
complete \
|
||||
--command bitcoin-util \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_util_get_commands)" \
|
||||
--arguments "(__fish_bitcoin_util_get_commands)"
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-wallet --no-files
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoin_wallet_get_options
|
||||
set --local cmd (commandline -opc)[1]
|
||||
for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Extract commands
|
||||
function __fish_bitcoin_wallet_get_commands
|
||||
set --local cmd (commandline -opc)[1]
|
||||
for command in ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
# Add options
|
||||
complete \
|
||||
--command bitcoin-wallet \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_wallet_get_commands)" \
|
||||
--arguments "(__fish_bitcoin_wallet_get_options)"
|
||||
|
||||
# Add commands
|
||||
complete \
|
||||
--command bitcoin-wallet \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_wallet_get_commands)" \
|
||||
--arguments "(__fish_bitcoin_wallet_get_commands)"
|
||||
|
||||
# Add file completions for load and set commands
|
||||
complete --command bitcoin-wallet \
|
||||
--condition "string match -r -- '(dumpfile|datadir)*=' (commandline -pt)" \
|
||||
--force-files
|
||||
@@ -1,35 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoind --no-files
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoind_get_options
|
||||
argparse 'nofiles' -- $argv
|
||||
set --local cmd (commandline -opc)[1]
|
||||
set --local options
|
||||
|
||||
if set -q _flag_nofiles
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
|
||||
else
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
|
||||
end
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Add options with file completion
|
||||
complete \
|
||||
--command bitcoind \
|
||||
--arguments "(__fish_bitcoind_get_options)"
|
||||
# Enable file completions only if the commandline now contains a `*.=` style option
|
||||
complete --command bitcoind \
|
||||
--condition 'string match --regex -- ".*=" (commandline -pt)' \
|
||||
--force-files
|
||||
|
||||
# Add options without file completion
|
||||
complete \
|
||||
--command bitcoind \
|
||||
--arguments "(__fish_bitcoind_get_options --nofiles)"
|
||||
|
||||
@@ -5,16 +5,24 @@ Upstream-Contact: Satoshi Nakamoto <satoshin@gmx.com>
|
||||
Source: https://github.com/bitcoin/bitcoin
|
||||
|
||||
Files: *
|
||||
Copyright: 2009-2023, Bitcoin Core Developers
|
||||
Copyright: 2009-2022, Bitcoin Core Developers
|
||||
License: Expat
|
||||
Comment: The Bitcoin Core Developers encompasses all contributors to the
|
||||
project, listed in the release notes or the git log.
|
||||
Comment: The Bitcoin Core Developers encompasses the current developers listed on bitcoin.org,
|
||||
as well as the numerous contributors to the project.
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
|
||||
2011, Matt Corallo <matt@bluematt.me>
|
||||
License: GPL-2+
|
||||
|
||||
Files: src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
|
||||
Copyright: 2008 Don Anderson <dda@sleepycat.com>
|
||||
License: GNU-All-permissive-License
|
||||
|
||||
Files: src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
|
||||
Copyright: 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
License: GNU-All-permissive-License
|
||||
|
||||
Files: src/qt/res/icons/add.png
|
||||
src/qt/res/icons/address-book.png
|
||||
src/qt/res/icons/chevron.png
|
||||
@@ -104,6 +112,12 @@ License: Expat
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License: GNU-All-permissive-License
|
||||
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.
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
|
||||
@@ -146,7 +146,7 @@ def main():
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=None,
|
||||
stdin=subprocess.PIPE,
|
||||
text=True)
|
||||
universal_newlines=True)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
sys.exit(p.returncode)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ 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, text=True)
|
||||
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.
|
||||
@@ -36,7 +36,7 @@ versions = []
|
||||
for relpath in BINARIES:
|
||||
abspath = os.path.join(builddir, relpath)
|
||||
try:
|
||||
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True)
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2015-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2015-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
@@ -34,7 +34,7 @@ def check_ELF_RELRO(binary) -> bool:
|
||||
flags = binary.get(lief.ELF.DYNAMIC_TAGS.FLAGS)
|
||||
if flags.value & lief.ELF.DYNAMIC_FLAGS.BIND_NOW:
|
||||
have_bindnow = True
|
||||
except Exception:
|
||||
except:
|
||||
have_bindnow = False
|
||||
|
||||
return have_gnu_relro and have_bindnow
|
||||
@@ -146,12 +146,6 @@ def check_PE_control_flow(binary) -> bool:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_PE_Canary(binary) -> bool:
|
||||
'''
|
||||
Check for use of stack canary
|
||||
'''
|
||||
return binary.has_symbol('__stack_chk_fail')
|
||||
|
||||
def check_MACHO_NOUNDEFS(binary) -> bool:
|
||||
'''
|
||||
Check for no undefined references.
|
||||
@@ -209,7 +203,6 @@ BASE_PE = [
|
||||
('NX', check_NX),
|
||||
('RELOC_SECTION', check_PE_RELOC_SECTION),
|
||||
('CONTROL_FLOW', check_PE_control_flow),
|
||||
('Canary', check_PE_Canary),
|
||||
]
|
||||
|
||||
BASE_MACHO = [
|
||||
|
||||
@@ -15,19 +15,19 @@ from typing import List, Dict
|
||||
|
||||
import lief #type:ignore
|
||||
|
||||
# Debian 10 (Buster) EOL: 2024. https://wiki.debian.org/LTS
|
||||
# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
|
||||
#
|
||||
# - libgcc version 8.3.0 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libgcc1)
|
||||
# - libc version 2.28 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libc6)
|
||||
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
|
||||
# - libc version 2.24 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=libc6)
|
||||
#
|
||||
# Ubuntu 18.04 (Bionic) EOL: 2028. https://wiki.ubuntu.com/ReleaseTeam
|
||||
# Ubuntu 16.04 (Xenial) EOL: 2026. https://wiki.ubuntu.com/Releases
|
||||
#
|
||||
# - libgcc version 8.4.0 (https://packages.ubuntu.com/bionic/libgcc1)
|
||||
# - libc version 2.27 (https://packages.ubuntu.com/bionic/libc6)
|
||||
# - g++ version 5.3.1
|
||||
# - libc version 2.23
|
||||
#
|
||||
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
|
||||
#
|
||||
# - libgcc version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
|
||||
# - g++ version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
|
||||
# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
|
||||
#
|
||||
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
|
||||
@@ -35,10 +35,10 @@ import lief #type:ignore
|
||||
MAX_VERSIONS = {
|
||||
'GCC': (4,8,0),
|
||||
'GLIBC': {
|
||||
lief.ELF.ARCH.x86_64: (2,27),
|
||||
lief.ELF.ARCH.ARM: (2,27),
|
||||
lief.ELF.ARCH.AARCH64:(2,27),
|
||||
lief.ELF.ARCH.PPC64: (2,27),
|
||||
lief.ELF.ARCH.x86_64: (2,18),
|
||||
lief.ELF.ARCH.ARM: (2,18),
|
||||
lief.ELF.ARCH.AARCH64:(2,18),
|
||||
lief.ELF.ARCH.PPC64: (2,18),
|
||||
lief.ELF.ARCH.RISCV: (2,27),
|
||||
},
|
||||
'LIBATOMIC': (1,0),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2015-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2015-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
@@ -39,7 +39,7 @@ def call_security_check(cc, source, executable, options):
|
||||
env_flags += filter(None, os.environ.get(var, '').split(' '))
|
||||
|
||||
subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True)
|
||||
p = subprocess.run([os.path.join(os.path.dirname(__file__), 'security-check.py'), executable], stdout=subprocess.PIPE, text=True)
|
||||
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):
|
||||
@@ -94,19 +94,19 @@ class TestSecurityChecks(unittest.TestCase):
|
||||
cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')
|
||||
write_testcode(source)
|
||||
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--disable-nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fno-stack-protector']),
|
||||
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION CONTROL_FLOW Canary'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--disable-nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
|
||||
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
|
||||
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
|
||||
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE']),
|
||||
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW')) # -pie -fPIE does nothing unless --dynamicbase is also supplied
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE']),
|
||||
(1, executable+': failed HIGH_ENTROPY_VA CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']),
|
||||
(1, executable+': failed CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE', '-fcf-protection=full','-fstack-protector-all', '-lssp']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE', '-fcf-protection=full']),
|
||||
(0, ''))
|
||||
|
||||
clean_files(source, executable)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
@@ -23,13 +23,13 @@ def call_symbol_check(cc: List[str], source, executable, options):
|
||||
env_flags += filter(None, os.environ.get(var, '').split(' '))
|
||||
|
||||
subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True)
|
||||
p = subprocess.run([os.path.join(os.path.dirname(__file__), 'symbol-check.py'), executable], stdout=subprocess.PIPE, text=True)
|
||||
p = subprocess.run(['./contrib/devtools/symbol-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True)
|
||||
os.remove(source)
|
||||
os.remove(executable)
|
||||
return (p.returncode, p.stdout.rstrip())
|
||||
|
||||
def get_machine(cc: List[str]):
|
||||
p = subprocess.run([*cc,'-dumpmachine'], stdout=subprocess.PIPE, text=True)
|
||||
p = subprocess.run([*cc,'-dumpmachine'], stdout=subprocess.PIPE, universal_newlines=True)
|
||||
return p.stdout.rstrip()
|
||||
|
||||
class TestSymbolChecks(unittest.TestCase):
|
||||
@@ -38,6 +38,31 @@ class TestSymbolChecks(unittest.TestCase):
|
||||
executable = 'test1'
|
||||
cc = determine_wellknown_cmd('CC', 'gcc')
|
||||
|
||||
# there's no way to do this test for RISC-V at the moment; we build for
|
||||
# RISC-V in a glibc 2.27 environment and we allow all symbols from 2.27.
|
||||
if 'riscv' in get_machine(cc):
|
||||
self.skipTest("test not available for RISC-V")
|
||||
|
||||
# nextup was introduced in GLIBC 2.24, so is newer than our supported
|
||||
# glibc (2.18), and available in our release build environment (2.24).
|
||||
with open(source, 'w', encoding="utf8") as f:
|
||||
f.write('''
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
double nextup(double x);
|
||||
|
||||
int main()
|
||||
{
|
||||
nextup(3.14);
|
||||
return 0;
|
||||
}
|
||||
''')
|
||||
|
||||
self.assertEqual(call_symbol_check(cc, source, executable, ['-lm']),
|
||||
(1, executable + ': symbol nextup from unsupported version GLIBC_2.24(3)\n' +
|
||||
executable + ': failed IMPORTED_SYMBOLS'))
|
||||
|
||||
# -lutil is part of the libc6 package so a safe bet that it's installed
|
||||
# it's also out of context enough that it's unlikely to ever become a real dependency
|
||||
source = 'test2.c'
|
||||
|
||||
@@ -167,10 +167,6 @@ For reference, the graphic below outlines Guix v1.3.0's dependency graph:
|
||||
|
||||

|
||||
|
||||
#### Consider /tmp on tmpfs
|
||||
|
||||
If you use an NVME (SSD) drive, you may encounter [cryptic build errors](#coreutils-fail-teststail-2inotify-dir-recreate). Mounting a [tmpfs at /tmp](https://ubuntu.com/blog/data-driven-analysis-tmp-on-tmpfs) should prevent this and may improve performance as a bonus.
|
||||
|
||||
#### Guile
|
||||
|
||||
##### Choosing a Guile version and sticking to it
|
||||
@@ -338,8 +334,6 @@ packages in Debian at the time of writing.
|
||||
|-----------------------|---------------------|
|
||||
| guile-gcrypt | libgcrypt-dev |
|
||||
| guile-git | libgit2-dev |
|
||||
| guile-gnutls | (none) |
|
||||
| guile-json | (none) |
|
||||
| guile-lzlib | liblz-dev |
|
||||
| guile-ssh | libssh-dev |
|
||||
| guile-sqlite3 | libsqlite3-dev |
|
||||
@@ -390,9 +384,8 @@ cd guix
|
||||
```
|
||||
|
||||
You will likely want to build the latest release, however, if the latest release
|
||||
when you're reading this is still 1.3.0 then you may want to use 998eda30 instead
|
||||
to avoid the issues described in [#25099](
|
||||
https://github.com/bitcoin/bitcoin/pull/25099).
|
||||
when you're reading this is still 1.2.0 then you may want to use 95aca29 instead
|
||||
to avoid a problem in the GnuTLS test suite.
|
||||
|
||||
```
|
||||
git branch -a -l 'origin/version-*' # check for the latest release
|
||||
@@ -616,8 +609,6 @@ systemctl enable guix-daemon
|
||||
systemctl start guix-daemon
|
||||
```
|
||||
|
||||
Remember to set `--no-substitute` in `$libdir/systemd/system/guix-daemon.service` and other customizations if you used them for `guix-daemon-original.service`.
|
||||
|
||||
##### If you installed Guix via the Debian/Ubuntu distribution packages
|
||||
|
||||
You will need to create a `guix-daemon-latest` service which points to the new
|
||||
@@ -726,19 +717,6 @@ $ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less
|
||||
times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build
|
||||
failure output for the most accurate, up-to-date information.
|
||||
|
||||
### openssl-1.1.1l and openssl-1.1.1n
|
||||
|
||||
OpenSSL includes tests that will fail once some certificate has expired. A workaround
|
||||
is to change your system clock:
|
||||
|
||||
```sh
|
||||
sudo timedatectl set-ntp no
|
||||
sudo date --set "28 may 2022 15:00:00"
|
||||
sudo --login guix build --cores=1 /gnu/store/g9alz81w4q03ncm542487xd001s6akd4-openssl-1.1.1l.drv
|
||||
sudo --login guix build --cores=1 /gnu/store/mw6ax0gk33gh082anrdrxp2flrbskxv6-openssl-1.1.1n.drv
|
||||
sudo timedatectl set-ntp yes
|
||||
```
|
||||
|
||||
### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character
|
||||
|
||||
This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem
|
||||
@@ -796,7 +774,7 @@ The inotify-dir-create test fails on "remote" filesystems such as overlayfs
|
||||
as non-remote.
|
||||
|
||||
A relatively easy workaround to this is to make sure that a somewhat traditional
|
||||
filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds), see [/tmp on tmpfs](#consider-tmp-on-tmpfs). For
|
||||
filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For
|
||||
Docker users, this might mean [using a volume][docker/volumes], [binding
|
||||
mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
|
||||
[mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag.
|
||||
@@ -804,7 +782,7 @@ mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
|
||||
Please see the following links for more details:
|
||||
|
||||
- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
|
||||
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5)
|
||||
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935)
|
||||
- A commit to skip this test in Guix has been merged into the core-updates branch:
|
||||
[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
|
||||
|
||||
@@ -821,39 +799,3 @@ Please see the following links for more details:
|
||||
[docker/volumes]: https://docs.docker.com/storage/volumes/
|
||||
[docker/bind-mnt]: https://docs.docker.com/storage/bind-mounts/
|
||||
[docker/tmpfs]: https://docs.docker.com/storage/tmpfs/
|
||||
|
||||
# Purging/Uninstalling Guix
|
||||
|
||||
In the extraordinarily rare case where you messed up your Guix installation in
|
||||
an irreversible way, you may want to completely purge Guix from your system and
|
||||
start over.
|
||||
|
||||
1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
|
||||
purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
|
||||
2. Remove all build users and groups
|
||||
|
||||
You may check for relevant users and groups using:
|
||||
|
||||
```
|
||||
getent passwd | grep guix
|
||||
getent group | grep guix
|
||||
```
|
||||
|
||||
Then, you may remove users and groups using:
|
||||
|
||||
```
|
||||
sudo userdel <user>
|
||||
sudo groupdel <group>
|
||||
```
|
||||
|
||||
3. Remove all possible Guix-related directories
|
||||
- `/var/guix/`
|
||||
- `/var/log/guix/`
|
||||
- `/gnu/`
|
||||
- `/etc/guix/`
|
||||
- `/home/*/.config/guix/`
|
||||
- `/home/*/.cache/guix/`
|
||||
- `/home/*/.guix-profile/`
|
||||
- `/root/.config/guix/`
|
||||
- `/root/.cache/guix/`
|
||||
- `/root/.guix-profile/`
|
||||
|
||||
@@ -430,6 +430,55 @@ used.
|
||||
If you start `guix-daemon` using an init script, you can edit said script to
|
||||
supply this flag.
|
||||
|
||||
|
||||
# Purging/Uninstalling Guix
|
||||
|
||||
In the extraordinarily rare case where you messed up your Guix installation in
|
||||
an irreversible way, you may want to completely purge Guix from your system and
|
||||
start over.
|
||||
|
||||
1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
|
||||
purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
|
||||
2. Remove all build users and groups
|
||||
|
||||
You may check for relevant users and groups using:
|
||||
|
||||
```
|
||||
getent passwd | grep guix
|
||||
getent group | grep guix
|
||||
```
|
||||
|
||||
Then, you may remove users and groups using:
|
||||
|
||||
```
|
||||
sudo userdel <user>
|
||||
sudo groupdel <group>
|
||||
```
|
||||
|
||||
3. Remove all possible Guix-related directories
|
||||
- `/var/guix/`
|
||||
- `/var/log/guix/`
|
||||
- `/gnu/`
|
||||
- `/etc/guix/`
|
||||
- `/home/*/.config/guix/`
|
||||
- `/home/*/.cache/guix/`
|
||||
- `/home/*/.guix-profile/`
|
||||
- `/root/.config/guix/`
|
||||
- `/root/.cache/guix/`
|
||||
- `/root/.guix-profile/`
|
||||
|
||||
[b17e]: https://bootstrappable.org/
|
||||
[r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/
|
||||
|
||||
[guix/install.sh]: https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
|
||||
[guix/bin-install]: https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html
|
||||
[guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html
|
||||
[guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html
|
||||
[guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html
|
||||
[guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html
|
||||
|
||||
[debian/guix-bullseye]: https://packages.debian.org/bullseye/guix
|
||||
[ubuntu/guix-hirsute]: https://packages.ubuntu.com/hirsute/guix
|
||||
[fanquake/guix-docker]: https://github.com/fanquake/core-review/tree/master/guix
|
||||
|
||||
[env-vars-list]: #recognized-environment-variables
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
@@ -69,12 +69,16 @@ unset CPLUS_INCLUDE_PATH
|
||||
unset OBJC_INCLUDE_PATH
|
||||
unset OBJCPLUS_INCLUDE_PATH
|
||||
|
||||
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
|
||||
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64:${NATIVE_GCC_STATIC}/lib:${NATIVE_GCC_STATIC}/lib64"
|
||||
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
|
||||
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
||||
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
|
||||
export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
||||
|
||||
prepend_to_search_env_var() {
|
||||
export "${1}=${2}${!1:+:}${!1}"
|
||||
}
|
||||
|
||||
# Set environment variables to point the CROSS toolchain to the right
|
||||
# includes/libs for $HOST
|
||||
case "$HOST" in
|
||||
@@ -188,9 +192,9 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
|
||||
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
|
||||
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-gcc-ar \
|
||||
x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \
|
||||
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
|
||||
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 \
|
||||
FORCE_USE_SYSTEM_CLANG=1
|
||||
|
||||
@@ -238,6 +242,13 @@ case "$HOST" in
|
||||
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
|
||||
esac
|
||||
|
||||
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by
|
||||
# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
|
||||
# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
|
||||
case "$HOST" in
|
||||
*powerpc64*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,--no-tls-get-addr-optimize" ;;
|
||||
esac
|
||||
|
||||
# Make $HOST-specific native binaries from depends available in $PATH
|
||||
export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
|
||||
mkdir -p "$DISTSRC"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2021 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
|
||||
@@ -77,7 +77,6 @@ mkdir -p "$DISTSRC"
|
||||
osslsigncode attach-signature \
|
||||
-in "$infile" \
|
||||
-out "${OUTDIR}/${infile_base/-unsigned}" \
|
||||
-CAfile "$GUIX_ENVIRONMENT/etc/ssl/certs/ca-certificates.crt" \
|
||||
-sigin codesignatures/win/"$infile_base".pem
|
||||
done
|
||||
;;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
(gnu packages shells)
|
||||
(gnu packages tls)
|
||||
(gnu packages version-control)
|
||||
(guix build-system cmake)
|
||||
(guix build-system gnu)
|
||||
(guix build-system python)
|
||||
(guix build-system trivial)
|
||||
@@ -140,17 +139,15 @@ chain for " target " development."))
|
||||
;; https://gcc.gnu.org/install/configure.html
|
||||
(define (hardened-gcc gcc)
|
||||
(package-with-extra-configure-variable (
|
||||
package-with-extra-configure-variable (
|
||||
package-with-extra-configure-variable gcc
|
||||
"--enable-initfini-array" "yes")
|
||||
"--enable-default-ssp" "yes")
|
||||
"--enable-default-pie" "yes"))
|
||||
package-with-extra-configure-variable gcc
|
||||
"--enable-default-ssp" "yes")
|
||||
"--enable-default-pie" "yes"))
|
||||
|
||||
(define* (make-bitcoin-cross-toolchain target
|
||||
#:key
|
||||
(base-gcc-for-libc base-gcc)
|
||||
(base-kernel-headers base-linux-kernel-headers)
|
||||
(base-libc (hardened-glibc glibc-2.27))
|
||||
(base-libc (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.24)))
|
||||
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
|
||||
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
|
||||
desirable for building Bitcoin Core release binaries."
|
||||
@@ -208,58 +205,60 @@ chain for " target " development."))
|
||||
(package-with-extra-patches lief
|
||||
(search-our-patches "lief-fix-ppc64-nx-default.patch")))
|
||||
|
||||
;; Our python-lief package can be removed once we are using
|
||||
;; guix 83bfdb409787cb2737e68b093a319b247b7858e6 or later.
|
||||
;; Note we currently use cmake-minimal.
|
||||
(define-public python-lief
|
||||
(define-public lief
|
||||
(package
|
||||
(name "python-lief")
|
||||
(version "0.12.3")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/lief-project/LIEF")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"11i6hqmcjh56y554kqhl61698n9v66j2qk1c1g63mv2w07h2z661"))))
|
||||
(build-system python-build-system)
|
||||
(native-inputs (list cmake-minimal))
|
||||
(arguments
|
||||
(list
|
||||
#:tests? #f ;needs network
|
||||
#:phases #~(modify-phases %standard-phases
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke
|
||||
"python" "setup.py" "--sdk" "build"
|
||||
(string-append
|
||||
"-j" (number->string (parallel-job-count)))))))))
|
||||
(home-page "https://github.com/lief-project/LIEF")
|
||||
(synopsis "Library to instrument executable formats")
|
||||
(description
|
||||
"@code{python-lief} is a cross platform library which can parse, modify
|
||||
and abstract ELF, PE and MachO formats.")
|
||||
(license license:asl2.0)))
|
||||
(name "python-lief")
|
||||
(version "0.12.1")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/lief-project/LIEF.git")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'parallel-jobs
|
||||
;; build with multiple cores
|
||||
(lambda _
|
||||
(substitute* "setup.py" (("self.parallel if self.parallel else 1") (number->string (parallel-job-count)))))))))
|
||||
(native-inputs
|
||||
`(("cmake" ,cmake)))
|
||||
(home-page "https://github.com/lief-project/LIEF")
|
||||
(synopsis "Library to Instrument Executable Formats")
|
||||
(description "Python library to to provide a cross platform library which can
|
||||
parse, modify and abstract ELF, PE and MachO formats.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define osslsigncode
|
||||
(package
|
||||
(name "osslsigncode")
|
||||
(version "2.5")
|
||||
(version "2.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://github.com/mtrojnar/"
|
||||
name "/archive/" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"03by9706gg0an6dn48pljx38vcb76ziv11bgm8ilwsf293x2k4hv"))))
|
||||
(build-system cmake-build-system)
|
||||
"0byri6xny770wwb2nciq44j5071122l14bvv65axdd70nfjf0q2s"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(inputs
|
||||
`(("openssl", openssl)))
|
||||
`(("openssl" ,openssl)))
|
||||
(arguments
|
||||
'(#:configure-flags
|
||||
(list "-DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE")))
|
||||
`(#:configure-flags
|
||||
`("--without-gsf"
|
||||
"--without-curl"
|
||||
"--disable-dependency-tracking")))
|
||||
(home-page "https://github.com/mtrojnar/osslsigncode")
|
||||
(synopsis "Authenticode signing and timestamping tool")
|
||||
(description "osslsigncode is a small tool that implements part of the
|
||||
@@ -535,18 +534,36 @@ and endian independent.")
|
||||
inspecting signatures in Mach-O binaries.")
|
||||
(license license:expat))))
|
||||
|
||||
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
|
||||
;; We don't use --disable-werror directly, as that would be passed through to bash,
|
||||
;; and cause it's build to fail.
|
||||
(define (hardened-glibc glibc)
|
||||
(package-with-extra-configure-variable (
|
||||
package-with-extra-configure-variable (
|
||||
package-with-extra-configure-variable glibc
|
||||
"enable_werror" "no")
|
||||
"--enable-stack-protector" "all")
|
||||
"--enable-bind-now" "yes"))
|
||||
(define (make-glibc-without-werror glibc)
|
||||
(package-with-extra-configure-variable glibc "enable_werror" "no"))
|
||||
|
||||
(define-public glibc-2.27
|
||||
(define (make-glibc-with-stack-protector glibc)
|
||||
(package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
|
||||
|
||||
(define (make-glibc-with-bind-now glibc)
|
||||
(package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
|
||||
|
||||
(define-public glibc-2.24
|
||||
(package
|
||||
(inherit glibc-2.31)
|
||||
(version "2.24")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://sourceware.org/git/glibc.git")
|
||||
(commit "0d7f1ed30969886c8dde62fbf7d2c79967d4bace")))
|
||||
(file-name (git-file-name "glibc" "0d7f1ed30969886c8dde62fbf7d2c79967d4bace"))
|
||||
(sha256
|
||||
(base32
|
||||
"0g5hryia5v1k0qx97qffgwzrz4lr4jw3s5kj04yllhswsxyjbic3"))
|
||||
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
||||
"glibc-versioned-locpath.patch"
|
||||
"glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
|
||||
"glibc-2.24-no-build-time-cxx-header-run.patch"
|
||||
"glibc-2.24-fcommon.patch"
|
||||
"glibc-2.24-guix-prefix.patch"))))))
|
||||
|
||||
(define-public glibc-2.27/bitcoin-patched
|
||||
(package
|
||||
(inherit glibc-2.31)
|
||||
(version "2.27")
|
||||
@@ -554,23 +571,22 @@ inspecting signatures in Mach-O binaries.")
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://sourceware.org/git/glibc.git")
|
||||
(commit "73886db6218e613bd6d4edf529f11e008a6c2fa6")))
|
||||
(file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6"))
|
||||
(commit "23158b08a0908f381459f273a984c6fd328363cb")))
|
||||
(file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb"))
|
||||
(sha256
|
||||
(base32
|
||||
"0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq"))
|
||||
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
|
||||
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
||||
"glibc-versioned-locpath.patch"
|
||||
"glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
|
||||
"glibc-2.27-fcommon.patch"
|
||||
"glibc-2.27-dont-redefine-nss-database.patch"
|
||||
"glibc-2.27-guix-prefix.patch"))))))
|
||||
|
||||
(packages->manifest
|
||||
(append
|
||||
(list ;; The Basics
|
||||
bash-minimal
|
||||
bash
|
||||
which
|
||||
coreutils-minimal
|
||||
coreutils
|
||||
util-linux
|
||||
;; File(system) inspection
|
||||
file
|
||||
@@ -598,21 +614,25 @@ inspecting signatures in Mach-O binaries.")
|
||||
gcc-toolchain-10
|
||||
(list gcc-toolchain-10 "static")
|
||||
;; Scripting
|
||||
python-minimal ;; (3.9)
|
||||
python-3
|
||||
;; Git
|
||||
git-minimal
|
||||
;; Tests
|
||||
(fix-ppc64-nx-default python-lief))
|
||||
(fix-ppc64-nx-default lief))
|
||||
(let ((target (getenv "HOST")))
|
||||
(cond ((string-suffix? "-mingw32" target)
|
||||
;; Windows
|
||||
(list zip
|
||||
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
|
||||
(make-nsis-for-gcc-10 nsis-x86_64)
|
||||
nss-certs
|
||||
osslsigncode))
|
||||
((string-contains target "-linux-")
|
||||
(list (make-bitcoin-cross-toolchain target)))
|
||||
(list (cond ((string-contains target "riscv64-")
|
||||
(make-bitcoin-cross-toolchain target
|
||||
#:base-libc (make-glibc-with-stack-protector
|
||||
(make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27/bitcoin-patched)))))
|
||||
(else
|
||||
(make-bitcoin-cross-toolchain target)))))
|
||||
((string-contains target "darwin")
|
||||
(list clang-toolchain-10 binutils cmake-minimal xorriso python-signapple))
|
||||
(list clang-toolchain-10 binutils cmake xorriso python-signapple))
|
||||
(else '())))))
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=a68ba2f3cd3cbe32c1f31e13c20ed13487727b32
|
||||
|
||||
commit 6b02af31e9a721bb15a11380cd22d53b621711f8
|
||||
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
Date: Wed Oct 18 17:26:23 2017 +0100
|
||||
|
||||
[AARCH64] Rewrite elf_machine_load_address using _DYNAMIC symbol
|
||||
|
||||
This patch rewrites aarch64 elf_machine_load_address to use special _DYNAMIC
|
||||
symbol instead of _dl_start.
|
||||
|
||||
The static address of _DYNAMIC symbol is stored in the first GOT entry.
|
||||
Here is the change which makes this solution work (part of binutils 2.24):
|
||||
https://sourceware.org/ml/binutils/2013-06/msg00248.html
|
||||
|
||||
i386, x86_64 targets use the same method to do this as well.
|
||||
|
||||
The original implementation relies on a trick that R_AARCH64_ABS32 relocation
|
||||
being resolved at link time and the static address fits in the 32bits.
|
||||
However, in LP64, normally, the address is defined to be 64 bit.
|
||||
|
||||
Here is the C version one which should be portable in all cases.
|
||||
|
||||
* sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use
|
||||
_DYNAMIC symbol to calculate load address.
|
||||
|
||||
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
|
||||
index e86d8b5b63..5a5b8a5de5 100644
|
||||
--- a/sysdeps/aarch64/dl-machine.h
|
||||
+++ b/sysdeps/aarch64/dl-machine.h
|
||||
@@ -49,26 +49,11 @@ elf_machine_load_address (void)
|
||||
/* To figure out the load address we use the definition that for any symbol:
|
||||
dynamic_addr(symbol) = static_addr(symbol) + load_addr
|
||||
|
||||
- The choice of symbol is arbitrary. The static address we obtain
|
||||
- by constructing a non GOT reference to the symbol, the dynamic
|
||||
- address of the symbol we compute using adrp/add to compute the
|
||||
- symbol's address relative to the PC.
|
||||
- This depends on 32bit relocations being resolved at link time
|
||||
- and that the static address fits in the 32bits. */
|
||||
-
|
||||
- ElfW(Addr) static_addr;
|
||||
- ElfW(Addr) dynamic_addr;
|
||||
-
|
||||
- asm (" \n"
|
||||
-" adrp %1, _dl_start; \n"
|
||||
-" add %1, %1, #:lo12:_dl_start \n"
|
||||
-" ldr %w0, 1f \n"
|
||||
-" b 2f \n"
|
||||
-"1: \n"
|
||||
-" .word _dl_start \n"
|
||||
-"2: \n"
|
||||
- : "=r" (static_addr), "=r" (dynamic_addr));
|
||||
- return dynamic_addr - static_addr;
|
||||
+ _DYNAMIC sysmbol is used here as its link-time address stored in
|
||||
+ the special unrelocated first GOT entry. */
|
||||
+
|
||||
+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden;
|
||||
+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic ();
|
||||
}
|
||||
|
||||
/* Set up the loaded object described by L so its unrelocated PLT
|
||||
@@ -18,15 +18,15 @@ Date: Fri May 6 11:03:04 2022 +0100
|
||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
|
||||
|
||||
diff --git a/Makeconfig b/Makeconfig
|
||||
index 86a71e5802..aa2166be60 100644
|
||||
index ee379f5852..63c4a2f234 100644
|
||||
--- a/Makeconfig
|
||||
+++ b/Makeconfig
|
||||
@@ -896,7 +896,7 @@ ifeq "$(strip $(+cflags))" ""
|
||||
@@ -824,7 +824,7 @@ ifeq "$(strip $(+cflags))" ""
|
||||
+cflags := $(default_cflags)
|
||||
endif # $(+cflags) == ""
|
||||
|
||||
+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
|
||||
- $(+stack-protector)
|
||||
+ $(+stack-protector) -fcommon
|
||||
-+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags)
|
||||
++cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) -fcommon
|
||||
+gcc-nowarn := -w
|
||||
|
||||
# Don't duplicate options if we inherited variables from the parent.
|
||||
25
contrib/guix/patches/glibc-2.24-guix-prefix.patch
Normal file
25
contrib/guix/patches/glibc-2.24-guix-prefix.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
Without ffile-prefix-map, the debug symbols will contain paths for the
|
||||
guix store which will include the hashes of each package. However, the
|
||||
hash for the same package will differ when on different architectures.
|
||||
In order to be reproducible regardless of the architecture used to build
|
||||
the package, map all guix store prefixes to something fixed, e.g. /usr.
|
||||
|
||||
We might be able to drop this in favour of using --with-nonshared-cflags
|
||||
when we being using newer versions of glibc.
|
||||
|
||||
--- a/Makeconfig
|
||||
+++ b/Makeconfig
|
||||
@@ -950,6 +950,10 @@ object-suffixes-for-libc += .oS
|
||||
# shared objects. We don't want to use CFLAGS-os because users may, for
|
||||
# example, make that processor-specific.
|
||||
CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
|
||||
+
|
||||
+# Map Guix store paths to /usr
|
||||
+CFLAGS-.oS += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;`
|
||||
+
|
||||
CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
|
||||
libtype.oS = lib%_nonshared.a
|
||||
endif
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=fc3e1337be1c6935ab58bd13520f97a535cf70cc
|
||||
|
||||
commit dc23a45db566095e83ff0b7a57afc87fb5ca89a1
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Wed Sep 21 10:45:32 2016 +0200
|
||||
|
||||
Avoid running $(CXX) during build to obtain header file paths
|
||||
|
||||
This reduces the build time somewhat and is particularly noticeable
|
||||
during rebuilds with few code changes.
|
||||
|
||||
diff --git a/Makerules b/Makerules
|
||||
index 7e4077ee50..c338850de5 100644
|
||||
--- a/Makerules
|
||||
+++ b/Makerules
|
||||
@@ -121,14 +121,10 @@ ifneq (,$(CXX))
|
||||
# will be used instead of /usr/include/stdlib.h and /usr/include/math.h.
|
||||
before-compile := $(common-objpfx)cstdlib $(common-objpfx)cmath \
|
||||
$(before-compile)
|
||||
-cstdlib=$(shell echo "\#include <cstdlib>" | $(CXX) -M -MP -x c++ - \
|
||||
- | sed -n "/cstdlib:/{s/:$$//;p}")
|
||||
-$(common-objpfx)cstdlib: $(cstdlib)
|
||||
+$(common-objpfx)cstdlib: $(c++-cstdlib-header)
|
||||
$(INSTALL_DATA) $< $@T
|
||||
$(move-if-change) $@T $@
|
||||
-cmath=$(shell echo "\#include <cmath>" | $(CXX) -M -MP -x c++ - \
|
||||
- | sed -n "/cmath:/{s/:$$//;p}")
|
||||
-$(common-objpfx)cmath: $(cmath)
|
||||
+$(common-objpfx)cmath: $(c++-cmath-header)
|
||||
$(INSTALL_DATA) $< $@T
|
||||
$(move-if-change) $@T $@
|
||||
endif
|
||||
diff --git a/config.make.in b/config.make.in
|
||||
index 95c6f36876..04a8b3ed7f 100644
|
||||
--- a/config.make.in
|
||||
+++ b/config.make.in
|
||||
@@ -45,6 +45,8 @@ defines = @DEFINES@
|
||||
sysheaders = @sysheaders@
|
||||
sysincludes = @SYSINCLUDES@
|
||||
c++-sysincludes = @CXX_SYSINCLUDES@
|
||||
+c++-cstdlib-header = @CXX_CSTDLIB_HEADER@
|
||||
+c++-cmath-header = @CXX_CMATH_HEADER@
|
||||
all-warnings = @all_warnings@
|
||||
enable-werror = @enable_werror@
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 17625e1041..6ff252744b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -635,6 +635,8 @@ BISON
|
||||
INSTALL_INFO
|
||||
PERL
|
||||
BASH_SHELL
|
||||
+CXX_CMATH_HEADER
|
||||
+CXX_CSTDLIB_HEADER
|
||||
CXX_SYSINCLUDES
|
||||
SYSINCLUDES
|
||||
AUTOCONF
|
||||
@@ -5054,6 +5056,18 @@ fi
|
||||
|
||||
|
||||
|
||||
+# Obtain some C++ header file paths. This is used to make a local
|
||||
+# copy of those headers in Makerules.
|
||||
+if test -n "$CXX"; then
|
||||
+ find_cxx_header () {
|
||||
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
|
||||
+ }
|
||||
+ CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
|
||||
+ CXX_CMATH_HEADER="$(find_cxx_header cmath)"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
# Test if LD_LIBRARY_PATH contains the notation for the current directory
|
||||
# since this would lead to problems installing/building glibc.
|
||||
# LD_LIBRARY_PATH contains the current directory if one of the following
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 33bcd62180..9938ab0dc2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1039,6 +1039,18 @@ fi
|
||||
AC_SUBST(SYSINCLUDES)
|
||||
AC_SUBST(CXX_SYSINCLUDES)
|
||||
|
||||
+# Obtain some C++ header file paths. This is used to make a local
|
||||
+# copy of those headers in Makerules.
|
||||
+if test -n "$CXX"; then
|
||||
+ find_cxx_header () {
|
||||
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
|
||||
+ }
|
||||
+ CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
|
||||
+ CXX_CMATH_HEADER="$(find_cxx_header cmath)"
|
||||
+fi
|
||||
+AC_SUBST(CXX_CSTDLIB_HEADER)
|
||||
+AC_SUBST(CXX_CMATH_HEADER)
|
||||
+
|
||||
# Test if LD_LIBRARY_PATH contains the notation for the current directory
|
||||
# since this would lead to problems installing/building glibc.
|
||||
# LD_LIBRARY_PATH contains the current directory if one of the following
|
||||
@@ -0,0 +1,87 @@
|
||||
commit 78a90c2f74a2012dd3eff302189e47ff6779a757
|
||||
Author: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Fri Mar 2 23:07:14 2018 +0100
|
||||
|
||||
Fix multiple definitions of __nss_*_database (bug 22918)
|
||||
|
||||
(cherry picked from commit eaf6753f8aac33a36deb98c1031d1bad7b593d2d)
|
||||
|
||||
diff --git a/nscd/gai.c b/nscd/gai.c
|
||||
index d081747797..576fd0045b 100644
|
||||
--- a/nscd/gai.c
|
||||
+++ b/nscd/gai.c
|
||||
@@ -45,3 +45,6 @@
|
||||
#ifdef HAVE_LIBIDN
|
||||
# include <libidn/idn-stub.c>
|
||||
#endif
|
||||
+
|
||||
+/* Some variables normally defined in libc. */
|
||||
+service_user *__nss_hosts_database attribute_hidden;
|
||||
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
|
||||
index d5e655974f..b0f0c11a3e 100644
|
||||
--- a/nss/nsswitch.c
|
||||
+++ b/nss/nsswitch.c
|
||||
@@ -62,7 +62,7 @@ static service_library *nss_new_service (name_database *database,
|
||||
|
||||
/* Declare external database variables. */
|
||||
#define DEFINE_DATABASE(name) \
|
||||
- extern service_user *__nss_##name##_database attribute_hidden; \
|
||||
+ service_user *__nss_##name##_database attribute_hidden; \
|
||||
weak_extern (__nss_##name##_database)
|
||||
#include "databases.def"
|
||||
#undef DEFINE_DATABASE
|
||||
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
|
||||
index eccb535ef5..63573b9ebc 100644
|
||||
--- a/nss/nsswitch.h
|
||||
+++ b/nss/nsswitch.h
|
||||
@@ -226,10 +226,10 @@ libc_hidden_proto (__nss_hostname_digits_dots)
|
||||
#define MAX_NR_ADDRS 48
|
||||
|
||||
/* Prototypes for __nss_*_lookup2 functions. */
|
||||
-#define DEFINE_DATABASE(arg) \
|
||||
- service_user *__nss_##arg##_database attribute_hidden; \
|
||||
- int __nss_##arg##_lookup2 (service_user **, const char *, \
|
||||
- const char *, void **); \
|
||||
+#define DEFINE_DATABASE(arg) \
|
||||
+ extern service_user *__nss_##arg##_database attribute_hidden; \
|
||||
+ int __nss_##arg##_lookup2 (service_user **, const char *, \
|
||||
+ const char *, void **); \
|
||||
libc_hidden_proto (__nss_##arg##_lookup2)
|
||||
#include "databases.def"
|
||||
#undef DEFINE_DATABASE
|
||||
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
|
||||
index f509534ca9..8c64ac59ff 100644
|
||||
--- a/posix/tst-rfc3484-2.c
|
||||
+++ b/posix/tst-rfc3484-2.c
|
||||
@@ -58,6 +58,7 @@ _res_hconf_init (void)
|
||||
#undef USE_NSCD
|
||||
#include "../sysdeps/posix/getaddrinfo.c"
|
||||
|
||||
+service_user *__nss_hosts_database attribute_hidden;
|
||||
|
||||
/* This is the beginning of the real test code. The above defines
|
||||
(among other things) the function rfc3484_sort. */
|
||||
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
|
||||
index ae44087a10..1c61aaf844 100644
|
||||
--- a/posix/tst-rfc3484-3.c
|
||||
+++ b/posix/tst-rfc3484-3.c
|
||||
@@ -58,6 +58,7 @@ _res_hconf_init (void)
|
||||
#undef USE_NSCD
|
||||
#include "../sysdeps/posix/getaddrinfo.c"
|
||||
|
||||
+service_user *__nss_hosts_database attribute_hidden;
|
||||
|
||||
/* This is the beginning of the real test code. The above defines
|
||||
(among other things) the function rfc3484_sort. */
|
||||
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
|
||||
index 7f191abbbc..8f45848e44 100644
|
||||
--- a/posix/tst-rfc3484.c
|
||||
+++ b/posix/tst-rfc3484.c
|
||||
@@ -58,6 +58,7 @@ _res_hconf_init (void)
|
||||
#undef USE_NSCD
|
||||
#include "../sysdeps/posix/getaddrinfo.c"
|
||||
|
||||
+service_user *__nss_hosts_database attribute_hidden;
|
||||
|
||||
/* This is the beginning of the real test code. The above defines
|
||||
(among other things) the function rfc3484_sort. */
|
||||
@@ -20,3 +20,6 @@ when we being using newer versions of glibc.
|
||||
libtype.o := lib%.a
|
||||
object-suffixes += .o
|
||||
ifeq (yes,$(build-shared))
|
||||
--
|
||||
2.35.1
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
By default, 'RTDLLIST' in 'ldd' refers to 'lib64/ld-linux-x86-64.so', whereas
|
||||
it's in 'lib/' for us. This patch fixes that.
|
||||
|
||||
--- a/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
|
||||
+++ b/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
|
||||
--- glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2012-12-25 04:02:13.000000000 +0100
|
||||
+++ glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2013-09-15 23:08:03.000000000 +0200
|
||||
@@ -1,3 +1,3 @@
|
||||
/LD_TRACE_LOADED_OBJECTS=1/a\
|
||||
add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
|
||||
|
||||
260
contrib/install_db4.sh
Executable file
260
contrib/install_db4.sh
Executable file
@@ -0,0 +1,260 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2017-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# Install libdb4.8 (Berkeley DB).
|
||||
|
||||
export LC_ALL=C
|
||||
set -e
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
echo "Usage: $0 <base-dir> [<extra-bdb-configure-flag> ...]"
|
||||
echo
|
||||
echo "Must specify a single argument: the directory in which db4 will be built."
|
||||
echo "This is probably \`pwd\` if you're at the root of the bitcoin repository."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
expand_path() {
|
||||
cd "${1}" && pwd -P
|
||||
}
|
||||
|
||||
BDB_PREFIX="$(expand_path "${1}")/db4"; shift;
|
||||
BDB_VERSION='db-4.8.30.NC'
|
||||
BDB_HASH='12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef'
|
||||
BDB_URL="https://download.oracle.com/berkeley-db/${BDB_VERSION}.tar.gz"
|
||||
|
||||
check_exists() {
|
||||
command -v "$1" >/dev/null
|
||||
}
|
||||
|
||||
sha256_check() {
|
||||
# Args: <sha256_hash> <filename>
|
||||
#
|
||||
if check_exists sha256sum; then
|
||||
echo "${1} ${2}" | sha256sum -c
|
||||
elif check_exists sha256; then
|
||||
if [ "$(uname)" = "FreeBSD" ]; then
|
||||
sha256 -c "${1}" "${2}"
|
||||
else
|
||||
echo "${1} ${2}" | sha256 -c
|
||||
fi
|
||||
else
|
||||
echo "${1} ${2}" | shasum -a 256 -c
|
||||
fi
|
||||
}
|
||||
|
||||
http_get() {
|
||||
# Args: <url> <filename> <sha256_hash>
|
||||
#
|
||||
# It's acceptable that we don't require SSL here because we manually verify
|
||||
# content hashes below.
|
||||
#
|
||||
if [ -f "${2}" ]; then
|
||||
echo "File ${2} already exists; not downloading again"
|
||||
elif check_exists curl; then
|
||||
curl --insecure --retry 5 "${1}" -o "${2}"
|
||||
elif check_exists wget; then
|
||||
wget --no-check-certificate "${1}" -O "${2}"
|
||||
else
|
||||
echo "Simple transfer utilities 'curl' and 'wget' not found. Please install one of them and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sha256_check "${3}" "${2}"
|
||||
}
|
||||
|
||||
# Ensure the commands we use exist on the system
|
||||
if ! check_exists patch; then
|
||||
echo "Command-line tool 'patch' not found. Install patch and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${BDB_PREFIX}"
|
||||
http_get "${BDB_URL}" "${BDB_VERSION}.tar.gz" "${BDB_HASH}"
|
||||
tar -xzvf ${BDB_VERSION}.tar.gz -C "$BDB_PREFIX"
|
||||
cd "${BDB_PREFIX}/${BDB_VERSION}/"
|
||||
|
||||
# Apply a patch necessary when building with clang and c++11 (see https://community.oracle.com/thread/3952592)
|
||||
patch --ignore-whitespace -p1 << 'EOF'
|
||||
commit 3311d68f11d1697565401eee6efc85c34f022ea7
|
||||
Author: fanquake <fanquake@gmail.com>
|
||||
Date: Mon Aug 17 20:03:56 2020 +0800
|
||||
|
||||
Fix C++11 compatibility
|
||||
|
||||
diff --git a/dbinc/atomic.h b/dbinc/atomic.h
|
||||
index 0034dcc..7c11d4a 100644
|
||||
--- a/dbinc/atomic.h
|
||||
+++ b/dbinc/atomic.h
|
||||
@@ -70,7 +70,7 @@ typedef struct {
|
||||
* These have no memory barriers; the caller must include them when necessary.
|
||||
*/
|
||||
#define atomic_read(p) ((p)->value)
|
||||
-#define atomic_init(p, val) ((p)->value = (val))
|
||||
+#define atomic_init_db(p, val) ((p)->value = (val))
|
||||
|
||||
#ifdef HAVE_ATOMIC_SUPPORT
|
||||
|
||||
@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
|
||||
#define atomic_inc(env, p) __atomic_inc(p)
|
||||
#define atomic_dec(env, p) __atomic_dec(p)
|
||||
#define atomic_compare_exchange(env, p, o, n) \
|
||||
- __atomic_compare_exchange((p), (o), (n))
|
||||
+ __atomic_compare_exchange_db((p), (o), (n))
|
||||
static inline int __atomic_inc(db_atomic_t *p)
|
||||
{
|
||||
int temp;
|
||||
@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
|
||||
* which configure could be changed to use.
|
||||
*/
|
||||
-static inline int __atomic_compare_exchange(
|
||||
+static inline int __atomic_compare_exchange_db(
|
||||
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
|
||||
{
|
||||
atomic_value_t was;
|
||||
@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange(
|
||||
#define atomic_dec(env, p) (--(p)->value)
|
||||
#define atomic_compare_exchange(env, p, oldval, newval) \
|
||||
(DB_ASSERT(env, atomic_read(p) == (oldval)), \
|
||||
- atomic_init(p, (newval)), 1)
|
||||
+ atomic_init_db(p, (newval)), 1)
|
||||
#else
|
||||
#define atomic_inc(env, p) __atomic_inc(env, p)
|
||||
#define atomic_dec(env, p) __atomic_dec(env, p)
|
||||
diff --git a/mp/mp_fget.c b/mp/mp_fget.c
|
||||
index 5fdee5a..0b75f57 100644
|
||||
--- a/mp/mp_fget.c
|
||||
+++ b/mp/mp_fget.c
|
||||
@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */
|
||||
|
||||
/* Initialize enough so we can call __memp_bhfree. */
|
||||
alloc_bhp->flags = 0;
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
#ifdef DIAGNOSTIC
|
||||
if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
|
||||
__db_errx(env,
|
||||
@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */
|
||||
MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize,
|
||||
PROT_READ);
|
||||
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
|
||||
alloc_bhp->priority = bhp->priority;
|
||||
alloc_bhp->pgno = bhp->pgno;
|
||||
diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c
|
||||
index 34467d2..f05aa0c 100644
|
||||
--- a/mp/mp_mvcc.c
|
||||
+++ b/mp/mp_mvcc.c
|
||||
@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
|
||||
#else
|
||||
memcpy(frozen_bhp, bhp, SSZA(BH, buf));
|
||||
#endif
|
||||
- atomic_init(&frozen_bhp->ref, 0);
|
||||
+ atomic_init_db(&frozen_bhp->ref, 0);
|
||||
if (mutex != MUTEX_INVALID)
|
||||
frozen_bhp->mtx_buf = mutex;
|
||||
else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
|
||||
@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
|
||||
#endif
|
||||
alloc_bhp->mtx_buf = mutex;
|
||||
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
F_CLR(alloc_bhp, BH_FROZEN);
|
||||
}
|
||||
|
||||
diff --git a/mp/mp_region.c b/mp/mp_region.c
|
||||
index e6cece9..ddbe906 100644
|
||||
--- a/mp/mp_region.c
|
||||
+++ b/mp/mp_region.c
|
||||
@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
|
||||
MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
|
||||
return (ret);
|
||||
SH_TAILQ_INIT(&htab[i].hash_bucket);
|
||||
- atomic_init(&htab[i].hash_page_dirty, 0);
|
||||
+ atomic_init_db(&htab[i].hash_page_dirty, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
|
||||
hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
|
||||
mtx_base + i;
|
||||
SH_TAILQ_INIT(&hp->hash_bucket);
|
||||
- atomic_init(&hp->hash_page_dirty, 0);
|
||||
+ atomic_init_db(&hp->hash_page_dirty, 0);
|
||||
#ifdef HAVE_STATISTICS
|
||||
hp->hash_io_wait = 0;
|
||||
hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
|
||||
diff --git a/mutex/mut_method.c b/mutex/mut_method.c
|
||||
index 2588763..5c6d516 100644
|
||||
--- a/mutex/mut_method.c
|
||||
+++ b/mutex/mut_method.c
|
||||
@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval)
|
||||
MUTEX_LOCK(env, mtx);
|
||||
ret = atomic_read(v) == oldval;
|
||||
if (ret)
|
||||
- atomic_init(v, newval);
|
||||
+ atomic_init_db(v, newval);
|
||||
MUTEX_UNLOCK(env, mtx);
|
||||
|
||||
return (ret);
|
||||
diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c
|
||||
index f3922e0..e40fcdf 100644
|
||||
--- a/mutex/mut_tas.c
|
||||
+++ b/mutex/mut_tas.c
|
||||
@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags)
|
||||
|
||||
#ifdef HAVE_SHARED_LATCHES
|
||||
if (F_ISSET(mutexp, DB_MUTEX_SHARED))
|
||||
- atomic_init(&mutexp->sharecount, 0);
|
||||
+ atomic_init_db(&mutexp->sharecount, 0);
|
||||
else
|
||||
#endif
|
||||
if (MUTEX_INIT(&mutexp->tas)) {
|
||||
@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex)
|
||||
F_CLR(mutexp, DB_MUTEX_LOCKED);
|
||||
/* Flush flag update before zeroing count */
|
||||
MEMBAR_EXIT();
|
||||
- atomic_init(&mutexp->sharecount, 0);
|
||||
+ atomic_init_db(&mutexp->sharecount, 0);
|
||||
} else {
|
||||
DB_ASSERT(env, sharecount > 0);
|
||||
MEMBAR_EXIT();
|
||||
EOF
|
||||
|
||||
# The packaged config.guess and config.sub are ancient (2009) and can cause build issues.
|
||||
# Replace them with modern versions.
|
||||
# See https://github.com/bitcoin/bitcoin/issues/16064
|
||||
CONFIG_GUESS_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=4550d2f15b3a7ce2451c1f29500b9339430c877f'
|
||||
CONFIG_GUESS_HASH='c8f530e01840719871748a8071113435bdfdf75b74c57e78e47898edea8754ae'
|
||||
CONFIG_SUB_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=4550d2f15b3a7ce2451c1f29500b9339430c877f'
|
||||
CONFIG_SUB_HASH='3969f7d5f6967ccc6f792401b8ef3916a1d1b1d0f0de5a4e354c95addb8b800e'
|
||||
|
||||
rm -f "dist/config.guess"
|
||||
rm -f "dist/config.sub"
|
||||
|
||||
http_get "${CONFIG_GUESS_URL}" dist/config.guess "${CONFIG_GUESS_HASH}"
|
||||
http_get "${CONFIG_SUB_URL}" dist/config.sub "${CONFIG_SUB_HASH}"
|
||||
|
||||
cd build_unix/
|
||||
|
||||
"${BDB_PREFIX}/${BDB_VERSION}/dist/configure" \
|
||||
--enable-cxx --disable-shared --disable-replication --with-pic --prefix="${BDB_PREFIX}" \
|
||||
"${@}"
|
||||
|
||||
make install
|
||||
|
||||
echo
|
||||
echo "db4 build complete."
|
||||
echo
|
||||
# shellcheck disable=SC2016
|
||||
echo 'When compiling bitcoind, run `./configure` in the following way:'
|
||||
echo
|
||||
echo " export BDB_PREFIX='${BDB_PREFIX}'"
|
||||
# shellcheck disable=SC2016
|
||||
echo ' ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...'
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# linearize-data.py: Construct a linear, no-fork version of the chain.
|
||||
#
|
||||
# Copyright (c) 2013-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2013-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
|
||||
#
|
||||
# Copyright (c) 2013-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2013-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
@@ -78,7 +78,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
|
||||
if rpc.response_is_error(resp_obj):
|
||||
print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
|
||||
sys.exit(1)
|
||||
assert resp_obj['id'] == x # assume replies are in-sequence
|
||||
assert(resp_obj['id'] == x) # assume replies are in-sequence
|
||||
if settings['rev_hash_bytes'] == 'true':
|
||||
resp_obj['result'] = bytes.fromhex(resp_obj['result'])[::-1].hex()
|
||||
print(resp_obj['result'])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2014-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2014-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
|
||||
if verbose:
|
||||
print(f"Inspecting with otool: {binaryPath}")
|
||||
otoolbin=os.getenv("OTOOL", "otool")
|
||||
otool = run([otoolbin, "-L", binaryPath], stdout=PIPE, stderr=PIPE, text=True)
|
||||
otool = run([otoolbin, "-L", binaryPath], stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||
if otool.returncode != 0:
|
||||
sys.stderr.write(otool.stderr)
|
||||
sys.stderr.flush()
|
||||
@@ -577,17 +577,17 @@ if config.dmg is not None:
|
||||
|
||||
tempname: str = appname + ".temp.dmg"
|
||||
|
||||
run(["hdiutil", "create", tempname, "-srcfolder", "dist", "-format", "UDRW", "-size", str(size), "-volname", appname], check=True, text=True)
|
||||
run(["hdiutil", "create", tempname, "-srcfolder", "dist", "-format", "UDRW", "-size", str(size), "-volname", appname], check=True, universal_newlines=True)
|
||||
|
||||
if verbose:
|
||||
print("Attaching temp image...")
|
||||
output = run(["hdiutil", "attach", tempname, "-readwrite"], check=True, text=True, stdout=PIPE).stdout
|
||||
output = run(["hdiutil", "attach", tempname, "-readwrite"], check=True, universal_newlines=True, stdout=PIPE).stdout
|
||||
|
||||
print("+ Finalizing .dmg disk image +")
|
||||
|
||||
run(["hdiutil", "detach", f"/Volumes/{appname}"], text=True)
|
||||
run(["hdiutil", "detach", f"/Volumes/{appname}"], universal_newlines=True)
|
||||
|
||||
run(["hdiutil", "convert", tempname, "-format", "UDZO", "-o", appname, "-imagekey", "zlib-level=9"], check=True, text=True)
|
||||
run(["hdiutil", "convert", tempname, "-format", "UDZO", "-o", appname, "-imagekey", "zlib-level=9"], check=True, universal_newlines=True)
|
||||
|
||||
os.unlink(tempname)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Parse message capture binary files. To be used in conjunction with -capturemessages."""
|
||||
|
||||
@@ -11,10 +11,8 @@ to addrman with).
|
||||
The seeds compiled into the release are created from sipa's DNS seed and AS map
|
||||
data. Run the following commands from the `/contrib/seeds` directory:
|
||||
|
||||
```
|
||||
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
|
||||
curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt
|
||||
cat nodes_main_manual.txt >> nodes_main.txt
|
||||
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
|
||||
```
|
||||
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
|
||||
curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat
|
||||
python3 makeseeds.py -a asmap-filled.dat < seeds_main.txt > nodes_main.txt
|
||||
cat nodes_main_manual.txt >> nodes_main.txt
|
||||
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
'''
|
||||
Script to generate list of seed nodes for kernel/chainparams.cpp.
|
||||
Script to generate list of seed nodes for chainparams.cpp.
|
||||
|
||||
This script expects two text files in the directory that is passed as an
|
||||
argument:
|
||||
@@ -70,13 +70,13 @@ def name_to_bip155(addr):
|
||||
if i == 0 or i == (len(addr)-1): # skip empty component at beginning or end
|
||||
continue
|
||||
x += 1 # :: skips to suffix
|
||||
assert x < 2
|
||||
assert(x < 2)
|
||||
else: # two bytes per component
|
||||
val = int(comp, 16)
|
||||
sub[x].append(val >> 8)
|
||||
sub[x].append(val & 0xff)
|
||||
nullbytes = 16 - len(sub[0]) - len(sub[1])
|
||||
assert (x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0)
|
||||
assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
|
||||
addr_bytes = bytes(sub[0] + ([0] * nullbytes) + sub[1])
|
||||
if addr_bytes[0] == 0xfc:
|
||||
# Assume that seeds with fc00::/8 addresses belong to CJDNS,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user