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" | |||||
- "libc6-dev:i386" | - "libc6-dev:i386" | ||||
- "libevent-dev" | |||||
- "libssl-dev" | |||||
deadalnix: I'm not sure if yaml supports comments, but it would be useful to isolate the libraries that… | |||||
- "libtool" | - "libtool" | ||||
- "ninja-build" | |||||
- "pkg-config" | - "pkg-config" | ||||
- "python3" | - "python3" | ||||
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" | |||||
deadalnixUnsubmitted Not Done Inline ActionsIt is probably worth fixing. It doesn't looks like there is any blocker there. deadalnix: It is probably worth fixing. It doesn't looks like there is any blocker there. | |||||
FabienAuthorUnsubmitted Done Inline ActionsThis is something I plan to do soon, but I don't think it should block this diff as it doesn't remove anything from current state. Fabien: This is something I plan to do soon, but I don't think it should block this diff as it doesn't… | |||||
WRAP_DIR=$HOME/wrapped | |||||
deadalnixUnsubmitted Not Done Inline ActionsAvoid moving stuff around unless there is a good reason. This seems to be defined in the same place for all builds, so it's all good. deadalnix: Avoid moving stuff around unless there is a good reason. This seems to be defined in the same… | |||||
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 | ||||
deadalnixUnsubmitted Not Done Inline ActionsIt is usually a good idea to use pushd and popd in scripts. Using a better name than build would also be useful, as there are numerous build folder in there, so it means nothing in this context. deadalnix: It is usually a good idea to use pushd and popd in scripts. Using a better name than 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 \ | |||||
-DENABLE_QRCODE=OFF \ | |||||
-DENABLE_UPNP=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} \ | |||||
-DCCACHE=OFF \ | |||||
${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 |
I'm not sure if yaml supports comments, but it would be useful to isolate the libraries that are in fact not strictly required, but end up being necessary due to the way the build system works.
There is always a danger that these end up being used by mistake and make the build not reproducible. It's much better than it used to, but the trap needs to be made explicit.