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

added bionic builder host, others minor fixes #41

Closed
wants to merge 3 commits into from

Conversation

cisba
Copy link
Contributor

@cisba cisba commented Sep 23, 2018

- added document describing how to create an Ubuntu VirtualBox builder host
- added document describing how to setup Gitian on the builder host
- removed the initial make-base-vm of the Gitian image from the tail
  of Gitian setup document for Debian and Fedora, because it is already
  inside the gitian-build.py script
- minor improvements and fixes to the signing procedure

    - added document describing how to create an Ubuntu VirtualBox builder host
    - added document describing how to setup Gitian on the builder host
    - removed the initial make-base-vm of the Gitian image from the tail
      of Gitian setup document for Debian and Fedora, because it is already
      inside the gitian-build.py script
    - minor improvements and fixes to the signing procedure
```bash
cd gitian-builder
git checkout 686a00ad712e30ba3a7850c16ef32f650df5b5dc # This version seems to work better than master
bin/make-base-vm --lxc --arch amd64 --suite trusty
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed? The build script can only create a bionic image and when running without the build script, this step is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do this step here, the build script fails because the image is already present.

If you run without the build script, you find the step in gitian-building-manual.md.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, my aim was this: bitcoin/bitcoin#12511 (comment)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Thx.

Copy link
Contributor Author

@cisba cisba Sep 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this moment I'm building 0.16.3 and I noted that:
tag 0.17.x has the script gitian-build.py with bionic;
tag 0.15.x and 0.16.x have the script gitian-build.sh with trusty.
The base vm suite choice, from 0.15.0 is delegated to the script version released in each tag.
Before 0.15.0 there is no script: the manual setup of the base vm is required.

To setup gitian from 0.15.0 to 0.16.x it is necessary to checkout the specific gitian-build.sh of the tag, or to setup gitian running the make-base-vm manually.
So removing the step "make-base-vm" works fine only for gitian setup of 0.17.x.

A different approach could be to enable gitian-build.py to extract "suite"
contrib/gitian-descriptors/gitian-*.yml
then "make-base-vm" with that "suite" value.

BTW, if the base vm is already present, should the script use it or delete it and make a new one?

Copy link
Contributor Author

@cisba cisba Sep 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand just now...
Leaving the manual step to make-base-vm trusty is a trick to have the gitian setup for older tags.
Instead the gitian-build.py is in charge of executing make-base-vm bionic for 0.17.x and later.
:)
I will fix it asap.

    - restored the last section “Setting up the Gitian image” in files gitian-building-setup-gitian-*.md with explanation that is necessary to build bitcoin 0.16.x and earlier
    - added a line to disable the lxcbr0 bridge (enabled by default in recent package) in conflict with the br0 in rc.local
@cisba
Copy link
Contributor Author

cisba commented Sep 26, 2018

@MarcoFalke I found the lxc bridge issue not very easy to solve, probably it is blocking for newcomers. Do you think it is better to put it in a dedicated PR to merge quickly?

@maflcko
Copy link

maflcko commented Sep 26, 2018

What is the version that enables this bridge?

@cisba
Copy link
Contributor Author

cisba commented Sep 26, 2018

What is the version that enables this bridge?

gitianuser@ubuntu:~$ dpkg-query -W lxc
lxc	3.0.1-0ubuntu1~18.04.2

@cisba
Copy link
Contributor Author

cisba commented Sep 26, 2018

Here the lxc-net service script that uses those defaults:

root@groucho:~# dpkg-query -S /usr/lib/x86_64-linux-gnu/lxc/lxc-net
lxc-utils: /usr/lib/x86_64-linux-gnu/lxc/lxc-net

@cisba
Copy link
Contributor Author

cisba commented Sep 29, 2018

./contrib/gitian-build.py line 49:
subprocess.check_call(['sudo', 'sed', '-i', 's/lxcbr0/br0/', '/etc/default/lxc-net'])

Similar workaround already present for the same issue.

@karelbilek
Copy link

I want to add some PRs on my own that edit this file.

I also wanted to fix up some issues with the LXC building, however, it works on Ubuntu (since unlike Debian it doesn't have ancient versions)

Do you plan to merge this and switch from Debian to Ubuntu?

@maflcko
Copy link

maflcko commented Dec 22, 2018

Sorry, needs rebase

@cisba
Copy link
Contributor Author

cisba commented Feb 16, 2019

Sorry, needs rebase

Done

@fanquake
Copy link
Member

fanquake commented Jan 6, 2022

Closing, now that we have migrated away from using gitian.

@fanquake fanquake closed this Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants