Compare commits

...

No commits in common. "imports/c9/firefox-115.3.1-1.el9_2" and "c8" have entirely different histories.

6 changed files with 224 additions and 38 deletions

View File

@ -1,6 +1,6 @@
b963b16f6879c5dbe6e33a3a3da058b494453922 SOURCES/cbindgen-vendor.tar.xz
6a421b655b8310153e13f3ba323f091e1735feaf SOURCES/firefox-115.3.1esr.processed-source.tar.xz
fea6ac1599da96cac5fcdd931c353feb8d6c14a0 SOURCES/firefox-langpacks-115.3.1esr-20230929.tar.xz
390c5bc3d9df2baf3e969203e4827e096c4c7f69 SOURCES/firefox-115.11.0esr.processed-source.tar.xz
11b5c428a7e73076351e2d0e344e513db8186a04 SOURCES/firefox-langpacks-115.11.0esr-20240507.tar.xz
2d8a6b2b30d5496735f49ffe8c8a7ede3a78a5ca SOURCES/mochitest-python.tar.gz
d744f92e874688cc4b5376477dfdd639a97a6cd4 SOURCES/nspr-4.35.0-1.el8_1.src.rpm
9555ba179bc1398fbacfa2896e45f3808d94ecd2 SOURCES/nss-3.90.0-3.el8_1.src.rpm

4
.gitignore vendored
View File

@ -1,6 +1,6 @@
SOURCES/cbindgen-vendor.tar.xz
SOURCES/firefox-115.3.1esr.processed-source.tar.xz
SOURCES/firefox-langpacks-115.3.1esr-20230929.tar.xz
SOURCES/firefox-115.11.0esr.processed-source.tar.xz
SOURCES/firefox-langpacks-115.11.0esr-20240507.tar.xz
SOURCES/mochitest-python.tar.gz
SOURCES/nspr-4.35.0-1.el8_1.src.rpm
SOURCES/nss-3.90.0-3.el8_1.src.rpm

View File

@ -0,0 +1,127 @@
From 263682c9a29395055f3b3afe2d97be1828a6223f Mon Sep 17 00:00:00 2001
From: Jerome Jiang <jianj@google.com>
Date: Thu, 30 Jun 2022 13:48:56 -0400
Subject: [PATCH] Fix bug with smaller width bigger size
Fixed previous patch that clusterfuzz failed on.
Bug: webm:1642
Change-Id: If0e08e72abd2e042efe4dcfac21e4cc51afdfdb9
---
test/resize_test.cc | 11 +++--------
vp9/common/vp9_alloccommon.c | 13 ++++++-------
vp9/encoder/vp9_encoder.c | 27 +++++++++++++++++++++++++--
3 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/test/resize_test.cc b/test/resize_test.cc
index fd1c2a92de6..20ad2229b46 100644
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -102,11 +102,8 @@ void ScaleForFrameNumber(unsigned int frame, unsigned int initial_w,
if (frame < 30) {
return;
}
- if (frame < 100) {
- *w = initial_w * 7 / 10;
- *h = initial_h * 16 / 10;
- return;
- }
+ *w = initial_w * 7 / 10;
+ *h = initial_h * 16 / 10;
return;
}
if (frame < 10) {
@@ -559,9 +556,7 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
}
}
-// TODO(https://crbug.com/webm/1642): This causes a segfault in
-// init_encode_frame_mb_context().
-TEST_P(ResizeRealtimeTest, DISABLED_TestExternalResizeSmallerWidthBiggerSize) {
+TEST_P(ResizeRealtimeTest, TestExternalResizeSmallerWidthBiggerSize) {
ResizingVideoSource video;
video.flag_codec_ = true;
video.smaller_width_larger_size_ = true;
diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c
index e53883f621d..9e73e40ea09 100644
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -135,13 +135,6 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
cm->free_mi(cm);
if (cm->alloc_mi(cm, new_mi_size)) goto fail;
}
-
- if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
- // Create the segmentation map structure and set to 0.
- free_seg_map(cm);
- if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
- }
-
if (cm->above_context_alloc_cols < cm->mi_cols) {
vpx_free(cm->above_context);
cm->above_context = (ENTROPY_CONTEXT *)vpx_calloc(
@@ -156,6 +149,12 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
cm->above_context_alloc_cols = cm->mi_cols;
}
+ if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
+ // Create the segmentation map structure and set to 0.
+ free_seg_map(cm);
+ if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
+ }
+
if (vp9_alloc_loop_filter(cm)) goto fail;
return 0;
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 69a4e3c314f..e3ba294c32f 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2047,6 +2047,17 @@ static void alloc_copy_partition_data(VP9_COMP *cpi) {
}
}
+static void free_copy_partition_data(VP9_COMP *cpi) {
+ vpx_free(cpi->prev_partition);
+ cpi->prev_partition = NULL;
+ vpx_free(cpi->prev_segment_id);
+ cpi->prev_segment_id = NULL;
+ vpx_free(cpi->prev_variance_low);
+ cpi->prev_variance_low = NULL;
+ vpx_free(cpi->copied_frame_cnt);
+ cpi->copied_frame_cnt = NULL;
+}
+
void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
VP9_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
@@ -2126,6 +2137,8 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows);
if (cm->mi_alloc_size < new_mi_size) {
vp9_free_context_buffers(cm);
+ vp9_free_pc_tree(&cpi->td);
+ vpx_free(cpi->mbmi_ext_base);
alloc_compressor_data(cpi);
realloc_segmentation_maps(cpi);
cpi->initial_width = cpi->initial_height = 0;
@@ -2144,8 +2157,18 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
update_frame_size(cpi);
if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) {
- memset(cpi->consec_zero_mv, 0,
- cm->mi_rows * cm->mi_cols * sizeof(*cpi->consec_zero_mv));
+ vpx_free(cpi->consec_zero_mv);
+ CHECK_MEM_ERROR(
+ &cm->error, cpi->consec_zero_mv,
+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->consec_zero_mv)));
+
+ vpx_free(cpi->skin_map);
+ CHECK_MEM_ERROR(
+ &cm->error, cpi->skin_map,
+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0])));
+
+ free_copy_partition_data(cpi);
+ alloc_copy_partition_data(cpi);
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
vp9_cyclic_refresh_reset_resize(cpi);
rc->rc_1_frame = 0;

View File

@ -1,11 +1,11 @@
--- firefox-102.4.0/python/mozbuild/mozbuild/nodeutil.py.lower-node-min-version 2022-10-10 17:55:56.000000000 +0200
+++ firefox-102.4.0/python/mozbuild/mozbuild/nodeutil.py 2022-10-17 14:57:47.476182627 +0200
--- firefox-115.8.0/python/mozbuild/mozbuild/nodeutil.py.lower-node-min-version 2024-02-12 21:53:56.000000000 +0200
+++ firefox-115.8.0/python/mozbuild/mozbuild/nodeutil.py 2024-02-14 16:48:12.476182627 +0200
@@ -13,7 +13,7 @@ from mozboot.util import get_tools_dir
from mozfile import which
from packaging.version import Version
from six import PY3
-NODE_MIN_VERSION = StrictVersion("12.22.12")
+NODE_MIN_VERSION = StrictVersion("10.24.0")
NPM_MIN_VERSION = StrictVersion("6.14.16")
-NODE_MIN_VERSION = Version("12.22.12")
+NODE_MIN_VERSION = Version("10.24.0")
NPM_MIN_VERSION = Version("6.14.16")

View File

@ -14,8 +14,8 @@ pref("browser.shell.checkDefaultBrowser", false);
pref("network.manage-offline-status", true);
pref("extensions.shownSelectionUI", true);
pref("ui.SpellCheckerUnderlineStyle", 1);
pref("startup.homepage_override_url", "https://www.redhat.com");
pref("startup.homepage_welcome_url", "https://www.redhat.com");
pref("startup.homepage_override_url", "%HOMEPAGE%");
pref("startup.homepage_welcome_url", "%HOMEPAGE%");
pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///%PREFIX%/share/doc/HTML/index.html");
pref("media.gmp-gmpopenh264.autoupdate",true);
pref("media.gmp-gmpopenh264.enabled",false);

View File

@ -1,3 +1,4 @@
%define homepage %(grep '^HOME_URL\s*=' /etc/os-release | sed 's/^HOME_URL\s*=//;s/^\s*"//;s/"\s*$//')
%global disable_toolsets 0
# Produce debug (non-optimized) package build. Suitable for debugging only
@ -23,7 +24,7 @@ function dist_to_rhel_minor(str, start)
end
match = string.match(str, ".el8")
if match then
return 9
return 10
end
match = string.match(str, ".module%+el9.%d+")
if match then
@ -35,7 +36,7 @@ function dist_to_rhel_minor(str, start)
end
match = string.match(str, ".el9")
if match then
return 3
return 5
end
return -1
end}
@ -121,7 +122,7 @@ end}
# If set to .b2 or .b3 ... the processed source file needs to be renamed before upload, e.g.
# firefox-102.8.0esr.b2.processed-source.tar.xz
# When unset use processed source file name as is.
##global buildnum .b2
##global buildnum .b2
%bcond_without langpacks
@ -131,7 +132,7 @@ end}
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 115.3.1
Version: 115.11.0
Release: 1%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
@ -140,10 +141,15 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+
ExcludeArch: %{ix86}
%endif
%if 0%{?rhel} == 8
# Started to ship on aarch64 in RHEL 8.2, on s390x in RHEL 8.3
%if %{rhel_minor_version} == 1
ExcludeArch: %{ix86} aarch64 s390x
ExcludeArch: %{ix86} s390x aarch64
%else
%if %{rhel_minor_version} == 2
ExcludeArch: %{ix86} s390x
%else
ExcludeArch: %{ix86}
%endif
%endif
%endif
%if 0%{?rhel} == 7
@ -157,7 +163,7 @@ ExcludeArch: aarch64 s390 ppc
# Link to original tarball: https://archive.mozilla.org/pub/firefox/releases/%%{version}%%{?pre_version}/source/firefox-%%{version}%%{?pre_version}.source.tar.xz
Source0: firefox-%{version}%{?pre_version}%{?buildnum}.processed-source.tar.xz
%if %{with langpacks}
Source1: firefox-langpacks-%{version}%{?pre_version}-20230929.tar.xz
Source1: firefox-langpacks-%{version}%{?pre_version}-20240507.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source3: process-official-tarball
@ -229,6 +235,9 @@ Patch155: rhbz-1354671.patch
# GENDIFF_DIFF_ARGS=-U0 gendiff firefox-xxxx .firefox-tests-reftest
Patch201: firefox-tests-xpcshell-freeze.patch
# ---- Security patches ----
Patch301: CVE-2023-44488-libvpx.patch
# BUILD REQURES/REQUIRES
%if %{?system_nss} && !0%{?bundle_nss}
BuildRequires: pkgconfig(nspr) >= %{nspr_version}
@ -301,7 +310,7 @@ BuildRequires: rust >= %{rust_version}
%if 0%{?rhel} == 9
BuildRequires: cargo
BuildRequires: clang clang-libs llvm
BuildRequires: clang clang-libs llvm llvm-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3-devel
@ -973,15 +982,15 @@ to run Firefox explicitly on X11.
%prep
echo "Build environment"
echo "--------------------------------------------"
echo "dist %{?dist}"
echo "RHEL 8 minor version: %{?rhel_minor_version}"
echo "bundle_nss %{?bundle_nss}"
echo "system_nss %{?system_nss}"
echo "use_rust_ts %{?use_rust_ts}"
echo "use_dts %{?use_dts}"
echo "use_nodejs_scl %{?use_nodejs_scl}"
echo "use_llvm_ts %{?use_llvm_ts}"
echo "use_python3_scl %{?use_python3_scl}"
echo "dist %{?dist}"
echo "RHEL minor version: %{?rhel_minor_version}"
echo "bundle_nss %{?bundle_nss}"
echo "system_nss %{?system_nss}"
echo "use_rust_ts %{?use_rust_ts}"
echo "use_dts %{?use_dts}"
echo "use_nodejs_scl %{?use_nodejs_scl}"
echo "use_llvm_ts %{?use_llvm_ts}"
echo "use_python3_scl %{?use_python3_scl}"
echo "--------------------------------------------"
%setup -q -n %{name}-%{version}
@ -1034,6 +1043,11 @@ echo "--------------------------------------------"
# ---- Test patches ----
%patch -P201 -p1 -b .firefox-tests-xpcshell-freeze
# ---- Security patches ----
cd media/libvpx/libvpx
%patch -P301 -p1 -b .CVE-2023-44488-libvpx
cd -
%{__rm} -f .mozconfig
%{__cp} %{SOURCE10} .mozconfig
%{__cp} %{SOURCE24} mozilla-api-key
@ -1107,6 +1121,13 @@ echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozco
echo "ac_add_options --with-google-location-service-api-keyfile=`pwd`/google-loc-api-key" >> .mozconfig
echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key" >> .mozconfig
# May result in empty --with-libclang-path= in earlier versions.
# So far this is needed only for c8s.
%if 0%{?rhel} == 8 && %{rhel_minor_version} >= 10
# Clang 17 upstream's detection fails, tell it where to look.
echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig
%endif
echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig
# Remove executable bit to make brp-mangle-shebangs happy.
@ -1544,6 +1565,7 @@ ln -s %{mozappdir}/defaults/preferences $RPM_BUILD_ROOT/%{mozappdir}/browser/def
# Default preferences
%{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js
sed -i -e 's|%PREFIX%|%{_prefix}|' %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js
sed -i -e 's|%HOMEPAGE%|%{homepage}|' %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js
# Enable modern crypto for the key export on the RHEL9 only (rhbz#1764205)
%if 0%{?rhel} == 9
echo 'pref("security.pki.use_modern_crypto_with_pkcs12", true);' >> %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js
@ -1609,6 +1631,17 @@ rm -rf %{buildroot}%{mozappdir}/gtk2/
ln -sf /usr/lib64/libnss3.so %{buildroot}%{_libdir}/libnss3.so
ln -sf /usr/lib64/pkcs11/p11-kit-client.so %{buildroot}%{_libdir}/libnssckbi.so
%endif
# clean the created bundled rpms if there are any
rm -rf %{_srcrpmdir}/libffi*.src.rpm
find %{_rpmdir} -name "libffi*.rpm" -delete
rm -rf %{_srcrpmdir}/openssl*.src.rpm
find %{_rpmdir} -name "openssl*.rpm" -delete
rm -rf %{_srcrpmdir}/nss*.src.rpm
find %{_rpmdir} -name "nss*.rpm" -delete
rm -rf %{_srcrpmdir}/nspr*.src.rpm
find %{_rpmdir} -name "nspr*.rpm" -delete
#---------------------------------------------------------------------
%check
@ -1622,16 +1655,6 @@ if [ $1 -eq 0 ]; then
%{__rm} -rf %{mozappdir}/plugins
fi
%clean
rm -rf %{_srcrpmdir}/libffi*.src.rpm
find %{_rpmdir} -name "libffi*.rpm" -delete
rm -rf %{_srcrpmdir}/openssl*.src.rpm
find %{_rpmdir} -name "openssl*.rpm" -delete
rm -rf %{_srcrpmdir}/nss*.src.rpm
find %{_rpmdir} -name "nss*.rpm" -delete
rm -rf %{_srcrpmdir}/nspr*.src.rpm
find %{_rpmdir} -name "nspr*.rpm" -delete
%post
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@ -1717,6 +1740,42 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Tue May 07 2024 Eike Rathke <erack@redhat.com> - 115.11.0-1
- Update to 115.11.0 build1
* Tue Apr 09 2024 Eike Rathke <erack@redhat.com> - 115.10.0-1
- Update to 115.10.0 build1
* Tue Apr 09 2024 Jan Horak <jhorak@redhat.com> - 115.9.1-2
- Removed expat CVE fix
* Fri Mar 22 2024 Eike Rathke <erack@redhat.com> - 115.9.1-1
- Update to 115.9.1
* Fri Mar 15 2024 Eike Rathke <erack@redhat.com> - 115.9.0-2
- Update to 115.9.0 build2
* Tue Mar 12 2024 Eike Rathke <erack@redhat.com> - 115.9.0-1
- Update to 115.9.0 build1
- Fix expat CVE-2023-52425
* Tue Feb 13 2024 Eike Rathke <erack@redhat.com> - 115.8.0-1
- Update to 115.8.0 build1
* Tue Jan 16 2024 Eike Rathke <erack@redhat.com> - 115.7.0-1
- Update to 115.7.0 build1
* Tue Dec 12 2023 Eike Rathke <erack@redhat.com> - 115.6.0-1
- Update to 115.6.0 build1
* Tue Nov 14 2023 Eike Rathke <erack@redhat.com> - 115.5.0-1
- Update to 115.5.0 build1
* Tue Oct 17 2023 Eike Rathke <erack@redhat.com> - 115.4.0-1
- Update to 115.4.0 build1
- Add fix for CVE-2023-44488
- Set homepage from os-release HOME_URL
* Fri Sep 29 2023 Eike Rathke <erack@redhat.com> - 115.3.1-1
- Update to 115.3.1