sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (1354f7eabe23ffb53b3066416766c66f1ce88d40)
- From: Pavel Vinogradov <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (1354f7eabe23ffb53b3066416766c66f1ce88d40)
- Date: Thu, 19 Dec 2024 16:04:08 +0000
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:
http/firefox/HISTORY
| 3
http/firefox/patches/0013-bmo-1516803-gcc-lto-sandbox.patch
| 16 -
http/firefox/patches/0013-enable-vaapi-on-all-amd-cards.patch
| 19 +
http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 +
http/firefox/patches/0014-enable-vaapi-on-all-amd-cards.patch
| 19 -
http/firefox/patches/0015-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
| 20 -
http/firefox/patches/0015-gcc-lto-pgo-from-fedora.patch
| 128 ++++++++
http/firefox/patches/0016-bmo-1862601-system-icu-74.patch
| 41 ++
http/firefox/patches/0016-gcc-lto-pgo-from-fedora.patch
| 128 --------
http/firefox/patches/0017-bgo-748849-RUST_TARGET_override.patch
| 61 ++++
http/firefox/patches/0017-bmo-1862601-system-icu-74.patch
| 41 --
http/firefox/patches/0018-bgo-748849-RUST_TARGET_override.patch
| 61 ----
http/firefox/patches/0018-bmo-1559213-Support-system-av1.patch
| 96 ++++++
http/firefox/patches/0019-bmo-1559213-Support-system-av1.patch
| 96 ------
http/firefox/patches/0019-bmo-1874059-fix-libcxx-18.patch
| 16 +
http/firefox/patches/0020-bmo-1874059-fix-libcxx-18.patch
| 16 -
http/firefox/patches/0020-dont-use-build-id.patch
| 13
http/firefox/patches/0021-dont-use-build-id.patch
| 13
http/firefox/patches/0021-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
| 14
http/firefox/patches/0022-bgo-925101-force-software-rendering-during-pgo-build.patch
| 16 +
http/firefox/patches/0022-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
| 14
http/firefox/patches/0023-bgo-925101-force-software-rendering-during-pgo-build.patch
| 16 -
http/firefox/patches/0023-bgo-929967-fix-pgo-on-musl.patch
| 14
http/firefox/patches/0024-bgo-929967-fix-pgo-on-musl.patch
| 14
http/firefox/patches/0024-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0025-bmo-1914774-fix-non-unified-gcc-build.patch
| 78 +++++
http/firefox/patches/0025-gcc-always-inline-from-fedora.patch
| 14
http/firefox/patches/0026-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 24 +
http/firefox/patches/0026-bmo-1914774-fix-non-unified-gcc-build.patch
| 78 -----
http/firefox/patches/0027-bmo-1657849-musl-sandbox-sched_setscheduler.patch
| 24 -
http/firefox/patches/0027-bmo-1928364-musl-make-sys_fork-non-fatal.patch
| 34 ++
http/firefox/patches/0028-bgo-940031-wasm-support.patch
| 12
http/firefox/patches/0028-bmo-1928364-musl-make-sys_fork-non-fatal.patch
| 34 --
http/firefox/patches/0029-bgo-940031-wasm-support.patch
| 12
http/firefox/patches/0029-bmo-1935621-python-3.12.8-mach-fix.patch
| 119 ++++++++
http/firefox/patches/0030-bgo-944056-fix-wasm-on-llvm-profile.patch
| 13
http/firefox/patches/0030-bmo-1935621-python-3.12.8-mach-fix.patch
| 119 --------
http/firefox/patches/0031-bgo-944056-fix-wasm-on-llvm-profile.patch
| 13
http/firefox/patches/0031-bmo-1932163-python-3.13-fix.patch
| 48 +++
http/firefox/patches/0032-bmo-1925198-python-3.13-fix2.patch
| 62 ++++
http/firefox/patches/0032-bmo-1932163-python-3.13-fix.patch
| 48 ---
http/firefox/patches/0033-bmo-1925198-python-3.13-fix2.patch
| 62 ----
http/firefox/patches/0033-bmo-1926140-python-3.13-fix3.patch
| 148 ++++++++++
http/firefox/patches/0034-bmo-1926140-python-3.13-fix3.patch
| 148 ----------
44 files changed, 993 insertions(+), 1006 deletions(-)
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/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
new file mode 100644
index 0000000..bb0621a
--- /dev/null
+++
b/http/firefox/patches/0014-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
@@ -0,0 +1,20 @@
+--- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
++++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
+@@ -18,6 +18,8 @@
+ #include <dirent.h>
+ #ifdef NIGHTLY_BUILD
+ # include "dlfcn.h"
++#else
++# include <dlfcn.h>
+ #endif
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -685,7 +687,7 @@
+ files->Add("/proc/stat", SandboxOpenedFile::Error{});
+ files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
+ files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
+-
++ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
+ // Finally, start the sandbox.
+ SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
+ }
\ No newline at end of file
diff --git a/http/firefox/patches/0014-enable-vaapi-on-all-amd-cards.patch
b/http/firefox/patches/0014-enable-vaapi-on-all-amd-cards.patch
deleted file mode 100644
index 112cd42..0000000
--- a/http/firefox/patches/0014-enable-vaapi-on-all-amd-cards.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-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/0015-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
b/http/firefox/patches/0015-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
deleted file mode 100644
index bb0621a..0000000
---
a/http/firefox/patches/0015-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/security/sandbox/linux/Sandbox.cpp 2023-07-10 20:29:48.000000000 +0100
-+++ b/security/sandbox/linux/Sandbox.cpp 2023-07-15 09:13:43.561724668
+0100
-@@ -18,6 +18,8 @@
- #include <dirent.h>
- #ifdef NIGHTLY_BUILD
- # include "dlfcn.h"
-+#else
-+# include <dlfcn.h>
- #endif
- #include <errno.h>
- #include <fcntl.h>
-@@ -685,7 +687,7 @@
- files->Add("/proc/stat", SandboxOpenedFile::Error{});
- files->Add("/proc/net/unix", SandboxOpenedFile::Error{});
- files->Add("/proc/self/maps", SandboxOpenedFile::Error{});
--
-+ Unused << dlopen("libgcc_s.so.1", RTLD_GLOBAL|RTLD_LAZY);
- // Finally, start the sandbox.
- SetCurrentProcessSandbox(GetMediaSandboxPolicy(files));
- }
\ No newline at end of file
diff --git a/http/firefox/patches/0015-gcc-lto-pgo-from-fedora.patch
b/http/firefox/patches/0015-gcc-lto-pgo-from-fedora.patch
new file mode 100644
index 0000000..3d8a0b1
--- /dev/null
+++ b/http/firefox/patches/0015-gcc-lto-pgo-from-fedora.patch
@@ -0,0 +1,128 @@
+diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
+--- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
++++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
+@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
+
+ @depends(
+ "--enable-profile-use",
++ c_compiler,
+ pgo_profile_path,
+ llvm_profdata,
+ llvm_profdata_order,
+ build_environment,
+ )
+-def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
++def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
++ if compiler.type == "gcc":
++ return None
++
+ if not profile_use:
+ return None
+
+@@ -133,7 +137,7 @@ def pgo_flags(
+ return namespace(
+ gen_cflags=["-fprofile-generate"],
+ gen_ldflags=["-fprofile-generate"],
+- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
++ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
+ use_ldflags=["-fprofile-use"],
+ )
+
+diff -up firefox-128.0/build/pgo/profileserver.py.pgo
firefox-128.0/build/pgo/profileserver.py
+--- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02
00:34:15.000000000 +0200
++++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444
+0200
+@@ -11,7 +11,7 @@ import subprocess
+ import sys
+
+ import mozcrash
+-from mozbuild.base import BinaryNotFoundException, MozbuildObject
++from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
+ from mozfile import TemporaryDirectory
+ from mozhttpd import MozHttpd
+ from mozprofile import FirefoxProfile, Preferences
+@@ -97,9 +97,22 @@ if __name__ == "__main__":
+ locations = ServerLocations()
+ locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
+
+- old_profraw_files = glob.glob("*.profraw")
+- for f in old_profraw_files:
+- os.remove(f)
++ using_gcc = False
++ try:
++ if build.config_environment.substs.get('CC_TYPE') == 'gcc':
++ using_gcc = True
++ except BuildEnvironmentNotFoundException:
++ pass
++
++ if using_gcc:
++ for dirpath, _, filenames in os.walk('.'):
++ for f in filenames:
++ if f.endswith('.gcda'):
++ os.remove(os.path.join(dirpath, f))
++ else:
++ old_profraw_files = glob.glob('*.profraw')
++ for f in old_profraw_files:
++ os.remove(f)
+
+ with TemporaryDirectory() as profilePath:
+ # TODO: refactor this into mozprofile
+diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
+--- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
++++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
+@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
+ # The file uses SSE2 intrinsics, so it needs special compile flags on
some
+ # compilers.
+ SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
++ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
+ SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
+ SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
+ elif CONFIG["TARGET_CPU"].startswith("mips"):
+diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
+--- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
++++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
+@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
+--- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
++++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
+@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
+ if CONFIG['INTEL_ARCHITECTURE']:
+ SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
+ skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
+- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
+- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
+ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
+ SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
+diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
++++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
+@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() {
+ }
+ #endif
+
++ // Disable watchdog for PGO train builds - writting profile information at
++ // exit may take time and it is better to make build hang rather than
++ // silently produce poorly performing binary.
++ crashAfterMS = INT32_MAX;
++
+ UniquePtr<Options> options(new Options());
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
diff --git a/http/firefox/patches/0016-bmo-1862601-system-icu-74.patch
b/http/firefox/patches/0016-bmo-1862601-system-icu-74.patch
new file mode 100644
index 0000000..617dd76
--- /dev/null
+++ b/http/firefox/patches/0016-bmo-1862601-system-icu-74.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/917599
+https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
+https://hg.mozilla.org/try/rev/d5f3b0c4f08a426ce00a153c04e177eecb6820e2
+
+# HG changeset patch
+# User André Bargull <andre.bargull AT gmail.com>
+# Date 1697435923 -7200
+# Node ID d5f3b0c4f08a426ce00a153c04e177eecb6820e2
+# Parent c63994f8259efdf6e745c960aa9e1409d5477049
+Bug xxx - Part 12: Add new line break classes. r?
+
+diff --git a/intl/lwbrk/LineBreaker.cpp b/intl/lwbrk/LineBreaker.cpp
+--- a/intl/lwbrk/LineBreaker.cpp
++++ b/intl/lwbrk/LineBreaker.cpp
+@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
+ /* JT = 34, [JT] */ CLASS_CHARACTER,
+ /* JV = 35, [JV] */ CLASS_CHARACTER,
+ /* CLOSE_PARENTHESIS = 36, [CP] */
CLASS_CLOSE_LIKE_CHARACTER,
+ /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
+ /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
+ /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
+ /* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
+ /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
+- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
++ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
++ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
++ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
++ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
++ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
++ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
++ };
+
+ static_assert(U_LB_COUNT ==
mozilla::ArrayLength(sUnicodeLineBreakToClass),
+ "Gecko vs ICU LineBreak class mismatch");
+
+ auto cls = GetLineBreakClass(u);
+ MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
+
+ // Overrides based on rules for the different line-break values given in
+
+
diff --git a/http/firefox/patches/0016-gcc-lto-pgo-from-fedora.patch
b/http/firefox/patches/0016-gcc-lto-pgo-from-fedora.patch
deleted file mode 100644
index 3d8a0b1..0000000
--- a/http/firefox/patches/0016-gcc-lto-pgo-from-fedora.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo
firefox-128.0/build/moz.configure/lto-pgo.configure
---- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02
00:34:14.000000000 +0200
-+++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02
17:59:44.425650444 +0200
-@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi
-
- @depends(
- "--enable-profile-use",
-+ c_compiler,
- pgo_profile_path,
- llvm_profdata,
- llvm_profdata_order,
- build_environment,
- )
--def orderfile_path(profile_use, path, profdata, profdata_order, build_env):
-+def orderfile_path(profile_use, compiler, path, profdata, profdata_order,
build_env):
-+ if compiler.type == "gcc":
-+ return None
-+
- if not profile_use:
- return None
-
-@@ -133,7 +137,7 @@ def pgo_flags(
- return namespace(
- gen_cflags=["-fprofile-generate"],
- gen_ldflags=["-fprofile-generate"],
-- use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wcoverage-mismatch"],
-+ use_cflags=["-fprofile-use", "-fprofile-correction",
"-Wno-coverage-mismatch"],
- use_ldflags=["-fprofile-use"],
- )
-
-diff -up firefox-128.0/build/pgo/profileserver.py.pgo
firefox-128.0/build/pgo/profileserver.py
---- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02
00:34:15.000000000 +0200
-+++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444
+0200
-@@ -11,7 +11,7 @@ import subprocess
- import sys
-
- import mozcrash
--from mozbuild.base import BinaryNotFoundException, MozbuildObject
-+from mozbuild.base import BinaryNotFoundException, MozbuildObject,
BuildEnvironmentNotFoundException
- from mozfile import TemporaryDirectory
- from mozhttpd import MozHttpd
- from mozprofile import FirefoxProfile, Preferences
-@@ -97,9 +97,22 @@ if __name__ == "__main__":
- locations = ServerLocations()
- locations.add_host(host="127.0.0.1", port=PORT,
options="primary,privileged")
-
-- old_profraw_files = glob.glob("*.profraw")
-- for f in old_profraw_files:
-- os.remove(f)
-+ using_gcc = False
-+ try:
-+ if build.config_environment.substs.get('CC_TYPE') == 'gcc':
-+ using_gcc = True
-+ except BuildEnvironmentNotFoundException:
-+ pass
-+
-+ if using_gcc:
-+ for dirpath, _, filenames in os.walk('.'):
-+ for f in filenames:
-+ if f.endswith('.gcda'):
-+ os.remove(os.path.join(dirpath, f))
-+ else:
-+ old_profraw_files = glob.glob('*.profraw')
-+ for f in old_profraw_files:
-+ os.remove(f)
-
- with TemporaryDirectory() as profilePath:
- # TODO: refactor this into mozprofile
-diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build
---- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200
-+++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200
-@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]:
- # The file uses SSE2 intrinsics, so it needs special compile flags on
some
- # compilers.
- SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
-- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"]
-+ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"]
- SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
- SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"]
- elif CONFIG["TARGET_CPU"].startswith("mips"):
-diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo
firefox-128.0/gfx/skia/generate_mozbuild.py
---- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02
17:59:44.425650444 +0200
-+++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02
18:17:40.973081400 +0200
-@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/gfx/skia/moz.build.pgo
firefox-128.0/gfx/skia/moz.build
---- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444
+0200
-+++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200
-@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
- if CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX']
- skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3']
-- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx']
-- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma']
-+ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto']
-+ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma',
'-fno-lto']
- SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags +=
skia_ssse3_flags
- SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags +=
['-Dskvx=skvx_ssse3']
-diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
---- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo
2024-07-02 00:34:32.000000000 +0200
-+++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp
2024-07-02 17:59:44.425650444 +0200
-@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() {
- }
- #endif
-
-+ // Disable watchdog for PGO train builds - writting profile information at
-+ // exit may take time and it is better to make build hang rather than
-+ // silently produce poorly performing binary.
-+ crashAfterMS = INT32_MAX;
-+
- UniquePtr<Options> options(new Options());
- // crashAfterTicks is guaranteed to be > 0 as
- // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >>
HEARTBEAT_INTERVAL_MS
diff --git a/http/firefox/patches/0017-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0017-bgo-748849-RUST_TARGET_override.patch
new file mode 100644
index 0000000..f109538
--- /dev/null
+++ b/http/firefox/patches/0017-bgo-748849-RUST_TARGET_override.patch
@@ -0,0 +1,61 @@
+From: Sam James <sam AT gentoo.org>
+Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
+
+Respect RUST_TARGET from the environment to override Mozilla's
+own triplet detection.
+
+If the variable is unset, the old logic is used.
+
+The issue is that Gentoo supports both, say:
+- x86_64-unknown-linux-musl, and
+- x86-64-gentoo-linux-musl
+
+Our Rust is built to understand
+-gentoo- as a vendor target, but
+our Rust only actually includes
+-unknown-.
+
+Mozilla's configure sees -gentoo-
+in CHOST and that Rust _understands_
+-gentoo- and tries to use it, without
+verifying that we actually have
+-gentoo- installed as a Rust target.
+
+This requires exporting RUST_TARGET
+in the ebuild, possibly like:
+````
+inherit rust-toolchain
+
+src_configure() {
+ [...]
+ export RUST_TARGET=$(rust_abi)
+ [...]
+}
+````
+
+Inspired by Alpine's patch at
+https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
+
+Bug: https://bugs.gentoo.org/748849
+Bug: https://bugs.gentoo.org/779178
+Bug: https://bugs.gentoo.org/836226
+Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
+ return data
+
+
++@imports('os')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -396,7 +397,7 @@ def detect_rustc_target(
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0017-bmo-1862601-system-icu-74.patch
b/http/firefox/patches/0017-bmo-1862601-system-icu-74.patch
deleted file mode 100644
index 617dd76..0000000
--- a/http/firefox/patches/0017-bmo-1862601-system-icu-74.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://bugs.gentoo.org/917599
-https://bugzilla.mozilla.org/show_bug.cgi?id=1862601
-https://hg.mozilla.org/try/rev/d5f3b0c4f08a426ce00a153c04e177eecb6820e2
-
-# HG changeset patch
-# User André Bargull <andre.bargull AT gmail.com>
-# Date 1697435923 -7200
-# Node ID d5f3b0c4f08a426ce00a153c04e177eecb6820e2
-# Parent c63994f8259efdf6e745c960aa9e1409d5477049
-Bug xxx - Part 12: Add new line break classes. r?
-
-diff --git a/intl/lwbrk/LineBreaker.cpp b/intl/lwbrk/LineBreaker.cpp
---- a/intl/lwbrk/LineBreaker.cpp
-+++ b/intl/lwbrk/LineBreaker.cpp
-@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
- /* JT = 34, [JT] */ CLASS_CHARACTER,
- /* JV = 35, [JV] */ CLASS_CHARACTER,
- /* CLOSE_PARENTHESIS = 36, [CP] */
CLASS_CLOSE_LIKE_CHARACTER,
- /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
- /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
- /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
- /* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
- /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
-- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
-+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
-+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
-+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
-+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
-+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
-+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
-+ };
-
- static_assert(U_LB_COUNT ==
mozilla::ArrayLength(sUnicodeLineBreakToClass),
- "Gecko vs ICU LineBreak class mismatch");
-
- auto cls = GetLineBreakClass(u);
- MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
-
- // Overrides based on rules for the different line-break values given in
-
-
diff --git a/http/firefox/patches/0018-bgo-748849-RUST_TARGET_override.patch
b/http/firefox/patches/0018-bgo-748849-RUST_TARGET_override.patch
deleted file mode 100644
index f109538..0000000
--- a/http/firefox/patches/0018-bgo-748849-RUST_TARGET_override.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Sam James <sam AT gentoo.org>
-Subject: Allow RUST_TARGET override for detected Rust triplet (fixes musl
build)
-
-Respect RUST_TARGET from the environment to override Mozilla's
-own triplet detection.
-
-If the variable is unset, the old logic is used.
-
-The issue is that Gentoo supports both, say:
-- x86_64-unknown-linux-musl, and
-- x86-64-gentoo-linux-musl
-
-Our Rust is built to understand
--gentoo- as a vendor target, but
-our Rust only actually includes
--unknown-.
-
-Mozilla's configure sees -gentoo-
-in CHOST and that Rust _understands_
--gentoo- and tries to use it, without
-verifying that we actually have
--gentoo- installed as a Rust target.
-
-This requires exporting RUST_TARGET
-in the ebuild, possibly like:
-````
-inherit rust-toolchain
-
-src_configure() {
- [...]
- export RUST_TARGET=$(rust_abi)
- [...]
-}
-````
-
-Inspired by Alpine's patch at
-https://git.alpinelinux.org/aports/tree/community/firefox/fix-rust-target.patch?id=740922900cf8042be6751fcfcccdd3fc11bd77d3.
-
-Bug: https://bugs.gentoo.org/748849
-Bug: https://bugs.gentoo.org/779178
-Bug: https://bugs.gentoo.org/836226
-Thanks-to: Georgy Yakovlev <gyakovlev AT gentoo.org>
---- a/build/moz.configure/rust.configure
-+++ b/build/moz.configure/rust.configure
-@@ -275,6 +275,7 @@ def rust_supported_targets(rustc):
- return data
-
-
-+@imports('os')
- def detect_rustc_target(
- host_or_target, compiler_info, arm_target, rust_supported_targets
- ):
-@@ -396,7 +397,7 @@ def detect_rustc_target(
-
- return None
-
-- rustc_target = find_candidate(candidates)
-+ rustc_target = os.environ.get('RUST_TARGET', find_candidate(candidates))
-
- if rustc_target is None:
- die("Don't know how to translate {} for
rustc".format(host_or_target.alias))
diff --git a/http/firefox/patches/0018-bmo-1559213-Support-system-av1.patch
b/http/firefox/patches/0018-bmo-1559213-Support-system-av1.patch
new file mode 100644
index 0000000..240ef56
--- /dev/null
+++ b/http/firefox/patches/0018-bmo-1559213-Support-system-av1.patch
@@ -0,0 +1,96 @@
+diff --git a/config/external/moz.build b/config/external/moz.build
+index 2fc8df57992e..63d18e50a961 100644
+--- a/config/external/moz.build
++++ b/config/external/moz.build
+@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
+ external_dirs += ["media/libvpx"]
+
+ if CONFIG["MOZ_AV1"]:
+- external_dirs += ["media/libaom"]
+- external_dirs += ["media/libdav1d"]
++ if not CONFIG["MOZ_SYSTEM_AV1"]:
++ external_dirs += ["media/libaom"]
++ external_dirs += ["media/libdav1d"]
+
+ if not CONFIG["MOZ_SYSTEM_PNG"]:
+ external_dirs += ["media/libpng"]
+diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
+index 5c6e25b3980b..ce99ebfb6d3f 100644
+--- a/dom/media/platforms/moz.build
++++ b/dom/media/platforms/moz.build
+@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]:
+ "agnostic/AOMDecoder.cpp",
+ "agnostic/DAV1DDecoder.cpp",
+ ]
++ if CONFIG['MOZ_SYSTEM_AV1']:
++ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
++ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+
+ if CONFIG["MOZ_OMX"]:
+ EXPORTS += [
+diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+index 761fc8cf4cd9..793a5b8697a8 100644
+--- a/media/ffvpx/libavcodec/moz.build
++++ b/media/ffvpx/libavcodec/moz.build
+@@ -120,10 +120,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
+ 'vp9recon.c',
+ 'vpx_rac.c',
+ ]
+- USE_LIBS += [
+- 'dav1d',
+- 'media_libdav1d_asm',
+- ]
++ if CONFIG["MOZ_SYSTEM_AV1"]:
++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
++ else:
++ USE_LIBS += [
++ 'dav1d',
++ 'media_libdav1d_asm',
++ ]
+ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ LOCAL_INCLUDES += ['/media/mozva']
+ SOURCES += [
+diff --git a/toolkit/moz.configure b/toolkit/moz.configure
+index f93a5d64fec8..814357f4e979 100644
+--- a/toolkit/moz.configure
++++ b/toolkit/moz.configure
+@@ -744,7 +744,23 @@ def av1(value):
+ return True
+
+
+-@depends(target, when=av1 & compile_environment)
++option("--with-system-av1",
++ help="Use system av1 (located with pkgconfig)")
++
++system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
++ when="--with-system-av1")
++
++system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >=
0.1.1",
++ when="--with-system-av1")
++
++@depends(system_libaom_info, system_libdav1d_info)
++def system_av1(system_libaom_info, system_libdav1d_info):
++ has_av1_libs = False
++ if system_libaom_info and system_libdav1d_info:
++ has_av1_libs = True
++ return has_av1_libs
++
++@depends(target, when=av1 & depends(system_av1)(lambda v: not v) &
compile_environment)
+ def dav1d_asm(target):
+ if target.cpu in ("aarch64", "x86", "x86_64"):
+ return True
+@@ -760,6 +776,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
+ set_define("MOZ_DAV1D_ASM", dav1d_asm)
+ set_config("MOZ_AV1", av1)
+ set_define("MOZ_AV1", av1)
++set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
+
+ # JXL Image Codec Support
+ # ==============================================================
+
+
diff --git a/http/firefox/patches/0019-bmo-1559213-Support-system-av1.patch
b/http/firefox/patches/0019-bmo-1559213-Support-system-av1.patch
deleted file mode 100644
index 240ef56..0000000
--- a/http/firefox/patches/0019-bmo-1559213-Support-system-av1.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff --git a/config/external/moz.build b/config/external/moz.build
-index 2fc8df57992e..63d18e50a961 100644
---- a/config/external/moz.build
-+++ b/config/external/moz.build
-@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
- external_dirs += ["media/libvpx"]
-
- if CONFIG["MOZ_AV1"]:
-- external_dirs += ["media/libaom"]
-- external_dirs += ["media/libdav1d"]
-+ if not CONFIG["MOZ_SYSTEM_AV1"]:
-+ external_dirs += ["media/libaom"]
-+ external_dirs += ["media/libdav1d"]
-
- if not CONFIG["MOZ_SYSTEM_PNG"]:
- external_dirs += ["media/libpng"]
-diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build
-index 5c6e25b3980b..ce99ebfb6d3f 100644
---- a/dom/media/platforms/moz.build
-+++ b/dom/media/platforms/moz.build
-@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]:
- "agnostic/AOMDecoder.cpp",
- "agnostic/DAV1DDecoder.cpp",
- ]
-+ if CONFIG['MOZ_SYSTEM_AV1']:
-+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-
- if CONFIG["MOZ_OMX"]:
- EXPORTS += [
-diff --git a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
-index 761fc8cf4cd9..793a5b8697a8 100644
---- a/media/ffvpx/libavcodec/moz.build
-+++ b/media/ffvpx/libavcodec/moz.build
-@@ -120,10 +120,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
- 'vp9recon.c',
- 'vpx_rac.c',
- ]
-- USE_LIBS += [
-- 'dav1d',
-- 'media_libdav1d_asm',
-- ]
-+ if CONFIG["MOZ_SYSTEM_AV1"]:
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+ else:
-+ USE_LIBS += [
-+ 'dav1d',
-+ 'media_libdav1d_asm',
-+ ]
- if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
- LOCAL_INCLUDES += ['/media/mozva']
- SOURCES += [
-diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index f93a5d64fec8..814357f4e979 100644
---- a/toolkit/moz.configure
-+++ b/toolkit/moz.configure
-@@ -744,7 +744,23 @@ def av1(value):
- return True
-
-
--@depends(target, when=av1 & compile_environment)
-+option("--with-system-av1",
-+ help="Use system av1 (located with pkgconfig)")
-+
-+system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
-+ when="--with-system-av1")
-+
-+system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >=
0.1.1",
-+ when="--with-system-av1")
-+
-+@depends(system_libaom_info, system_libdav1d_info)
-+def system_av1(system_libaom_info, system_libdav1d_info):
-+ has_av1_libs = False
-+ if system_libaom_info and system_libdav1d_info:
-+ has_av1_libs = True
-+ return has_av1_libs
-+
-+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) &
compile_environment)
- def dav1d_asm(target):
- if target.cpu in ("aarch64", "x86", "x86_64"):
- return True
-@@ -760,6 +776,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
- set_define("MOZ_DAV1D_ASM", dav1d_asm)
- set_config("MOZ_AV1", av1)
- set_define("MOZ_AV1", av1)
-+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
-
- # JXL Image Codec Support
- # ==============================================================
-
-
diff --git a/http/firefox/patches/0019-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0019-bmo-1874059-fix-libcxx-18.patch
new file mode 100644
index 0000000..b21a93c
--- /dev/null
+++ b/http/firefox/patches/0019-bmo-1874059-fix-libcxx-18.patch
@@ -0,0 +1,16 @@
+--- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
++++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
+@@ -2183,10 +2183,10 @@
+ set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
+
+
+-@depends(target, build_environment)
+-def visibility_flags(target, env):
++@depends(target, build_environment, c_compiler)
++def visibility_flags(target, env, c_compiler):
+ if target.os != "WINNT":
+- if target.kernel == "Darwin":
++ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
+ return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
+ return (
+ "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0020-bmo-1874059-fix-libcxx-18.patch
b/http/firefox/patches/0020-bmo-1874059-fix-libcxx-18.patch
deleted file mode 100644
index b21a93c..0000000
--- a/http/firefox/patches/0020-bmo-1874059-fix-libcxx-18.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/build/moz.configure/toolchain.configure 2024-03-16 22:53:15.409390707
+0000
-+++ b/build/moz.configure/toolchain.configure 2024-03-16 22:57:02.661805132
+0000
-@@ -2183,10 +2183,10 @@
- set_define("_LIBCPP_HIDE_FROM_ABI",
libcxx_override_visibility.hide_from_abi)
-
-
--@depends(target, build_environment)
--def visibility_flags(target, env):
-+@depends(target, build_environment, c_compiler)
-+def visibility_flags(target, env, c_compiler):
- if target.os != "WINNT":
-- if target.kernel == "Darwin":
-+ if target.kernel == "Darwin" or (c_compiler.type == "clang" and
c_compiler.version >= "17.0.0"):
- return ("-fvisibility=hidden", "-fvisibility-inlines-hidden")
- return (
- "-I%s/system_wrappers" % os.path.join(env.dist),
\ No newline at end of file
diff --git a/http/firefox/patches/0020-dont-use-build-id.patch
b/http/firefox/patches/0020-dont-use-build-id.patch
new file mode 100644
index 0000000..4ec8ac1
--- /dev/null
+++ b/http/firefox/patches/0020-dont-use-build-id.patch
@@ -0,0 +1,13 @@
+diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
+--- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
++++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
+@@ -197,9 +197,6 @@
+
+ check_and_add_flag("-pipe", when=building_with_gcc)
+
+-check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
+-check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
+-
+ check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
+ check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git a/http/firefox/patches/0021-dont-use-build-id.patch
b/http/firefox/patches/0021-dont-use-build-id.patch
deleted file mode 100644
index 4ec8ac1..0000000
--- a/http/firefox/patches/0021-dont-use-build-id.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff '--color=auto' -Naur a/build/moz.configure/flags.configure
b/build/moz.configure/flags.configure
---- a/build/moz.configure/flags.configure 2024-07-08 20:04:44.944708403
+0300
-+++ b/build/moz.configure/flags.configure 2024-07-08 20:13:30.867064722
+0300
-@@ -197,9 +197,6 @@
-
- check_and_add_flag("-pipe", when=building_with_gcc)
-
--check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
--check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
--
- check_and_add_asm_flag("-Wa,--noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,noexecstack",
when=building_with_gnu_compatible_cc)
- check_and_add_linker_flag("-Wl,-z,text",
when=building_with_gnu_compatible_cc)
diff --git
a/http/firefox/patches/0021-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
b/http/firefox/patches/0021-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
new file mode 100644
index 0000000..1fca899
--- /dev/null
+++
b/http/firefox/patches/0021-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
@@ -0,0 +1,14 @@
+diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
+--- a/media/ffvpx/libavcodec/moz.build 2024-06-07 00:33:58.000000000 +0300
++++ b/media/ffvpx/libavcodec/moz.build 2024-06-10 21:13:44.142620997 +0300
+@@ -143,6 +143,10 @@
+ c11_flags = ["-std=gnu11"]
+ if CONFIG["CC_TYPE"] == "clang-cl":
+ c11_flags.insert(0, "-Xclang")
++
++if CONFIG["CC_TYPE"] == "gcc" and int(CONFIG["CC_VERSION"].split(".")[0])
>= 14:
++ c11_flags.insert(0, "-Wno-error=incompatible-pointer-types")
++
+ CFLAGS += c11_flags
+
+ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
diff --git
a/http/firefox/patches/0022-bgo-925101-force-software-rendering-during-pgo-build.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/0022-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
deleted file mode 100644
index 1fca899..0000000
---
a/http/firefox/patches/0022-mozilla-bundled-ffmpeg-7-gcc-14-incompatible-pointer-types.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur a/media/ffvpx/libavcodec/moz.build
b/media/ffvpx/libavcodec/moz.build
---- a/media/ffvpx/libavcodec/moz.build 2024-06-07 00:33:58.000000000 +0300
-+++ b/media/ffvpx/libavcodec/moz.build 2024-06-10 21:13:44.142620997 +0300
-@@ -143,6 +143,10 @@
- c11_flags = ["-std=gnu11"]
- if CONFIG["CC_TYPE"] == "clang-cl":
- c11_flags.insert(0, "-Xclang")
-+
-+if CONFIG["CC_TYPE"] == "gcc" and int(CONFIG["CC_VERSION"].split(".")[0])
>= 14:
-+ c11_flags.insert(0, "-Wno-error=incompatible-pointer-types")
-+
- CFLAGS += c11_flags
-
- if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
diff --git
a/http/firefox/patches/0023-bgo-925101-force-software-rendering-during-pgo-build.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
Archive powered by MHonArc 2.6.24.