Repository navigation
[FIX] macOS PKG: exclude pyopenms python_modules from the installer to fix notarization - #9827
Conversation
…eeds The productbuild generator packages the python_modules component (the pyopenms extension modules, installed to DESTINATION pyopenms per src/pyOpenMS/CMakeLists.txt) into its own sub-pkg. That component was never covered by the existing codesign install(CODE) steps, which only sign the Dependencies (bin) and library components plus THIRDPARTY. Apple's notarization service then rejected the nightly macOS package because the pyopenms *.so binaries were unsigned and lacked a secure timestamp. Add an equivalent codesign --options runtime --timestamp step scoped to COMPONENT python_modules so those binaries get signed like the rest of the install tree before the .pkg is submitted for notarization.
📝 WalkthroughWalkthroughThe macOS productbuild configuration now removes the ChangesPyOpenMS macOS packaging
Suggested reviewers: 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 |
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 131-133: Update the execute_process invocation in the pyOpenMS
signing install(CODE) block to fail packaging whenever codesign exits non-zero,
using COMMAND_ERROR_IS_FATAL ANY with the existing captured output or explicitly
checking a RESULT_VARIABLE and issuing message(FATAL_ERROR). Preserve the
current signing command and diagnostic output.
🪄 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: d038ce4e-471f-43fe-a3e0-47bcaad18a43
📒 Files selected for processing (1)
cmake/package_mac_productbuild.cmake
Capture the find/codesign RESULT_VARIABLE for the python_modules signing step and abort with a FATAL_ERROR instead of silently continuing when signing fails, matching what CodeRabbit flagged.
|
Good catch — pushed 722bb78 to capture Generated by Claude Code |
|
I'm afraid that I know nothing about package signing on macOS. Is this a new issue caused by the recent merge of the release workflow, or has this been happening longer than that? |
|
This has been broken since the Root cause: Generated by Claude Code |
|
I don't think the python modules should be part of the PKG at all. So just remove that/those targets as a packagable component. |
…of signing it Per @jpfeuffer's review feedback: the pyopenms Python extension modules don't belong in the desktop application installer at all - they're already shipped separately as wheels via pyopenms-wheels-cibuildwheel.yml. The .deb/.rpm packages already exclude the python_modules component (see package_deb.cmake / package_rpm.cmake); only the macOS productbuild generator picked it up by default because it never set CPACK_COMPONENTS_ALL. Replace the codesign-it-instead approach from the previous commits with an explicit exclusion, computed from CMake's global COMPONENTS property so it stays in sync with whatever components actually exist rather than a hardcoded list.
|
Makes sense — pushed 021fb28 to go that route instead. The Rather than hardcode a component list (risky, since the set of thirdparty search-engine components varies per platform/run), I used Generated by Claude Code |
|
So then this is probably caused by the fact that the new build workflow always includes |
|
Confirmed — Generated by Claude Code |
|
Yes I think this can be merged. One thing to check. Do you really want to configure with pyopenms=On when you build an installer? I guess it depends. I think previously we auto-deactivated when pkging is on. |
|
Good point, and worth tracking, but I'd suggest keeping it out of this PR: this fix makes packaging correct regardless of whether Happy to open a follow-up issue for it if you'd like, but leaving this PR scoped to just the notarization/packaging fix. Generated by Claude Code |
…9835, #9836 (#9841) Backfills the QPX export spec-conformance series, the macOS PKG notarization fix, and the Windows GUI DLL export fix that merged into develop without changelog entries. #9805 and #9821 were intentionally skipped (test-only / comment-only, no user-visible behavior change), and #9818 was already documented. Claude-Session: https://claude.ai/code/session_0118Yt3TZEMzhMhH6FwZPDVt Co-authored-by: Claude <[email protected]>
Backfills CHANGELOG entries for three merged PRs not yet covered by the recent #9826 backfill: the QPX feature/pg export spec-conformance fix, the macOS installer notarization fix, and the Windows GUI DLL export fix for Annotation1DItem. Claude-Session: https://claude.ai/code/session_01RSKvhJ2dEd2zE4dohdv8af Co-authored-by: Claude <[email protected]>
Two independent backfill commits (#9833 and #9841) each added an entry for these three PRs, so every one of them was listed twice with slightly different wording. Kept the more detailed version from #9841 and dropped the duplicate. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016kxG5jpwHZaYGfrhU2wLHg
Description
The nightly
Releaseworkflow'smacos-15job has been failing at the "Notarize macOS Package" step (e.g. run 30506465700). Apple rejectedOpenMS-<version>-macOS-Silicon-python_modules.pkgwith errors like:Root cause:
productbuildpackages thepython_modulesCPack component (the pyopenms extension.somodules, installed toDESTINATION pyopenmspersrc/pyOpenMS/CMakeLists.txt) into its own sub-.pkg.cmake/package_mac_productbuild.cmakenever setCPACK_COMPONENTS_ALL, soproductbuilddefaulted to packaging every known component — includingpython_modules, which was never signed like the other components..deb/.rpmpackaging (cmake/package_deb.cmake/cmake/package_rpm.cmake) already excludespython_modulesvia an explicitCPACK_COMPONENTS_ALL; only macOS picked it up by accident.Per @jpfeuffer's review feedback, pyopenms doesn't belong in the desktop application installer at all — it's already shipped separately as wheels via
pyopenms-wheels-cibuildwheel.yml. This PR excludes it from the macOS.pkginstead of signing it, usingget_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)(CMake's own list of every component that received aninstall(... COMPONENT ...)call) followed bylist(REMOVE_ITEM CPACK_COMPONENTS_ALL python_modules), so it stays correct as components are added/removed elsewhere rather than relying on a hardcoded list. No workaround (e.g. skipping notarization) was used — the actual packaging bug is fixed.Checklist
Releaseworkflow onmacos-15; not covered by unit tests, cannot be exercised in this Linux dev environment)