Repository navigation
Ship the release dmg and zip with their notarization stapled - #655
Merged
Merged
Conversation
…itx#650) Both artifacts on the releases page are notarized but carry no ticket, so Gatekeeper has to ask Apple about them at first launch rather than read the ticket out of the download, and a machine that is offline refuses to open a freshly downloaded copy. The dmg and the zip were sealed one step before the stapler ran, and the app it stapled only ever reached a second zip that nothing uploads. * Separate exporting the signed app from packaging it, so the two can sit either side of notarization * Package the dmg and zip once the app has been stapled, so that the ticket is inside what ships * Say where the split comes from, since a dmg made ahead of the stapler carries no ticket whatever is done to the app afterwards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #650.
Neither release artifact carries a stapled notarization ticket. Measured on the
published 1.5.7 assets:
Stapling is what lets Gatekeeper answer out of the download itself. Without a
ticket it has to ask Apple at first launch, so a machine that cannot reach the
service has nothing to fall back on. That is Apple's stated reason for the step,
rather than something measured here.
The steps ran in an order that threw the stapling away:
make package-signedbuilt the dmg and zip, notarization then ran against a separate
GitX.zip, andthe stapler updated
GitX.appand that second zip. Nothing uploads the secondzip. The two files that ship were sealed one step before the ticket existed.
Changes
export-signedout ofpackage-signed, so exporting the app andpackaging it can sit either side of notarization
Staple Notarization, from the stapled appdmg-signedruns both, so building a signed image locally is unchangedWhat this PR's CI does not tell you
Every step this change touches is gated on
secrets.BUILD_CERTIFICATE_BASE64,which a pull request from a fork does not get. On the run for this PR they are
all reported as
skipped:So the green checks here mean the project still builds, and nothing about the
fix. It can only be confirmed by a run on master, where the secrets exist.
Test plan
The signing half cannot run outside CI, so the packaging half was measured
locally on an unrelated stapled application renamed to
GitX.app, driventhrough the real
make package-signedrecipe:stapler validatemake -nconfirmspackage-signedno longer runsexportArchive, so thesecond call cannot overwrite the stapled app
package, upload
The new step ends with
xcrun stapler validate GitX.app, so a future changethat reintroduces the ordering fails the job rather than shipping quietly.
After this lands, the check on the next release asset is:
Not covered: the dmg file itself still carries no ticket of its own. I tested
that, and a dmg built from a stapled app is not itself stapled, because tickets
are keyed to what was submitted. Stapling it needs the dmg notarized as well,
which is a second round trip and a larger change; the app inside it is stapled,
which is what a user runs.