Skip to content

Instantly share code, notes, and snippets.

@fed-franz
Last active January 18, 2023 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fed-franz/f825afc427d5d6bdb5e364544ffeea07 to your computer and use it in GitHub Desktop.
Save fed-franz/f825afc427d5d6bdb5e364544ffeea07 to your computer and use it in GitHub Desktop.
Bitcoin Core - Gitian Build on Fedora (Part 2)
#Instructions taken from: https://github.com/bitcoin-core/docs/blob/master/gitian-building/gitian-building-setup-gitian-fedora.md
#Create a directory for the building process
su gitianuser
cd /home/gitian/
mkdir bitcoin-core
cd bitcoin-core
#Installing Gitian
wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12.4+bzr494.orig.tar.gz
echo "76cbf8c52c391160b2641e7120dbade5afded713afaa6032f733a261f13e6a8e vm-builder_0.12.4+bzr494.orig.tar.gz" | sha256sum -c
# (verification -- must return OK)
tar -zxvf vm-builder_0.12.4+bzr494.orig.tar.gz
cd vm-builder-0.12.4+bzr494
sudo python setup.py install
cd ..
git clone https://github.com/devrandom/gitian-builder.git
git clone https://github.com/bitcoin/bitcoin
git clone https://github.com/bitcoin-core/gitian.sigs.git
git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
#Setting up the Gitian image
cd gitian-builder
git checkout 686a00ad712e30ba3a7850c16ef32f650df5b5dc # This version seems to work better than master
bin/make-base-vm --lxc --arch amd64 --suite trusty #If this fails, run it as sudo; if /tmp is nodev/noexec: sudo mount -o remount,exec,dev /tmp
#The following instructions are taken from: https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md
pushd ./bitcoin
export SIGNER=ffranz
export VERSION=0.15.0.1
git fetch
git checkout v${VERSION}
popd
pushd ./gitian.sigs
git pull
popd
pushd ./gitian-builder
git pull
popd
pushd ./gitian-builder
mkdir -p inputs
wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
popd
#Seed the Gitian sources cache (Optional)
pushd ./gitian-builder
make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
popd
#Build (for Linux)
pushd ./gitian-builder
./bin/gbuild --num-make 2 --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
./bin/gsign --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 ../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment