2014-08-13 01:13:04 +02:00
|
|
|
---
|
2020-10-22 19:59:18 +02:00
|
|
|
name: "bitcoin-core-osx-22"
|
2014-08-13 01:13:04 +02:00
|
|
|
enable_cache: true
|
2019-03-14 19:16:50 +01:00
|
|
|
distro: "ubuntu"
|
2014-08-13 01:13:04 +02:00
|
|
|
suites:
|
2021-01-29 02:48:05 +01:00
|
|
|
- "focal"
|
2014-08-13 01:13:04 +02:00
|
|
|
architectures:
|
2019-11-14 23:10:23 +01:00
|
|
|
- "amd64"
|
2015-12-25 13:14:26 +01:00
|
|
|
packages:
|
2016-02-03 06:41:13 +01:00
|
|
|
- "ca-certificates"
|
2016-02-27 07:09:18 +01:00
|
|
|
- "curl"
|
2014-12-31 08:55:17 +01:00
|
|
|
- "g++"
|
2018-05-05 05:17:23 +02:00
|
|
|
- "git"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "pkg-config"
|
2015-10-29 07:29:48 +01:00
|
|
|
- "autoconf"
|
2015-12-17 21:40:05 +01:00
|
|
|
- "librsvg2-bin"
|
2015-12-10 22:49:27 +01:00
|
|
|
- "libtiff-tools"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
|
|
|
- "bsdmainutils"
|
|
|
|
- "cmake"
|
2015-12-10 22:49:27 +01:00
|
|
|
- "imagemagick"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "libz-dev"
|
2019-02-21 00:13:43 +01:00
|
|
|
- "python3"
|
|
|
|
- "python3-setuptools"
|
2015-12-10 22:49:27 +01:00
|
|
|
- "fonts-tuffy"
|
build: Replace genisoimage with xorriso
xorriso and its mkisofs/genisoimage emulation alter-ego xorrisofs are
more maintained, and has the right toggles for us to achieve output
determinism without using blunt tools like faketime.
In this commit, we use xorrisofs from the build environment rather than
building it ourselves using depends. This is not necessary and can be
changed in the future.
From https://wiki.debian.org/genisoimage?action=recall&rev=11 :
> The classical command line interface for production of ISO 9660
> filesystem images is the option set established by program mkisofs.
> For reasons of licensing and other problems with its author, Debian
> ships a fork of mkisofs, called genisoimage, which was split off in
> 2006 and then developed independently.
>
> Meanwhile, genisoimage gets no new features and not even bug fixes. It
> is first choice only if its options -udf or -hfs are needed.
>
> Replacement in most uses cases, especially for bootable ISO 9660
> filesystems, archiving, and backup, is xorrisofs which starts the -as
> mkisofs emulation mode of program xorriso.
2020-02-15 13:38:18 +01:00
|
|
|
- "xorriso"
|
2021-01-29 02:48:05 +01:00
|
|
|
- "libtinfo5"
|
2014-08-13 01:13:04 +02:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
|
|
|
files:
|
2020-06-16 20:20:19 +02:00
|
|
|
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz"
|
2014-08-13 01:13:04 +02:00
|
|
|
script: |
|
2019-03-06 18:22:29 +01:00
|
|
|
set -e -o pipefail
|
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
2020-11-18 14:38:21 +01:00
|
|
|
HOSTS="x86_64-apple-darwin18"
|
2021-02-08 14:38:26 +01:00
|
|
|
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary XORRISOFS=${WRAP_DIR}/xorrisofs DMG=${WRAP_DIR}/dmg"
|
2014-08-13 01:13:04 +02:00
|
|
|
FAKETIME_HOST_PROGS=""
|
build: Replace genisoimage with xorriso
xorriso and its mkisofs/genisoimage emulation alter-ego xorrisofs are
more maintained, and has the right toggles for us to achieve output
determinism without using blunt tools like faketime.
In this commit, we use xorrisofs from the build environment rather than
building it ourselves using depends. This is not necessary and can be
changed in the future.
From https://wiki.debian.org/genisoimage?action=recall&rev=11 :
> The classical command line interface for production of ISO 9660
> filesystem images is the option set established by program mkisofs.
> For reasons of licensing and other problems with its author, Debian
> ships a fork of mkisofs, called genisoimage, which was split off in
> 2006 and then developed independently.
>
> Meanwhile, genisoimage gets no new features and not even bug fixes. It
> is first choice only if its options -udf or -hfs are needed.
>
> Replacement in most uses cases, especially for bootable ISO 9660
> filesystems, archiving, and backup, is xorrisofs which starts the -as
> mkisofs emulation mode of program xorriso.
2020-02-15 13:38:18 +01:00
|
|
|
FAKETIME_PROGS="ar ranlib date dmg xorrisofs"
|
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 TZ="UTC"
|
2019-11-03 20:57:11 +01:00
|
|
|
export BUILD_DIR="$PWD"
|
2014-08-13 01:13:04 +02:00
|
|
|
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
|
|
|
|
|
2019-11-12 18:10:54 +01:00
|
|
|
# Use $LIB in LD_PRELOAD to avoid hardcoding the dir (See `man ld.so`)
|
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}
|
2019-11-08 01:54:52 +01:00
|
|
|
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
|
2016-04-05 13:29:04 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
2018-08-25 09:58:00 +02:00
|
|
|
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
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}
|
2019-11-08 01:54:52 +01:00
|
|
|
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
|
2016-04-05 13:29:04 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
2018-08-25 09:58:00 +02:00
|
|
|
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
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
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
cd bitcoin
|
2019-11-03 20:57:11 +01:00
|
|
|
BASEPREFIX="${PWD}/depends"
|
2014-08-13 01:13:04 +02:00
|
|
|
|
|
|
|
mkdir -p ${BASEPREFIX}/SDKs
|
2020-06-16 20:20:19 +02:00
|
|
|
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
|
2014-08-13 01:13:04 +02:00
|
|
|
|
|
|
|
# Build dependencies for each host
|
|
|
|
for i in $HOSTS; do
|
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
|
|
|
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
|
|
|
|
2020-04-22 19:00:42 +02:00
|
|
|
# Define DISTNAME variable.
|
|
|
|
# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME
|
|
|
|
source contrib/gitian-descriptors/assign_DISTNAME
|
|
|
|
|
|
|
|
GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz"
|
|
|
|
|
|
|
|
# Create the source tarball
|
|
|
|
mkdir -p "$(dirname "$GIT_ARCHIVE")"
|
2020-11-05 17:30:05 +01:00
|
|
|
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
|
2017-08-19 21:22:06 +02:00
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
ORIGPATH="$PATH"
|
2020-04-07 20:34:37 +02:00
|
|
|
# Extract the git archive into a dir for each host and build
|
2014-08-13 01:13:04 +02:00
|
|
|
for i in ${HOSTS}; do
|
|
|
|
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
|
|
|
mkdir -p distsrc-${i}
|
|
|
|
cd distsrc-${i}
|
2019-11-03 20:57:11 +01:00
|
|
|
INSTALLPATH="${PWD}/installed/${DISTNAME}"
|
2014-11-26 00:36:55 +01:00
|
|
|
mkdir -p ${INSTALLPATH}
|
2020-11-05 17:30:05 +01:00
|
|
|
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
|
2017-08-19 21:22:06 +02:00
|
|
|
|
2020-04-07 20:34:37 +02:00
|
|
|
./autogen.sh
|
2016-06-07 20:51:51 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
2014-08-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS}
|
2020-01-02 07:42:21 +01:00
|
|
|
make ${MAKEOPTS} -C src check-security
|
2020-01-03 12:34:58 +01:00
|
|
|
make ${MAKEOPTS} -C src check-symbols
|
2016-06-07 20:51:51 +02:00
|
|
|
make install-strip DESTDIR=${INSTALLPATH}
|
2014-11-22 01:26:45 +01:00
|
|
|
|
2015-12-10 22:49:27 +01:00
|
|
|
make osx_volname
|
2014-11-22 01:26:45 +01:00
|
|
|
make deploydir
|
|
|
|
mkdir -p unsigned-app-${i}
|
2015-12-10 22:49:27 +01:00
|
|
|
cp osx_volname unsigned-app-${i}/
|
2014-11-22 01:26:45 +01:00
|
|
|
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
|
|
|
|
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
|
build: Replace genisoimage with xorriso
xorriso and its mkisofs/genisoimage emulation alter-ego xorrisofs are
more maintained, and has the right toggles for us to achieve output
determinism without using blunt tools like faketime.
In this commit, we use xorrisofs from the build environment rather than
building it ourselves using depends. This is not necessary and can be
changed in the future.
From https://wiki.debian.org/genisoimage?action=recall&rev=11 :
> The classical command line interface for production of ISO 9660
> filesystem images is the option set established by program mkisofs.
> For reasons of licensing and other problems with its author, Debian
> ships a fork of mkisofs, called genisoimage, which was split off in
> 2006 and then developed independently.
>
> Meanwhile, genisoimage gets no new features and not even bug fixes. It
> is first choice only if its options -udf or -hfs are needed.
>
> Replacement in most uses cases, especially for bootable ISO 9660
> filesystems, archiving, and backup, is xorrisofs which starts the -as
> mkisofs emulation mode of program xorriso.
2020-02-15 13:38:18 +01:00
|
|
|
cp ${BASEPREFIX}/${i}/native/bin/dmg unsigned-app-${i}
|
2014-11-22 01:26:45 +01:00
|
|
|
mv dist unsigned-app-${i}
|
|
|
|
pushd unsigned-app-${i}
|
2019-06-10 21:05:12 +02:00
|
|
|
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
|
2014-11-22 01:26:45 +01:00
|
|
|
popd
|
|
|
|
|
2020-09-26 03:18:01 +02:00
|
|
|
make deploy OSX_DMG="${OUTDIR}/${DISTNAME}-osx-unsigned.dmg"
|
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
|
2019-06-10 21:05:12 +02:00
|
|
|
find ${DISTNAME} | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
2014-11-26 00:36:55 +01:00
|
|
|
cd ../../
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2020-03-12 10:34:43 +01:00
|
|
|
|
2014-11-26 00:36:55 +01:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
|