Skip to content

Commit

Permalink
First draft of 128 beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
msirringhaus committed Jun 17, 2024
1 parent fa2d454 commit 66e7fe4
Show file tree
Hide file tree
Showing 9 changed files with 305 additions and 744 deletions.
64 changes: 34 additions & 30 deletions firefox/MozillaFirefox.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
# orig_suffix b3
# major 69
# mainver %%major.99
%define major 127
%define major 128
%define mainver %major.0
%define orig_version 127.0
%define orig_suffix %{nil}
%define orig_version 128.0
%define orig_suffix b2
%define update_channel release
%define branding 1
%define devpkg 1
Expand All @@ -42,25 +42,21 @@
# upstream default is clang (to use gcc for large parts set to 0)
%define clang_build 0

# PIE, full relro
%define build_hardened 1

%bcond_with only_print_mozconfig

# define if ccache should be used or not
%define useccache 0
%define useccache 1

# SLE-12 doesn't have this macro
%{!?_rpmmacrodir: %global _rpmmacrodir %{_rpmconfigdir}/macros.d}

# No i586 on SLE-12, as the rpmlints are broken and can't handle the big rpms resulting from this build.
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
# We don't ship i586 anywhere anymore
ExclusiveArch: aarch64 ppc64le x86_64 s390x
%else
# Firefox only supports i686
%ifarch %ix86
ExclusiveArch: i586 i686
BuildArch: i686
%{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2}
%endif
%endif

# Let mach set the appropriate LTO-flags for us, but correctly.
%{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) }

# general build definitions
Expand Down Expand Up @@ -103,8 +99,8 @@ BuildRequires: gcc13-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: cargo1.76
BuildRequires: rust1.76
BuildRequires: cargo1.78
BuildRequires: rust1.78
%if 0%{useccache} != 0
BuildRequires: ccache
%endif
Expand All @@ -116,19 +112,22 @@ BuildRequires: makeinfo
BuildRequires: mozilla-nspr-devel >= 4.35
BuildRequires: mozilla-nss-devel >= 3.100
BuildRequires: nasm >= 2.14
BuildRequires: nodejs >= 12.22.12
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 150000
BuildRequires: nodejs12 >= 12.22.12
BuildRequires: libXtst-devel
BuildRequires: python-libxml2
#BuildRequires: python-libxml2
BuildRequires: python39
BuildRequires: python39-curses
BuildRequires: python39-devel
%else
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} <= 150600
%if 0%{?sle_version} > 150000 && 0%{?sle_version} <= 150600
BuildRequires: nodejs12 >= 12.22.12
BuildRequires: python39
BuildRequires: python39-curses
BuildRequires: python39-devel
%else
# ALP
BuildRequires: nodejs >= 12.22.12
BuildRequires: python3 >= 3.7
BuildRequires: python3-curses
BuildRequires: python3-devel
Expand All @@ -146,11 +145,7 @@ BuildRequires: zip
%if 0%{?suse_version} < 1550
BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1
%endif
%if (0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000)
BuildRequires: clang6-devel
%else
BuildRequires: clang-devel >= 5
%endif
BuildRequires: clang15-devel
BuildRequires: pkgconfig(glib-2.0) >= 2.22
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.14.0
Expand Down Expand Up @@ -229,6 +224,10 @@ Patch21: svg-rendering.patch
Patch22: mozilla-partial-revert-1768632.patch
Patch23: mozilla-rust-disable-future-incompat.patch
Patch24: mozilla-bmo1822730.patch
Patch25: mozilla-bmo1902304.patch
%if (0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000)
Patch26: fix-sle12-build-errors.patch
%endif
# Firefox/browser
Patch101: firefox-kde.patch
Patch102: firefox-branded-icons.patch
Expand Down Expand Up @@ -380,11 +379,11 @@ export BUILD_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export CFLAGS="%{optflags}"
%if 0%{?clang_build} == 0
%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600
export CC=gcc-13
export CXX=g++-13
%else
%if 0%{?clang_build} == 0
export CC=gcc
export CXX=g++
%endif
Expand All @@ -398,8 +397,13 @@ export CXX=g++
# A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer
#export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
%endif
%if 0%{?build_hardened}
export LDFLAGS="\$LDFLAGS -fPIC -Wl,-z,relro,-z,now"
%endif
%ifarch ppc64 ppc64le
%if 0%{?clang_build} == 0
#export CFLAGS="\$CFLAGS -mminimal-toc"
%endif
%endif
%ifarch %ix86
# Not enough memory on 32-bit systems, reduce debug info.
Expand Down Expand Up @@ -436,7 +440,7 @@ ac_add_options --enable-default-toolkit=cairo-gtk3
%ifarch %ix86 %arm
ac_add_options --disable-debug-symbols
%else
ac_add_options --enable-debug-symbols=-g0
ac_add_options --enable-debug-symbols=-g1
%endif
ac_add_options --disable-install-strip
%ifarch %ix86 %arm
Expand Down Expand Up @@ -492,7 +496,7 @@ ac_add_options --enable-optimize="-O1"
%endif
%ifarch x86_64
# LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
%if 0%{?suse_version} > 1500
%if 0%{?suse_version} > 1600
ac_add_options --enable-lto
%if 0%{?do_profiling}
ac_add_options MOZ_PGO=1
Expand Down Expand Up @@ -580,8 +584,10 @@ grep amazondotcom dist/firefox/browser/omni.ja
# copy tree into RPM_BUILD_ROOT
mkdir -p %{buildroot}%{progdir}
cp -rf $RPM_BUILD_DIR/obj/dist/%{srcname}/* %{buildroot}%{progdir}
%if %localize
mkdir -p %{buildroot}%{progdir}/browser/extensions
cp -rf $RPM_BUILD_DIR/langpacks_artifacts/* %{buildroot}%{progdir}/browser/extensions/
%endif
mkdir -p %{buildroot}%{progdir}/distribution/extensions
mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/
# renaming executables (for regular vs. ESR)
Expand Down Expand Up @@ -722,9 +728,7 @@ exit 0
%{progdir}/dependentlibs.list
%{progdir}/*.so
%{progdir}/glxtest
%if 0%{wayland_supported}
%{progdir}/vaapitest
%endif
%ifarch aarch64 riscv64 %arm
%{progdir}/v4l2test
%endif
Expand Down
13 changes: 13 additions & 0 deletions firefox/fix-sle12-build-errors.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: firefox-124.0.1/mfbt/Assertions.h
===================================================================
--- firefox-124.0.1.orig/mfbt/Assertions.h
+++ firefox-124.0.1/mfbt/Assertions.h
@@ -230,7 +230,7 @@ MOZ_NoReturn(int aLine) {
# define MOZ_REALLY_CRASH(line) \
do { \
*((volatile int*)MOZ_CRASH_WRITE_ADDR) = line; /* NOLINT */ \
- MOZ_NOMERGE ::abort(); \
+ ::abort(); \
} while (false)
# else
# define MOZ_REALLY_CRASH(line) \
1 change: 1 addition & 0 deletions firefox/mozilla-bmo1902304.patch
14 changes: 7 additions & 7 deletions firefox/tar_stamps
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PRODUCT="firefox"
CHANNEL="release"
VERSION="127.0"
VERSION_SUFFIX=""
PREV_VERSION="126.0.1"
PREV_VERSION_SUFFIX=""
VERSION="128.0"
VERSION_SUFFIX="b2"
PREV_VERSION="128.0"
PREV_VERSION_SUFFIX="b1"
#SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation
RELEASE_REPO="https://hg.mozilla.org/releases/mozilla-release"
RELEASE_TAG="cfd3e02d8411b3a938cda7242dcf044cf03c03d1"
RELEASE_TIMESTAMP="20240606181944"
RELEASE_REPO="https://hg.mozilla.org/releases/mozilla-beta"
RELEASE_TAG="f6d0f0798c23332170a4a29fa59562a4f2639c9a"
RELEASE_TIMESTAMP="20240612091431"
25 changes: 14 additions & 11 deletions mozilla-bmo1504834-part1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# Parent 9fcbd287056a40084b1e679f787bf683b291f323
Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834

diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
Index: firefox-128.0/gfx/2d/DrawTargetSkia.cpp
===================================================================
--- firefox-128.0.orig/gfx/2d/DrawTargetSkia.cpp
+++ firefox-128.0/gfx/2d/DrawTargetSkia.cpp
@@ -156,7 +156,8 @@ static IntRect CalculateSurfaceBounds(co
}

Expand All @@ -15,9 +16,10 @@ diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp

static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
const int32_t aStride, SurfaceFormat aFormat) {
diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
Index: firefox-128.0/gfx/2d/Types.h
===================================================================
--- firefox-128.0.orig/gfx/2d/Types.h
+++ firefox-128.0/gfx/2d/Types.h
@@ -89,18 +89,11 @@ enum class SurfaceFormat : int8_t {
// This represents the unknown format.
UNKNOWN, // TODO: Replace uses with Maybe<SurfaceFormat>.
Expand All @@ -40,18 +42,19 @@ diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h

// The following values are OS and endian-independent synonyms.
//
diff --git a/gfx/skia/skia/modules/skcms/skcms.cc b/gfx/skia/skia/modules/skcms/skcms.cc
--- a/gfx/skia/skia/modules/skcms/skcms.cc
+++ b/gfx/skia/skia/modules/skcms/skcms.cc
@@ -30,6 +30,8 @@
Index: firefox-128.0/gfx/skia/skia/modules/skcms/skcms.cc
===================================================================
--- firefox-128.0.orig/gfx/skia/skia/modules/skcms/skcms.cc
+++ firefox-128.0/gfx/skia/skia/modules/skcms/skcms.cc
@@ -31,6 +31,8 @@
#include <avx512fintrin.h>
#include <avx512dqintrin.h>
#endif
+#else
+ #define SKCMS_PORTABLE
#endif

static bool runtime_cpu_detection = true;
using namespace skcms_private;
@@ -324,20 +326,28 @@ enum {
static uint16_t read_big_u16(const uint8_t* ptr) {
uint16_t be;
Expand Down
26 changes: 26 additions & 0 deletions mozilla-bmo1902304.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Index: firefox-128.0/media/libjpeg/jconfig.h
===================================================================
--- firefox-128.0.orig/media/libjpeg/jconfig.h
+++ firefox-128.0/media/libjpeg/jconfig.h
@@ -19,7 +19,7 @@
#define MEM_SRCDST_SUPPORTED 1

/* Use accelerated SIMD routines. */
-#if defined(__sparc__) || defined(__loongarch__)
+#if defined(__sparc__) || defined(__loongarch__) || defined(__s390__) || defined(__s390x__)
#undef WITH_SIMD
#else
#define WITH_SIMD 1
Index: firefox-128.0/media/libjpeg/jconfigint.h
===================================================================
--- firefox-128.0.orig/media/libjpeg/jconfigint.h
+++ firefox-128.0/media/libjpeg/jconfigint.h
@@ -81,7 +81,7 @@
/* #undef D_ARITH_CODING_SUPPORTED */

/* Use accelerated SIMD routines. */
-#if defined(__sparc__) || defined(__loongarch__)
+#if defined(__sparc__) || defined(__loongarch__) || defined(__s390__) || defined(__s390x__)
#undef WITH_SIMD
#else
#define WITH_SIMD 1
21 changes: 6 additions & 15 deletions mozilla-libavcodec58_91.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# HG changeset patch
# Parent fdc16b43f28c2e974929ca702563aaac52799654
# Parent 60fc1933af9d4f1769025a6f1d9a60db6b899315

diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
@@ -44,16 +44,18 @@ static const char* sLibs[] = {
"libavcodec.53.dylib",
#elif defined(XP_OPENBSD)
"libavcodec.so", // OpenBSD hardly controls the major/minor library version
// of ffmpeg and update it regulary on ABI/API changes
#else
Index: firefox-127.0/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
===================================================================
--- firefox-127.0.orig/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+++ firefox-127.0/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
@@ -49,6 +49,8 @@ static const char* sLibs[] = {
"libavcodec.so.61",
"libavcodec.so.60",
"libavcodec.so.59",
Expand All @@ -18,8 +14,3 @@ diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/plat
"libavcodec.so.58",
"libavcodec-ffmpeg.so.58",
"libavcodec-ffmpeg.so.57",
"libavcodec-ffmpeg.so.56",
"libavcodec.so.57",
"libavcodec.so.56",
"libavcodec.so.55",
"libavcodec.so.54",
17 changes: 6 additions & 11 deletions mozilla-rust-disable-future-incompat.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
# HG changeset patch
# Parent 8c5b7b10f09b8cd6a8a6e0e29b92ec88cec6d4ce
# Parent 83a5e219b271976ee9dfa46b74ecc1c1c6d49f94

diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -238,8 +238,14 @@ mio_0_8 = { package = "mio", git = "http
Index: firefox-128.0/Cargo.toml
===================================================================
--- firefox-128.0.orig/Cargo.toml
+++ firefox-128.0/Cargo.toml
@@ -236,3 +236,8 @@ mio_0_8 = { package = "mio", git = "http
# Patch `gpu-descriptor` 0.3.0 to remove unnecessary `allocator-api2` dep.:
# Still waiting for the now-merged <https://github.com/zakarumych/gpu-descriptor/pull/40> to be released.
gpu-descriptor = { git = "https://github.com/zakarumych/gpu-descriptor", rev = "7b71a4e47c81903ad75e2c53deb5ab1310f6ff4d" }

# Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2.
# There is not going to be new version of mio 0.6, mio now being >= 0.7.11.
[patch.crates-io.mio]
path = "third_party/rust/mio-0.6.23"
+
+# Package code v0.1.4 uses code "that will be rejected by a future version of Rust"
+# Shut up such messages for now to make the build succeed
+[future-incompat-report]
+frequency = "never"
+
Loading

0 comments on commit 66e7fe4

Please sign in to comment.