Bug 732976 - SingleSourceFactory should generate checksums file. r=ted, a=lsblakk
authorRail Aliiev <rail@mozilla.com>
Wed, 14 Mar 2012 14:20:38 -0400
changeset 88586 fc318c39e8202f092bd5247da4dc00502365e02d
parent 88585 438dd47e6f698dccab6b1bfecb059a29ef2990eb
child 88589 df27c74980be30bd2580ba92678ce6349e489e8a
push id684
push userraliiev@mozilla.com
push dateWed, 14 Mar 2012 18:27:56 +0000
treeherdermozilla-beta@fc318c39e820 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, lsblakk
bugs732976
milestone12.0
Bug 732976 - SingleSourceFactory should generate checksums file. r=ted, a=lsblakk
browser/build.mk
toolkit/mozapps/installer/package-name.mk
toolkit/mozapps/installer/packager.mk
xulrunner/build.mk
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -93,16 +93,22 @@ distclean::
 	@$(MAKE) -C browser/installer distclean
 
 source-package::
 	@$(MAKE) -C browser/installer source-package
 
 upload::
 	@$(MAKE) -C browser/installer upload
 
+source-upload::
+	@$(MAKE) -C browser/installer source-upload
+
+hg-bundle::
+	@$(MAKE) -C browser/installer hg-bundle
+
 l10n-check::
 	@$(MAKE) -C browser/locales l10n-check
 
 ifdef ENABLE_TESTS
 # Implemented in testing/testsuite-targets.mk
 
 mochitest-browser-chrome:
 	$(RUN_MOCHITEST) --browser-chrome
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -98,16 +98,17 @@ MOZ_SOURCESTAMP_FILE_BASENAME = $(PKG_BA
 PKG_UPDATE_PATH = update/
 COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
 PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
 PKG_LANGPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).langpack
 PKG_LANGPACK_PATH = $(MOZ_PKG_PLATFORM)/xpi/
 LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
 PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).source
+PKG_BUNDLE_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION)
 PKG_SRCPACK_PATH =
 
 else # "pretty" release package names
 
 ifndef MOZ_PKG_APPNAME
 MOZ_PKG_APPNAME = $(MOZ_APP_DISPLAYNAME)
 endif
 MOZ_PKG_APPNAME_LC = $(shell echo $(MOZ_PKG_APPNAME) | tr '[A-Z]' '[a-z]')
@@ -142,16 +143,17 @@ MOZ_SOURCESTAMP_FILE_BASENAME = $(MOZ_PK
 PKG_UPDATE_PATH = update/$(PKG_PATH)
 COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
 PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
 PKG_LANGPACK_BASENAME = $(AB_CD)
 PKG_LANGPACK_PATH = $(MOZ_PKG_PLATFORM)/xpi/
 LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
 PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION).source
+PKG_BUNDLE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
 PKG_SRCPACK_PATH = source/
 
 endif # MOZ_PKG_PRETTYNAMES
 
 # Symbol package naming
 SYMBOL_FULL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols-full
 SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols
 
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -1001,14 +1001,47 @@ SRC_TAR_EXCLUDE_PATHS += \
   --exclude="$(MOZILLA_DIR)/Makefile" \
   --exclude="$(MOZILLA_DIR)/dist"
 ifdef MOZ_OBJDIR
 SRC_TAR_EXCLUDE_PATHS += --exclude="$(MOZ_OBJDIR)"
 endif
 CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
   --mode="go-w" $(SRC_TAR_EXCLUDE_PATHS) -f
 
+SOURCE_TAR = $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_SRCPACK_BASENAME).tar.bz2
+HG_BUNDLE_FILE = $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_BUNDLE_BASENAME).bundle
+SOURCE_CHECKSUM_FILE = $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_SRCPACK_BASENAME).checksums
+SOURCE_UPLOAD_FILES = $(SOURCE_TAR)
+
+HG ?= hg
+CREATE_HG_BUNDLE_CMD  = $(HG) -v -R $(topsrcdir) bundle --base null
+ifdef HG_BUNDLE_REVISION
+CREATE_HG_BUNDLE_CMD += -r $(HG_BUNDLE_REVISION)
+endif
+CREATE_HG_BUNDLE_CMD += $(HG_BUNDLE_FILE)
+ifdef UPLOAD_HG_BUNDLE
+SOURCE_UPLOAD_FILES  += $(HG_BUNDLE_FILE)
+endif
+
+ifdef MOZ_SIGN_CMD
+SIGN_SOURCE_TAR_CMD  = $(MOZ_SIGN_CMD) -f gpg $(SOURCE_TAR)
+SOURCE_UPLOAD_FILES += $(SOURCE_TAR).asc
+SIGN_HG_BUNDLE_CMD   = $(MOZ_SIGN_CMD) -f gpg $(HG_BUNDLE_FILE)
+ifdef UPLOAD_HG_BUNDLE
+SOURCE_UPLOAD_FILES += $(HG_BUNDLE_FILE).asc
+endif
+endif
+
 # 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 "Packaging source tarball..."
-	mkdir -p $(DIST)/$(PKG_SRCPACK_PATH)
-	(cd $(MOZ_PKG_SRCDIR) && $(CREATE_SOURCE_TAR) - $(DIR_TO_BE_PACKAGED)) | bzip2 -vf > $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_SRCPACK_BASENAME).tar.bz2
+	$(MKDIR) -p $(DIST)/$(PKG_SRCPACK_PATH)
+	(cd $(MOZ_PKG_SRCDIR) && $(CREATE_SOURCE_TAR) - $(DIR_TO_BE_PACKAGED)) | bzip2 -vf > $(SOURCE_TAR)
+	$(SIGN_SOURCE_TAR_CMD)
+
+hg-bundle:
+	$(MKDIR) -p $(DIST)/$(PKG_SRCPACK_PATH)
+	$(CREATE_HG_BUNDLE_CMD)
+	$(SIGN_HG_BUNDLE_CMD)
+
+upload-source:
+	$(MAKE) upload UPLOAD_FILES="$(SOURCE_UPLOAD_FILES)" CHECKSUM_FILE="$(SOURCE_CHECKSUM_FILE)"
--- a/xulrunner/build.mk
+++ b/xulrunner/build.mk
@@ -68,12 +68,18 @@ distclean::
 	@$(MAKE) -C xulrunner/installer distclean
 
 source-package::
 	@$(MAKE) -C xulrunner/installer source-package
 
 upload::
 	@$(MAKE) -C xulrunner/installer upload
 
+source-upload::
+	@$(MAKE) -C xulrunner/installer source-upload
+
+hg-bundle::
+	@$(MAKE) -C xulrunner/installer hg-bundle
+
 ifeq ($(OS_TARGET),Linux)
 deb: package
 	@$(MAKE) -C xulrunner/installer deb
 endif