Bug 1123990 - installer needs voucher.bin; r=glandium, r=cpearce
☠☠ backed out by ae5d04409cd9 ☠ ☠
authorMike Shal <mshal@mozilla.com>
Wed, 21 Jan 2015 18:27:20 -0500
changeset 227070 2742651b0cd9f920f6135896985eae2b2106b424
parent 227069 29c52dbbd2abf3e81c792d3f9281d24bf4eeaa17
child 227071 f6baaf87b073d31ec5e248763c351b07c85f7d3a
push id28219
push userryanvm@gmail.com
push dateMon, 02 Feb 2015 22:28:16 +0000
treeherdermozilla-central@7c87286ce969 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, cpearce
bugs1123990
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1123990 - installer needs voucher.bin; r=glandium, r=cpearce
build/moz-automation.mk
toolkit/mozapps/installer/make-eme.mk
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/packager.py
toolkit/mozapps/installer/upload-files.mk
--- a/build/moz-automation.mk
+++ b/build/moz-automation.mk
@@ -76,16 +76,20 @@ automation/upload: automation/package-te
 automation/upload: automation/buildsymbols
 automation/upload: automation/update-packaging
 
 # automation/{pretty-}package should depend on build (which is implicit due to
 # the way client.mk invokes automation/build), but buildsymbols changes the
 # binaries/libs, and that's what we package/test.
 automation/pretty-package: automation/buildsymbols
 
+# The installer and packager both run stage-package, and may conflict
+# with each other.
+automation/installer: automation/package
+
 # The 'pretty' versions of targets run before the regular ones to avoid
 # conflicts in writing to the same files.
 automation/installer: automation/pretty-installer
 automation/package: automation/pretty-package
 automation/package-tests: automation/pretty-package-tests
 automation/l10n-check: automation/pretty-l10n-check
 automation/update-packaging: automation/pretty-update-packaging
 
--- a/toolkit/mozapps/installer/make-eme.mk
+++ b/toolkit/mozapps/installer/make-eme.mk
@@ -1,13 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
 
 ifdef MOZ_SIGN_CMD
   ifeq ($(OS_ARCH),WINNT)
-    # Note: CWD is DIST
-    MAKE_SIGN_EME_VOUCHER := $(PYTHON) $(MOZILLA_DIR)/python/eme/gen-eme-voucher.py -input $(STAGEPATH)$(MOZ_PKG_DIR)/plugin-container.exe -output $(STAGEPATH)$(MOZ_PKG_DIR)/voucher.bin && \
-      $(MOZ_SIGN_CMD) -f emevoucher "$(STAGEPATH)$(MOZ_PKG_DIR)/voucher.bin"
+    # The argument to this macro is the directory where plugin-container.exe
+    # exists, and where voucher.bin will be generated.
+    MAKE_SIGN_EME_VOUCHER = $(PYTHON) $(MOZILLA_DIR)/python/eme/gen-eme-voucher.py -input $(1)/plugin-container.exe -output $(1)/voucher.bin && \
+      $(MOZ_SIGN_CMD) -f emevoucher "$(1)/voucher.bin"
   endif
 endif
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -17,21 +17,22 @@ endif
 installer-stage: prepare-package
 ifndef MOZ_PKG_MANIFEST
 	$(error MOZ_PKG_MANIFEST unspecified!)
 endif
 	@rm -rf $(DEPTH)/installer-stage $(DIST)/xpt
 	@echo 'Staging installer files...'
 	@$(NSINSTALL) -D $(DEPTH)/installer-stage/core
 	@cp -av $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
-	@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
 ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
 # The && true is necessary to make sure Pymake spins a shell
 	$(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(DEPTH)/installer-stage && true
 endif
+	$(call MAKE_SIGN_EME_VOUCHER,$(DEPTH)/installer-stage/core)
+	@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
 
 # Override the value of OMNIJAR_NAME from config.status with the value
 # set earlier in this file.
 
 stage-package: $(MOZ_PKG_MANIFEST)
 	@rm -rf $(DIST)/$(PKG_PATH)$(PKG_BASENAME).tar $(DIST)/$(PKG_PATH)$(PKG_BASENAME).dmg $@ $(EXCLUDE_LIST)
 	OMNIJAR_NAME=$(OMNIJAR_NAME) \
 	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.py $(DEFINES) \
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -22,17 +22,16 @@ from mozpack.copier import (
     FileCopier,
     Jarrer,
 )
 from mozpack.errors import errors
 from mozpack.unify import UnifiedBuildFinder
 import mozpack.path
 import buildconfig
 from argparse import ArgumentParser
-from createprecomplete import generate_precomplete
 import os
 from StringIO import StringIO
 import subprocess
 import platform
 import mozinfo
 
 # List of libraries to shlibsign.
 SIGN_LIBS = [
@@ -389,14 +388,12 @@ def main():
             if not gre_path:
                 gre_path = base
             base_path = sink.normalize_path(base)
             if base_path in formatter.omnijars:
                 precompile_cache(formatter.omnijars[base_path],
                                  args.source, gre_path, base)
 
     copier.copy(args.destination)
-    generate_precomplete(os.path.normpath(os.path.join(args.destination,
-                                                       respath)))
 
 
 if __name__ == '__main__':
     main()
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -519,25 +519,27 @@ endif
 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    = cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
                   && cd $(PACKAGE_BASE_DIR) \
+		  && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) \
                   && $(INNER_MAKE_PACKAGE)
 else
 MAKE_PACKAGE    = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \
-                  && $(or $(MAKE_SIGN_EME_VOUCHER),true) \
+                  && $(or $(call MAKE_SIGN_EME_VOUCHER,$(STAGEPATH)$(MOZ_PKG_DIR)),true) \
+		  && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) \
                   && $(INNER_MAKE_PACKAGE)
 endif #Darwin
 
 else
-MAKE_PACKAGE    = $(INNER_MAKE_PACKAGE)
+MAKE_PACKAGE    = $(INNER_MAKE_PACKAGE) && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD))
 endif
 
 ifdef MOZ_SIGN_PACKAGE_CMD
 MAKE_PACKAGE    += && $(MOZ_SIGN_PACKAGE_CMD) '$(PACKAGE)'
 endif
 
 ifdef MOZ_SIGN_CMD
 MAKE_SDK           += && $(MOZ_SIGN_CMD) -f gpg $(SDK)