Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions doc/release-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,51 @@ flowchart TD
r2Staging ~~~ website
```

## macOS code signing and notarization

The macOS release VMs are built from
[`orka/templates/macos-release.pkr.hcl`](../orka/templates/macos-release.pkr.hcl),
which installs the Developer ID certificate and a `notarytool` keychain
profile (`NODE_RELEASE_PROFILE`) on every release image, pkg and tarball nodes
alike. In `nodejs/node`, `make pkg` and `make binary` codesign `bin/node` and
call `tools/osx-notarize.sh` on their output; the pkg gets its ticket stapled,
the tarball binary cannot and relies on Gatekeeper fetching the ticket by
code directory hash, so its contents and checksums are unaffected.

The script only runs when `NOTARIZATION_ID`, `NOTARIZATION_PASSWORD` and
`NOTARIZATION_TEAM_ID` are set. `iojs+release` injects them from a
conditional step per node type; the tarball steps need them as well as the
pkg step, otherwise tarballs ship signed but not notarized
([nodejs/node#67140](https://github.com/nodejs/node/issues/67140)). Both steps
also run `security unlock-keychain` before `make`: `notarytool` reads its
credentials from the keychain profile and fails with `keychainLocked`
otherwise. A
successful tarball axis logs `Verification was successful.`; `Skipping
notarization` means the variables were not injected.

Tarball binaries often receive a ticket anyway, days after the release,
when a third party notarizes an app that bundles them; the window right after
a release and any version nobody bundles stay uncovered, which is what the
build step closes. To check a published release from any Mac (the script asks
Apple's ticket service by code directory hash; `codesign -R=notarized` alone
only reads the local cache):

```shell
tools/macos-tarball-notarization.sh v26.13.0
```

Tarballs published before the build step notarized them are backfilled with a
one-off run over SSH on a macOS release VM, which has the keychain profile.
Unlock the keychain first and set the team the binaries must be signed by:

```shell
security unlock-keychain -p "<release keychain password>"
NOTARIZATION_TEAM_ID=<team id> tools/macos-tarball-notarization.sh --submit --all-supported --latest 10
```

Submissions are serial and each one waits for Apple's verdict, so a large
backfill can take hours. A rerun skips every binary that already has a ticket,
so an interrupted run is simply rerun.

[nodejs.org]: https://nodejs.org
[release process]: https://github.com/nodejs/node/blob/main/doc/contributing/releases.md
2 changes: 2 additions & 0 deletions orka/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ We need the private key for node-www for the release images, as well as the appl

Xcode Command-line tools are not enough to perform a full notarization cycle, full Xcode must be fully installed on the release images.

The release image is used by both the `.pkg` and the tarball nodes of `iojs+release`, and both notarize their output, so every release image needs full Xcode and the `NODE_RELEASE_PROFILE` notarytool profile that this template stores in the System keychain.

* Login to https://developer.apple.com using the [email protected] account
* Download Xcode: https://developer.apple.com/download/more/ - find non-beta version, open Developer Tools in browser, Networking tab, start download (then cancel), in Networking tab "Copy as cURL" (available in Chrome & FF)
* On OSX 15 we currently install 16.4
Expand Down
Loading
Loading