Repository navigation
[FIX] Sign pyopenms python_modules component during macOS packaging - #9828
timosachsenberg wants to merge 2 commits into
Conversation
Today's nightly Release run (workflow run 30506465700) failed Apple notarization on macos-15 with "not signed with a valid Developer ID certificate" / "signature does not include a secure timestamp" for every pyopenms .so under the python_modules pkg component. package_mac_productbuild.cmake already re-signs the TOPP binaries (component Dependencies) and the shared libraries (component library) with the Developer ID identity after fix_dependencies.rb rewrites their rpaths, but the pyopenms extension modules installed under COMPONENT python_modules (see src/pyOpenMS/CMakeLists.txt) were never covered by any of those install(CODE) signing steps, so they only carried the ad-hoc signature applied at build time. This adds the equivalent codesign pass for that component. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmake/package_mac_productbuild.cmake`:
- Around line 130-133: Update the install(CODE) signing block to capture the
codesign result via RESULT_VARIABLE or COMMAND_ERROR_IS_FATAL and terminate
packaging on any non-zero status. Also track whether the find command matched
any *.so files and fail when no PyOpenMS modules were found, while preserving
the existing signing output and component behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4c4a9db4-4932-4a28-a02a-36d2d42caed3
📒 Files selected for processing (1)
cmake/package_mac_productbuild.cmake
Addresses CodeRabbit review on #9828: the previous find|codesign pipe only captured output text, never a real exit status, so a codesign failure (or zero pyopenms .so files present) would silently pass and could ship an unnotarized/unsigned pyopenms component. Switched to signing each discovered .so directly via execute_process with RESULT_VARIABLE, since (verified empirically) GNU find's own exit status does not reflect the exit status of commands it invokes via -exec/-execdir with the ';' terminator - the prior find-based RESULT_VARIABLE approach would not have caught a failing codesign call either. Also added an explicit check that at least one .so was found to sign. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe macOS packaging script now locates installed PyOpenMS extension modules, signs each ChangesMacOS Packaging
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Closing in favor of #9827, which fixes the same nightly- While drafting this PR I found #9827 was opened first (also addressing this exact failure) and had already gone through review: @jpfeuffer flagged that pyopenms shouldn't be part of the desktop That makes this PR's approach (signing Generated by Claude Code |
Description
Today's nightly
Releaseworkflow run (run 30506465700) failed onmacos-15at the "Notarize macOS Package" step. Apple rejected the...-python_modules.pkgsub-package with errors for every pyopenms.soit contains, e.g.:Root cause:
cmake/package_mac_productbuild.cmakere-signs the TOPP binaries (COMPONENT Dependencies) and the shared libraries (COMPONENT library) with the Developer ID identity afterfix_dependencies.rbrewrites their rpaths, but the pyopenms extension modules — installed underCOMPONENT python_modulesinsrc/pyOpenMS/CMakeLists.txt— were never covered by any of thoseinstall(CODE ...)signing steps. They therefore only carried the ad-hoc signature applied by the linker at build time, which notarization rejects.This adds an equivalent
codesign --force --options runtime --timestamppass, scoped toCOMPONENT python_modules, mirroring the existing pattern used for thelibrarycomponent.Since this is the first real run of the new nightly
Releaseworkflow (added recently in #9523) with a Developer ID cert configured, this is a new/previously-unexercised code path rather than a regression or flaky failure.Note: I don't have access to a macOS runner in this environment, so this fix could not be locally verified end-to-end (build + codesign + notarize); it should be confirmed by a subsequent
Release/nightly CI run.Checklist
Generated by Claude Code
Summary by CodeRabbit