2011-02-01 18:27:14 +01:00
|
|
|
---
|
2018-08-13 15:44:22 +02:00
|
|
|
name: "bitcoin-linux-0.18"
|
2014-08-13 01:13:04 +02:00
|
|
|
enable_cache: true
|
2011-02-01 18:27:14 +01:00
|
|
|
suites:
|
2018-05-05 05:17:23 +02:00
|
|
|
- "bionic"
|
2011-02-01 18:27:14 +01:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
2015-12-25 13:14:26 +01:00
|
|
|
packages:
|
2016-02-27 07:09:18 +01:00
|
|
|
- "curl"
|
2016-06-10 08:56:42 +02:00
|
|
|
- "g++-aarch64-linux-gnu"
|
2018-05-05 05:17:23 +02:00
|
|
|
- "g++-7-aarch64-linux-gnu"
|
|
|
|
- "gcc-7-aarch64-linux-gnu"
|
2016-06-10 08:56:42 +02:00
|
|
|
- "binutils-aarch64-linux-gnu"
|
|
|
|
- "g++-arm-linux-gnueabihf"
|
2018-05-05 05:17:23 +02:00
|
|
|
- "g++-7-arm-linux-gnueabihf"
|
|
|
|
- "gcc-7-arm-linux-gnueabihf"
|
2016-06-10 08:56:42 +02:00
|
|
|
- "binutils-arm-linux-gnueabihf"
|
2018-05-05 05:17:23 +02:00
|
|
|
- "g++-7-multilib"
|
|
|
|
- "gcc-7-multilib"
|
2016-06-10 08:56:42 +02:00
|
|
|
- "binutils-gold"
|
2018-05-05 05:17:23 +02:00
|
|
|
- "git"
|
2012-02-15 20:42:51 +01:00
|
|
|
- "pkg-config"
|
2015-10-29 07:29:48 +01:00
|
|
|
- "autoconf"
|
2013-05-28 01:55:01 +02:00
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
2013-09-10 21:15:10 +02:00
|
|
|
- "bsdmainutils"
|
2015-11-19 13:25:08 +01:00
|
|
|
- "ca-certificates"
|
|
|
|
- "python"
|
2011-02-01 18:27:14 +01:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
2014-08-13 01:13:04 +02:00
|
|
|
files: []
|
2011-02-01 18:27:14 +01:00
|
|
|
script: |
|
2016-06-10 08:56:42 +02:00
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
2016-06-10 08:56:42 +02:00
|
|
|
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
|
2016-06-08 04:09:28 +02:00
|
|
|
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
|
2014-08-13 01:13:04 +02:00
|
|
|
FAKETIME_HOST_PROGS=""
|
2016-06-10 08:56:42 +02:00
|
|
|
FAKETIME_PROGS="date ar ranlib nm"
|
2016-06-08 04:09:28 +02:00
|
|
|
HOST_CFLAGS="-O2 -g"
|
|
|
|
HOST_CXXFLAGS="-O2 -g"
|
|
|
|
HOST_LDFLAGS=-static-libstdc++
|
2014-08-13 01:13:04 +02:00
|
|
|
|
|
|
|
export QT_RCC_TEST=1
|
2018-07-21 08:21:50 +02:00
|
|
|
export QT_RCC_SOURCE_DATE_OVERRIDE=1
|
2014-08-13 01:13:04 +02:00
|
|
|
export GZIP="-9n"
|
|
|
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
|
|
|
export TZ="UTC"
|
|
|
|
export BUILD_DIR=`pwd`
|
|
|
|
mkdir -p ${WRAP_DIR}
|
|
|
|
if test -n "$GBUILD_CACHE_ENABLED"; then
|
|
|
|
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
|
|
|
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
|
|
|
|
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
|
|
|
fi
|
|
|
|
|
2016-04-05 13:29:04 +02:00
|
|
|
function create_global_faketime_wrappers {
|
2014-08-13 01:13:04 +02:00
|
|
|
for prog in ${FAKETIME_PROGS}; do
|
2018-06-20 11:54:54 +02:00
|
|
|
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
2015-10-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
2016-04-05 13:29:04 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
|
|
done
|
2016-04-05 13:29:04 +02:00
|
|
|
}
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2016-04-05 13:29:04 +02:00
|
|
|
function create_per-host_faketime_wrappers {
|
2014-08-13 01:13:04 +02:00
|
|
|
for i in $HOSTS; do
|
|
|
|
for prog in ${FAKETIME_HOST_PROGS}; do
|
2018-06-20 11:54:54 +02:00
|
|
|
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
2015-10-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2016-04-05 13:29:04 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
2016-04-05 13:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Faketime for depends so intermediate results are comparable
|
2016-06-12 14:10:55 +02:00
|
|
|
export PATH_orig=${PATH}
|
2016-04-05 13:29:04 +02:00
|
|
|
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
2016-06-12 14:10:55 +02:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
2016-04-05 13:29:04 +02:00
|
|
|
|
2016-07-08 02:09:55 +02:00
|
|
|
EXTRA_INCLUDES_BASE=$WRAP_DIR/extra_includes
|
|
|
|
mkdir -p $EXTRA_INCLUDES_BASE
|
|
|
|
|
|
|
|
# x86 needs /usr/include/i386-linux-gnu/asm pointed to /usr/include/x86_64-linux-gnu/asm,
|
|
|
|
# but we can't write there. Instead, create a link here and force it to be included in the
|
|
|
|
# search paths by wrapping gcc/g++.
|
|
|
|
|
|
|
|
mkdir -p $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu
|
|
|
|
rm -f $WRAP_DIR/extra_includes/i686-pc-linux-gnu/asm
|
|
|
|
ln -s /usr/include/x86_64-linux-gnu/asm $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu/asm
|
|
|
|
|
|
|
|
for prog in gcc g++; do
|
|
|
|
rm -f ${WRAP_DIR}/${prog}
|
|
|
|
cat << EOF > ${WRAP_DIR}/${prog}
|
2018-06-20 11:54:54 +02:00
|
|
|
#!/usr/bin/env bash
|
2016-07-08 02:09:55 +02:00
|
|
|
REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
|
|
|
|
for var in "\$@"
|
|
|
|
do
|
|
|
|
if [ "\$var" = "-m32" ]; then
|
|
|
|
export C_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
|
|
|
|
export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
\$REAL \$@
|
|
|
|
EOF
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
|
|
done
|
|
|
|
|
2011-04-28 01:26:14 +02:00
|
|
|
cd bitcoin
|
2014-08-13 01:13:04 +02:00
|
|
|
BASEPREFIX=`pwd`/depends
|
|
|
|
# Build dependencies for each host
|
|
|
|
for i in $HOSTS; do
|
2016-07-08 02:09:55 +02:00
|
|
|
EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i"
|
|
|
|
if [ -d "$EXTRA_INCLUDES" ]; then
|
|
|
|
export HOST_ID_SALT="$EXTRA_INCLUDES"
|
|
|
|
fi
|
2014-08-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
2016-07-08 02:09:55 +02:00
|
|
|
unset HOST_ID_SALT
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
|
|
|
|
2016-04-05 13:29:04 +02:00
|
|
|
# Faketime for binaries
|
2016-06-12 14:10:55 +02:00
|
|
|
export PATH=${PATH_orig}
|
2016-04-05 13:29:04 +02:00
|
|
|
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
2016-06-12 14:10:55 +02:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
2016-04-05 13:29:04 +02:00
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
# Create the release tarball using (arbitrarily) the first host
|
2013-05-28 01:55:01 +02:00
|
|
|
./autogen.sh
|
2016-06-07 20:51:51 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
2013-05-28 01:55:01 +02:00
|
|
|
make dist
|
2014-11-26 00:36:55 +01:00
|
|
|
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
2014-11-20 03:46:40 +01:00
|
|
|
# Correct tar file order
|
|
|
|
mkdir -p temp
|
|
|
|
pushd temp
|
2014-11-26 00:36:55 +01:00
|
|
|
tar xf ../$SOURCEDIST
|
2014-12-24 01:42:40 +01:00
|
|
|
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
2014-11-20 03:46:40 +01:00
|
|
|
popd
|
|
|
|
|
2017-08-19 21:22:06 +02:00
|
|
|
# Workaround for tarball not building with the bare tag version (prep)
|
|
|
|
make -C src obj/build.h
|
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
ORIGPATH="$PATH"
|
|
|
|
# Extract the release tarball into a dir for each host and build
|
|
|
|
for i in ${HOSTS}; do
|
|
|
|
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
|
|
|
mkdir -p distsrc-${i}
|
|
|
|
cd distsrc-${i}
|
2014-11-26 00:36:55 +01:00
|
|
|
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
|
|
|
mkdir -p ${INSTALLPATH}
|
|
|
|
tar --strip-components=1 -xf ../$SOURCEDIST
|
2014-03-20 12:03:36 +01:00
|
|
|
|
2017-08-19 21:22:06 +02:00
|
|
|
# Workaround for tarball not building with the bare tag version
|
|
|
|
echo '#!/bin/true' >share/genbuild.sh
|
|
|
|
mkdir src/obj
|
|
|
|
cp ../src/obj/build.h src/obj/
|
|
|
|
|
2016-06-08 04:09:28 +02:00
|
|
|
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}"
|
2014-08-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS}
|
2016-01-26 21:00:30 +01:00
|
|
|
make ${MAKEOPTS} -C src check-security
|
2016-06-10 08:56:42 +02:00
|
|
|
|
|
|
|
#TODO: This is a quick hack that disables symbol checking for arm.
|
|
|
|
# Instead, we should investigate why these are popping up.
|
|
|
|
# For aarch64, we'll need to bump up the min GLIBC version, as the abi
|
|
|
|
# support wasn't introduced until 2.17.
|
|
|
|
case $i in
|
|
|
|
aarch64-*) : ;;
|
|
|
|
arm-*) : ;;
|
|
|
|
*) make ${MAKEOPTS} -C src check-symbols ;;
|
|
|
|
esac
|
|
|
|
|
2016-06-08 04:09:28 +02:00
|
|
|
make install DESTDIR=${INSTALLPATH}
|
2014-11-26 00:36:55 +01:00
|
|
|
cd installed
|
|
|
|
find . -name "lib*.la" -delete
|
|
|
|
find . -name "lib*.a" -delete
|
|
|
|
rm -rf ${DISTNAME}/lib/pkgconfig
|
2016-06-10 08:56:42 +02:00
|
|
|
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
|
|
|
|
find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
|
2016-06-08 04:09:28 +02:00
|
|
|
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
|
|
|
|
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
|
2014-11-26 00:36:55 +01:00
|
|
|
cd ../../
|
2016-06-08 04:09:28 +02:00
|
|
|
rm -rf distsrc-${i}
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2013-05-28 01:55:01 +02:00
|
|
|
mkdir -p $OUTDIR/src
|
2014-11-26 00:36:55 +01:00
|
|
|
mv $SOURCEDIST $OUTDIR/src
|