|
|
@ -17,7 +17,7 @@ osx=true |
|
|
|
SIGNER= |
|
|
|
SIGNER= |
|
|
|
VERSION= |
|
|
|
VERSION= |
|
|
|
commit=false |
|
|
|
commit=false |
|
|
|
url=https://github.com/bitcoin/bitcoin |
|
|
|
url=https://github.com/litecoin-project/litecoin |
|
|
|
proc=2 |
|
|
|
proc=2 |
|
|
|
mem=2000 |
|
|
|
mem=2000 |
|
|
|
lxc=true |
|
|
|
lxc=true |
|
|
@ -31,7 +31,7 @@ commitFiles=true |
|
|
|
read -d '' usage <<- EOF |
|
|
|
read -d '' usage <<- EOF |
|
|
|
Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version |
|
|
|
Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version |
|
|
|
|
|
|
|
|
|
|
|
Run this script from the directory containing the bitcoin, gitian-builder, gitian.sigs, and bitcoin-detached-sigs. |
|
|
|
Run this script from the directory containing the litecoin, gitian-builder, gitian.sigs.ltc, and litecoin-detached-sigs. |
|
|
|
|
|
|
|
|
|
|
|
Arguments: |
|
|
|
Arguments: |
|
|
|
signer GPG signer to sign each build assert file |
|
|
|
signer GPG signer to sign each build assert file |
|
|
@ -39,7 +39,7 @@ version Version number, commit, or branch to build. If building a commit or bra |
|
|
|
|
|
|
|
|
|
|
|
Options: |
|
|
|
Options: |
|
|
|
-c|--commit Indicate that the version argument is for a commit or branch |
|
|
|
-c|--commit Indicate that the version argument is for a commit or branch |
|
|
|
-u|--url Specify the URL of the repository. Default is https://github.com/bitcoin/bitcoin |
|
|
|
-u|--url Specify the URL of the repository. Default is https://github.com/litecoin-project/litecoin |
|
|
|
-v|--verify Verify the gitian build |
|
|
|
-v|--verify Verify the gitian build |
|
|
|
-b|--build Do a gitian build |
|
|
|
-b|--build Do a gitian build |
|
|
|
-s|--sign Make signed binaries for Windows and Mac OSX |
|
|
|
-s|--sign Make signed binaries for Windows and Mac OSX |
|
|
@ -232,8 +232,8 @@ echo ${COMMIT} |
|
|
|
if [[ $setup = true ]] |
|
|
|
if [[ $setup = true ]] |
|
|
|
then |
|
|
|
then |
|
|
|
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils |
|
|
|
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils |
|
|
|
git clone https://github.com/bitcoin-core/gitian.sigs.git |
|
|
|
git clone https://github.com/litecoin-project/gitian.sigs.ltc.git |
|
|
|
git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git |
|
|
|
git clone https://github.com/litecoin-project/litecoin-detached-sigs.git |
|
|
|
git clone https://github.com/devrandom/gitian-builder.git |
|
|
|
git clone https://github.com/devrandom/gitian-builder.git |
|
|
|
pushd ./gitian-builder |
|
|
|
pushd ./gitian-builder |
|
|
|
if [[ -n "$USE_LXC" ]] |
|
|
|
if [[ -n "$USE_LXC" ]] |
|
|
@ -247,7 +247,7 @@ then |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Set up build |
|
|
|
# Set up build |
|
|
|
pushd ./bitcoin |
|
|
|
pushd ./litecoin |
|
|
|
git fetch |
|
|
|
git fetch |
|
|
|
git checkout ${COMMIT} |
|
|
|
git checkout ${COMMIT} |
|
|
|
popd |
|
|
|
popd |
|
|
@ -256,7 +256,7 @@ popd |
|
|
|
if [[ $build = true ]] |
|
|
|
if [[ $build = true ]] |
|
|
|
then |
|
|
|
then |
|
|
|
# Make output folder |
|
|
|
# Make output folder |
|
|
|
mkdir -p ./bitcoin-binaries/${VERSION} |
|
|
|
mkdir -p ./litecoin-binaries/${VERSION} |
|
|
|
|
|
|
|
|
|
|
|
# Build Dependencies |
|
|
|
# Build Dependencies |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
@ -266,7 +266,7 @@ then |
|
|
|
mkdir -p inputs |
|
|
|
mkdir -p inputs |
|
|
|
wget -N -P inputs $osslPatchUrl |
|
|
|
wget -N -P inputs $osslPatchUrl |
|
|
|
wget -N -P inputs $osslTarUrl |
|
|
|
wget -N -P inputs $osslTarUrl |
|
|
|
make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common |
|
|
|
make -C ../litecoin/depends download SOURCES_PATH=`pwd`/cache/common |
|
|
|
|
|
|
|
|
|
|
|
# Linux |
|
|
|
# Linux |
|
|
|
if [[ $linux = true ]] |
|
|
|
if [[ $linux = true ]] |
|
|
@ -274,9 +274,9 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Compiling ${VERSION} Linux" |
|
|
|
echo "Compiling ${VERSION} Linux" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit litecoin=${COMMIT} --url litecoin=${url} ../litecoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION} |
|
|
|
mv build/out/litecoin-*.tar.gz build/out/src/litecoin-*.tar.gz ../litecoin-binaries/${VERSION} |
|
|
|
fi |
|
|
|
fi |
|
|
|
# Windows |
|
|
|
# Windows |
|
|
|
if [[ $windows = true ]] |
|
|
|
if [[ $windows = true ]] |
|
|
@ -284,10 +284,10 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Compiling ${VERSION} Windows" |
|
|
|
echo "Compiling ${VERSION} Windows" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit litecoin=${COMMIT} --url litecoin=${url} ../litecoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz |
|
|
|
mv build/out/litecoin-*-win-unsigned.tar.gz inputs/litecoin-win-unsigned.tar.gz |
|
|
|
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION} |
|
|
|
mv build/out/litecoin-*.zip build/out/litecoin-*.exe ../litecoin-binaries/${VERSION} |
|
|
|
fi |
|
|
|
fi |
|
|
|
# Mac OSX |
|
|
|
# Mac OSX |
|
|
|
if [[ $osx = true ]] |
|
|
|
if [[ $osx = true ]] |
|
|
@ -295,10 +295,10 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Compiling ${VERSION} Mac OSX" |
|
|
|
echo "Compiling ${VERSION} Mac OSX" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
./bin/gbuild -j ${proc} -m ${mem} --commit litecoin=${COMMIT} --url litecoin=${url} ../litecoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz |
|
|
|
mv build/out/litecoin-*-osx-unsigned.tar.gz inputs/litecoin-osx-unsigned.tar.gz |
|
|
|
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION} |
|
|
|
mv build/out/litecoin-*.tar.gz build/out/litecoin-*.dmg ../litecoin-binaries/${VERSION} |
|
|
|
fi |
|
|
|
fi |
|
|
|
popd |
|
|
|
popd |
|
|
|
|
|
|
|
|
|
|
@ -325,27 +325,27 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Verifying v${VERSION} Linux" |
|
|
|
echo "Verifying v${VERSION} Linux" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
./bin/gverify -v -d ../gitian.sigs.ltc/ -r ${VERSION}-linux ../litecoin/contrib/gitian-descriptors/gitian-linux.yml |
|
|
|
# Windows |
|
|
|
# Windows |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Verifying v${VERSION} Windows" |
|
|
|
echo "Verifying v${VERSION} Windows" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
./bin/gverify -v -d ../gitian.sigs.ltc/ -r ${VERSION}-win-unsigned ../litecoin/contrib/gitian-descriptors/gitian-win.yml |
|
|
|
# Mac OSX |
|
|
|
# Mac OSX |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Verifying v${VERSION} Mac OSX" |
|
|
|
echo "Verifying v${VERSION} Mac OSX" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
./bin/gverify -v -d ../gitian.sigs.ltc/ -r ${VERSION}-osx-unsigned ../litecoin/contrib/gitian-descriptors/gitian-osx.yml |
|
|
|
# Signed Windows |
|
|
|
# Signed Windows |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Verifying v${VERSION} Signed Windows" |
|
|
|
echo "Verifying v${VERSION} Signed Windows" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
./bin/gverify -v -d ../gitian.sigs.ltc/ -r ${VERSION}-osx-signed ../litecoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
# Signed Mac OSX |
|
|
|
# Signed Mac OSX |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Verifying v${VERSION} Signed Mac OSX" |
|
|
|
echo "Verifying v${VERSION} Signed Mac OSX" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
./bin/gverify -v -d ../gitian.sigs.ltc/ -r ${VERSION}-osx-signed ../litecoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
popd |
|
|
|
popd |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
@ -360,10 +360,10 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Signing ${VERSION} Windows" |
|
|
|
echo "Signing ${VERSION} Windows" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml |
|
|
|
./bin/gbuild -i --commit signature=${COMMIT} ../litecoin/contrib/gitian-descriptors/gitian-win-signer.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-win-signer.yml |
|
|
|
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION} |
|
|
|
mv build/out/litecoin-*win64-setup.exe ../litecoin-binaries/${VERSION} |
|
|
|
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION} |
|
|
|
mv build/out/litecoin-*win32-setup.exe ../litecoin-binaries/${VERSION} |
|
|
|
fi |
|
|
|
fi |
|
|
|
# Sign Mac OSX |
|
|
|
# Sign Mac OSX |
|
|
|
if [[ $osx = true ]] |
|
|
|
if [[ $osx = true ]] |
|
|
@ -371,9 +371,9 @@ then |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
echo "Signing ${VERSION} Mac OSX" |
|
|
|
echo "Signing ${VERSION} Mac OSX" |
|
|
|
echo "" |
|
|
|
echo "" |
|
|
|
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
./bin/gbuild -i --commit signature=${COMMIT} ../litecoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-osx-signer.yml |
|
|
|
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg |
|
|
|
mv build/out/litecoin-osx-signed.dmg ../litecoin-binaries/${VERSION}/litecoin-${VERSION}-osx.dmg |
|
|
|
fi |
|
|
|
fi |
|
|
|
popd |
|
|
|
popd |
|
|
|
|
|
|
|
|
|
|
|