bug 723176: support mac dmg signing in the build system. r=khuey/ted
authorBen Hearsum <bhearsum@mozilla.com>
Tue, 22 May 2012 17:13:26 -0400
changeset 99068 b038090f07c2dae64f83c6d557321d34c42e7060
parent 99067 c20d415ef1b50fc6cd9751d5dbe79434307f50b4
child 99069 a301e1c41b7d1515d98b569ec81369686c6933bc
child 99148 87b89795891fa7afbecf7ad2ef8807f98ef55334
child 113099 8d8f6fbdf4d0f7086b889077d8016827868150fa
push id173
push userlsblakk@mozilla.com
push dateFri, 24 Aug 2012 15:39:16 +0000
treeherdermozilla-release@bcc45eb1fb41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, ted
bugs723176
milestone15.0a1
first release with
nightly linux32
b038090f07c2 / 15.0a1 / 20120522145033 / files
nightly linux64
b038090f07c2 / 15.0a1 / 20120522145033 / files
nightly mac
b038090f07c2 / 15.0a1 / 20120522142835 / files
nightly win32
b038090f07c2 / 15.0a1 / 20120522145033 / files
nightly win64
b038090f07c2 / 15.0a1 / 20120522145033 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 723176: support mac dmg signing in the build system. r=khuey/ted
browser/app/macbuild/Contents/CodeResources
browser/app/macbuild/Contents/_CodeSignature/CodeResources
browser/installer/package-manifest.in
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/signing.mk
new file mode 120000
--- /dev/null
+++ b/browser/app/macbuild/Contents/CodeResources
@@ -0,0 +1,1 @@
+_CodeSignature/CodeResources
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/browser/app/macbuild/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+    <dict>
+        <key>rules</key>
+        <dict>
+            <key>^Info.plist$</key>
+            <true/>
+            <key>^PkgInfo$</key>
+            <true/>
+            <key>^MacOS/</key>
+            <true/>
+            <key>^Resources/</key>
+            <true/>
+            <key>^MacOS/extensions/.*</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/distribution/.*</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/updates/.*</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/active-update.xml$</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/defaults/.*</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/mozilla.cfg$</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+            <key>^MacOS/updates.xml$</key><dict>
+                <key>omit</key>
+                <true/>
+            </dict>
+        </dict>
+    </dict>
+</plist>
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -19,16 +19,18 @@
 
 #filter substitution
 
 #ifdef XP_MACOSX
 ; Mac bundle stuff
 @APPNAME@/Contents/Info.plist
 @APPNAME@/Contents/PkgInfo
 @APPNAME@/Contents/Resources/
+@APPNAME@/Contents/CodeResources
+@APPNAME@/Contents/_CodeSignature/CodeResources
 #endif
 
 [@AB_CD@]
 @BINPATH@/chrome/@AB_CD@@JAREXT@
 @BINPATH@/chrome/@AB_CD@.manifest
 @BINPATH@/defaults/profile/bookmarks.html
 @BINPATH@/defaults/profile/chrome/*
 @BINPATH@/defaults/profile/localstore.rdf
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -548,18 +548,25 @@ MOZ_SIGN_PREPARED_PACKAGE_CMD=$(MOZ_SIGN
 endif
 
 # For final GPG / authenticode signing / dmg signing if required
 ifdef MOZ_EXTERNAL_SIGNING_FORMAT
 MOZ_SIGN_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f))
 endif
 
 ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
+ifeq (Darwin, $(OS_ARCH)) 
+MAKE_PACKAGE    = $(PREPARE_PACKAGE) \
+				  && cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME)  && cd $(_ABS_DIST) \
+				  && $(INNER_MAKE_PACKAGE)
+else
 MAKE_PACKAGE    = $(PREPARE_PACKAGE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) \
 		  $(MOZ_PKG_DIR) && $(INNER_MAKE_PACKAGE)
+endif #Darwin
+
 else
 MAKE_PACKAGE    = $(PREPARE_PACKAGE) && $(INNER_MAKE_PACKAGE)
 endif
 
 ifdef MOZ_SIGN_PACKAGE_CMD
 MAKE_PACKAGE    += && $(MOZ_SIGN_PACKAGE_CMD) "$(PACKAGE)"
 endif
 
--- a/toolkit/mozapps/installer/signing.mk
+++ b/toolkit/mozapps/installer/signing.mk
@@ -18,16 +18,17 @@ SIGN_INCLUDES := \
 SIGN_EXCLUDES := \
   'D3DCompiler*.dll' \
   'd3dx9*.dll' \
   'msvc*.dll' \
   $(NULL)
 endif # Windows
 
 ifeq (Darwin, $(OS_ARCH))
+MOZ_INTERNAL_SIGNING_FORMAT := dmg
 MOZ_EXTERNAL_SIGNING_FORMAT := gpg
 endif # Darwin
 
 ifeq (linux-gnu,$(TARGET_OS))
 MOZ_EXTERNAL_SIGNING_FORMAT := gpg
 endif # Linux
 endif # MOZ_SIGN_CMD