summaryrefslogtreecommitdiff
path: root/librewolf/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'librewolf/debian/patches')
-rw-r--r--librewolf/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch47
-rw-r--r--librewolf/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch34
-rw-r--r--librewolf/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch20
-rw-r--r--librewolf/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch21
-rw-r--r--librewolf/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch21
-rw-r--r--librewolf/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch37
-rw-r--r--librewolf/debian/patches/debian-hacks/Don-t-build-image-gtests.patch23
-rw-r--r--librewolf/debian/patches/debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch24
-rw-r--r--librewolf/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch21
-rw-r--r--librewolf/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch21
-rw-r--r--librewolf/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch42
-rw-r--r--librewolf/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch21
-rw-r--r--librewolf/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch79
-rw-r--r--librewolf/debian/patches/librewolf/about-dialog.patch12
-rw-r--r--librewolf/debian/patches/librewolf/add-language-warning.patch8
-rw-r--r--librewolf/debian/patches/librewolf/allow-searchengines-non-esr.patch13
-rw-r--r--librewolf/debian/patches/librewolf/allow-ubo-private-mode.patch18
-rw-r--r--librewolf/debian/patches/librewolf/armhf-reduce-linker-memory-use.patch22
-rw-r--r--librewolf/debian/patches/librewolf/browser-confvars.patch28
-rw-r--r--librewolf/debian/patches/librewolf/context-menu.patch43
-rw-r--r--librewolf/debian/patches/librewolf/disable-pocket.patch38
-rw-r--r--librewolf/debian/patches/librewolf/fix-armhf-webrtc-build.patch65
-rw-r--r--librewolf/debian/patches/librewolf/megabar.patch118
-rw-r--r--librewolf/debian/patches/librewolf/mozilla-vpn-ad.patch30
-rw-r--r--librewolf/debian/patches/librewolf/mozilla_dirs.patch76
-rw-r--r--librewolf/debian/patches/librewolf/pref-naming.patch66
-rw-r--r--librewolf/debian/patches/librewolf/reduce-rust-debuginfo.patch21
-rw-r--r--librewolf/debian/patches/librewolf/relax-cargo-dep.patch12
-rw-r--r--librewolf/debian/patches/librewolf/remove-branding-urlbar.patch11
-rw-r--r--librewolf/debian/patches/librewolf/remove-cfrprefs.patch19
-rw-r--r--librewolf/debian/patches/librewolf/remove-internal-plugin-certs.patch18
-rw-r--r--librewolf/debian/patches/librewolf/remove-organization-policy-banner.patch11
-rw-r--r--librewolf/debian/patches/librewolf/remove-snippets-from-home.patch22
-rw-r--r--librewolf/debian/patches/librewolf/remove_addons.patch74
-rw-r--r--librewolf/debian/patches/librewolf/sanitizing-description.patch11
-rw-r--r--librewolf/debian/patches/librewolf/stop-undesired-requests.patch55
-rw-r--r--librewolf/debian/patches/librewolf/urlbarprovider-interventions.patch13
-rw-r--r--librewolf/debian/patches/librewolf/use-system-icupkg.patch13
-rw-r--r--librewolf/debian/patches/librewolf/webrtc-fix-compiler-flags-for-armhf.patch35
-rw-r--r--librewolf/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch516
-rw-r--r--librewolf/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch63
-rw-r--r--librewolf/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch21
-rw-r--r--librewolf/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch22
-rw-r--r--librewolf/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch21
-rw-r--r--librewolf/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch21
-rw-r--r--librewolf/debian/patches/prefs/Set-DPI-to-system-settings.patch21
-rw-r--r--librewolf/debian/patches/series44
47 files changed, 1992 insertions, 0 deletions
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 <mh@glandium.org>
+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 <glandium@debian.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <mh@glandium.org>
+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 <fcntl.h>
+ #include <errno.h>
+ #include <gdk/gdk.h>
++#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 <mh@glandium.org>
+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 <glandium@debian.org>
+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
+ //! <pref-file> = <pref>*
+ //! <pref> = <pref-spec> "(" <pref-name> "," <pref-value> <pref-attrs> ")" ";"
+-//! <pref-spec> = "user_pref" | "pref" | "sticky_pref" // in default pref files
++//! <pref-spec> = "user_pref" | "pref" | "sticky_pref" | "lockPref" // in default pref files
+ //! <pref-spec> = "user_pref" // in user pref files
++//! <pref-spec> = "user_pref" | "pref" | "sticky_pref | lockPref"
+ //! <pref-name> = <string-literal>
+ //! <pref-value> = <string-literal> | "true" | "false" | <int-value>
+ //! <int-value> = <sign>? <int-literal>
+@@ -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 {
+ // <pref-spec>
+- 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> {
+ };
+
+ // ("," <pref-attr>)* // 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 @@
+ </description>
+ </vbox>
+ <description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
+- <label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
++ <label is="text-link" href="https://librewolf.net/" data-l10n-name="community-mozillaLink"/>
+ <label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
+ </description>
+ <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
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 <olivier.tilloy@canonical.com>
+
+--- 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();"/>
+ <menuseparator id="context-sep-open"/>
+ <menuitem id="context-bookmarklink"
+ data-l10n-id="main-context-menu-bookmark-link"
+ oncommand="gContextMenu.bookmarkLink();"/>
+ <menuitem id="context-savelink"
+ data-l10n-id="main-context-menu-save-link"
+ oncommand="gContextMenu.saveLink();"/>
+- <menuitem id="context-savelinktopocket"
+- data-l10n-id="main-context-menu-save-link-to-pocket"
+- oncommand= "Pocket.savePage(gContextMenu.browser, gContextMenu.linkURL);"/>
+ <menuitem id="context-copyemail"
+ data-l10n-id="main-context-menu-copy-email"
+ oncommand="gContextMenu.copyEmail();"/>
+ <menuitem id="context-copylink"
+ data-l10n-id="main-context-menu-copy-link-simple"
+ oncommand="gContextMenu.copyLink();"/>
+ <menu id="context-sendlinktodevice"
+ class="sync-ui-item"
+@@ -254,19 +251,16 @@
+ #ifdef XP_MACOSX
+ <menuitem id="context-bookmarkpage"
+ data-l10n-id="main-context-menu-bookmark-add-mac"
+ oncommand="gContextMenu.bookmarkThisPage();"/>
+ #endif
+ <menuitem id="context-savepage"
+ data-l10n-id="main-context-menu-page-save"
+ oncommand="gContextMenu.savePageAs();"/>
+- <menuitem id="context-pocket"
+- data-l10n-id="main-context-menu-save-to-pocket"
+- oncommand="Pocket.savePage(gContextMenu.browser, gContextMenu.browser.currentURI.spec, gContextMenu.browser.contentTitle);"/>
+ <menu id="context-sendpagetodevice"
+ class="sync-ui-item"
+ data-l10n-id="main-context-menu-send-to-device"
+ hidden="true">
+ <menupopup id="context-sendpagetodevice-popup"
+ onpopupshowing="(() => { gSync.populateSendTabToDevicesMenu(event.target, gBrowser.currentURI.spec, gBrowser.contentTitle); })()"/>
+ </menu>
+ <menu id="fill-login" hidden="true">
diff --git a/librewolf/debian/patches/librewolf/disable-pocket.patch b/librewolf/debian/patches/librewolf/disable-pocket.patch
new file mode 100644
index 0000000..9f5a890
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/disable-pocket.patch
@@ -0,0 +1,38 @@
+diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm
+index 81de0fb201..163b4843e4 100644
+--- a/browser/components/BrowserGlue.jsm
++++ b/browser/components/BrowserGlue.jsm
+@@ -1375,8 +1375,6 @@ BrowserGlue.prototype = {
+ Normandy.init();
+ }
+
+- SaveToPocket.init();
+-
+ AboutHomeStartupCache.init();
+
+ Services.obs.notifyObservers(null, "browser-ui-startup-complete");
+diff --git a/browser/components/moz.build b/browser/components/moz.build
+index d16b27b1ea..a119166fa5 100644
+--- a/browser/components/moz.build
++++ b/browser/components/moz.build
+@@ -42,7 +42,6 @@ DIRS += [
+ "originattributes",
+ "ion",
+ "places",
+- "pocket",
+ "preferences",
+ "privatebrowsing",
+ "prompts",
+diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
+index 16168e5..857a968 100644
+--- a/browser/base/content/browser.js
++++ b/browser/base/content/browser.js
+@@ -5246,8 +5246,6 @@ var XULBrowserWindow = {
+
+ SafeBrowsingNotificationBox.onLocationChange(aLocationURI);
+
+- SaveToPocket.onLocationChange(window);
+-
+ UrlbarProviderSearchTips.onLocationChange(
+ window,
+ aLocationURI,
diff --git a/librewolf/debian/patches/librewolf/fix-armhf-webrtc-build.patch b/librewolf/debian/patches/librewolf/fix-armhf-webrtc-build.patch
new file mode 100644
index 0000000..5256fc7
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/fix-armhf-webrtc-build.patch
@@ -0,0 +1,65 @@
+--- a/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
++++ b/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
+@@ -31,10 +31,6 @@ LOCAL_INCLUDES += [
+ "/tools/profiler/public"
+ ]
+
+-UNIFIED_SOURCES += [
+- "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
+-]
+-
+ if not CONFIG["MOZ_DEBUG"]:
+
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
+@@ -53,20 +49,36 @@ if CONFIG["CPU_ARCH"] == "aarch64":
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
+-if CONFIG["CPU_ARCH"] == "arm":
+-
+- CFLAGS += [
+- "-mfpu=neon"
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
+ ]
+
++if CONFIG["CPU_ARCH"] == "arm":
++
+ DEFINES["WEBRTC_ARCH_ARM"] = True
+ DEFINES["WEBRTC_ARCH_ARM_V7"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
++if CONFIG["CPU_ARCH"] == "ppc64":
++
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
++ ]
++
+ if CONFIG["CPU_ARCH"] == "x86":
+
+ CFLAGS += [
+ "-msse2"
+ ]
+
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
++ ]
++
++if CONFIG["CPU_ARCH"] == "x86_64":
++
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
++ ]
++
+ Library("cpu_features_linux_gn")
+--- a/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
++++ b/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
+@@ -187,7 +187,7 @@ if (is_android && !build_with_mozilla) {
+ }
+ }
+
+-if (is_linux) {
++if (is_linux && target_cpu != "arm") {
+ rtc_static_library("cpu_features_linux") {
+ sources = [
+ "source/cpu_features_linux.c",
diff --git a/librewolf/debian/patches/librewolf/megabar.patch b/librewolf/debian/patches/librewolf/megabar.patch
new file mode 100644
index 0000000..1f2bed8
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/megabar.patch
@@ -0,0 +1,118 @@
+diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm
+index 4c42071..12323dd 100644
+--- a/browser/components/urlbar/UrlbarInput.jsm
++++ b/browser/components/urlbar/UrlbarInput.jsm
+@@ -1712,13 +1712,13 @@ class UrlbarInput {
+
+ // Enable the animation only after the first extend call to ensure it
+ // doesn't run when opening a new window.
+- if (!this.hasAttribute("breakout-extend-animate")) {
+- this.window.promiseDocumentFlushed(() => {
+- this.window.requestAnimationFrame(() => {
+- this.setAttribute("breakout-extend-animate", "true");
+- });
+- });
+- }
++// if (!this.hasAttribute("breakout-extend-animate")) {
++// this.window.promiseDocumentFlushed(() => {
++// this.window.requestAnimationFrame(() => {
++// this.setAttribute("breakout-extend-animate", "true");
++// });
++// });
++// }
+ }
+
+ endLayoutExtend() {
+diff --git a/browser/themes/shared/urlbar-searchbar.inc.css b/browser/themes/shared/urlbar-searchbar.inc.css
+index e80aaf6..6ec0961 100644
+--- a/browser/themes/shared/urlbar-searchbar.inc.css
++++ b/browser/themes/shared/urlbar-searchbar.inc.css
+@@ -5,6 +5,6 @@
+ %endif
+
+-%define urlbarMarginInline 5px
++%define urlbarMarginInline 0px
+ %define urlbarSearchButtonWidth calc(16px + 2 * var(--urlbar-icon-padding))
+
+ :root {
+@@ -246,14 +246,14 @@
+
+ #urlbar[breakout][breakout-extend] {
+ top: 0;
+- left: -@urlbarMarginInline@;
+- width: calc(100% + 2 * @urlbarMarginInline@);
++ left: 0;
++ width: 100;
+ }
+
+ #urlbar[breakout][breakout-extend] > #urlbar-input-container {
+ height: var(--urlbar-toolbar-height);
+- padding-block: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));
+- padding-inline: calc(@urlbarMarginInline@ + var(--urlbar-container-padding));
++ padding-block: 0;
++ padding-inline: 0;
+ }
+
+ #urlbar.searchButton[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-button {
+@@ -271,7 +271,7 @@
+ }
+
+ #urlbar[breakout][breakout-extend] > #urlbar-background {
+- animation-name: urlbar-grow;
++ animation-name: none;
+ animation-duration: 0s;
+ animation-timing-function: var(--animation-easing-function);
+ }
+diff --git a/browser/themes/shared/urlbarView.inc.css b/browser/themes/shared/urlbarView.inc.css
+index d2bb269..0d47466 100644
+--- a/browser/themes/shared/urlbarView.inc.css
++++ b/browser/themes/shared/urlbarView.inc.css
+@@ -56,8 +56,8 @@
+ display: block;
+ text-shadow: none;
+ overflow: clip;
+- margin-inline: calc(5px + var(--urlbar-container-padding));
+- width: calc(100% - 2 * (5px + var(--urlbar-container-padding)));
++ margin-inline: 0;
++ width: 100%;
+ /* Match urlbar-background's border. */
+ border-inline: 1px solid transparent;
+ }
+@@ -83,11 +83,11 @@
+ .urlbarView-row {
+ fill: currentColor;
+ fill-opacity: var(--urlbar-icon-fill-opacity);
+- padding-block: 2px;
++ padding-block: 0px;
+ }
+
+ :root:not([uidensity=compact]) .urlbarView-row:not([type=tip], [type=dynamic]) {
+- min-height: 32px;
++ min-height: 0px;
+ }
+
+ :root[uidensity=touch] .urlbarView-row:not([type=tip], [type=dynamic]) {
+@@ -241,6 +241,7 @@
+ object-fit: contain;
+ flex-shrink: 0;
+ -moz-context-properties: fill, fill-opacity;
++ margin-inline-start: 20px;
+ }
+
+
+@@ -268,10 +269,10 @@
+
+ .urlbarView-type-icon {
+ position: absolute;
+- width: 12px;
+- height: 12px;
+- margin-bottom: -4px;
+- margin-inline-start: 8px;
++ width: 16px;
++ height: 16px;
++ margin-bottom: 0px;
++ margin-inline-start: 0px;
+ align-self: end;
+ background-repeat: no-repeat;
+ background-size: contain;
+
diff --git a/librewolf/debian/patches/librewolf/mozilla-vpn-ad.patch b/librewolf/debian/patches/librewolf/mozilla-vpn-ad.patch
new file mode 100644
index 0000000..f5e2ce3
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/mozilla-vpn-ad.patch
@@ -0,0 +1,30 @@
+diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.html b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.html
+index 32c9146..f645288 100644
+--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.html
++++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.html
+@@ -51,14 +51,14 @@
+ <div class="fake-caret"></div>
+ </button>
+ </div>
+- <div class="info">
++ <!--div class="info">
+ <h1 id="info-title"></h1>
+ <p id="info-body"></p>
+ <a id="private-browsing-myths"></a>
+- </div>
++ </div-->
+ </div>
+
+- <div class="promo">
++ <!--div class="promo">
+ <div class="promo-image-large">
+ <img src="" alt="" />
+ </div>
+@@ -72,6 +72,6 @@
+ </div>
+ </div>
+ </div>
+- </div>
++ </div-->
+ </body>
+ </html>
diff --git a/librewolf/debian/patches/librewolf/mozilla_dirs.patch b/librewolf/debian/patches/librewolf/mozilla_dirs.patch
new file mode 100644
index 0000000..e854faa
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/mozilla_dirs.patch
@@ -0,0 +1,76 @@
+diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
+index 50a64a2..79d7d9c 100644
+--- a/toolkit/xre/nsXREDirProvider.cpp
++++ b/toolkit/xre/nsXREDirProvider.cpp
+@@ -303,16 +303,16 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) {
+ rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType,
+ getter_AddRefs(localDir));
+ if (NS_SUCCEEDED(rv)) {
+- rv = localDir->AppendNative("Mozilla"_ns);
++ rv = localDir->AppendNative("LibreWolf"_ns);
+ }
+ # else
+ constexpr auto dirname =
+ # ifdef HAVE_USR_LIB64_DIR
+- "/usr/lib64/mozilla"_ns
++ "/usr/lib64/librewolf"_ns
+ # elif defined(__OpenBSD__) || defined(__FreeBSD__)
+- "/usr/local/lib/mozilla"_ns
++ "/usr/local/lib/librewolf"_ns
+ # else
+- "/usr/lib/mozilla"_ns
++ "/usr/lib/librewolf"_ns
+ # endif
+ ;
+ rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
+@@ -413,9 +413,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
+ rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), false);
+ if (NS_SUCCEEDED(rv)) {
+ # if defined(XP_MACOSX)
+- rv = localDir->AppendNative("Mozilla"_ns);
++ rv = localDir->AppendNative("LibreWolf"_ns);
+ # else
+- rv = localDir->AppendNative(".mozilla"_ns);
++ rv = localDir->AppendNative(".librewolf"_ns);
+ # endif
+ }
+ if (NS_SUCCEEDED(rv)) {
+@@ -465,9 +465,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
+ else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) {
+ # ifdef ENABLE_SYSTEM_EXTENSION_DIRS
+ # if defined(__OpenBSD__) || defined(__FreeBSD__)
+- static const char* const sysLExtDir = "/usr/local/share/mozilla/extensions";
++ static const char* const sysLExtDir = "/usr/local/share/librewolf/extensions";
+ # else
+- static const char* const sysLExtDir = "/usr/share/mozilla/extensions";
++ static const char* const sysLExtDir = "/usr/share/librewolf/extensions";
+ # endif
+ return NS_NewNativeLocalFile(nsDependentCString(sysLExtDir), false, aFile);
+ # else
+@@ -1276,7 +1276,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
+ nsDependentCString(hasVendor ? GetAppVendor() : GetAppName())))) {
+ return NS_ERROR_FAILURE;
+ }
+- } else if (NS_FAILED(localDir->AppendNative("Mozilla"_ns))) {
++ } else if (NS_FAILED(localDir->AppendNative("LibreWolf"_ns))) {
+ return NS_ERROR_FAILURE;
+ }
+
+@@ -1559,7 +1559,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
+
+ #if defined(XP_MACOSX) || defined(XP_WIN)
+
+- static const char* const sXR = "Mozilla";
++ static const char* const sXR = "LibreWolf";
+ rv = aFile->AppendNative(nsDependentCString(sXR));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+@@ -1569,7 +1569,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
+
+ #elif defined(XP_UNIX)
+
+- static const char* const sXR = ".mozilla";
++ static const char* const sXR = ".librewolf";
+ rv = aFile->AppendNative(nsDependentCString(sXR));
+ NS_ENSURE_SUCCESS(rv, rv);
+
diff --git a/librewolf/debian/patches/librewolf/pref-naming.patch b/librewolf/debian/patches/librewolf/pref-naming.patch
new file mode 100644
index 0000000..6b462af
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/pref-naming.patch
@@ -0,0 +1,66 @@
+--- a/browser/locales/en-US/browser/preferences/preferences.ftl
++++ b/browser/locales/en-US/browser/preferences/preferences.ftl
+@@ -140,7 +140,7 @@
+ .accesskey = D
+
+ startup-restore-windows-and-tabs =
+- .label = Open previous windows and tabs
++ .label = Open previous windows and tabs (requires enabling browsing history)
+ .accesskey = s
+
+ startup-restore-warn-on-quit =
+@@ -252,7 +252,7 @@
+ .label = Choose…
+ .accesskey = o
+
+-choose-browser-language-description = Choose the languages used to display menus, messages, and notifications from { -brand-short-name }.
++choose-browser-language-description = Choose the languages used to display menus, messages, and notifications from { -brand-short-name }. Please notice that, to preserve your privacy, { -brand-short-name } forces en-US as the default language.
+ manage-browser-languages-button =
+ .label = Set Alternatives…
+ .accesskey = l
+@@ -409,13 +409,13 @@
+ .label = Play DRM-controlled content
+ .accesskey = P
+
+-play-drm-content-learn-more = Learn more
++play-drm-content-learn-more = Why we disable it
+
+ update-application-title = { -brand-short-name } Updates
+
+ update-application-description = Keep { -brand-short-name } up to date for the best performance, stability, and security.
+
+-update-application-version = Version { $version } <a data-l10n-name="learn-more">What’s new</a>
++update-application-version = Version { $version } <a data-l10n-name="learn-more">Visit the repositories</a>
+
+ update-history =
+ .label = Show Update History…
+@@ -568,7 +568,7 @@
+ # "Firefox" should be treated as a brand and kept in English,
+ # while "Home" and "(Default)" can be localized.
+ home-mode-choice-default =
+- .label = Firefox Home (Default)
++ .label = Homepage (Default)
+
+ home-mode-choice-custom =
+ .label = Custom URLs…
+@@ -597,8 +597,8 @@
+
+ ## Home Section - Firefox Home Content Customization
+
+-home-prefs-content-header = Firefox Home Content
+-home-prefs-content-description = Choose what content you want on your Firefox Home screen.
++home-prefs-content-header = Homepage Content
++home-prefs-content-description = Choose what content you want on your Homepage screen.
+
+ home-prefs-search-header =
+ .label = Web Search
+@@ -650,7 +650,7 @@
+ home-prefs-snippets-header =
+ .label = Snippets
+
+-home-prefs-snippets-description-new = Tips and news from { -vendor-short-name } and { -brand-product-name }
++home-prefs-snippets-description-new = Tips and news from { -vendor-short-name }
+
+ home-prefs-sections-rows-option =
+ .label =
+
diff --git a/librewolf/debian/patches/librewolf/reduce-rust-debuginfo.patch b/librewolf/debian/patches/librewolf/reduce-rust-debuginfo.patch
new file mode 100644
index 0000000..9d9543f
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/reduce-rust-debuginfo.patch
@@ -0,0 +1,21 @@
+Description: reduce the rust debuginfo level
+ because compiling with debuginfo=2 causes the OOM killer to interrupt the build
+ on launchpad builders. Initially this was only on 32 bit architectures, but
+ with firefox 63 it started happening frequently on arm64 and ppc64el too,
+ with newer versions it started happening very frequently on s390x too, and with
+ firefox 84 (built with rustc 1.47) it started happening on amd64 too.
+ This patch would initially decrease debug_info for selected architectures, but
+ with recent versions of rustc pretty much all supported architectures are
+ affected, so it is now unconditional.
+
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -2167,7 +2167,7 @@ def rust_compile_flags(opt_level, debug_
+ debug_assertions = False
+
+ if debug_symbols:
+- debug_info = "2"
++ debug_info = "1"
+
+ opts = []
+
diff --git a/librewolf/debian/patches/librewolf/relax-cargo-dep.patch b/librewolf/debian/patches/librewolf/relax-cargo-dep.patch
new file mode 100644
index 0000000..46c3eff
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/relax-cargo-dep.patch
@@ -0,0 +1,12 @@
+diff -r 246cfe5d5a05 build/moz.configure/rust.configure
+--- a/build/moz.configure/rust.configure Sat Oct 02 16:40:36 2021 +0000
++++ b/build/moz.configure/rust.configure Sun Oct 03 11:00:29 2021 +0200
+@@ -171,7 +171,7 @@
+ )
+ )
+ rustc_min_version = Version(MINIMUM_RUST_VERSION)
+- cargo_min_version = rustc_min_version
++ cargo_min_version = Version("1.51.0")
+
+ version = rustc_info.version
+ is_nightly = "nightly" in version.version
diff --git a/librewolf/debian/patches/librewolf/remove-branding-urlbar.patch b/librewolf/debian/patches/librewolf/remove-branding-urlbar.patch
new file mode 100644
index 0000000..e005458
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove-branding-urlbar.patch
@@ -0,0 +1,11 @@
+--- a/browser/locales/en-US/browser/browser.ftl
++++ b/browser/locales/en-US/browser/browser.ftl
+@@ -543,7 +543,7 @@
+ # A label shown above the "Firefox Suggest" (bookmarks/history) group in the
+ # urlbar results.
+ urlbar-group-firefox-suggest =
+- .label = { -firefox-suggest-brand-name }
++ .label = Suggestions
+
+ # A label shown above the search suggestions group in the urlbar results. It
+ # should use title case.
diff --git a/librewolf/debian/patches/librewolf/remove-cfrprefs.patch b/librewolf/debian/patches/librewolf/remove-cfrprefs.patch
new file mode 100644
index 0000000..f01d860
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove-cfrprefs.patch
@@ -0,0 +1,19 @@
+--- a/browser/components/preferences/main.inc.xhtml
++++ b/browser/components/preferences/main.inc.xhtml
+@@ -665,14 +665,14 @@
+ preference="media.hardwaremediakeys.enabled"/>
+ <label id="mediaControlLearnMore" class="learnMore" data-l10n-id="browsing-media-control-learn-more" is="text-link"/>
+ </hbox>
+- <hbox align="center" data-subcategory="cfraddons">
++ <hbox align="center" data-subcategory="cfraddons" hidden="true">
+ <checkbox id="cfrRecommendations"
+ class="tail-with-learn-more"
+ data-l10n-id="browsing-cfr-recommendations"
+ preference="browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons"/>
+ <label id="cfrLearnMore" class="learnMore" data-l10n-id="browsing-cfr-recommendations-learn-more" is="text-link"/>
+ </hbox>
+- <hbox align="center" data-subcategory="cfrfeatures">
++ <hbox align="center" data-subcategory="cfrfeatures" hidden="true">
+ <checkbox id="cfrRecommendations-features"
+ class="tail-with-learn-more"
+ data-l10n-id="browsing-cfr-features"
diff --git a/librewolf/debian/patches/librewolf/remove-internal-plugin-certs.patch b/librewolf/debian/patches/librewolf/remove-internal-plugin-certs.patch
new file mode 100644
index 0000000..72183e2
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove-internal-plugin-certs.patch
@@ -0,0 +1,18 @@
+diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.jsm b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+index 698cd67..5b899d9 100644
+--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
++++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+@@ -832,11 +832,11 @@ function getSignedStatus(aRv, aCert, aAddonID) {
+ }
+
+ if (aCert.organizationalUnit == "Mozilla Components") {
+- return AddonManager.SIGNEDSTATE_SYSTEM;
++ return AddonManager.SIGNEDSTATE_SIGNED;
+ }
+
+ if (aCert.organizationalUnit == "Mozilla Extensions") {
+- return AddonManager.SIGNEDSTATE_PRIVILEGED;
++ return AddonManager.SIGNEDSTATE_SIGNED;
+ }
+
+ return /preliminary/i.test(aCert.organizationalUnit)
diff --git a/librewolf/debian/patches/librewolf/remove-organization-policy-banner.patch b/librewolf/debian/patches/librewolf/remove-organization-policy-banner.patch
new file mode 100644
index 0000000..688c17c
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove-organization-policy-banner.patch
@@ -0,0 +1,11 @@
+--- a/browser/components/preferences/preferences.js
++++ b/browser/components/preferences/preferences.js
+@@ -161,8 +161,6 @@
+ this.removeAttribute("keyboard-navigation");
+ });
+
+- maybeDisplayPoliciesNotice();
+-
+ window.addEventListener("hashchange", onHashChange);
+
+ gotoPref().then(() => {
diff --git a/librewolf/debian/patches/librewolf/remove-snippets-from-home.patch b/librewolf/debian/patches/librewolf/remove-snippets-from-home.patch
new file mode 100644
index 0000000..4bd88ca
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove-snippets-from-home.patch
@@ -0,0 +1,22 @@
+--- a/browser/components/newtab/lib/AboutPreferences.jsm
++++ b/browser/components/newtab/lib/AboutPreferences.jsm
+@@ -54,18 +54,7 @@
+ },
+ ];
+
+-const PREFS_AFTER_SECTIONS = () => [
+- {
+- id: "snippets",
+- pref: {
+- feed: "feeds.snippets",
+- titleString: "home-prefs-snippets-header",
+- descString: "home-prefs-snippets-description-new",
+- },
+- icon: "chrome://global/skin/icons/info.svg",
+- eventSource: "SNIPPETS",
+- },
+-];
++const PREFS_AFTER_SECTIONS = () => [];
+
+ this.AboutPreferences = class AboutPreferences {
+ init() {
diff --git a/librewolf/debian/patches/librewolf/remove_addons.patch b/librewolf/debian/patches/librewolf/remove_addons.patch
new file mode 100644
index 0000000..3487f6d
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/remove_addons.patch
@@ -0,0 +1,74 @@
+diff --git a/browser/extensions/moz.build b/browser/extensions/moz.build
+index 269dcb2..ed7c31d 100644
+--- a/browser/extensions/moz.build
++++ b/browser/extensions/moz.build
+@@ -5,11 +5,8 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ DIRS += [
+- "doh-rollout",
+ "formautofill",
+ "screenshots",
+- "webcompat",
+- "report-site-issue",
+ "pictureinpicture",
+ "proxy-failover",
+ "search-detection",
+diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
+index 496379c..dd6f359 100644
+--- a/browser/locales/Makefile.in
++++ b/browser/locales/Makefile.in
+@@ -61,7 +61,6 @@ l10n-%:
+ ifneq (,$(wildcard ../extensions/formautofill/locales))
+ @$(MAKE) -C ../extensions/formautofill/locales AB_CD=$* XPI_NAME=locale-$*
+ endif
+- @$(MAKE) -C ../extensions/report-site-issue/locales AB_CD=$* XPI_NAME=locale-$*
+ @$(MAKE) -C ../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
+ @$(MAKE) -C ../../devtools/startup/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
+ @$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
+@@ -82,7 +81,6 @@ endif
+ @$(MAKE) -C ../../devtools/startup/locales chrome AB_CD=$*
+ @$(MAKE) chrome AB_CD=$*
+ @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$*
+- @$(MAKE) -C ../extensions/report-site-issue/locales chrome AB_CD=$*
+
+ package-win32-installer: $(SUBMAKEFILES)
+ $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
+diff --git a/browser/locales/filter.py b/browser/locales/filter.py
+index bb2e992..7d7768e 100644
+--- a/browser/locales/filter.py
++++ b/browser/locales/filter.py
+@@ -19,7 +19,6 @@
+ "devtools/startup",
+ "browser",
+ "browser/extensions/formautofill",
+- "browser/extensions/report-site-issue",
+ "extensions/spellcheck",
+ "other-licenses/branding/firefox",
+ "browser/branding/official",
+diff --git a/browser/locales/l10n.ini b/browser/locales/l10n.ini
+index f4cb7ca..4efac13 100644
+--- a/browser/locales/l10n.ini
++++ b/browser/locales/l10n.ini
+@@ -13,7 +13,6 @@
+ devtools/client
+ devtools/startup
+ browser/extensions/formautofill
+- browser/extensions/report-site-issue
+
+ [includes]
+ # non-central apps might want to use %(topsrcdir)s here, or other vars
+diff --git a/browser/locales/l10n.toml b/browser/locales/l10n.toml
+index b9b18fe..af7c583 100644
+--- a/browser/locales/l10n.toml
++++ b/browser/locales/l10n.toml
+@@ -132,10 +132,6 @@
+ l10n = "{l}browser/extensions/formautofill/**"
+
+ [[paths]]
+- reference = "browser/extensions/report-site-issue/locales/en-US/**"
+- l10n = "{l}browser/extensions/report-site-issue/**"
+-
+-[[paths]]
+ reference = "services/sync/locales/en-US/**"
+ l10n = "{l}services/sync/**"
diff --git a/librewolf/debian/patches/librewolf/sanitizing-description.patch b/librewolf/debian/patches/librewolf/sanitizing-description.patch
new file mode 100644
index 0000000..0909d54
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/sanitizing-description.patch
@@ -0,0 +1,11 @@
+--- a/browser/locales/en-US/browser/sanitize.ftl
++++ b/browser/locales/en-US/browser/sanitize.ftl
+@@ -19,7 +19,7 @@
+ .title = Clear All History
+ .style = width: 34em
+
+-clear-data-settings-label = When closed, { -brand-short-name } should automatically clear all
++clear-data-settings-label = When closed, { -brand-short-name } should automatically clear all (this will bypass your cookie exceptions)
+
+ ## clear-time-duration-prefix is followed by a dropdown list, with
+ ## values localized using clear-time-duration-value-* messages.
diff --git a/librewolf/debian/patches/librewolf/stop-undesired-requests.patch b/librewolf/debian/patches/librewolf/stop-undesired-requests.patch
new file mode 100644
index 0000000..57bb966
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/stop-undesired-requests.patch
@@ -0,0 +1,55 @@
+diff --git a/browser/components/newtab/data/content/activity-stream.bundle.js b/browser/components/newtab/data/content/activity-stream.bundle.js
+index 92f0652aec..696a99f7ef 100644
+--- a/browser/components/newtab/data/content/activity-stream.bundle.js
++++ b/browser/components/newtab/data/content/activity-stream.bundle.js
+@@ -1841,7 +1841,7 @@ class ASRouterAdminInner extends react__WEBPACK_IMPORTED_MODULE_3___default.a.Pu
+ label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, "remote settings (", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("a", {
+ className: "providerUrl",
+ target: "_blank",
+- href: "https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/nimbus-desktop-experiments/records",
++ href: "https://f.s.s.m.c.qjz9zk/v1/buckets/main/collections/nimbus-desktop-experiments/records",
+ rel: "noopener noreferrer"
+ }, "nimbus-desktop-experiments"), ")");
+ }
+diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+index c7cde8917c..b398a22064 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -2243,7 +2243,7 @@ pref("security.cert_pinning.hpkp.enabled", false);
+ // Remote settings preferences
+ // Note: if you change this, make sure to also review security.onecrl.maximum_staleness_in_seconds
+ pref("services.settings.poll_interval", 86400); // 24H
+-pref("services.settings.server", "https://firefox.settings.services.mozilla.com/v1");
++pref("services.settings.server", "https://f.s.s.m.c.qjz9zk/v1");
+ pref("services.settings.default_bucket", "main");
+
+ // The percentage of clients who will report uptake telemetry as
+diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm
+index 66df850904..1538a2ff0d 100644
+--- a/services/settings/Utils.jsm
++++ b/services/settings/Utils.jsm
+@@ -64,7 +64,7 @@
+ !Cu.isInAutomation &&
+ !isXpcshell &&
+ isNotThunderbird
+- ? "https://firefox.settings.services.mozilla.com/v1"
++ ? "https://f.s.s.m.c.qjz9zk/v1"
+ : gServerURL;
+ },
+
+diff --git a/toolkit/components/search/SearchUtils.jsm b/toolkit/components/search/SearchUtils.jsm
+index 8a3c6acb84..7408b3fd2f 100644
+--- a/toolkit/components/search/SearchUtils.jsm
++++ b/toolkit/components/search/SearchUtils.jsm
+@@ -159,9 +159,9 @@ var SearchUtils = {
+
+ ENGINES_URLS: {
+ "prod-main":
+- "https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-config/records",
++ "https://f.s.s.m.c.qjz9zk/v1/buckets/main/collections/search-config/records",
+ "prod-preview":
+- "https://firefox.settings.services.mozilla.com/v1/buckets/main-preview/collections/search-config/records",
++ "https://f.s.s.m.c.qjz9zk/v1/buckets/main-preview/collections/search-config/records",
+ "stage-main":
+ "https://settings.stage.mozaws.net/v1/buckets/main/collections/search-config/records",
+ "stage-preview":
diff --git a/librewolf/debian/patches/librewolf/urlbarprovider-interventions.patch b/librewolf/debian/patches/librewolf/urlbarprovider-interventions.patch
new file mode 100644
index 0000000..22448f1
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/urlbarprovider-interventions.patch
@@ -0,0 +1,13 @@
+diff --git a/browser/components/urlbar/UrlbarProviderInterventions.jsm b/browser/components/urlbar/UrlbarProviderInterventions.jsm
+index e22886ce92..d46d8191f2 100644
+--- a/browser/components/urlbar/UrlbarProviderInterventions.jsm
++++ b/browser/components/urlbar/UrlbarProviderInterventions.jsm
+@@ -451,7 +451,7 @@ class ProviderInterventions extends UrlbarProvider {
+ ]),
+ });
+ for (let [id, phrases] of Object.entries(DOCUMENTS)) {
+- queryScorer.addDocument({ id, phrases });
++// queryScorer.addDocument({ id, phrases });
+ }
+ return queryScorer;
+ });
diff --git a/librewolf/debian/patches/librewolf/use-system-icupkg.patch b/librewolf/debian/patches/librewolf/use-system-icupkg.patch
new file mode 100644
index 0000000..99eb4b5
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/use-system-icupkg.patch
@@ -0,0 +1,13 @@
+diff -r 08cd64cdbc3b config/external/icu/data/convert_icudata.py
+--- a/config/external/icu/data/convert_icudata.py Fri Jul 17 11:18:09 2020 +0000
++++ b/config/external/icu/data/convert_icudata.py Sat Jul 18 14:40:33 2020 +0200
+@@ -11,7 +11,7 @@
+ subprocess.run(
+ [
+- os.path.join(buildconfig.topobjdir, "dist", "host", "bin", "icupkg"),
++ "icupkg",
+ "-tb",
+ data_file,
+ output.name,
+ ]
+
diff --git a/librewolf/debian/patches/librewolf/webrtc-fix-compiler-flags-for-armhf.patch b/librewolf/debian/patches/librewolf/webrtc-fix-compiler-flags-for-armhf.patch
new file mode 100644
index 0000000..5cd6658
--- /dev/null
+++ b/librewolf/debian/patches/librewolf/webrtc-fix-compiler-flags-for-armhf.patch
@@ -0,0 +1,35 @@
+# Description: Don't pass -mfloat-abi=softfp on armhf
+# Author: Chris Coulson <chris.coulson@canonical.com>
+# Forwarded: no
+
+--- a/build/gyp.mozbuild
++++ b/build/gyp.mozbuild
+@@ -107,9 +107,15 @@ if CONFIG['ARM_ARCH']:
+ gyp_vars['arm_neon'] = 1
+ gyp_vars['build_with_neon'] = 1
+ else:
+- # CPU detection for ARM works on Android only. armv7 always uses CPU
+- # detection, so we have to set armv7=0 for non-Android target
+- gyp_vars['armv7'] = 0
++ gyp_vars['armv7'] = 1
++ # We enable NEON for Ubuntu armhf. Note that these don't really
++ # have any effect here as NEON is hardcoded on in
++ # media/webrtc/trunk/webrtc/build/common.gypi. Disabling these
++ # without fixing that file will result in a link failure, as
++ # targets hidden behind the build_with_neon flag don't get
++ # built but WEBRTC_HAS_NEON is still defined
++ gyp_vars['arm_neon'] = 1
++ gyp_vars['build_with_neon'] = 1
+ # For libyuv
+ gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
+
+--- a/third_party/libwebrtc/webrtc/build/config/compiler/BUILD.gn
++++ b/third_party/libwebrtc/webrtc/build/config/compiler/BUILD.gn
+@@ -590,7 +590,6 @@ config("compiler_cpu_abi") {
+ if (!is_nacl) {
+ cflags += [
+ "-march=$arm_arch",
+- "-mfloat-abi=$arm_float_abi",
+ ]
+ }
+ if (arm_tune != "") {
diff --git a/librewolf/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch b/librewolf/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch
new file mode 100644
index 0000000..d048acc
--- /dev/null
+++ b/librewolf/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch
@@ -0,0 +1,516 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Fri, 30 Apr 2010 11:03:50 +0200
+Subject: Add xptcall support for SH4 processors
+
+Closes: #553593
+https://bugzilla.mozilla.org/show_bug.cgi?id=382214
+---
+ xpcom/reflect/xptcall/md/unix/moz.build | 5 +
+ .../src/md/unix/xptcinvoke_linux_sh.cpp | 203 +++++++++++++
+ .../src/md/unix/xptcstubs_linux_sh.cpp | 271 ++++++++++++++++++
+ 3 files changed, 479 insertions(+)
+ create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+ create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+
+diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build
+index 1779c14..43a10a2 100644
+--- a/xpcom/reflect/xptcall/md/unix/moz.build
++++ b/xpcom/reflect/xptcall/md/unix/moz.build
+@@ -262,6 +262,11 @@ if CONFIG["OS_ARCH"] == "Linux":
+ CXXFLAGS += [
+ "-fno-integrated-as",
+ ]
++ elif CONFIG['OS_TEST'] in ('sh4', 'sh4a'):
++ SOURCES += [
++ 'xptcinvoke_linux_sh.cpp',
++ 'xptcstubs_linux_sh.cpp',
++ ]
+
+ if CONFIG["OS_ARCH"] == "Linux" and CONFIG["CPU_ARCH"] == "riscv64":
+ SOURCES += [
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+new file mode 100644
+index 0000000..ca4807d
+--- /dev/null
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+@@ -0,0 +1,203 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ *
++ * ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * Netscape Communications Corporation.
++ * Portions created by the Initial Developer are Copyright (C) 1998
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * - Copyright (C) 2008-2009 STMicroelectronics
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either of the GNU General Public License Version 2 or later (the "GPL"),
++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * Based on the neutroni port, however that assumed that the compiler was pushing params
++ * onto the stack. Change to take this into account.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "xptcprivate.h"
++
++extern "C" {
++
++const int c_int_register_params = 4;
++const int c_float_register_params = 8;
++
++static PRUint32 __attribute__((__used__))
++copy_to_stack(PRUint32 **that,PRUint32 methodIndex,PRUint32 paramCount, nsXPTCVariant* s,PRUint32* data)
++{
++ int intCount = 1; // Because of that
++ int floatCount = 0;
++ PRUint32 *intRegParams=data+1 ;
++ float *floatRegParams = (float *)(data+4);
++
++ /* Push the that register into the right place so it can be restored on exit */
++ *data= (PRUint32)(that);
++ data+=12; /* 4 integer registers, and 8 floating point registers */
++
++ for ( PRUint32 i = 0; i < paramCount; ++i, ++s )
++ {
++ nsXPTType type = s->IsPtrData() ? nsXPTType::T_I32 : s->type;
++
++ switch ( type ) {
++ case nsXPTType::T_I64:
++ case nsXPTType::T_U64:
++ // Space to pass in registers?
++ if ( (c_int_register_params - intCount) >= 2 ) {
++ *((PRInt64 *) intRegParams) = s->val.i64;
++ intRegParams += 2;
++ intCount += 2;
++ }
++ else {
++ *((PRInt64*) data) = s->val.i64;
++ data += 2;
++ }
++ break;
++ case nsXPTType::T_FLOAT:
++ // Space to pass in registers?
++ if ( floatCount < c_float_register_params ) {
++ *floatRegParams = s->val.f;
++ ++floatCount;
++ ++floatRegParams;
++ }
++ else {
++ *((float*) data) = s->val.f;
++ ++data;
++ }
++ break;
++ case nsXPTType::T_DOUBLE:
++ // Space to pass in registers?
++ if ( (c_float_register_params - floatCount) >= 2 ) {
++ if ( (floatCount & 1) != 0 ) {
++ ++floatCount;
++ ++floatRegParams;
++ }
++ *(double *)floatRegParams = s->val.d;
++ floatCount += 2;
++ floatRegParams += 2;
++ }
++ else {
++ *((double *) data) = s->val.d;
++ data += 2;
++ }
++ break;
++ default: // 32 (non-float) value
++ PRInt32 value = (PRInt32) (s->IsPtrData() ? s->ptr : s->val.p);
++ // Space to pass in registers?
++ if ( intCount < c_int_register_params ) {
++ *intRegParams = value;
++ ++intRegParams;
++ ++intCount;
++ }
++ else {
++ *data = value;
++ ++data;
++ }
++ break;
++ }
++ }
++
++ /* Now calculate the return address
++ * Dereference that to get vtable pointer
++ */
++ return *( (*(that))+(methodIndex) );
++
++}
++
++}
++
++ /* This was originally done as a C function, but the original code was
++ * relying on how the compiler laid out the stack. Later versions of
++ * gcc do a better job of optimising and never push the parameters on the
++ * stack. So it is simpler to just write the whole thing in assembler anyway
++ */
++
++ /* Because the SH processor passes the first few parameters in registers
++ it is a bit tricky setting things up right. To make things easier,
++ all the hard work will be done by copy_to_stack above. We pass to it
++ a chunk of memory, the bottom of which will be copied to registers r4 to r7
++ and fr4 to fr11 before calling the target function.
++ */
++
++/* r4= that, r5=methodIndex,r6=paramCount,r7=params */
++
++ __asm__ (
++
++
++ /* Make space for parameters to be passed to the method. Assume worst case
++ 8 bytes per parameter. Also leave space for 4 longs and 8 floats that
++ will be put into registers. The worst case is all int64 parameters
++ and even in this case 8 bytes are passed in registers so we can
++ deduct this from our allocation.
++ */
++ ".section .text\n"
++ ".balign 4\n"
++ ".global NS_InvokeByIndex_P\n"
++ "NS_InvokeByIndex_P:\n"
++ "mov.l r14, @-r15 \n\t" // Push frame
++ "sts.l pr, @-r15 \n\t" // Push link
++ "mov.l r8, @-r15 \n\t" // Save
++ "mov r15, r14\n\t" // Set frame
++ "mov #3, r1 \n\t" // Assume worse case, all params are 64bit, hence *8
++ "mov r6, r2\n\t"
++ "shld r1, r2 \n\t"
++ "mov r2, r8 \n\t" // Save stack drop
++ "add #48, r2 \n\t" // Space for 4 longs, 8 floats
++ "sub r2, r15 \n\t" // Drop stack
++ "mov.l 1f, r1 \n\t" // Get address of copy_to_stack_function
++ "jsr @r1 \n\t"
++ "mov.l r15, @-r15 \n\t" // Params will be dumped here
++ "add #4, r15 \n\t" // Pop stack ptr param. r0 contains method address
++
++ /* Now everything is laid out nicely in the stack. We just have to
++ load values at the top end of the memory area into registers and
++ make the call. We may load more things into registers than needed,
++ but nobody will care about that.
++ */
++
++ "mov.l @r15+, r4 \n\t" // that
++ "mov.l @r15+, r5 \n\t"
++ "mov.l @r15+, r6 \n\t"
++ "mov.l @r15+, r7 \n\t"
++ "fmov.s @r15+, fr5 \n\t"
++ "fmov.s @r15+, fr4 \n\t"
++ "fmov.s @r15+, fr7 \n\t"
++ "fmov.s @r15+, fr6 \n\t"
++ "fmov.s @r15+, fr9 \n\t"
++ "fmov.s @r15+, fr8 \n\t"
++ "fmov.s @r15+, fr11 \n\t"
++ "jsr @r0 \n\t" // Invoke method
++ "fmov.s @r15+, fr10 \n\t"
++ "add r8, r15\n\t" // Pop stack back
++ "mov.l @r15+, r8\n\t" // Restore r8
++ "lds.l @r15+, pr\n\t"
++ "rts\n\t"
++ "mov.l @r15+, r14\n\t"
++ ".balign 4\n\t"
++ "1: .long copy_to_stack \n\t"
++ );
++
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+new file mode 100644
+index 0000000..cf9fcea
+--- /dev/null
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+@@ -0,0 +1,271 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * Netscape Communications Corporation.
++ * Portions created by the Initial Developer are Copyright (C) 1999
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * - Copyright (C) 2008-2009 STMicroelectronics
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either of the GNU General Public License Version 2 or later (the "GPL"),
++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * Based on the neutrino code, with some bug fixes and using the C preprocessor
++ * like all the other ports rather than the python script.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "xptcprivate.h"
++#include "xptiprivate.h"
++
++const int c_int_register_params = 3;
++const int c_float_register_params = 8;
++
++/*
++ Dispatch function for all stubs.
++
++ The parameters to the original function are spread between 'data' which
++ is value of the stack pointer when the stub was called, intRegParams which
++ points to an area containing the values of r5, r6 and r7 when the stub was
++ called and floatRegParams which points to an area containing the values
++ of float registers fr4 to fr11 when the stub was called.
++
++ */
++extern "C" nsresult
++PrepareAndDispatch(nsXPTCStubBase* self, int methodIndex, PRUint32* data,
++ PRUint32 *intRegParams, float *floatRegParams)
++{
++#define PARAM_BUFFER_COUNT 16
++
++ nsresult result = NS_ERROR_FAILURE;
++ int intCount = 0;
++ int floatCount = 0;
++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
++ nsXPTCMiniVariant* dispatchParams = NULL;
++ const nsXPTMethodInfo* info;
++ PRUint8 paramCount;
++ PRUint8 i;
++
++ NS_ASSERTION(self,"no self");
++
++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
++ NS_ASSERTION(info,"no interface info");
++
++ paramCount = info->GetParamCount();
++
++ // setup variant array pointer
++ if(paramCount > PARAM_BUFFER_COUNT)
++ dispatchParams = new nsXPTCMiniVariant[paramCount];
++ else
++ dispatchParams = paramBuffer;
++ NS_ASSERTION(dispatchParams,"no place for params");
++
++ for ( i = 0; i < paramCount; ++i ) {
++ const nsXPTParamInfo& param = info->GetParam(i);
++ nsXPTCMiniVariant* dp = &dispatchParams[i];
++ nsXPTType type = param.IsOut() ? nsXPTType::T_I32 : param.GetType();
++
++ switch ( type ) {
++ case nsXPTType::T_I64:
++ case nsXPTType::T_U64:
++ // Was this passed in a register?
++ if ( (c_int_register_params - intCount) >= 2 ) {
++ dp->val.i64 = *((PRInt64 *) intRegParams);
++ intRegParams += 2;
++ intCount += 2;
++ }
++ else {
++ dp->val.i64 = *((PRInt64*) data);
++ data += 2;
++ }
++ break;
++ case nsXPTType::T_FLOAT:
++ // Was this passed in a register?
++ if ( floatCount < c_float_register_params ) {
++ dp->val.f = *floatRegParams;
++ ++floatCount;
++ ++floatRegParams;
++ }
++ else {
++ dp->val.f = *((float*) data);
++ ++data;
++ }
++ break;
++ case nsXPTType::T_DOUBLE:
++ // Was this passed in a register?
++ if ( (c_float_register_params - floatCount) >= 2 ) {
++ if ( floatCount & 1 != 0 ) {
++ ++floatCount;
++ ++floatRegParams;
++ }
++ dp->val.d = *(double *)floatRegParams;
++ floatCount += 2;
++ floatRegParams += 2;
++ }
++ else {
++ dp->val.d = *((double *) data);
++ data += 2;
++ }
++ break;
++ default: // 32-bit (non-float) value
++ // Was this passed in a register?
++ if ( intCount < c_int_register_params ) {
++ dp->val.i32 = *intRegParams;
++ ++intRegParams;
++ ++intCount;
++ }
++ else {
++ dp->val.i32 = *data;
++ ++data;
++ }
++ break;
++ }
++ }
++
++ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
++
++ if(dispatchParams != paramBuffer)
++ delete [] dispatchParams;
++
++ return result;
++}
++
++
++__asm__ (
++ ".text\n"
++ ".little\n"
++ ".section .rodata\n"
++
++ ".globl SharedStub\n"
++ ".type SharedStub, @function\n"
++ "SharedStub:\n"
++ "mov r15, r1\n"
++ "mov.l r14,@-r15\n"
++ "sts.l pr,@-r15\n"
++ "mov r15, r14\n"
++
++ /* Some parameters might have been passed in registers, so push them
++ * all onto the stack, PrepareAndDispatch can then work out whats what
++ * given method type information.
++ */
++ "mov.l r7, @-r15\n"
++ "mov.l r6, @-r15\n"
++ "mov.l r5, @-r15\n"
++ "mov r15, r7\n" /* r7 = PrepareAndDispatch intRegParams param */
++
++ "fmov.s fr10, @-r15\n"
++ "fmov.s fr11, @-r15\n"
++ "fmov.s fr8, @-r15\n"
++ "fmov.s fr9, @-r15\n"
++ "fmov.s fr6, @-r15\n"
++ "fmov.s fr7, @-r15\n"
++ "fmov.s fr4, @-r15\n"
++ "fmov.s fr5, @-r15\n"
++ "mov.l r15, @-r15\n" /* PrepareAndDispatch floatRegParams param */
++
++ "mov r1, r6\n" /* r6 = PrepareAndDispatch data param */
++
++ "mov.l 1f, r1\n"
++ "jsr @r1\n" /* Note, following instruction is executed first*/
++ "mov r2, r5\n" /* r5 = PrepareAndDispatch methodIndex param */
++
++ "mov r14,r15\n"
++ "lds.l @r15+,pr\n"
++ "mov.l @r15+,r14\n"
++ "rts\n"
++ "nop\n"
++ ".align 2\n"
++ "1:\n"
++ ".long PrepareAndDispatch\n"
++ );
++
++#define STUB_ENTRY(n) \
++__asm__( \
++ ".text\n" \
++ ".align 1 \n" \
++ ".if " #n " < 10\n\t" \
++ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 100\n\t" \
++ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 1000\n\t" \
++ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
++ ".else\n\t" \
++ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
++ ".endif\n\t" \
++ "mov.l 1f, r1 \n" \
++ ".if "#n" < 128 \n" \
++ "jmp @r1 \n" \
++ " mov #"#n",r2 \n" \
++ ".elseif "#n" < 256 \n" \
++ "mov #"#n", r2 \n" \
++ "jmp @r1 \n" \
++ " extu.b r2, r2 \n" \
++ ".else \n" \
++ "mov #"#n" & 0xff,r2 \n" \
++ "extu.b r2, r2 \n" \
++ "mov #"#n">>8, r3 \n" \
++ "shll8 r3 \n" \
++ "jmp @r1 \n" \
++ " or r3, r2 \n" \
++ ".endif \n" \
++ ".if "#n" % 20 == 0\n" \
++ ".align 2\n" \
++ "1:\n" \
++ ".long SharedStub\n" \
++ ".endif\n" \
++ );
++
++
++/* Due to the fact that the SH4 can only load forward labels, we have
++ * to use sentinel_entry to output the last label. A better solution
++ * would be to introduce a STUB_LAST macro in the defs.in file, but
++ * this will do for now
++ */
++
++#define SENTINEL_ENTRY(n) \
++__asm__( \
++".if "#n" == 0 \n" \
++ ".text \n" \
++ ".align 2\n" \
++ "1:\n" \
++ ".long SharedStub\n" \
++".endif\n" \
++); \
++ \
++nsresult nsXPTCStubBase::Sentinel##n() \
++{ \
++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
++ return NS_ERROR_NOT_IMPLEMENTED; \
++}
++
++#include "xptcstubsdef.inc"
diff --git a/librewolf/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch b/librewolf/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
new file mode 100644
index 0000000..a543693
--- /dev/null
+++ b/librewolf/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
@@ -0,0 +1,63 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 13 Jan 2014 12:00:25 +0900
+Subject: [NSS] Fix FTBFS on Hurd because of MAXPATHLEN
+
+---
+ security/nss/cmd/shlibsign/shlibsign.c | 21 ++++++++++++++++-----
+ security/nss/lib/freebl/unix_rand.c | 4 ++++
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/security/nss/cmd/shlibsign/shlibsign.c b/security/nss/cmd/shlibsign/shlibsign.c
+index ad8f3b8..c33f2c9 100644
+--- a/security/nss/cmd/shlibsign/shlibsign.c
++++ b/security/nss/cmd/shlibsign/shlibsign.c
+@@ -725,7 +725,6 @@ main(int argc, char **argv)
+ #ifdef USES_LINKS
+ int ret;
+ struct stat stat_buf;
+- char link_buf[MAXPATHLEN + 1];
+ char *link_file = NULL;
+ #endif
+
+@@ -1068,10 +1067,22 @@ main(int argc, char **argv)
+ }
+ if (S_ISLNK(stat_buf.st_mode)) {
+ char *dirpath, *dirend;
+- ret = readlink(input_file, link_buf, sizeof(link_buf) - 1);
+- if (ret < 0) {
+- perror(input_file);
+- goto cleanup;
++ char *link_buf = NULL;
++ size_t size = 64;
++ while (1) {
++ link_buf = realloc(link_buf, size);
++ if (!link_buf) {
++ perror(input_file);
++ goto cleanup;
++ }
++ ret = readlink(input_file, link_buf, size - 1);
++ if (ret < 0) {
++ perror(input_file);
++ goto cleanup;
++ }
++ if (ret < size - 1)
++ break;
++ size *= 2;
+ }
+ link_buf[ret] = 0;
+ link_file = mkoutput(input_file);
+diff --git a/security/nss/lib/freebl/unix_rand.c b/security/nss/lib/freebl/unix_rand.c
+index 24381cb..f5520f0 100644
+--- a/security/nss/lib/freebl/unix_rand.c
++++ b/security/nss/lib/freebl/unix_rand.c
+@@ -843,6 +843,10 @@ RNG_FileForRNG(const char *fileName)
+ #define _POSIX_PTHREAD_SEMANTICS
+ #include <dirent.h>
+
++#ifndef PATH_MAX
++#define PATH_MAX 1024
++#endif
++
+ PRBool
+ ReadFileOK(char *dir, char *file)
+ {
diff --git a/librewolf/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch b/librewolf/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
new file mode 100644
index 0000000..b58b9e2
--- /dev/null
+++ b/librewolf/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: Use NEON_FLAGS instead of VPX_ASFLAGS for libaom neon code
+
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index fd8c7f2..db3f9ca 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
diff --git a/librewolf/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch b/librewolf/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
new file mode 100644
index 0000000..0089947
--- /dev/null
+++ b/librewolf/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
@@ -0,0 +1,22 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Fri, 12 Jul 2019 18:28:34 +0900
+Subject: Work around GCC ICE on mips*, i386 and s390x
+
+Closes: #931757
+---
+ gfx/skia/skia/third_party/skcms/src/Transform_inl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+index c4b3122..cfaae3e 100644
+--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
++++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+@@ -685,7 +685,7 @@ SI void sample_clut_16(const skcms_A2B* a2b, I32 ix, F* r, F* g, F* b) {
+ // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
+ // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops().
+ #if 1 && defined(__GNUC__) && !defined(__clang__) \
+- && (defined(__mips64) || defined(__i386) || defined(__s390x__))
++ && (defined(__mips__) || defined(__i386) || defined(__s390x__))
+ #define MAYBE_NOINLINE __attribute__((noinline))
+ #else
+ #define MAYBE_NOINLINE
diff --git a/librewolf/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch b/librewolf/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch
new file mode 100644
index 0000000..31bc9f9
--- /dev/null
+++ b/librewolf/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sat, 7 Dec 2019 08:32:14 +0900
+Subject: Work around another GCC ICE on arm
+
+---
+ gfx/skia/skia/third_party/skcms/src/Transform_inl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+index cfaae3e..604e109 100644
+--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
++++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+@@ -685,7 +685,7 @@ SI void sample_clut_16(const skcms_A2B* a2b, I32 ix, F* r, F* g, F* b) {
+ // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
+ // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops().
+ #if 1 && defined(__GNUC__) && !defined(__clang__) \
+- && (defined(__mips__) || defined(__i386) || defined(__s390x__))
++ && (defined(__arm__) || defined(__aarch64__) || defined(__mips__) || defined(__i386) || defined(__s390x__))
+ #define MAYBE_NOINLINE __attribute__((noinline))
+ #else
+ #define MAYBE_NOINLINE
diff --git a/librewolf/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch b/librewolf/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch
new file mode 100644
index 0000000..31cb2fe
--- /dev/null
+++ b/librewolf/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Fri, 17 Feb 2012 17:47:15 +0100
+Subject: Don't auto-disable extensions in system directories
+
+---
+ browser/app/profile/firefox.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
+index 065f691..72528b0 100644
+--- a/browser/app/profile/firefox.js
++++ b/browser/app/profile/firefox.js
+@@ -56,7 +56,7 @@ pref("extensions.systemAddon.update.enabled", true);
+
+ // Disable add-ons that are not installed by the user in all scopes by default.
+ // See the SCOPE constants in AddonManager.jsm for values to use here.
+-pref("extensions.autoDisableScopes", 15);
++pref("extensions.autoDisableScopes", 3);
+ // Scopes to scan for changes at startup.
+ pref("extensions.startupScanScopes", 0);
+
diff --git a/librewolf/debian/patches/prefs/Set-DPI-to-system-settings.patch b/librewolf/debian/patches/prefs/Set-DPI-to-system-settings.patch
new file mode 100644
index 0000000..86b0af3
--- /dev/null
+++ b/librewolf/debian/patches/prefs/Set-DPI-to-system-settings.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Thu, 13 Mar 2008 20:30:19 +0100
+Subject: Set DPI to system settings
+
+---
+ 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..7878e2e 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -2353,7 +2353,7 @@ pref("bidi.browser.ui", false);
+ // A value of 0 means use the system DPI. A positive value is used as the DPI.
+ // This sets the physical size of a device pixel and thus controls the
+ // interpretation of physical units such as "pt".
+-pref("layout.css.dpi", -1);
++pref("layout.css.dpi", 0);
+
+ // pref for which side vertical scrollbars should be on
+ // 0 = end-side in UI direction
diff --git a/librewolf/debian/patches/series b/librewolf/debian/patches/series
new file mode 100644
index 0000000..9ff52ac
--- /dev/null
+++ b/librewolf/debian/patches/series
@@ -0,0 +1,44 @@
+fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
+porting/Add-xptcall-support-for-SH4-processors.patch
+porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
+porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
+porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
+porting/Work-around-another-GCC-ICE-on-arm.patch
+prefs/Set-DPI-to-system-settings.patch
+prefs/Don-t-auto-disable-extensions-in-system-directories.patch
+debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch
+debian-hacks/Add-another-preferences-directory-for-applications-p.patch
+debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch
+debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch
+debian-hacks/Don-t-build-image-gtests.patch
+debian-hacks/Set-program-name-from-the-remoting-name.patch
+debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch
+debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch
+debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch
+debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch
+debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch
+debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch
+librewolf/armhf-reduce-linker-memory-use.patch -p1
+librewolf/fix-armhf-webrtc-build.patch -p1
+librewolf/webrtc-fix-compiler-flags-for-armhf.patch -p1
+librewolf/remove_addons.patch -p1
+librewolf/megabar.patch -p1
+librewolf/reduce-rust-debuginfo.patch -p1
+librewolf/mozilla-vpn-ad.patch -p1
+librewolf/disable-pocket.patch -p1
+librewolf/context-menu.patch -p1
+librewolf/browser-confvars.patch -p1
+librewolf/urlbarprovider-interventions.patch -p1
+librewolf/remove-internal-plugin-certs.patch -p1
+librewolf/allow-searchengines-non-esr.patch -p1
+librewolf/stop-undesired-requests.patch -p1
+librewolf/about-dialog.patch -p1
+librewolf/mozilla_dirs.patch -p1
+librewolf/allow-ubo-private-mode.patch -p1
+librewolf/add-language-warning.patch -p1
+librewolf/pref-naming.patch -p1
+librewolf/remove-branding-urlbar.patch -p1
+librewolf/remove-cfrprefs.patch -p1
+librewolf/remove-organization-policy-banner.patch -p1
+librewolf/remove-snippets-from-home.patch -p1
+librewolf/sanitizing-description.patch -p1
bgstack15