From 66fd8569c808146d32ace8936cb93f7ce6b7c6c5 Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Wed, 4 Sep 2024 12:30:06 +0200 Subject: [PATCH] fix failing patches for 130.0 privacy-security-settings-hotfix.patch seems to be merged upstream (https://bugzilla.mozilla.org/show_bug.cgi?id=1910312#a1966749_640478) bootstrap.patch should now be a simpler fix, as some parts were now improved upstream, too; we'll see if it breaks or not in a minute.. --- assets/patches.txt | 1 - patches/bootstrap.patch | 17 ++--- .../privacy-security-settings-hotfix.patch | 72 ------------------- 3 files changed, 7 insertions(+), 83 deletions(-) delete mode 100644 patches/privacy-security-settings-hotfix.patch diff --git a/assets/patches.txt b/assets/patches.txt index dad51f2..1723a21 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -13,7 +13,6 @@ patches/hide-passwordmgr.patch patches/librewolf-prefs.patch patches/mozilla_dirs.patch patches/msix.patch -patches/privacy-security-settings-hotfix.patch patches/remove_addons.patch patches/rust-gentoo-musl.patch patches/sed-patches/allow-searchengines-non-esr.patch diff --git a/patches/bootstrap.patch b/patches/bootstrap.patch index a0e03ba..edaa5a2 100644 --- a/patches/bootstrap.patch +++ b/patches/bootstrap.patch @@ -1,16 +1,13 @@ +diff --git a/python/mozversioncontrol/mozversioncontrol/__init__.py b/python/mozversioncontrol/mozversioncontrol/__init__.py +index f9a9b0d6bd1f..c5c437b3f220 100644 --- a/python/mozversioncontrol/mozversioncontrol/__init__.py +++ b/python/mozversioncontrol/mozversioncontrol/__init__.py -@@ -1019,9 +1019,11 @@ class SrcRepository(Repository): - """ - res = [] - # move away the .git or .hg folder from path to more easily test in a hg/git repo -- for root, dirs, files in os.walk("."): -+ for root, dirs, files in os.walk(path): +@@ -1144,7 +1144,7 @@ class SrcRepository(Repository): + for root, dirs, files in os.walk(self.path): + base = os.path.relpath(root, self.path) for name in files: -- res.append(os.path.join(root, name)) -+ res.append( -+ os.path.relpath(os.path.join(root, name), path).replace("\\", "/") -+ ) +- res.append(os.path.join(base, name)) ++ res.append(os.path.join(base, name)).replace("\\", "/") return res def get_tracked_files_finder(self, path): diff --git a/patches/privacy-security-settings-hotfix.patch b/patches/privacy-security-settings-hotfix.patch deleted file mode 100644 index 2d768a1..0000000 --- a/patches/privacy-security-settings-hotfix.patch +++ /dev/null @@ -1,72 +0,0 @@ -# HG changeset patch -# User Malte Jürgens -# Date 1722462820 -7200 -# Wed Jul 31 23:53:40 2024 +0200 -# Node ID 457872813e06bcf474803cf0c9519809fbc5806a -# Parent 265f9fb218cd9395f36a16714b1f295f4a996b76 -Bug 1910312 - Unbreak privacy and security settings when MOZ_DATA_REPORTING is disabled r?#settings-reviewers! - -Disabling `MOZ_DATA_REPORTING` results in the `PREF_UPLOAD_ENABLED` pref not -being loaded with `Preferences.add`. This means -`Preferences.get(PREF_UPLOAD_ENABLED)` can possibly be `null`, which was -previously not handled and resulted in an error for the whole privacy.js file. - -So only call `dataCollectionCheckboxHandler` for the `privateAttribution` -checkbox if `MOZ_DATA_REPORTING` is enabled (otherwise the `privateAttribution` -checkbox also just doesn't exist). Also move the call into separate -`initPrivateAttributionCheckbox` function to be more consistent with previous -code. - -Differential Revision: https://phabricator.services.mozilla.com/D218265 - -diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js ---- a/browser/components/preferences/privacy.js -+++ b/browser/components/preferences/privacy.js -@@ -339,7 +339,7 @@ function dataCollectionCheckboxHandler({ - !collectionEnabled || Services.prefs.prefIsLocked(pref) || isDisabled(); - } - -- Preferences.get(PREF_UPLOAD_ENABLED).on("change", updateCheckbox); -+ Preferences.get(PREF_UPLOAD_ENABLED)?.on("change", updateCheckbox); - updateCheckbox(); - } - -@@ -1267,17 +1267,8 @@ var gPrivacyPane = { - this.initOptOutStudyCheckbox(); - } - this.initAddonRecommendationsCheckbox(); -+ this.initPrivateAttributionCheckbox(); - } -- dataCollectionCheckboxHandler({ -- checkbox: document.getElementById("privateAttribution"), -- pref: PREF_PRIVATE_ATTRIBUTION_ENABLED, -- matchPref() { -- return AppConstants.MOZ_TELEMETRY_REPORTING; -- }, -- isDisabled() { -- return !AppConstants.MOZ_TELEMETRY_REPORTING; -- }, -- }); - - let signonBundle = document.getElementById("signonBundle"); - let pkiBundle = document.getElementById("pkiBundle"); -@@ -3568,6 +3559,19 @@ var gPrivacyPane = { - }); - }, - -+ initPrivateAttributionCheckbox() { -+ dataCollectionCheckboxHandler({ -+ checkbox: document.getElementById("privateAttribution"), -+ pref: PREF_PRIVATE_ATTRIBUTION_ENABLED, -+ matchPref() { -+ return AppConstants.MOZ_TELEMETRY_REPORTING; -+ }, -+ isDisabled() { -+ return !AppConstants.MOZ_TELEMETRY_REPORTING; -+ }, -+ }); -+ }, -+ - observe(aSubject, aTopic) { - switch (aTopic) { - case "sitedatamanager:updating-sites":