diff --git a/D158770.diff b/D158770.diff new file mode 100644 index 0000000000000000000000000000000000000000..1d769955ec3b2873ffe50c4efc2842f708ab7b11 --- /dev/null +++ b/D158770.diff @@ -0,0 +1,25 @@ +diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c +--- a/parser/expat/lib/xmlparse.c ++++ b/parser/expat/lib/xmlparse.c +@@ -5652,12 +5652,18 @@ + else + #endif /* XML_DTD */ + { + processor = contentProcessor; + /* see externalEntityContentProcessor vs contentProcessor */ +- return doContent(parser, parentParser ? 1 : 0, encoding, s, end, +- nextPtr, (XML_Bool)!ps_finalBuffer); ++ result = doContent(parser, parser->m_parentParser ? 1 : 0, ++ parser->m_encoding, s, end, nextPtr, ++ (XML_Bool)! parser->m_parsingStatus.finalBuffer); ++ if (result == XML_ERROR_NONE) { ++ if (! storeRawNames(parser)) ++ return XML_ERROR_NO_MEMORY; ++ } ++ return result; + } + } + + static enum XML_Error PTRCALL + errorProcessor(XML_Parser parser, + diff --git a/dist b/dist deleted file mode 100644 index ad8eb77ba59be071474988a034571694eaa9db8e..0000000000000000000000000000000000000000 --- a/dist +++ /dev/null @@ -1 +0,0 @@ -an7_9 diff --git a/firefox.spec b/firefox.spec index 5fdb6f4ec572be98a31a0ecd5611b6b8463d22c4..c7d789e49d47a15fad440427e6fd177898179fac 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,6 +1,6 @@ -%define anolis_release .0.2 -%global flatpak 1 +%define anolis_release .0.1 %global disable_toolsets 0 +%global flatpak 1 # Produce a build suitable for release, i.e. use PGO/LTO. You can turn it off # when building locally to reduce build time. %global release_build 1 @@ -106,7 +106,7 @@ end} %endif %global use_rustts 1 %global dts_version 10 -# %global rust_version 1.62 +#%global rust_version 1.62 %if 0%{?rhel} >= 8 %global use_rustts 0 %endif @@ -203,7 +203,7 @@ end} Summary: Mozilla Firefox Web browser Name: firefox Version: 102.3.0 -Release: 6%{anolis_release}%{?dist} +Release: 7%{anolis_release}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -256,7 +256,7 @@ Source45: run-wayland-compositor Source403: nss-3.79.0-6.el8_1.src.rpm Source401: nss-setup-flags-env.inc Source402: nspr-4.34.0-3.el8_1.src.rpm -Source404: rust-cbindgen.tar.gz +Source404: rust-cbindgen.tar.gz # Build patches Patch3: mozilla-build-arm.patch @@ -292,6 +292,7 @@ Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch Patch230: D110204-fscreen.diff +Patch231: webrtc-nss-fix.patch # Upstream patches Patch415: mozilla-1670333.patch @@ -303,6 +304,7 @@ Patch420: mozilla-bmo998749.patch Patch421: mozilla-s390x-skia-gradient.patch Patch422: one_swizzle_to_rule_them_all.patch Patch423: svg-rendering.patch +Patch424: D158770.diff # PGO/LTO patches Patch600: pgo.patch @@ -375,7 +377,7 @@ BuildRequires: rustfmt >= %{rust_version} %endif %if 0%{?use_rustts} -# BuildRequires: rust-toolset-%{rust_version} +#BuildRequires: rust-toolset-%{rust_version} %endif %if 0%{?use_llvmts} @@ -516,50 +518,66 @@ BuildRequires: gcc-toolset-12-annobin-plugin-gcc # Bundled libraries Provides: bundled(angle) +Provides: bundled(audioipc-2) +Provides: bundled(brotli) Provides: bundled(cairo) +Provides: bundled(cfworker) +Provides: bundled(d3.js) +Provides: bundled(double-conversion) +Provides: bundled(expat) +Provides: bundled(fdlibm) +Provides: bundled(ffvpx) +Provides: bundled(freetype2) Provides: bundled(graphite2) Provides: bundled(harfbuzz) -Provides: bundled(ots) -Provides: bundled(sfntly) -Provides: bundled(skia) -Provides: bundled(thebes) -Provides: bundled(WebRender) -Provides: bundled(audioipc-2) -Provides: bundled(ffvpx) +Provides: bundled(highway) +Provides: bundled(intgemm) Provides: bundled(kissfft) Provides: bundled(libaom) Provides: bundled(libcubeb) Provides: bundled(libdav1d) Provides: bundled(libjpeg) +Provides: bundled(libjxl) +Provides: bundled(libjxl) +Provides: bundled(libmar) Provides: bundled(libmkv) Provides: bundled(libnestegg) Provides: bundled(libogg) Provides: bundled(libopus) Provides: bundled(libpng) +Provides: bundled(libprio) Provides: bundled(libsoundtouch) Provides: bundled(libspeex_resampler) +Provides: bundled(libsrtp) Provides: bundled(libtheora) Provides: bundled(libtremor) Provides: bundled(libvorbis) Provides: bundled(libvpx) Provides: bundled(libwebp) +Provides: bundled(libwebrtc) Provides: bundled(libyuv) Provides: bundled(mp4parse-rust) +Provides: bundled(mp4parse-rust) +Provides: bundled(msgpack-c) +Provides: bundled(msgpack-c) Provides: bundled(mtransport) Provides: bundled(openmax_dl) -Provides: bundled(double-conversion) -Provides: bundled(brotli) -Provides: bundled(fdlibm) -Provides: bundled(freetype2) -Provides: bundled(libmar) +Provides: bundled(openmax_il) +Provides: bundled(openmax_il) +Provides: bundled(ots) +Provides: bundled(qcms) +Provides: bundled(rlbox_sandboxing_api) +Provides: bundled(sfntly) +Provides: bundled(sipcc) +Provides: bundled(skia) +Provides: bundled(sqlite3) +Provides: bundled(thebes) +Provides: bundled(wasm2c) +Provides: bundled(WebRender) Provides: bundled(woff2) Provides: bundled(xz-embedded) +Provides: bundled(ycbcr) Provides: bundled(zlib) -Provides: bundled(expat) -Provides: bundled(msgpack-c) -Provides: bundled(libprio) -Provides: bundled(rlbox_sandboxing_api) -Provides: bundled(sqlite3) %if 0%{?bundle_nss} Provides: bundled(nss) = 3.79.0 @@ -636,6 +654,7 @@ echo "use_rustts %{?use_rustts}" %patch228 -p1 -b .disable-openh264-download %patch229 -p1 -b .firefox-nss-addon-hack %patch230 -p1 -b .D110204-fscreen.diff +%patch231 -p1 -b .webrtc-nss-fix %patch415 -p1 -b .1670333 %patch416 -p1 -b .mozilla-bmo1005535 @@ -646,6 +665,7 @@ echo "use_rustts %{?use_rustts}" %patch421 -p1 -b .mozilla-s390x-skia-gradient %patch422 -p1 -b .one_swizzle_to_rule_them_all %patch423 -p1 -b .svg-rendering +%patch424 -p1 -b .D158770.diff # PGO patches %if %{build_with_pgo} @@ -663,6 +683,7 @@ echo "use_rustts %{?use_rustts}" %endif + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig @@ -901,8 +922,8 @@ EOL #export RUSTFLAGS="-Cdebuginfo=0 -Clinker=/opt/rh/gcc-toolset-12/root/usr/bin/gcc" %endif -# env CARGO_HOME=.cargo cargo install cbindgen -# export PATH=`pwd`/.cargo/bin:$PATH +#env CARGO_HOME=.cargo cargo install cbindgen +#export PATH=`pwd`/.cargo/bin:$PATH cd - %endif @@ -1422,12 +1443,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Thu Feb 09 2023 hanshuang - 102.3.0-6.0.2 -- fix an7 compile problem +* Fri Feb 10 2023 yangxianzhao - 102.3.0-7.0.1 +- rebrand: rebrand for anolis +- feat: fix an7 compile problem -* Tue Oct 11 2022 Liwei Ge - 102.3.0-6.0.1 -- Rebrand to Anolis -- Cherry-pick [e307bab] +* Tue Oct 11 2022 Jan Horak - 102.3.0-7 +- Fix for expat CVE-2022-40674 and non functional webrtc * Tue Sep 13 2022 Jan Horak - 102.3.0-6 - Update to 102.3.0 build1 diff --git a/webrtc-nss-fix.patch b/webrtc-nss-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..78b458d051e320d8ebe88e78ce752ac24b0f4708 --- /dev/null +++ b/webrtc-nss-fix.patch @@ -0,0 +1,25 @@ +diff -up firefox-102.3.0/third_party/libsrtp/src/crypto/cipher/aes_gcm_nss.c.webrtc-fix firefox-102.3.0/third_party/libsrtp/src/crypto/cipher/aes_gcm_nss.c +--- firefox-102.3.0/third_party/libsrtp/src/crypto/cipher/aes_gcm_nss.c.webrtc-fix 2022-10-04 18:58:30.563683229 +0200 ++++ firefox-102.3.0/third_party/libsrtp/src/crypto/cipher/aes_gcm_nss.c 2022-10-04 18:58:44.583652963 +0200 +@@ -293,7 +293,7 @@ static srtp_err_status_t srtp_aes_gcm_ns + + int rv; + SECItem param = { siBuffer, (unsigned char *)&c->params, +- sizeof(CK_GCM_PARAMS) }; ++ sizeof(CK_NSS_GCM_PARAMS) }; + if (encrypt) { + rv = PK11_Encrypt(c->key, CKM_AES_GCM, ¶m, buf, enc_len, + *enc_len + 16, buf, *enc_len); +diff -up firefox-102.3.0/third_party/libsrtp/src/crypto/include/aes_gcm.h.webrtc-fix firefox-102.3.0/third_party/libsrtp/src/crypto/include/aes_gcm.h +--- firefox-102.3.0/third_party/libsrtp/src/crypto/include/aes_gcm.h.webrtc-fix 2022-10-04 18:59:16.635583764 +0200 ++++ firefox-102.3.0/third_party/libsrtp/src/crypto/include/aes_gcm.h 2022-10-04 18:59:31.848550924 +0200 +@@ -101,7 +101,7 @@ typedef struct { + uint8_t iv[12]; + uint8_t aad[MAX_AD_SIZE]; + int aad_size; +- CK_GCM_PARAMS params; ++ CK_NSS_GCM_PARAMS params; + uint8_t tag[16]; + } srtp_aes_gcm_ctx_t; + +diff -up firefox-102.3.0/third_party/prio/prio/encrypt.c.webrtc-fix firefox-102.3.0/third_party/prio/prio/encrypt.c