From 826a2e7f8c7786acb3b5d2217f19814f314289ab Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 5 Jan 2022 16:21:31 -0500 Subject: add initial lw d/ contents --- ...Add-a-2-minutes-timeout-on-xpcshell-tests.patch | 47 ++ ...-preferences-directory-for-applications-p.patch | 34 ++ ...extra-stuff-to-upstream-build-system-dire.patch | 20 + ...to-build-with-older-versions-of-nodejs-10.patch | 21 + .../Avoid-using-vmrs-vmsr-on-armel.patch | 21 + ...-sessionstore-data-to-keep-windows-out-of.patch | 37 ++ .../debian-hacks/Don-t-build-image-gtests.patch | 23 + .../Fix-math_private.h-for-i386-FTBFS.patch | 24 + .../Set-program-name-from-the-remoting-name.patch | 21 + ...d-as-langpack-version-for-reproducibility.patch | 21 + ...ng-name-for-call-to-gdk_set_program_class.patch | 42 ++ ...illa-Location-Service-key-when-the-Google.patch | 21 + ...reference-files-to-set-locked-prefs-with-.patch | 79 ++++ .../debian/patches/librewolf/about-dialog.patch | 12 + .../patches/librewolf/add-language-warning.patch | 8 + .../librewolf/allow-searchengines-non-esr.patch | 13 + .../patches/librewolf/allow-ubo-private-mode.patch | 18 + .../librewolf/armhf-reduce-linker-memory-use.patch | 22 + .../patches/librewolf/browser-confvars.patch | 28 ++ .../debian/patches/librewolf/context-menu.patch | 43 ++ .../debian/patches/librewolf/disable-pocket.patch | 38 ++ .../patches/librewolf/fix-armhf-webrtc-build.patch | 65 +++ librewolf/debian/patches/librewolf/megabar.patch | 118 +++++ .../debian/patches/librewolf/mozilla-vpn-ad.patch | 30 ++ .../debian/patches/librewolf/mozilla_dirs.patch | 76 +++ .../debian/patches/librewolf/pref-naming.patch | 66 +++ .../patches/librewolf/reduce-rust-debuginfo.patch | 21 + .../debian/patches/librewolf/relax-cargo-dep.patch | 12 + .../patches/librewolf/remove-branding-urlbar.patch | 11 + .../debian/patches/librewolf/remove-cfrprefs.patch | 19 + .../librewolf/remove-internal-plugin-certs.patch | 18 + .../remove-organization-policy-banner.patch | 11 + .../librewolf/remove-snippets-from-home.patch | 22 + .../debian/patches/librewolf/remove_addons.patch | 74 +++ .../patches/librewolf/sanitizing-description.patch | 11 + .../librewolf/stop-undesired-requests.patch | 55 +++ .../librewolf/urlbarprovider-interventions.patch | 13 + .../patches/librewolf/use-system-icupkg.patch | 13 + .../webrtc-fix-compiler-flags-for-armhf.patch | 35 ++ .../Add-xptcall-support-for-SH4-processors.patch | 516 +++++++++++++++++++++ ...S-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch | 63 +++ ...AGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch | 21 + ...ork-around-GCC-ICE-on-mips-i386-and-s390x.patch | 22 + .../Work-around-another-GCC-ICE-on-arm.patch | 21 + ...-disable-extensions-in-system-directories.patch | 21 + .../patches/prefs/Set-DPI-to-system-settings.patch | 21 + librewolf/debian/patches/series | 44 ++ 47 files changed, 1992 insertions(+) create mode 100644 librewolf/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch create mode 100644 librewolf/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch create mode 100644 librewolf/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch create mode 100644 librewolf/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch create mode 100644 librewolf/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch create mode 100644 librewolf/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch create mode 100644 librewolf/debian/patches/debian-hacks/Don-t-build-image-gtests.patch create mode 100644 librewolf/debian/patches/debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch create mode 100644 librewolf/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch create mode 100644 librewolf/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch create mode 100644 librewolf/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch create mode 100644 librewolf/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch create mode 100644 librewolf/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch create mode 100644 librewolf/debian/patches/librewolf/about-dialog.patch create mode 100644 librewolf/debian/patches/librewolf/add-language-warning.patch create mode 100644 librewolf/debian/patches/librewolf/allow-searchengines-non-esr.patch create mode 100644 librewolf/debian/patches/librewolf/allow-ubo-private-mode.patch create mode 100644 librewolf/debian/patches/librewolf/armhf-reduce-linker-memory-use.patch create mode 100644 librewolf/debian/patches/librewolf/browser-confvars.patch create mode 100644 librewolf/debian/patches/librewolf/context-menu.patch create mode 100644 librewolf/debian/patches/librewolf/disable-pocket.patch create mode 100644 librewolf/debian/patches/librewolf/fix-armhf-webrtc-build.patch create mode 100644 librewolf/debian/patches/librewolf/megabar.patch create mode 100644 librewolf/debian/patches/librewolf/mozilla-vpn-ad.patch create mode 100644 librewolf/debian/patches/librewolf/mozilla_dirs.patch create mode 100644 librewolf/debian/patches/librewolf/pref-naming.patch create mode 100644 librewolf/debian/patches/librewolf/reduce-rust-debuginfo.patch create mode 100644 librewolf/debian/patches/librewolf/relax-cargo-dep.patch create mode 100644 librewolf/debian/patches/librewolf/remove-branding-urlbar.patch create mode 100644 librewolf/debian/patches/librewolf/remove-cfrprefs.patch create mode 100644 librewolf/debian/patches/librewolf/remove-internal-plugin-certs.patch create mode 100644 librewolf/debian/patches/librewolf/remove-organization-policy-banner.patch create mode 100644 librewolf/debian/patches/librewolf/remove-snippets-from-home.patch create mode 100644 librewolf/debian/patches/librewolf/remove_addons.patch create mode 100644 librewolf/debian/patches/librewolf/sanitizing-description.patch create mode 100644 librewolf/debian/patches/librewolf/stop-undesired-requests.patch create mode 100644 librewolf/debian/patches/librewolf/urlbarprovider-interventions.patch create mode 100644 librewolf/debian/patches/librewolf/use-system-icupkg.patch create mode 100644 librewolf/debian/patches/librewolf/webrtc-fix-compiler-flags-for-armhf.patch create mode 100644 librewolf/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch create mode 100644 librewolf/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch create mode 100644 librewolf/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch create mode 100644 librewolf/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch create mode 100644 librewolf/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch create mode 100644 librewolf/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch create mode 100644 librewolf/debian/patches/prefs/Set-DPI-to-system-settings.patch create mode 100644 librewolf/debian/patches/series (limited to 'librewolf/debian/patches') diff --git a/librewolf/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch b/librewolf/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch new file mode 100644 index 0000000..fba36e8 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch @@ -0,0 +1,47 @@ +From: Mike Hommey +Date: Mon, 27 Dec 2010 10:44:28 +0100 +Subject: Add a 2 minutes timeout on xpcshell tests + +--- + testing/xpcshell/runxpcshelltests.py | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py +index 0b355fe..d074c82 100755 +--- a/testing/xpcshell/runxpcshelltests.py ++++ b/testing/xpcshell/runxpcshelltests.py +@@ -13,6 +13,7 @@ import os + import pipes + import random + import re ++import select + import shutil + import signal + import subprocess +@@ -832,9 +833,23 @@ class XPCShellTestThread(Thread): + if self.interactive: + self.log.info("%s | Process ID: %d" % (name, self.proc_ident)) + +- # Communicate returns a tuple of (stdout, stderr), however we always +- # redirect stderr to stdout, so the second element is ignored. +- process_output, _ = self.communicate(proc) ++ if self.pStdout == PIPE: ++ process_stdout = "" ++ while True: ++ (r, w, e) = select.select([proc.stdout], [], [], 120) ++ if len(r) == 0: ++ process_stdout += "TEST-UNEXPECTED-FAIL | %s | application timed out after 120 seconds with no output" % (test) ++ proc.kill() ++ break ++ line = proc.stdout.read(1) ++ if line == "": ++ break ++ process_stdout += line ++ proc.wait() ++ else: ++ # Communicate returns a tuple of (stdout, stderr), however we always ++ # redirect stderr to stdout, so the second element is ignored. ++ process_output, _ = self.communicate(proc) + + if self.interactive: + # Not sure what else to do here... diff --git a/librewolf/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch b/librewolf/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch new file mode 100644 index 0000000..cb8aad9 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch @@ -0,0 +1,34 @@ +From: Mike Hommey +Date: Sat, 21 Jun 2008 03:09:21 +0200 +Subject: Add another preferences directory for applications: + preferences/syspref + +It was existing in previous versions of iceweasel as a symlink to +/etc/iceweasel/pref. + +This has the side effect to make these preferences there work again, and +to disable the "set as default browser" dialog. +--- + toolkit/xre/nsXREDirProvider.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +index 50a64a2..87a33f1 100644 +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -805,6 +805,7 @@ static const char* const kAppendPrefDir[] = {"defaults", "preferences", + static const char* const kAppendBackgroundTasksPrefDir[] = { + "defaults", "backgroundtasks", nullptr}; + #endif ++static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nullptr }; + + nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty, + nsISimpleEnumerator** aResult) { +@@ -821,6 +822,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty, + LoadDirIntoArray(mXULAppDir, kAppendBackgroundTasksPrefDir, directories); + } + #endif ++ LoadDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories); + + rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); + } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { diff --git a/librewolf/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch b/librewolf/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch new file mode 100644 index 0000000..005822a --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch @@ -0,0 +1,20 @@ +From: Mike Hommey +Date: Mon, 16 Dec 2013 10:53:58 +0900 +Subject: Add debian/extra-stuff to upstream build system directory traversal + +--- + moz.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/moz.build b/moz.build +index 41c9ad7..e19cfbc 100644 +--- a/moz.build ++++ b/moz.build +@@ -201,4 +201,7 @@ SPHINX_TREES["metrics"] = "docs/metrics" + + SPHINX_TREES["gtest"] = "docs/gtest" + ++if not CONFIG["LIBXUL_SDK"]: ++ DIRS += ["debian/extra-stuff"] ++ + include("build/templates.mozbuild") diff --git a/librewolf/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch b/librewolf/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch new file mode 100644 index 0000000..887c0c3 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch @@ -0,0 +1,21 @@ +From: Mike Hommey +Date: Wed, 8 Apr 2020 08:43:20 +0900 +Subject: Allow to build with older versions of nodejs 10 + +--- + python/mozbuild/mozbuild/nodeutil.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/mozbuild/mozbuild/nodeutil.py b/python/mozbuild/mozbuild/nodeutil.py +index 95bedbc..fef80cd 100644 +--- a/python/mozbuild/mozbuild/nodeutil.py ++++ b/python/mozbuild/mozbuild/nodeutil.py +@@ -13,7 +13,7 @@ from mozboot.util import get_tools_dir + from mozfile import which + from six import PY3 + +-NODE_MIN_VERSION = StrictVersion("10.23.1") ++NODE_MIN_VERSION = StrictVersion("10.0") + NPM_MIN_VERSION = StrictVersion("6.14.10") + + diff --git a/librewolf/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch b/librewolf/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch new file mode 100644 index 0000000..9a57898 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch @@ -0,0 +1,21 @@ +From: Mike Hommey +Date: Tue, 22 May 2018 07:51:56 +0900 +Subject: Avoid using vmrs/vmsr on armel + +--- + dom/media/webaudio/blink/DenormalDisabler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dom/media/webaudio/blink/DenormalDisabler.h b/dom/media/webaudio/blink/DenormalDisabler.h +index 51f56bd..ed06a09 100644 +--- a/dom/media/webaudio/blink/DenormalDisabler.h ++++ b/dom/media/webaudio/blink/DenormalDisabler.h +@@ -44,7 +44,7 @@ namespace WebCore { + # define HAVE_DENORMAL 1 + #endif + +-#if defined(__arm__) || defined(__aarch64__) ++#if (defined(__arm__) && !defined(__SOFTFP__)) || defined(__aarch64__) + # define HAVE_DENORMAL 1 + #endif + diff --git a/librewolf/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch b/librewolf/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch new file mode 100644 index 0000000..a17d775 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch @@ -0,0 +1,37 @@ +From: Mike Hommey +Date: Thu, 12 Nov 2009 17:18:31 +0100 +Subject: Avoid wrong sessionstore data to keep windows out of user sight + +It happens that sessionstore can keep wrong information for the window +position or minimized state. Workaround this until the real bug is found +and fixed (probably in xulrunner). + +Closes: #552426, #553453 +--- + browser/components/sessionstore/SessionStore.jsm | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm +index 26ee702..c640dd7 100644 +--- a/browser/components/sessionstore/SessionStore.jsm ++++ b/browser/components/sessionstore/SessionStore.jsm +@@ -4909,7 +4909,7 @@ var SessionStoreInternal = { + !isNaN(aTop) && + (aLeft != win_("screenX") || aTop != win_("screenY")) + ) { +- aWindow.moveTo(aLeft, aTop); ++ aWindow.moveTo((aLeft < -aWidth) ? 0 : aLeft, (aTop < -aHeight) ? 0 : aTop); + } + if ( + aWidth && +@@ -4938,9 +4938,8 @@ var SessionStoreInternal = { + case "minimized": + if (aSizeModeBeforeMinimized == "maximized") { + aWindow.maximize(); ++ break; + } +- aWindow.minimize(); +- break; + case "normal": + aWindow.restore(); + break; diff --git a/librewolf/debian/patches/debian-hacks/Don-t-build-image-gtests.patch b/librewolf/debian/patches/debian-hacks/Don-t-build-image-gtests.patch new file mode 100644 index 0000000..bb43a8f --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Don-t-build-image-gtests.patch @@ -0,0 +1,23 @@ +From: Mike Hommey +Date: Thu, 9 Jun 2016 14:45:44 +0900 +Subject: Don't build image/ gtests + +Building them causes an ICE with GCC 4.7. As they are not part of what +is shipped, and not currently run either, just skip building them. +--- + image/moz.build | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/image/moz.build b/image/moz.build +index 7dcbb43..4751fee 100644 +--- a/image/moz.build ++++ b/image/moz.build +@@ -5,8 +5,6 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + DIRS += ["build", "decoders", "encoders"] +-if CONFIG["ENABLE_TESTS"]: +- DIRS += ["test/gtest"] + + if CONFIG["FUZZING_INTERFACES"]: + DIRS += ["test/fuzzing"] diff --git a/librewolf/debian/patches/debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch b/librewolf/debian/patches/debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch new file mode 100644 index 0000000..56151e6 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch @@ -0,0 +1,24 @@ +From: Mike Hommey +Date: Sat, 27 Nov 2021 06:49:44 +0900 +Subject: Fix math_private.h for i386 FTBFS + +--- + modules/fdlibm/src/math_private.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h +index 51d79f9..fafd7d6 100644 +--- a/modules/fdlibm/src/math_private.h ++++ b/modules/fdlibm/src/math_private.h +@@ -30,7 +30,11 @@ + * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t + */ + ++#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2) ++typedef long double __double_t; ++#else + typedef double __double_t; ++#endif + typedef __double_t double_t; + + /* diff --git a/librewolf/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch b/librewolf/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch new file mode 100644 index 0000000..3887128 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch @@ -0,0 +1,21 @@ +From: Mike Hommey +Date: Sun, 5 Feb 2017 08:41:22 +0900 +Subject: Set program name from the remoting name + +--- + toolkit/xre/nsAppRunner.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index 60ea696..f708e50 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -4300,7 +4300,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { + + // Set program name to the one defined in application.ini. + { +- nsAutoCString program(gAppData->name); ++ nsAutoCString program(gAppData->remotingName); + ToLowerCase(program); + g_set_prgname(program.get()); + } diff --git a/librewolf/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch b/librewolf/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch new file mode 100644 index 0000000..a9b7268 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch @@ -0,0 +1,21 @@ +From: Mike Hommey +Date: Fri, 12 Jul 2019 18:37:52 +0900 +Subject: Use build id as langpack version for reproducibility + +--- + python/mozbuild/mozbuild/action/langpack_manifest.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/mozbuild/mozbuild/action/langpack_manifest.py b/python/mozbuild/mozbuild/action/langpack_manifest.py +index 05adaa4..24b429b 100644 +--- a/python/mozbuild/mozbuild/action/langpack_manifest.py ++++ b/python/mozbuild/mozbuild/action/langpack_manifest.py +@@ -105,7 +105,7 @@ def get_timestamp_for_locale(path): + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ return os.environ['MOZ_BUILD_DATE'] + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") diff --git a/librewolf/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch b/librewolf/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch new file mode 100644 index 0000000..4b545ca --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch @@ -0,0 +1,42 @@ +From: Mike Hommey +Date: Mon, 3 Sep 2018 07:37:40 +0900 +Subject: Use remoting name for call to gdk_set_program_class + +Closes: #907574 +--- + widget/gtk/nsAppShell.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp +index 7090bd2..4cbf111 100644 +--- a/widget/gtk/nsAppShell.cpp ++++ b/widget/gtk/nsAppShell.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include "mozilla/XREAppData.h" + #include "nsAppShell.h" + #include "nsWindow.h" + #include "mozilla/Logging.h" +@@ -27,6 +28,7 @@ + # include "nsIObserverService.h" + #endif + #include "gfxPlatform.h" ++#include "nsAppRunner.h" + #include "ScreenHelperGTK.h" + #include "HeadlessScreenHelper.h" + #include "mozilla/widget/ScreenManager.h" +@@ -259,10 +261,8 @@ nsresult nsAppShell::Init() { + // creating top-level windows. (At this point, a child process hasn't + // received the list of registered chrome packages, so the + // GetBrandShortName call would fail anyway.) +- nsAutoString brandName; +- mozilla::widget::WidgetUtils::GetBrandShortName(brandName); +- if (!brandName.IsEmpty()) { +- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get()); ++ if (gAppData) { ++ gdk_set_program_class(gAppData->remotingName); + } + } + } diff --git a/librewolf/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch b/librewolf/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch new file mode 100644 index 0000000..c5df005 --- /dev/null +++ b/librewolf/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch @@ -0,0 +1,21 @@ +From: Mike Hommey +Date: Sun, 2 Apr 2017 06:33:19 +0900 +Subject: Use the Mozilla Location Service key when the Google Key is not there + +--- + modules/libpref/init/all.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js +index 2cec339..e89704a 100644 +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -3722,7 +3722,7 @@ pref("network.psl.onUpdate_notify", false); + + // All the Geolocation preferences are here. + // +-#ifndef EARLY_BETA_OR_EARLIER ++#if !defined(EARLY_BETA_OR_EARLIER) && defined(GOOGLE_LOCATION_SERVICE_API_KEY) + pref("geo.provider.network.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%"); + #else + // Use MLS on Nightly and early Beta. diff --git a/librewolf/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch b/librewolf/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch new file mode 100644 index 0000000..c06839f --- /dev/null +++ b/librewolf/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch @@ -0,0 +1,79 @@ +From: Mike Hommey +Date: Sat, 21 Jun 2008 02:48:46 +0200 +Subject: Allow .js preference files to set locked prefs with lockPref() + +--- + modules/libpref/parser/src/lib.rs | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/modules/libpref/parser/src/lib.rs b/modules/libpref/parser/src/lib.rs +index bce98c0..da33195 100644 +--- a/modules/libpref/parser/src/lib.rs ++++ b/modules/libpref/parser/src/lib.rs +@@ -11,8 +11,9 @@ + //! ```text + //! = * + //! = "(" "," ")" ";" +-//! = "user_pref" | "pref" | "sticky_pref" // in default pref files ++//! = "user_pref" | "pref" | "sticky_pref" | "lockPref" // in default pref files + //! = "user_pref" // in user pref files ++//! = "user_pref" | "pref" | "sticky_pref | lockPref" + //! = + //! = | "true" | "false" | + //! = ? +@@ -171,6 +172,7 @@ enum Token { + // Keywords + Pref, // pref + StickyPref, // sticky_pref ++ LockPref, // lockPref + UserPref, // user_pref + True, // true + False, // false +@@ -293,7 +295,7 @@ struct KeywordInfo { + token: Token, + } + +-const KEYWORD_INFOS: [KeywordInfo; 7] = [ ++const KEYWORD_INFOS: [KeywordInfo; 8] = [ + // These are ordered by frequency. + KeywordInfo { + string: b"pref", +@@ -323,6 +325,10 @@ const KEYWORD_INFOS: [KeywordInfo; 7] = [ + string: b"sticky_pref", + token: Token::StickyPref, + }, ++ KeywordInfo { ++ string: b"lockPref", ++ token: Token::LockPref, ++ }, + ]; + + struct Parser<'t> { +@@ -375,14 +381,15 @@ impl<'t> Parser<'t> { + // this will be either the first token of a new pref, or EOF. + loop { + // +- let (pref_value_kind, mut is_sticky) = match token { ++ let (pref_value_kind, mut is_sticky, mut is_locked) = match token { + Token::Pref if self.kind == PrefValueKind::Default => { +- (PrefValueKind::Default, false) ++ (PrefValueKind::Default, false, false) + } + Token::StickyPref if self.kind == PrefValueKind::Default => { +- (PrefValueKind::Default, true) ++ (PrefValueKind::Default, true, false) + } +- Token::UserPref => (PrefValueKind::User, false), ++ Token::LockPref => (PrefValueKind::Default, false, true), ++ Token::UserPref => (PrefValueKind::User, false, false), + Token::SingleChar(EOF) => return !self.has_errors, + _ => { + token = self.error_and_recover( +@@ -492,7 +499,6 @@ impl<'t> Parser<'t> { + }; + + // ("," )* // default pref files only +- let mut is_locked = false; + let mut has_attrs = false; + if self.kind == PrefValueKind::Default { + let ok = loop { diff --git a/librewolf/debian/patches/librewolf/about-dialog.patch b/librewolf/debian/patches/librewolf/about-dialog.patch new file mode 100644 index 0000000..556d7b5 --- /dev/null +++ b/librewolf/debian/patches/librewolf/about-dialog.patch @@ -0,0 +1,12 @@ +diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml +--- a/browser/base/content/aboutDialog.xhtml ++++ b/browser/base/content/aboutDialog.xhtml +@@ -147,7 +147,7 @@ + + + +- + diff --git a/librewolf/debian/patches/librewolf/add-language-warning.patch b/librewolf/debian/patches/librewolf/add-language-warning.patch new file mode 100644 index 0000000..fad50f7 --- /dev/null +++ b/librewolf/debian/patches/librewolf/add-language-warning.patch @@ -0,0 +1,8 @@ +--- a/browser/locales/en-US/browser/preferences/languages.ftl ++++ b/browser/locales/en-US/browser/preferences/languages.ftl +@@ -70,4 +70,4 @@ + browser-languages-installed-label = Installed languages + browser-languages-available-label = Available languages + +-browser-languages-error = { -brand-short-name } can’t update your languages right now. Check that you are connected to the internet or try again. ++browser-languages-error = { -brand-short-name } forces your language to en-US in order to protect your privacy. If you still want to make this change, check our FAQ. diff --git a/librewolf/debian/patches/librewolf/allow-searchengines-non-esr.patch b/librewolf/debian/patches/librewolf/allow-searchengines-non-esr.patch new file mode 100644 index 0000000..6418416 --- /dev/null +++ b/librewolf/debian/patches/librewolf/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/librewolf/debian/patches/librewolf/allow-ubo-private-mode.patch b/librewolf/debian/patches/librewolf/allow-ubo-private-mode.patch new file mode 100644 index 0000000..ef08f46 --- /dev/null +++ b/librewolf/debian/patches/librewolf/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/librewolf/debian/patches/librewolf/armhf-reduce-linker-memory-use.patch b/librewolf/debian/patches/librewolf/armhf-reduce-linker-memory-use.patch new file mode 100644 index 0000000..a9afe2d --- /dev/null +++ b/librewolf/debian/patches/librewolf/armhf-reduce-linker-memory-use.patch @@ -0,0 +1,22 @@ +Description: starting with firefox 66, armhf builds on Launchpad frequently + fail with "/usr/bin/ld: final link failed: memory exhausted" when linking + libxul.so. This is an attempt to reduce the memory used by ld. +Author: Olivier Tilloy + +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -2287,10 +2287,12 @@ + set_config("LINKER_KIND", select_linker.KIND) + + +-@depends_if(select_linker, target, target_sysroot, target_multiarch_dir, c_compiler) ++@depends_if(select_linker, target, target_sysroot, target_multiarch_dir, c_compiler, host) + @imports("os") +-def linker_ldflags(linker, target, sysroot, multiarch_dir, c_compiler): ++def linker_ldflags(linker, target, sysroot, multiarch_dir, c_compiler, host): + flags = list((linker and linker.LINKER_FLAG) or []) ++ if host.cpu == "arm": ++ flags.append("-Wl,--no-keep-memory") + # rpath-link is irrelevant to wasm, see for more info https://github.com/emscripten-core/emscripten/issues/11076. + if sysroot.path and multiarch_dir and target.os != "WASI": + for d in ("lib", "usr/lib"): diff --git a/librewolf/debian/patches/librewolf/browser-confvars.patch b/librewolf/debian/patches/librewolf/browser-confvars.patch new file mode 100644 index 0000000..9b40dce --- /dev/null +++ b/librewolf/debian/patches/librewolf/browser-confvars.patch @@ -0,0 +1,28 @@ +diff --git a/browser/confvars.sh b/browser/confvars.sh +index 92871c9516..1e151180dd 100644 +--- a/browser/confvars.sh ++++ b/browser/confvars.sh +@@ -3,8 +3,10 @@ + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + +-MOZ_APP_VENDOR=Mozilla +-MOZ_UPDATER=1 ++MOZ_APP_BASENAME=LibreWolf ++MOZ_APP_VENDOR="LibreWolf Community" ++ ++MOZ_UPDATER=0 + + if test "$OS_ARCH" = "WINNT"; then + if ! test "$HAVE_64BIT_BUILD"; then +@@ -34,8 +36,8 @@ BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml + # For mozilla-beta, mozilla-release, or mozilla-central repositories, use + # "unofficial" branding. + # For the mozilla-aurora repository, use "aurora". +-MOZ_BRANDING_DIRECTORY=browser/branding/unofficial +-MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official ++MOZ_BRANDING_DIRECTORY=browser/branding/librewolf ++MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/librewolf + MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} + + MOZ_PROFILE_MIGRATOR=1 diff --git a/librewolf/debian/patches/librewolf/context-menu.patch b/librewolf/debian/patches/librewolf/context-menu.patch new file mode 100644 index 0000000..5685f96 --- /dev/null +++ b/librewolf/debian/patches/librewolf/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 + +- + +