diff options
author | Moonchild <moonchild@palemoon.org> | 2022-04-17 19:19:34 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-17 19:21:40 +0200 |
commit | d2a4597cfc490de13ffe49bb194ee7d3097faccf (patch) | |
tree | 66e250292f0f46204bfb1d9f0ac9236252c3cf17 | |
parent | 43165d9edb2f9ac5a65ff9507b462fc948a665ba (diff) | |
download | uxp-d2a4597cfc490de13ffe49bb194ee7d3097faccf.tar.gz |
Issue #1859 - Part 6: Update mach mar to accept --bz2 for old style MAR
So we can build bzip2 MARs for selectively updating older versions of
the applications that don't understand xz.
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 9 | ||||
-rw-r--r-- | toolkit/mozapps/installer/package-name.mk | 1 | ||||
-rw-r--r-- | tools/update-packaging/Makefile.in | 22 |
3 files changed, 29 insertions, 3 deletions
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index a2983b48c2..4f58a2a33d 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -1140,8 +1140,13 @@ class Mar(MachCommandBase): @Command('mar', category='post-build', description='Create the mar file for the built product for distribution.') - def mar(self): - return self._run_make(directory="./tools/update-packaging/", target='', ensure_exit_code=False) + @CommandArgument('--bz2', action='store_true', + help='Compress the mar package with old-style bz2 instead of xz') + def mar(self, bz2): + if bz2: + return self._run_make(directory="./tools/update-packaging/", target='mar-package-bz2', ensure_exit_code=False) + else: + return self._run_make(directory="./tools/update-packaging/", target='mar-package', ensure_exit_code=False) @CommandProvider class Install(MachCommandBase): diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index 680590b3c5..548a93b47f 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -80,6 +80,7 @@ PKG_UPDATE_BASENAME = $(PKG_BASENAME) CHECKSUMS_FILE_BASENAME = $(PKG_BASENAME) MOZ_INFO_BASENAME = $(PKG_BASENAME) PKG_UPDATE_PATH = $(PKG_PATH) +BARE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).mar 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 diff --git a/tools/update-packaging/Makefile.in b/tools/update-packaging/Makefile.in index 4788a55752..a751ae3ce5 100644 --- a/tools/update-packaging/Makefile.in +++ b/tools/update-packaging/Makefile.in @@ -31,7 +31,7 @@ MAR_BIN = $(DIST)/host/bin/mar$(HOST_BIN_SUFFIX) MBSDIFF_BIN = $(DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX) OVERRIDE_DEFAULT_GOAL := full-update -full-update:: complete-patch +full-update:: mar-package ifeq ($(OS_TARGET), WINNT) ifdef AB_CD @@ -70,3 +70,23 @@ partial-patch:: $(dir-stage) ifdef MOZ_SIGN_CMD $(MOZ_SIGN_CMD) -f mar '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' endif + +mar-package: $(call mkdir_deps,$(ABS_DIST)/$(PKG_STAGE_DIR)) + @echo 'Creating update mar (xz compressed)...' + MAR=$(MAR_BIN) \ + $(srcdir)/make_full_update.sh \ + '$(DIST)/$(BARE_MAR)' \ + '$(PACKAGE_DIR)' +ifdef MOZ_SIGN_CMD + $(MOZ_SIGN_CMD) -f mar '$(DIST)/$(BARE_MAR)' +endif + +mar-package-bz2: $(call mkdir_deps,$(ABS_DIST)/$(PKG_STAGE_DIR)) + @echo 'Creating update mar (bz2 compressed)...' + MAR_OLD_FORMAT=1 MAR=$(MAR_BIN) \ + $(srcdir)/make_full_update.sh \ + '$(DIST)/$(COMPLETE_MAR)' \ + '$(PACKAGE_DIR)' +ifdef MOZ_SIGN_CMD + $(MOZ_SIGN_CMD) -f mar '$(DIST)/$(COMPLETE_MAR)' +endif
\ No newline at end of file |