Skip to content

Sign thirdparty components for macOS notarization - #8506

Merged
jpfeuffer merged 4 commits into
fix_notarizationfrom
copilot/sign-libraries-and-executables
Dec 16, 2025
Merged

jpfeuffer merged 4 commits into
fix_notarizationfrom
copilot/sign-libraries-and-executables

Conversation

Copilot AI commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

macOS notarization requires code signing of all executables and libraries, including those in thirdparty components. Currently only bin/ and lib/ directories are signed.

Changes

  • Added code signing for each individual thirdparty component in cmake/package_mac_productbuild.cmake
  • Each thirdparty component (e.g., Comet, Percolator) from THIRDPARTY_COMPONENT_GROUP is signed in its own component install phase
  • Follows existing pattern: find -type f with codesign --force --options runtime
  • Includes existence check for each component directory
  • Uses component-specific bundle identifiers: de.openms.thirdparty.${component}.{}
## Sign thirdparty components
foreach(component IN LISTS THIRDPARTY_COMPONENT_GROUP)
  install(CODE "
          if(EXISTS \${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARE_DIR}/THIRDPARTY/${component}/)
            execute_process(COMMAND find \${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARE_DIR}/THIRDPARTY/${component}/ -type f -execdir codesign --force --options runtime -i de.openms.thirdparty.${component}.{} --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" {} \\; OUTPUT_VARIABLE thirdparty_sign_out ERROR_VARIABLE thirdparty_sign_out)
            message('\${thirdparty_sign_out}')
          endif()"
          COMPONENT ${component}
          )
endforeach()

Thirdparty binaries are installed via install_thirdparty_folder() macro from SEARCH_ENGINES_DIRECTORY at package build time. Each subdirectory becomes its own component, and this code ensures each component's files are properly signed for macOS notarization.

Original prompt

In PR 8494 we identified that on macos for notarization, we also need to sign all libraries and executables in the thirdparty component.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Dec 17 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Add signing for libraries and executables in thirdparty for notarization Sign thirdparty components for macOS notarization Dec 16, 2025
Copilot AI requested a review from jpfeuffer December 16, 2025 18:10
@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot This is wrong! I told you to use the codesign command for the third-party component(s)!! Not with any other random component!!!

cpack_add_component(${component}

Copilot AI commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

@copilot This is wrong! I told you to use the codesign command for the third-party component(s)!! Not with any other random component!!!
https://github.com/OpenMS/OpenMS/blob/3439a002aa4d57d6f9503b33...

Fixed in commit 9dd7601. Now signing each thirdparty component individually (e.g., Comet, Percolator) in their own component install phase using foreach(component IN LISTS THIRDPARTY_COMPONENT_GROUP), rather than incorrectly signing in the Dependencies component.

@jpfeuffer
jpfeuffer marked this pull request as ready for review December 16, 2025 23:56
@jpfeuffer

jpfeuffer commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

Nice! @poshul will merge into your branch

@jpfeuffer
jpfeuffer merged commit 085da22 into fix_notarization Dec 16, 2025
@jpfeuffer
jpfeuffer deleted the copilot/sign-libraries-and-executables branch December 16, 2025 23:58
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.

2 participants