summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-03-14 15:28:51 -0500
committerBrian Smith <brian@dbsoft.org>2023-03-14 15:28:51 -0500
commit26b3d4c15157c7c3e7bae66b2d6534176f27c243 (patch)
tree034cd220507fd41d57df73345281f8922688c797 /python
parent9f009467d86fec76c9d909b5283121a35d220f19 (diff)
downloaduxp-26b3d4c15157c7c3e7bae66b2d6534176f27c243.tar.gz
Issue #2160 - Initial support for notarizing during DMG package.
Added --with-macbundle-idenity configure option to set a codesign identity. If no identity is set or cross-compiling from Linux no codesigning will be done. Currently doing a full deep bundle v2 sign, instead of limited v1.
Diffstat (limited to 'python')
-rw-r--r--python/mozbuild/mozpack/dmg.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/mozbuild/mozpack/dmg.py b/python/mozbuild/mozpack/dmg.py
index 0363022144..ade25aeac3 100644
--- a/python/mozbuild/mozpack/dmg.py
+++ b/python/mozbuild/mozpack/dmg.py
@@ -102,6 +102,7 @@ def create_dmg(source_directory, output_dmg, volume_name, extra_files):
if is_linux:
check_tools('DMG_TOOL', 'GENISOIMAGE')
with mozfile.TemporaryDirectory() as tmpdir:
+ import buildconfig
stagedir = os.path.join(tmpdir, 'stage')
os.mkdir(stagedir)
# Copy the app bundle over using rsync
@@ -118,4 +119,9 @@ def create_dmg(source_directory, output_dmg, volume_name, extra_files):
# Set the folder attributes to use a custom icon
set_folder_icon(stagedir)
chmod(stagedir)
+ if not is_linux:
+ identity = buildconfig.substs['MOZ_MACBUNDLE_IDENTITY']
+ if identity != '':
+ appbundle = os.path.join(stagedir, buildconfig.substs['MOZ_MACBUNDLE_NAME'])
+ subprocess.check_call(['codesign', '--deep', '-s', identity, appbundle])
create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name)