You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(packaging): code-sign the Rust binary inside the macOS wheel
An ad-hoc signature carries no signing identity, so the binary's designated
requirement degenerates to its cdhash — which changes on every build. That
requirement is what a Keychain item's ACL records when the user clicks "Always
Allow", so an unsigned wheel re-prompts for the API token on every upgrade.
hatch_build.py signs the fused binary right after lipo, because the wheel is
zipped around it and nothing downstream can. The rcodesign invocation moves out
of macos_sign_file into scripts/build-os-packages/macos-sign-file so the
standalone bundle and the wheel share one set of binary identifiers, and the
`ggshield` in both ends up with the same designated requirement.
tag.yml asks for signing explicitly; a run that cannot read the secrets fails
rather than publishing an unsigned wheel. Without `sign` — PRs, including from
forks, and local builds — the wheel is built unsigned and still works.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/dev/os-packages.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@ Although PyInstaller supports signing, it did not work at the time we tried it,
70
70
71
71
For Gatekeeper to accept the app, the executable and all the dynamic libraries must be signed, as well as the .pkg archive itself. Signing the executable and the libraries is done by the `sign` step, whereas signing the .pkg archive is done by the `create_archive` step.
72
72
73
+
The `rcodesign` invocation lives in its own script, `scripts/build-os-packages/macos-sign-file`, because the macOS wheel signs the same `ggshield` from Python (`hatch_build.py`). Both must produce the same designated requirement, or a Keychain grant given to one artifact does not apply to the other.
0 commit comments