Changeset View
Changeset View
Standalone View
Standalone View
doc/gitian-building/gitian-building-manual.md
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
plain archive.ubuntu.com: us.archive.ubuntu.com works. | plain archive.ubuntu.com: us.archive.ubuntu.com works. | ||||
So, if you use LXC: | So, if you use LXC: | ||||
```bash | ```bash | ||||
export PATH="$PATH":${HOME}/gitian-builder/libexec | export PATH="$PATH":${HOME}/gitian-builder/libexec | ||||
export USE_LXC=1 | export USE_LXC=1 | ||||
cd ~/gitian-builder | cd ~/gitian-builder | ||||
./libexec/make-clean-vm --suite stretch --arch amd64 | ./libexec/make-clean-vm --suite buster --arch amd64 | ||||
LXC_ARCH=amd64 LXC_SUITE=stretch on-target -u root dpkg --add-architecture i386 | LXC_ARCH=amd64 LXC_SUITE=buster on-target -u root dpkg --add-architecture i386 | ||||
LXC_ARCH=amd64 LXC_SUITE=stretch on-target -u root apt-get update | LXC_ARCH=amd64 LXC_SUITE=buster on-target -u root apt-get update | ||||
LXC_ARCH=amd64 LXC_SUITE=stretch on-target -u root \ | LXC_ARCH=amd64 LXC_SUITE=buster on-target -u root \ | ||||
-e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \ | -e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \ | ||||
$( sed -ne '/^packages:/,/^[^-]/ {/^- .*/{s/"//g;s/- //;p}}' ../bitcoin-abc/contrib/gitian-descriptors/*|sort|uniq ) | $( sed -ne '/^packages:/,/^[^-]/ {/^- .*/{s/"//g;s/- //;p}}' ../bitcoin-abc/contrib/gitian-descriptors/*|sort|uniq ) | ||||
LXC_ARCH=amd64 LXC_SUITE=stretch on-target -u root apt-get -q -y purge grub | LXC_ARCH=amd64 LXC_SUITE=buster on-target -u root apt-get -q -y purge grub | ||||
LXC_ARCH=amd64 LXC_SUITE=stretch on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | LXC_ARCH=amd64 LXC_SUITE=buster on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | ||||
``` | ``` | ||||
And then set offline mode for apt-cacher-ng: | And then set offline mode for apt-cacher-ng: | ||||
``` | ``` | ||||
/etc/apt-cacher-ng/acng.conf | /etc/apt-cacher-ng/acng.conf | ||||
[...] | [...] | ||||
Offlinemode: 1 | Offlinemode: 1 | ||||
[...] | [...] | ||||
sudo service apt-cacher-ng restart | sudo service apt-cacher-ng restart | ||||
``` | ``` | ||||
Then when building, override the remote URLs that gbuild would otherwise pull from the Gitian descriptors:: | Then when building, override the remote URLs that gbuild would otherwise pull from the Gitian descriptors:: | ||||
```bash | ```bash | ||||
cd ~ | cd ~ | ||||
BTCPATH=${HOME}/bitcoin-abc | export URL=${HOME}/bitcoin-abc | ||||
COMMIT=<commmit hash or tag> | export COMMIT=<commmit hash or tag> | ||||
./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${BTCPATH} ${BTCPATH}/contrib/gitian-descriptors/gitian-win-signer.yml | ./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ${URL}/contrib/gitian-descriptors/gitian-win.yml | ||||
``` | ``` |