From 39915f7c96ecc64fd3363a321d2e3c752c807481 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 14 Jun 2023 18:06:55 -0700 Subject: [PATCH] Add entitlements file to bundle step (#2611) This completes the bundle changes that will be needed to access voice, as well as adds permissions for accessing other MacOS services, the camera, and the necessary permissions for plugins. This was developed by combining the entitlements of iTerm and VSCode, cross-referenced with the entitlements of Firefox. Release Notes: - Fixed a bug in enabling authorization for macOS services (preview only) --- crates/zed/resources/zed.entitlements | 28 +++++++++++++++++++++++++++ script/bundle | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 crates/zed/resources/zed.entitlements diff --git a/crates/zed/resources/zed.entitlements b/crates/zed/resources/zed.entitlements new file mode 100644 index 0000000000000000000000000000000000000000..07af3124cd3b2fe796a6c94c7658d53654d6e46d --- /dev/null +++ b/crates/zed/resources/zed.entitlements @@ -0,0 +1,28 @@ + + + + + com.apple.security.automation.apple-events + + com.apple.security.cs.allow-jit + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + com.apple.security.personal-information.addressbook + + com.apple.security.personal-information.calendars + + com.apple.security.personal-information.location + + com.apple.security.personal-information.photos-library + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + + diff --git a/script/bundle b/script/bundle index 38bc26188d530fd4c75a3dba9296ec4f9897e316..9f50862cd590e12fb30a3cc896aaa403652b45ac 100755 --- a/script/bundle +++ b/script/bundle @@ -81,12 +81,12 @@ if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTAR security import /tmp/zed-certificate.p12 -k zed.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign rm /tmp/zed-certificate.p12 security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CERTIFICATE_PASSWORD" zed.keychain - /usr/bin/codesign --force --deep --timestamp --options runtime --sign "Zed Industries, Inc." "${app_path}" -v + /usr/bin/codesign --force --deep --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -v security default-keychain -s login.keychain else echo "One or more of the following variables are missing: MACOS_CERTIFICATE, MACOS_CERTIFICATE_PASSWORD, APPLE_NOTARIZATION_USERNAME, APPLE_NOTARIZATION_PASSWORD" echo "Performing an ad-hoc signature, but this bundle should not be distributed" - codesign --force --deep --sign - "${app_path}" -v + codesign --force --deep --entitlements crates/zed/resources/zed.entitlements --sign - "${app_path}" -v fi if [ "$target_dir" = "debug" ]; then