Skip to content

Commit fd9881a

Browse files
committed
Merge #7283: [gitian] Default reference_datetime to commit author date
fa42a67 [gitian] hardcode datetime for depends (MarcoFalke) fa58c76 [gitian] Default reference_datetime to commit author date (MarcoFalke)
2 parents 172cd7f + fa42a67 commit fd9881a

File tree

5 files changed

+52
-22
lines changed

5 files changed

+52
-22
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ suites:
55
- "trusty"
66
architectures:
77
- "amd64"
8-
packages:
8+
packages:
99
- "curl"
1010
- "g++-multilib"
1111
- "git-core"
@@ -18,7 +18,6 @@ packages:
1818
- "binutils-gold"
1919
- "ca-certificates"
2020
- "python"
21-
reference_datetime: "2016-01-01 00:00:00"
2221
remotes:
2322
- "url": "https://github.com/bitcoin/bitcoin.git"
2423
"dir": "bitcoin"
@@ -45,36 +44,47 @@ script: |
4544
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
4645
fi
4746
48-
# Create global faketime wrappers
47+
function create_global_faketime_wrappers {
4948
for prog in ${FAKETIME_PROGS}; do
5049
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
5150
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
5251
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
53-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
52+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
5453
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
5554
chmod +x ${WRAP_DIR}/${prog}
5655
done
56+
}
5757
58-
# Create per-host faketime wrappers
58+
function create_per-host_faketime_wrappers {
5959
for i in $HOSTS; do
6060
for prog in ${FAKETIME_HOST_PROGS}; do
6161
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
6262
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
6363
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
64-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
64+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
6565
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
6666
chmod +x ${WRAP_DIR}/${i}-${prog}
6767
done
6868
done
69+
}
70+
6971
export PATH=${WRAP_DIR}:${PATH}
7072
73+
# Faketime for depends so intermediate results are comparable
74+
create_global_faketime_wrappers "2000-01-01 12:00:00"
75+
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
76+
7177
cd bitcoin
7278
BASEPREFIX=`pwd`/depends
7379
# Build dependencies for each host
7480
for i in $HOSTS; do
7581
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
7682
done
7783
84+
# Faketime for binaries
85+
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
86+
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
87+
7888
# Create the release tarball using (arbitrarily) the first host
7989
./autogen.sh
8090
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/

contrib/gitian-descriptors/gitian-osx-signer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ architectures:
66
- "amd64"
77
packages:
88
- "faketime"
9-
reference_datetime: "2016-01-01 00:00:00"
109
remotes:
1110
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
1211
"dir": "signature"

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ suites:
55
- "trusty"
66
architectures:
77
- "amd64"
8-
packages:
8+
packages:
99
- "ca-certificates"
1010
- "curl"
1111
- "g++"
@@ -27,7 +27,6 @@ packages:
2727
- "python-dev"
2828
- "python-setuptools"
2929
- "fonts-tuffy"
30-
reference_datetime: "2016-01-01 00:00:00"
3130
remotes:
3231
- "url": "https://github.com/bitcoin/bitcoin.git"
3332
"dir": "bitcoin"
@@ -54,29 +53,36 @@ script: |
5453
5554
export ZERO_AR_DATE=1
5655
57-
# Create global faketime wrappers
56+
function create_global_faketime_wrappers {
5857
for prog in ${FAKETIME_PROGS}; do
5958
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
6059
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
6160
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
62-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
61+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
6362
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
6463
chmod +x ${WRAP_DIR}/${prog}
6564
done
65+
}
6666
67-
# Create per-host faketime wrappers
67+
function create_per-host_faketime_wrappers {
6868
for i in $HOSTS; do
6969
for prog in ${FAKETIME_HOST_PROGS}; do
7070
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
7171
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
7272
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
73-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
73+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
7474
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
7575
chmod +x ${WRAP_DIR}/${i}-${prog}
7676
done
7777
done
78+
}
79+
7880
export PATH=${WRAP_DIR}:${PATH}
7981
82+
# Faketime for depends so intermediate results are comparable
83+
create_global_faketime_wrappers "2000-01-01 12:00:00"
84+
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
85+
8086
cd bitcoin
8187
BASEPREFIX=`pwd`/depends
8288
@@ -88,6 +94,10 @@ script: |
8894
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
8995
done
9096
97+
# Faketime for binaries
98+
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
99+
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
100+
91101
# Create the release tarball using (arbitrarily) the first host
92102
./autogen.sh
93103
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/

contrib/gitian-descriptors/gitian-win-signer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ architectures:
77
packages:
88
- "libssl-dev"
99
- "autoconf"
10-
reference_datetime: "2016-01-01 00:00:00"
1110
remotes:
1211
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
1312
"dir": "signature"

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ suites:
55
- "trusty"
66
architectures:
77
- "amd64"
8-
packages:
8+
packages:
99
- "curl"
1010
- "g++"
1111
- "git-core"
@@ -21,7 +21,6 @@ packages:
2121
- "zip"
2222
- "ca-certificates"
2323
- "python"
24-
reference_datetime: "2016-01-01 00:00:00"
2524
remotes:
2625
- "url": "https://github.com/bitcoin/bitcoin.git"
2726
"dir": "bitcoin"
@@ -47,29 +46,31 @@ script: |
4746
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
4847
fi
4948
50-
# Create global faketime wrappers
49+
function create_global_faketime_wrappers {
5150
for prog in ${FAKETIME_PROGS}; do
5251
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
5352
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
5453
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
55-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
54+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
5655
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
5756
chmod +x ${WRAP_DIR}/${prog}
5857
done
58+
}
5959
60-
# Create per-host faketime wrappers
60+
function create_per-host_faketime_wrappers {
6161
for i in $HOSTS; do
6262
for prog in ${FAKETIME_HOST_PROGS}; do
6363
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
6464
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
6565
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
66-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
66+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
6767
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
6868
chmod +x ${WRAP_DIR}/${i}-${prog}
6969
done
7070
done
71+
}
7172
72-
# Create per-host linker wrapper
73+
function create_per-host_linker_wrapper {
7374
# This is only needed for trusty, as the mingw linker leaks a few bytes of
7475
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
7576
for i in $HOSTS; do
@@ -85,22 +86,33 @@ script: |
8586
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
8687
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
8788
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
88-
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
89+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
8990
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
9091
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
9192
chmod +x ${WRAP_DIR}/${i}-${prog}
9293
done
9394
done
95+
}
9496
9597
export PATH=${WRAP_DIR}:${PATH}
9698
99+
# Faketime for depends so intermediate results are comparable
100+
create_global_faketime_wrappers "2000-01-01 12:00:00"
101+
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
102+
create_per-host_linker_wrapper "2000-01-01 12:00:00"
103+
97104
cd bitcoin
98105
BASEPREFIX=`pwd`/depends
99106
# Build dependencies for each host
100107
for i in $HOSTS; do
101108
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
102109
done
103110
111+
# Faketime for binaries
112+
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
113+
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
114+
create_per-host_linker_wrapper "${REFERENCE_DATETIME}"
115+
104116
# Create the release tarball using (arbitrarily) the first host
105117
./autogen.sh
106118
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/

0 commit comments

Comments
 (0)