Changeset View
Changeset View
Standalone View
Standalone View
contrib/gitian-descriptors/gitian-linux.yml
Show All 11 Lines | |||||
- "autoconf" | - "autoconf" | ||||
- "automake" | - "automake" | ||||
- "binutils-aarch64-linux-gnu" | - "binutils-aarch64-linux-gnu" | ||||
- "binutils-arm-linux-gnueabihf" | - "binutils-arm-linux-gnueabihf" | ||||
- "binutils-gold" | - "binutils-gold" | ||||
- "bsdmainutils" | - "bsdmainutils" | ||||
- "build-essential" | - "build-essential" | ||||
- "ca-certificates" | - "ca-certificates" | ||||
- "cmake" | |||||
- "curl" | - "curl" | ||||
- "faketime" | - "faketime" | ||||
- "g++-aarch64-linux-gnu" | - "g++-aarch64-linux-gnu" | ||||
- "g++-arm-linux-gnueabihf" | - "g++-arm-linux-gnueabihf" | ||||
- "gcc-aarch64-linux-gnu" | - "gcc-aarch64-linux-gnu" | ||||
- "gcc-arm-linux-gnueabihf" | - "gcc-arm-linux-gnueabihf" | ||||
- "git" | - "git" | ||||
- "gperf" | - "gperf" | ||||
- "lib32stdc++-8-dev" | - "lib32stdc++-8-dev" | ||||
- "libboost-all-dev" | |||||
- "libdb++-dev" | |||||
- "libdb-dev" | |||||
- "libc6-dev:i386" | - "libc6-dev:i386" | ||||
- "libevent-dev" | |||||
- "libminiupnpc-dev" | |||||
- "libprotobuf-dev" | |||||
- "libqrencode-dev" | |||||
- "libqt5core5a" | |||||
- "libqt5dbus5" | |||||
- "libqt5gui5" | |||||
- "libssl-dev" | |||||
- "libtool" | - "libtool" | ||||
- "libzmq3-dev" | |||||
- "ninja-build" | |||||
- "pkg-config" | - "pkg-config" | ||||
- "protobuf-compiler" | |||||
- "python3" | - "python3" | ||||
- "qttools5-dev" | |||||
- "qttools5-dev-tools" | |||||
remotes: | remotes: | ||||
- "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" | - "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" | ||||
"dir": "bitcoin" | "dir": "bitcoin" | ||||
files: [] | files: [] | ||||
script: | | script: | | ||||
WRAP_DIR=$HOME/wrapped | |||||
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu" | HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu" | ||||
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests" | |||||
# CMake toolchain file name differ from host name | |||||
declare -A CMAKE_TOOLCHAIN_FILE | |||||
CMAKE_TOOLCHAIN_FILE[i686-pc-linux-gnu]=Linux32.cmake | |||||
CMAKE_TOOLCHAIN_FILE[x86_64-linux-gnu]=Linux64.cmake | |||||
CMAKE_TOOLCHAIN_FILE[arm-linux-gnueabihf]=LinuxARM.cmake | |||||
CMAKE_TOOLCHAIN_FILE[aarch64-linux-gnu]=LinuxAArch64.cmake | |||||
# Allow extra cmake option to be specified for each host | |||||
declare -A CMAKE_EXTRA_OPTIONS | |||||
CMAKE_EXTRA_OPTIONS[aarch64-linux-gnu]="-DBUILD_BITCOIN_QT=OFF" | |||||
WRAP_DIR=$HOME/wrapped | |||||
FAKETIME_HOST_PROGS="" | FAKETIME_HOST_PROGS="" | ||||
FAKETIME_PROGS="date ar ranlib nm" | FAKETIME_PROGS="date ar ranlib nm" | ||||
HOST_CFLAGS="-O2 -g" | HOST_CFLAGS="-O2 -g" | ||||
HOST_CXXFLAGS="-O2 -g" | HOST_CXXFLAGS="-O2 -g" | ||||
HOST_LDFLAGS=-static-libstdc++ | HOST_LDFLAGS=-static-libstdc++ | ||||
export QT_RCC_TEST=1 | export QT_RCC_TEST=1 | ||||
export QT_RCC_SOURCE_DATE_OVERRIDE=1 | export QT_RCC_SOURCE_DATE_OVERRIDE=1 | ||||
Show All 34 Lines | script: | | ||||
# Faketime for depends so intermediate results are comparable | # Faketime for depends so intermediate results are comparable | ||||
export PATH_orig=${PATH} | export PATH_orig=${PATH} | ||||
create_global_faketime_wrappers "2000-01-01 12:00:00" | create_global_faketime_wrappers "2000-01-01 12:00:00" | ||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00" | create_per-host_faketime_wrappers "2000-01-01 12:00:00" | ||||
export PATH=${WRAP_DIR}:${PATH} | export PATH=${WRAP_DIR}:${PATH} | ||||
cd bitcoin | cd bitcoin | ||||
SOURCEDIR=`pwd` | |||||
BASEPREFIX=`pwd`/depends | BASEPREFIX=`pwd`/depends | ||||
# Build dependencies for each host | # Build dependencies for each host | ||||
for i in $HOSTS; do | for i in $HOSTS; do | ||||
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" | make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" | ||||
done | done | ||||
# Faketime for binaries | # Faketime for binaries | ||||
export PATH=${PATH_orig} | export PATH=${PATH_orig} | ||||
create_global_faketime_wrappers "${REFERENCE_DATETIME}" | create_global_faketime_wrappers "${REFERENCE_DATETIME}" | ||||
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}" | create_per-host_faketime_wrappers "${REFERENCE_DATETIME}" | ||||
export PATH=${WRAP_DIR}:${PATH} | export PATH=${WRAP_DIR}:${PATH} | ||||
# Create the release tarball using (arbitrarily) the first host | mkdir build | ||||
./autogen.sh | cd build | ||||
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ | cmake -GNinja .. \ | ||||
make dist | -DBUILD_BITCOIN_WALLET=OFF \ | ||||
-DBUILD_BITCOIN_ZMQ=OFF \ | |||||
-DBUILD_BITCOIN_SEEDER=OFF \ | |||||
-DBUILD_BITCOIN_CLI=OFF \ | |||||
-DBUILD_BITCOIN_TX=OFF \ | |||||
-DBUILD_BITCOIN_QT=OFF \ | |||||
-DBUILD_LIBBITCOINCONSENSUS=OFF | |||||
ninja package_source | |||||
SOURCEDIST=`echo bitcoin-abc-*.tar.gz` | SOURCEDIST=`echo bitcoin-abc-*.tar.gz` | ||||
mv ${SOURCEDIST} .. | |||||
cd .. | |||||
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` | DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` | ||||
# Correct tar file order | # Correct tar file order | ||||
mkdir -p temp | mkdir -p temp | ||||
pushd temp | pushd temp | ||||
tar xf ../$SOURCEDIST | tar xf ../$SOURCEDIST | ||||
find bitcoin-abc-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST | find bitcoin-abc-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST | ||||
popd | popd | ||||
ORIGPATH="$PATH" | ORIGPATH="$PATH" | ||||
# Extract the release tarball into a dir for each host and build | # Extract the release tarball into a dir for each host and build | ||||
for i in ${HOSTS}; do | for i in ${HOSTS}; do | ||||
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} | export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} | ||||
mkdir -p distsrc-${i} | mkdir -p distsrc-${i} | ||||
cd distsrc-${i} | cd distsrc-${i} | ||||
INSTALLPATH=`pwd`/installed/${DISTNAME} | INSTALLPATH=`pwd`/installed/${DISTNAME} | ||||
mkdir -p ${INSTALLPATH} | mkdir -p ${INSTALLPATH} | ||||
tar --strip-components=1 -xf ../$SOURCEDIST | tar --strip-components=1 -xf ../$SOURCEDIST | ||||
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}" | cmake -GNinja .. \ | ||||
make ${MAKEOPTS} | -DCMAKE_TOOLCHAIN_FILE=${SOURCEDIR}/cmake/platforms/${CMAKE_TOOLCHAIN_FILE[${i}]} \ | ||||
make ${MAKEOPTS} -C src check-security | -DCLIENT_VERSION_IS_RELEASE=ON \ | ||||
make ${MAKEOPTS} -C src check-symbols | -DENABLE_REDUCE_EXPORTS=ON \ | ||||
make install DESTDIR=${INSTALLPATH} | -DENABLE_STATIC_LIBSTDCXX=ON \ | ||||
-DENABLE_GLIBC_BACK_COMPAT=ON \ | |||||
-DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \ | |||||
${CMAKE_EXTRA_OPTIONS[${i}]} | |||||
ninja | |||||
ninja check-security | |||||
ninja check-symbols | |||||
ninja install | |||||
cd installed | cd installed | ||||
find . -name "lib*.la" -delete | |||||
find . -name "lib*.a" -delete | |||||
rm -rf ${DISTNAME}/lib/pkgconfig | |||||
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \; | 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 \; | find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \; | ||||
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} -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 | 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 | ||||
cd ../../ | cd ../../ | ||||
rm -rf distsrc-${i} | rm -rf distsrc-${i} | ||||
done | done | ||||
mkdir -p $OUTDIR/src | mkdir -p $OUTDIR/src | ||||
mv $SOURCEDIST $OUTDIR/src | mv $SOURCEDIST $OUTDIR/src |