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
fix(build): sign canonical framework binary once and sync to duplicates (#1256)
* fix(build): sign canonical framework binary once and sync to duplicates
PyInstaller copies Python.framework contents as separate regular files —
Python, Versions/Current/Python, and Versions/3.9/Python have identical
content but different inodes.
The previous approach signed each independently via temp copy, producing
3 different signature blocks (different timestamps, random nonces). Apple's
notarization service detects these as inconsistently signed and reports:
'The signature of the binary is invalid.'
for all three paths, even though each individual signature is technically
valid.
Fix: sign only the first (canonical) binary via temp copy, then copy the
signed result to all duplicate paths. All three end up with byte-identical
content including the embedded signature, so Apple's hash check passes
consistently across every path.
* fix(build): guard cmp-s before syncing duplicates, use cp -p for temp copy
- Use cp -p when copying canonical to temp file to preserve execute bits,
making the behavior explicit rather than relying on destination inode mode.
- Add cmp -s guard before overwriting each non-canonical path: if a binary
differs from the canonical, sign it separately via temp copy instead of
silently replacing it. This prevents silent corruption if a framework with
genuinely distinct Mach-O files triggers the ambiguous-bundle fallback.
Addresses Greptile P2 review findings on PR #1256.
0 commit comments