Merge m-c to inbound, a=merge
authorWes Kocher <wkocher@mozilla.com>
Wed, 25 Jan 2017 17:20:02 -0800
changeset 466673 00cbc26bec7fdc29dce591bfed54b30b774d106a
parent 466672 b2c4e4641643e39e317e3bbf2c940bfb788a884e (current diff)
parent 466497 52a34f9a6cf112377299ab32132384e2dc1f543b (diff)
child 466674 4477cdb38b11e900bb79d3dad791f0511aff7c5b
push id42948
push userbmo:gasolin@mozilla.com
push dateThu, 26 Jan 2017 07:49:21 +0000
reviewersmerge
milestone54.0a1
Merge m-c to inbound, a=merge MozReview-Commit-ID: 5BAdhbHtwcj
--- a/taskcluster/ci/nightly-l10n/kind.yml
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -66,20 +66,24 @@ job-template:
             macosx64-nightly: macosx64/opt
             android-api-15-nightly: android-4-0-armv7-api15/opt
    env:
       by-build-platform:
          linux.*:   # linux64 and 32 get same treatment here
             EN_US_PACKAGE_NAME: target.tar.bz2
             EN_US_BINARY_URL:
                task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build
+            MAR_TOOLS_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/host/bin
          macosx64-nightly:
             EN_US_PACKAGE_NAME: target.dmg
             EN_US_BINARY_URL:
                task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build
+            MAR_TOOLS_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/host/bin
          android-api-15-nightly:
             EN_US_PACKAGE_NAME: target.apk
             EN_US_BINARY_URL:
                task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/public/build/en-US
    mozharness:
       config:
          by-build-platform:
             linux-nightly:
--- a/testing/mozharness/configs/single_locale/alder.py
+++ b/testing/mozharness/configs/single_locale/alder.py
@@ -11,28 +11,34 @@
 #
 # If you really want to have localized alder builds, use the use the following
 # values:
 # * "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/alder-%(platform)s/latest/",
 # * "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/alder-%(platform)s/latest/",
 # * "repo": "https://hg.mozilla.org/projects/alder",
 #
 
+import os
+
 config = {
     "nightly_build": True,
     "branch": "alder",
     "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/",
     "update_channel": "nightly",
     "latest_mar_dir": '/pub/mozilla.org/firefox/nightly/latest-mozilla-central-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "alder",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/testing/mozharness/configs/single_locale/ash.py
+++ b/testing/mozharness/configs/single_locale/ash.py
@@ -11,28 +11,34 @@
 #
 # If you really want to have localized ash builds, use the use the following
 # values:
 # * "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/ash-%(platform)s/latest/",
 # * "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/ash-%(platform)s/latest/",
 # * "repo": "https://hg.mozilla.org/projects/ash",
 #
 
+import os
+
 config = {
     "nightly_build": True,
     "branch": "ash",
     "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/",
     "update_channel": "nightly",
     "latest_mar_dir": '/pub/mozilla.org/firefox/nightly/latest-mozilla-central-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "ash",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/testing/mozharness/configs/single_locale/date.py
+++ b/testing/mozharness/configs/single_locale/date.py
@@ -1,20 +1,26 @@
+import os
+
 config = {
     "nightly_build": True,
     "branch": "date",
     "en_us_binary_url": "http://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central",
     "update_channel": "nightly-date",
     "latest_mar_dir": '/pub/firefox/nightly/latest-date-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "date",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/testing/mozharness/configs/single_locale/mozilla-aurora.py
+++ b/testing/mozharness/configs/single_locale/mozilla-aurora.py
@@ -1,20 +1,26 @@
+import os
+
 config = {
     "nightly_build": True,
     "branch": "mozilla-aurora",
     "en_us_binary_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/",
     "update_channel": "aurora",
     "latest_mar_dir": '/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/releases/l10n/mozilla-aurora",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "mozilla-aurora",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/testing/mozharness/configs/single_locale/mozilla-central.py
+++ b/testing/mozharness/configs/single_locale/mozilla-central.py
@@ -1,20 +1,26 @@
+import os
+
 config = {
     "nightly_build": True,
     "branch": "mozilla-central",
     "en_us_binary_url": "http://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central",
     "update_channel": "nightly",
     "latest_mar_dir": '/pub/firefox/nightly/latest-mozilla-central-l10n',
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "mozilla-central",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/testing/mozharness/configs/single_locale/try.py
+++ b/testing/mozharness/configs/single_locale/try.py
@@ -1,21 +1,27 @@
+import os
+
 config = {
     "nightly_build": False,
     "branch": "try",
     "en_us_binary_url": "http://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central",
     "update_channel": "nightly",
     "latest_mar_dir": '/pub/firefox/nightly/latest-mozilla-central-l10n',
     "update_gecko_source_to_enUS": False,
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
-    "mar_tools_url": "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s",
+    "mar_tools_url": os.environ.get(
+        "MAR_TOOLS_URL",
+        # Buildbot l10n fetches from ftp rather than setting an environ var
+        "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/mar-tools/%(platform)s"
+    ),
 
     # repositories
     "mozilla_dir": "try",
     "repos": [{
         "vcs": "hg",
         "repo": "https://hg.mozilla.org/build/tools",
         "branch": "default",
         "dest": "tools",
--- a/tools/update-packaging/Makefile.in
+++ b/tools/update-packaging/Makefile.in
@@ -55,25 +55,27 @@ dir-stage := $(call mkdir_deps,$(STAGE_D
 
 complete-patch:: $(dir-stage)
 ifeq ($(OS_TARGET), WINNT)
 	test -f $(UNPACKAGE)
 	$(RM) -rf '$(PACKAGE_DIR)'
 	cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
 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 '$(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 '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar'
 endif
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -102,17 +102,23 @@ done
 # Append remove instructions for any dead files.
 notice ""
 notice "Adding file and directory remove instructions from file 'removed-files'"
 append_remove_instructions "$targetdir" "$updatemanifestv2" "$updatemanifestv3"
 
 $BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
 $BZIP2 -z9 "$updatemanifestv3" && mv -f "$updatemanifestv3.bz2" "$updatemanifestv3"
 
-eval "$MAR -C \"$workdir\" -c output.mar $targetfiles"
+mar_command="$MAR"
+if [[ -n $MOZ_PRODUCT_VERSION ]]
+then
+  mar_command="$mar_command -V $MOZ_PRODUCT_VERSION"
+fi
+mar_command="$mar_command -C \"$workdir\" -c output.mar"
+eval "$mar_command $targetfiles"
 mv -f "$workdir/output.mar" "$archive"
 
 # cleanup
 rm -fr "$workdir"
 
 notice ""
 notice "Finished"
 notice ""