[tor-commits] [tor-browser-build/master] Bug 26319: Don't package up the whole Tor Browser in the `mach package` step

gk at torproject.org gk at torproject.org
Wed Jun 27 12:16:55 UTC 2018


commit 8d1c4c396034b2ab0b7c55982e1900236f5031a6
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Fri Jun 22 15:51:51 2018 -0400

    Bug 26319: Don't package up the whole Tor Browser in the `mach package` step
    
    This commit sets `mach build stage-package` instead of `mach package` in
    the Firefox build; this helps us to use the useful properties of `mach
    package` but avoids creating the final DMG or EXE during the Firefox
    build which we don't want as we do that later when building Tor Browser.
    
    We no longer need to patch `installer.py` (bug 26205) but we still need
    the patch for the uninstaller otherwise the Firefox build fails trying
    to find the required NSIS files.
    
    The no-dmg.patch for macOS is also not required and is removed (bug 24632).
---
 projects/firefox/build                |  6 +-----
 projects/firefox/config               |  2 --
 projects/firefox/no-dmg.patch         | 29 --------------------------
 projects/firefox/nsis-uninstall.patch | 39 +++++------------------------------
 4 files changed, 6 insertions(+), 70 deletions(-)

diff --git a/projects/firefox/build b/projects/firefox/build
index e6fa41c..1921f53 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -138,16 +138,12 @@ fi
   patch -p1 < $rootdir/1467041.patch
 [% END -%]
 
-[% IF c("var/osx") %]
-  patch -p1 < $rootdir/no-dmg.patch
-[% END -%]
-
 rm -f configure
 rm -f js/src/configure
 
 ./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %] --with-distribution-id=org.torproject --enable-update-channel=[% c("var/torbrowser_update_channel") %] --enable-bundled-fonts
 ./mach build
-./mach package
+./mach build stage-package
 
 [% IF c("var/osx") %]
   cp -a obj-macos/dist/firefox/* $distdir
diff --git a/projects/firefox/config b/projects/firefox/config
index 303ca0d..3284ed4 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -93,8 +93,6 @@ input_files:
     enable: '[% c("var/selfrando") %]'
   - filename: fix-info-plist.py
     enable: '[% c("var/osx") %]'
-  - filename: no-dmg.patch
-    enable: '[% c("var/osx") %]'
   - URL: https://people.torproject.org/~gk/mirrors/sources/msvcr100.dll
     sha256sum: 8793353461826fbd48f25ea8b835be204b758ce7510db2af631b28850355bd18
     enable: '[% c("var/windows-i686") %]'
diff --git a/projects/firefox/no-dmg.patch b/projects/firefox/no-dmg.patch
deleted file mode 100644
index 1e722af..0000000
--- a/projects/firefox/no-dmg.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7204fc9191a55dbbd3b94ee2d64ece8d9910cf23 Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk at torproject.org>
-Date: Thu, 31 May 2018 19:15:18 +0000
-Subject: [PATCH] Don't create a .dmg yet
-
-
-diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk
-index 8ace9703a160..82df89d1f431 100644
---- a/toolkit/mozapps/installer/upload-files.mk
-+++ b/toolkit/mozapps/installer/upload-files.mk
-@@ -216,14 +216,7 @@ ifeq ($(MOZ_PKG_FORMAT),DMG)
- 
-   _ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd)
-   PKG_DMG_SOURCE = $(MOZ_PKG_DIR)
--  INNER_MAKE_PACKAGE = \
--    $(call py_action,make_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)') \
--        --volume-name '$(MOZ_APP_DISPLAYNAME)' \
--        '$(PKG_DMG_SOURCE)' '$(PACKAGE)' \
--        )
-+  INNER_MAKE_PACKAGE = true
-   INNER_UNMAKE_PACKAGE = \
-     $(call py_action,unpack_dmg, \
-         $(if $(MOZ_PKG_MAC_DSSTORE),--dsstore '$(MOZ_PKG_MAC_DSSTORE)') \
--- 
-2.17.0
-
diff --git a/projects/firefox/nsis-uninstall.patch b/projects/firefox/nsis-uninstall.patch
index 765ef67..60e4e3d 100644
--- a/projects/firefox/nsis-uninstall.patch
+++ b/projects/firefox/nsis-uninstall.patch
@@ -1,14 +1,13 @@
-From 4ef264b601ac92a0b385c40bd011ef94618a176a Mon Sep 17 00:00:00 2001
+From e338a77c64c0afb72e857c7daa63346d35ad3891 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Tue, 12 Jun 2018 21:58:24 -0400
 Subject: [PATCH 1/1] Bug 26205: Don't build the uninstaller for Windows during
  Firefox compilation
 
 ---
- browser/Makefile.in                             |  4 ----
- browser/installer/Makefile.in                   |  4 ----
- .../mozbuild/mozbuild/repackaging/installer.py  | 17 +----------------
- 3 files changed, 1 insertion(+), 24 deletions(-)
+ browser/Makefile.in           | 4 ----
+ browser/installer/Makefile.in | 4 ----
+ 2 files changed, 8 deletions(-)
 
 diff --git a/browser/Makefile.in b/browser/Makefile.in
 index 2eb9e708f68e..0c9442183942 100644
@@ -40,34 +39,6 @@ index 1bf11252ee06..dee6d5434106 100644
  ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
  MOZ_PKG_MAC_DSSTORE=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/dsstore
  MOZ_PKG_MAC_BACKGROUND=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/background.png
-diff --git a/python/mozbuild/mozbuild/repackaging/installer.py b/python/mozbuild/mozbuild/repackaging/installer.py
-index 9b49eb555153..1e6f6e73c3d8 100644
---- a/python/mozbuild/mozbuild/repackaging/installer.py
-+++ b/python/mozbuild/mozbuild/repackaging/installer.py
-@@ -27,22 +27,7 @@ def repackage_installer(topsrcdir, tag, setupexe, package, output, package_name,
-     tmpdir = tempfile.mkdtemp()
-     old_cwd = os.getcwd()
-     try:
--        if package:
--            z = zipfile.ZipFile(package)
--            z.extractall(tmpdir)
--            z.close()
--
--        # Copy setup.exe into the root of the install dir, alongside the
--        # package.
--        shutil.copyfile(setupexe, mozpath.join(tmpdir, mozpath.basename(setupexe)))
--
--        # archive_exe requires us to be in the directory where the package is
--        # unpacked (the tmpdir)
--        os.chdir(tmpdir)
--
--        sfx_package = mozpath.join(topsrcdir, sfx_stub)
--
--        archive_exe(package_name, tag, sfx_package, output)
-+        pass
- 
-     finally:
-         os.chdir(old_cwd)
 -- 
-2.17.1
+2.18.0.rc2
 



More information about the tor-commits mailing list