Verified Commit 32b0c6ed authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! Bug 4234: Use the Firefox Update Process for Base Browser.

Bug 41668: Port some updater patches to Base Browser

Remove Tor Browser-only additions to make the updater patches usable
with Base Browser.
This commit should be reverted, and become a commit on its own, to
further adapt the updater to Tor Browser needs.
parent a6ab4b56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ XPCOMUtils.defineLazyGetter(this, "gSystemPrincipal", () =>
XPCOMUtils.defineLazyGlobalGetters(this, [URL]);

const FORK_VERSION_PREF =
  "browser.startup.homepage_override.torbrowser.version";
  "browser.startup.homepage_override.basebrowser.version";

// One-time startup homepage override configurations
const ONCE_DOMAINS = ["mozilla.org", "firefox.com"];
+6 −6
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@ MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
# of values.
# The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
if test "$MOZ_UPDATE_CHANNEL" = "alpha"; then
  ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-alpha
  MAR_CHANNEL_ID=torbrowser-torproject-alpha
  ACCEPTED_MAR_CHANNEL_IDS=basebrowser-torproject-alpha
  MAR_CHANNEL_ID=basebrowser-torproject-alpha
elif test "$MOZ_UPDATE_CHANNEL" = "nightly"; then
  ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-nightly
  MAR_CHANNEL_ID=torbrowser-torproject-nightly
  ACCEPTED_MAR_CHANNEL_IDS=basebrowser-torproject-nightly
  MAR_CHANNEL_ID=basebrowser-torproject-nightly
else
  ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-release
  MAR_CHANNEL_ID=torbrowser-torproject-release
  ACCEPTED_MAR_CHANNEL_IDS=basebrowser-torproject-release
  MAR_CHANNEL_ID=basebrowser-torproject-release
fi

# Include the DevTools client, not just the server (which is the default)
+1 −1
Original line number Diff line number Diff line
@@ -52,5 +52,5 @@ ServerURL=@MOZ_CRASHREPORTER_URL@/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSIO

#if MOZ_UPDATER
[AppUpdate]
URL=https://aus1.torproject.org/torbrowser/update_3/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL
URL=https://aus1.torproject.org/basebrowser/update_3/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL
#endif
+1 −17
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
# update instructions which is used to remove files and directories that are no
# longer present in a complete update. The current working directory is used for
# the location to enumerate and to create the precomplete file.
# For symlinks, remove instructions are always generated.

from __future__ import absolute_import
from __future__ import unicode_literals
@@ -14,17 +13,9 @@ import os
import io


# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
# we should remove all lines in this file that contain:
#      TorBrowser/Data

def get_build_entries(root_path):
    """Iterates through the root_path, creating a list for each file and
    directory. Excludes any file paths ending with channel-prefs.js.
    To support Tor Browser updates, excludes:
      TorBrowser/Data/Browser/profiles.ini
      TorBrowser/Data/Browser/profile.default/bookmarks.html
      TorBrowser/Data/Tor/torrc
    """
    rel_file_path_set = set()
    rel_dir_path_set = set()
@@ -36,10 +27,6 @@ def get_build_entries(root_path):
            if not (
                rel_path_file.endswith("channel-prefs.js")
                or rel_path_file.endswith("update-settings.ini")
                or rel_path_file == "TorBrowser/Data/Browser/profiles.ini"
                or rel_path_file
                == "TorBrowser/Data/Browser/profile.default/bookmarks.html"
                or rel_path_file == "TorBrowser/Data/Tor/torrc"
                or rel_path_file.find("distribution/") != -1
            ):
                rel_file_path_set.add(rel_path_file)
@@ -49,9 +36,6 @@ def get_build_entries(root_path):
            rel_path_dir = os.path.join(parent_dir_rel_path, dir_name)
            rel_path_dir = rel_path_dir.replace("\\", "/") + "/"
            if rel_path_dir.find("distribution/") == -1:
                if os.path.islink(rel_path_dir[:-1]):
                    rel_file_path_set.add(rel_path_dir[:-1])
                else:
                rel_dir_path_set.add(rel_path_dir)

    rel_file_path_list = list(rel_file_path_set)
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ const PREF_EM_STRICT_COMPATIBILITY = "extensions.strictCompatibility";
const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity";
const PREF_SYS_ADDON_UPDATE_ENABLED = "extensions.systemAddon.update.enabled";
const PREF_REMOTESETTINGS_DISABLED = "extensions.remoteSettings.disabled";
const PREF_EM_LAST_FORK_VERSION = "extensions.lastTorBrowserVersion";
const PREF_EM_LAST_FORK_VERSION = "extensions.lastBaseBrowserVersion";

const PREF_MIN_WEBEXT_PLATFORM_VERSION =
  "extensions.webExtensionsMinPlatformVersion";
Loading