aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian-descriptors/gitian-linux.yml
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gitian-descriptors/gitian-linux.yml')
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml145
1 files changed, 84 insertions, 61 deletions
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 30b0227bdd..bba2104edb 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,86 +1,109 @@
---
-name: "bitcoin"
+name: "bitcoin-linux-0.10"
+enable_cache: true
suites:
- "precise"
architectures:
-- "i386"
- "amd64"
packages:
-- "g++"
+- "g++-multilib"
- "git-core"
-- "unzip"
- "pkg-config"
- "autoconf2.13"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
-- "libqt4-core"
-- "libqt4-gui"
-- "libqt4-dbus"
-- "libqt4-network"
-- "libqt4-test"
+- "binutils-gold"
reference_datetime: "2013-06-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
-files:
-- "bitcoin-deps-linux32-gitian-r6.zip"
-- "bitcoin-deps-linux64-gitian-r6.zip"
-- "boost-linux32-1.55.0-gitian-r1.zip"
-- "boost-linux64-1.55.0-gitian-r1.zip"
-- "qt-linux32-4.6.4-gitian-r1.tar.gz"
-- "qt-linux64-4.6.4-gitian-r1.tar.gz"
+files: []
script: |
- STAGING="$HOME/install"
- OPTFLAGS='-O2'
- BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
- TEMPDIR="$HOME/tempdir"
- export TZ=UTC
- export LIBRARY_PATH="$STAGING/lib"
- export PATH="$STAGING/bin:$PATH"
- mkdir -p ${BINDIR}
- #
- mkdir -p $STAGING
- cd $STAGING
- unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip
- unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
- tar -zxf ../build/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz
- cd ../build
+ WRAP_DIR=$HOME/wrapped
+ HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
+ CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat"
+ FAKETIME_HOST_PROGS=""
+ FAKETIME_PROGS="date ar ranlib nm strip"
+
+ export QT_RCC_TEST=1
+ 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
+
+ # Create global faketime wrappers
+ for prog in ${FAKETIME_PROGS}; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+ echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+ chmod +x ${WRAP_DIR}/${prog}
+ done
+
+ # Create per-host faketime wrappers
+ for i in $HOSTS; do
+ for prog in ${FAKETIME_HOST_PROGS}; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+ chmod +x ${WRAP_DIR}/${i}-${prog}
+ done
+ done
+ export PATH=${WRAP_DIR}:${PATH}
- # Avoid exporting *any* symbols from the executable
- # This avoids conflicts between the libraries statically linked into bitcoin and any
- # libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094).
- # It also avoids start-up overhead to not export any unnecessary symbols.
- # To do this, build a linker script that marks all symbols as local.
- LINKER_SCRIPT=$HOME/build/linker_version_script
- echo '
- {
- local: *;
- };' > $LINKER_SCRIPT
- function do_configure {
- ./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-qt-bindir=$STAGING/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib -Wl,--version-script=$LINKER_SCRIPT ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" --enable-glibc-back-compat
- }
- #
cd bitcoin
+ BASEPREFIX=`pwd`/depends
+ # Build dependencies for each host
+ for i in $HOSTS; do
+ make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
+ done
+
+ # Create the release tarball using (arbitrarily) the first host
./autogen.sh
- do_configure
+ ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
- DISTNAME=`echo bitcoin-*.tar.gz`
+ SOURCEDIST=`echo bitcoin-*.tar.gz`
+ DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
+ # Correct tar file order
+ mkdir -p temp
+ pushd temp
+ tar xf ../$SOURCEDIST
+ find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
+ popd
- # Build dynamic versions of everything
- # (with static linking to boost and openssl as well a some non-OS deps)
- mkdir -p distsrc
- cd distsrc
- tar --strip-components=1 -xf ../$DISTNAME
- do_configure --bindir=$BINDIR
- make $MAKEOPTS
- make $MAKEOPTS install-strip
- make $MAKEOPTS clean
+ 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}
+ INSTALLPATH=`pwd`/installed/${DISTNAME}
+ mkdir -p ${INSTALLPATH}
+ tar --strip-components=1 -xf ../$SOURCEDIST
- # sort distribution tar file and normalize user/group/mtime information for deterministic output
+ ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+ make ${MAKEOPTS}
+ make install-strip
+ cd installed
+ find . -name "lib*.la" -delete
+ find . -name "lib*.a" -delete
+ rm -rf ${DISTNAME}/lib/pkgconfig
+ find . | sort | tar --no-recursion -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+ cd ../../
+ done
mkdir -p $OUTDIR/src
- rm -rf $TEMPDIR
- mkdir -p $TEMPDIR
- cd $TEMPDIR
- tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
+ mv $SOURCEDIST $OUTDIR/src
+ mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
+ mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz
+