New commits:
commit 1354f7eabe23ffb53b3066416766c66f1ce88d40
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>
http/firefox: updated once again patches for 133.0.x
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index e41120b..b258a73 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,6 @@
+2024-12-19 Pavel Vinogradov <public AT sourcemage.org>
+ * patches/*: updated
+
2024-12-16 Pavel Vinogradov <public AT sourcemage.org>
* patches/*: updated
diff --git a/http/firefox/patches/0013-bmo-1516803-gcc-lto-sandbox.patch
b/http/firefox/patches/0013-bmo-1516803-gcc-lto-sandbox.patch
deleted file mode 100644
index eff08f6..0000000
--- a/http/firefox/patches/0013-bmo-1516803-gcc-lto-sandbox.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Naur a/security/sandbox/linux/moz.build
b/security/sandbox/linux/moz.build
---- a/security/sandbox/linux/moz.build 2023-07-04 13:57:56.029462755 +0300
-+++ b/security/sandbox/linux/moz.build 2023-07-04 14:05:08.607221195 +0300
-@@ -114,9 +114,9 @@
- # gcc lto likes to put the top level asm in syscall.cc in a different
partition
- # from the function using it which breaks the build. Work around that by
- # forcing there to be only one partition.
--for f in CONFIG["OS_CXXFLAGS"]:
-- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
-- LDFLAGS += ["--param lto-partitions=1"]
-+if CONFIG['CC_TYPE'] != 'clang':
-+ LDFLAGS += ['--param', 'lto-partitions=1']
-+
-
- DEFINES["NS_NO_XPCOM"] = True
- DisableStlWrapping()
diff --git a/http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
new file mode 100644
index 0000000..112cd42
--- /dev/null
+++ b/http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
@@ -0,0 +1,19 @@
+diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi
firefox-115.0/widget/gtk/GfxInfo.cpp
+--- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29
12:18:53.179833765 +0200
++++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776
+0200
+@@ -970,14 +970,6 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
+ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
+ V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", "");
+
+- // Disable on Release/late Beta on AMD
+-#if !defined(EARLY_BETA_OR_EARLIER)
+- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll,
+- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
+- nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
+- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
+- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE",
"");
+-#endif
+ ////////////////////////////////////
+ // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST
+ APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All,
+
diff --git
a/http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0022-bgo-925101-force-software-rendering-during-pgo-build.patch
new file mode 100644
index 0000000..7f4b987
--- /dev/null
+++
b/http/firefox/patches/0022-bgo-925101-force-software-rendering-during-pgo-build.patch
@@ -0,0 +1,16 @@
+
+bgo#925101 for some unknown reason some users are having issues with pgo
crashing. Forcing software
+rendering to be used while pgo'ing doesn't have an impact in performance, as
hwaccel isn't used
+during pgo even when it works. The issue could be caused by
wrongly/automatically
+configured/detected gpu access anyway. The issue seems related to mesa, but
hard to pinpoint.
+
+diff '--color=auto' -Naur a/testing/profiles/profileserver/user.js
b/testing/profiles/profileserver/user.js
+--- a/testing/profiles/profileserver/user.js 2024-07-11 10:37:53.889115118
+0300
++++ b/testing/profiles/profileserver/user.js 2024-07-11 10:40:23.086996283
+0300
+@@ -11,3 +11,6 @@
+ user_pref("extensions.webextensions.warnings-as-errors", false);
+ // Turn off update
+ user_pref("app.update.disabledForTesting", true);
++// bgo#925101 mesa issues with pgo, force software rendering during pgo
++user_pref("gfx.webrender.software", true);
++
diff --git
a/http/firefox/patches/0022-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
b/http/firefox/patches/0023-bgo-925101-force-software-rendering-during-pgo-build.patch
deleted file mode 100644
index 7f4b987..0000000
---
a/http/firefox/patches/0023-bgo-925101-force-software-rendering-during-pgo-build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-bgo#925101 for some unknown reason some users are having issues with pgo
crashing. Forcing software
-rendering to be used while pgo'ing doesn't have an impact in performance, as
hwaccel isn't used
-during pgo even when it works. The issue could be caused by
wrongly/automatically
-configured/detected gpu access anyway. The issue seems related to mesa, but
hard to pinpoint.
-
-diff '--color=auto' -Naur a/testing/profiles/profileserver/user.js
b/testing/profiles/profileserver/user.js
---- a/testing/profiles/profileserver/user.js 2024-07-11 10:37:53.889115118
+0300
-+++ b/testing/profiles/profileserver/user.js 2024-07-11 10:40:23.086996283
+0300
-@@ -11,3 +11,6 @@
- user_pref("extensions.webextensions.warnings-as-errors", false);
- // Turn off update
- user_pref("app.update.disabledForTesting", true);
-+// bgo#925101 mesa issues with pgo, force software rendering during pgo
-+user_pref("gfx.webrender.software", true);
-+
diff --git a/http/firefox/patches/0023-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0023-bgo-929967-fix-pgo-on-musl.patch
new file mode 100644
index 0000000..3c8457e
--- /dev/null
+++ b/http/firefox/patches/0023-bgo-929967-fix-pgo-on-musl.patch
@@ -0,0 +1,14 @@
+diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
+index 7354714..0385792 100755
+--- a/build/pgo/profileserver.py
++++ b/build/pgo/profileserver.py
+@@ -171,6 +171,9 @@ if __name__ == "__main__":
+ env["UPLOAD_PATH"], "profile-run-1.log"
+ )
+
++ # Workaround for https://bugs.gentoo.org/929967
++ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
++
+ # Run Firefox a first time to initialize its profile
+ runner = FirefoxRunner(
+ profile=profile,
diff --git a/http/firefox/patches/0024-bgo-929967-fix-pgo-on-musl.patch
b/http/firefox/patches/0024-bgo-929967-fix-pgo-on-musl.patch
deleted file mode 100644
index 3c8457e..0000000
--- a/http/firefox/patches/0024-bgo-929967-fix-pgo-on-musl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
-index 7354714..0385792 100755
---- a/build/pgo/profileserver.py
-+++ b/build/pgo/profileserver.py
-@@ -171,6 +171,9 @@ if __name__ == "__main__":
- env["UPLOAD_PATH"], "profile-run-1.log"
- )
-
-+ # Workaround for https://bugs.gentoo.org/929967
-+ env["LD_LIBRARY_PATH"] = os.path.join(os.getcwd(), "dist", "bin")
-+
- # Run Firefox a first time to initialize its profile
- runner = FirefoxRunner(
- profile=profile,
diff --git a/http/firefox/patches/0024-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0024-gcc-always-inline-from-fedora.patch
new file mode 100644
index 0000000..d7af60f
--- /dev/null
+++ b/http/firefox/patches/0024-gcc-always-inline-from-fedora.patch
@@ -0,0 +1,14 @@
+diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
+--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
+@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
+ }
+
+ #else
+-// GCC is slower when dealing with always_inline, especially in debug
builds.
+-// When using Clang, use always_inline more aggressively.
+-# if defined(__clang__) || defined(NDEBUG)
++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
+ # define ALWAYS_INLINE __attribute__((always_inline)) inline
+ # else
+ # define ALWAYS_INLINE inline
diff --git
a/http/firefox/patches/0025-bmo-1914774-fix-non-unified-gcc-build.patch
b/http/firefox/patches/0025-bmo-1914774-fix-non-unified-gcc-build.patch
new file mode 100644
index 0000000..5a8b961
--- /dev/null
+++ b/http/firefox/patches/0025-bmo-1914774-fix-non-unified-gcc-build.patch
@@ -0,0 +1,78 @@
+
+# HG changeset patch
+# User Jamie Nicol <jnicol AT mozilla.com>
+# Date 1730754950 0
+# Node ID c3b8335e93d1828a531bb6232eeec47d8c3e28c3
+# Parent d0378618ec04083ed5fa03276a51c626ec1b7278
+Bug 1914774 - Fix non-unified GCC build. r=gfx-reviewers,lsalzman
+
+Differential Revision: https://phabricator.services.mozilla.com/D227857
+
+diff --git a/gfx/webrender_bindings/RenderTextureHost.cpp
b/gfx/webrender_bindings/RenderTextureHost.cpp
+--- a/gfx/webrender_bindings/RenderTextureHost.cpp
++++ b/gfx/webrender_bindings/RenderTextureHost.cpp
+@@ -3,16 +3,17 @@
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+ #include "RenderTextureHost.h"
+
+ #include "GLContext.h"
+ #include "mozilla/layers/CompositorThread.h"
++#include "mozilla/layers/TextureHost.h"
+ #include "RenderThread.h"
+
+ namespace mozilla {
+ namespace wr {
+
+ void ActivateBindAndTexParameteri(gl::GLContext* aGL, GLenum aActiveTexture,
+ GLenum aBindTarget, GLuint aBindTexture) {
+ aGL->fActiveTexture(aActiveTexture);
+@@ -39,16 +40,21 @@ wr::WrExternalImage RenderTextureHost::L
+ }
+
+ wr::WrExternalImage RenderTextureHost::LockSWGL(uint8_t aChannelIndex,
+ void* aContext,
+ RenderCompositor*
aCompositor) {
+ return InvalidToWrExternalImage();
+ }
+
++RefPtr<layers::TextureSource> RenderTextureHost::CreateTextureSource(
++ layers::TextureSourceProvider* aProvider) {
++ return nullptr;
++}
++
+ void RenderTextureHost::Destroy() {
+ MOZ_ASSERT_UNREACHABLE("unexpected to be called");
+ }
+
+ RefPtr<RenderTextureHostUsageInfo> RenderTextureHost::GetOrMergeUsageInfo(
+ const MutexAutoLock& aProofOfMapLock,
+ RefPtr<RenderTextureHostUsageInfo> aUsageInfo) {
+ MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread());
+diff --git a/gfx/webrender_bindings/RenderTextureHost.h
b/gfx/webrender_bindings/RenderTextureHost.h
+--- a/gfx/webrender_bindings/RenderTextureHost.h
++++ b/gfx/webrender_bindings/RenderTextureHost.h
+@@ -84,19 +84,17 @@ class RenderTextureHost {
+ virtual void Unlock() {}
+
+ virtual wr::WrExternalImage LockSWGL(uint8_t aChannelIndex, void*
aContext,
+ RenderCompositor* aCompositor);
+
+ virtual void UnlockSWGL() {}
+
+ virtual RefPtr<layers::TextureSource> CreateTextureSource(
+- layers::TextureSourceProvider* aProvider) {
+- return nullptr;
+- }
++ layers::TextureSourceProvider* aProvider);
+
+ virtual void ClearCachedResources() {}
+
+ // Called asynchronouly when corresponding TextureHost's
mCompositableCount
+ // becomes from 0 to 1. For now, it is used only for
+ // SurfaceTextureHost/RenderAndroidSurfaceTextureHost.
+ virtual void PrepareForUse() {}
+ // Called asynchronouly when corresponding TextureHost's is actually
going to
+
diff --git a/http/firefox/patches/0025-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0025-gcc-always-inline-from-fedora.patch
deleted file mode 100644
index d7af60f..0000000
--- a/http/firefox/patches/0025-gcc-always-inline-from-fedora.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
---- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
-+++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
-@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
- }
-
- #else
--// GCC is slower when dealing with always_inline, especially in debug
builds.
--// When using Clang, use always_inline more aggressively.
--# if defined(__clang__) || defined(NDEBUG)
-+# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
- # define ALWAYS_INLINE __attribute__((always_inline)) inline
- # else
- # define ALWAYS_INLINE inline
diff --git
a/http/firefox/patches/0026-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0026-bmo-1657849-musl-sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..ffdf126
--- /dev/null
+++
b/http/firefox/patches/0026-bmo-1657849-musl-sandbox-sched_setscheduler.patch
@@ -0,0 +1,24 @@
+upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+index ed958bc..9824433 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1751,6 +1751,6 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
+ case __NR_sched_get_priority_max:
++ case __NR_sched_setscheduler:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+@@ -1926,3 +1926,2 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
+ case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler:
+ case __NR_sched_getattr:
+@@ -1932,2 +1931,5 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
+ }
++ // sched_setscheduler gets special treatment here (bug 1657849):
++ case __NR_sched_setscheduler:
++ return Allow();
+
diff --git
a/http/firefox/patches/0026-bmo-1914774-fix-non-unified-gcc-build.patch
b/http/firefox/patches/0026-bmo-1914774-fix-non-unified-gcc-build.patch
deleted file mode 100644
index 5a8b961..0000000
--- a/http/firefox/patches/0026-bmo-1914774-fix-non-unified-gcc-build.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-
-# HG changeset patch
-# User Jamie Nicol <jnicol AT mozilla.com>
-# Date 1730754950 0
-# Node ID c3b8335e93d1828a531bb6232eeec47d8c3e28c3
-# Parent d0378618ec04083ed5fa03276a51c626ec1b7278
-Bug 1914774 - Fix non-unified GCC build. r=gfx-reviewers,lsalzman
-
-Differential Revision: https://phabricator.services.mozilla.com/D227857
-
-diff --git a/gfx/webrender_bindings/RenderTextureHost.cpp
b/gfx/webrender_bindings/RenderTextureHost.cpp
---- a/gfx/webrender_bindings/RenderTextureHost.cpp
-+++ b/gfx/webrender_bindings/RenderTextureHost.cpp
-@@ -3,16 +3,17 @@
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
- #include "RenderTextureHost.h"
-
- #include "GLContext.h"
- #include "mozilla/layers/CompositorThread.h"
-+#include "mozilla/layers/TextureHost.h"
- #include "RenderThread.h"
-
- namespace mozilla {
- namespace wr {
-
- void ActivateBindAndTexParameteri(gl::GLContext* aGL, GLenum aActiveTexture,
- GLenum aBindTarget, GLuint aBindTexture) {
- aGL->fActiveTexture(aActiveTexture);
-@@ -39,16 +40,21 @@ wr::WrExternalImage RenderTextureHost::L
- }
-
- wr::WrExternalImage RenderTextureHost::LockSWGL(uint8_t aChannelIndex,
- void* aContext,
- RenderCompositor*
aCompositor) {
- return InvalidToWrExternalImage();
- }
-
-+RefPtr<layers::TextureSource> RenderTextureHost::CreateTextureSource(
-+ layers::TextureSourceProvider* aProvider) {
-+ return nullptr;
-+}
-+
- void RenderTextureHost::Destroy() {
- MOZ_ASSERT_UNREACHABLE("unexpected to be called");
- }
-
- RefPtr<RenderTextureHostUsageInfo> RenderTextureHost::GetOrMergeUsageInfo(
- const MutexAutoLock& aProofOfMapLock,
- RefPtr<RenderTextureHostUsageInfo> aUsageInfo) {
- MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread());
-diff --git a/gfx/webrender_bindings/RenderTextureHost.h
b/gfx/webrender_bindings/RenderTextureHost.h
---- a/gfx/webrender_bindings/RenderTextureHost.h
-+++ b/gfx/webrender_bindings/RenderTextureHost.h
-@@ -84,19 +84,17 @@ class RenderTextureHost {
- virtual void Unlock() {}
-
- virtual wr::WrExternalImage LockSWGL(uint8_t aChannelIndex, void*
aContext,
- RenderCompositor* aCompositor);
-
- virtual void UnlockSWGL() {}
-
- virtual RefPtr<layers::TextureSource> CreateTextureSource(
-- layers::TextureSourceProvider* aProvider) {
-- return nullptr;
-- }
-+ layers::TextureSourceProvider* aProvider);
-
- virtual void ClearCachedResources() {}
-
- // Called asynchronouly when corresponding TextureHost's
mCompositableCount
- // becomes from 0 to 1. For now, it is used only for
- // SurfaceTextureHost/RenderAndroidSurfaceTextureHost.
- virtual void PrepareForUse() {}
- // Called asynchronouly when corresponding TextureHost's is actually
going to
-
diff --git
a/http/firefox/patches/0027-bmo-1657849-musl-sandbox-sched_setscheduler.patch
b/http/firefox/patches/0027-bmo-1657849-musl-sandbox-sched_setscheduler.patch
deleted file mode 100644
index ffdf126..0000000
---
a/http/firefox/patches/0027-bmo-1657849-musl-sandbox-sched_setscheduler.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
-diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
-index ed958bc..9824433 100644
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -1751,6 +1751,6 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
- case __NR_sched_get_priority_max:
-+ case __NR_sched_setscheduler:
- return Allow();
- case __NR_sched_getparam:
-- case __NR_sched_getscheduler:
-- case __NR_sched_setscheduler: {
-+ case __NR_sched_getscheduler: {
- Arg<pid_t> pid(0);
-@@ -1926,3 +1926,2 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
- case __NR_sched_getscheduler:
-- case __NR_sched_setscheduler:
- case __NR_sched_getattr:
-@@ -1932,2 +1931,5 @@ class RDDSandboxPolicy final : public
SandboxPolicyCommon {
- }
-+ // sched_setscheduler gets special treatment here (bug 1657849):
-+ case __NR_sched_setscheduler:
-+ return Allow();
-
diff --git
a/http/firefox/patches/0027-bmo-1928364-musl-make-sys_fork-non-fatal.patch
b/http/firefox/patches/0027-bmo-1928364-musl-make-sys_fork-non-fatal.patch
new file mode 100644
index 0000000..a6a850a
--- /dev/null
+++ b/http/firefox/patches/0027-bmo-1928364-musl-make-sys_fork-non-fatal.patch
@@ -0,0 +1,34 @@
+diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1597,10 +1597,14 @@
+ // fork() crash, currently, because there are too many system
+ // libraries/plugins that try to run commands. But they can
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++# ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++# endif
+
+ # ifdef __NR_fadvise64
+ case __NR_fadvise64:
+ return Allow();
+ # endif
+@@ -1984,10 +1988,14 @@
+ return Allow();
+
+ // nvidia drivers may attempt to spawn nvidia-modprobe
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++# ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++# endif
+
+ // Pass through the common policy.
+ default:
+ return SandboxPolicyCommon::EvaluateSyscall(sysno);
+ }
+
diff --git a/http/firefox/patches/0028-bgo-940031-wasm-support.patch
b/http/firefox/patches/0028-bgo-940031-wasm-support.patch
new file mode 100644
index 0000000..a02f290
--- /dev/null
+++ b/http/firefox/patches/0028-bgo-940031-wasm-support.patch
@@ -0,0 +1,12 @@
+diff -up a/toolkit/moz.configure.wasi b/toolkit/moz.configure
+--- a/toolkit/moz.configure.wasi
++++ b/toolkit/moz.configure
+@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing
+ def wasi_sysroot_flags(wasi_sysroot):
+ if wasi_sysroot:
+ log.info("Using wasi sysroot in %s", wasi_sysroot)
+- return ["--sysroot=%s" % wasi_sysroot]
++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs",
"-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi",
"%%PORTAGE_WORKDIR%%/wasi-sdk-%%WASI_SDK_VER%%-%%WASI_ARCH%%-linux/lib/clang/%%WASI_SDK_LLVM_VER%%/lib/wasi/libclang_rt.builtins-wasm32.a"]
+ return []
+
+ set_config("WASI_SYSROOT", wasi_sysroot)
diff --git
a/http/firefox/patches/0028-bmo-1928364-musl-make-sys_fork-non-fatal.patch
b/http/firefox/patches/0028-bmo-1928364-musl-make-sys_fork-non-fatal.patch
deleted file mode 100644
index a6a850a..0000000
--- a/http/firefox/patches/0028-bmo-1928364-musl-make-sys_fork-non-fatal.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/security/sandbox/linux/SandboxFilter.cpp
b/security/sandbox/linux/SandboxFilter.cpp
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -1597,10 +1597,14 @@
- // fork() crash, currently, because there are too many system
- // libraries/plugins that try to run commands. But they can
- // usually do something reasonable on error.
- case __NR_clone:
- return ClonePolicy(Error(EPERM));
-+# ifdef __NR_fork
-+ case __NR_fork:
-+ return Error(ENOSYS);
-+# endif
-
- # ifdef __NR_fadvise64
- case __NR_fadvise64:
- return Allow();
- # endif
-@@ -1984,10 +1988,14 @@
- return Allow();
-
- // nvidia drivers may attempt to spawn nvidia-modprobe
- case __NR_clone:
- return ClonePolicy(Error(EPERM));
-+# ifdef __NR_fork
-+ case __NR_fork:
-+ return Error(ENOSYS);
-+# endif
-
- // Pass through the common policy.
- default:
- return SandboxPolicyCommon::EvaluateSyscall(sysno);
- }
-
diff --git a/http/firefox/patches/0029-bgo-940031-wasm-support.patch
b/http/firefox/patches/0029-bgo-940031-wasm-support.patch
deleted file mode 100644
index a02f290..0000000
--- a/http/firefox/patches/0029-bgo-940031-wasm-support.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up a/toolkit/moz.configure.wasi b/toolkit/moz.configure
---- a/toolkit/moz.configure.wasi
-+++ b/toolkit/moz.configure
-@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing
- def wasi_sysroot_flags(wasi_sysroot):
- if wasi_sysroot:
- log.info("Using wasi sysroot in %s", wasi_sysroot)
-- return ["--sysroot=%s" % wasi_sysroot]
-+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs",
"-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi",
"%%PORTAGE_WORKDIR%%/wasi-sdk-%%WASI_SDK_VER%%-%%WASI_ARCH%%-linux/lib/clang/%%WASI_SDK_LLVM_VER%%/lib/wasi/libclang_rt.builtins-wasm32.a"]
- return []
-
- set_config("WASI_SYSROOT", wasi_sysroot)
diff --git
a/http/firefox/patches/0029-bmo-1935621-python-3.12.8-mach-fix.patch
b/http/firefox/patches/0029-bmo-1935621-python-3.12.8-mach-fix.patch
new file mode 100644
index 0000000..bbf9b2f
--- /dev/null
+++ b/http/firefox/patches/0029-bmo-1935621-python-3.12.8-mach-fix.patch
@@ -0,0 +1,119 @@
+diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
+--- a/python/mach/mach/site.py
++++ b/python/mach/mach/site.py
+@@ -15,10 +15,11 @@
+ import site
+ import subprocess
+ import sys
+ import sysconfig
+ import tempfile
++import warnings
+ from contextlib import contextmanager
+ from pathlib import Path
+ from typing import Callable, Optional
+
+ from mach.requirements import (
+@@ -817,37 +818,79 @@
+
+ class PythonVirtualenv:
+ """Calculates paths of interest for general python virtual
environments"""
+
+ def __init__(self, prefix):
+- if _is_windows:
+- self.bin_path = os.path.join(prefix, "Scripts")
+- self.python_path = os.path.join(self.bin_path, "python.exe")
+- else:
+- self.bin_path = os.path.join(prefix, "bin")
+- self.python_path = os.path.join(self.bin_path, "python")
+ self.prefix = os.path.realpath(prefix)
++ self.paths = self._get_sysconfig_paths(self.prefix)
+
+- @functools.lru_cache(maxsize=None)
+- def resolve_sysconfig_packages_path(self, sysconfig_path):
+- # macOS uses a different default sysconfig scheme based on whether
it's using the
+- # system Python or running in a virtualenv.
+- # Manually define the scheme (following the implementation in
+- # "sysconfig._get_default_scheme()") so that we're always following
the
+- # code path for a virtualenv directory structure.
+- if os.name == "posix":
+- scheme = "posix_prefix"
+- else:
+- scheme = os.name
++ # Name of the Python executable to use in virtual environments.
++ # An executable with the same name as sys.executable might not
exist in
++ # virtual environments. An executable with 'python' as the steam —
++ # without version numbers or ABI flags — will always be present in
++ # virtual environments, so we use that.
++ python_exe_name = "python" + sysconfig.get_config_var("EXE")
++
++ self.bin_path = self.paths["scripts"]
++ self.python_path = os.path.join(self.bin_path, python_exe_name)
+
+- sysconfig_paths = sysconfig.get_paths(scheme)
+- data_path = Path(sysconfig_paths["data"])
+- path = Path(sysconfig_paths[sysconfig_path])
+- relative_path = path.relative_to(data_path)
++ @staticmethod
++ def _get_sysconfig_paths(prefix):
++ """Calculate the sysconfig paths of a virtual environment in the
given prefix.
+
+- # Path to virtualenv's "site-packages" directory for provided
sysconfig path
+- return os.path.normpath(os.path.normcase(Path(self.prefix) /
relative_path))
++ The virtual environment MUST be using the same Python distribution
as us.
++ """
++ # Determine the sysconfig scheme used in virtual environments
++ if "venv" in sysconfig.get_scheme_names():
++ # A 'venv' scheme was added in Python 3.11 to allow users to
++ # calculate the paths for a virtual environment, since the
default
++ # scheme may not always be the same as used on virtual
environments.
++ # Some common examples are the system Python distributed by
macOS,
++ # Debian, and Fedora.
++ # For more information, see https://github.com/python/cpython/issues/89576
++ venv_scheme = "venv"
++ elif os.name == "nt":
++ # We know that before the 'venv' scheme was added, on Windows,
++ # the 'nt' scheme was used in virtual environments.
++ venv_scheme = "nt"
++ elif os.name == "posix":
++ # We know that before the 'venv' scheme was added, on POSIX,
++ # the 'posix_prefix' scheme was used in virtual environments.
++ venv_scheme = "posix_prefix"
++ else:
++ # This should never happen with upstream Python, as the 'venv'
++ # scheme should always be available on >=3.11, and no other
++ # platforms are supported by the upstream on older Python
versions.
++ #
++ # Since the 'venv' scheme isn't available, and we have no
knowledge
++ # of this platform/distribution, fallback to the default scheme.
++ #
++ # Hitting this will likely be the result of running a custom
Python
++ # distribution targetting a platform that is not supported by
the
++ # upstream.
++ # In this case, unless the Python vendor patched the Python
++ # distribution in such a way as the default scheme may not
always be
++ # the same scheme, using the default scheme should be correct.
++ # If the vendor did patch Python as such, to work around this
issue,
++ # I would recommend them to define a 'venv' scheme that matches
++ # the layout used on virtual environments in their Python
distribution.
++ # (rec. signed Filipe Laíns — upstream sysconfig maintainer)
++ venv_scheme = sysconfig.get_default_scheme()
++ warnings.warn(
++ f"Unknown platform '{os.name}', using the default install
scheme '{venv_scheme}'. "
++ "If this is incorrect, please ask your Python vendor to add
a 'venv' sysconfig scheme "
++ "(see https://github.com/python/cpython/issues/89576, or
check the code comment).",
++ stacklevel=2,
++ )
++ # Build the sysconfig config_vars dictionary for the virtual
environment.
++ venv_vars = sysconfig.get_config_vars().copy()
++ venv_vars["base"] = venv_vars["platbase"] = prefix
++ # Get sysconfig paths for the virtual environment.
++ return sysconfig.get_paths(venv_scheme, vars=venv_vars)
++
++ def resolve_sysconfig_packages_path(self, sysconfig_path):
++ return self.paths[sysconfig_path]
+
+ def site_packages_dirs(self):
+ dirs = []
+ if sys.platform.startswith("win"):
+ dirs.append(os.path.normpath(os.path.normcase(self.prefix)))
+
diff --git
a/http/firefox/patches/0030-bgo-944056-fix-wasm-on-llvm-profile.patch
b/http/firefox/patches/0030-bgo-944056-fix-wasm-on-llvm-profile.patch
new file mode 100644
index 0000000..e9b6bfa
--- /dev/null
+++ b/http/firefox/patches/0030-bgo-944056-fix-wasm-on-llvm-profile.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/944056
+
+--- a/gfx/graphite2/src/MozGrMalloc.h
++++ b/gfx/graphite2/src/MozGrMalloc.h
+@@ -12,7 +12,7 @@
+
+ #include "mozilla/mozalloc.h"
+
+-#if defined(XP_LINUX) && !defined(ANDROID)
++#if defined(XP_LINUX) && !defined(_LIBCPP_VERSION)
+
+ #define malloc moz_xmalloc
+ #define calloc moz_xcalloc
diff --git
a/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
b/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
deleted file mode 100644
index bbf9b2f..0000000
--- a/http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
---- a/python/mach/mach/site.py
-+++ b/python/mach/mach/site.py
-@@ -15,10 +15,11 @@
- import site
- import subprocess
- import sys
- import sysconfig
- import tempfile
-+import warnings
- from contextlib import contextmanager
- from pathlib import Path
- from typing import Callable, Optional
-
- from mach.requirements import (
-@@ -817,37 +818,79 @@
-
- class PythonVirtualenv:
- """Calculates paths of interest for general python virtual
environments"""
-
- def __init__(self, prefix):
-- if _is_windows:
-- self.bin_path = os.path.join(prefix, "Scripts")
-- self.python_path = os.path.join(self.bin_path, "python.exe")
-- else:
-- self.bin_path = os.path.join(prefix, "bin")
-- self.python_path = os.path.join(self.bin_path, "python")
- self.prefix = os.path.realpath(prefix)
-+ self.paths = self._get_sysconfig_paths(self.prefix)
-
-- @functools.lru_cache(maxsize=None)
-- def resolve_sysconfig_packages_path(self, sysconfig_path):
-- # macOS uses a different default sysconfig scheme based on whether
it's using the
-- # system Python or running in a virtualenv.
-- # Manually define the scheme (following the implementation in
-- # "sysconfig._get_default_scheme()") so that we're always following
the
-- # code path for a virtualenv directory structure.
-- if os.name == "posix":
-- scheme = "posix_prefix"
-- else:
-- scheme = os.name
-+ # Name of the Python executable to use in virtual environments.
-+ # An executable with the same name as sys.executable might not
exist in
-+ # virtual environments. An executable with 'python' as the steam —
-+ # without version numbers or ABI flags — will always be present in
-+ # virtual environments, so we use that.
-+ python_exe_name = "python" + sysconfig.get_config_var("EXE")
-+
-+ self.bin_path = self.paths["scripts"]
-+ self.python_path = os.path.join(self.bin_path, python_exe_name)
-
-- sysconfig_paths = sysconfig.get_paths(scheme)
-- data_path = Path(sysconfig_paths["data"])
-- path = Path(sysconfig_paths[sysconfig_path])
-- relative_path = path.relative_to(data_path)
-+ @staticmethod
-+ def _get_sysconfig_paths(prefix):
-+ """Calculate the sysconfig paths of a virtual environment in the
given prefix.
-
-- # Path to virtualenv's "site-packages" directory for provided
sysconfig path
-- return os.path.normpath(os.path.normcase(Path(self.prefix) /
relative_path))
-+ The virtual environment MUST be using the same Python distribution
as us.
-+ """
-+ # Determine the sysconfig scheme used in virtual environments
-+ if "venv" in sysconfig.get_scheme_names():
-+ # A 'venv' scheme was added in Python 3.11 to allow users to
-+ # calculate the paths for a virtual environment, since the
default
-+ # scheme may not always be the same as used on virtual
environments.
-+ # Some common examples are the system Python distributed by
macOS,
-+ # Debian, and Fedora.
-+ # For more information, see https://github.com/python/cpython/issues/89576
-+ venv_scheme = "venv"
-+ elif os.name == "nt":
-+ # We know that before the 'venv' scheme was added, on Windows,
-+ # the 'nt' scheme was used in virtual environments.
-+ venv_scheme = "nt"
-+ elif os.name == "posix":
-+ # We know that before the 'venv' scheme was added, on POSIX,
-+ # the 'posix_prefix' scheme was used in virtual environments.
-+ venv_scheme = "posix_prefix"
-+ else:
-+ # This should never happen with upstream Python, as the 'venv'
-+ # scheme should always be available on >=3.11, and no other
-+ # platforms are supported by the upstream on older Python
versions.
-+ #
-+ # Since the 'venv' scheme isn't available, and we have no
knowledge
-+ # of this platform/distribution, fallback to the default scheme.
-+ #
-+ # Hitting this will likely be the result of running a custom
Python
-+ # distribution targetting a platform that is not supported by
the
-+ # upstream.
-+ # In this case, unless the Python vendor patched the Python
-+ # distribution in such a way as the default scheme may not
always be
-+ # the same scheme, using the default scheme should be correct.
-+ # If the vendor did patch Python as such, to work around this
issue,
-+ # I would recommend them to define a 'venv' scheme that matches
-+ # the layout used on virtual environments in their Python
distribution.
-+ # (rec. signed Filipe Laíns — upstream sysconfig maintainer)
-+ venv_scheme = sysconfig.get_default_scheme()
-+ warnings.warn(
-+ f"Unknown platform '{os.name}', using the default install
scheme '{venv_scheme}'. "
-+ "If this is incorrect, please ask your Python vendor to add
a 'venv' sysconfig scheme "
-+ "(see https://github.com/python/cpython/issues/89576, or
check the code comment).",
-+ stacklevel=2,
-+ )
-+ # Build the sysconfig config_vars dictionary for the virtual
environment.
-+ venv_vars = sysconfig.get_config_vars().copy()
-+ venv_vars["base"] = venv_vars["platbase"] = prefix
-+ # Get sysconfig paths for the virtual environment.
-+ return sysconfig.get_paths(venv_scheme, vars=venv_vars)
-+
-+ def resolve_sysconfig_packages_path(self, sysconfig_path):
-+ return self.paths[sysconfig_path]
-
- def site_packages_dirs(self):
- dirs = []
- if sys.platform.startswith("win"):
- dirs.append(os.path.normpath(os.path.normcase(self.prefix)))
-
diff --git
a/http/firefox/patches/0031-bgo-944056-fix-wasm-on-llvm-profile.patch
b/http/firefox/patches/0031-bgo-944056-fix-wasm-on-llvm-profile.patch
deleted file mode 100644
index e9b6bfa..0000000
--- a/http/firefox/patches/0031-bgo-944056-fix-wasm-on-llvm-profile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/944056
-
---- a/gfx/graphite2/src/MozGrMalloc.h
-+++ b/gfx/graphite2/src/MozGrMalloc.h
-@@ -12,7 +12,7 @@
-
- #include "mozilla/mozalloc.h"
-
--#if defined(XP_LINUX) && !defined(ANDROID)
-+#if defined(XP_LINUX) && !defined(_LIBCPP_VERSION)
-
- #define malloc moz_xmalloc
- #define calloc moz_xcalloc
diff --git a/http/firefox/patches/0031-bmo-1932163-python-3.13-fix.patch
b/http/firefox/patches/0031-bmo-1932163-python-3.13-fix.patch
new file mode 100644
index 0000000..5afa983
--- /dev/null
+++ b/http/firefox/patches/0031-bmo-1932163-python-3.13-fix.patch
@@ -0,0 +1,48 @@
+
+# HG changeset patch
+# User Andreas Farre <farre AT mozilla.com>
+# Date 1733143029 0
+# Node ID cb63007c6dd5f48f437e0f636e0a69617a3a590c
+# Parent a7391db30046582a1f3e587793542c8378e4fe0b
+Bug 1932163 - Switch to use ssl module. r=glandium
+
+Differential Revision: https://phabricator.services.mozilla.com/D229505
+
+diff --git a/python/mozboot/mozboot/bootstrap.py
b/python/mozboot/mozboot/bootstrap.py
+--- a/python/mozboot/mozboot/bootstrap.py
++++ b/python/mozboot/mozboot/bootstrap.py
+@@ -834,30 +834,30 @@ def update_git_tools(git: Optional[Path]
+ try:
+ subprocess.check_call([str(cinnabar_exe), "self-update"])
+ except subprocess.CalledProcessError as e:
+ print(e)
+
+ # git-cinnabar 0.6.0rc1 self-update had a bug that could leave an empty
+ # file. If that happens, install from scratch.
+ if not exists or cinnabar_exe.stat().st_size == 0:
++ import ssl
+ from urllib.request import urlopen
+
+ import certifi
+
+ if not cinnabar_dir.exists():
+ cinnabar_dir.mkdir()
+
+ cinnabar_url = "https://github.com/glandium/git-cinnabar/"
+ download_py = cinnabar_dir / "download.py"
+ with open(download_py, "wb") as fh:
++ context = ssl.create_default_context(cafile=certifi.where())
+ shutil.copyfileobj(
+- urlopen(
+- f"{cinnabar_url}/raw/master/download.py",
cafile=certifi.where()
+- ),
++ urlopen(f"{cinnabar_url}/raw/master/download.py",
context=context),
+ fh,
+ )
+
+ try:
+ subprocess.check_call(
+ [sys.executable, str(download_py)], cwd=str(cinnabar_dir)
+ )
+ except subprocess.CalledProcessError as e:
+
diff --git a/http/firefox/patches/0032-bmo-1925198-python-3.13-fix2.patch
b/http/firefox/patches/0032-bmo-1925198-python-3.13-fix2.patch
new file mode 100644
index 0000000..b9ef8da
--- /dev/null
+++ b/http/firefox/patches/0032-bmo-1925198-python-3.13-fix2.patch
@@ -0,0 +1,62 @@
+
+# HG changeset patch
+# User Rob Wu <rob AT robwu.nl>
+# Date 1730828835 0
+# Node ID 50d41051085b8d1201443a09faeff9207f5152af
+# Parent 025c089998e3b05f0a71fd03c9c9c9ac4c4abf17
+Bug 1925198 - Move telnetlib import to BaseEmulator r=jmaher
+
+emulator.py currently has an unconditional telnetlib import, but the
+file can also be imported when the functionality is not needed.
+
+Because telnetlib was removed from Python 3.13, this unconditional
+import breaks use cases that do not even care about telnet. As a stopgap
+measure until a better fix is available, move the import to the function
+that relies on telnet.
+
+Differential Revision: https://phabricator.services.mozilla.com/D227995
+
+diff --git a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
+--- a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
++++ b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
+@@ -3,17 +3,16 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ import datetime
+ import os
+ import shutil
+ import subprocess
+ import tempfile
+ import time
+-from telnetlib import Telnet
+
+ from mozdevice import ADBHost
+ from mozprocess import ProcessHandler
+
+ from ..errors import TimeoutException
+ from .base import Device
+ from .emulator_battery import EmulatorBattery
+ from .emulator_geo import EmulatorGeo
+@@ -184,16 +183,21 @@ class BaseEmulator(Device):
+ output.append(line.rstrip())
+ if line.startswith("OK"):
+ return output
+ elif line.startswith("KO:"):
+ raise Exception("bad telnet response: %s" % line)
+
+ def _run_telnet(self, command):
+ if not self.telnet:
++ # telnetlib is dropped in Python 3.13 (bug 1925198).
++ # Import here instead of the top level to avoid breaking users
of
++ # this file that are independent of telnet.
++ from telnetlib import Telnet
++
+ self.telnet = Telnet("localhost", self.port)
+ self._get_telnet_response()
+ return self._get_telnet_response(command)
+
+ def __del__(self):
+ if self.telnet:
+ self.telnet.write("exit\n")
+ self.telnet.read_all()
+
diff --git a/http/firefox/patches/0032-bmo-1932163-python-3.13-fix.patch
b/http/firefox/patches/0032-bmo-1932163-python-3.13-fix.patch
deleted file mode 100644
index 5afa983..0000000
--- a/http/firefox/patches/0032-bmo-1932163-python-3.13-fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-
-# HG changeset patch
-# User Andreas Farre <farre AT mozilla.com>
-# Date 1733143029 0
-# Node ID cb63007c6dd5f48f437e0f636e0a69617a3a590c
-# Parent a7391db30046582a1f3e587793542c8378e4fe0b
-Bug 1932163 - Switch to use ssl module. r=glandium
-
-Differential Revision: https://phabricator.services.mozilla.com/D229505
-
-diff --git a/python/mozboot/mozboot/bootstrap.py
b/python/mozboot/mozboot/bootstrap.py
---- a/python/mozboot/mozboot/bootstrap.py
-+++ b/python/mozboot/mozboot/bootstrap.py
-@@ -834,30 +834,30 @@ def update_git_tools(git: Optional[Path]
- try:
- subprocess.check_call([str(cinnabar_exe), "self-update"])
- except subprocess.CalledProcessError as e:
- print(e)
-
- # git-cinnabar 0.6.0rc1 self-update had a bug that could leave an empty
- # file. If that happens, install from scratch.
- if not exists or cinnabar_exe.stat().st_size == 0:
-+ import ssl
- from urllib.request import urlopen
-
- import certifi
-
- if not cinnabar_dir.exists():
- cinnabar_dir.mkdir()
-
- cinnabar_url = "https://github.com/glandium/git-cinnabar/"
- download_py = cinnabar_dir / "download.py"
- with open(download_py, "wb") as fh:
-+ context = ssl.create_default_context(cafile=certifi.where())
- shutil.copyfileobj(
-- urlopen(
-- f"{cinnabar_url}/raw/master/download.py",
cafile=certifi.where()
-- ),
-+ urlopen(f"{cinnabar_url}/raw/master/download.py",
context=context),
- fh,
- )
-
- try:
- subprocess.check_call(
- [sys.executable, str(download_py)], cwd=str(cinnabar_dir)
- )
- except subprocess.CalledProcessError as e:
-
diff --git a/http/firefox/patches/0033-bmo-1925198-python-3.13-fix2.patch
b/http/firefox/patches/0033-bmo-1925198-python-3.13-fix2.patch
deleted file mode 100644
index b9ef8da..0000000
--- a/http/firefox/patches/0033-bmo-1925198-python-3.13-fix2.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-
-# HG changeset patch
-# User Rob Wu <rob AT robwu.nl>
-# Date 1730828835 0
-# Node ID 50d41051085b8d1201443a09faeff9207f5152af
-# Parent 025c089998e3b05f0a71fd03c9c9c9ac4c4abf17
-Bug 1925198 - Move telnetlib import to BaseEmulator r=jmaher
-
-emulator.py currently has an unconditional telnetlib import, but the
-file can also be imported when the functionality is not needed.
-
-Because telnetlib was removed from Python 3.13, this unconditional
-import breaks use cases that do not even care about telnet. As a stopgap
-measure until a better fix is available, move the import to the function
-that relies on telnet.
-
-Differential Revision: https://phabricator.services.mozilla.com/D227995
-
-diff --git a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
---- a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
-+++ b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
-@@ -3,17 +3,16 @@
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- import datetime
- import os
- import shutil
- import subprocess
- import tempfile
- import time
--from telnetlib import Telnet
-
- from mozdevice import ADBHost
- from mozprocess import ProcessHandler
-
- from ..errors import TimeoutException
- from .base import Device
- from .emulator_battery import EmulatorBattery
- from .emulator_geo import EmulatorGeo
-@@ -184,16 +183,21 @@ class BaseEmulator(Device):
- output.append(line.rstrip())
- if line.startswith("OK"):
- return output
- elif line.startswith("KO:"):
- raise Exception("bad telnet response: %s" % line)
-
- def _run_telnet(self, command):
- if not self.telnet:
-+ # telnetlib is dropped in Python 3.13 (bug 1925198).
-+ # Import here instead of the top level to avoid breaking users
of
-+ # this file that are independent of telnet.
-+ from telnetlib import Telnet
-+
- self.telnet = Telnet("localhost", self.port)
- self._get_telnet_response()
- return self._get_telnet_response(command)
-
- def __del__(self):
- if self.telnet:
- self.telnet.write("exit\n")
- self.telnet.read_all()
-
diff --git a/http/firefox/patches/0033-bmo-1926140-python-3.13-fix3.patch
b/http/firefox/patches/0033-bmo-1926140-python-3.13-fix3.patch
new file mode 100644
index 0000000..9ef94bf
--- /dev/null
+++ b/http/firefox/patches/0033-bmo-1926140-python-3.13-fix3.patch
@@ -0,0 +1,148 @@
+
+# HG changeset patch
+# User Rob Wu <rob AT robwu.nl>
+# Date 1730841860 0
+# Node ID d12754638c687fb1faccb217c2a44a5b66806c37
+# Parent 652dabf039d013dd7acd287b5ed0a6d3ee916297
+Bug 1926140 - Replace pipes imports r=jmaher
+
+pipes does not exist in Python 3.11 any more
+
+Differential Revision: https://phabricator.services.mozilla.com/D227964
+
+diff --git a/js/src/tests/lib/results.py b/js/src/tests/lib/results.py
+--- a/js/src/tests/lib/results.py
++++ b/js/src/tests/lib/results.py
+@@ -1,20 +1,20 @@
+ import json
+-import pipes
+ import re
++import shlex
+
+ from .progressbar import NullProgressBar, ProgressBar
+ from .structuredlog import TestLogger
+
+ # subprocess.list2cmdline does not properly escape for sh-like shells
+
+
+ def escape_cmdline(args):
+- return " ".join([pipes.quote(a) for a in args])
++ return " ".join([shlex.quote(a) for a in args])
+
+
+ class TestOutput:
+ """Output from a test run."""
+
+ def __init__(self, test, cmd, out, err, rc, dt, timed_out, extra=None):
+ self.test = test # Test
+ self.cmd = cmd # str: command line of test
+diff --git a/testing/mozbase/mozdevice/mozdevice/adb.py
b/testing/mozbase/mozdevice/mozdevice/adb.py
+--- a/testing/mozbase/mozdevice/mozdevice/adb.py
++++ b/testing/mozbase/mozdevice/mozdevice/adb.py
+@@ -1,15 +1,14 @@
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # 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/.
+
+ import io
+ import os
+-import pipes
+ import posixpath
+ import re
+ import shlex
+ import shutil
+ import signal
+ import subprocess
+ import sys
+ import tempfile
+@@ -1288,18 +1287,16 @@ class ADBDevice(ADBCommand):
+ re_quotable_chars = re.compile(r"[ ()\"&'\];]")
+ return re_quotable_chars.search(arg)
+
+ @staticmethod
+ def _quote(arg):
+ """Utility function to return quoted version of command argument."""
+ if hasattr(shlex, "quote"):
+ quote = shlex.quote
+- elif hasattr(pipes, "quote"):
+- quote = pipes.quote
+ else:
+
+ def quote(arg):
+ arg = arg or ""
+ re_unsafe = re.compile(r"[^\w@%+=:,./-]")
+ if re_unsafe.search(arg):
+ arg = "'" + arg.replace("'", "'\"'\"'") + "'"
+ return arg
+diff --git a/testing/web-platform/tests/tools/pytest.ini
b/testing/web-platform/tests/tools/pytest.ini
+--- a/testing/web-platform/tests/tools/pytest.ini
++++ b/testing/web-platform/tests/tools/pytest.ini
+@@ -15,18 +15,16 @@ filterwarnings =
+ # ignore mozinfo deprecation warnings
+ ignore:distutils Version classes are deprecated\. Use
packaging\.version instead\.:DeprecationWarning:mozinfo
+ # ingore mozinfo's dependency on distro
+ ignore:distro\.linux_distribution\(\) is deprecated\. It should only be
used as a compatibility shim with Python\'s
platform\.linux_distribution\(\)\. Please use distro\.id\(\),
distro\.version\(\) and distro\.name\(\) instead\.:DeprecationWarning
+ # ignore mozversion deprecation warnings
+ ignore:This method will be removed in .*\.\s+Use
'parser\.read_file\(\)' instead\.:DeprecationWarning:mozversion
+ # ignore mozversion not cleanly closing .ini files
+ ignore:unclosed file.*\.ini:ResourceWarning:mozversion
+- # mozdevice uses pipes module
+- ignore:'pipes' is deprecated and slated for removal in Python
3:DeprecationWarning
+ # mozrunner uses telnetlib module
+ ignore:'telnetlib' is deprecated and slated for removal in Python
3:DeprecationWarning
+ # https://github.com/web-platform-tests/wpt/issues/39366
+ always:The metaschema specified by \$schema was not found\. Using the
latest draft to validate, but this will raise an error in the
future\.:DeprecationWarning
+ # https://github.com/web-platform-tests/wpt/issues/39359
+ always:'cgi' is deprecated and slated for removal in Python
3:DeprecationWarning
+ # https://github.com/web-platform-tests/wpt/issues/39373
+ always:the imp module is deprecated in favour of
importlib:DeprecationWarning
+diff --git a/testing/xpcshell/runxpcshelltests.py
b/testing/xpcshell/runxpcshelltests.py
+--- a/testing/xpcshell/runxpcshelltests.py
++++ b/testing/xpcshell/runxpcshelltests.py
+@@ -2,20 +2,20 @@
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # 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/.
+
+ import copy
+ import json
+ import os
+-import pipes
+ import platform
+ import random
+ import re
++import shlex
+ import shutil
+ import signal
+ import subprocess
+ import sys
+ import tempfile
+ import time
+ import traceback
+ from argparse import Namespace
+@@ -367,21 +367,21 @@ class XPCShellTestThread(Thread):
+ self.log.info("%s | current directory: %r" % (name, testdir))
+ # Show only those environment variables that are changed from
+ # the ambient environment.
+ changedEnv = set("%s=%s" % i for i in six.iteritems(self.env)) -
set(
+ "%s=%s" % i for i in six.iteritems(os.environ)
+ )
+ self.log.info("%s | environment: %s" % (name, list(changedEnv)))
+ shell_command_tokens = [
+- pipes.quote(tok) for tok in list(changedEnv) + completeCmd
++ shlex.quote(tok) for tok in list(changedEnv) + completeCmd
+ ]
+ self.log.info(
+ "%s | as shell command: (cd %s; %s)"
+- % (name, pipes.quote(testdir), " ".join(shell_command_tokens))
++ % (name, shlex.quote(testdir), " ".join(shell_command_tokens))
+ )
+
+ def killTimeout(self, proc):
+ if proc is not None and hasattr(proc, "pid"):
+ mozcrash.kill_and_get_minidump(
+ proc.pid, self.tempDir, utility_path=self.utility_path
+ )
+ else:
+
diff --git a/http/firefox/patches/0034-bmo-1926140-python-3.13-fix3.patch
b/http/firefox/patches/0034-bmo-1926140-python-3.13-fix3.patch
deleted file mode 100644
index 9ef94bf..0000000
--- a/http/firefox/patches/0034-bmo-1926140-python-3.13-fix3.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-
-# HG changeset patch
-# User Rob Wu <rob AT robwu.nl>
-# Date 1730841860 0
-# Node ID d12754638c687fb1faccb217c2a44a5b66806c37
-# Parent 652dabf039d013dd7acd287b5ed0a6d3ee916297
-Bug 1926140 - Replace pipes imports r=jmaher
-
-pipes does not exist in Python 3.11 any more
-
-Differential Revision: https://phabricator.services.mozilla.com/D227964
-
-diff --git a/js/src/tests/lib/results.py b/js/src/tests/lib/results.py
---- a/js/src/tests/lib/results.py
-+++ b/js/src/tests/lib/results.py
-@@ -1,20 +1,20 @@
- import json
--import pipes
- import re
-+import shlex
-
- from .progressbar import NullProgressBar, ProgressBar
- from .structuredlog import TestLogger
-
- # subprocess.list2cmdline does not properly escape for sh-like shells
-
-
- def escape_cmdline(args):
-- return " ".join([pipes.quote(a) for a in args])
-+ return " ".join([shlex.quote(a) for a in args])
-
-
- class TestOutput:
- """Output from a test run."""
-
- def __init__(self, test, cmd, out, err, rc, dt, timed_out, extra=None):
- self.test = test # Test
- self.cmd = cmd # str: command line of test
-diff --git a/testing/mozbase/mozdevice/mozdevice/adb.py
b/testing/mozbase/mozdevice/mozdevice/adb.py
---- a/testing/mozbase/mozdevice/mozdevice/adb.py
-+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
-@@ -1,15 +1,14 @@
- # This Source Code Form is subject to the terms of the Mozilla Public
- # 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/.
-
- import io
- import os
--import pipes
- import posixpath
- import re
- import shlex
- import shutil
- import signal
- import subprocess
- import sys
- import tempfile
-@@ -1288,18 +1287,16 @@ class ADBDevice(ADBCommand):
- re_quotable_chars = re.compile(r"[ ()\"&'\];]")
- return re_quotable_chars.search(arg)
-
- @staticmethod
- def _quote(arg):
- """Utility function to return quoted version of command argument."""
- if hasattr(shlex, "quote"):
- quote = shlex.quote
-- elif hasattr(pipes, "quote"):
-- quote = pipes.quote
- else:
-
- def quote(arg):
- arg = arg or ""
- re_unsafe = re.compile(r"[^\w@%+=:,./-]")
- if re_unsafe.search(arg):
- arg = "'" + arg.replace("'", "'\"'\"'") + "'"
- return arg
-diff --git a/testing/web-platform/tests/tools/pytest.ini
b/testing/web-platform/tests/tools/pytest.ini
---- a/testing/web-platform/tests/tools/pytest.ini
-+++ b/testing/web-platform/tests/tools/pytest.ini
-@@ -15,18 +15,16 @@ filterwarnings =
- # ignore mozinfo deprecation warnings
- ignore:distutils Version classes are deprecated\. Use
packaging\.version instead\.:DeprecationWarning:mozinfo
- # ingore mozinfo's dependency on distro
- ignore:distro\.linux_distribution\(\) is deprecated\. It should only be
used as a compatibility shim with Python\'s
platform\.linux_distribution\(\)\. Please use distro\.id\(\),
distro\.version\(\) and distro\.name\(\) instead\.:DeprecationWarning
- # ignore mozversion deprecation warnings
- ignore:This method will be removed in .*\.\s+Use
'parser\.read_file\(\)' instead\.:DeprecationWarning:mozversion
- # ignore mozversion not cleanly closing .ini files
- ignore:unclosed file.*\.ini:ResourceWarning:mozversion
-- # mozdevice uses pipes module
-- ignore:'pipes' is deprecated and slated for removal in Python
3:DeprecationWarning
- # mozrunner uses telnetlib module
- ignore:'telnetlib' is deprecated and slated for removal in Python
3:DeprecationWarning
- # https://github.com/web-platform-tests/wpt/issues/39366
- always:The metaschema specified by \$schema was not found\. Using the
latest draft to validate, but this will raise an error in the
future\.:DeprecationWarning
- # https://github.com/web-platform-tests/wpt/issues/39359
- always:'cgi' is deprecated and slated for removal in Python
3:DeprecationWarning
- # https://github.com/web-platform-tests/wpt/issues/39373
- always:the imp module is deprecated in favour of
importlib:DeprecationWarning
-diff --git a/testing/xpcshell/runxpcshelltests.py
b/testing/xpcshell/runxpcshelltests.py
---- a/testing/xpcshell/runxpcshelltests.py
-+++ b/testing/xpcshell/runxpcshelltests.py
-@@ -2,20 +2,20 @@
- #
- # This Source Code Form is subject to the terms of the Mozilla Public
- # 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/.
-
- import copy
- import json
- import os
--import pipes
- import platform
- import random
- import re
-+import shlex
- import shutil
- import signal
- import subprocess
- import sys
- import tempfile
- import time
- import traceback
- from argparse import Namespace
-@@ -367,21 +367,21 @@ class XPCShellTestThread(Thread):
- self.log.info("%s | current directory: %r" % (name, testdir))
- # Show only those environment variables that are changed from
- # the ambient environment.
- changedEnv = set("%s=%s" % i for i in six.iteritems(self.env)) -
set(
- "%s=%s" % i for i in six.iteritems(os.environ)
- )
- self.log.info("%s | environment: %s" % (name, list(changedEnv)))
- shell_command_tokens = [
-- pipes.quote(tok) for tok in list(changedEnv) + completeCmd
-+ shlex.quote(tok) for tok in list(changedEnv) + completeCmd
- ]
- self.log.info(
- "%s | as shell command: (cd %s; %s)"
-- % (name, pipes.quote(testdir), " ".join(shell_command_tokens))
-+ % (name, shlex.quote(testdir), " ".join(shell_command_tokens))
- )
-
- def killTimeout(self, proc):
- if proc is not None and hasattr(proc, "pid"):
- mozcrash.kill_and_get_minidump(
- proc.pid, self.tempDir, utility_path=self.utility_path
- )
- else:
-
[[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (1354f7eabe23ffb53b3066416766c66f1ce88d40),
Pavel Vinogradov, 12/19/2024