commit 2cf050b593ac68a25acc8fb4dbc79d75b6486c96 Author: Georg Koppen gk@torproject.org Date: Wed Jan 14 16:40:45 2015 +0000
Bug 10125: Add instructions and checks for Debian --- gitian/README.build | 2 +- gitian/check-prerequisites.sh | 55 +++++++++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/gitian/README.build b/gitian/README.build index b51fd96..4caf690 100644 --- a/gitian/README.build +++ b/gitian/README.build @@ -1,6 +1,6 @@ QuickStart:
- On an Ubuntu 12.04+ machine or VM, run: + On an Ubuntu 12.04+/Debian Wheezy+ machine or VM, run:
$ make
diff --git a/gitian/check-prerequisites.sh b/gitian/check-prerequisites.sh index 62167e9..c59ede0 100755 --- a/gitian/check-prerequisites.sh +++ b/gitian/check-prerequisites.sh @@ -6,18 +6,57 @@ if [ ! -f /etc/debian_version ]; then echo "Gitian is dependent upon the Ubuntu Virtualization Tools." echo - echo "You need to run Ubuntu 12.04 LTS or newer." + echo "You need to run Ubuntu 12.04 LTS/Debian Wheezy or newer." exit 1 fi
-dpkg -s ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm virt-what lxc lxctl fakeroot faketime zip unzip subversion torsocks tor 2>/dev/null >/dev/null +DISTRO=`cat /etc/issue | grep -Eo 'Ubuntu|Debian*'`
-if [ $? -ne 0 ]; then - echo "You are missing one or more Gitian build tool dependencies." - echo - echo "Please run:" - echo " sudo apt-get install torsocks tor" - echo " sudo torsocks apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm virt-what lxc lxctl fakeroot faketime zip unzip subversion" +if [ $DISTRO = "Ubuntu" ]; +then + dpkg -s ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm virt-what lxc lxctl fakeroot faketime zip unzip subversion torsocks tor 2>/dev/null >/dev/null + + if [ $? -ne 0 ]; + then + echo "You are missing one or more Gitian build tool dependencies." + echo + echo "Please run:" + echo " sudo apt-get install torsocks tor" + echo " sudo torsocks apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm virt-what lxc lxctl fakeroot faketime zip unzip subversion" + exit 1 + fi +elif [ $DISTRO = "Debian" ]; +then + dpkg -s ruby git apt-cacher-ng qemu-kvm virt-what lxc lxctl fakeroot zip unzip torsocks tor python-cheetah debootstrap parted kpartx rsync 2>/dev/null >/dev/null + + if [ $? -ne 0 ]; + then + echo "You are missing one or more Gitian build tool dependencies." + echo + echo "Please run" + echo " sudo apt-get install torsocks tor" + echo " sudo torsocks apt-get install ruby git apt-cacher-ng qemu-kvm virt-what lxc lxctl fakeroot zip unzip" + exit 1 + fi + + # python-vm-builder is special as we don't have a Debian package for it. + vmbuilder --help 2>/dev/null >/dev/null + if [ $? -ne 0 ]; + then + echo "The VM tool python-vm-builder is missing." + echo + echo "Please run" + echo 'torsocks wget -U "" http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12....' + echo 'echo "ec12e0070a007989561bfee5862c89a32c301992dd2771c4d5078ef1b3014f03 vm-builder_0.12.4+bzr489.orig.tar.gz" | sha256sum -c' + echo "# (verification -- must return OK)" + echo "tar -zxvf vm-builder_0.12.4+bzr489.orig.tar.gz" + echo "cd vm-builder-0.12.4+bzr489" + echo "sudo python setup.py install" + echo "cd .." + exit 1 + fi +else + echo "We need Debian or Ubuntu which seem to be missing. Aborting." exit 1 fi
tbb-commits@lists.torproject.org