From 82ea750086510c8bdb3ff922d09aecf357bac96f Mon Sep 17 00:00:00 2001 From: hanshuang Date: Wed, 8 Feb 2023 17:30:20 +0800 Subject: [PATCH] fix a7 compile problem --- 0001-fix-UnicodeEncodeError-problem.patch | 25 ++++++++++++++ download | 1 + firefox.spec | 40 ++++++++++++++++++----- 3 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 0001-fix-UnicodeEncodeError-problem.patch diff --git a/0001-fix-UnicodeEncodeError-problem.patch b/0001-fix-UnicodeEncodeError-problem.patch new file mode 100644 index 0000000..0c3091b --- /dev/null +++ b/0001-fix-UnicodeEncodeError-problem.patch @@ -0,0 +1,25 @@ +From 2aac422fc99d6d877d46e8aefb92b7feb82ce692 Mon Sep 17 00:00:00 2001 +From: hanshuang +Date: Wed, 11 Jan 2023 16:09:16 +0800 +Subject: [PATCH] fix UnicodeEncodeError problem + +--- + python/mozbuild/mozbuild/controller/building.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py +index e1ddb2d..6d35942 100644 +--- a/python/mozbuild/mozbuild/controller/building.py ++++ b/python/mozbuild/mozbuild/controller/building.py +@@ -641,6 +641,8 @@ class TerminalLoggingHandler(logging.Handler): + + # If we don't flush, the footer may not get drawn. + self.fh.flush() ++ except UnicodeEncodeError: ++ pass + finally: + self.release() + +-- +1.8.3.1 + diff --git a/download b/download index c7d624f..4fe707e 100644 --- a/download +++ b/download @@ -4,3 +4,4 @@ d8f9af1fedc5ecc9b467d9053bd9f3d6 firefox-102.3.0esr.processed-source.tar.xz d41d8cd98f00b204e9800998ecf8427e mochitest-python.tar.gz 75157f5e77e1a4f460645a57ff54e552 nspr-4.34.0-3.el8_1.src.rpm 04f69b8baa7bd8ddc49d786b04307df8 nss-3.79.0-6.el8_1.src.rpm +64e444c5ceddbba10db44d3108809d6c rust-cbindgen.tar.gz diff --git a/firefox.spec b/firefox.spec index 36d5afc..ca115a5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,4 +1,5 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 +%global flatpak 1 %global disable_toolsets 0 # Produce a build suitable for release, i.e. use PGO/LTO. You can turn it off # when building locally to reduce build time. @@ -105,7 +106,7 @@ end} %endif %global use_rustts 1 %global dts_version 10 -%global rust_version 1.62 +%global rust_version 1.52 %if 0%{?rhel} >= 8 %global use_rustts 0 %endif @@ -255,6 +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 # Build patches Patch3: mozilla-build-arm.patch @@ -308,6 +310,7 @@ Patch602: mozilla-1516803.patch # Backported WebRTC changes for PipeWire/Wayland screen sharing support Patch1008: build-rhel7-nasm-dwarf.patch +Patch1009: 0001-fix-UnicodeEncodeError-problem.patch %if %{?system_nss} %if !0%{?bundle_nss} @@ -660,7 +663,7 @@ echo "use_rustts %{?use_rustts}" %endif %endif - +%patch1009 -p1 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -749,6 +752,7 @@ echo "ac_add_options --disable-crashreporter" >> .mozconfig # AV1 requires newer nasm that was rebased in 8.4 %if 0%{?rhel} == 7 || (0%{?rhel} == 8 && %{rhel_minor_version} < 4) echo "ac_add_options --disable-av1" >> .mozconfig +echo "ac_add_options --enable-rust-debug" >> .mozconfig %endif # api keys full path @@ -872,8 +876,23 @@ which node mkdir -p my_rust_vendor cd my_rust_vendor %{__tar} xf %{SOURCE2} -mkdir -p .cargo -cat > .cargo/config < %{_buildrootdir}/cargo/config </dev/null || : %{mozappdir}/pingsender %exclude %{mozappdir}/removed-files %if 0%{?flatpak} -%{_libdir}/libnss3.so +# %{_libdir}/libnss3.so %{_libdir}/libnssckbi.so %endif %{_datadir}/icons/hicolor/16x16/apps/firefox.png @@ -1402,6 +1421,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Thu Feb 08 2023 hanshuang - 102.3.0-6.0.2 +- fix an7 compile problem + * Tue Oct 11 2022 Liwei Ge - 102.3.0-6.0.1 - Rebrand to Anolis - Cherry-pick [e307bab] -- Gitee