gitian: descriptors overhaul

Descriptors now make use of the dependencies builder, so results are cached.
A very new version (>= e9741525c) of Gitian should be used in order to take
advantage of caching.
This commit is contained in:
Cory Fields 2014-08-12 19:13:04 -04:00
parent 5f93ec2028
commit 1aead42d41
15 changed files with 256 additions and 1516 deletions

View File

@ -1,55 +0,0 @@
---
name: "boost"
suites:
- "precise"
architectures:
- "i386"
- "amd64"
packages:
- "g++"
- "unzip"
- "pkg-config"
- "libtool"
- "faketime"
- "bsdmainutils"
- "zip"
- "libz-dev"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "boost_1_55_0.tar.bz2"
script: |
STAGING="$HOME/install"
TEMPDIR="$HOME/tmp"
export LIBRARY_PATH="$STAGING/lib"
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
# Input Integrity Check
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
mkdir -p "$STAGING"
tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
cd boost_1_55_0
GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
# note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
echo "using gcc : $GCCVERSION : g++
:
<cxxflags>\"-frandom-seed=boost1 -fPIC\"
;" > user-config.jam
./bootstrap.sh --without-icu
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS -d+2 install
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $STAGING -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd "$STAGING"
find | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip

View File

@ -1,86 +0,0 @@
---
name: "boost"
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "faketime"
- "zip"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "boost_1_55_0.tar.bz2"
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
script: |
# Defines
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
INDIR=$HOME/build
TEMPDIR=$HOME/tmp
# Input Integrity Check
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c
for BITS in 32 64; do # for architectures
#
INSTALLPREFIX=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
if [ "x$BITS" = "x32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
fi
#
mkdir -p $INSTALLPREFIX $BUILDDIR
cd $BUILDDIR
#
tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2
cd boost_1_55_0
GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
echo "using gcc : $GCCVERSION : $HOST-g++
:
<rc>$HOST-windres
<archiver>$HOST-ar
<cxxflags>-frandom-seed=boost1
<ranlib>$HOST-ranlib
;" > user-config.jam
./bootstrap.sh --without-icu
# Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work
# This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost.
# Please obtain the exact patch that matches the above sha256sum from one of the following mirrors.
#
# Read History: https://svn.boost.org/trac/boost/ticket/7262
# History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html
#
# Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
# Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch
# Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch
# Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch
patch -p0 < $INDIR/boost-mingw-gas-cross-compile-2013-03-03.patch
# Bug Workaround: boost-1.54.0 broke the ability to disable zlib, still broken in 1.55
# https://svn.boost.org/trac/boost/ticket/9156
sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2
sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2
# http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $INSTALLPREFIX -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd "$INSTALLPREFIX"
find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip
done # for BITS in

View File

@ -1,98 +0,0 @@
---
name: "bitcoin"
suites:
- "precise"
architectures:
- "i386"
- "amd64"
packages:
- "g++"
- "unzip"
- "zip"
- "pkg-config"
- "libtool"
- "faketime"
- "bsdmainutils"
reference_datetime: "2013-06-01 00:00:00"
remotes: []
files:
- "openssl-1.0.1h.tar.gz"
- "miniupnpc-1.9.tar.gz"
- "qrencode-3.4.3.tar.bz2"
- "protobuf-2.5.0.tar.bz2"
- "db-4.8.30.NC.tar.gz"
script: |
STAGING="$HOME/install"
TEMPDIR="$HOME/tmp"
OPTFLAGS='-O2'
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
export LIBRARY_PATH="$STAGING/lib"
# Integrity Check
echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 openssl-1.0.1h.tar.gz" | sha256sum -c
echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464 miniupnpc-1.9.tar.gz" | sha256sum -c
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
#
tar xzf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
# need -fPIC to avoid relocation error in 64 bit builds
./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
# need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
make
make install_sw
cd ..
#
tar xzfm miniupnpc-1.9.tar.gz
cd miniupnpc-1.9
# miniupnpc is always built with -fPIC
INSTALLPREFIX=$STAGING make $MAKEOPTS install
rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build
cd ..
#
tar xjf qrencode-3.4.3.tar.bz2
cd qrencode-3.4.3
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
# need --with-pic to avoid relocation error in 64 bit builds
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
export FAKETIME=$REFERENCE_DATETIME
make $MAKEOPTS install
cd ..
#
tar xjf protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
mkdir -p $STAGING/host/bin
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
# need --with-pic to avoid relocation error in 64 bit builds
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
export FAKETIME=$REFERENCE_DATETIME
make $MAKEOPTS install
cd ..
#
tar xzf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
# need --with-pic to avoid relocation error in 64 bit builds
../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
make $MAKEOPTS library_build
make install_lib install_include
cd ../..
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $STAGING -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd $STAGING
find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip

View File

@ -1,128 +0,0 @@
---
name: "bitcoin-deps"
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "git-core"
- "zip"
- "faketime"
- "psmisc"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "openssl-1.0.1h.tar.gz"
- "db-4.8.30.NC.tar.gz"
- "miniupnpc-1.9.tar.gz"
- "zlib-1.2.8.tar.gz"
- "libpng-1.6.8.tar.gz"
- "qrencode-3.4.3.tar.bz2"
script: |
#
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
INDIR=$HOME/build
TEMPDIR=$HOME/tmp
# Input Integrity Check
echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 openssl-1.0.1h.tar.gz" | sha256sum -c
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464 miniupnpc-1.9.tar.gz" | sha256sum -c
echo "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d zlib-1.2.8.tar.gz" | sha256sum -c
echo "32c7acf1608b9c8b71b743b9780adb7a7b347563dbfb4a5263761056da44cc96 libpng-1.6.8.tar.gz" | sha256sum -c
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
for BITS in 32 64; do # for architectures
#
INSTALLPREFIX=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
if [ "x$BITS" = "x32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
fi
#
mkdir -p $INSTALLPREFIX $BUILDDIR
cd $BUILDDIR
#
tar xzf $INDIR/openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
if [ "x$BITS" = "x32" ]; then
OPENSSL_TGT=mingw
else
OPENSSL_TGT=mingw64
fi
./Configure --cross-compile-prefix=$HOST- ${OPENSSL_TGT} no-shared no-dso --openssldir=$INSTALLPREFIX
make
make install_sw
cd ..
#
tar xzf $INDIR/db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST --disable-shared
make $MAKEOPTS library_build
make install_lib install_include
cd ../..
#
tar xzf $INDIR/miniupnpc-1.9.tar.gz
cd miniupnpc-1.9
echo "
--- miniupnpc-1.9/Makefile.mingw.orig 2013-09-29 18:52:51.014087958 -1000
+++ miniupnpc-1.9/Makefile.mingw 2013-09-29 19:09:29.663318691 -1000
@@ -67,8 +67,8 @@
wingenminiupnpcstrings.o: wingenminiupnpcstrings.c
-miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
- wingenminiupnpcstrings \$< \$@
+miniupnpcstrings.h: miniupnpcstrings.h.in
+ sed -e 's|OS/version|MSWindows/5.1.2600|' -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"VERSIONHERE\"|' \$< > \$@
minixml.o: minixml.c minixml.h miniupnpcstrings.h
" | sed "s/VERSIONHERE/$(cat VERSION)/" | patch -p1
mkdir -p dll
make -f Makefile.mingw CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a
install -d $INSTALLPREFIX/include/miniupnpc
install *.h $INSTALLPREFIX/include/miniupnpc
install libminiupnpc.a $INSTALLPREFIX/lib
cd ..
#
tar xzf $INDIR/zlib-1.2.8.tar.gz
cd zlib-1.2.8
CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static
make
make install
cd ..
#
tar xzf $INDIR/libpng-1.6.8.tar.gz
cd libpng-1.6.8
OPT="-O2"
CPPFLAGS="${OPT} -I$INSTALLPREFIX/include" CFLAGS="${OPT} -I$INSTALLPREFIX/include" LDFLAGS="${OPT} -L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST
make $MAKEOPTS
make install
cd ..
#
tar xjf $INDIR/qrencode-3.4.3.tar.bz2
cd qrencode-3.4.3
png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-dependency-tracking
# Workaround to prevent re-configuring by make (resulting in missing m4 error); make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
make
make install
cd ..
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $INSTALLPREFIX -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd $INSTALLPREFIX
find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r13.zip
done # for BITS in

View File

@ -1,86 +1,94 @@
---
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`
# Build dynamic versions of everything
# (with static linking to boost and openssl as well a some non-OS deps)
mkdir -p distsrc
cd distsrc
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}
tar --strip-components=1 -xf ../$DISTNAME
do_configure --bindir=$BINDIR
make $MAKEOPTS
make $MAKEOPTS install-strip
make $MAKEOPTS clean
# sort distribution tar file and normalize user/group/mtime information for deterministic output
./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
make ${MAKEOPTS}
make install-strip
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 $DISTNAME $OUTDIR/src
mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
mv ${OUTDIR}/i686-* ${OUTDIR}/32

View File

@ -1,61 +0,0 @@
---
name: "bitcoin"
suites:
- "precise"
architectures:
- "i386"
packages:
- "git-core"
- "automake"
- "faketime"
- "bsdmainutils"
- "pkg-config"
- "p7zip-full"
- "libtool"
reference_datetime: "2013-06-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
- "osx-native-depends-r3.tar.gz"
- "osx-depends-r4.tar.gz"
- "osx-depends-qt-5.2.1-r4.tar.gz"
- "MacOSX10.7.sdk.tar.gz"
script: |
HOST=x86_64-apple-darwin11
PREFIX=`pwd`/osx-cross-depends/prefix
SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.7.sdk
NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix
export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export SOURCES_PATH=`pwd`
mkdir -p osx-cross-depends/SDKs
tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz
tar -C osx-cross-depends -xf osx-depends-r4.tar.gz
tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r4.tar.gz
export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
cd bitcoin
export ZERO_AR_DATE=1
export QT_RCC_TEST=1
./autogen.sh
./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode
make dist
mkdir -p distsrc
cd distsrc
tar --strip-components=1 -xf ../bitcoin-*.tar*
./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode
make $MAKEOPTS
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
make deploy
dmg dmg Bitcoin-Qt.dmg $OUTDIR/Bitcoin-Qt.dmg

View File

@ -1,159 +0,0 @@
---
name: "osx-depends"
suites:
- "precise"
architectures:
- "i386"
packages:
- "git-core"
- "automake"
- "p7zip-full"
reference_datetime: "2013-06-01 00:00:00"
remotes: []
files:
- "boost_1_55_0.tar.bz2"
- "db-4.8.30.NC.tar.gz"
- "miniupnpc-1.9.tar.gz"
- "openssl-1.0.1h.tar.gz"
- "protobuf-2.5.0.tar.bz2"
- "qrencode-3.4.3.tar.bz2"
- "MacOSX10.7.sdk.tar.gz"
- "osx-native-depends-r3.tar.gz"
script: |
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | sha256sum -c
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464 miniupnpc-1.9.tar.gz" | sha256sum -c
echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 openssl-1.0.1h.tar.gz" | sha256sum -c
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
REVISION=r4
export SOURCES_PATH=`pwd`
export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export PATH=$HOME:$PATH
export SOURCES_PATH=`pwd`
export ZERO_AR_DATE=1
mkdir -p osx-cross-depends/build
cd osx-cross-depends
PREFIX=`pwd`/prefix
NATIVEPREFIX=`pwd`/native-prefix
BUILD_BASE=`pwd`/build
SDK=`pwd`/SDKs/MacOSX10.7.sdk
HOST=x86_64-apple-darwin11
MIN_VERSION=10.6
INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
INT_CXXFLAGS="${INT_CFLAGS}"
INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
INT_CPPFLAGS="-I${PREFIX}/include"
INT_CC=clang
INT_CXX=clang++
INT_OBJC=clang
INT_OBJCXX=clang++
INT_AR=${HOST}-ar
INT_RANLIB=${HOST}-ranlib
INT_LIBTOOL=${HOST}-libtool
INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
export PATH=${NATIVEPREFIX}/bin:${PATH}
mkdir -p ${NATIVEPREFIX}/bin
mkdir -p ${NATIVEPREFIX}/lib
mkdir -p ${PREFIX}/bin
mkdir -p ${PREFIX}/lib
mkdir -p ${BUILD_BASE}
mkdir -p SDKs
tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
# bdb
SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz
BUILD_DIR=${BUILD_BASE}/db-4.8.30.NC
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ${BUILD_DIR}/dbinc/atomic.h
pushd ${BUILD_DIR}
cd build_unix;
../dist/configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}"
make $MAKEOPTS libdb.a libdb_cxx.a
make install_lib install_include
popd
# openssl
SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1h.tar.gz
BUILD_DIR=${BUILD_BASE}/openssl-1.0.1h
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
pushd ${BUILD_DIR}
sed -ie "s|cc:|${INT_CC}:|" ${BUILD_DIR}/Configure
sed -ie "s|\(-arch [_a-zA-Z0-9]*\)|\1 --sysroot ${SDK} -target ${HOST} -msse2|" ${BUILD_DIR}/Configure
AR="${INT_AR}" RANLIB="${INT_RANLIB}" ./Configure --prefix=${PREFIX} --openssldir=${PREFIX}/etc/openssl zlib shared no-krb5 darwin64-x86_64-cc ${INT_LDFLAGS} ${INT_CLANG_LDFLAGS} ${INT_CPPFLAGS}
sed -i "s|engines apps test|engines|" ${BUILD_DIR}/Makefile
sed -i "/define DATE/d" ${BUILD_DIR}/crypto/Makefile
make -j1 build_libs libcrypto.pc libssl.pc openssl.pc
make -j1 install_sw
popd
#libminiupnpc
SOURCE_FILE=${SOURCES_PATH}/miniupnpc-1.9.tar.gz
BUILD_DIR=${BUILD_BASE}/miniupnpc-1.9
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
pushd ${BUILD_DIR}
CFLAGS="${INT_CFLAGS} ${INT_CPPFLAGS}" make $MAKEOPTS OS=Darwin CC="${INT_CC}" AR="${INT_AR}" libminiupnpc.a
install -d ${PREFIX}/include/miniupnpc
install *.h ${PREFIX}/include/miniupnpc
install libminiupnpc.a ${PREFIX}/lib
popd
# qrencode
SOURCE_FILE=${SOURCES_PATH}/qrencode-3.4.3.tar.bz2
BUILD_DIR=${BUILD_BASE}/qrencode-3.4.3
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
pushd ${BUILD_DIR}
# m4 folder is not included in the stable release, which can confuse aclocal
# if its timestamp ends up being earlier than configure.ac when extracted
touch aclocal.m4
./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --disable-shared -without-tools --disable-sdltest --disable-dependency-tracking
make $MAKEOPTS
make install
popd
# libprotobuf
SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
pushd ${BUILD_DIR}
./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --enable-shared=no --disable-dependency-tracking --with-protoc=${NATIVEPREFIX}/bin/protoc
cd src
make $MAKEOPTS libprotobuf.la
make install-libLTLIBRARIES install-nobase_includeHEADERS
cd ..
make install-pkgconfigDATA
popd
# boost
SOURCE_FILE=${SOURCES_PATH}/boost_1_55_0.tar.bz2
BUILD_DIR=${BUILD_BASE}/boost_1_55_0
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
pushd ${BUILD_DIR}
./bootstrap.sh --with-libraries=chrono,filesystem,program_options,system,thread,test
echo "using darwin : : ${INT_CXX} : <cxxflags>\"${INT_CFLAGS} ${INT_CPPFLAGS}\" <linkflags>\"${INT_LDFLAGS} ${INT_CLANG_LDFLAGS}\" <archiver>\"${INT_LIBTOOL}\" <striper>\"${INT_STRIP}\" : ;" > "user-config.jam"
./b2 -d2 --layout=tagged --build-type=complete --prefix="${PREFIX}" --toolset=darwin-4.2.1 --user-config=user-config.jam variant=release threading=multi link=static install
popd
export GZIP="-9n"
find prefix | sort | tar --no-recursion -czf osx-depends-${REVISION}.tar.gz -T -
mv osx-depends-${REVISION}.tar.gz $OUTDIR

View File

@ -1,178 +0,0 @@
---
name: "osx-native"
suites:
- "precise"
architectures:
- "i386"
packages:
- "git-core"
- "automake"
- "faketime"
- "libssl-dev"
- "libbz2-dev"
- "libz-dev"
- "cmake"
- "libcap-dev"
- "p7zip-full"
- "uuid-dev"
reference_datetime: "2013-06-01 00:00:00"
remotes: []
files:
- "10cc648683617cca8bcbeae507888099b41b530c.tar.gz"
- "cctools-809.tar.gz"
- "dyld-195.5.tar.gz"
- "ld64-127.2.tar.gz"
- "protobuf-2.5.0.tar.bz2"
- "MacOSX10.7.sdk.tar.gz"
- "cdrkit-1.1.11.tar.gz"
- "libdmg-hfsplus-v0.1.tar.gz"
- "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz"
- "cdrkit-deterministic.patch"
script: |
echo "18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca 10cc648683617cca8bcbeae507888099b41b530c.tar.gz" | sha256sum -c
echo "03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad cctools-809.tar.gz" | sha256sum -c
echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c dyld-195.5.tar.gz" | sha256sum -c
echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142 ld64-127.2.tar.gz" | sha256sum -c
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da cdrkit-1.1.11.tar.gz" | sha256sum -c
echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c
echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c
echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f cdrkit-deterministic.patch" | sha256sum -c
REVISION=r3
export REFERENCE_DATETIME
export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
REAL_AR=`which ar`
REAL_RANLIB=`which ranlib`
REAL_DATE=`which date`
echo '#!/bin/bash' > $HOME/ar
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
echo "$REAL_AR \"\$@\"" >> $HOME/ar
echo '#!/bin/bash' > $HOME/ranlib
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ranlib
echo "$REAL_RANLIB \"\$@\"" >> $HOME/ranlib
echo '#!/bin/bash' > $HOME/date
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/date
echo "$REAL_DATE \"\$@\"" >> $HOME/date
chmod +x $HOME/ar $HOME/ranlib $HOME/date
export PATH=$HOME:$PATH
export SOURCES_PATH=`pwd`
mkdir -p osx-cross-depends/build
cd osx-cross-depends
NATIVEPREFIX=`pwd`/native-prefix
BUILD_BASE=`pwd`/build
SDK=`pwd`/SDKs/MacOSX10.7.sdk
HOST=x86_64-apple-darwin11
MIN_VERSION=10.6
CFLAGS=""
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${NATIVEPREFIX}/lib"
export PATH=${NATIVEPREFIX}/bin:${PATH}
mkdir -p ${NATIVEPREFIX}/bin
mkdir -p ${NATIVEPREFIX}/lib
mkdir -p SDKs
tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
# Clang
SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
BUILD_DIR=${BUILD_BASE}/clang+llvm-3.2-x86-linux-ubuntu-12.04
mkdir -p ${NATIVEPREFIX}/lib/clang/3.2/include
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
cp ${BUILD_DIR}/bin/clang ${NATIVEPREFIX}/bin/
cp ${BUILD_DIR}/bin/clang++ ${NATIVEPREFIX}/bin/
cp ${BUILD_DIR}/lib/libLTO.so ${NATIVEPREFIX}/lib/
cp ${BUILD_DIR}/lib/clang/3.2/include/* ${NATIVEPREFIX}/lib/clang/3.2/include
# cctools
SOURCE_FILE=${SOURCES_PATH}/10cc648683617cca8bcbeae507888099b41b530c.tar.gz
BUILD_DIR=${BUILD_BASE}/toolchain4-10cc648683617cca8bcbeae507888099b41b530c
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
mkdir -p ${BUILD_DIR}/sdks
pushd ${BUILD_DIR}/sdks;
ln -sf ${SDK} MacOSX10.7.sdk
ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz
ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz
ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz
tar -C ${BUILD_DIR} -xf ${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
# Hack in the use of our llvm headers rather than grabbing the old llvm-gcc.
sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
sed -i "s|\${LLVM_CLANG_DIR}/llvmCore/include/llvm-c|\${LLVM_CLANG_DIR}/include/llvm-c \${LLVM_CLANG_DIR}/include/llvm |" ${BUILD_DIR}/cctools2odcctools/extract.sh
sed -i "s|fAC_INIT|AC_INIT|" ${BUILD_DIR}/cctools2odcctools/files/configure.ac
sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac
cd ${BUILD_DIR}/cctools2odcctools
./extract.sh --osxver 10.7
cd odcctools-809
./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK}
# The 'PC' define in sparc/reg.h conflicts but doesn't get used anyway. Just rename it.
sed -i "s|define\tPC|define\tPC_|" ${BUILD_DIR}/cctools2odcctools/odcctools-809/include/architecture/sparc/reg.h
make $MAKEOPTS
make install
popd
# protoc
SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
pushd ${BUILD_DIR};
./configure --enable-shared=no --disable-dependency-tracking --prefix=${NATIVEPREFIX}
make $MAKEOPTS
cp ${BUILD_DIR}/src/protoc ${NATIVEPREFIX}/bin/
popd
# cdrkit
SOURCE_FILE=${SOURCES_PATH}/cdrkit-1.1.11.tar.gz
BUILD_DIR=${BUILD_BASE}/cdrkit-1.1.11
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
pushd ${BUILD_DIR}
patch -p1 < ${SOURCES_PATH}/cdrkit-deterministic.patch
cmake -DCMAKE_INSTALL_PREFIX=${NATIVEPREFIX}
make $MAKEOPTS genisoimage
make -C genisoimage install
popd
# libdmg-hfsplus
SOURCE_FILE=${SOURCES_PATH}/libdmg-hfsplus-v0.1.tar.gz
BUILD_DIR=${BUILD_BASE}/libdmg-hfsplus-libdmg-hfsplus-v0.1
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
mkdir -p ${BUILD_DIR}/build
pushd ${BUILD_DIR}/build
cmake -DCMAKE_INSTALL_PREFIX:PATH=${NATIVEPREFIX}/bin ..
make $MAKEOPTS
make install
popd
rm -rf native-prefix/docs
export GZIP="-9n"
find native-prefix | sort | tar --no-recursion -czf osx-native-depends-$REVISION.tar.gz -T -
mv osx-native-depends-$REVISION.tar.gz $OUTDIR

View File

@ -1,186 +0,0 @@
---
name: "osx-qt"
suites:
- "precise"
architectures:
- "i386"
packages:
- "git-core"
- "automake"
- "p7zip-full"
reference_datetime: "2013-06-01 00:00:00"
remotes: []
files:
- "qt-everywhere-opensource-src-5.2.1.tar.gz"
- "osx-native-depends-r3.tar.gz"
- "osx-depends-r4.tar.gz"
- "MacOSX10.7.sdk.tar.gz"
script: |
echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1 qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
REVISION=r4
export SOURCES_PATH=`pwd`
export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export ZERO_AR_DATE=1
export TZ=UTC
REAL_DATE=`which date`
echo '#!/bin/bash' > $HOME/date
echo "$REAL_DATE -d \"${REFERENCE_DATETIME}\" \"\$@\"" >> $HOME/date
chmod +x $HOME/date
export PATH=$HOME:$PATH
mkdir -p osx-cross-depends/build
cd osx-cross-depends
PREFIX=`pwd`/prefix
NATIVEPREFIX=`pwd`/native-prefix
BUILD_BASE=`pwd`/build
SDK=`pwd`/SDKs/MacOSX10.7.sdk
HOST=x86_64-apple-darwin11
MIN_VERSION=10.6
INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
INT_CXXFLAGS="${INT_CFLAGS}"
INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
INT_CPPFLAGS="-I${PREFIX}/include"
INT_CC=clang
INT_CXX=clang++
INT_OBJC=clang
INT_OBJCXX=clang++
INT_AR=${HOST}-ar
INT_RANLIB=${HOST}-ranlib
INT_LIBTOOL=${HOST}-libtool
INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
export PATH=${NATIVEPREFIX}/bin:${PATH}
mkdir -p ${NATIVEPREFIX}/bin
mkdir -p ${NATIVEPREFIX}/lib
mkdir -p ${PREFIX}/bin
mkdir -p ${PREFIX}/lib
mkdir -p ${BUILD_BASE}
mkdir -p SDKs
tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
export PATH=`pwd`/native-prefix/bin:$PATH
tar xf /home/ubuntu/build/osx-depends-r4.tar.gz
SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
# Install our mkspec. All files are pulled from the macx-clang spec, except for
# our custom qmake.conf
SPECFILE=${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/qmake.conf
mkdir -p ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux
cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.lib ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.app ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/qplatformdefs.h ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
cat > ${SPECFILE} <<ENDCONF
MAKEFILE_GENERATOR = UNIX
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
QMAKE_XCODE_VERSION=4.3
QMAKE_XCODE_DEVELOPER_PATH=/Developer
QMAKE_MACOSX_DEPLOYMENT_TARGET = ${MIN_VERSION}
QMAKE_MAC_SDK=macosx
QMAKE_MAC_SDK.macosx.path = ${SDK}
QMAKE_MAC_SDK.macosx.platform_name = macosx
QMAKE_MAC_SDK_PATH=${SDK}
QMAKE_CFLAGS += -target ${HOST}
QMAKE_OBJECTIVE_CFLAGS += -target ${HOST}
QMAKE_CXXFLAGS += -target ${HOST}
QMAKE_LFLAGS += -target ${HOST}
QMAKE_AR = ${HOST}-ar cq
QMAKE_RANLIB=${HOST}-ranlib
QMAKE_LIBTOOL=${HOST}-libtool
QMAKE_INSTALL_NAME_TOOL=${HOST}-install_name_tool
load(qt_config)
ENDCONF
pushd ${BUILD_DIR}
./configure -release -opensource -openssl-linked \
-no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-tds \
-no-cups -no-iconv -no-dbus -no-gif -no-audio-backend -no-freetype \
-no-javascript-jit -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch \
-no-dbus -no-gif -no-sm -nomake examples -no-feature-style-plastique \
-no-xcb -no-qml-debug -no-pch -no-nis \
-no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif \
-no-feature-style-windowsmobile -no-feature-style-windowsce \
-no-feature-style-cleanlooks \
-no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql \
-no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
-skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport \
-skip qtdeclarative -skip qtmultimedia -skip qtimageformats \
-skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns \
-skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity \
-skip qtwinextras -skip qtscript \
-prefix ${PREFIX} -bindir ${NATIVEPREFIX}/bin \
-confirm-license -xplatform macx-clang-linux -v ${INT_LDFLAGS}
# RCC's output is sorted using each file entry's hash as the key. Unfortunately,
# the hash function uses a random seed for each run so the results aren't
# deterministic. This leads to static resources being defined in a random order,
# which in-turn means that object files are not predictable.
# Fortunately, this upsets Qt's unit tests as well, so they've added the
# QT_RCC_TEST environment variable to set a pre-defined seed. Here, do the same
# thing for the same reason.
QT_RCC_TEST=1 make $MAKEOPTS module-qtbase-make_first
make $MAKEOPTS module-qttranslations-make_first
make $MAKEOPTS module-qttools-make_first
make $MAKEOPTS -C qtbase
make -C qtbase install
make -C qttranslations install
make -C qttools/src/linguist install
popd
# This file should not be installed to the destination. It's native and
# non-deterministic. Remove it.
# See: https://bugreports.qt-project.org/browse/QTBUG-31393
rm -f ${PREFIX}/lib/libQt5Bootstrap.a
rm -f ${PREFIX}/lib/Qt*.framework/Qt*.prl
pushd ${PREFIX}/include
ln -sf ../lib/QtNetwork.framework/Headers/ QtNetwork
ln -sf ../lib/QtWidgets.framework/Headers/ QtWidgets
ln -sf ../lib/QtGui.framework/Headers/ QtGui
ln -sf ../lib/QtCore.framework/Headers/ QtCore
ln -sf ../lib/QtTest.framework/Headers/ QtTest
popd
rm -f ${PREFIX}/lib/*.la
find ${PREFIX}/lib -name "*.prl" -delete
export GZIP="-9n"
find native-prefix prefix | sort | tar --no-recursion -czf osx-depends-qt-5.2.1-${REVISION}.tar.gz -T -
mv osx-depends-qt-5.2.1-${REVISION}.tar.gz $OUTDIR

View File

@ -0,0 +1,104 @@
---
name: "bitcoin-osx-0.10"
enable_cache: true
suites:
- "precise"
architectures:
- "amd64"
packages:
- "g++-multilib"
- "git-core"
- "pkg-config"
- "autoconf2.13"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
- "cmake"
- "libcap-dev"
- "libz-dev"
- "libbz2-dev"
reference_datetime: "2013-06-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
- "MacOSX10.7.sdk.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin11"
CONFIGFLAGS="--enable-upnp-default GENISOIMAGE=$WRAP_DIR/genisoimage"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
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
export ZERO_AR_DATE=1
# 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}
cd bitcoin
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.7.sdk.tar.gz
# 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
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
DISTNAME=`echo bitcoin-*.tar.gz`
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}
tar --strip-components=1 -xf ../$DISTNAME
./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
make ${MAKEOPTS}
make install-strip
make deploy
${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/Bitcoin-Qt.dmg
cd ..
done
mkdir -p $OUTDIR/src
mv $DISTNAME $OUTDIR/src

View File

@ -1,97 +1,98 @@
---
name: "bitcoin"
name: "bitcoin-win-0.10"
enable_cache: true
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "g++"
- "git-core"
- "unzip"
- "nsis"
- "faketime"
- "pkg-config"
- "autoconf2.13"
- "libtool"
- "automake"
- "pkg-config"
- "faketime"
- "bsdmainutils"
- "mingw-w64"
- "g++-mingw-w64"
- "nsis"
reference_datetime: "2013-06-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
- "qt-win32-5.2.0-gitian-r3.zip"
- "qt-win64-5.2.0-gitian-r3.zip"
- "boost-win32-1.55.0-gitian-r6.zip"
- "boost-win64-1.55.0-gitian-r6.zip"
- "bitcoin-deps-win32-gitian-r13.zip"
- "bitcoin-deps-win64-gitian-r13.zip"
- "protobuf-win32-2.5.0-gitian-r4.zip"
- "protobuf-win64-2.5.0-gitian-r4.zip"
files: []
script: |
# Defines
export TZ=UTC
INDIR=$HOME/build
OPTFLAGS='-O2'
TEMPDIR="$HOME/tempdir"
NEEDDIST=1
# Qt: workaround for determinism in resource ordering
# Qt5's rcc uses a QHash to store the files for the resource.
# A security fix in QHash makes the ordering of keys to be different on every run
# (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
# This is good in general but qrc shouldn't be doing a traversal over a randomized container.
# The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
# For now luckily there is a test mode that forces a fixed seed.
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
CONFIGFLAGS="--enable-upnp-default"
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
FAKETIME_PROGS="date makensis"
export QT_RCC_TEST=1
for BITS in 32 64; do # for architectures
#
STAGING=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
BINDIR=$OUTDIR/$BITS
if [ "x$BITS" = "x32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
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
export PATH=$STAGING/host/bin:$PATH
mkdir -p $STAGING $BUILDDIR $BINDIR
#
cd $STAGING
unzip $INDIR/qt-win${BITS}-5.2.0-gitian-r3.zip
unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip
unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip
if [ "x$NEEDDIST" = "x1" ]; then
# Make source code archive which is architecture independent so it only needs to be done once
cd $HOME/build/bitcoin
# 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}
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
./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
DISTNAME=`echo bitcoin-*.tar.gz`
NEEDDIST=0
fi
# Build platform-dependent executables from source archive
cd $BUILDDIR
mkdir -p distsrc
cd distsrc
tar --strip-components=1 -xf $HOME/build/bitcoin/$DISTNAME
./configure --enable-upnp-default --bindir=$BINDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
make $MAKEOPTS
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}
tar --strip-components=1 -xf ../$DISTNAME
./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
make ${MAKEOPTS}
make deploy
make install-strip
cp -f bitcoin-*setup*.exe $BINDIR/
unset LD_PRELOAD
unset FAKETIME
done # for BITS in
# sort distribution tar file and normalize user/group/mtime information for deterministic output
cp -f bitcoin-*setup*.exe $OUTDIR/
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 $DISTNAME $OUTDIR/src
mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
mv ${OUTDIR}/i686-* ${OUTDIR}/32

View File

@ -1,65 +0,0 @@
---
name: "protobuf-win32"
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "zip"
- "faketime"
reference_datetime: "2013-04-15 00:00:00"
remotes: []
files:
- "protobuf-2.5.0.tar.bz2"
script: |
#
export TZ=UTC
INDIR=$HOME/build
TEMPDIR=$HOME/tmp
OPTFLAGS="-O2"
# Integrity Check
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
for BITS in 32 64; do # for architectures
#
INSTALLPREFIX=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
if [ "x$BITS" = "x32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
fi
#
mkdir -p $INSTALLPREFIX $BUILDDIR
cd $BUILDDIR
#
tar xjf $INDIR/protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
# First: build a native (linux) protoc
./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
make
mkdir -p $INSTALLPREFIX/host/bin
cp src/protoc $INSTALLPREFIX/host/bin
# Now recompile with the mingw cross-compiler:
make distclean
./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
make
make install
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $INSTALLPREFIX -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd $INSTALLPREFIX
find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip
unset LD_PRELOAD
unset FAKETIME
done # for BITS in

View File

@ -1,264 +0,0 @@
---
name: "qt-linux"
suites:
- "precise"
architectures:
- "i386"
- "amd64"
packages:
- "zip"
- "unzip"
- "faketime"
- "unzip"
- "libxext-dev"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "qt-everywhere-opensource-src-4.6.4.tar.gz"
script: |
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
if [ "x$GBUILD_BITS" = "x32" ]; then
ARCH='i386-linux-gnu'
else
ARCH='x86_64-linux-gnu'
fi
# The purpose of this gitian build is not to actually build Qt, but to export
# the headers as well as pkgconfig files in a useable format so that we can
# pretend to link against an older version. The goal is to link to the
# system version of Qt 4.
# Also build development tools.
INSTALLPREFIX="$HOME/install"
# Integrity Check
echo "9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250 qt-everywhere-opensource-src-4.6.4.tar.gz" | sha256sum -c
# Make install directories
mkdir -p $INSTALLPREFIX
mkdir -p $INSTALLPREFIX/include
PKGCONFIGDIR=$INSTALLPREFIX/lib/pkgconfig
mkdir -p $PKGCONFIGDIR
#
tar xzf qt-everywhere-opensource-src-4.6.4.tar.gz
cd qt-everywhere-opensource-src-4.6.4
QTBUILDDIR=$(pwd)
sed 's/TODAY=`date +%Y-%m-%d`/TODAY=2011-01-30/' -i configure
# Need to build 4.6-versioned host utilities as well (lrelease/qrc/lupdate/...)
./configure -prefix $INSTALLPREFIX -confirm-license -release -opensource -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs
#
make $MAKEOPTS -C src/tools install # (rcc, uic, moc)
make $MAKEOPTS -C tools/linguist/lrelease install # (lrelease)
# install includes and pkgconfig files
for DIR in src/corelib src/gui src/testlib src/dbus src/network; do
(
cd $DIR
# extract module (QtCore/QtNetwork/...) from Makefile
MODULE=$(grep "QMAKE_TARGET *=" Makefile | cut -d = -f 2 | xargs)
# patch makefile so that not everything is build first
sed -i 's/first: all/first:/g' Makefile
make install_flat_headers install_class_headers install_targ_headers
# create and install pkgconfig descriptor
make ../../lib/pkgconfig/$MODULE.pc
sed -e "s,$QTBUILDDIR,$INSTALLPREFIX,g" ../../lib/pkgconfig/$MODULE.pc > $PKGCONFIGDIR/$MODULE.pc
# create links to existing Qt libraries
ln -sf /usr/lib/${ARCH}/lib${MODULE}.so.4 ${INSTALLPREFIX}/lib/lib${MODULE}.so
)
done
# Write our own configuration header, same as Ubuntu
# When we don't do this, the configuration will be without STL support (the QString from/to stdString methods)
QCONFIG=$INSTALLPREFIX/include/Qt/qconfig.h
echo '
/* Qt Edition */
#ifndef QT_EDITION
# define QT_EDITION QT_EDITION_OPENSOURCE
#endif
' > $QCONFIG
if [ "x$GBUILD_BITS" = "x32" ]; then
echo '
/* Machine byte-order */
#define Q_BIG_ENDIAN 4321
#define Q_LITTLE_ENDIAN 1234
#define QT_BUILD_KEY "i386 linux g++-4 full-config"
#define QT_BUILD_KEY_COMPAT "i686 Linux g++-4 full-config"
#ifdef QT_BOOTSTRAPPED
#define Q_BYTE_ORDER Q_LITTLE_ENDIAN
#else
#define Q_BYTE_ORDER Q_LITTLE_ENDIAN
#endif
/* Machine Architecture */
#ifndef QT_BOOTSTRAPPED
# define QT_ARCH_I386
#else
# define QT_ARCH_I386
#endif
/* Compile time features */
#define QT_LARGEFILE_SUPPORT 64
#define QT_POINTER_SIZE 4
' >> $QCONFIG
else
echo '
/* Machine byte-order */
#define Q_BIG_ENDIAN 4321
#define Q_LITTLE_ENDIAN 1234
#define QT_BUILD_KEY "x86_64 linux g++-4 full-config"
#define QT_BUILD_KEY_COMPAT "x86_64 Linux g++-4 full-config"
#ifdef QT_BOOTSTRAPPED
#define Q_BYTE_ORDER Q_LITTLE_ENDIAN
#else
#define Q_BYTE_ORDER Q_LITTLE_ENDIAN
#endif
/* Machine Architecture */
#ifndef QT_BOOTSTRAPPED
# define QT_ARCH_X86_64
#else
# define QT_ARCH_X86_64
#endif
/* Compile time features */
#define QT_LARGEFILE_SUPPORT 64
#define QT_POINTER_SIZE 8
' >> $QCONFIG
fi
echo '
#ifndef QT_BOOTSTRAPPED
#if defined(QT_NO_EGL) && defined(QT_EGL)
# undef QT_NO_EGL
#elif !defined(QT_NO_EGL) && !defined(QT_EGL)
# define QT_NO_EGL
#endif
#if defined(QT_NO_GSTREAMER) && defined(QT_GSTREAMER)
# undef QT_NO_GSTREAMER
#elif !defined(QT_NO_GSTREAMER) && !defined(QT_GSTREAMER)
# define QT_NO_GSTREAMER
#endif
#if defined(QT_NO_ICD) && defined(QT_ICD)
# undef QT_NO_ICD
#elif !defined(QT_NO_ICD) && !defined(QT_ICD)
# define QT_NO_ICD
#endif
#if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG)
# undef QT_NO_IMAGEFORMAT_JPEG
#elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG)
# define QT_NO_IMAGEFORMAT_JPEG
#endif
#if defined(QT_NO_IMAGEFORMAT_MNG) && defined(QT_IMAGEFORMAT_MNG)
# undef QT_NO_IMAGEFORMAT_MNG
#elif !defined(QT_NO_IMAGEFORMAT_MNG) && !defined(QT_IMAGEFORMAT_MNG)
# define QT_NO_IMAGEFORMAT_MNG
#endif
#if defined(QT_NO_IMAGEFORMAT_TIFF) && defined(QT_IMAGEFORMAT_TIFF)
# undef QT_NO_IMAGEFORMAT_TIFF
#elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF)
# define QT_NO_IMAGEFORMAT_TIFF
#endif
#if defined(QT_NO_MULTIMEDIA) && defined(QT_MULTIMEDIA)
# undef QT_NO_MULTIMEDIA
#elif !defined(QT_NO_MULTIMEDIA) && !defined(QT_MULTIMEDIA)
# define QT_NO_MULTIMEDIA
#endif
#if defined(QT_NO_OPENVG) && defined(QT_OPENVG)
# undef QT_NO_OPENVG
#elif !defined(QT_NO_OPENVG) && !defined(QT_OPENVG)
# define QT_NO_OPENVG
#endif
#if defined(QT_NO_PHONON) && defined(QT_PHONON)
# undef QT_NO_PHONON
#elif !defined(QT_NO_PHONON) && !defined(QT_PHONON)
# define QT_NO_PHONON
#endif
#if defined(QT_NO_PULSEAUDIO) && defined(QT_PULSEAUDIO)
# undef QT_NO_PULSEAUDIO
#elif !defined(QT_NO_PULSEAUDIO) && !defined(QT_PULSEAUDIO)
# define QT_NO_PULSEAUDIO
#endif
#if defined(QT_NO_S60) && defined(QT_S60)
# undef QT_NO_S60
#elif !defined(QT_NO_S60) && !defined(QT_S60)
# define QT_NO_S60
#endif
#if defined(QT_NO_STYLE_S60) && defined(QT_STYLE_S60)
# undef QT_NO_STYLE_S60
#elif !defined(QT_NO_STYLE_S60) && !defined(QT_STYLE_S60)
# define QT_NO_STYLE_S60
#endif
#if defined(QT_NO_SXE) && defined(QT_SXE)
# undef QT_NO_SXE
#elif !defined(QT_NO_SXE) && !defined(QT_SXE)
# define QT_NO_SXE
#endif
#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT)
# undef QT_NO_WEBKIT
#elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT)
# define QT_NO_WEBKIT
#endif
#if defined(QT_NO_ZLIB) && defined(QT_ZLIB)
# undef QT_NO_ZLIB
#elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB)
# define QT_NO_ZLIB
#endif
#if defined(QT_RUNTIME_XCURSOR) && defined(QT_NO_RUNTIME_XCURSOR)
# undef QT_RUNTIME_XCURSOR
#elif !defined(QT_RUNTIME_XCURSOR) && !defined(QT_NO_RUNTIME_XCURSOR)
# define QT_RUNTIME_XCURSOR
#endif
#if defined(QT_RUNTIME_XFIXES) && defined(QT_NO_RUNTIME_XFIXES)
# undef QT_RUNTIME_XFIXES
#elif !defined(QT_RUNTIME_XFIXES) && !defined(QT_NO_RUNTIME_XFIXES)
# define QT_RUNTIME_XFIXES
#endif
#if defined(QT_RUNTIME_XINERAMA) && defined(QT_NO_RUNTIME_XINERAMA)
# undef QT_RUNTIME_XINERAMA
#elif !defined(QT_RUNTIME_XINERAMA) && !defined(QT_NO_RUNTIME_XINERAMA)
# define QT_RUNTIME_XINERAMA
#endif
#if defined(QT_RUNTIME_XINPUT) && defined(QT_NO_RUNTIME_XINPUT)
# undef QT_RUNTIME_XINPUT
#elif !defined(QT_RUNTIME_XINPUT) && !defined(QT_NO_RUNTIME_XINPUT)
# define QT_RUNTIME_XINPUT
#endif
#if defined(QT_RUNTIME_XRANDR) && defined(QT_NO_RUNTIME_XRANDR)
# undef QT_RUNTIME_XRANDR
#elif !defined(QT_RUNTIME_XRANDR) && !defined(QT_NO_RUNTIME_XRANDR)
# define QT_RUNTIME_XRANDR
#endif
#if defined(QT_USE_MATH_H_FLOATS) && defined(QT_NO_USE_MATH_H_FLOATS)
# undef QT_USE_MATH_H_FLOATS
#elif !defined(QT_USE_MATH_H_FLOATS) && !defined(QT_NO_USE_MATH_H_FLOATS)
# define QT_USE_MATH_H_FLOATS
#endif
#endif // QT_BOOTSTRAPPED
#define QT_VISIBILITY_AVAILABLE
' >> $QCONFIG
cp $QCONFIG $INSTALLPREFIX/include/QtCore/qconfig.h
cd $INSTALLPREFIX
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
# Create a .tar.gz because .zip has problems with symbolic links
find | 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/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz

View File

@ -1,92 +0,0 @@
---
name: "qt"
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "zip"
- "unzip"
- "faketime"
- "libz-dev"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "qt-everywhere-opensource-src-5.2.0.tar.gz"
- "bitcoin-deps-win32-gitian-r13.zip"
- "bitcoin-deps-win64-gitian-r13.zip"
script: |
# Defines
export TZ=UTC
INDIR=$HOME/build
TEMPDIR=$HOME/tmp
# Qt: workaround for determinism in resource ordering
# Qt5's rcc uses a QHash to store the files for the resource.
# A security fix in QHash makes the ordering of keys to be different on every run
# (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
# This is good in general but qrc shouldn't be doing a traversal over a randomized container.
# The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
# For now luckily there is a test mode that forces a fixed seed.
export QT_RCC_TEST=1
# Integrity Check
echo "395ec72277c5786c65b8163ef5817fd03d0a1f524a6d47f53624baf8056f1081 qt-everywhere-opensource-src-5.2.0.tar.gz" | sha256sum -c
for BITS in 32 64; do # for architectures
#
INSTALLPREFIX=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
DEPSDIR=$HOME/deps${BITS}
if [ "x$BITS" = "x32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
fi
#
mkdir -p $INSTALLPREFIX $INSTALLPREFIX/host/bin $DEPSDIR $BUILDDIR
#
# Need mingw-compiled openssl from bitcoin-deps:
cd $DEPSDIR
unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
#
cd $BUILDDIR
#
tar xzf $INDIR/qt-everywhere-opensource-src-5.2.0.tar.gz
cd qt-everywhere-opensource-src-5.2.0
SPECNAME="win32-g++"
SPECFILE="qtbase/mkspecs/${SPECNAME}/qmake.conf"
sed 's/qt_instdate=`date +%Y-%m-%d`/qt_instdate=2011-01-30/' -i qtbase/configure
sed --posix "s|QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport|QMAKE_CFLAGS\t\t= -pipe -fno-keep-inline-dllexport -isystem /usr/$HOST/include/ -frandom-seed=qtbuild -I$DEPSDIR/include|" -i ${SPECFILE}
sed --posix "s|QMAKE_LFLAGS =|QMAKE_LFLAGS\t\t= -L$DEPSDIR/lib|" -i ${SPECFILE}
# Before we tried to pass arguments to ar (static linking) in using QMAKE_LIB, however
# qt removes the arguments for ar and provides a script which makes it impossible to pass the determinism flag -
# so rather than try to replace ar, post-process all libraries and plugins at the end.
#
# Don't load faketime while compiling Qt, qmake will get stuck in nearly infinite loops
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
#export FAKETIME=$REFERENCE_DATETIME
#
# Compile static libraries, and use statically linked openssl (-openssl-linked):
OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTALLPREFIX -bindir $INSTALLPREFIX/host/bin -confirm-license -release -opensource -static -xplatform $SPECNAME -device-option CROSS_COMPILE="$HOST-" -no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-odbc -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-opengl -no-compile-examples -no-feature-style-windowsce -no-feature-style-windowsmobile -no-qml-debug -openssl-linked -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc -system-libpng -system-zlib
make $MAKEOPTS install
# post-process all generated libraries and plugins to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $INSTALLPREFIX -name *.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd $INSTALLPREFIX
# Remove unused non-deterministic stuff
rm host/bin/qtpaths.exe lib/libQt5Bootstrap.a lib/libQt5Bootstrap.la
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
find -print0 | xargs -r0 touch # fix up timestamps before packaging
find | sort | zip -X@ $OUTDIR/qt-win${BITS}-5.2.0-gitian-r3.zip
unset LD_PRELOAD
unset FAKETIME
done # for BITS in

View File

@ -1,10 +1,9 @@
PACKAGE=qt46
$(package)_version=4.6.2
$(package)_version=4.6.4
$(package)_download_path=http://download.qt-project.org/archive/qt/4.6/
$(package)_file_name=qt-everywhere-opensource-src-$($(package)_version).tar.gz
$(package)_sha256_hash=176f51ddb06dce67ab4b2efc6b327dc21ed8f764c5d97acc15ff1f907c2affae
$(package)_dependencies=openssl
$(package)_linux_dependencies=freetype dbus libX11 xproto libXext libICE libSM
$(package)_sha256_hash=9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250
$(package)_dependencies=openssl freetype dbus libX11 xproto libXext libICE libSM
$(package)_patches=stlfix.patch
define $(package)_set_vars
@ -35,7 +34,7 @@ define $(package)_preprocess_cmds
sed -i.old "s|/usr/X11R6/lib64|$(host_prefix)/lib|" mkspecs/*/*.conf && \
sed -i.old "s|/usr/X11R6/lib|$(host_prefix)/lib|" mkspecs/*/*.conf && \
sed -i.old "s|/usr/X11R6/include|$(host_prefix)/include|" mkspecs/*/*.conf && \
sed -i.old "s|QMAKE_LFLAGS_SHLIB += -shared|QMAKE_LFLAGS_SHLIB += -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
sed -i.old "s|QMAKE_LFLAGS_SHLIB\t+= -shared|QMAKE_LFLAGS_SHLIB\t+= -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
sed -i.old "/SSLv2_client_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
sed -i.old "/SSLv2_server_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
patch -p1 < $($(package)_patch_dir)/stlfix.patch
@ -62,6 +61,6 @@ define $(package)_stage_cmds
endef
define $(package)_postprocess_cmds
rm -rf mkspecs/ lib/cmake/ && \
rm -rf mkspecs/ lib/cmake/ lib/*.prl lib/*.la && \
find native/bin -type f -exec mv {} {}-qt4 \;
endef