Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix macOS codesigning #3408

Merged
merged 1 commit into from
Jan 23, 2025
Merged

ci: fix macOS codesigning #3408

merged 1 commit into from
Jan 23, 2025

Conversation

cebtenzzre
Copy link
Member

On Sequoia, GPT4All builds made in CI crashed after #3391.

My local builds were signed successfully because I was not using -DBUILD_UNIVERSAL=ON. I do not really understand why that option affects code signing, but that's not important. This does however explain why I didn't catch this when I originally tested the build and verified that it was signed, even though I never run the install target.

What is important is that the way #2443 signs binaries in a way that is antithetical to the spirit of CMake: Instead of each task taking input and producing separate output files, forming an explicit dependency, there is a task manually added to the install target that signs the source binaries in the build dir before copying them, in place.

This means that running the install target before starting the package target (i.e., as an explicit and separate command) is necessary to produce a signed version of GPT4All. This was confirmed here. This was removed in #3391, but is now added back as a workaround until we can fix it properly.

As a bonus, this PR fixes a regression in the default install prefix caused by #3391 - otherwise, it is skipped the first time cmake is run, and already initialized the second time so it is not overridden. Which would cause the install step to fail without extra configuration (such as DESTDIR or --prefix) when using GPT4ALL_GEN_CPACK_CONFIG.

Signed-off-by: Jared Van Bortel <[email protected]>
@cebtenzzre cebtenzzre requested a review from manyoso January 22, 2025 23:54
@cebtenzzre cebtenzzre merged commit 15f6657 into main Jan 23, 2025
4 of 13 checks passed
@cebtenzzre cebtenzzre deleted the fix-macos-signing branch January 23, 2025 16:41
cgivre pushed a commit to cgivre/gpt4all that referenced this pull request Feb 4, 2025
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