Merge #7954: build: quiet annoying warnings without adding new ones
[bitcoinplatinum.git] / doc / release-process.md
blob34dead86bc1e4d2104d1ee77bbf35444ebf8d240
1 Release Process
2 ====================
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#syncing-with-transifex)
8 Before every minor and major release:
10 * Update [bips.md](bips.md) to account for changes since the last release.
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
20 Check out the source code in the following directory hierarchy.
22     cd /path/to/your/toplevel/build
23     git clone https://github.com/bitcoin/gitian.sigs.git
24     git clone https://github.com/bitcoin/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
30 Update the following:
32 - `configure.ac`:
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:
65     pushd ./bitcoin
66     export SIGNER=(your Gitian key, ie bluematt, sipa, etc)
67     export VERSION=(new version, e.g. 0.8.0)
68     git fetch
69     git checkout v${VERSION}
70     popd
72 Ensure your gitian.sigs are up-to-date if you wish to gverify your builds against other Gitian signatures.
74     pushd ./gitian.sigs
75     git pull
76     popd
78 Ensure gitian-builder is up-to-date to take advantage of new caching features (`e9741525c` or later is recommended).
80     pushd ./gitian-builder
81     git pull
82     popd
84 ### Fetch and create inputs: (first time, or when dependency versions change)
86     pushd ./gitian-builder
87     mkdir -p inputs
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
90     popd
92 Register and download the Apple SDK: see [OS X readme](README_osx.txt) for details.
94 https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg
96 Using a Mac, create a tarball for the 10.9 SDK and copy it to the inputs directory:
98     tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.9.sdk.tar.gz MacOSX10.9.sdk
100 ### Optional: Seed the Gitian sources cache and offline git repositories
102 By default, Gitian will fetch source files as needed. To cache them ahead of time:
104     pushd ./gitian-builder
105     make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
106     popd
108 Only missing files will be fetched, so this is safe to re-run for each build.
110 NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example:
112     pushd ./gitian-builder
113     ./bin/gbuild --url bitcoin=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments}
114     popd
116 The gbuild invocations below <b>DO NOT DO THIS</b> by default.
118 ### Build and sign Bitcoin Core for Linux, Windows, and OS X:
120     pushd ./gitian-builder
121     ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
122     ./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
123     mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../
125     ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
126     ./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
127     mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
128     mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
130     ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
131     ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
132     mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
133     mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
134     popd
136 Build output expected:
138   1. source tarball (`bitcoin-${VERSION}.tar.gz`)
139   2. linux 32-bit and 64-bit dist tarballs (`bitcoin-${VERSION}-linux[32|64].tar.gz`)
140   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`)
141   4. OS X unsigned installer and dist tarball (`bitcoin-${VERSION}-osx-unsigned.dmg`, `bitcoin-${VERSION}-osx64.tar.gz`)
142   5. Gitian signatures (in `gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/`)
144 ### Verify other gitian builders signatures to your own. (Optional)
146 Add other gitian builders keys to your gpg keyring
148     gpg --import bitcoin/contrib/gitian-keys/*.pgp
150 Verify the signatures
152     pushd ./gitian-builder
153     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
154     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
155     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
156     popd
158 ### Next steps:
160 Commit your signature to gitian.sigs:
162     pushd gitian.sigs
163     git add ${VERSION}-linux/${SIGNER}
164     git add ${VERSION}-win-unsigned/${SIGNER}
165     git add ${VERSION}-osx-unsigned/${SIGNER}
166     git commit -a
167     git push  # Assuming you can push to the gitian.sigs tree
168     popd
170 Wait for Windows/OS X detached signatures:
172 - Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
173 - 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.
175 Create (and optionally verify) the signed OS X binary:
177     pushd ./gitian-builder
178     ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
179     ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
180     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
181     mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
182     popd
184 Create (and optionally verify) the signed Windows binaries:
186     pushd ./gitian-builder
187     ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
188     ./bin/gsign --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
189     ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-signed ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
190     mv build/out/bitcoin-*win64-setup.exe ../bitcoin-${VERSION}-win64-setup.exe
191     mv build/out/bitcoin-*win32-setup.exe ../bitcoin-${VERSION}-win32-setup.exe
192     popd
194 Commit your signature for the signed OS X/Windows binaries:
196     pushd gitian.sigs
197     git add ${VERSION}-osx-signed/${SIGNER}
198     git add ${VERSION}-win-signed/${SIGNER}
199     git commit -a
200     git push  # Assuming you can push to the gitian.sigs tree
201     popd
203 ### After 3 or more people have gitian-built and their results match:
205 - Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
207 ```bash
208 sha256sum * > SHA256SUMS
211 The list of files should be:
213 bitcoin-${VERSION}-linux32.tar.gz
214 bitcoin-${VERSION}-linux64.tar.gz
215 bitcoin-${VERSION}-osx64.tar.gz
216 bitcoin-${VERSION}-osx.dmg
217 bitcoin-${VERSION}.tar.gz
218 bitcoin-${VERSION}-win32-setup.exe
219 bitcoin-${VERSION}-win32.zip
220 bitcoin-${VERSION}-win64-setup.exe
221 bitcoin-${VERSION}-win64.zip
224 - GPG-sign it, delete the unsigned file:
226 gpg --digest-algo sha256 --clearsign SHA256SUMS # outputs SHA256SUMS.asc
227 rm SHA256SUMS
229 (the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
230 Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spurious/nonsensical entry.
232 - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
233   into `/var/www/bin/bitcoin-core-${VERSION}`
235 - A `.torrent` will appear in the directory after a few minutes. Optionally help seed this torrent. To get the `magnet:` URI use:
236 ```bash
237 transmission-show -m <torrent file>
239 Insert the magnet URI into the announcement sent to mailing lists. This permits
240 people without access to `bitcoin.org` to download the binary distribution.
241 Also put it into the `optional_magnetlink:` slot in the YAML file for
242 bitcoin.org (see below for bitcoin.org update instructions). 
244 - Update bitcoin.org version
246   - First, check to see if the Bitcoin.org maintainers have prepared a
247     release: https://github.com/bitcoin-dot-org/bitcoin.org/labels/Releases
249       - If they have, it will have previously failed their Travis CI
250         checks because the final release files weren't uploaded.
251         Trigger a Travis CI rebuild---if it passes, merge.
253   - If they have not prepared a release, follow the Bitcoin.org release
254     instructions: https://github.com/bitcoin-dot-org/bitcoin.org#release-notes
256   - After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
257     as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
259 - Announce the release:
261   - bitcoin-dev and bitcoin-core-dev mailing list
263   - Bitcoin Core announcements list https://bitcoincore.org/en/list/announcements/join/
265   - bitcoincore.org blog post
267   - Update title of #bitcoin on Freenode IRC
269   - Optionally twitter, reddit /r/Bitcoin, ... but this will usually sort out itself
271   - Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
273   - Add release notes for the new version to the directory `doc/release-notes` in git master
275   - Celebrate