Skip to content

Commit

Permalink
Merge #9: Sync with the main repo
Browse files Browse the repository at this point in the history
86f0bb9 net: don't bind on 0.0.0.0 if binds are restricted to Tor (Vasil Dimov)
1d4263d doc: recommend `--disable-external-signer` in OpenBSD build guide (Sebastian Falbesoner)
a715665 [test] submit same txid different wtxid as mempool tx (glozow)
7eb24f1 [validation] distinguish same txid different wtxid in mempool (glozow)
98ce252 test: use script_util helpers for creating P2W{PKH,SH} scripts (Sebastian Falbesoner)
f830262 test: use script_util helpers for creating P2SH scripts (Sebastian Falbesoner)
f351772 test: use script_util helpers for creating P2PKH scripts (Sebastian Falbesoner)
4f577c4 test: wallet util: fix multisig P2SH-P2WSH script creation (Sebastian Falbesoner)
1ea5f60 test: Correct outstanding -Werror=sign-compare errors (Ben Woosley)
a175337 guix: Test security-check sanity before performing them (Carl Dong)
5a7f4a3 scripts: adjust test-symbol-check for guix release environment (fanquake)
66e2683 scripts: more robustly test macOS symbol checks (fanquake)
ea722ff build: Use and test PE binutils with --reloc-section (Carl Dong)
952adc8 guix: Patch binutils to add security-related disable flags (Carl Dong)
f1f5bec devtools: Improve *-check.py tool detection (Carl Dong)
b24226f ci: skip running the Linux test-security-check target for now (fanquake)
4854a6d lint: Run mypy with --show-error-codes (Carl Dong)
6093037 test: add `bad-txns-prevout-null` test to mempool_accept.py (Sebastian Falbesoner)
e850d54 test: add `bad-txns-prevout-null` test case to invalid_txs.py (Sebastian Falbesoner)
00b681f addrman: remove invalid addresses when unserializing (Vasil Dimov)
bdb4fef fuzz: reduce possible networks check (Vasil Dimov)
0bef7f6 net: simplify CNetAddr::IsRoutable() (Vasil Dimov)
4e131f7 doc: Install Rosetta on M1-macOS for qt in depends (Hennadii Stepanov)
9202dc6 script: remove gitian reference from symbol-check.py (fanquake)
6cfa306 guix: add additional documentation to patches (fanquake)
29b1472 lint: exclude Guix patches from spell-checking (fanquake)
06b99f4 guix: no-longer pass --enable-glibc-back-compat to Guix (fanquake)
e1a424b build: remove glibc backcompat requirement for Linux symbol checks (fanquake)
9114e79 fuzz: Move CTxDestination fuzzing to script fuzz target (MarcoFalke)
c9dbce0 fuzz: Simplify CTxDestination fuzzing in the script target (MarcoFalke)
1b38530 fuzz: Improve ConsumeTxDestination (MarcoFalke)
3b4a5ad fuzz: Move ConsumeTxDestination to cpp file (MarcoFalke)
7d9b99d doc: Remove unused section from release process (MarcoFalke)
7540757 build: remove --enable-determinism configure option (fanquake)
7ccb87c qt: Emit dataChanged signal to dynamically re-sort Peers table (Hennadii Stepanov)
b80995d qt: Draw "eye" sign at the beginning of watch-only addresses (Hennadii Stepanov)
a000c9d qt: Do not extend recent transaction width to address/label string (Hennadii Stepanov)
f8e8973 guix: Also sort SHA256SUMS.part (Carl Dong)
376942e guix: Build depends/qt with our platform definition (Carl Dong)
97125bf guix: Rebase toolchain on glibc 2.24 (2.27 for riscv64) (Carl Dong)
9939f5e doc: update doc/benchmarking.md (Jon Atack)
518fed2 bench: bench_bitcoin.cpp help fixups (Jon Atack)
aa27550 bench: bench.h fixes and improvements (Jon Atack)

Pull request description:

  Synced up to bitcoin-core/gui@842e2a9.

ACKs for top commit:
  jarolrod:
    ACK 86f0bb9

Tree-SHA512: c3342d65903c81d54b8b6de7014a664fc516c614aa123f0f0a06ba9229c12cc91b625c26f3631a4dedc6064aa31346a1a00b98a648f6f6f147d77fce458ff449
  • Loading branch information
hebasto committed Jul 13, 2021
2 parents 955fa34 + 86f0bb9 commit 5834544
Show file tree
Hide file tree
Showing 60 changed files with 1,440 additions and 406 deletions.
13 changes: 7 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ DIST_SHARE = \

BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py \
$(top_srcdir)/contrib/devtools/utils.py \
$(top_srcdir)/contrib/devtools/pixie.py

WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
Expand Down Expand Up @@ -366,14 +367,14 @@ clean-local: clean-docs

test-security-check:
if TARGET_DARWIN
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_MACHO
$(AM_V_at) CC='$(CC)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO
$(AM_V_at) CC='$(CC)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_MACHO
endif
if TARGET_WINDOWS
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_PE
$(AM_V_at) CC='$(CC)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE
$(AM_V_at) CC='$(CC)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_PE
endif
if TARGET_LINUX
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_ELF
$(AM_V_at) CC='$(CC)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF
$(AM_V_at) CC='$(CC)' CPPFILT='$(CPPFILT)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_ELF
endif
1 change: 0 additions & 1 deletion ci/test/00_setup_env_native_multiprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
export GOAL="install"
export BITCOIN_CONFIG="--enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM
export TEST_RUNNER_ENV="BITCOIND=bitcoin-node"
export RUN_SECURITY_TESTS="true"
export PIP_PACKAGES="lief"
14 changes: 1 addition & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,6 @@ AC_ARG_ENABLE([gprof],
[enable_gprof=$enableval],
[enable_gprof=no])

dnl Pass compiler & linker flags that make builds deterministic
AC_ARG_ENABLE([determinism],
[AS_HELP_STRING([--enable-determinism],
[Enable compilation flags that make builds deterministic (default is no)])],
[enable_determinism=$enableval],
[enable_determinism=no])

dnl Turn warnings into errors
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror],
Expand Down Expand Up @@ -907,6 +900,7 @@ if test x$use_hardening != xno; then
])
fi

AX_CHECK_LINK_FLAG([[-Wl,--enable-reloc-section]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"],, [[$LDFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"],, [[$LDFLAG_WERROR]])
Expand All @@ -931,12 +925,6 @@ if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]])
fi

if test x$enable_determinism = xyes; then
if test x$TARGET_OS = xwindows; then
AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"],, [[$LDFLAG_WERROR]])
fi
fi

AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])

AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
Expand Down
12 changes: 6 additions & 6 deletions contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
A script to check that the executables produced by gitian only contain
certain symbols and are only linked against allowed libraries.
A script to check that release executables only contain certain symbols
and are only linked against allowed libraries.
Example usage:
find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py
find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py
'''
import subprocess
import sys
import os
from typing import List, Optional

import lief
import pixie

from utils import determine_wellknown_cmd

# Debian 8 (Jessie) EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases
#
# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
Expand Down Expand Up @@ -60,7 +61,6 @@
'_edata', '_end', '__end__', '_init', '__bss_start', '__bss_start__', '_bss_end__', '__bss_end__', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr',
'environ', '_environ', '__environ',
}
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')

# Allowed NEEDED libraries
ELF_ALLOWED_LIBRARIES = {
Expand Down Expand Up @@ -140,7 +140,7 @@ class CPPFilt(object):
Use a pipe to the 'c++filt' command.
'''
def __init__(self):
self.proc = subprocess.Popen(CPPFILT_CMD, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
self.proc = subprocess.Popen(determine_wellknown_cmd('CPPFILT', 'c++filt'), stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)

def __call__(self, mangled):
self.proc.stdin.write(mangled + '\n')
Expand Down
31 changes: 17 additions & 14 deletions contrib/devtools/test-security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import subprocess
import unittest

from utils import determine_wellknown_cmd

def write_testcode(filename):
with open(filename, 'w', encoding="utf8") as f:
f.write('''
Expand All @@ -25,15 +27,15 @@ def clean_files(source, executable):
os.remove(executable)

def call_security_check(cc, source, executable, options):
subprocess.run([cc,source,'-o',executable] + options, check=True)
subprocess.run([*cc,source,'-o',executable] + options, check=True)
p = subprocess.run(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True)
return (p.returncode, p.stdout.rstrip())

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

self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
Expand All @@ -54,26 +56,28 @@ def test_ELF(self):
def test_PE(self):
source = 'test1.c'
executable = 'test1.exe'
cc = 'x86_64-w64-mingw32-gcc'
cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')
write_testcode(source)

self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed HIGH_ENTROPY_VA RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']),
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--disable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-pie','-fPIE']),
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA')) # -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,--no-high-entropy-va','-pie','-fPIE']),
(1, executable+': failed HIGH_ENTROPY_VA'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']),
(0, ''))

clean_files(source, executable)

def test_MACHO(self):
source = 'test1.c'
executable = 'test1'
cc = 'clang'
cc = determine_wellknown_cmd('CC', 'clang')
write_testcode(source)

self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
Expand All @@ -95,4 +99,3 @@ def test_MACHO(self):

if __name__ == '__main__':
unittest.main()

45 changes: 27 additions & 18 deletions contrib/devtools/test-symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,51 @@
'''
import os
import subprocess
from typing import List
import unittest

def call_symbol_check(cc, source, executable, options):
subprocess.run([cc,source,'-o',executable] + options, check=True)
from utils import determine_wellknown_cmd

def call_symbol_check(cc: List[str], source, executable, options):
subprocess.run([*cc,source,'-o',executable] + options, check=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, universal_newlines=True)
return p.stdout.rstrip()

class TestSymbolChecks(unittest.TestCase):
def test_ELF(self):
source = 'test1.c'
executable = 'test1'
cc = 'gcc'
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 envinonment and we allow all symbols from 2.27.
if 'riscv' in get_machine(cc):
self.skipTest("test not available for RISC-V")

# renameat2 was introduced in GLIBC 2.28, so is newer than the upper limit
# of glibc for all platforms
# nextup was introduced in GLIBC 2.24, so is newer than our supported
# glibc (2.17), and available in our release build environment (2.24).
with open(source, 'w', encoding="utf8") as f:
f.write('''
#define _GNU_SOURCE
#include <stdio.h>
#include <linux/fs.h>
#include <math.h>
int renameat2(int olddirfd, const char *oldpath,
int newdirfd, const char *newpath, unsigned int flags);
double nextup(double x);
int main()
{
renameat2(0, "test", 0, "test_", RENAME_EXCHANGE);
nextup(3.14);
return 0;
}
''')

self.assertEqual(call_symbol_check(cc, source, executable, []),
(1, executable + ': symbol renameat2 from unsupported version GLIBC_2.28\n' +
self.assertEqual(call_symbol_check(cc, source, executable, ['-lm']),
(1, executable + ': symbol nextup from unsupported version GLIBC_2.24\n' +
executable + ': failed IMPORTED_SYMBOLS'))

# -lutil is part of the libc6 package so a safe bet that it's installed
Expand Down Expand Up @@ -82,7 +92,7 @@ def test_ELF(self):
def test_MACHO(self):
source = 'test1.c'
executable = 'test1'
cc = 'clang'
cc = determine_wellknown_cmd('CC', 'clang')

with open(source, 'w', encoding="utf8") as f:
f.write('''
Expand All @@ -96,7 +106,7 @@ def test_MACHO(self):
''')

self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat']),
self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']),
(1, 'libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' +
f'{executable}: failed DYNAMIC_LIBRARIES MIN_OS SDK'))

Expand All @@ -113,7 +123,7 @@ def test_MACHO(self):
}
''')

self.assertEqual(call_symbol_check(cc, source, executable, ['-framework', 'CoreGraphics']),
self.assertEqual(call_symbol_check(cc, source, executable, ['-framework', 'CoreGraphics', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']),
(1, f'{executable}: failed MIN_OS SDK'))

source = 'test3.c'
Expand All @@ -126,13 +136,13 @@ def test_MACHO(self):
}
''')

self.assertEqual(call_symbol_check(cc, source, executable, ['-mmacosx-version-min=10.14']),
self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,10.14', '-Wl,11.4']),
(1, f'{executable}: failed SDK'))

def test_PE(self):
source = 'test1.c'
executable = 'test1.exe'
cc = 'x86_64-w64-mingw32-gcc'
cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')

with open(source, 'w', encoding="utf8") as f:
f.write('''
Expand Down Expand Up @@ -182,4 +192,3 @@ def test_PE(self):

if __name__ == '__main__':
unittest.main()

22 changes: 22 additions & 0 deletions contrib/devtools/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
# 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.
'''
Common utility functions
'''
import shutil
import sys
import os
from typing import List


def determine_wellknown_cmd(envvar, progname) -> List[str]:
maybe_env = os.getenv(envvar)
maybe_which = shutil.which(progname)
if maybe_env:
return maybe_env.split(' ') # Well-known vars are often meant to be word-split
elif maybe_which:
return [ maybe_which ]
else:
sys.exit(f"{progname} not found")
18 changes: 14 additions & 4 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
x86_64_linux_NM=x86_64-linux-gnu-nm \
x86_64_linux_STRIP=x86_64-linux-gnu-strip \
qt_config_opts_i686_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
FORCE_USE_SYSTEM_CLANG=1


Expand All @@ -239,7 +240,7 @@ mkdir -p "$OUTDIR"
# CONFIGFLAGS
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
case "$HOST" in
*linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;;
*linux*) CONFIGFLAGS+=" --disable-threadlocal" ;;
esac

# CFLAGS
Expand All @@ -259,6 +260,13 @@ case "$HOST" in
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
esac

# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.17, 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

case "$HOST" in
powerpc64-linux-*|riscv64-linux-*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,-z,noexecstack" ;;
esac
Expand Down Expand Up @@ -291,10 +299,11 @@ mkdir -p "$DISTSRC"
# Build Bitcoin Core
make --jobs="$JOBS" ${V:+V=1}

# Perform basic ELF security checks on a series of executables.
# Check that symbol/security checks tools are sane.
make test-security-check ${V:+V=1}
# Perform basic security checks on a series of executables.
make -C src --jobs=1 check-security ${V:+V=1}
# Check that executables only contain allowed gcc, glibc and libstdc++
# version symbols for Linux distro back-compatibility.
# Check that executables only contain allowed version symbols.
make -C src --jobs=1 check-symbols ${V:+V=1}

mkdir -p "$OUTDIR"
Expand Down Expand Up @@ -445,5 +454,6 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
find "$ACTUAL_OUTDIR" -type f
} | xargs realpath --relative-base="$PWD" \
| xargs sha256sum \
| sort -k2 \
| sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
)
1 change: 1 addition & 0 deletions contrib/guix/libexec/codesign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
find "$ACTUAL_OUTDIR" -type f
} | xargs realpath --relative-base="$PWD" \
| xargs sha256sum \
| sort -k2 \
| sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
)
Loading

0 comments on commit 5834544

Please sign in to comment.