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

Binaries aren't verified on MacOS #303

Open
Michael-F-Bryan opened this issue Sep 16, 2021 · 3 comments
Open

Binaries aren't verified on MacOS #303

Michael-F-Bryan opened this issue Sep 16, 2021 · 3 comments

Comments

@Michael-F-Bryan
Copy link
Contributor

@Mi1ind was going through his workshop today and when he tried to run the rune binary MacOS stopped him with a "Cannot Be Opened Because the Developer Cannot be Verified" error.

Some solutions are:

@Michael-F-Bryan
Copy link
Contributor Author

@meelislootus did a test run of using rune on his M1 and ran into this issue:

image(2)

@Michael-F-Bryan Michael-F-Bryan changed the title Binaries aren't veritifed on MacOS Binaries aren't verified on MacOS Oct 8, 2021
@saidinesh5
Copy link
Contributor

This should help us get there I think .. https://github.com/koordinates/kart/blob/master/.github/workflows/build.yml#L228-L269

@Michael-F-Bryan
Copy link
Contributor Author

I stumbled across the actual commands we'll need while browsing Reddit:

Our desktop application (written mostly in Rust) is notarized via command line tools. Notarizing assumes several steps:

  1. Signing the binaries, the app bundle and the installer pkg
  2. Notarizing the pkg file
  3. Stapling the pkg file

You need two certificates linked to your Apple developer account: one for signing applications (binaries and bundles) and another for signing pkg installer files.

For signing binaries you run codesign utility, something like:

codesign -s "$APP_CERT_ID" --deep -v -f -o runtime <your_exe_or_app>

For signing pkg installers:

productsign --sign "$PKG_CERT_ID" "yourpackage.pkg" "signedpackage.pkg"

Once signed you can do the notarization:

xcrun altool --notarize-app \
             --primary-bundle-id "com.acme.appid" \
             --username "$APPLE_ID" \
             --password "$APP_PASSWORD" \
             --file "/path/to/signed.pkg"

Where APPLE_ID - is your Apple ID (email), APP_PASSWORD - application password created in your account.

It will upload the pkg file to Apple server. You will get an email when it is completed (ok or nok).

You can staple it afterwards (not strictly necessary though but is recommended):

xcrun stapler staple "signed.pkg"

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

No branches or pull requests

2 participants