Skip to content

Commit 415650c

Browse files
committed
guix: move *-check.py scripts under contrib/guix
These scripts are not meant for general developer usage. They are for use on the release binaries, which have been compiled in an environment that makes various assumptions in regards to c library, compiler options, hardening options, patching etc.
1 parent 5b87521 commit 415650c

File tree

5 files changed

+9
-34
lines changed

5 files changed

+9
-34
lines changed

cmake/module/Maintenance.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ function(add_maintenance_targets)
3131

3232
add_custom_target(check-symbols
3333
COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..."
34-
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/symbol-check.py ${executables}
34+
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
3535
VERBATIM
3636
)
3737

3838
add_custom_target(check-security
3939
COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
40-
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/security-check.py ${executables}
40+
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
4141
VERBATIM
4242
)
4343
endfunction()

contrib/devtools/README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -159,35 +159,6 @@ For example:
159159
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh
160160
```
161161

162-
security-check.py
163-
=================
164-
165-
Perform basic security checks on a series of executables.
166-
167-
symbol-check.py
168-
===============
169-
170-
A script to check that release executables only contain
171-
certain symbols and are only linked against allowed libraries.
172-
173-
For Linux this means checking for allowed gcc, glibc and libstdc++ version symbols.
174-
This makes sure they are still compatible with the minimum supported distribution versions.
175-
176-
For macOS and Windows we check that the executables are only linked against libraries we allow.
177-
178-
Example usage:
179-
180-
find ../path/to/executables -type f -executable | xargs python3 contrib/devtools/symbol-check.py
181-
182-
If no errors occur the return value will be 0 and the output will be empty.
183-
184-
If there are any errors the return value will be 1 and output like this will be printed:
185-
186-
.../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
187-
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
188-
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
189-
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
190-
191162
circular-dependencies.py
192163
========================
193164

contrib/devtools/security-check.py renamed to contrib/guix/security-check.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
Perform basic security checks on a series of executables.
77
Exit status will be 0 if successful, and the program will be silent.
88
Otherwise the exit status will be 1 and it will log which executables failed which checks.
9+
10+
Example usage:
11+
12+
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/security-check.py
913
'''
1014
import re
1115
import sys

contrib/devtools/symbol-check.py renamed to contrib/guix/symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Example usage:
1010
11-
find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py
11+
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/symbol-check.py
1212
'''
1313
import sys
1414

depends/packages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The package "mylib" will be used here as an example
66
General tips:
77
- mylib_foo is written as $(package)_foo in order to make recipes more similar.
88
- Secondary dependency packages relative to the bitcoin binaries/libraries (i.e.
9-
those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't
9+
those not in `ALLOWED_LIBRARIES` in `contrib/guix/symbol-check.py`) don't
1010
need to be shared and should be built statically whenever possible. See
1111
[below](#secondary-dependencies) for more details.
1212

@@ -184,7 +184,7 @@ the Autotools `--with-pic` flag, or `CMAKE_POSITION_INDEPENDENT_CODE` with CMake
184184
## Secondary dependencies:
185185

186186
Secondary dependency packages relative to the bitcoin binaries/libraries (i.e.
187-
those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't
187+
those not in `ALLOWED_LIBRARIES` in `contrib/guix/symbol-check.py`) don't
188188
need to be shared and should be built statically whenever possible. This
189189
improves general build reliability as illustrated by the following example:
190190

0 commit comments

Comments
 (0)