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

Fixed macos signing process for browser entitlements #4790

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos-universal-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
run: |
cd engine
# TODO: Change it to "production" once we figure out the issue with the webauth
./mach macos-sign -v -r -c "release" -e "production-without-restricted" -a "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" --rcodesign-p12-file zenCert.p12 --rcodesign-p12-password-file zenpCertPassword.passwd
./mach macos-sign -v -r -c "release" -e "production" -a "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" --rcodesign-p12-file zenCert.p12 --rcodesign-p12-password-file zenpCertPassword.passwd
- name: Create DMG
run: |
Expand Down
12 changes: 1 addition & 11 deletions configs/macos/mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@ export MOZ_MACBUNDLE_NAME="Zen Browser.app"

# override LTO settings
# TODO: Dont
export MOZ_LTO=cross,thin
ac_add_options --enable-lto=cross,thin

if test "$ZEN_RELEASE"; then
if test "$ZEN_GA_DISABLE_PGO"; then
export ZEN_DUMMY=1
else
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
fi
fi


if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-apple-darwin
Expand Down
11 changes: 7 additions & 4 deletions src/tools/signing/macos/mach_commands-py.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/tools/signing/macos/mach_commands.py b/tools/signing/macos/mach_commands.py
index a513ad723805459c194d27b42dac68e9babba468..be74acbfe16a4eb389bc7d0ba32820b82fe2819c 100644
index a513ad723805459c194d27b42dac68e9babba468..3a08bb0987f9d6cf01c05f8ebb56efa91a5b9d0e 100644
--- a/tools/signing/macos/mach_commands.py
+++ b/tools/signing/macos/mach_commands.py
@@ -37,7 +37,6 @@ from mozbuild.base import MachCommandConditions as conditions
Expand All @@ -10,15 +10,18 @@ index a513ad723805459c194d27b42dac68e9babba468..be74acbfe16a4eb389bc7d0ba32820b8
)
@CommandArgument(
"-v",
@@ -342,6 +341,7 @@ def macos_sign(
@@ -342,6 +341,10 @@ def macos_sign(
cs_reset_cmd = ["find", app, "-exec", "codesign", "--remove-signature", "{}", ";"]
run(command_context, cs_reset_cmd, capture_output=not verbose_arg)

+ run(command_context, ["mv", "./embedded.provisionprofile", os.path.join(app, "Contents")], capture_output=not verbose_arg)
+ originProfile = os.path.join(os.curdir, "embedded.provisionprofile")
+ endProfile = os.path.join(app, "Contents", "embedded.provisionprofile")
+ print(f"ZEN: Moving {originProfile} to {endProfile}")
+ os.rename(originProfile, endProfile)
if use_rcodesign_arg is True:
sign_with_rcodesign(
command_context,
@@ -567,7 +567,7 @@ def sign_with_rcodesign(
@@ -567,7 +570,7 @@ def sign_with_rcodesign(
# input path and its options are specified as standard arguments.
ctx.log(logging.INFO, "macos-sign", {}, "Signing with rcodesign")

Expand Down
Loading