Code signing and notarization are becoming crucial to ship software to macOS, but we currently neither codesign nor notarize Rust releases. We should ensure that all binaries we ship do both, to avoid our users getting warnings or being unable to run the compiler.
This is trickier than just calling the Xcode CLI though. Our release process roughly works this way:
- rust-lang/rust's CI produces full release artifacts for all the platforms we support for every PR we merge. Those artifacts are uploaded to an S3 bucket and kept there for around 160 days (allowing PR-by-PR bisection).
- When a release starts,
promote-release fetches the artifacts for the latest commit on the master, beta or stable branch (depending on which channel we're releasing), signs everything with GPG, generates the manifests and uploads everything to static.rust-lang.org.
The main problem is where we should run codesigning and notarization: CI is not trusted enough to have the developer certificates and credentials in it, and the release process runs on Linux. Apple's tools to codesign and notarize instead only work on macOS, preventing us from just running them during promote-release.
The idea me, @Mark-Simulacrum and @kinnison had a bit ago is to develop a separate HTTP service that runs on a persistent Mac Mini somewhere. The release process would upload the binaries to the Mac Mini, which would sign them and send them back to the release process. The HTTP service would also need to ensure the binaries come from a trusted source.
Code signing and notarization are becoming crucial to ship software to macOS, but we currently neither codesign nor notarize Rust releases. We should ensure that all binaries we ship do both, to avoid our users getting warnings or being unable to run the compiler.
This is trickier than just calling the Xcode CLI though. Our release process roughly works this way:
promote-releasefetches the artifacts for the latest commit on the master, beta or stable branch (depending on which channel we're releasing), signs everything with GPG, generates the manifests and uploads everything tostatic.rust-lang.org.The main problem is where we should run codesigning and notarization: CI is not trusted enough to have the developer certificates and credentials in it, and the release process runs on Linux. Apple's tools to codesign and notarize instead only work on macOS, preventing us from just running them during
promote-release.The idea me, @Mark-Simulacrum and @kinnison had a bit ago is to develop a separate HTTP service that runs on a persistent Mac Mini somewhere. The release process would upload the binaries to the Mac Mini, which would sign them and send them back to the release process. The HTTP service would also need to ensure the binaries come from a trusted source.