Repository navigation
fix(desktop): keep packaged symlinks inside the app so codesign accepts it - #116
Merged
Merged
Conversation
…ts it The v0.0.67 mac release failed at codesign --verify: "invalid destination for symbolic link in bundle". after-pack copies electron-updater (and the server runtime) with fs.cp, which rewrites relative symlinks into absolute paths on the build machine; bun had nested semver with a .bin/semver link under electron-updater, so the bundle shipped a link to the CI checkout. - Copy with verbatimSymlinks and leave package .bin shims out (the app never runs them). - after-pack now fails with the offending links when any symlink in the packaged resources is absolute, dangling or leaves the app, instead of failing later at codesign. Gate: G0 green (367 test files); unsigned build:desktop:mac passes with no .bin directories or absolute symlinks in Sentinel.app, bundle audit passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With the signing fix from #115, the v0.0.67 mac build got past certificate setup but then failed at
codesign --verify --deep --strictwith "invalid destination for symbolic link in bundle".Cause: after-pack copies electron-updater and the server runtime into the app with
fs.cp, which rewrites relative symlinks as absolute paths on the build machine. bun nestssemver(with a.bin/semverlink) underelectron-updater, so the bundle shippedContents/Resources/node_modules/electron-updater/node_modules/.bin/semver, pointing at the CI checkout.Fix:
verbatimSymlinksand leave out package.binshims, which the app never runs.The
v0.0.67tag builds the old after-pack code, so this ships as v0.0.68. v0.0.67 (no assets) is now marked as a pre-release, so auto-update keeps seeing v0.0.66 as the latest version until then.Test plan
.binis skipped, and escaping/absolute/dangling links are reported.build:desktop:maclocally: no.bindirectories and no absolute symlinks in Sentinel.app, and the bundle audit passes.🤖 Generated with Claude Code