diff options
Diffstat (limited to 'debian/patches/debian-hacks')
13 files changed, 353 insertions, 0 deletions
diff --git a/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch b/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch new file mode 100644 index 0000000000..1ae44c6d9d --- /dev/null +++ b/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 996590e..69aae75 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 sys +@@ -830,9 +831,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/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch b/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch new file mode 100644 index 0000000000..93b500067e --- /dev/null +++ b/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 d9bcdb1..9b044f6 100644 +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -850,6 +850,7 @@ static nsresult DeleteDirIfExists(nsIFile* dir) { + + static const char* const kAppendPrefDir[] = {"defaults", "preferences", + nullptr}; ++static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nullptr }; + + nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty, + nsISimpleEnumerator** aResult) { +@@ -860,6 +861,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty, + nsCOMArray<nsIFile> directories; + + LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); ++ 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/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch b/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch new file mode 100644 index 0000000000..55472f5bd9 --- /dev/null +++ b/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 7cb35bf..d23263f 100644 +--- a/moz.build ++++ b/moz.build +@@ -195,4 +195,7 @@ SPHINX_TREES["setup"] = "docs/setup" + + SPHINX_TREES["crash-reporting"] = "docs/crash-reporting" + ++if not CONFIG["LIBXUL_SDK"]: ++ DIRS += ["debian/extra-stuff"] ++ + include("build/templates.mozbuild") diff --git a/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch b/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch new file mode 100644 index 0000000000..52e743487c --- /dev/null +++ b/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch @@ -0,0 +1,21 @@ +From: Mike Hommey <mh@glandium.org> +Date: Sat, 6 Feb 2021 07:52:19 +0900 +Subject: Allow to build with cargo in Debian unstable + +--- + build/moz.configure/rust.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index ff3dbe0..2ceff72 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -168,7 +168,7 @@ def rust_compiler(rustc_info, cargo_info, build_project): + rustc_min_version = Version("1.47.0") + else: + rustc_min_version = Version(MINIMUM_RUST_VERSION) +- cargo_min_version = rustc_min_version ++ cargo_min_version = Version("1.46.0") + + version = rustc_info.version + is_nightly = "nightly" in version.version diff --git a/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch b/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch new file mode 100644 index 0000000000..77fce0c93f --- /dev/null +++ b/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 5856227..38ca679 100644 +--- a/python/mozbuild/mozbuild/nodeutil.py ++++ b/python/mozbuild/mozbuild/nodeutil.py +@@ -13,7 +13,7 @@ from mozboot.util import get_state_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/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch b/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch new file mode 100644 index 0000000000..9a57898132 --- /dev/null +++ b/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/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch b/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch new file mode 100644 index 0000000000..f163f7116c --- /dev/null +++ b/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 e9f4ba5..6183f77 100644 +--- a/browser/components/sessionstore/SessionStore.jsm ++++ b/browser/components/sessionstore/SessionStore.jsm +@@ -5017,7 +5017,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 && +@@ -5046,9 +5046,8 @@ var SessionStoreInternal = { + case "minimized": + if (aSizeModeBeforeMinimized == "maximized") { + aWindow.maximize(); ++ break; + } +- aWindow.minimize(); +- break; + case "normal": + aWindow.restore(); + break; diff --git a/debian/patches/debian-hacks/Don-t-build-image-gtests.patch b/debian/patches/debian-hacks/Don-t-build-image-gtests.patch new file mode 100644 index 0000000000..6572c1324b --- /dev/null +++ b/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 427077f..74949b7 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/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch b/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch new file mode 100644 index 0000000000..4c6a0818f8 --- /dev/null +++ b/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch @@ -0,0 +1,24 @@ +From: Mike Hommey <glandium@debian.org> +Date: Sat, 27 Sep 2008 17:17:39 +0200 +Subject: Don't register plugins if the MOZILLA_DISABLE_PLUGINS environment + variable is set + +--- + dom/plugins/base/nsPluginHost.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp +index 4cc7d89..deeb0df 100644 +--- a/dom/plugins/base/nsPluginHost.cpp ++++ b/dom/plugins/base/nsPluginHost.cpp +@@ -301,6 +301,10 @@ nsPluginHost::nsPluginHost() + Preferences::AddStrongObserver(this, "plugin.disable"); + } + ++ const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS"); ++ if (env && env[0]) ++ mPluginsDisabled = PR_TRUE; ++ + nsCOMPtr<nsIObserverService> obsService = + mozilla::services::GetObserverService(); + if (obsService) { diff --git a/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch b/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch new file mode 100644 index 0000000000..8793177558 --- /dev/null +++ b/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 9c7cb46..6d8a935 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -4226,7 +4226,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/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch b/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch new file mode 100644 index 0000000000..7f337afdfb --- /dev/null +++ b/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 fd1e9cc..ffca341 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/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch b/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch new file mode 100644 index 0000000000..cc650d0350 --- /dev/null +++ b/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 24bdd50..0de7757 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" +@@ -24,6 +25,7 @@ + # include "WakeLockListener.h" + #endif + #include "gfxPlatform.h" ++#include "nsAppRunner.h" + #include "ScreenHelperGTK.h" + #include "HeadlessScreenHelper.h" + #include "mozilla/widget/ScreenManager.h" +@@ -156,10 +158,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/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch b/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch new file mode 100644 index 0000000000..18861df5f7 --- /dev/null +++ b/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 dba747c..2f5ee03 100644 +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -3803,7 +3803,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. |