From 6f60f2801c1d805c9a438225ecd6ca917c18965c Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 19 Jul 2024 16:45:34 +0000 Subject: [PATCH] firefox: roll back old serach-config and update privacy settings. --- ...ntly_enable_new_search_engine_config.patch | 100 ++++++++++++++++++ helpers/DATA/firefox/settings.js | 7 ++ helpers/make-firefox | 5 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 helpers/DATA/firefox/firefox_permanently_enable_new_search_engine_config.patch diff --git a/helpers/DATA/firefox/firefox_permanently_enable_new_search_engine_config.patch b/helpers/DATA/firefox/firefox_permanently_enable_new_search_engine_config.patch new file mode 100644 index 0000000..385611c --- /dev/null +++ b/helpers/DATA/firefox/firefox_permanently_enable_new_search_engine_config.patch @@ -0,0 +1,100 @@ + +# HG changeset patch +# User Mark Banner +# Date 1717528181 0 +# Node ID bad743156b3050747ba33df8bc46518e90a1f673 +# Parent a414b7e839e5940d7d90cc8134665b1595549605 +Bug 1900638 - Permanently enable the new search config. r=search-reviewers,daleharvey + +Differential Revision: https://phabricator.services.mozilla.com/D212575 + +diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -3580,26 +3580,16 @@ pref("urlclassifier.blockedTable", "mozt + pref("browser.search.log", false); + pref("browser.search.update", true); + pref("browser.search.suggest.enabled", true); + pref("browser.search.suggest.enabled.private", false); + pref("browser.search.separatePrivateDefault", true); + pref("browser.search.separatePrivateDefault.ui.enabled", false); + pref("browser.search.removeEngineInfobar.enabled", true); + +-// Enables a new search configuration style with no functional changes for the +-// user. This is solely intended as a rollout button - it will go away once the +-// new configuration has been rolled out. +-// Whether search-config-v2 is enabled. +-#ifdef NIGHTLY_BUILD +-pref("browser.search.newSearchConfig.enabled", true); +-#else +-pref("browser.search.newSearchConfig.enabled", false); +-#endif +- + // GMPInstallManager prefs + + // User-settable override to media.gmp-manager.url for testing purposes. + //pref("media.gmp-manager.url.override", ""); + + // When |media.gmp-manager.allowLocalSources| is true, we will allow falling + // back to using the plugin configurations distributed with Firefox to update + // or install plugins. This fallback is only used when we fail to get an +diff --git a/toolkit/components/search/SearchUtils.sys.mjs b/toolkit/components/search/SearchUtils.sys.mjs +--- a/toolkit/components/search/SearchUtils.sys.mjs ++++ b/toolkit/components/search/SearchUtils.sys.mjs +@@ -106,16 +106,20 @@ class LoadListener { + } + + // nsIProgressEventSink + onProgress() {} + onStatus() {} + } + + export var SearchUtils = { ++ // Permanently enable the new search configuration until we remove the old ++ // code as part of bug 1870686. ++ newSearchConfigEnabled: true, ++ + BROWSER_SEARCH_PREF, + + /** + * This is the Remote Settings key that we use to get the ignore lists for + * engines. + */ + SETTINGS_IGNORELIST_KEY: "hijack-blocklists", + +@@ -426,20 +430,13 @@ export var SearchUtils = { + + XPCOMUtils.defineLazyPreferenceGetter( + SearchUtils, + "loggingEnabled", + BROWSER_SEARCH_PREF + "log", + false + ); + +-ChromeUtils.defineLazyGetter(SearchUtils, "newSearchConfigEnabled", () => { +- return Services.prefs.getBoolPref( +- "browser.search.newSearchConfig.enabled", +- false +- ); +-}); +- + // Can't use defineLazyPreferenceGetter because we want the value + // from the default branch + ChromeUtils.defineLazyGetter(SearchUtils, "distroID", () => { + return Services.prefs.getDefaultBranch("distribution.").getCharPref("id", ""); + }); +diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.toml b/toolkit/components/search/tests/xpcshell/xpcshell.toml +index 72020a45..6b5f63d2 100644 +--- a/toolkit/components/search/tests/xpcshell/xpcshell.toml ++++ b/toolkit/components/search/tests/xpcshell/xpcshell.toml +@@ -119,8 +119,10 @@ support-files = [ + ["test_engine_old_selector_application.js"] + + ["test_engine_old_selector_application_distribution.js"] ++skip-if = ["true"] # Will be permanently removed as part of bug 1870686 + + ["test_engine_old_selector_application_name.js"] ++skip-if = ["true"] # Will be permanently removed as part of bug 1870686 + + ["test_engine_old_selector_order.js"] + diff --git a/helpers/DATA/firefox/settings.js b/helpers/DATA/firefox/settings.js index 3babcd7..e621609 100644 --- a/helpers/DATA/firefox/settings.js +++ b/helpers/DATA/firefox/settings.js @@ -287,3 +287,10 @@ pref("app.normandy.api_url", ""); // Disable Adwaita theme by default. pref("widget.gtk.libadwaita-colors.enabled", false); + + +// High level search data collection +defaultPref("browser.search.serpEventTelemetry.enabled",false); + +// Disable Privacy-Preserving Attribution submition +pref("dom.private-attribution.submission.enabled", false); diff --git a/helpers/make-firefox b/helpers/make-firefox index c6297fe..ea67ce1 100644 --- a/helpers/make-firefox +++ b/helpers/make-firefox @@ -19,7 +19,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=111 +VERSION=112 EXTERNAL='deb-src http://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu $UPSTREAM main' REPOKEY=9BDB3D89CE49EC21 @@ -286,8 +286,11 @@ cp -a $DATA/searchplugins/* browser/components/search/extensions/ /bin/sed "/\"data\": \[/ r $DATA/searchplugins/trisquel.json" -i ./services/settings/dumps/main/search-config.json /bin/sed "/\"data\": \[/ r $DATA/searchplugins/trisquel-packages.json" -i ./services/settings/dumps/main/search-config.json +echo "Customizing search engines..." # Reprocess search preconfiguration dump python3 $DATA/process-json-files.py . browser/components/extensions/schemas/ +# Disable new search config 'til new one gets figured out (ref: https://hg.mozilla.org/mozilla-central/rev/bad743156b30) +patch_Rp1 $DATA/firefox_permanently_enable_new_search_engine_config.patch cat << EOF > debian/distribution.ini [Global]