Skip to content

Commit aabcd11

Browse files
committed
gitian: Make linux boost dependency completely deterministic
It appears that the output was different every time. This doesn't affect the final bitcoind/bitcoin-qt, but is confusing nevertheless. Fix it by using FAKETIME and zipping files in deterministic order.
1 parent aa93485 commit aabcd11

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

contrib/gitian-descriptors/boost-linux.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ files:
2020
script: |
2121
STAGING="$HOME/install"
2222
export LIBRARY_PATH="$STAGING/lib"
23+
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
24+
export FAKETIME=$REFERENCE_DATETIME
25+
export TZ=UTC
2326
# Input Integrity Check
2427
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
2528
2629
mkdir -p "$STAGING"
27-
tar xjf boost_1_55_0.tar.bz2
30+
tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
2831
cd boost_1_55_0
2932
GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
3033
# note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
@@ -38,6 +41,4 @@ script: |
3841
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS install
3942
4043
cd "$STAGING"
41-
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
42-
export FAKETIME=$REFERENCE_DATETIME
43-
zip -r $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip *
44+
find -type f | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip

contrib/gitian-descriptors/deps-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ script: |
5656
cd qrencode-3.4.3
5757
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
5858
# need --with-pic to avoid relocation error in 64 bit builds
59-
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking --without-zlib
59+
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
6060
# Workaround to prevent re-configuring by make; make all files have a date in the past
6161
find . -print0 | xargs -r0 touch -t 200001010000
6262
export FAKETIME=$REFERENCE_DATETIME
@@ -68,7 +68,7 @@ script: |
6868
mkdir -p $STAGING/host/bin
6969
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
7070
# need --with-pic to avoid relocation error in 64 bit builds
71-
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic
71+
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
7272
# Workaround to prevent re-configuring by make; make all files have a date in the past
7373
find . -print0 | xargs -r0 touch -t 200001010000
7474
export FAKETIME=$REFERENCE_DATETIME

0 commit comments

Comments
 (0)