Repository navigation
[BUILD] macOS package: sign the Qt frameworks as bundles, retry codesign - #5
Merged
Merged
Conversation
The Dependencies component signed every file under lib/ on its own, the Headers/ of the bundled Qt frameworks included: thousands of codesign calls, each asking Apple's timestamp service for a secure timestamp. One failed in the nightly of 2026-11-22 (on QtGui.framework/.../qbrush.h) and stopped the macOS package; CPack hid codesign's message, so only the exit code was logged. cmake/MacOSX/codesign.cmake, included by the install rules: - openms_gui_codesign tries a failed codesign again (3 attempts, 10 s apart) and fails with codesign's output; - openms_gui_codesign_dir signs each framework as a bundle (its Versions/<v>, which seals the headers as resources) and every other file on its own, without following linked folders. package_mac_productbuild.cmake and add_mac_bundle.cmake use them. The identifiers stay de.openms.TOPP.libs.<name> and de.openms.<app>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149aXmZodXGhChZB7AQzpkp
timosachsenberg
marked this pull request as ready for review
November 30, 2026 11:36
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Description
The macOS nightly installer of 2026-11-22 failed in the Package step:
The Dependencies component signed every file under
lib/with its owncodesign --timestampcall. That includes theHeaders/of the eight bundled Qt frameworks, whichinstall(RUNTIME_DEPENDENCY_SET)copies as whole folders. So every nightly made thousands of requests to Apple's timestamp service, and one of them failed. The code was the same on the nights before and after, and those succeeded. The failure was in the middle of the file list. This is the only packaging failure in this repository's CI history. A dropped timestamp request is the likely cause, but not a proven one: codesign's own message was printed as aSTATUSmessage, which CPack hides, so only the exit code made it into the log.Changes
New
cmake/MacOSX/codesign.cmake, included by the install rules when CPack runs them:openms_gui_codesign(<path> IDENTITY … [IDENTIFIER …] [TIMESTAMP] [OPTIONS …]): if codesign fails, it tries again (3 attempts, 10 s apart). The last failure stops the installation with codesign's output in the error message.openms_gui_codesign_dir(<dir> …): signs each*.frameworkas a bundle, through itsVersions/<v>folder. That signs the binary and seals everything else (Info.plist, Headers/) as resources, which is how macOS expects frameworks to be signed. Every other file (dylibs, plugins) is still signed on its own. Symlinks and linked folders (Versions/Current) are skipped. CMP0009 is set inside the function because the generated install script sets no policies.package_mac_productbuild.cmake(libraries, Qt, plugins, CLI tools) andadd_mac_bundle.cmake(app bundles) now use these functions. The identifiers stay the same:de.openms.TOPP.libs.<name>(a framework keeps the name of its binary, e.g.…QtGui),de.openms.TOPP.<tool>andde.openms.<app>. Ad hoc signing (-) still requests no timestamp.With these changes the Qt part needs 8 framework signatures plus about 30 dylibs and 3 plugins, instead of one call per header.
Testing
codesignonPATHand a copy of the reallib/layout (frameworks withVersions/A,Versions/Currentand top-level symlinks, versioned dylib symlinks,lib/plugins/):Versions/A; dylibs and plugins one by one; symlinks are skipped;codesign failed for <path> (exit code 1): <codesign output>;install(CODE)snippets from both files, run withcmake --install, give the expected argument lists; the identity with spaces and parentheses stays one argument.release.ymlon this branch (deploy: false,core_ref: develop): https://github.com/OpenMS/OpenMS-TOPP-GUI/actions/runs/46403593479status: Acceptedand the ticket was stapled.pkgutilreports "signed by a developer certificate issued by Apple for distribution" andspctlreports "accepted".AI disclosure
https://claude.ai/code/session_0149aXmZodXGhChZB7AQzpkp
Generated by Claude Code