Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signing and notarisation to PKG installers #1856

Merged
merged 6 commits into from
Jun 10, 2024

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Jun 5, 2024

Unsigned macOS Installers are a bit difficult to use, as the OS "unknown developer" handling prevents installation.

This PR adds signing and notarisation options to .pkg builds.

This signing requires a different signing identity - you need a "Development ID Installer" identity, rather than a "Development ID Application". To facilitate this, a --installer-identity option has been added (plus a --no-sign-installer option to avoid signing entirely).

Identity selection is a little complicated, because macOS doesn't appear to give a way to just list the installer certificates; so - this implementation lists all non-app certificates from the same Team ID as the application certificate.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee
@freakboy3742 freakboy3742 requested a review from mhsmith June 5, 2024 23:42
@mhsmith
Copy link
Member

mhsmith commented Jun 6, 2024

I'll have to wait for my Apple developer account to reactivate before I can test this – I paid today, but it apparently takes 24-48 hours to take effect.

Verified

This commit was signed with the committer’s verified signature.
freakboy3742 Russell Keith-Magee
@mhsmith
Copy link
Member

mhsmith commented Jun 9, 2024

Signing works fine, but notarization has now been "in progress" for over an hour. This probably isn't Briefcase's fault, but I'll leave it overnight and see what happens.

[consoletest] Notarizing PKG with team ID T72CJ4HQ74...

Conducting pre-submission checks for Console test-0.0.1.pkg and initiating connection to the Apple notary service...
Submission ID received
  id: 292fb6c1-2616-4b8c-b357-175f699a8ba0
Successfully uploaded file
  id: 292fb6c1-2616-4b8c-b357-175f699a8ba0
  path: /Users/msmith/git/beeware/apps/consoletest/dist/Console test-0.0.1.pkg
Waiting for processing to complete.

Current status: In Progress...
Current status: In Progress....
Current status: In Progress.....
Current status: In Progress......
Current status: In Progress.......
Current status: In Progress........
Current status: In Progress.........
Current status: In Progress..........
...

@freakboy3742
Copy link
Member Author

Yeah - notarisation is known to be a bit flaky. Not sure what we can do to make it less flaky though; we're entirely dependent on Apple's servers returning a response.

@mhsmith
Copy link
Member

mhsmith commented Jun 10, 2024

My first notarization attempt was still "in progress" after 10 hours. I interrupted it and tried again, and it succeeded after an additional 4 hours and 25 minutes.

I've only ever notarized something once before (this DMG). I don't remember how long it took, but it wasn't this long.

If this happens to other people then it might be worth printing a prominent warning. But it doesn't look as if many people are using the macOS packaging feature yet, so let's wait until we get some more feedback.

@mhsmith mhsmith merged commit 301a3c1 into beeware:main Jun 10, 2024
44 checks passed
@freakboy3742 freakboy3742 deleted the sign-pkg branch June 10, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants