@@ -4,8 +4,8 @@ Gitian building
4
4
* Setup instructions for a gitian build of Bitcoin using a Debian VM or physical system.*
5
5
6
6
Gitian is the deterministic build process that is used to build the Bitcoin
7
- Core executables [ 1 ] . It provides a way to be reasonably sure that the
8
- executables are really built from source on github . It also makes sure that
7
+ Core executables. It provides a way to be reasonably sure that the
8
+ executables are really built from source on GitHub . It also makes sure that
9
9
the same, tested dependencies are used and statically built into the executable.
10
10
11
11
Multiple developers build the source code by following a specific descriptor
@@ -17,9 +17,6 @@ More independent gitian builders are needed, which is why I wrote this
17
17
guide. It is preferred to follow these steps yourself instead of using someone else's
18
18
VM image to avoid 'contaminating' the build.
19
19
20
- [ 1] For all platforms except for MacOSX, at this point. Work for deterministic
21
- builds for Mac is under way here: https://github.com/theuni/osx-cross-depends .
22
-
23
20
Table of Contents
24
21
------------------
25
22
@@ -38,7 +35,7 @@ Preparing the Gitian builder host
38
35
---------------------------------
39
36
40
37
The first step is to prepare the host environment that will be used to perform the Gitian builds.
41
- In this guide it is explained how to set up the environment, and how to get the builds started .
38
+ This guide explains how to set up the environment, and how to start the builds.
42
39
43
40
Debian Linux was chosen as the host distribution because it has a lightweight install (in contrast to Ubuntu) and is readily available.
44
41
Any kind of virtualization can be used, for example:
@@ -134,7 +131,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
134
131
135
132
![ ] ( gitian-building/debian_install_5_configure_the_network.png )
136
133
137
- - Choose a root password and enter it twice (and remember it for later)
134
+ - Choose a root password and enter it twice (remember it for later)
138
135
139
136
![ ] ( gitian-building/debian_install_6a_set_up_root_password.png )
140
137
@@ -143,7 +140,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
143
140
![ ] ( gitian-building/debian_install_7_set_up_user_fullname.png )
144
141
![ ] ( gitian-building/debian_install_8_set_up_username.png )
145
142
146
- - Choose a user password and enter it twice (and remember it for later)
143
+ - Choose a user password and enter it twice (remember it for later)
147
144
148
145
![ ] ( gitian-building/debian_install_9_user_password.png )
149
146
@@ -236,7 +233,7 @@ adduser debian sudo
236
233
When you get a colorful screen with a question about the 'LXC directory', just
237
234
go with the default (` /var/lib/lxc ` ).
238
235
239
- Then set up LXC and the rest with the following is a complex jumble of settings and workarounds:
236
+ Then set up LXC and the rest with the following, which is a complex jumble of settings and workarounds:
240
237
241
238
``` bash
242
239
# the version of lxc-start in Debian 7.4 needs to run as root, so make sure
@@ -280,7 +277,7 @@ cd ..
280
277
281
278
** Note** : When sudo asks for a password, enter the password for the user * debian* not for * root* .
282
279
283
- Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you are willing to build.
280
+ Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you want to build.
284
281
285
282
``` bash
286
283
git clone https://github.com/devrandom/gitian-builder.git
@@ -319,10 +316,10 @@ you will find a list of `wget` commands that can be executed to get the dependen
319
316
320
317
I needed to add ` --no-check-certificate ` to the OpenSSL wget line to make it work.
321
318
Likely this is because the ca-certificates in Debian 7.4 is fairly old. This does not create a
322
- security issue as the gitian descriptors check integrity of the input archives and refuse to work
319
+ security issue as the gitian descriptors check the integrity of the input archives and refuse to work
323
320
if any one is corrupted.
324
321
325
- After downloading the archives, execute the ` gbuild ` commends to build the dependencies.
322
+ After downloading the archives, execute the ` gbuild ` commands to build the dependencies.
326
323
This can take a long time, but only has to be done when the dependencies change, for example
327
324
to upgrade the used version.
328
325
@@ -339,7 +336,7 @@ tail -f var/build.log
339
336
Building Bitcoin
340
337
----------------
341
338
342
- To build Bitcoin (for Linux and/or Windows) just follow the steps under 'perform
339
+ To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform
343
340
gitian builds' in [ doc/release-process.md] ( release-process.md ) in the bitcoin repository.
344
341
345
342
Output from ` gbuild ` will look something like
@@ -372,7 +369,7 @@ can be inspected in `var/install.log` and `var/build.log`.
372
369
Building an alternative repository
373
370
-----------------------------------
374
371
375
- If you want to do a test build of a pull on github it can be useful to point
372
+ If you want to do a test build of a pull on GitHub it can be useful to point
376
373
the gitian builder at an alternative repository, using the same descriptors
377
374
and inputs.
378
375
@@ -382,22 +379,24 @@ URL=https://github.com/laanwj/bitcoin.git
382
379
COMMIT=2014_03_windows_unicode_path
383
380
./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
384
381
./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
382
+ ./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
385
383
```
386
384
387
385
Signing externally
388
386
-------------------
389
387
390
- If you want to do the PGP signing on another device that's possible too ; just define ` SIGNER ` as mentioned
391
- and follow the steps in the build process as normally .
388
+ If you want to do the PGP signing on another device that's also possible ; just define ` SIGNER ` as mentioned
389
+ and follow the steps in the build process as normal .
392
390
393
391
gpg: skipped "laanwj": secret key not available
394
392
395
393
When you execute ` gsign ` you will get an error from GPG, which can be ignored. Copy the resulting ` .assert ` files
396
394
in ` gitian.sigs ` to your signing machine and do
397
395
398
396
``` bash
399
- gpg --detach-sign ${VERSION} /${SIGNER} /bitcoin-build.assert
397
+ gpg --detach-sign ${VERSION} -linux /${SIGNER} /bitcoin-build.assert
400
398
gpg --detach-sign ${VERSION} -win/${SIGNER} /bitcoin-build.assert
399
+ gpg --detach-sign ${VERSION} -osx/${SIGNER} /bitcoin-build.assert
401
400
```
402
401
403
402
This will create the ` .sig ` files that can be committed together with the ` .assert ` files to assert your
@@ -407,5 +406,5 @@ Uploading signatures
407
406
---------------------
408
407
409
408
After building and signing you can push your signatures (both the ` .assert ` and ` .assert.sig ` files) to the
410
- [ bitcoin/gitian.sigs] ( https://github.com/bitcoin/gitian.sigs/ ) repository, or if not possible create a pull
409
+ [ bitcoin/gitian.sigs] ( https://github.com/bitcoin/gitian.sigs/ ) repository, or if that's not possible create a pull
411
410
request. You can also mail the files to me (
[email protected] ) and I'll commit them.
0 commit comments