Skip to content

Commit c78d3fd

Browse files
cktibytzck
andcommitted
Update gitian build to most recent version (dashpay#15)
* Update gitian build to most recent version * Remove installation of cmake Co-authored-by: BytzCK <bytzck@protonmail.com>
1 parent fc539e6 commit c78d3fd

File tree

7 files changed

+274
-231
lines changed

7 files changed

+274
-231
lines changed

contrib/gitian-build.py

+195-68
Large diffs are not rendered by default.

contrib/gitian-descriptors/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Gavin's notes on getting Gitian builds up and running using KVM
1+
### Notes on getting Gitian builds up and running
22

33
These instructions distilled from
44
[https://help.ubuntu.com/community/KVM/Installation](https://help.ubuntu.com/community/KVM/Installation).
@@ -45,11 +45,11 @@ If your main machine is a 64-bit Mac or PC with a few gigabytes of memory
4545
and at least 10 gigabytes of free disk space, you can `gitian-build` using
4646
LXC running inside a virtual machine.
4747

48-
Here's a description of Gavin's setup on OSX 10.6:
48+
Here's a description of a setup on OSX 10.6:
4949

5050
1. Download and install VirtualBox from [https://www.virtualbox.org/](https://www.virtualbox.org/)
5151

52-
2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from
52+
2. Download the 64-bit Ubuntu Desktop 20.04 LTS .iso CD image from
5353
[http://www.ubuntu.com/](http://www.ubuntu.com/)
5454

5555
3. Run VirtualBox and create a new virtual machine, using the Ubuntu .iso (see the [VirtualBox documentation](https://www.virtualbox.org/wiki/Documentation) for details). Create it with at least 2 gigabytes of memory and a disk that is at least 20 gigabytes big.

contrib/gitian-descriptors/gitian-linux.yml

+40-62
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
---
2-
name: "wagerr-linux-4.0"
2+
name: "wagerr-linux-4.0.99"
33
enable_cache: true
4+
distro: "ubuntu"
45
suites:
56
- "bionic"
67
architectures:
78
- "amd64"
89
packages:
910
- "curl"
1011
- "g++-aarch64-linux-gnu"
11-
- "g++-7-aarch64-linux-gnu"
12-
- "gcc-7-aarch64-linux-gnu"
12+
- "g++-8-aarch64-linux-gnu"
13+
- "gcc-8-aarch64-linux-gnu"
1314
- "binutils-aarch64-linux-gnu"
1415
- "g++-arm-linux-gnueabihf"
15-
- "g++-7-arm-linux-gnueabihf"
16-
- "gcc-7-arm-linux-gnueabihf"
16+
- "g++-8-arm-linux-gnueabihf"
17+
- "gcc-8-arm-linux-gnueabihf"
1718
- "binutils-arm-linux-gnueabihf"
18-
- "g++-7-multilib"
19-
- "gcc-7-multilib"
19+
- "g++-riscv64-linux-gnu"
20+
- "g++-8-riscv64-linux-gnu"
21+
- "gcc-8-riscv64-linux-gnu"
22+
- "binutils-riscv64-linux-gnu"
23+
- "g++-powerpc64le-linux-gnu"
24+
- "g++-8-powerpc64le-linux-gnu"
25+
- "gcc-8-powerpc64le-linux-gnu"
26+
- "binutils-powerpc64le-linux-gnu"
27+
- "g++-i686-linux-gnu"
28+
- "g++-8-i686-linux-gnu"
29+
- "gcc-8-i686-linux-gnu"
30+
- "binutils-i686-linux-gnu"
31+
- "g++-8-multilib"
32+
- "gcc-8-multilib"
2033
- "binutils-gold"
2134
- "git"
2235
- "pkg-config"
@@ -26,20 +39,21 @@ packages:
2639
- "faketime"
2740
- "bsdmainutils"
2841
- "ca-certificates"
29-
- "python"
3042
- "python3"
3143
- "libxkbcommon0"
32-
- "ccache"
44+
- "linux-libc-dev"
45+
- "doxygen"
3346
remotes:
3447
- "url": "https://github.com/wagerr/wagerr.git"
3548
"dir": "wagerr"
3649
files: []
3750
script: |
51+
set -e -o pipefail
3852
3953
WRAP_DIR=$HOME/wrapped
40-
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
54+
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu" # powerpc64le-linux-gnu riscv64-linux-gnu s390x-linux-gnu powerpc64-linux-gnu mipsel-linux-gnu mips-linux-gnu
4155
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --enable-crash-hooks"
42-
FAKETIME_HOST_PROGS=""
56+
FAKETIME_HOST_PROGS="gcc g++"
4357
FAKETIME_PROGS="date ar ranlib nm"
4458
HOST_CFLAGS="-O2 -g"
4559
HOST_CXXFLAGS="-O2 -g"
@@ -54,54 +68,33 @@ script: |
5468
mkdir -p ${WRAP_DIR}
5569
if test -n "$GBUILD_CACHE_ENABLED"; then
5670
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
57-
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}/depends
71+
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
5872
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
59-
60-
# Setup ccache to use correct cache directories and fix the compiler check of ccache
61-
CONFIGFLAGS="${CONFIGFLAGS} --enable-ccache"
62-
export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache
63-
# As we later wrap the gcc binaries, this is fast
64-
export CCACHE_COMPILERCHECK="content"
65-
if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then
66-
pushd ${GBUILD_PACKAGE_CACHE}
67-
tar xf ccache.tar
68-
rm ccache.tar
69-
popd
70-
fi
71-
# instead of compressing ccache.tar, we let ccache handle it by itself
72-
# Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use
73-
export CCACHE_COMPRESS=1
74-
else
75-
CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache"
7673
fi
7774
78-
# We include the GCC version in all wrappers so that ccache can detect compiler upgrades when hashing the wrappers
79-
GCCVERSION=`gcc --version | head -1`
80-
8175
function create_global_faketime_wrappers {
8276
for prog in ${FAKETIME_PROGS}; do
8377
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
84-
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${prog}
8578
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
8679
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
8780
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
8881
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
8982
chmod +x ${WRAP_DIR}/${prog}
90-
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${prog}
9183
done
9284
}
9385
9486
function create_per-host_faketime_wrappers {
9587
for i in $HOSTS; do
9688
for prog in ${FAKETIME_HOST_PROGS}; do
97-
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
98-
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${i}-${prog}
99-
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
100-
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
101-
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
102-
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
103-
chmod +x ${WRAP_DIR}/${i}-${prog}
104-
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${i}-${prog}
89+
if which ${i}-${prog}-8
90+
then
91+
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
92+
echo "REAL=\`which -a ${i}-${prog}-8 | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
93+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
94+
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
95+
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
96+
chmod +x ${WRAP_DIR}/${i}-${prog}
97+
fi
10598
done
10699
done
107100
}
@@ -127,8 +120,7 @@ script: |
127120
rm -f ${WRAP_DIR}/${prog}
128121
cat << EOF > ${WRAP_DIR}/${prog}
129122
#!/usr/bin/env bash
130-
# GCCVERSION=${GCCVERSION}
131-
REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
123+
REAL="`which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1`"
132124
for var in "\$@"
133125
do
134126
if [ "\$var" = "-m32" ]; then
@@ -140,7 +132,6 @@ script: |
140132
\$REAL \$@
141133
EOF
142134
chmod +x ${WRAP_DIR}/${prog}
143-
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${prog}
144135
done
145136
146137
cd wagerr
@@ -192,39 +183,26 @@ script: |
192183
mkdir src/obj
193184
cp ../src/obj/build.h src/obj/
194185
195-
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
186+
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
196187
make ${MAKEOPTS}
197188
make ${MAKEOPTS} -C src check-security
198-
199-
#TODO: This is a quick hack that disables symbol checking for arm.
200-
# Instead, we should investigate why these are popping up.
201-
# For aarch64, we'll need to bump up the min GLIBC version, as the abi
202-
# support wasn't introduced until 2.17.
203189
case $i in
204190
aarch64-*) : ;;
205191
arm-*) : ;;
206192
*) make ${MAKEOPTS} -C src check-symbols ;;
207193
esac
208-
209194
make install DESTDIR=${INSTALLPATH}
210195
cd installed
211196
find . -name "lib*.la" -delete
212197
find . -name "lib*.a" -delete
213198
rm -rf ${DISTNAME}/lib/pkgconfig
214-
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
215-
find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
199+
find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
200+
#find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
201+
cp ../doc/README.md ${DISTNAME}/
216202
find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
217203
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
218204
cd ../../
219205
rm -rf distsrc-${i}
220206
done
221207
mkdir -p $OUTDIR/src
222208
mv $SOURCEDIST $OUTDIR/src
223-
224-
# Compress ccache (otherwise the assert file will get too huge)
225-
if [ "$CCACHE_DIR" != "" ]; then
226-
pushd ${GBUILD_PACKAGE_CACHE}
227-
tar cf ccache.tar ccache
228-
rm -rf ccache
229-
popd
230-
fi

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: "wagerr-dmg-signer"
3+
distro: "ubuntu"
34
suites:
45
- "bionic"
56
architectures:
@@ -12,24 +13,22 @@ remotes:
1213
files:
1314
- "wagerr-osx-unsigned.tar.gz"
1415
script: |
16+
set -e -o pipefail
1517
WRAP_DIR=$HOME/wrapped
1618
mkdir -p ${WRAP_DIR}
17-
export PATH=`pwd`:$PATH
19+
export PATH="$PWD":$PATH
1820
FAKETIME_PROGS="dmg genisoimage"
19-
2021
# Create global faketime wrappers
2122
for prog in ${FAKETIME_PROGS}; do
2223
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
2324
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
24-
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
25+
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
2526
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
2627
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
2728
chmod +x ${WRAP_DIR}/${prog}
2829
done
29-
3030
UNSIGNED=wagerr-osx-unsigned.tar.gz
3131
SIGNED=wagerr-osx-signed.dmg
32-
3332
tar -xf ${UNSIGNED}
3433
OSX_VOLNAME="$(cat osx_volname)"
3534
./detached-sig-apply.sh ${UNSIGNED} signature/osx

contrib/gitian-descriptors/gitian-osx.yml

+14-42
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
name: "wagerr-osx-4.0"
2+
name: "wagerr-osx-4.0.99"
33
enable_cache: true
4+
distro: "ubuntu"
45
suites:
56
- "bionic"
67
architectures:
@@ -22,22 +23,22 @@ packages:
2223
- "libcap-dev"
2324
- "libz-dev"
2425
- "libbz2-dev"
25-
- "python"
26-
- "python-dev"
27-
- "python3"
2826
- "python3-dev"
2927
- "python3-setuptools"
28+
- "python3-biplist"
3029
- "fonts-tuffy"
31-
- "ccache"
30+
- "doxygen"
3231
remotes:
3332
- "url": "https://github.com/wagerr/wagerr.git"
3433
"dir": "wagerr"
3534
files:
36-
- "MacOSX10.11.sdk.tar.gz"
35+
- "MacOSX10.11.sdk.tar.xz"
3736
script: |
37+
set -e -o pipefail
38+
3839
WRAP_DIR=$HOME/wrapped
39-
HOSTS="x86_64-apple-darwin14"
40-
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage --enable-crash-hooks"
40+
HOSTS="x86_64-apple-darwin16"
41+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage --enable-crash-hooks"
4142
FAKETIME_HOST_PROGS=""
4243
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
4344
@@ -50,23 +51,8 @@ script: |
5051
mkdir -p ${WRAP_DIR}
5152
if test -n "$GBUILD_CACHE_ENABLED"; then
5253
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
53-
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}/depends
54+
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
5455
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
55-
56-
# Setup ccache to use correct cache directories
57-
CONFIGFLAGS="${CONFIGFLAGS} --enable-ccache"
58-
export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache
59-
if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then
60-
pushd ${GBUILD_PACKAGE_CACHE}
61-
tar xf ccache.tar
62-
rm ccache.tar
63-
popd
64-
fi
65-
# instead of compressing ccache.tar, we let ccache handle it by itself
66-
# Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use
67-
export CCACHE_COMPRESS=1
68-
else
69-
CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache"
7056
fi
7157
7258
export ZERO_AR_DATE=1
@@ -79,7 +65,6 @@ script: |
7965
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
8066
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
8167
chmod +x ${WRAP_DIR}/${prog}
82-
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${prog}
8368
done
8469
}
8570
@@ -92,7 +77,6 @@ script: |
9277
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
9378
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
9479
chmod +x ${WRAP_DIR}/${i}-${prog}
95-
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${i}-${prog}
9680
done
9781
done
9882
}
@@ -107,7 +91,7 @@ script: |
10791
BASEPREFIX=`pwd`/depends
10892
10993
mkdir -p ${BASEPREFIX}/SDKs
110-
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
94+
tar -C ${BASEPREFIX}/SDKs -xJvf ${BUILD_DIR}/MacOSX10.11.sdk.tar.xz
11195
11296
# Build dependencies for each host
11397
for i in $HOSTS; do
@@ -152,9 +136,8 @@ script: |
152136
mkdir src/obj
153137
cp ../src/obj/build.h src/obj/
154138
155-
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
139+
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
156140
make ${MAKEOPTS}
157-
make -C src osx_debug
158141
make install-strip DESTDIR=${INSTALLPATH}
159142
160143
make osx_volname
@@ -179,20 +162,9 @@ script: |
179162
find . -name "lib*.la" -delete
180163
find . -name "lib*.a" -delete
181164
rm -rf ${DISTNAME}/lib/pkgconfig
182-
find .. -name *.dSYM -exec cp -ra {} ${DISTNAME}/bin \;
183-
find ${DISTNAME} -not -path '*.dSYM*' | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
184-
find ${DISTNAME} -path '*.dSYM*' | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
165+
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
185166
cd ../../
186167
done
187168
mkdir -p $OUTDIR/src
188169
mv $SOURCEDIST $OUTDIR/src
189-
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin14.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
190-
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin14-debug.tar.gz ${OUTDIR}/${DISTNAME}-osx64-debug.tar.gz
191-
192-
# Compress ccache (otherwise the assert file will get too huge)
193-
if [ "$CCACHE_DIR" != "" ]; then
194-
pushd ${GBUILD_PACKAGE_CACHE}
195-
tar cf ccache.tar ccache
196-
rm -rf ccache
197-
popd
198-
fi
170+
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: "wagerr-win-signer"
3+
distro: "ubuntu"
34
suites:
45
- "bionic"
56
architectures:
@@ -17,7 +18,9 @@ files:
1718
- "osslsigncode-2.0.tar.gz"
1819
- "wagerr-win-unsigned.tar.gz"
1920
script: |
20-
BUILD_DIR=`pwd`
21+
set -e -o pipefail
22+
23+
BUILD_DIR="$PWD"
2124
SIGDIR=${BUILD_DIR}/signature/win
2225
UNSIGNED_DIR=${BUILD_DIR}/unsigned
2326
@@ -34,6 +37,6 @@ script: |
3437
make
3538
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
3639
INFILE="`basename "${i}"`"
37-
OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`"
40+
OUTFILE="${INFILE/-unsigned}"
3841
./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
3942
done

0 commit comments

Comments
 (0)