Commit 91eff8c
authored
Fix macOS framework layout so the inner bundle can be signed (#39)
The signing job failed on every python-macos-dart archive with:
Python.framework: unsealed contents present in the root directory of
an embedded framework
macOS frameworks are VERSIONED bundles: everything at the framework root must be
a symlink into Versions/Current, and only `Versions` itself may be a real
directory. package-macos-for-dart.sh wrote the overlaid `Modules` and the public
`Headers` as real directories at the root. That was invisible while only the
outer xcframework was signed -- the outer seal does not care -- and became fatal
the moment the inner framework was signed in its own right.
They now go into Versions/Current with symlinks at the root, which is both what
codesign requires and what CPython's own macOS framework already does for Headers
and Resources. Consumers resolve Headers/ and Modules/ through the symlinks
exactly as before.
Also fixes the verifier, which was wrong in a way the same run exposed: it probed
for `_CodeSignature` or `Versions/A/_CodeSignature`, but a versioned bundle's
version directory is not always "A" -- CPython's macOS framework uses
Versions/3.14 -- so a correctly signed macOS framework was reported as unsigned.
It now asks `codesign -dv`, which is layout-agnostic and is the actual question.
Verified with the real identity against the released 20260729 macOS archive:
inner and outer both sign and verify, dart_bridge v1.7.1 (Versions/A) still
verifies, and stripping the inner signature still fails the run.1 parent 3c168a5 commit 91eff8c
2 files changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
40 | 57 | | |
41 | 58 | | |
42 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
289 | 294 | | |
290 | 295 | | |
291 | 296 | | |
| |||
0 commit comments