Skip to content

Commit 29264a0

Browse files
committed
Merge pull request #4455
3f7a61f Update Gitian Build guide to include OSX (Michael Ford)
2 parents a793fca + 3f7a61f commit 29264a0

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

doc/gitian-building.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Gitian building
44
*Setup instructions for a gitian build of Bitcoin using a Debian VM or physical system.*
55

66
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
99
the same, tested dependencies are used and statically built into the executable.
1010

1111
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
1717
guide. It is preferred to follow these steps yourself instead of using someone else's
1818
VM image to avoid 'contaminating' the build.
1919

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-
2320
Table of Contents
2421
------------------
2522

@@ -38,7 +35,7 @@ Preparing the Gitian builder host
3835
---------------------------------
3936

4037
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.
4239

4340
Debian Linux was chosen as the host distribution because it has a lightweight install (in contrast to Ubuntu) and is readily available.
4441
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`.
134131

135132
![](gitian-building/debian_install_5_configure_the_network.png)
136133

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)
138135

139136
![](gitian-building/debian_install_6a_set_up_root_password.png)
140137

@@ -143,7 +140,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
143140
![](gitian-building/debian_install_7_set_up_user_fullname.png)
144141
![](gitian-building/debian_install_8_set_up_username.png)
145142

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)
147144

148145
![](gitian-building/debian_install_9_user_password.png)
149146

@@ -236,7 +233,7 @@ adduser debian sudo
236233
When you get a colorful screen with a question about the 'LXC directory', just
237234
go with the default (`/var/lib/lxc`).
238235

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:
240237

241238
```bash
242239
# the version of lxc-start in Debian 7.4 needs to run as root, so make sure
@@ -280,7 +277,7 @@ cd ..
280277

281278
**Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
282279

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.
284281

285282
```bash
286283
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
319316

320317
I needed to add `--no-check-certificate` to the OpenSSL wget line to make it work.
321318
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
323320
if any one is corrupted.
324321

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.
326323
This can take a long time, but only has to be done when the dependencies change, for example
327324
to upgrade the used version.
328325

@@ -339,7 +336,7 @@ tail -f var/build.log
339336
Building Bitcoin
340337
----------------
341338

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
343340
gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
344341

345342
Output from `gbuild` will look something like
@@ -372,7 +369,7 @@ can be inspected in `var/install.log` and `var/build.log`.
372369
Building an alternative repository
373370
-----------------------------------
374371

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
376373
the gitian builder at an alternative repository, using the same descriptors
377374
and inputs.
378375

@@ -382,22 +379,24 @@ URL=https://github.com/laanwj/bitcoin.git
382379
COMMIT=2014_03_windows_unicode_path
383380
./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
384381
./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
385383
```
386384

387385
Signing externally
388386
-------------------
389387

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.
392390

393391
gpg: skipped "laanwj": secret key not available
394392

395393
When you execute `gsign` you will get an error from GPG, which can be ignored. Copy the resulting `.assert` files
396394
in `gitian.sigs` to your signing machine and do
397395

398396
```bash
399-
gpg --detach-sign ${VERSION}/${SIGNER}/bitcoin-build.assert
397+
gpg --detach-sign ${VERSION}-linux/${SIGNER}/bitcoin-build.assert
400398
gpg --detach-sign ${VERSION}-win/${SIGNER}/bitcoin-build.assert
399+
gpg --detach-sign ${VERSION}-osx/${SIGNER}/bitcoin-build.assert
401400
```
402401

403402
This will create the `.sig` files that can be committed together with the `.assert` files to assert your
@@ -407,5 +406,5 @@ Uploading signatures
407406
---------------------
408407

409408
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
411410
request. You can also mail the files to me ([email protected]) and I'll commit them.

0 commit comments

Comments
 (0)