Skip to content

Commit 7a9cf80

Browse files
committed
docs: add/update docs for osx dmg signing
1 parent 914868a commit 7a9cf80

File tree

2 files changed

+42
-7
lines changed

2 files changed

+42
-7
lines changed

doc/README_osx.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,18 @@ Background images and other features can be added to DMG files by inserting a
6565
.DS_Store before creation. The easiest way to create this file is to build a
6666
DMG without one, move it to a device running OSX, customize the layout, then
6767
grab the .DS_Store file for later use. That is the approach taken here.
68+
69+
As of OSX Mavericks (10.9), using an Apple-blessed key to sign binaries is a
70+
requirement in order to satisfy the new Gatekeeper requirements. Because this
71+
private key cannot be shared, we'll have to be a bit creative in order for the
72+
build process to remain somewhat deterministic. Here's how it works:
73+
74+
- Builders use gitian to create an unsigned release. This outputs an unsigned
75+
dmg which users may choose to bless and run. It also outputs an unsigned app
76+
structure in the form of a tarball, which also contains all of the tools
77+
that have been previously (deterministically) built in order to create a
78+
final dmg.
79+
- The Apple keyholder uses this unsigned app to create a detached signature,
80+
using the script that is also included there.
81+
- Builders feed the unsigned app + detached signature back into gitian. It
82+
uses the pre-built tools to recombine the pieces into a deterministic dmg.

doc/release-process.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ Release Process
5959
./bin/gsign --signer $SIGNER --release ${VERSION}-win --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
6060
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
6161
./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
62-
./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
62+
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
63+
mv build/out/bitcoin-*-unsigned.tar.gz inputs
6364
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
6465
popd
65-
66+
bitcoin-0.9.99-osx-unsigned.tar.gz
6667
Build output expected:
6768

6869
1. source tarball (bitcoin-${VERSION}.tar.gz)
6970
2. linux 32-bit and 64-bit binaries dist tarballs (bitcoin-${VERSION}-linux[32|64].tar.gz)
7071
3. windows 32-bit and 64-bit installers and dist zips (bitcoin-${VERSION}-win[32|64]-setup.exe, bitcoin-${VERSION}-win[32|64].zip)
71-
4. OSX installer (bitcoin-${VERSION}-osx.dmg)
72-
5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx>/(your gitian key)/
72+
4. OSX unsigned installer (bitcoin-${VERSION}-osx-unsigned.dmg)
73+
5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx-unsigned>/(your gitian key)/
7374

7475
###Next steps:
7576

@@ -78,7 +79,28 @@ Commit your signature to gitian.sigs:
7879
pushd gitian.sigs
7980
git add ${VERSION}-linux/${SIGNER}
8081
git add ${VERSION}-win/${SIGNER}
81-
git add ${VERSION}-osx/${SIGNER}
82+
git add ${VERSION}-osx-unsigned/${SIGNER}
83+
git commit -a
84+
git push # Assuming you can push to the gitian.sigs tree
85+
popd
86+
87+
Wait for OSX detached signature:
88+
Once the OSX build has 3 matching signatures, Gavin will sign it with the apple App-Store key.
89+
He will then upload a detached signature to be combined with the unsigned app to create a signed binary.
90+
91+
Create the signed OSX binary:
92+
pushd ./gitian-builder
93+
# Fetch the signature as instructed by Gavin
94+
cp signature.tar.gz inputs/
95+
./bin/gbuild -i ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
96+
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
97+
mv build/out/bitcoin-${VERSION}-osx.dmg ../
98+
popd
99+
100+
Commit your signature for the signed OSX binary:
101+
102+
pushd gitian.sigs
103+
git add ${VERSION}-osx-signed/${SIGNER}
82104
git commit -a
83105
git push # Assuming you can push to the gitian.sigs tree
84106
popd
@@ -91,8 +113,6 @@ Commit your signature to gitian.sigs:
91113

92114
- Code-sign Windows -setup.exe (in a Windows virtual machine using signtool)
93115

94-
- Code-sign MacOSX .dmg
95-
96116
Note: only Gavin has the code-signing keys currently.
97117

98118
- Create `SHA256SUMS.asc` for the builds, and GPG-sign it:

0 commit comments

Comments
 (0)