Browse Source

Litecoin: Update gitian descriptors

0.14
shaolinfry 8 years ago
parent
commit
468ec02b91
  1. 62
      contrib/gitian-build.sh
  2. 4
      contrib/gitian-descriptors/README.md
  3. 20
      contrib/gitian-descriptors/gitian-linux.yml
  4. 10
      contrib/gitian-descriptors/gitian-osx-signer.yml
  5. 12
      contrib/gitian-descriptors/gitian-osx.yml
  6. 8
      contrib/gitian-descriptors/gitian-win-signer.yml
  7. 14
      contrib/gitian-descriptors/gitian-win.yml

62
contrib/gitian-build.sh

@ -17,7 +17,7 @@ osx=true @@ -17,7 +17,7 @@ osx=true
SIGNER=
VERSION=
commit=false
url=https://github.com/bitcoin/bitcoin
url=https://github.com/litecoin-project/litecoin
proc=2
mem=2000
lxc=true
@ -31,7 +31,7 @@ commitFiles=true @@ -31,7 +31,7 @@ commitFiles=true
read -d '' usage <<- EOF
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:
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 @@ -39,7 +39,7 @@ version Version number, commit, or branch to build. If building a commit or bra
Options:
-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
-b|--build Do a gitian build
-s|--sign Make signed binaries for Windows and Mac OSX
@ -232,8 +232,8 @@ echo ${COMMIT} @@ -232,8 +232,8 @@ echo ${COMMIT}
if [[ $setup = true ]]
then
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/bitcoin-core/bitcoin-detached-sigs.git
git clone https://github.com/litecoin-project/gitian.sigs.ltc.git
git clone https://github.com/litecoin-project/litecoin-detached-sigs.git
git clone https://github.com/devrandom/gitian-builder.git
pushd ./gitian-builder
if [[ -n "$USE_LXC" ]]
@ -247,7 +247,7 @@ then @@ -247,7 +247,7 @@ then
fi
# Set up build
pushd ./bitcoin
pushd ./litecoin
git fetch
git checkout ${COMMIT}
popd
@ -256,7 +256,7 @@ popd @@ -256,7 +256,7 @@ popd
if [[ $build = true ]]
then
# Make output folder
mkdir -p ./bitcoin-binaries/${VERSION}
mkdir -p ./litecoin-binaries/${VERSION}
# Build Dependencies
echo ""
@ -266,7 +266,7 @@ then @@ -266,7 +266,7 @@ then
mkdir -p inputs
wget -N -P inputs $osslPatchUrl
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
if [[ $linux = true ]]
@ -274,9 +274,9 @@ then @@ -274,9 +274,9 @@ then
echo ""
echo "Compiling ${VERSION} Linux"
echo ""
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/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
mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION}
./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.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-linux.yml
mv build/out/litecoin-*.tar.gz build/out/src/litecoin-*.tar.gz ../litecoin-binaries/${VERSION}
fi
# Windows
if [[ $windows = true ]]
@ -284,10 +284,10 @@ then @@ -284,10 +284,10 @@ then
echo ""
echo "Compiling ${VERSION} Windows"
echo ""
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/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
mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION}
./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.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-win.yml
mv build/out/litecoin-*-win-unsigned.tar.gz inputs/litecoin-win-unsigned.tar.gz
mv build/out/litecoin-*.zip build/out/litecoin-*.exe ../litecoin-binaries/${VERSION}
fi
# Mac OSX
if [[ $osx = true ]]
@ -295,10 +295,10 @@ then @@ -295,10 +295,10 @@ then
echo ""
echo "Compiling ${VERSION} Mac OSX"
echo ""
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/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
mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION}
./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.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-osx.yml
mv build/out/litecoin-*-osx-unsigned.tar.gz inputs/litecoin-osx-unsigned.tar.gz
mv build/out/litecoin-*.tar.gz build/out/litecoin-*.dmg ../litecoin-binaries/${VERSION}
fi
popd
@ -325,27 +325,27 @@ then @@ -325,27 +325,27 @@ then
echo ""
echo "Verifying v${VERSION} Linux"
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
echo ""
echo "Verifying v${VERSION} Windows"
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
echo ""
echo "Verifying v${VERSION} Mac OSX"
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
echo ""
echo "Verifying v${VERSION} Signed Windows"
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
echo ""
echo "Verifying v${VERSION} Signed Mac OSX"
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
fi
@ -360,10 +360,10 @@ then @@ -360,10 +360,10 @@ then
echo ""
echo "Signing ${VERSION} Windows"
echo ""
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/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
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION}
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION}
./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.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-win-signer.yml
mv build/out/litecoin-*win64-setup.exe ../litecoin-binaries/${VERSION}
mv build/out/litecoin-*win32-setup.exe ../litecoin-binaries/${VERSION}
fi
# Sign Mac OSX
if [[ $osx = true ]]
@ -371,9 +371,9 @@ then @@ -371,9 +371,9 @@ then
echo ""
echo "Signing ${VERSION} Mac OSX"
echo ""
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/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
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg
./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.ltc/ ../litecoin/contrib/gitian-descriptors/gitian-osx-signer.yml
mv build/out/litecoin-osx-signed.dmg ../litecoin-binaries/${VERSION}/litecoin-${VERSION}-osx.dmg
fi
popd

4
contrib/gitian-descriptors/README.md

@ -19,7 +19,7 @@ Sanity checks: @@ -19,7 +19,7 @@ Sanity checks:
Once you've got the right hardware and software:
git clone git://github.com/bitcoin/bitcoin.git
git clone git://github.com/litecoin-project/litecoin.git
git clone git://github.com/devrandom/gitian-builder.git
mkdir gitian-builder/inputs
cd gitian-builder/inputs
@ -61,5 +61,5 @@ Here's a description of Gavin's setup on OSX 10.6: @@ -61,5 +61,5 @@ Here's a description of Gavin's setup on OSX 10.6:
5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above:
export USE_LXC=1
git clone git://github.com/bitcoin/bitcoin.git
git clone git://github.com/litecoin-project/litecoin.git
... etc

20
contrib/gitian-descriptors/gitian-linux.yml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
---
name: "bitcoin-linux-0.14"
name: "litecoin-linux-0.14"
enable_cache: true
suites:
- "trusty"
@ -28,8 +28,8 @@ packages: @@ -28,8 +28,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/litecoin-project/litecoin.git"
"dir": "litecoin"
files: []
script: |
@ -113,7 +113,7 @@ script: | @@ -113,7 +113,7 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
cd bitcoin
cd litecoin
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
@ -135,13 +135,13 @@ script: | @@ -135,13 +135,13 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo litecoin-*.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 --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find litecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
ORIGPATH="$PATH"
@ -173,8 +173,14 @@ script: | @@ -173,8 +173,14 @@ script: |
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
rm -rf ${DISTNAME}/lib/pkgconfig
# Litecoin: Delete libbitcoin from binary distribution for now, see #192
rm -rf ${DISTNAME}/lib/
rm -rf ${DISTNAME}/include/
# Litecoin: ends
find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
#find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \; # Litecoin: see issue 192
find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
cd ../../

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
---
name: "bitcoin-dmg-signer"
name: "litecoin-dmg-signer"
suites:
- "trusty"
architectures:
@ -7,10 +7,10 @@ architectures: @@ -7,10 +7,10 @@ architectures:
packages:
- "faketime"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
- "url": "https://github.com/litecoin-project/litecoin-detached-sigs.git"
"dir": "signature"
files:
- "bitcoin-osx-unsigned.tar.gz"
- "litecoin-osx-unsigned.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR}
@ -27,8 +27,8 @@ script: | @@ -27,8 +27,8 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
UNSIGNED=bitcoin-osx-unsigned.tar.gz
SIGNED=bitcoin-osx-signed.dmg
UNSIGNED=litecoin-osx-unsigned.tar.gz
SIGNED=litecoin-osx-signed.dmg
tar -xf ${UNSIGNED}
OSX_VOLNAME="$(cat osx_volname)"

12
contrib/gitian-descriptors/gitian-osx.yml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
---
name: "bitcoin-osx-0.14"
name: "litecoin-osx-0.14"
enable_cache: true
suites:
- "trusty"
@ -28,8 +28,8 @@ packages: @@ -28,8 +28,8 @@ packages:
- "python-setuptools"
- "fonts-tuffy"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/litecoin-project/litecoin.git"
"dir": "litecoin"
files:
- "MacOSX10.11.sdk.tar.gz"
script: |
@ -83,7 +83,7 @@ script: | @@ -83,7 +83,7 @@ script: |
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd bitcoin
cd litecoin
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
@ -104,14 +104,14 @@ script: | @@ -104,14 +104,14 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo litecoin-*.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 --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find litecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
ORIGPATH="$PATH"

8
contrib/gitian-descriptors/gitian-win-signer.yml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
---
name: "bitcoin-win-signer"
name: "litecoin-win-signer"
suites:
- "trusty"
architectures:
@ -8,12 +8,12 @@ packages: @@ -8,12 +8,12 @@ packages:
- "libssl-dev"
- "autoconf"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
- "url": "https://github.com/litecoin-project/litecoin-detached-sigs.git"
"dir": "signature"
files:
- "osslsigncode-1.7.1.tar.gz"
- "osslsigncode-Backports-to-1.7.1.patch"
- "bitcoin-win-unsigned.tar.gz"
- "litecoin-win-unsigned.tar.gz"
script: |
BUILD_DIR=`pwd`
SIGDIR=${BUILD_DIR}/signature/win
@ -23,7 +23,7 @@ script: | @@ -23,7 +23,7 @@ script: |
echo "a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 osslsigncode-Backports-to-1.7.1.patch" | sha256sum -c
mkdir -p ${UNSIGNED_DIR}
tar -C ${UNSIGNED_DIR} -xf bitcoin-win-unsigned.tar.gz
tar -C ${UNSIGNED_DIR} -xf litecoin-win-unsigned.tar.gz
tar xf osslsigncode-1.7.1.tar.gz
cd osslsigncode-1.7.1

14
contrib/gitian-descriptors/gitian-win.yml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
---
name: "bitcoin-win-0.14"
name: "litecoin-win-0.14"
enable_cache: true
suites:
- "trusty"
@ -22,8 +22,8 @@ packages: @@ -22,8 +22,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/litecoin-project/litecoin.git"
"dir": "litecoin"
files: []
script: |
WRAP_DIR=$HOME/wrapped
@ -101,7 +101,7 @@ script: | @@ -101,7 +101,7 @@ script: |
create_per-host_linker_wrapper "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd bitcoin
cd litecoin
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
@ -119,14 +119,14 @@ script: | @@ -119,14 +119,14 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo litecoin-*.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 --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find litecoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
mkdir -p $OUTDIR/src
cp ../$SOURCEDIST $OUTDIR/src
popd
@ -146,7 +146,7 @@ script: | @@ -146,7 +146,7 @@ script: |
make ${MAKEOPTS} -C src check-security
make deploy
make install DESTDIR=${INSTALLPATH}
cp -f bitcoin-*setup*.exe $OUTDIR/
cp -f litecoin-*setup*.exe $OUTDIR/
cd installed
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
find . -name "lib*.la" -delete

Loading…
Cancel
Save