Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a3ceaea
Merge #18958: guix: Make V=1 more powerful for debugging
fanquake May 21, 2020
de430e6
Merge #20318: build: Ensure source tarball has leading directory name
laanwj Nov 9, 2020
d4d19b5
Merge #20619: guix: Quality of life improvements
fanquake Jan 12, 2021
1c79710
Merge #20937: guix: Make nsis reproducible by respecting SOURCE-DATE-…
fanquake Jan 19, 2021
a6e7dda
Merge #17920: guix: Build support for macOS
fanquake Jan 22, 2021
b207af1
Merge #20629: depends: Improve id string robustness
laanwj Feb 15, 2021
89ff5e3
Merge #21116: build: Disable --disable-fuzz-binary for gitian/guix bu…
fanquake Feb 9, 2021
0cce5d1
Merge #21163: doc: Guix is shipped in Debian and Ubuntu
laanwj Feb 13, 2021
2f3b442
Merge #21087: guix: Passthrough BASE_CACHE into container
fanquake Feb 17, 2021
cd0d7d2
Merge #21088: guix: Jump forwards in time-machine and adapt
laanwj Feb 19, 2021
9c8f5f7
partial Merge #21089: guix: Add support for powerpc64{,le}
fanquake Feb 23, 2021
12a586e
Merge #21078: guix: only download sources for hosts being built
fanquake Feb 23, 2021
0b78348
Merge #21271: guix: Explicitly set umask in build container
fanquake Feb 25, 2021
a305fc4
Merge #21272: guix: Passthrough SDK_PATH into container
laanwj Feb 26, 2021
42f4e75
Merge #21321: guix: Add curl to required tool list
laanwj Mar 1, 2021
86a6cf3
Merge #21323: guix, doc: Update default HOSTS value
fanquake Mar 2, 2021
af614fe
Merge #21298: guix: Bump time-machine, glibc, and linux-headers
fanquake Mar 2, 2021
2c4bf31
partial Merge #21325: lint: Fix spelling errors in comments
fanquake Mar 2, 2021
5fda1ea
Merge #21337: guix: Update darwin native packages dependencies
laanwj Mar 4, 2021
dfd1045
Merge #21375: guix: Misc feedback-based fixes + hier restructuring
laanwj Apr 5, 2021
e5f4614
Merge #21611: Fix a typo in guix-build output
fanquake Apr 6, 2021
27032ca
partial Merge #21626: doc: Fix typos from codespell
fanquake Apr 8, 2021
0d5bc0b
Merge #21304: guix: Add guix-clean script + establish gc-root for con…
laanwj Apr 8, 2021
7015471
Merge #21661: doc: Fix name of script guix-build
fanquake Apr 13, 2021
6c46d02
Merge #21672: doc: remove boostrap info from GUIX_COMMON_FLAGS doc
fanquake Apr 15, 2021
c62a180
Merge #21655: build, qt: No longer need to set QT_RCC_TEST=1 for dete…
fanquake Apr 21, 2021
7d78f06
partial Merge bitcoin/bitcoin#19817: build: macOS toolchain bump
fanquake May 3, 2021
67efaa8
Merge bitcoin/bitcoin#21799: guix: Use `gcc-8` across the board
laanwj May 5, 2021
f95b802
Merge bitcoin/bitcoin#21462: guix: Add guix-{attest,verify} scripts
laanwj May 12, 2021
033e30d
Merge bitcoin/bitcoin#21239: guix: Add codesignature attachment suppo…
laanwj May 24, 2021
0cc4197
Merge bitcoin/bitcoin#21654: build, qt: Make Qt rcc output always det…
fanquake Jun 3, 2021
ff34f3e
Merge bitcoin/bitcoin#22075: guix: Misc leftover usability improvements
fanquake Jun 9, 2021
7297abf
Merge bitcoin/bitcoin#22190: Use latest signapple commit
fanquake Jun 11, 2021
56d2bc2
Merge bitcoin/bitcoin#22182: guix: Overhaul how guix-{attest,verify} …
fanquake Jun 17, 2021
7084e52
Merge bitcoin/bitcoin#22365: guix: Avoid relying on newer symbols by …
fanquake Jul 5, 2021
088342b
partial Merge bitcoin/bitcoin#22405: build: remove --enable-glibc-bac…
fanquake Jul 7, 2021
305649c
Merge bitcoin/bitcoin#22410: Avoid GCC 7.1 ABI change warning in guix…
fanquake Jul 18, 2021
cee464c
Merge bitcoin/bitcoin#22465: guix: Pin kernel-header version, time-ma…
fanquake Jul 20, 2021
9ae8a00
Merge bitcoin/bitcoin#22533: guix/build: Remove vestigial SKIPATTEST.TAG
fanquake Jul 23, 2021
6d8be28
Merge bitcoin/bitcoin#22643: guix-verify: Non-zero exit code when any…
fanquake Aug 9, 2021
2376c61
Merge bitcoin/bitcoin#22847: guix/prelude: Override `VERSION` with `F…
fanquake Sep 2, 2021
caeab86
Merge bitcoin/bitcoin#24215: [22.x] guix: ignore additional failing c…
fanquake Feb 9, 2022
b4285d0
Merge #18395: scripts: add PE dylib checking to symbol-check.py
laanwj Mar 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Pattern rule to print variables, e.g. make print-top_srcdir
print-%:
@echo $* = $($*)
@echo '$*'='$($*)'

ACLOCAL_AMFLAGS = -I build-aux/m4
SUBDIRS = src
Expand Down Expand Up @@ -147,7 +147,7 @@ $(APP_DIST_DIR)/Applications:
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt

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

$(OSX_DMG): $(OSX_TEMP_ISO)
$(DMG) dmg "$<" "$@"
Expand Down
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export LC_ALL=C.UTF-8

export HOST=x86_64-apple-darwin19
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
export XCODE_VERSION=11.3.1
export XCODE_BUILD_ID=11C505
export XCODE_VERSION=12.1
export XCODE_BUILD_ID=12A7403
export RUN_UNIT_TESTS=false
export RUN_INTEGRATION_TESTS=false
export GOAL="all deploy"
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ certain symbols and are only linked against allowed libraries.
For Linux this means checking for allowed gcc, glibc and libstdc++ version symbols.
This makes sure they are still compatible with the minimum supported distribution versions.

For macOS we check that the executables are only linked against libraries we allow.
For macOS and Windows we check that the executables are only linked against libraries we allow.

Example usage after a Gitian build:

Expand Down
55 changes: 51 additions & 4 deletions contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
# 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 (Linux) executables produced by Gitian only contain
allowed gcc and glibc version symbols. This makes sure they are still compatible
with the minimum supported Linux distribution versions.
A script to check that the (Linux) 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
Expand Down Expand Up @@ -57,6 +56,7 @@
'environ', '_environ', '__environ',
}
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
OTOOL_CMD = os.getenv('OTOOL', '/usr/bin/otool')

# Allowed NEEDED libraries
Expand Down Expand Up @@ -107,6 +107,30 @@
'QuartzCore', # animation
}

PE_ALLOWED_LIBRARIES = {
'ADVAPI32.dll', # security & registry
'IPHLPAPI.DLL', # IP helper API
'KERNEL32.dll', # win32 base APIs
'msvcrt.dll', # C standard library for MSVC
'SHELL32.dll', # shell API
'USER32.dll', # user interface
'WS2_32.dll', # sockets
'bcrypt.dll',
# bitcoin-qt only
'dwmapi.dll', # desktop window manager
'GDI32.dll', # graphics device interface
'IMM32.dll', # input method editor
'NETAPI32.dll',
'ole32.dll', # component object model
'OLEAUT32.dll', # OLE Automation API
'SHLWAPI.dll', # light weight shell API
'USERENV.dll',
'UxTheme.dll',
'VERSION.dll', # version checking
'WINMM.dll', # WinMM audio API
'WTSAPI32.dll',
}

class CPPFilt(object):
'''
Demangle C++ symbol names.
Expand Down Expand Up @@ -200,6 +224,26 @@ def check_MACHO_libraries(filename) -> bool:
ok = False
return ok

def pe_read_libraries(filename) -> List[str]:
p = subprocess.Popen([OBJDUMP_CMD, '-x', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
(stdout, stderr) = p.communicate()
if p.returncode:
raise IOError('Error opening file')
libraries = []
for line in stdout.splitlines():
if 'DLL Name:' in line:
tokens = line.split(': ')
libraries.append(tokens[1])
return libraries

def check_PE_libraries(filename) -> bool:
ok = True
for dylib in pe_read_libraries(filename):
if dylib not in PE_ALLOWED_LIBRARIES:
print('{} is not in ALLOWED_LIBRARIES!'.format(dylib))
ok = False
return ok

CHECKS = {
'ELF': [
('IMPORTED_SYMBOLS', check_imported_symbols),
Expand All @@ -208,6 +252,9 @@ def check_MACHO_libraries(filename) -> bool:
],
'MACHO': [
('DYNAMIC_LIBRARIES', check_MACHO_libraries)
],
'PE' : [
('DYNAMIC_LIBRARIES', check_PE_libraries)
]
}

Expand Down
5 changes: 5 additions & 0 deletions contrib/gitian-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ def main():
args.windows = 'w' in args.os
args.macos = 'm' in args.os

# Disable for MacOS if no SDK found
if args.macos and not os.path.isfile('gitian-builder/inputs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz'):
print('Cannot build for MacOS, SDK does not exist. Will build for other OSes')
args.macos = False

args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign'

if not args.signer:
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/assign_DISTNAME
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# A helper script to be sourced into the gitian descriptors

if RECENT_TAG="$(git describe --exact-match HEAD)"; then
if RECENT_TAG="$(git describe --exact-match HEAD 2> /dev/null)"; then
VERSION="${RECENT_TAG#v}"
else
VERSION="$(git rev-parse --short=12 HEAD)"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ script: |

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-linux-gnu aarch64-linux-gnu riscv64-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --enable-crash-hooks"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary --enable-crash-hooks"
FAKETIME_HOST_PROGS="gcc g++"
FAKETIME_PROGS="date ar ranlib nm"
HOST_CFLAGS="-O2 -g"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ script: |

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin19"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests XORRISOFS=${WRAP_DIR}/xorrisofs DMG=${WRAP_DIR}/dmg --enable-crash-hooks"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests --disable-fuzz-binary XORRISOFS=${WRAP_DIR}/xorrisofs DMG=${WRAP_DIR}/dmg --enable-crash-hooks"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg xorrisofs"

Expand Down
3 changes: 2 additions & 1 deletion contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ script: |

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests --enable-crash-hooks"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests --disable-fuzz-binary --enable-crash-hooks"
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
HOST_CFLAGS="-O2 -g -fno-ident"
Expand Down Expand Up @@ -159,6 +159,7 @@ script: |
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security
make ${MAKEOPTS} -C src check-symbols
make deploy BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
make install DESTDIR=${INSTALLPATH}
cd installed
Expand Down
Loading