4
* Update translations (ping wumpus, Diapolo or tcatm on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#syncing-with-transifex)
4
Before every release candidate:
6
* Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#synchronising-translations).
8
Before every minor and major release:
5
10
* Update [bips.md](bips.md) to account for changes since the last release.
6
* Update hardcoded [seeds](/contrib/seeds)
10
###First time / New builders
11
* Update version in sources (see below)
12
* Write release notes (see below)
14
Before every major release:
16
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
18
### First time / New builders
11
20
Check out the source code in the following directory hierarchy.
13
cd /path/to/your/toplevel/build
14
git clone https://github.com/bitcoin/gitian.sigs.git
15
git clone https://github.com/bitcoin/bitcoin-detached-sigs.git
16
git clone https://github.com/devrandom/gitian-builder.git
17
git clone https://github.com/bitcoin/bitcoin.git
19
###Bitcoin maintainers/release engineers, update (commit) version in sources
22
contrib/verifysfbinaries/verify.sh
26
contrib/gitian-descriptors/*.yml
27
src/clientversion.h (change CLIENT_VERSION_IS_RELEASE to true)
31
git tag -s v(new version, e.g. 0.8.0)
33
# write release notes. git shortlog helps a lot, for example:
35
git shortlog --no-merges v(current version, e.g. 0.7.2)..v(new version, e.g. 0.8.0)
40
###Setup and perform Gitian builds
42
Setup Gitian descriptors:
45
export SIGNER=(your Gitian key, ie bluematt, sipa, etc)
46
export VERSION=(new version, e.g. 0.8.0)
48
git checkout v${VERSION}
51
Ensure your gitian.sigs are up-to-date if you wish to gverify your builds against other Gitian signatures.
57
Ensure gitian-builder is up-to-date to take advantage of new caching features (`e9741525c` or later is recommended).
59
pushd ./gitian-builder
62
###Fetch and create inputs: (first time, or when dependency versions change)
65
wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
66
wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
68
Register and download the Apple SDK: see [OS X readme](README_osx.txt) for details.
70
https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg
72
Using a Mac, create a tarball for the 10.9 SDK and copy it to the inputs directory:
74
tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk
76
###Optional: Seed the Gitian sources cache and offline git repositories
22
cd /path/to/your/toplevel/build
23
git clone https://github.com/bitcoin-core/gitian.sigs.git
24
git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
25
git clone https://github.com/devrandom/gitian-builder.git
26
git clone https://github.com/bitcoin/bitcoin.git
28
### Bitcoin maintainers/release engineers, update version in sources
33
- `_CLIENT_VERSION_MAJOR`
34
- `_CLIENT_VERSION_MINOR`
35
- `_CLIENT_VERSION_REVISION`
36
- Don't forget to set `_CLIENT_VERSION_IS_RELEASE` to `true`
37
- `src/clientversion.h`: (this mirrors `configure.ac` - see issue #3539)
38
- `CLIENT_VERSION_MAJOR`
39
- `CLIENT_VERSION_MINOR`
40
- `CLIENT_VERSION_REVISION`
41
- Don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true`
42
- `doc/README.md` and `doc/README_windows.txt`
43
- `doc/Doxyfile`: `PROJECT_NUMBER` contains the full version
44
- `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release
46
Write release notes. git shortlog helps a lot, for example:
48
git shortlog --no-merges v(current version, e.g. 0.7.2)..v(new version, e.g. 0.8.0)
50
(or ping @wumpus on IRC, he has specific tooling to generate the list of merged pulls
51
and sort them into categories based on labels)
53
Generate list of authors:
55
git log --format='%aN' "$*" | sort -ui | sed -e 's/^/- /'
57
Tag version (or release candidate) in git
59
git tag -s v(new version, e.g. 0.8.0)
61
### Setup and perform Gitian builds
63
Setup Gitian descriptors:
66
export SIGNER=(your Gitian key, ie bluematt, sipa, etc)
67
export VERSION=(new version, e.g. 0.8.0)
69
git checkout v${VERSION}
72
Ensure your gitian.sigs are up-to-date if you wish to gverify your builds against other Gitian signatures.
78
Ensure gitian-builder is up-to-date:
80
pushd ./gitian-builder
84
### Fetch and create inputs: (first time, or when dependency versions change)
86
pushd ./gitian-builder
88
wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
89
wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
92
Create the OS X SDK tarball, see the [OS X readme](README_osx.md) for details, and copy it into the inputs directory.
94
### Optional: Seed the Gitian sources cache and offline git repositories
78
96
By default, Gitian will fetch source files as needed. To cache them ahead of time:
80
make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
98
pushd ./gitian-builder
99
make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
82
102
Only missing files will be fetched, so this is safe to re-run for each build.
84
104
NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example:
86
./bin/gbuild --url bitcoin=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments}
106
pushd ./gitian-builder
107
./bin/gbuild --url bitcoin=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments}
88
110
The gbuild invocations below <b>DO NOT DO THIS</b> by default.
90
###Build and sign Bitcoin Core for Linux, Windows, and OS X:
112
### Build and sign Bitcoin Core for Linux, Windows, and OS X:
92
./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
93
./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
114
pushd ./gitian-builder
115
./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
116
./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
94
117
mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../
96
./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
97
./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
119
./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
120
./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
98
121
mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
99
122
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
101
./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
102
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
124
./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
125
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
103
126
mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
104
127
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
106
Build output expected:
108
1. source tarball (bitcoin-${VERSION}.tar.gz)
109
2. linux 32-bit and 64-bit dist tarballs (bitcoin-${VERSION}-linux[32|64].tar.gz)
110
3. windows 32-bit and 64-bit unsigned installers and dist zips (bitcoin-${VERSION}-win[32|64]-setup-unsigned.exe, bitcoin-${VERSION}-win[32|64].zip)
111
4. OS X unsigned installer and dist tarball (bitcoin-${VERSION}-osx-unsigned.dmg, bitcoin-${VERSION}-osx64.tar.gz)
112
5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/
114
###Verify other gitian builders signatures to your own. (Optional)
116
Add other gitian builders keys to your gpg keyring
118
gpg --import ../bitcoin/contrib/gitian-downloader/*.pgp
120
Verify the signatures
122
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
123
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
124
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
130
Build output expected:
132
1. source tarball (`bitcoin-${VERSION}.tar.gz`)
133
2. linux 32-bit and 64-bit dist tarballs (`bitcoin-${VERSION}-linux[32|64].tar.gz`)
134
3. windows 32-bit and 64-bit unsigned installers and dist zips (`bitcoin-${VERSION}-win[32|64]-setup-unsigned.exe`, `bitcoin-${VERSION}-win[32|64].zip`)
135
4. OS X unsigned installer and dist tarball (`bitcoin-${VERSION}-osx-unsigned.dmg`, `bitcoin-${VERSION}-osx64.tar.gz`)
136
5. Gitian signatures (in `gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/`)
138
### Verify other gitian builders signatures to your own. (Optional)
140
Add other gitian builders keys to your gpg keyring
142
gpg --import bitcoin/contrib/gitian-keys/*.pgp
144
Verify the signatures
146
pushd ./gitian-builder
147
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
148
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
149
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
130
154
Commit your signature to gitian.sigs:
133
git add ${VERSION}-linux/${SIGNER}
134
git add ${VERSION}-win-unsigned/${SIGNER}
135
git add ${VERSION}-osx-unsigned/${SIGNER}
137
git push # Assuming you can push to the gitian.sigs tree
140
Wait for Windows/OS X detached signatures:
141
Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
142
Detached signatures will then be committed to the [bitcoin-detached-sigs](https://github.com/bitcoin/bitcoin-detached-sigs) repository, which can be combined with the unsigned apps to create signed binaries.
144
Create (and optionally verify) the signed OS X binary:
146
pushd ./gitian-builder
147
./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
148
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
149
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
150
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
153
Create (and optionally verify) the signed Windows binaries:
155
pushd ./gitian-builder
156
./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
157
./bin/gsign --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
158
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-signed ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
159
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-${VERSION}-win64-setup.exe
160
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-${VERSION}-win32-setup.exe
157
git add ${VERSION}-linux/${SIGNER}
158
git add ${VERSION}-win-unsigned/${SIGNER}
159
git add ${VERSION}-osx-unsigned/${SIGNER}
161
git push # Assuming you can push to the gitian.sigs tree
164
Wait for Windows/OS X detached signatures:
166
- Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
167
- Detached signatures will then be committed to the [bitcoin-detached-sigs](https://github.com/bitcoin-core/bitcoin-detached-sigs) repository, which can be combined with the unsigned apps to create signed binaries.
169
Create (and optionally verify) the signed OS X binary:
171
pushd ./gitian-builder
172
./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
173
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
174
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
175
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
178
Create (and optionally verify) the signed Windows binaries:
180
pushd ./gitian-builder
181
./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
182
./bin/gsign --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
183
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-signed ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
184
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-${VERSION}-win64-setup.exe
185
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-${VERSION}-win32-setup.exe
163
188
Commit your signature for the signed OS X/Windows binaries:
166
git add ${VERSION}-osx-signed/${SIGNER}
167
git add ${VERSION}-win-signed/${SIGNER}
169
git push # Assuming you can push to the gitian.sigs tree
172
-------------------------------------------------------------------------
191
git add ${VERSION}-osx-signed/${SIGNER}
192
git add ${VERSION}-win-signed/${SIGNER}
194
git push # Assuming you can push to the gitian.sigs tree
174
197
### After 3 or more people have gitian-built and their results match:
176
199
- Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
178
202
sha256sum * > SHA256SUMS
205
The list of files should be:
207
bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz
208
bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz
209
bitcoin-${VERSION}-i686-pc-linux-gnu.tar.gz
210
bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz
211
bitcoin-${VERSION}-osx64.tar.gz
212
bitcoin-${VERSION}-osx.dmg
213
bitcoin-${VERSION}.tar.gz
214
bitcoin-${VERSION}-win32-setup.exe
215
bitcoin-${VERSION}-win32.zip
216
bitcoin-${VERSION}-win64-setup.exe
217
bitcoin-${VERSION}-win64.zip
219
The `*-debug*` files generated by the gitian build contain debug symbols
220
for troubleshooting by developers. It is assumed that anyone that is interested
221
in debugging can run gitian to generate the files for themselves. To avoid
222
end-user confusion about which file to pick, as well as save storage
223
space *do not upload these to the bitcoin.org server, nor put them in the torrent*.
225
- GPG-sign it, delete the unsigned file:
179
227
gpg --digest-algo sha256 --clearsign SHA256SUMS # outputs SHA256SUMS.asc