You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release-process.md 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. Release Process
  2. ====================
  3. Before every release candidate:
  4. * Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#synchronising-translations).
  5. * Update manpages, see [gen-manpages.sh](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/README.md#gen-manpagessh).
  6. Before every minor and major release:
  7. * Update [bips.md](bips.md) to account for changes since the last release.
  8. * Update version in `configure.ac` (don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true`)
  9. * Write release notes (see below)
  10. * Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc.
  11. * Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc.
  12. - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip.
  13. - Testnet should be set some tens of thousands back from the tip due to reorgs there.
  14. - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect
  15. that causes rejection of blocks in the past history.
  16. Before every major release:
  17. * Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
  18. * Update [`BLOCK_CHAIN_SIZE`](/src/qt/intro.cpp) to the current size plus some overhead.
  19. * Update `src/chainparams.cpp` chainTxData with statistics about the transaction count and rate.
  20. * Update version of `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
  21. ### First time / New builders
  22. If you're using the automated script (found in [contrib/gitian-build.sh](/contrib/gitian-build.sh)), then at this point you should run it with the "--setup" command. Otherwise ignore this.
  23. Check out the source code in the following directory hierarchy.
  24. cd /path/to/your/toplevel/build
  25. git clone https://github.com/bitcoin-core/gitian.sigs.git
  26. git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
  27. git clone https://github.com/devrandom/gitian-builder.git
  28. git clone https://github.com/bitcoin/bitcoin.git
  29. ### Bitcoin maintainers/release engineers, suggestion for writing release notes
  30. Write release notes. git shortlog helps a lot, for example:
  31. git shortlog --no-merges v(current version, e.g. 0.7.2)..v(new version, e.g. 0.8.0)
  32. (or ping @wumpus on IRC, he has specific tooling to generate the list of merged pulls
  33. and sort them into categories based on labels)
  34. Generate list of authors:
  35. git log --format='%aN' "$*" | sort -ui | sed -e 's/^/- /'
  36. Tag version (or release candidate) in git
  37. git tag -s v(new version, e.g. 0.8.0)
  38. ### Setup and perform Gitian builds
  39. If you're using the automated script (found in [contrib/gitian-build.sh](/contrib/gitian-build.sh)), then at this point you should run it with the "--build" command. Otherwise ignore this.
  40. Setup Gitian descriptors:
  41. pushd ./bitcoin
  42. export SIGNER=(your Gitian key, ie bluematt, sipa, etc)
  43. export VERSION=(new version, e.g. 0.8.0)
  44. git fetch
  45. git checkout v${VERSION}
  46. popd
  47. Ensure your gitian.sigs are up-to-date if you wish to gverify your builds against other Gitian signatures.
  48. pushd ./gitian.sigs
  49. git pull
  50. popd
  51. Ensure gitian-builder is up-to-date:
  52. pushd ./gitian-builder
  53. git pull
  54. popd
  55. ### Fetch and create inputs: (first time, or when dependency versions change)
  56. pushd ./gitian-builder
  57. mkdir -p inputs
  58. wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
  59. wget -P inputs http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
  60. popd
  61. Create the OS X SDK tarball, see the [OS X readme](README_osx.md) for details, and copy it into the inputs directory.
  62. ### Optional: Seed the Gitian sources cache and offline git repositories
  63. By default, Gitian will fetch source files as needed. To cache them ahead of time:
  64. pushd ./gitian-builder
  65. make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
  66. popd
  67. Only missing files will be fetched, so this is safe to re-run for each build.
  68. NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example:
  69. pushd ./gitian-builder
  70. ./bin/gbuild --url bitcoin=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments}
  71. popd
  72. The gbuild invocations below <b>DO NOT DO THIS</b> by default.
  73. ### Build and sign Bitcoin Core for Linux, Windows, and OS X:
  74. pushd ./gitian-builder
  75. ./bin/gbuild --num-make 2 --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
  76. ./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
  77. mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../
  78. ./bin/gbuild --num-make 2 --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
  79. ./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
  80. mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
  81. mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
  82. ./bin/gbuild --num-make 2 --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
  83. ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
  84. mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
  85. mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
  86. popd
  87. Build output expected:
  88. 1. source tarball (`bitcoin-${VERSION}.tar.gz`)
  89. 2. linux 32-bit and 64-bit dist tarballs (`bitcoin-${VERSION}-linux[32|64].tar.gz`)
  90. 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`)
  91. 4. OS X unsigned installer and dist tarball (`bitcoin-${VERSION}-osx-unsigned.dmg`, `bitcoin-${VERSION}-osx64.tar.gz`)
  92. 5. Gitian signatures (in `gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/`)
  93. ### Verify other gitian builders signatures to your own. (Optional)
  94. Add other gitian builders keys to your gpg keyring, and/or refresh keys.
  95. gpg --import bitcoin/contrib/gitian-keys/*.pgp
  96. gpg --refresh-keys
  97. Verify the signatures
  98. pushd ./gitian-builder
  99. ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
  100. ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
  101. ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
  102. popd
  103. ### Next steps:
  104. Commit your signature to gitian.sigs:
  105. pushd gitian.sigs
  106. git add ${VERSION}-linux/${SIGNER}
  107. git add ${VERSION}-win-unsigned/${SIGNER}
  108. git add ${VERSION}-osx-unsigned/${SIGNER}
  109. git commit -a
  110. git push # Assuming you can push to the gitian.sigs tree
  111. popd
  112. Codesigner only: Create Windows/OS X detached signatures:
  113. - Only one person handles codesigning. Everyone else should skip to the next step.
  114. - Only once the Windows/OS X builds each have 3 matching signatures may they be signed with their respective release keys.
  115. Codesigner only: Sign the osx binary:
  116. transfer bitcoin-osx-unsigned.tar.gz to osx for signing
  117. tar xf bitcoin-osx-unsigned.tar.gz
  118. ./detached-sig-create.sh -s "Key ID"
  119. Enter the keychain password and authorize the signature
  120. Move signature-osx.tar.gz back to the gitian host
  121. Codesigner only: Sign the windows binaries:
  122. tar xf bitcoin-win-unsigned.tar.gz
  123. ./detached-sig-create.sh -key /path/to/codesign.key
  124. Enter the passphrase for the key when prompted
  125. signature-win.tar.gz will be created
  126. Codesigner only: Commit the detached codesign payloads:
  127. cd ~/bitcoin-detached-sigs
  128. checkout the appropriate branch for this release series
  129. rm -rf *
  130. tar xf signature-osx.tar.gz
  131. tar xf signature-win.tar.gz
  132. git add -a
  133. git commit -m "point to ${VERSION}"
  134. git tag -s v${VERSION} HEAD
  135. git push the current branch and new tag
  136. Non-codesigners: wait for Windows/OS X detached signatures:
  137. - Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
  138. - 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.
  139. Create (and optionally verify) the signed OS X binary:
  140. pushd ./gitian-builder
  141. ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
  142. ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
  143. ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
  144. mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
  145. popd
  146. Create (and optionally verify) the signed Windows binaries:
  147. pushd ./gitian-builder
  148. ./bin/gbuild -i --commit signature=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
  149. ./bin/gsign --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
  150. ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-signed ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
  151. mv build/out/bitcoin-*win64-setup.exe ../bitcoin-${VERSION}-win64-setup.exe
  152. mv build/out/bitcoin-*win32-setup.exe ../bitcoin-${VERSION}-win32-setup.exe
  153. popd
  154. Commit your signature for the signed OS X/Windows binaries:
  155. pushd gitian.sigs
  156. git add ${VERSION}-osx-signed/${SIGNER}
  157. git add ${VERSION}-win-signed/${SIGNER}
  158. git commit -a
  159. git push # Assuming you can push to the gitian.sigs tree
  160. popd
  161. ### After 3 or more people have gitian-built and their results match:
  162. - Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
  163. ```bash
  164. sha256sum * > SHA256SUMS
  165. ```
  166. The list of files should be:
  167. ```
  168. bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz
  169. bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz
  170. bitcoin-${VERSION}-i686-pc-linux-gnu.tar.gz
  171. bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz
  172. bitcoin-${VERSION}-osx64.tar.gz
  173. bitcoin-${VERSION}-osx.dmg
  174. bitcoin-${VERSION}.tar.gz
  175. bitcoin-${VERSION}-win32-setup.exe
  176. bitcoin-${VERSION}-win32.zip
  177. bitcoin-${VERSION}-win64-setup.exe
  178. bitcoin-${VERSION}-win64.zip
  179. ```
  180. The `*-debug*` files generated by the gitian build contain debug symbols
  181. for troubleshooting by developers. It is assumed that anyone that is interested
  182. in debugging can run gitian to generate the files for themselves. To avoid
  183. end-user confusion about which file to pick, as well as save storage
  184. space *do not upload these to the bitcoin.org server, nor put them in the torrent*.
  185. - GPG-sign it, delete the unsigned file:
  186. ```
  187. gpg --digest-algo sha256 --clearsign SHA256SUMS # outputs SHA256SUMS.asc
  188. rm SHA256SUMS
  189. ```
  190. (the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
  191. Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spurious/nonsensical entry.
  192. - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
  193. into `/var/www/bin/bitcoin-core-${VERSION}`
  194. - A `.torrent` will appear in the directory after a few minutes. Optionally help seed this torrent. To get the `magnet:` URI use:
  195. ```bash
  196. transmission-show -m <torrent file>
  197. ```
  198. Insert the magnet URI into the announcement sent to mailing lists. This permits
  199. people without access to `bitcoin.org` to download the binary distribution.
  200. Also put it into the `optional_magnetlink:` slot in the YAML file for
  201. bitcoin.org (see below for bitcoin.org update instructions).
  202. - Update bitcoin.org version
  203. - First, check to see if the Bitcoin.org maintainers have prepared a
  204. release: https://github.com/bitcoin-dot-org/bitcoin.org/labels/Releases
  205. - If they have, it will have previously failed their Travis CI
  206. checks because the final release files weren't uploaded.
  207. Trigger a Travis CI rebuild---if it passes, merge.
  208. - If they have not prepared a release, follow the Bitcoin.org release
  209. instructions: https://github.com/bitcoin-dot-org/bitcoin.org#release-notes
  210. - After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
  211. as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
  212. - Announce the release:
  213. - bitcoin-dev and bitcoin-core-dev mailing list
  214. - Bitcoin Core announcements list https://bitcoincore.org/en/list/announcements/join/
  215. - bitcoincore.org blog post
  216. - Update title of #bitcoin on Freenode IRC
  217. - Optionally twitter, reddit /r/Bitcoin, ... but this will usually sort out itself
  218. - Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
  219. - Archive release notes for the new version to `doc/release-notes/` (branch `master` and branch of the release)
  220. - Create a [new GitHub release](https://github.com/bitcoin/bitcoin/releases/new) with a link to the archived release notes.
  221. - Celebrate