Skip to content

Fix macOS portable ZIP library relocation and signatures - #9

Merged
thomasc1971 merged 1 commit into
chestso:masterfrom
MohammediYunus:fix/macos-portable-bundle
Oct 7, 2026
Merged

thomasc1971 merged 1 commit into
chestso:masterfrom
MohammediYunus:fix/macos-portable-bundle

Conversation

@MohammediYunus

@MohammediYunus MohammediYunus commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The macOS portable packager edits dylib install names after copying them, invalidating their existing signatures. It also leaves transitive dependencies pointing to the build machine and allows inherited Homebrew rpaths to take precedence over bundled libraries.

This collects the complete dependency graph before editing, rewrites non-system load commands to paths within the bundle, removes inherited rpaths, and ad-hoc signs and strictly verifies every Mach-O after the final modifications. Missing dependencies and conflicting library basenames now stop packaging instead of producing an incomplete ZIP. The Windows branch is unchanged.

The macOS workflow now extracts the ZIP, verifies its Mach-O signatures, and runs both --version and the existing GUI smoke test through the packaged launcher.

Fixes #8.

Validation on macOS 26.7 arm64:

  • Fresh Portty source build against coffer v0.6.2; all 31 make check tests pass.
  • make format, shell syntax checks, git diff --check, and actionlint pass.
  • Four native packaging cases fail against the original script and pass with this patch: transitive dependencies, paths containing spaces, a missing transitive library, and conflicting basenames. The successful fixtures run after their original libraries are moved aside; dladdr confirms both libraries load from the extracted bundle.
  • The actual Portty ZIP extracts successfully. All nine Mach-O files pass strict verification, all ten non-system dependency edges resolve inside the bundle, and no inherited rpaths remain. The packaged launcher reports its version and completes the demo/screendump/quit sequence successfully.

The local application build disables optional ThorVG support; the existing CI dependency setup still includes ThorVG. The packager handles the absolute dependency paths used by the current build and fails explicitly on unresolved tokenized source dependencies. This does not add Developer ID signing or notarization.

@thomasc1971
thomasc1971 merged commit 26e86e7 into chestso:master Oct 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.8.7 macOS ARM64 ZIP: bundled dylibs fail strict signature verification

2 participants