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

Sign maintenancetool.app on macOS #3391

Merged
merged 5 commits into from
Jan 21, 2025
Merged

Sign maintenancetool.app on macOS #3391

merged 5 commits into from
Jan 21, 2025

Conversation

cebtenzzre
Copy link
Member

@cebtenzzre cebtenzzre commented Jan 16, 2025

On macOS Sequoia, attempting to update or uninstall GPT4All via the maintenance tool causes a crash.

This PR fixes the crash by signing MaintenanceTool.app. To do this, we must build it in a separate step and then sign it; otherwise I believe the bundle is generated on-the-fly during the installation process on the user's machine when it is too late to sign it. This is covered in Promoting Updates for the Maintenance Tool.

CPackIFW does not natively support binarycreator --create-maintenancetool, and although you can tell CPackIFW to run custom scripts during the build process, there is no script insertion point between generating the configuration that must be passed to binarycreator and running binarycreator to generate the final .dmg.

I worked around this by running cmake and ninja once with -DGPT4ALL_GEN_CPACK_CONFIG=ON just to generate the CPack config folder (including config.xml and the app icon), and then with the option disabled to actually build and package GPT4All, including generating the maintenancetool during the package step.

When the user builds GPT4All themselves, it will still work as before since it is simpler to use the built-in maintenancetool.

Fixes #2982

@cebtenzzre cebtenzzre marked this pull request as ready for review January 16, 2025 21:58
@manyoso manyoso merged commit 82175b2 into main Jan 21, 2025
3 of 4 checks passed
cgivre pushed a commit to cgivre/gpt4all that referenced this pull request Feb 4, 2025
Signed-off-by: Jared Van Bortel <[email protected]>
Signed-off-by: AT <[email protected]>
Co-authored-by: AT <[email protected]>
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.

macOS Sequoia: "maintenancetool quit unexpectedly"
2 participants