From 58c3a8b6062a8a24252209579f9e4f01df452bea Mon Sep 17 00:00:00 2001 From: celenity Date: Tue, 29 Apr 2025 00:20:56 -0400 Subject: [PATCH] fix: Allow building without legacy/unnecessary AutoConfig functionality Signed-off-by: celenity --- patches/remove-autoconfig-dependency.patch | 12 ++++++++++++ scripts/patches.yaml | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 patches/remove-autoconfig-dependency.patch diff --git a/patches/remove-autoconfig-dependency.patch b/patches/remove-autoconfig-dependency.patch new file mode 100644 index 00000000..b04fc13b --- /dev/null +++ b/patches/remove-autoconfig-dependency.patch @@ -0,0 +1,12 @@ +diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in +index 0f4327c41a..0fcbed2855 100644 +--- a/mobile/android/installer/package-manifest.in ++++ b/mobile/android/installer/package-manifest.in +@@ -123,7 +123,6 @@ + @BINPATH@/*/greprefs.js + @BINPATH@/@PREF_DIR@/*/geckoview-prefs.js + #endif # !MOZ_ANDROID_FAT_AAR_ARCHITECTURES +-@BINPATH@/defaults/autoconfig/prefcalls.js + + ; [Layout Engine Resources] + ; Style Sheets, Graphics and other Resources used by the layout engine. diff --git a/scripts/patches.yaml b/scripts/patches.yaml index 7c73720a..b1d9af88 100644 --- a/scripts/patches.yaml +++ b/scripts/patches.yaml @@ -343,6 +343,13 @@ patches: effect: "Prevents users from accidentally leaving remote debugging enabled." category: "Security" + - file: "remove-autoconfig-dependency.patch" + name: "Remove the Mozilla AutoConfig build dependency" + description: "Removes Mozilla's AutoConfig functionality in Firefox (also known as Mission Control Desktop, debuted in Netscape Communicator 4.5... https://www.internetnews.com/enterprise/netscape-unveils-enterprise-management-tools/)." + reason: "To unbreak builds with the '--disable-pref-extensions' argument (which removes this functionality)." + effect: "Reduces attack surface and legacy code." + category: "Security" + - file: "domain-highlighting-and-alignment.patch" name: "Add domain highlighting and alignment" description: "Adds domain highlighting and alignment in the toolbar."