From f1f41a6dcf524b2ad83d2b3ba44174bc1ad62e6e Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 19 Mar 2024 12:38:36 +0100 Subject: [PATCH 1/3] Update to 115.9.0 Fix expat CVE-2023-52425 --- sources | 4 ++-- thunderbird.spec | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index d25d147..8f8bdd1 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (cbindgen-vendor.tar.xz) = 161811f4adfc74e5d92871c78139704d32e1e1ad6b615c85353de300d9647a68f1ca8b1c953f7cc5539d861e9e8d8e42892cae757a3eafea78804e19bc323c16 -SHA512 (thunderbird-115.8.1.source.tar.xz) = 4d28f865f482a0d4c91f26ef26709a00f78955699b4ca191f960bcdb8d2c0c95c2a8e8782129d5660e192c605cba021fac553b13868861086a608f0c50aa5da7 -SHA512 (thunderbird-langpacks-115.8.1-20240305.tar.xz) = 5578b99cdf1ebb7e690c508fc26edd2f203e6d827339b0107a3fd91f32354c98d445df11bbf8c401788266b4f3ef671b02792fb884342b59d8c1711e51c10a30 +SHA512 (thunderbird-115.9.0.source.tar.xz) = 8ff0bed6e6d7f337ebae09011a10b59343ae7a8355ed1da2d72ec0d4218010adfae78e42565e5b784df26cef4702f313dc9616ac5ca5530fb772d77bdf7f2ea4 +SHA512 (thunderbird-langpacks-115.9.0-20240318.tar.xz) = b0cce5c30ba6d718f5cf6ccbd11402656161a92c6956b99059c1ef4e24e95f316ee7ec3d3726c95a2e387dd2663bc2538974efc45d00061b86b2b170a96adc26 diff --git a/thunderbird.spec b/thunderbird.spec index 818952c..12cbef0 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -76,13 +76,13 @@ ExcludeArch: s390x Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 115.8.1 +Version: 115.9.0 Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later Source0: https://archive.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.xz %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20240305.tar.xz +Source1: thunderbird-langpacks-%{version}-20240318.tar.xz %endif Source3: get-calendar-langpacks.sh Source4: cbindgen-vendor.tar.xz @@ -719,6 +719,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Mon Mar 18 2024 Eike Rathke - 115.9.0-1 +- Update to 115.9.0 +- Fix expat CVE-2023-52425 + * Tue Mar 05 2024 Eike Rathke - 115.8.1-1 - Update to 115.8.1 From f1c002ab45100bf1cfae56107e0d61e2b7d9e78d Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 6 Aug 2024 18:56:29 +0200 Subject: [PATCH 2/3] Update to 115.14.0 --- .gitignore | 2 ++ sources | 4 ++-- thunderbird.spec | 7 +++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 02732ff..cce5c8d 100644 --- a/.gitignore +++ b/.gitignore @@ -458,3 +458,5 @@ thunderbird-langpacks-3.1.2-20100803.tar.bz2 /thunderbird-langpacks-115.12.1-20240618.tar.xz /thunderbird-115.13.0.source.tar.xz /thunderbird-langpacks-115.13.0-20240716.tar.xz +/thunderbird-115.14.0.source.tar.xz +/thunderbird-langpacks-115.14.0-20240805.tar.xz diff --git a/sources b/sources index b1c9926..202c177 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (cbindgen-vendor.tar.xz) = 161811f4adfc74e5d92871c78139704d32e1e1ad6b615c85353de300d9647a68f1ca8b1c953f7cc5539d861e9e8d8e42892cae757a3eafea78804e19bc323c16 -SHA512 (thunderbird-115.13.0.source.tar.xz) = 98ee23f684aa7a166878459a6a217bf3bcc4ddd8fa8ebbd0a1d2d66392ec1ebff67dbad55d145cdd0771539f127d91c4137211cf4efc80e450e6a34c95e8529c -SHA512 (thunderbird-langpacks-115.13.0-20240716.tar.xz) = f8b27c10286fd5936ea2d6178ba5a5d13e67150ccb6c1dac1254ab1a88dff8538353627ad7a6195fc02789e5f8c889cccbd795f95d20fe4169bbfa58555b4976 +SHA512 (thunderbird-115.14.0.source.tar.xz) = b12e1302d6be94dd88bee6dd069d3fec944bfce95e1afc1d72c14cc188d952fd5a85f0e70575317250701ac89498d876f3384b022957689fabcef61ad7d78c29 +SHA512 (thunderbird-langpacks-115.14.0-20240805.tar.xz) = e98f04ea5941f1160908584c7d263da7a934233ea378ec1b57a9a91f7b40242f0f45d8758b15573c635dbea606cf239625ae5e61e367123d0545034dee1e9383 diff --git a/thunderbird.spec b/thunderbird.spec index d03b0aa..b161df8 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -87,13 +87,13 @@ ExcludeArch: s390x Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 115.13.0 +Version: 115.14.0 Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later Source0: https://archive.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.xz %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20240716.tar.xz +Source1: thunderbird-langpacks-%{version}-20240805.tar.xz %endif Source3: get-calendar-langpacks.sh Source4: cbindgen-vendor.tar.xz @@ -771,6 +771,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Tue Aug 06 2024 Eike Rathke - 115.14.0-1 +- Update to 115.14.0 + * Tue Jul 16 2024 Eike Rathke - 115.13.0-1 - Update to 115.13.0 From c6973a68b20a68c61f54caf25e2da7aef0d756c4 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 9 Aug 2024 15:34:27 +0200 Subject: [PATCH 3/3] Rebase to 128.1 esr --- .gitignore | 6 +- 0001-GLIBCXX-fix-for-GCC-12.patch | 35 +++------- ...fix-mozillaSignalTrampoline-to-work-.patch | 12 ---- build-aarch64-skia.patch | 35 ++++++++++ build-arm-libopus.patch | 12 ++++ build-ppc-jit.patch | 51 ++++++++++++++ build-rust-ppc64le.patch | 25 +++++++ firefox-gcc-13-build.patch | 24 +++++++ firefox-gcc-build.patch | 39 +++++++++++ firefox-i686-build.patch | 12 ++++ gen_cbindgen-vendor.sh | 2 +- mozilla-1245783.patch | 17 ----- mozilla-build-arm.patch | 12 ---- rhbz-1219542-s390-build.patch | 23 ------ rhbz-1354671.patch | 12 ---- sources | 6 +- thunderbird.spec | 70 ++++++++----------- 17 files changed, 244 insertions(+), 149 deletions(-) delete mode 100644 Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch create mode 100644 build-aarch64-skia.patch create mode 100644 build-arm-libopus.patch create mode 100644 build-ppc-jit.patch create mode 100644 build-rust-ppc64le.patch create mode 100644 firefox-gcc-13-build.patch create mode 100644 firefox-gcc-build.patch create mode 100644 firefox-i686-build.patch delete mode 100644 mozilla-1245783.patch delete mode 100644 mozilla-build-arm.patch delete mode 100644 rhbz-1219542-s390-build.patch delete mode 100644 rhbz-1354671.patch diff --git a/.gitignore b/.gitignore index cce5c8d..82ab2d5 100644 --- a/.gitignore +++ b/.gitignore @@ -458,5 +458,7 @@ thunderbird-langpacks-3.1.2-20100803.tar.bz2 /thunderbird-langpacks-115.12.1-20240618.tar.xz /thunderbird-115.13.0.source.tar.xz /thunderbird-langpacks-115.13.0-20240716.tar.xz -/thunderbird-115.14.0.source.tar.xz -/thunderbird-langpacks-115.14.0-20240805.tar.xz +/thunderbird-128.0esr.source.tar.xz +/thunderbird-langpacks-128.0esr-20240717.tar.xz +/thunderbird-128.1.0esr.source.tar.xz +/thunderbird-langpacks-128.1.0esr-20240806.tar.xz diff --git a/0001-GLIBCXX-fix-for-GCC-12.patch b/0001-GLIBCXX-fix-for-GCC-12.patch index 972cebc..feb2d17 100644 --- a/0001-GLIBCXX-fix-for-GCC-12.patch +++ b/0001-GLIBCXX-fix-for-GCC-12.patch @@ -1,30 +1,10 @@ -From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= -Date: Fri, 4 Mar 2022 12:00:26 +0100 -Subject: [PATCH] GLIBCXX fix for GCC 12? - -Borrowed from Firefox and adjusted to Thunderbird 91.7.0 - ---- - build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp ---- thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 2022-03-07 20:34:15.000000000 +0100 -+++ thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp 2022-03-15 22:50:03.161345590 +0100 -@@ -24,6 +24,7 @@ - GLIBCXX_3.4.27 is from gcc 10 - GLIBCXX_3.4.28 is from gcc 10 - GLIBCXX_3.4.29 is from gcc 11 -+ GLIBCXX_3.4.30 is from gcc 12 - - This file adds the necessary compatibility tricks to avoid symbols with - version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with -@@ -73,6 +74,19 @@ void __attribute__((weak)) __throw_bad_a - +diff -up thunderbird-128.1.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 thunderbird-128.1.0/build/unix/stdc++compat/stdc++compat.cpp +--- thunderbird-128.1.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 2024-08-09 12:24:05.444162943 +0200 ++++ thunderbird-128.1.0/build/unix/stdc++compat/stdc++compat.cpp 2024-08-09 12:24:05.460162972 +0200 +@@ -83,6 +83,19 @@ __glibcxx_assert_fail(const char* __file } // namespace std #endif -+ + +#if _GLIBCXX_RELEASE >= 12 +namespace std { + @@ -37,6 +17,7 @@ diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/ + +} // namespace std +#endif - - #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21) ++ /* While we generally don't build with exceptions, we have some host tools + * that do use them. libstdc++ from GCC 5.0 added exception constructors with + * char const* argument. Older versions only have a constructor with diff --git a/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch b/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch deleted file mode 100644 index 0663ffe..0000000 --- a/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up thunderbird-60.5.0/mfbt/LinuxSignal.h.mozilla-1238661 thunderbird-60.5.0/mfbt/LinuxSignal.h ---- thunderbird-60.5.0/mfbt/LinuxSignal.h.mozilla-1238661 2019-01-30 11:33:21.447003175 +0100 -+++ thunderbird-60.5.0/mfbt/LinuxSignal.h 2019-01-30 11:35:13.848537051 +0100 -@@ -22,7 +22,7 @@ __attribute__((naked)) void SignalTrampo - void* aContext) { - asm volatile("nop; nop; nop; nop" : : : "memory"); - -- asm volatile("b %0" : : "X"(H) : "memory"); -+ asm volatile("bx %0" : : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) : "memory"); - } - - #define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline) diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch new file mode 100644 index 0000000..b3abe7a --- /dev/null +++ b/build-aarch64-skia.patch @@ -0,0 +1,35 @@ +diff -up firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h +--- firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2024-07-02 11:10:25.047099913 +0200 ++++ firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2024-07-02 11:15:43.855410571 +0200 +@@ -151,7 +151,7 @@ SI U32 to_fixed(F f) { return (U32)cast + + + SI F F_from_Half(U16 half) { +-#if defined(USING_NEON_F16C) ++#if 0 // defined(USING_NEON_F16C) + return vcvt_f32_f16((float16x4_t)half); + #elif defined(USING_AVX512F) + return (F)_mm512_cvtph_ps((__m256i)half); +@@ -178,7 +178,7 @@ SI F F_from_Half(U16 half) { + __attribute__((no_sanitize("unsigned-integer-overflow"))) + #endif + SI U16 Half_from_F(F f) { +-#if defined(USING_NEON_F16C) ++#if 0 //defined(USING_NEON_F16C) + return (U16)vcvt_f16_f32(f); + #elif defined(USING_AVX512F) + return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); +diff -up firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h +--- firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2024-07-02 11:10:25.048099949 +0200 ++++ firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2024-07-02 11:13:33.384783413 +0200 +@@ -1425,8 +1425,8 @@ SI F from_half(U16 h) { + } + + SI U16 to_half(F f) { +-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) +- return (U16)vcvt_f16_f32(f); ++#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) ++ return (U16)vcvt_f16_f32(f); + + #elif defined(JUMPER_IS_SKX) + return (U16)_mm512_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION); diff --git a/build-arm-libopus.patch b/build-arm-libopus.patch new file mode 100644 index 0000000..1b3f31b --- /dev/null +++ b/build-arm-libopus.patch @@ -0,0 +1,12 @@ +diff -up firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old firefox-66.0/media/libopus/silk/arm/arm_silk_map.c +--- firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old 2019-03-12 21:07:35.356677522 +0100 ++++ firefox-66.0/media/libopus/silk/arm/arm_silk_map.c 2019-03-12 21:07:42.937693394 +0100 +@@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. + # include "config.h" + #endif + +-#include "main_FIX.h" ++#include "fixed/main_FIX.h" + #include "NSQ.h" + #include "SigProc_FIX.h" + diff --git a/build-ppc-jit.patch b/build-ppc-jit.patch new file mode 100644 index 0000000..a9dc6d1 --- /dev/null +++ b/build-ppc-jit.patch @@ -0,0 +1,51 @@ +diff -up firefox-55.0/js/src/jit/MIR.h.old firefox-55.0/js/src/jit/MIR.h +--- firefox-55.0/js/src/jit/MIR.h.old 2017-08-08 14:04:44.528460099 +0200 ++++ firefox-55.0/js/src/jit/MIR.h 2017-08-08 14:05:11.045364831 +0200 +@@ -12434,7 +12434,7 @@ class MNearbyInt + TRIVIAL_NEW_WRAPPERS + + static bool HasAssemblerSupport(RoundingMode mode) { +- return Assembler::HasRoundInstruction(mode); ++ return false; + } + + RoundingMode roundingMode() const { return roundingMode_; } +diff -up firefox-55.0/js/src/jit/ExecutableAllocator.h.old firefox-55.0/js/src/jit/ExecutableAllocator.h +--- firefox-55.0/js/src/jit/ExecutableAllocator.h.old 2017-08-09 09:24:18.784983505 +0200 ++++ firefox-55.0/js/src/jit/ExecutableAllocator.h 2017-08-09 09:28:01.471100075 +0200 +@@ -307,6 +307,10 @@ class ExecutableAllocator + { + sync_instruction_memory((caddr_t)code, size); + } ++#else ++ static void cacheFlush(void*, size_t) ++ { ++ } + #endif + + private: +diff -up firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old firefox-55.0/js/src/wasm/WasmBuiltins.cpp +--- firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old 2017-08-09 12:50:46.877450765 +0200 ++++ firefox-55.0/js/src/wasm/WasmBuiltins.cpp 2017-08-09 12:50:59.725406974 +0200 +@@ -881,7 +881,6 @@ wasm::EnsureBuiltinThunksInitialized() + MOZ_ASSERT(!masm.numSymbolicAccesses()); + #endif + +- ExecutableAllocator::cacheFlush(thunks->codeBase, thunks->codeSize); + if (!ExecutableAllocator::makeExecutable(thunks->codeBase, thunks->codeSize)) + return false; + +diff -up firefox-55.0/js/src/wasm/WasmCode.cpp.old firefox-55.0/js/src/wasm/WasmCode.cpp +--- firefox-55.0/js/src/wasm/WasmCode.cpp.old 2017-08-09 12:50:37.205483731 +0200 ++++ firefox-55.0/js/src/wasm/WasmCode.cpp 2017-08-09 12:51:10.365370708 +0200 +@@ -287,8 +287,6 @@ CodeSegment::initialize(Tier tier, + if (!StaticallyLink(*this, linkData)) + return false; + +- ExecutableAllocator::cacheFlush(bytes_.get(), RoundupCodeLength(codeLength)); +- + // Reprotect the whole region to avoid having separate RW and RX mappings. + if (!ExecutableAllocator::makeExecutable(bytes_.get(), RoundupCodeLength(codeLength))) + return false; +diff -up firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium +diff -up firefox-55.0/media/webrtc/trunk/Makefile.old firefox-55.0/media/webrtc/trunk/Makefile diff --git a/build-rust-ppc64le.patch b/build-rust-ppc64le.patch new file mode 100644 index 0000000..2474c35 --- /dev/null +++ b/build-rust-ppc64le.patch @@ -0,0 +1,25 @@ +diff -up firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le firefox-55.0/build/moz.configure/rust.configure +--- firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le 2017-07-31 18:20:49.000000000 +0200 ++++ firefox-55.0/build/moz.configure/rust.configure 2017-08-02 10:19:03.254220003 +0200 +@@ -151,6 +151,9 @@ def rust_triple_alias(host_or_target): + ('sparc64', 'Linux'): 'sparc64-unknown-linux-gnu', + ('x86', 'Linux'): 'i686-unknown-linux-gnu', + ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', ++ ('ppc64le', 'Linux'): 'powerpc64le-unknown-linux-gnu', ++ ('ppc64', 'Linux'): 'powerpc64-unknown-linux-gnu', ++ ('s390x', 'Linux'): 's390x-unknown-linux-gnu', + # OS X + ('x86', 'OSX'): 'i686-apple-darwin', + ('x86_64', 'OSX'): 'x86_64-apple-darwin', +@@ -174,8 +177,10 @@ def rust_triple_alias(host_or_target): + ('sparc64', 'SunOS'): 'sparcv9-sun-solaris', + }.get((host_or_target.cpu, os_or_kernel), None) + ++ if (rustc_target == 'powerpc64-unknown-linux-gnu' and host_or_target.endianness == 'little'): ++ rustc_target = 'powerpc64le-unknown-linux-gnu' + if rustc_target is None: +- die("Don't know how to translate {} for rustc".format(host_or_target.alias)) ++ die("Don't know how to translate {} for rustc, cpu: {}, os: {}".format(target.alias, target.cpu, os_or_kernel)) + + # Check to see whether our rustc has a reasonably functional stdlib + # for our chosen target. diff --git a/firefox-gcc-13-build.patch b/firefox-gcc-13-build.patch new file mode 100644 index 0000000..8512b76 --- /dev/null +++ b/firefox-gcc-13-build.patch @@ -0,0 +1,24 @@ +--- firefox-109.0.1/gfx/2d/Rect.h.old 2023-02-07 09:44:24.946279843 +0100 ++++ firefox-109.0.1/gfx/2d/Rect.h 2023-02-07 09:44:47.969032049 +0100 +@@ -324,8 +324,8 @@ IntRectTyped RoundedToInt(const R + + template + bool RectIsInt32Safe(const RectTyped& aRect) { +- float min = (float)std::numeric_limits::min(); +- float max = (float)std::numeric_limits::max(); ++ float min = (float)std::numeric_limits::min(); ++ float max = (float)std::numeric_limits::max(); + return aRect.x > min && aRect.y > min && aRect.width < max && + aRect.height < max && aRect.XMost() < max && aRect.YMost() < max; + } +diff -up firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp.old firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp +--- firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp.old 2023-02-07 11:03:41.788720090 +0100 ++++ firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp 2023-02-07 11:04:29.195345659 +0100 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/firefox-gcc-build.patch b/firefox-gcc-build.patch new file mode 100644 index 0000000..16d9ec6 --- /dev/null +++ b/firefox-gcc-build.patch @@ -0,0 +1,39 @@ +diff -up thunderbird-128.1.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h.firefox-gcc-build thunderbird-128.1.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h +--- thunderbird-128.1.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h.firefox-gcc-build 2024-07-31 19:13:21.000000000 +0200 ++++ thunderbird-128.1.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2024-08-08 16:03:45.639263256 +0200 +@@ -1962,7 +1962,7 @@ struct kernel_statfs { + LSS_ENTRYPOINT \ + "pop %%ebx" \ + args \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res) + #undef _syscall0 + #define _syscall0(type,name) \ +@@ -2019,7 +2019,7 @@ struct kernel_statfs { + : "i" (__NR_##name), "ri" ((long)(arg1)), \ + "c" ((long)(arg2)), "d" ((long)(arg3)), \ + "S" ((long)(arg4)), "D" ((long)(arg5)) \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res); \ + } + #undef _syscall6 +@@ -2041,7 +2041,7 @@ struct kernel_statfs { + : "i" (__NR_##name), "0" ((long)(&__s)), \ + "c" ((long)(arg2)), "d" ((long)(arg3)), \ + "S" ((long)(arg4)), "D" ((long)(arg5)) \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res); \ + } + LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, +@@ -2127,7 +2127,7 @@ struct kernel_statfs { + : "0"(-EINVAL), "i"(__NR_clone), + "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), + "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) +- : "esp", "memory", "ecx", "edx", "esi", "edi"); ++ : "memory", "ecx", "edx", "esi", "edi"); + LSS_RETURN(int, __res); + } + diff --git a/firefox-i686-build.patch b/firefox-i686-build.patch new file mode 100644 index 0000000..320199f --- /dev/null +++ b/firefox-i686-build.patch @@ -0,0 +1,12 @@ +diff -up firefox-105.0/mozglue/misc/SIMD_avx2.cpp.old firefox-105.0/mozglue/misc/SIMD_avx2.cpp +--- firefox-105.0/mozglue/misc/SIMD_avx2.cpp.old 2022-09-22 21:35:07.006221995 +0200 ++++ firefox-105.0/mozglue/misc/SIMD_avx2.cpp 2022-09-22 21:36:12.972480517 +0200 +@@ -55,7 +55,7 @@ __m256i CmpEq256(__m256i a, __m256i b) { + return _mm256_cmpeq_epi64(a, b); + } + +-# if defined(__GNUC__) && !defined(__clang__) ++# if 0 + + // See the comment in SIMD.cpp over Load32BitsIntoXMM. This is just adapted + // from that workaround. Testing this, it also yields the correct instructions diff --git a/gen_cbindgen-vendor.sh b/gen_cbindgen-vendor.sh index c2b60f0..4e8aded 100755 --- a/gen_cbindgen-vendor.sh +++ b/gen_cbindgen-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -cbindgen = "0.24.3" +cbindgen = "0.26.0" [[bin]] name = "dummy" diff --git a/mozilla-1245783.patch b/mozilla-1245783.patch deleted file mode 100644 index 3452616..0000000 --- a/mozilla-1245783.patch +++ /dev/null @@ -1,17 +0,0 @@ -# Remove when mozbz#1269319 lands - ---- firefox-45.0.1-orig/js/src/Makefile.in 2016-05-17 14:53:58.753178403 +0200 -+++ firefox-45.0.1/js/src/Makefile.in 2016-05-17 14:53:28.432817862 +0200 -@@ -144,6 +144,11 @@ distclean:: - - CFLAGS += $(MOZ_ZLIB_CFLAGS) - -+# Avoid GNU gcc bug #70526 -+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14 -+CFLAGS += -fno-schedule-insns2 -+CXXFLAGS += -fno-schedule-insns2 -+ - # Silence warnings on AIX/HP-UX from non-GNU compilers - ifndef GNU_CC - ifeq ($(OS_ARCH),AIX) - diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index f98cbe3..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 -+++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 -@@ -61,7 +61,7 @@ else: - 'yuv_row_other.cpp', - ] - --if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: -+if CONFIG['HAVE_ARM_NEON']: - SOURCES += [ - 'yuv_row_arm.s', - ] diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch deleted file mode 100644 index f94e43a..0000000 --- a/rhbz-1219542-s390-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 firefox-55.0/js/src/old-configure.in ---- firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 2017-07-31 18:20:48.000000000 +0200 -+++ firefox-55.0/js/src/old-configure.in 2017-08-02 14:31:32.190243669 +0200 -@@ -541,7 +541,7 @@ case "$host" in - - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" - ;; - - *) -@@ -617,8 +617,8 @@ case "$target" in - - *-*linux*) - if test "$GNU_CC" -o "$GNU_CXX"; then -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-O1" -+ MOZ_OPTIMIZE_FLAGS="-O1" - if test -z "$CLANG_CC"; then - MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" - fi diff --git a/rhbz-1354671.patch b/rhbz-1354671.patch deleted file mode 100644 index 7660f14..0000000 --- a/rhbz-1354671.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-60.5.0/layout/base/nsIPresShell.h.1354671 firefox-60.5.0/layout/base/nsIPresShell.h ---- firefox-60.5.0/layout/base/nsIPresShell.h.1354671 2019-01-22 16:08:40.796539950 +0100 -+++ firefox-60.5.0/layout/base/nsIPresShell.h 2019-01-22 16:10:25.106069228 +0100 -@@ -204,7 +204,7 @@ class nsIPresShell : public nsStubDocume - * to the same aSize value. AllocateFrame is infallible and will abort - * on out-of-memory. - */ -- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { -+ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { - void* result = mFrameArena.AllocateByFrameID(aID, aSize); - RecordAlloc(result); - return result; diff --git a/sources b/sources index 202c177..a6c84ec 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (cbindgen-vendor.tar.xz) = 161811f4adfc74e5d92871c78139704d32e1e1ad6b615c85353de300d9647a68f1ca8b1c953f7cc5539d861e9e8d8e42892cae757a3eafea78804e19bc323c16 -SHA512 (thunderbird-115.14.0.source.tar.xz) = b12e1302d6be94dd88bee6dd069d3fec944bfce95e1afc1d72c14cc188d952fd5a85f0e70575317250701ac89498d876f3384b022957689fabcef61ad7d78c29 -SHA512 (thunderbird-langpacks-115.14.0-20240805.tar.xz) = e98f04ea5941f1160908584c7d263da7a934233ea378ec1b57a9a91f7b40242f0f45d8758b15573c635dbea606cf239625ae5e61e367123d0545034dee1e9383 +SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 +SHA512 (thunderbird-128.1.0esr.source.tar.xz) = cda64afee45ae20a627116f9475cc4421262db40a7efa09eeafcb6e96f8fad97e8c96e2ecf04466ac4bce99fcebe0c3ce9953fa3fc4f5a92ab6f60e122f58c9a +SHA512 (thunderbird-langpacks-128.1.0esr-20240806.tar.xz) = d464ec73a97d7768cb24d1e09e7147ec80a001ab80a060395950be67db3b6d56c56710123040dc1280a7f9f067149552d6280684b1130281674c6b658bc127f9 diff --git a/thunderbird.spec b/thunderbird.spec index b161df8..1274673 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -13,16 +13,12 @@ ExcludeArch: armv7hl # Build as a debug package? %define debug_build 0 -# Hardened build? -%define hardened_build 1 - %define system_ffi 1 %define build_langpacks 1 %bcond_with toolchain_clang %global use_bundled_cbindgen 1 -%global disable_elfhack 1 %if %{?system_nss} %global nspr_version 4.26.0 @@ -63,6 +59,7 @@ ExcludeArch: s390x %define mozappdir %{_libdir}/thunderbird %define official_branding 1 +%define pre_version esr %define enable_mozilla_crashreporter 0 @@ -87,13 +84,13 @@ ExcludeArch: s390x Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 115.14.0 +Version: 128.1.0 Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later Source0: https://archive.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.xz %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20240805.tar.xz +Source1: thunderbird-langpacks-%{version}%{?pre_version}-20240806.tar.xz %endif Source3: get-calendar-langpacks.sh Source4: cbindgen-vendor.tar.xz @@ -109,20 +106,25 @@ Source29: thunderbird-wayland.desktop Source32: node-stdout-nonblocking-wrapper Source33: org.mozilla.thunderbird.desktop -# Build patches -Patch9: mozilla-build-arm.patch -#Patch226: rhbz-1354671.patch -Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch #Patch416: firefox-SIOCGSTAMP.patch Patch418: mozilla-1512162.patch #Patch419: bindgen-d0dfc52706f23db9dc9d74642eeebd89d73cb8d0.patch -Patch103: rhbz-1219542-s390-build.patch # gcc 12 build fix patches Patch422: 0001-GLIBCXX-fix-for-GCC-12.patch Patch425: build-disable-elfhack.patch +# Build patches +Patch32: build-rust-ppc64le.patch +Patch35: build-ppc-jit.patch +# Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) +Patch40: build-aarch64-skia.patch +Patch44: build-arm-libopus.patch +Patch53: firefox-gcc-build.patch +Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch +Patch78: firefox-i686-build.patch +Patch79: firefox-gcc-13-build.patch + # PPC fix -Patch304: mozilla-1245783.patch # Fedora specific patches @@ -287,25 +289,13 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q # Build patches -%patch -P 9 -p2 -b .arm -%ifarch s390 -%patch -P 103 -p1 -b .rhbz-1219542-s390-build -%endif - -%patch -P 304 -p1 -b .1245783 #ARM run-time patch %ifarch aarch64 #%patch -P 226 -p1 -b .1354671 %endif -%ifarch %{arm} -%patch -P 415 -p1 -b .mozilla-1238661 -%endif #FIXME %patch -P 416 -p1 -b .SIOCGSTAMP %patch -P 418 -p1 -b .mozbz-1512162 -%if 0%{?disable_elfhack} -%patch -P 425 -p1 -b .build-disable-elfhack -%endif # most likely fixed #%patch -P 419 -p1 -b .bindgen @@ -318,6 +308,13 @@ debug %{name}, you want to install %{name}-debuginfo instead. %patch -P 502 -p1 -b .expat-CVE-2022-25236 %patch -P 503 -p1 -b .expat-CVE-2022-25315 +%patch -P40 -p1 -b .aarch64-skia +%patch -P44 -p1 -b .build-arm-libopus +%patch -P53 -p1 -b .firefox-gcc-build +%patch -P71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 +%patch -P78 -p1 -b .firefox-i686 +%patch -P79 -p1 -b .firefox-gcc-13-build + %patch -P 1200 -p1 -b .rustflags-commasplit %if %{official_branding} @@ -372,6 +369,7 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %endif %ifarch aarch64 +echo "ac_add_options --disable-elf-hack" >> .mozconfig echo "ac_add_options --disable-jit" >> .mozconfig %endif @@ -474,16 +472,14 @@ find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' # MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ %{__sed} -e 's/-Wall//') +# Thunderbird is not supposed to build with exceptions globally enabled +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-fexceptions//') %if 0%{?fedora} < 30 MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" %else # Workaround for mozbz#1531309 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-Werror=format-security//') %endif -# Use hardened build? -%if %{?hardened_build} -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" -%endif %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif @@ -543,19 +539,11 @@ echo "ac_add_options MOZ_PGO=1" >> .mozconfig export CCACHE_DISABLE=1 %endif -MOZ_SMP_FLAGS=-j1 -# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc %{power64} aarch64 -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 -[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 -%endif +# Require 4 GB of RAM per CPU core +%constrain_build -m 4096 +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig -export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" export STRIP=/bin/true export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system #Use python 3.11 for mach @@ -730,7 +718,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/omni.ja -%{mozappdir}/plugin-container %{mozappdir}/defaults %{mozappdir}/dictionaries %if %{build_langpacks} @@ -771,6 +758,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Tue Aug 06 2024 Eike Rathke - 128.1.0-1 +- Update to 128.1.0 + * Tue Aug 06 2024 Eike Rathke - 115.14.0-1 - Update to 115.14.0