Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit fa5909c

Browse files
author
MarcoFalke
committed
fedora: Use docker instead of lxc
1 parent 9ebd3ed commit fa5909c

File tree

1 file changed

+10
-41
lines changed

1 file changed

+10
-41
lines changed

gitian-building/gitian-building-setup-gitian-fedora.md

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,20 @@ We assume that a user `gitianuser` was previously created and added to the `whee
1515
First we need to set up dependencies. Type/paste the following in the terminal:
1616

1717
```bash
18-
sudo dnf install git python ruby apt-cacher-ng qemu dpkg debootstrap python-cheetah gnupg tar rsync wget curl lxc libvirt
18+
sudo dnf install git ruby gnupg docker tar rsync wget curl
1919
```
2020

21-
Then set up LXC and the rest with the following, which is a complex jumble of settings and workarounds:
21+
Then set up docker and the rest with the following, which is a complex jumble of settings and workarounds:
2222

2323
```bash
2424
sudo -s
25-
# Enable the apt-cacher-ng service
26-
systemctl enable apt-cacher-ng.service
27-
# the version of lxc-start in Fedora needs to run as root, so make sure
25+
systemctl enable docker.service
26+
# the version of docker in Fedora needs to run as root, so make sure
2827
# that the build script can execute it without providing a password
29-
echo "%wheel ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc
30-
echo "%wheel ALL=NOPASSWD: /usr/bin/lxc-execute" >> /etc/sudoers.d/gitian-lxc
31-
# make /etc/rc.d/rc.local script that sets up bridge between guest and host
32-
echo '#!/bin/sh -e' > /etc/rc.d/rc.local
33-
echo 'brctl addbr br0' >> /etc/rc.d/rc.local
34-
echo 'ip addr add 10.0.3.1/24 broadcast 10.0.3.255 dev br0' >> /etc/rc.d/rc.local
35-
echo 'ip link set br0 up' >> /etc/rc.d/rc.local
36-
echo 'firewall-cmd --zone=trusted --add-interface=br0' >> /etc/rc.d/rc.local
37-
echo 'exit 0' >> /etc/rc.d/rc.local
38-
# mark executable so that the rc.local-service unit gets pulled automatically
39-
# into multi-user.target
40-
chmod +x /etc/rc.d/rc.local
41-
# make sure that USE_LXC is always set when logging in as gitianuser,
42-
# and configure LXC IP addresses
43-
echo 'export USE_LXC=1' >> /home/gitianuser/.bash_profile
44-
echo 'export GITIAN_HOST_IP=10.0.3.1' >> /home/gitianuser/.bash_profile
45-
echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/gitianuser/.bash_profile
28+
# https://docs.docker.com/install/linux/linux-postinstall/
29+
groupadd docker
30+
usermod -aG docker gitianuser
31+
echo 'export USE_DOCKER=1' >> /home/gitianuser/.bash_profile
4632
reboot
4733
```
4834

@@ -57,20 +43,6 @@ Installing Gitian
5743
Login as the user `gitianuser` that was created during installation.
5844
The rest of the steps in this guide will be performed as that user.
5945

60-
There is no `python-vm-builder` package in Fedora, so we need to install it from source ourselves,
61-
62-
```bash
63-
wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12.4+bzr494.orig.tar.gz
64-
echo "76cbf8c52c391160b2641e7120dbade5afded713afaa6032f733a261f13e6a8e vm-builder_0.12.4+bzr494.orig.tar.gz" | sha256sum -c
65-
# (verification -- must return OK)
66-
tar -zxvf vm-builder_0.12.4+bzr494.orig.tar.gz
67-
cd vm-builder-0.12.4+bzr494
68-
sudo python setup.py install
69-
cd ..
70-
```
71-
72-
**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.
73-
7446
Clone the git repositories for bitcoin and Gitian.
7547

7648
```bash
@@ -94,11 +66,8 @@ Execute the following as user `gitianuser`:
9466

9567
```bash
9668
cd gitian-builder
97-
git checkout faa2dc2c2cc560bc0219db870490d88404f71370 # This version seems to work better than master
98-
bin/make-base-vm --lxc --arch amd64 --suite bionic # For releases after and including 0.17.0
99-
bin/make-base-vm --lxc --arch amd64 --suite trusty # For releases before 0.17.0
69+
bin/make-base-vm --docker --arch amd64 --suite bionic # For releases after and including 0.17.0
70+
bin/make-base-vm --docker --arch amd64 --suite trusty # For releases before 0.17.0
10071
```
10172

102-
There will be a lot of warnings printed during the build of the image. These can be ignored.
103-
10473
**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.

0 commit comments

Comments
 (0)