From 630002c8b3fc4c93cbf7d326eec3d0c4b18639a3 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Thu, 24 Mar 2022 10:51:40 -0400 Subject: 98.0 attempt 1 --- .gitignore | 4 +- README.md | 30 + allow-searchengines-non-esr.patch | 13 + allow-ubo-private-mode.patch | 18 + bootstrap-without-vcs2.patch | 69 + cbindgen-vendor.tar.xz | Bin 0 -> 5627872 bytes context-menu.patch | 43 + custom-ubo-assets-bootstrap-location.patch | 17 + disable-data-reporting-at-compile-time.patch | 18 + disable-pocket.patch | 38 + hide-default-browser.patch | 13 + librewolf-branding.tgz | Bin 0 -> 1631848 bytes librewolf-pref-pane.patch | 818 +++++++++++ librewolf.cfg | 571 ++++++++ librewolf.spec | 1961 ++++++++++++++++++++++++++ local-settings.js | 7 + mozilla_dirs.patch | 76 + policies.json | 94 ++ pref-naming.patch | 57 + privacy-preferences.patch | 62 + remove-branding-urlbar.patch | 11 + remove-cfrprefs.patch | 19 + remove-internal-plugin-certs.patch | 18 + remove-organization-policy-banner.patch | 11 + remove-snippets-from-home.patch | 22 + remove_addons.patch | 74 + sanitizing-description.patch | 11 + search-config.json | 376 +++++ sources | 4 - stop-undesired-requests.patch | 55 + urlbarprovider-interventions.patch | 13 + 31 files changed, 4518 insertions(+), 5 deletions(-) create mode 100644 README.md create mode 100644 allow-searchengines-non-esr.patch create mode 100644 allow-ubo-private-mode.patch create mode 100644 bootstrap-without-vcs2.patch create mode 100644 cbindgen-vendor.tar.xz create mode 100644 context-menu.patch create mode 100644 custom-ubo-assets-bootstrap-location.patch create mode 100644 disable-data-reporting-at-compile-time.patch create mode 100644 disable-pocket.patch create mode 100644 hide-default-browser.patch create mode 100644 librewolf-branding.tgz create mode 100644 librewolf-pref-pane.patch create mode 100755 librewolf.cfg create mode 100644 librewolf.spec create mode 100644 local-settings.js create mode 100644 mozilla_dirs.patch create mode 100644 policies.json create mode 100644 pref-naming.patch create mode 100644 privacy-preferences.patch create mode 100644 remove-branding-urlbar.patch create mode 100644 remove-cfrprefs.patch create mode 100644 remove-internal-plugin-certs.patch create mode 100644 remove-organization-policy-banner.patch create mode 100644 remove-snippets-from-home.patch create mode 100644 remove_addons.patch create mode 100644 sanitizing-description.patch create mode 100644 search-config.json delete mode 100644 sources create mode 100644 stop-undesired-requests.patch create mode 100644 urlbarprovider-interventions.patch diff --git a/.gitignore b/.gitignore index 4366d6c..d78626f 100644 --- a/.gitignore +++ b/.gitignore @@ -314,7 +314,6 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-62.0.3-20181002.tar.xz /firefox-63.0.source.tar.xz /firefox-langpacks-63.0-20181018.tar.xz -/cbindgen-vendor.tar.xz /firefox-langpacks-63.0.1-20181101.tar.xz /firefox-63.0.1.source.tar.xz /firefox-63.0.3.source.tar.xz @@ -499,3 +498,6 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-98.0-20220301.tar.xz /firefox-langpacks-98.0-20220304.tar.xz /firefox-langpacks-98.0-20220305.tar.xz +*.spec? +.*.swp +*.source.tar.xz diff --git a/README.md b/README.md new file mode 100644 index 0000000..48a88a6 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# README for librewolf-fedora-ff + +## Overview +After using the [prep-librewolf-rpm.sh](https://gitlab.com/bgstack15/librewolf-fedora) script, a modified copy of Fedora Firefox src.rpm git repo exists on the local filesystem. + +If this README.md exists in a directory named `for-repo`, then it is still in its source location from the above link, and not in its final location. + +## This repository +This README file belongs in the modified copy of that Fedora Firefox src.rpm [git repository](https://src.fedoraproject.org/rpms/firefox). That modified git repo can be sent up to a [new web location](https://gitlab.com/bgstack15/librewolf-fedora-ff). + +Fedora [COPR](https://copr.fedorainfracloud.org/coprs/bgstack15/AfterMozilla/packages/) can then use rpkg to pull this new git repository, so users do not have to upload the 400MB src.rpm manually. + +## Using this repository +Script `git-helper.sh` included in the [librewolf-fedora](https://gitlab.com/bgstack15/librewolf-fedora) repository will add the new git repo for librewolf-fedora-ff and fix the .gitignore. + +## Differences from upstream repo +The Librewolf rpm git repo makes some changes to the Firefox rpm git repo. +Files are added or modified: +* this README.md +* .gitignore +* librewolf.spec +* LibreWolf patches that are not named here +* a few tarballs omitted from upstream git sources: + * cbindgen-vendor.tar.xz + * `firefox-langpacks-*.tar.xz` + +Files that are removed: +* sources + +Fedora's dist-git project provides a lookaside cache for large assets so they do not have to be stored in source control. The `sources` file links to those files, but we embed in the librewolf src.rpm the two tarballs we need. diff --git a/allow-searchengines-non-esr.patch b/allow-searchengines-non-esr.patch new file mode 100644 index 0000000..6418416 --- /dev/null +++ b/allow-searchengines-non-esr.patch @@ -0,0 +1,13 @@ +diff --git a/browser/components/enterprisepolicies/schemas/policies-schema.json b/browser/components/enterprisepolicies/schemas/policies-schema.json +index d436cf1ca1..ecd6e53b9e 100644 +--- a/browser/components/enterprisepolicies/schemas/policies-schema.json ++++ b/browser/components/enterprisepolicies/schemas/policies-schema.json +@@ -1074,7 +1074,7 @@ + }, + + "SearchEngines": { +- "enterprise_only": true, ++ "enterprise_only": false, + + "type": "object", + "properties": { diff --git a/allow-ubo-private-mode.patch b/allow-ubo-private-mode.patch new file mode 100644 index 0000000..ef08f46 --- /dev/null +++ b/allow-ubo-private-mode.patch @@ -0,0 +1,18 @@ +--- a/toolkit/components/extensions/Extension.jsm ++++ b/toolkit/components/extensions/Extension.jsm +@@ -2658,6 +2658,15 @@ + this.permissions.add(PRIVATE_ALLOWED_PERMISSION); + } + ++ if (this.id === "uBlock0@raymondhill.net") { ++ ExtensionPermissions.add(this.id, { ++ permissions: [PRIVATE_ALLOWED_PERMISSION], ++ origins: [], ++ }); ++ this.permissions.add(PRIVATE_ALLOWED_PERMISSION); ++ } ++ ++ + // We only want to update the SVG_CONTEXT_PROPERTIES_PERMISSION during install and + // upgrade/downgrade startups. + if (INSTALL_AND_UPDATE_STARTUP_REASONS.has(this.startupReason)) { diff --git a/bootstrap-without-vcs2.patch b/bootstrap-without-vcs2.patch new file mode 100644 index 0000000..6bedf32 --- /dev/null +++ b/bootstrap-without-vcs2.patch @@ -0,0 +1,69 @@ +diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py +index b0d6965..8ea2e15 100644 +--- a/python/mozboot/mozboot/bootstrap.py ++++ b/python/mozboot/mozboot/bootstrap.py +@@ -549,10 +549,8 @@ def current_firefox_checkout(env, hg: Optional[Path] = None): + if not len(path.parents): + break + +- raise UserError( +- "Could not identify the root directory of your checkout! " +- "Are you running `mach bootstrap` in an hg or git clone?" +- ) ++ return ("local", os.getcwd()) ++ + + + def update_git_tools(git: Optional[Path], root_state_dir: Path): +diff --git a/python/mozversioncontrol/mozversioncontrol/__init__.py b/python/mozversioncontrol/mozversioncontrol/__init__.py +index dd31f53..6f0087a 100644 +--- a/python/mozversioncontrol/mozversioncontrol/__init__.py ++++ b/python/mozversioncontrol/mozversioncontrol/__init__.py +@@ -684,6 +684,29 @@ class GitRepository(Repository): + self._run("config", name, value) + + ++class LocalRepository(Repository): ++ ++ def __init__(self, path): ++ super(LocalRepository, self).__init__(path, tool="true") ++ ++ @property ++ def head_ref(self): ++ return "" ++ ++ def get_outgoing_files(self): ++ return [] ++ ++ def get_changed_files(self): ++ return [] ++ ++ def get_tracked_files_finder(self): ++ files = [os.path.relpath(os.path.join(dp, f), self.path).replace("\\","/") for dp, dn, fn in os.walk(self.path) for f in fn] ++ files.sort() ++ return FileListFinder(files) ++ ++ ++ ++ + def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"): + """Get a repository object for the repository at `path`. + If `path` is not a known VCS repository, raise an exception. +@@ -697,7 +720,7 @@ def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"): + elif (path / ".git").exists(): + return GitRepository(path, git=git) + else: +- raise InvalidRepoPath(f"Unknown VCS, or not a source checkout: {path}") ++ return LocalRepository(path) + + + def get_repository_from_build_config(config): +@@ -721,6 +744,8 @@ def get_repository_from_build_config(config): + return HgRepository(Path(config.topsrcdir), hg=config.substs["HG"]) + elif flavor == "git": + return GitRepository(Path(config.topsrcdir), git=config.substs["GIT"]) ++ elif flavor == "local": ++ return LocalRepository(config.topsrcdir) + else: + raise MissingVCSInfo("unknown VCS_CHECKOUT_TYPE value: %s" % flavor) + diff --git a/cbindgen-vendor.tar.xz b/cbindgen-vendor.tar.xz new file mode 100644 index 0000000..7ee5ee3 Binary files /dev/null and b/cbindgen-vendor.tar.xz differ diff --git a/context-menu.patch b/context-menu.patch new file mode 100644 index 0000000..5685f96 --- /dev/null +++ b/context-menu.patch @@ -0,0 +1,43 @@ +diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc +--- a/browser/base/content/browser-context.inc ++++ b/browser/base/content/browser-context.inc +@@ -102,19 +102,16 @@ + oncommand="gContextMenu.openLinkInPrivateWindow();"/> + + + +- + + + + #endif + +- + +