You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## What does this project do?
4
4
5
-
This project allows you to build software deterministically. It does this by leveraging [Docker](https://docker.io) and [Gitian Builder](https://github.com/devrandom/gitian-builder)
5
+
This project allows you to build software deterministically. In other words, each time software is compiled, the resulting program should be the same no matter where, when or by whom the task was completed. You would think this would already be the case, but there are a few issues preventing this. The reasons for this aren't super important at this stage, but the consequences of not being able to match your software to everyone else's software ARE VERY IMPORTANT. This project seeks to mitigate those consequences. It does this by leveraging [Docker](https://docker.io) and [Gitian Builder](https://github.com/devrandom/gitian-builder)
6
6
7
-
## What are deterministic builds?
7
+
## What are deterministic/reproducible builds?
8
8
9
9
Deterministic builds produce final binaries that, when hashed, always produce the same hash for all subsequent builds for a given set of inputs. Of the writing of this README, most all build chains produce binaries non-deterministically. The main reason is the inclusion of time stamps and other meta information into the artifact. The gitian-builder project seeks to remove these differences.
10
10
@@ -23,7 +23,7 @@ IMPORTANT: Although this project aims to automate and ease the pain of creating
23
23
24
24
For instance, If I clone [Bitcoin Core](https://github.com/bitcoin/bitcoin) to my build system and compile an executable to become the basis for my bitcoin wallet, then I am choosing to implicitly trust the following about the source code:
25
25
26
-
1. It was not tampered with by GitHub company or their agents.
26
+
1. It was not tampered with by the GitHub company or their agents.
27
27
2. It was not tampered with by a third party with back doors into TLS.
28
28
3. It was not tampered with by parties that are also installed Certificate Authorities or their agents.
29
29
4. That my own build system has not been compromised in any way such that it could affect the security of the final artifact.
@@ -76,6 +76,12 @@ $ docker run \
76
76
-v `pwd`/result:/shared/result \
77
77
builder [tag] [url] [path to gitian config]
78
78
```
79
+
You may also alter the script: 'Dockerfile' for the 'tag', 'url' and 'path to gitian config' in the 'CMD' section. Whenever you alter the Docker, be sure to run:
80
+
81
+
```bash
82
+
docker build -t builder .
83
+
```
84
+
79
85
The first command builds the Linux container and sets up all the prerequisites within the container. The second command actually launches the build process and sends the results to standard output. When the final build is complete, you will see a list of hashes and the final artifact names, the following is an example:
@@ -91,17 +97,21 @@ When running the docker build, using '-v host absolute path:/shared/cache' will
91
97
92
98
When building binaries intended to be run on Mac OS X, you MUST supply a SDK tarball to the build chain. Here are the directions for obtaining this tarball:
93
99
94
-
1. Register and download the Apple SDK: see OS X [readme](https://github.com/bitpay/bitcoin/blob/0.12.1-bitcore/doc/README_osx.txt) for details.
100
+
1. Register and download the Apple SDK: see OS X [readme](https://github.com/bitpay/bitcoin/blob/0.12.1-bitcore/doc/README_osx.txt) for details. Refer to the gitian descriptor yaml file to know what MacOSX sdk file is needed. At the time of this writing, it is: MacOSX10.11.sdk
Using a Mac, create a tarball for the 10.9 SDK and copy it to your shared cache directory:
99
105
100
106
```bash
101
-
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk
102
-
$ cp MacOSX10.9.sdk.tar.gz cache/
107
+
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk
108
+
$ cp MacOSX10.11.sdk.tar.gz cache/
103
109
```
104
110
111
+
### Security Enhanced Linux (SELinux) and general security precautions when using Linux as the host system
112
+
113
+
I found this page to be very useful: [Docker security practices](https://linux-audit.com/docker-security-best-practices-for-your-vessel-and-containers/)
114
+
105
115
### What's next
106
116
* Optionally, you may create a digital signature of the resulting output manifest file.
107
117
* This file will be located in your host's shared cache directory results directory. The file's name is: package name-res.yml, where package name will resemble bitcoin-0.12.1-linux64-res.yml
0 commit comments