Skip to content

Sign and notarize Mac releases with Developer ID - #12

Merged
ctoth merged 2 commits into
masterfrom
feature/mac-developer-id-signing
Oct 30, 2026
Merged

ctoth merged 2 commits into
masterfrom
feature/mac-developer-id-signing

Conversation

@ctoth

@ctoth ctoth commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Mac releases are only ad-hoc signed today, so Gatekeeper blocks them. This adds Developer ID signing and notarization, driven by environment variables. With none of them set, builds behave as before.

  • MACOS_SIGNING_IDENTITY: after the bundle repair, every Mach-O file, nested framework version directory and nested .app/.bundle is signed inside-out with --options runtime --timestamp, then the app, then codesign --verify --deep --strict. The .dmg is signed after hdiutil creates it.
  • MACOS_SIGNING_KEYCHAIN: passed as --keychain to codesign and notarytool (the release keychain is a dedicated one, because a runner or SSH session cannot use the login keychain).
  • MACOS_NOTARY_PROFILE: the .dmg is submitted with notarytool submit --wait; anything but Accepted prints Apple's log and fails the build. Then the .dmg and the app are stapled, before the update ZIP is made from the app.

No entitlements are added; whether the bundled Python needs any under the hardened runtime is checked with a real notarized QCast build on the Mac Mini.

  • Mach-O files inside py2app's Contents/Resources/lib/python*.zip are removed (for every Mac build, signed or not). py2app copies package data such as sound_lib's BASS libraries into the zip; they cannot be loaded from there (frozen sound_lib loads the copies in Contents/Resources) or signed there, and Apple's first notarization of QCast rejected exactly those files.

@ctoth
ctoth merged commit 33f75cd into master Oct 30, 2026
2 checks passed
@ctoth
ctoth deleted the feature/mac-developer-id-signing branch October 30, 2026 00:21
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.

1 participant