Changeset View
Changeset View
Standalone View
Standalone View
contrib/gitian/provisioner.sh
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
export LC_ALL=C | export LC_ALL=C | ||||
set -e | set -e | ||||
# User to setup for building. Vagrant is the default | # User to setup for building. Vagrant is the default | ||||
export BUILDUSER=${BUILDUSER:-vagrant} | export BUILDUSER=${BUILDUSER:-vagrant} | ||||
apt-get update | apt-get update | ||||
apt-get install -y git ruby sudo apt-cacher-ng qemu-utils debootstrap \ | apt-get install -y git ruby sudo apt-cacher-ng qemu-utils debootstrap \ | ||||
lxc python-cheetah parted kpartx bridge-utils make curl | lxc python-cheetah parted kpartx bridge-utils make curl | ||||
# the version of lxc-start in Debian needs to run as root, so make sure | # the version of lxc-start in Debian needs to run as root, so make sure | ||||
# that the build script can execute it without providing a password | # that the build script can execute it without providing a password | ||||
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc | echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc | ||||
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-execute" >> /etc/sudoers.d/gitian-lxc | echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-execute" >> /etc/sudoers.d/gitian-lxc | ||||
# make sure that USE_LXC is always set when logging in as vagrant, | # make sure that USE_LXC is always set when logging in as vagrant, | ||||
# and configure LXC IP addresses | # and configure LXC IP addresses | ||||
Show All 28 Lines | |||||
## Install Gitian | ## Install Gitian | ||||
git clone https://github.com/devrandom/gitian-builder.git | git clone https://github.com/devrandom/gitian-builder.git | ||||
cd gitian-builder | cd gitian-builder | ||||
git config --global user.email "vagrant@vagrant.com" | git config --global user.email "vagrant@vagrant.com" | ||||
git config --global user.name "vagrant" | git config --global user.name "vagrant" | ||||
chown -R ${BUILDUSER}:${BUILDUSER} /home/${BUILDUSER} | chown -R ${BUILDUSER}:${BUILDUSER} /home/${BUILDUSER} | ||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||||
echo "!!! Provisioning Complete !!!!" | echo "!!! Provisioning Complete !!!!" | ||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||||
echo | echo | ||||
echo "As the user ${BUILDUSER} run the following commands to produce a linux build:" | echo "As the user ${BUILDUSER} run the following commands to produce a linux build:" | ||||
echo "export COMMIT=v0.18.3" | echo "export COMMIT=v0.18.3" | ||||
echo "export URL=https://github.com/Bitcoin-ABC/bitcoin-abc.git" | echo "export URL=https://github.com/Bitcoin-ABC/bitcoin-abc.git" | ||||
echo "cd gitian-builder" | echo "cd gitian-builder" | ||||
echo "./bin/make-base-vm --lxc --distro debian --suite stretch --arch amd64" | echo "./bin/make-base-vm --lxc --distro debian --suite stretch --arch amd64" | ||||
echo "./bin/gbuild --commit bitcoin=\${COMMIT} --url bitcoin=\${URL} /vagrant/contrib/gitian-descriptors/gitian-linux.yml" | echo "./bin/gbuild --commit bitcoin=\${COMMIT} --url bitcoin=\${URL} /vagrant/contrib/gitian-descriptors/gitian-linux.yml" |