Bug 1507631 - Remove mentions of MOZ_SIGN_CMD from the build system. r=nalexander
authorChris Manchester <cmanchester@mozilla.com>
Wed, 16 Jan 2019 22:46:38 +0000
changeset 514323 471d9fab61b34671f974dfa349e7972c200faa2b
parent 514322 49edd076512c9875f853d37695ab3f5abcdb8c6d
child 514324 33247481200e0d9b4ddddaf9ce99e4a86b50c854
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1507631
milestone66.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 1507631 - Remove mentions of MOZ_SIGN_CMD from the build system. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D16754
browser/installer/Makefile.in
toolkit/locales/l10n.mk
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/signing.mk
toolkit/mozapps/installer/upload-files-APK.mk
toolkit/mozapps/installer/upload-files.mk
toolkit/mozapps/installer/windows/nsis/makensis.mk
tools/update-packaging/Makefile.in
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -105,17 +105,16 @@ endif
 # files for l10n), and JS.  Setting MOZ_PACKAGER_MINIFY only minifies the
 # former.  We don't yet minify JS, due to concerns about debuggability.
 #
 # Also, the JS minification setup really only works correctly on Android:
 # we need extra setup to use the newly-built shell for Linux and Windows,
 # and Mac requires some extra care due to cross-compilation.
 MOZ_PACKAGER_MINIFY=1
 
-include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 ifeq (bundle, $(MOZ_FS_LAYOUT))
 BINPATH = $(_BINPATH)
 DEFINES += -DAPPNAME='$(_APPNAME)'
 else
 # Every other platform just winds up in dist/bin
 BINPATH = bin
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -73,17 +73,16 @@ PACKAGER_NO_LIBS = 1
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 STAGEDIST = $(ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources
 else
 STAGEDIST = $(ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
 endif
 UNPACKED_INSTALLER = $(ABS_DIST)/unpacked-installer
 
-include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.mk
 
 PACKAGE_BASE_DIR = $(ABS_DIST)/l10n-stage
 
 $(UNPACKED_INSTALLER): AB_CD:=en-US
 $(UNPACKED_INSTALLER): UNPACKAGE=$(call ESCAPE_WILDCARD,$(ZIP_IN))
 $(UNPACKED_INSTALLER): $(call ESCAPE_WILDCARD,$(ZIP_IN))
 # only mac needs to remove the parent of STAGEDIST...
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -137,17 +137,16 @@ upload:
 	mkdir -p `dirname $(CHECKSUM_FILE)`
 	@$(PYTHON) $(MOZILLA_DIR)/build/checksums.py \
 		-o $(CHECKSUM_FILE) \
 		$(CHECKSUM_ALGORITHM_PARAM) \
 		$(UPLOAD_PATH)
 	@echo 'CHECKSUM FILE START'
 	@cat $(CHECKSUM_FILE)
 	@echo 'CHECKSUM FILE END'
-	$(SIGN_CHECKSUM_CMD)
 	$(PYTHON) -u $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) $(CHECKSUM_FILES)
 
 # source-package creates a source tarball from the files in MOZ_PKG_SRCDIR,
 # which is either set to a clean checkout or defaults to $topsrcdir
 source-package:
 	@echo 'Generate the sourcestamp file'
 	# Make sure to have repository information available and then generate the
 	# sourcestamp file.
deleted file mode 100644
--- a/toolkit/mozapps/installer/signing.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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/.
-
-# We shouldn't sign the first pass of a PGO build
-ifndef MOZ_PROFILE_GENERATE
-
-# Signing support
-ifdef MOZ_SIGN_CMD
-ifeq (WINNT,$(OS_ARCH))
-MOZ_INTERNAL_SIGNING_FORMAT := sha2signcode
-MOZ_EXTERNAL_SIGNING_FORMAT := sha2signcode
-MOZ_EXTERNAL_SIGNING_FORMAT_STUB := sha2signcodestub
-SIGN_INCLUDES := \
-  '*.dll' \
-  '*.exe' \
-  $(NULL)
-
-SIGN_EXCLUDES := \
-  'D3DCompiler*.dll' \
-  'msvc*.dll' \
-  $(NULL)
-endif # Windows
-
-ifeq (Darwin, $(OS_ARCH))
-MOZ_INTERNAL_SIGNING_FORMAT := macapp
-MOZ_EXTERNAL_SIGNING_FORMAT :=
-endif # Darwin
-
-ifeq (linux-gnu,$(TARGET_OS))
-MOZ_EXTERNAL_SIGNING_FORMAT :=
-endif # Linux
-
-ifdef MOZ_ASAN
-MOZ_INTERNAL_SIGNING_FORMAT :=
-MOZ_EXTERNAL_SIGNING_FORMAT :=
-endif
-
-endif # MOZ_SIGN_CMD
-
-endif # MOZ_PROFILE_GENERATE
--- a/toolkit/mozapps/installer/upload-files-APK.mk
+++ b/toolkit/mozapps/installer/upload-files-APK.mk
@@ -7,22 +7,17 @@
 # upload-files.mk.
 
 # DEBUG_JARSIGNER always debug signs.
 DEBUG_JARSIGNER=$(PYTHON) $(abspath $(topsrcdir)/mobile/android/debug_sign_tool.py) \
   --keytool=$(KEYTOOL) \
   --jarsigner=$(JARSIGNER) \
   $(NULL)
 
-# RELEASE_JARSIGNER release signs if possible.
-ifdef MOZ_SIGN_CMD
-RELEASE_JARSIGNER := $(MOZ_SIGN_CMD) -f jar
-else
 RELEASE_JARSIGNER := $(DEBUG_JARSIGNER)
-endif
 
 # $(1) is the full path to input:  foo-debug-unsigned-unaligned.apk.
 # $(2) is the full path to output: foo.apk.
 # Use this like: $(call RELEASE_SIGN_ANDROID_APK,foo-debug-unsigned-unaligned.apk,foo.apk)
 #
 # The |zip -d| there to handle re-signing previously signed APKs.  Gradle
 # produces signed, unaligned APK files, but this expects unsigned, unaligned
 # APK files.  The |zip -d| discards any existing signature, turning a signed,
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -239,44 +239,17 @@ ifeq ($(MOZ_PKG_FORMAT),DMG)
     $(call py_action,unpack_dmg, \
         $(if $(MOZ_PKG_MAC_DSSTORE),--dsstore '$(MOZ_PKG_MAC_DSSTORE)') \
         $(if $(MOZ_PKG_MAC_BACKGROUND),--background '$(MOZ_PKG_MAC_BACKGROUND)') \
         $(if $(MOZ_PKG_MAC_ICON),--icon '$(MOZ_PKG_MAC_ICON)') \
         $(UNPACKAGE) $(MOZ_PKG_DIR) \
         )
 endif
 
-ifdef MOZ_INTERNAL_SIGNING_FORMAT
-  MOZ_SIGN_PREPARED_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_INTERNAL_SIGNING_FORMAT),-f $(f)) $(foreach i,$(SIGN_INCLUDES),-i $(i)) $(foreach x,$(SIGN_EXCLUDES),-x $(x))
-  ifeq (WINNT,$(OS_ARCH))
-    MOZ_SIGN_PREPARED_PACKAGE_CMD += --nsscmd '$(ABS_DIST)/bin/shlibsign$(BIN_SUFFIX) -v -i'
-  endif
-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    = cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) '$(MOZ_MACBUNDLE_NAME)' \
-                      && cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE)
-  else
-    MAKE_PACKAGE    = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \
-                      && $(INNER_MAKE_PACKAGE)
-  endif #Darwin
-
-else
-  MAKE_PACKAGE    = $(INNER_MAKE_PACKAGE)
-endif
-
-ifdef MOZ_SIGN_PACKAGE_CMD
-  MAKE_PACKAGE    += && $(MOZ_SIGN_PACKAGE_CMD) '$(PACKAGE)'
-endif
+MAKE_PACKAGE = $(INNER_MAKE_PACKAGE)
 
 NO_PKG_FILES += \
 	core \
 	bsdecho \
 	js \
 	js-config \
 	jscpucfg \
 	nsinstall \
@@ -426,27 +399,16 @@ endif
 
 
 ifdef ENABLE_MOZSEARCH_PLUGIN
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_ARCHIVE_BASENAME).zip)
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_RUST_ANALYSIS_BASENAME).zip)
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_INCLUDEMAP_BASENAME).map)
 endif
 
-SIGN_CHECKSUM_CMD=
-ifdef MOZ_SIGN_CMD
-  # If we're signing with gpg, we'll have a bunch of extra detached signatures to
-  # upload. We also want to sign our checksums file
-  SIGN_CHECKSUM_CMD=$(MOZ_SIGN_CMD) -f gpg $(CHECKSUM_FILE)
-
-  CHECKSUM_FILES += $(CHECKSUM_FILE).asc
-  UPLOAD_FILES += $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE).asc)
-  UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE).asc)
-endif
-
 ifdef MOZ_STUB_INSTALLER
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe)
 endif
 
 ifndef MOZ_PKG_SRCDIR
   MOZ_PKG_SRCDIR = $(topsrcdir)
 endif
 
--- a/toolkit/mozapps/installer/windows/nsis/makensis.mk
+++ b/toolkit/mozapps/installer/windows/nsis/makensis.mk
@@ -1,18 +1,16 @@
 # 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/.
 
 ifndef CONFIG_DIR
 $(error CONFIG_DIR must be set before including makensis.mk)
 endif
 
-include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
-
 ABS_CONFIG_DIR := $(abspath $(CONFIG_DIR))
 
 SFX_MODULE ?= $(error SFX_MODULE is not defined)
 
 TOOLKIT_NSIS_FILES = \
 	common.nsh \
 	locale.nlf \
 	locale-fonts.nsh \
@@ -45,34 +43,28 @@ CUSTOM_UI = \
 $(CONFIG_DIR)/setup.exe::
 	$(INSTALL) $(addprefix $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/Plugins/,$(CUSTOM_NSIS_PLUGINS)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(MOZILLA_DIR)/other-licenses/nsis/,$(CUSTOM_UI)) $(CONFIG_DIR)
 	cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) installer.nsi
 ifdef MOZ_STUB_INSTALLER
 	cd $(CONFIG_DIR) && $(MAKENSISU) $(MAKENSISU_FLAGS) stub.nsi
 endif
-ifdef MOZ_EXTERNAL_SIGNING_FORMAT
-	$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$@"
-endif
 
 ifdef ZIP_IN
 installer:: $(CONFIG_DIR)/setup.exe $(ZIP_IN)
 	@echo 'Packaging $(WIN32_INSTALLER_OUT).'
 	$(NSINSTALL) -D '$(ABS_DIST)/$(PKG_INST_PATH)'
 	$(MOZILLA_DIR)/mach repackage installer \
 	  -o '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe' \
 	  --package-name '$(MOZ_PKG_DIR)' \
 	  --package '$(ZIP_IN)' \
 	  --tag $(topsrcdir)/$(MOZ_BUILD_APP)/installer/windows/app.tag \
 	  --setupexe $(CONFIG_DIR)/setup.exe \
 	  --sfx-stub $(SFX_MODULE)
-ifdef MOZ_EXTERNAL_SIGNING_FORMAT
-	$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),-f $(f)) "$(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
-endif
 ifdef MOZ_STUB_INSTALLER
 	$(MOZILLA_DIR)/mach repackage installer \
 	  -o '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe' \
 	  --tag $(topsrcdir)/browser/installer/windows/stub.tag \
 	  --setupexe $(CONFIG_DIR)/setup-stub.exe \
 	  --sfx-stub $(SFX_MODULE)
 endif
 else
--- a/tools/update-packaging/Makefile.in
+++ b/tools/update-packaging/Makefile.in
@@ -26,17 +26,16 @@ OVERRIDE_DEFAULT_GOAL := full-update
 full-update:: complete-patch
 
 ifeq ($(OS_TARGET), WINNT)
 MOZ_PKG_FORMAT	:= SFX7Z
 UNPACKAGE	= '$(subst $(DIST),$(ABS_DIST),$(INSTALLER_PACKAGE))'
 endif
 
 include $(topsrcdir)/config/rules.mk
-include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 ifdef MOZ_EXTERNAL_SIGNING_FORMAT
 # We can't use sha2signcode on mar files
 MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out sha2signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
 MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
 endif
 
@@ -57,23 +56,17 @@ ifeq ($(OS_TARGET), WINNT)
 	cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
 endif
 endif
 	MAR=$(MAR_BIN) \
 	MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
 	  $(srcdir)/make_full_update.sh \
 	  '$(DIST)/$(COMPLETE_MAR)' \
 	  '$(PACKAGE_DIR)'
-ifdef MOZ_SIGN_CMD
-	$(MOZ_SIGN_CMD) -f $(MAR_SIGN_FORMAT) '$(DIST)/$(COMPLETE_MAR)'
-endif
 
 partial-patch:: $(dir-stage)
 	MAR=$(MAR_BIN) \
 	MBSDIFF=$(MBSDIFF_BIN) \
 	MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
 	  $(srcdir)/make_incremental_update.sh \
 	  '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
 	  '$(SRC_BUILD)' \
 	  '$(DST_BUILD)'
-ifdef MOZ_SIGN_CMD
-	$(MOZ_SIGN_CMD) -f $(MAR_SIGN_FORMAT) '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar'
-endif