diff --git a/contrib/gitian/Vagrantfile b/contrib/gitian/Vagrantfile deleted file mode 100644 --- a/contrib/gitian/Vagrantfile +++ /dev/null @@ -1,26 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - - # This needs to be the same as the current Gitian linux build target for lxc - # or someone needs to fix Gitian to correctly handle building on a different - # distribution than the lxc container has. - config.vm.box = "abc-xenial" - - config.vm.synced_folder '.', '/vagrant', disabled: true - config.vm.synced_folder '../..', '/vagrant' - - config.vm.provider "virtualbox" do |vb| - # Uncomment to display the VirtualBox GUI when booting the machine - # This may be useful for debugging. - #vb.gui = true - - # Customize the amount of memory on the VM: - vb.memory = "12288" - vb.cpus = 4 - end - - # Provision with the associated shell script - config.vm.provision "shell", path: "provisioner.sh" -end diff --git a/contrib/gitian/provisioner.sh b/contrib/gitian/provisioner.sh deleted file mode 100644 --- a/contrib/gitian/provisioner.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -export LC_ALL=C - -set -e - -# User to setup for building. Vagrant is the default -export BUILDUSER=${BUILDUSER:-vagrant} - -apt-get update -apt-get install -y git ruby sudo apt-cacher-ng qemu-utils debootstrap \ - lxc python-cheetah parted kpartx bridge-utils make curl - -# 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 -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 - -# make sure that USE_LXC is always set when logging in as vagrant, -# and configure LXC IP addresses -{ - echo 'export USE_LXC=1' - echo 'export LXC_BRIDGE=lxcbr0' - echo 'export GITIAN_HOST_IP=10.0.3.1' - echo 'export LXC_GUEST_IP=10.0.3.5' -} >> /home/${BUILDUSER}/.profile - -# Setup bridge -echo 'USE_LXC_BRIDGE="true"' > /etc/default/lxc-net -{ - echo 'lxc.network.type = veth' - echo 'lxc.network.link = lxcbr0' - echo 'lxc.network.flags = up' - echo 'lxc.network.hwaddr = 00:16:3e:xx:xx:xx' -} > /etc/lxc/default.conf -service lxc-net restart - -# chdir into build user home directory -cd /home/${BUILDUSER}/ - -## Install vm-builder -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 config --global user.email "vagrant@vagrant.com" -git config --global user.name "vagrant" - -chown -R ${BUILDUSER}:${BUILDUSER} /home/${BUILDUSER} - -echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" -echo "!!! Provisioning Complete !!!!" -echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" -echo -echo "As the user ${BUILDUSER} run the following commands to produce a linux build:" -echo "export COMMIT=v0.18.3" -echo "export URL=https://github.com/Bitcoin-ABC/bitcoin-abc.git" -echo "cd contrib/gitian-builder" -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" diff --git a/doc/gitian-building.md b/doc/gitian-building.md --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -17,17 +17,6 @@ It is preferred you follow these steps yourself instead of using someone else's VM image to avoid 'contaminating' the build. -Table of Contents ------------------ - -- [Preparing the Gitian builder host](#preparing-the-gitian-builder-host) -- [Getting and building the inputs](#getting-and-building-the-inputs) -- [Building Bitcoin Core](#building-bitcoin-core) -- [Building an alternative repository](#building-an-alternative-repository) -- [Signing externally](#signing-externally) -- [Uploading signatures](#uploading-signatures) - - Preparing the Gitian builder host --------------------------------- @@ -38,8 +27,6 @@ If your machine is already running one of those operating systems, you can perform Gitian builds on the actual hardware. Alternatively, you can install one of the supported operating systems in a virtual machine. -You can create the virtual machine using [vagrant](./gitian-building/gitian-building-vagrant.md) or chose to setup the VM manually. - Any kind of virtualization can be used, for example: - [VirtualBox](https://www.virtualbox.org/) (covered by this guide) - [KVM](http://www.linux-kvm.org/page/Main_Page) diff --git a/doc/gitian-building/gitian-building-vagrant.md b/doc/gitian-building/gitian-building-vagrant.md deleted file mode 100644 --- a/doc/gitian-building/gitian-building-vagrant.md +++ /dev/null @@ -1,68 +0,0 @@ -Table of Contents ------------------ - -- [Preparing the Gitian builder host](#preparing-the-gitian-builder-host) -- [Setting up the Gitian image](#setting-up-the-gitian-image) - - -Preparing the Gitian builder host ---------------------------------- - -The first step is to prepare the host environment that will be used to perform -the Gitian builds. This guide explains how to set up the environment, and how -to start the builds. - -Requirements: - - A machine with at least 64b of disk space - - 16GB of RAM - - Several installed tools: - - [Vagrant](https://www.vagrantup.com) - - [Packer](https://www.packer.io) - - [Virtualbox](https://www.virtualbox.org) - -After you have installed each of these tools, you will need to create an -ubuntu xenial vagrant "box." This is most easily done using the [box-cutter -project](https://github.com/boxcutter/ubuntu). (Note: Canonical provides a -vagrant box, however its disk space is insufficient for this guide.) - -```bash -pushd -cd /tmp/ -git clone https://github.com/boxcutter/ubuntu.git -cd ubuntu -git checkout 7d1820c186d76122445c092bc2b872a8a94166ce -packer build -var-file=ubuntu1604.json -only=virtualbox-iso ubuntu.json -vagrant box add --name abc-xenial box/virtualbox/ubuntu1604-0.1.0.box -popd -``` - -After completion you should be able to run add the box to vagrant as "abc-xenial" -using `vagrant box add --name abc-xenial ` - -The final step for running vagrant is: - -```bash -cd contrib/gitian/ -vagrant up -vagrant ssh -``` - -This should drop you into a Xenial prompt as the user `vagrant`. - -Setting up the Gitian image ---------------------------- - -Gitian needs a virtual image of the operating system to build in. Currently -this is Debian Buster x86_64. This image will be copied and used every time -that a build is started to make sure that the build is deterministic. Creating -the image will take a while, but only has to be done once. - -Execute the following as user `vagrant`: - -```bash -cd bitcoin-abc/contrib/gitian-builder -./bin/make-base-vm --lxc --distro debian --suite buster --arch amd64 -``` - -There will be a lot of warnings printed during the build of the image. These -can be ignored.