Skip to content

Commit 5a79c65

Browse files
committed
Update doc/gitian-building.md for new gitian
The patch to make it possible to configure the LXC IPs has been merged upstream. This means that it is no longer needed to patch gitian. Remove that workaround.
1 parent 31853a1 commit 5a79c65

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

doc/gitian-building.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ In this section we will be setting up the Debian installation for Gitian buildin
227227
First we need to log in as `root` to set up dependencies and make sure that our
228228
user can use the sudo command. Type/paste the following in the terminal:
229229

230-
231230
```bash
232231
apt-get install git ruby sudo apt-cacher-ng qemu-utils debootstrap lxc python-cheetah parted kpartx bridge-utils
233232
adduser debian sudo
@@ -249,15 +248,16 @@ echo '#!/bin/sh -e' > /etc/rc.local
249248
echo 'brctl addbr br0' >> /etc/rc.local
250249
echo 'ifconfig br0 10.0.3.2/24 up' >> /etc/rc.local
251250
echo 'exit 0' >> /etc/rc.local
252-
# make sure that USE_LXC is always set when logging in as debian
251+
# make sure that USE_LXC is always set when logging in as debian,
252+
# and configure LXC IP addresses
253253
echo 'export USE_LXC=1' >> /home/debian/.profile
254+
echo 'export GITIAN_HOST_IP=10.0.3.2' >> /home/debian/.profile
255+
echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/debian/.profile
254256
reboot
255257
```
256258

257-
At the end the VM is rebooted to make sure that the changes take effect.
258-
259-
**Note**: If you're following this guide on a physical system instead of a VirtualBox VM you could use `10.0.2.2` instead
260-
of `10.0.3.2` in the above `ifconfig` line. This avoids having to patch gitian-builder in next section.
259+
At the end the VM is rebooted to make sure that the changes take effect. The steps in this
260+
section need only to be performed once.
261261

262262
Installing gitian
263263
------------------
@@ -286,20 +286,6 @@ git clone https://github.com/devrandom/gitian-builder.git
286286
git clone https://github.com/bitcoin/bitcoin
287287
```
288288

289-
We need to change the guest IP range for the gitian builder because otherwise it will
290-
collide with VirtualBox its NAT IP range. Gitian does not have a way yet to configure
291-
this, so we need to patch the IPs using `sed`. This is not nice but it will
292-
have to do for now... (a [pull request
293-
(#52)](https://github.com/devrandom/gitian-builder/pull/52) to make this
294-
configurable without patching has been submitted):
295-
296-
```bash
297-
sed -i 's/10.0.2.2/10.0.3.2/g' gitian-builder/target-bin/bootstrap-fixup
298-
sed -i 's/10.0.2.5/10.0.3.5/g' gitian-builder/etc/lxc.config.in
299-
```
300-
301-
*note* After you update the gitian-builder repository, you may need to repeat these manual changes.
302-
303289
Setting up gitian images
304290
-------------------------
305291

0 commit comments

Comments
 (0)