Commit 88eadfb
authored
fix(build): preserve binary identifier when signing via temp-path copy (#1255)
* fix(build): preserve binary identifier when signing via temp-path copy
The temp-path codesign workaround for non-standard Python.framework bundles
signed each binary without --identifier, so codesign derived the identifier
from the random temp filename (e.g. 'tmp.XXXXXX'). Apple's notarization
service then rejected those binaries with 'The signature of the binary is
invalid' -- the certificate chain and code hashes are valid, but the
identifier doesn't match what the binary originally carried.
Fix: extract the existing identifier from the binary (set by PyInstaller's
codesign_identity step, typically 'org.python.python') before copying to
the temp path, then pass --identifier to the codesign invocation. Falls
back to basename if the binary is unsigned.
* fix(build): address P2 review findings — use sed for identifier extraction, clean up temp on cp failure1 parent 0bfc97f commit 88eadfb
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
166 | 180 | | |
167 | 181 | | |
168 | | - | |
169 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
170 | 188 | | |
171 | 189 | | |
172 | 190 | | |
| |||
0 commit comments