bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml

54 lines
1.6 KiB
YAML
Raw Normal View History

2014-11-21 21:26:45 -03:00
---
name: "bitcoin-dmg-signer"
2019-03-14 15:16:50 -03:00
distro: "ubuntu"
2014-11-21 21:26:45 -03:00
suites:
- "bionic"
2014-11-21 21:26:45 -03:00
architectures:
- "amd64"
2014-11-21 21:26:45 -03:00
packages:
- "faketime"
- "xorriso"
- "python3-pip"
remotes:
2016-04-29 18:17:18 -03:00
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
"dir": "signature"
- "url": "https://github.com/achow101/signapple.git"
"dir": "signapple"
"commit": "c7e73aa27a7615ac9506559173f787e2906b25eb"
2014-11-21 21:26:45 -03:00
files:
- "bitcoin-osx-unsigned.tar.gz"
2014-11-21 21:26:45 -03:00
script: |
2019-03-06 14:22:29 -03:00
set -e -o pipefail
2014-11-21 21:26:45 -03:00
WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR}
export PATH="$PWD":$PATH
FAKETIME_PROGS="dmg xorrisofs"
2014-11-21 21:26:45 -03:00
# Create global faketime wrappers
for prog in ${FAKETIME_PROGS}; do
2018-06-20 05:54:54 -04:00
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
2014-11-21 21:26:45 -03:00
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}
2014-11-21 21:26:45 -03:00
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
2014-11-21 21:26:45 -03:00
chmod +x ${WRAP_DIR}/${prog}
done
# Install signapple
cd signapple
python3 -m pip install -U pip setuptools
python3 -m pip install .
export PATH="$HOME/.local/bin":$PATH
cd ..
UNSIGNED_TARBALL=bitcoin-osx-unsigned.tar.gz
UNSIGNED_APP=dist/Bitcoin-Qt.app
SIGNED=bitcoin-osx-signed.dmg
2014-11-21 21:26:45 -03:00
tar -xf ${UNSIGNED_TARBALL}
OSX_VOLNAME="$(cat osx_volname)"
./detached-sig-apply.sh ${UNSIGNED_APP} signature/osx/dist
${WRAP_DIR}/xorrisofs -D -l -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -o uncompressed.dmg signed-app
2014-11-21 21:26:45 -03:00
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}