public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] epel9-next: - Fix FTBFS with old system ffmpeg 5.1.4 on el9
@ 2026-08-07 16:09 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-08-07 16:09 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/chromium
            Branch : epel9-next
            Commit : 435e010e0e44cc43ecc32e1a0a56487c7c13029e
            Author : Than Ngo <than@redhat.com>
            Date   : 2026-05-08T11:00:37+02:00
            Stats  : +143/-3 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/chromium/c/435e010e0e44cc43ecc32e1a0a56487c7c13029e?branch=epel9-next

            Log:
            - Fix FTBFS with old system ffmpeg 5.1.4 on el9
- Fix FTBFS with old python-3.9 on el9
- Fix FTBFS with old rust compiler 1.88 on el9
- Update download python script to remove bundle binary
- Fix FTBFS caused by gperf on ppc64le and aarch64

---
diff --git a/chromium-148-el9-ffmpeg-build-error.patch b/chromium-148-el9-ffmpeg-build-error.patch
new file mode 100644
index 0000000..9f25c5e
--- /dev/null
+++ b/chromium-148-el9-ffmpeg-build-error.patch
@@ -0,0 +1,24 @@
+FIx build error with system ffmpeg-5.1.4 on el9:
+
+../../media/ffmpeg/ffmpeg_common.cc:1008:10: error: use of undeclared identifier 'AV_CH_LAYOUT_5POINT1POINT4_BACK'
+ 1008 |     case AV_CH_LAYOUT_5POINT1POINT4_BACK:
+      |          ^
+../../media/ffmpeg/ffmpeg_common.cc:1010:10: error: use of undeclared identifier 'AV_CH_LAYOUT_7POINT1POINT4_BACK'
+ 1010 |     case AV_CH_LAYOUT_7POINT1POINT4_BACK:
+
+diff -up chromium-148.0.7778.96/media/ffmpeg/ffmpeg_common.cc.me chromium-148.0.7778.96/media/ffmpeg/ffmpeg_common.cc
+--- chromium-148.0.7778.96/media/ffmpeg/ffmpeg_common.cc.me	2026-05-08 09:06:12.206525759 +0200
++++ chromium-148.0.7778.96/media/ffmpeg/ffmpeg_common.cc	2026-05-08 09:15:14.258873177 +0200
+@@ -1005,10 +1005,12 @@ ChannelLayout ChannelLayoutToChromeChann
+     case AV_CH_FRONT_LEFT | AV_CH_FRONT_RIGHT | AV_CH_LOW_FREQUENCY |
+         AV_CH_BACK_CENTER:
+       return CHANNEL_LAYOUT_3_1_BACK;
++#if LIBAVCODEC_VERSION_MAJOR < 59
+     case AV_CH_LAYOUT_5POINT1POINT4_BACK:
+       return CHANNEL_LAYOUT_5_1_4;
+     case AV_CH_LAYOUT_7POINT1POINT4_BACK:
+       return CHANNEL_LAYOUT_7_1_4;
++#endif
+     default:
+       // FFmpeg channel_layout is 0 for .wav and .mp3.  Attempt to guess layout
+       // based on the channel count.

diff --git a/chromium-148-el9-python-3.9-build-error.patch b/chromium-148-el9-python-3.9-build-error.patch
new file mode 100644
index 0000000..fed001f
--- /dev/null
+++ b/chromium-148-el9-python-3.9-build-error.patch
@@ -0,0 +1,67 @@
+Fix build error caused by python-3.9 (epel9)
+
+  File "/builddir/build/BUILD/chromium-148.0.7778.96/out/Release/../../tools/metrics/histograms/generate_allowlist_from_histograms_file.py", line 13, in <module>
+    import chromium_src.tools.metrics.histograms.extract_histograms as extract_histograms
+  File "/builddir/build/BUILD/chromium-148.0.7778.96/tools/metrics/histograms/extract_histograms.py", line 170, in <module>
+    tree: xml.dom.minidom.Element | xml.dom.minidom.Document,
+TypeError: unsupported operand type(s) for |: 'type' and 'type'
+
+diff -up chromium-148.0.7778.96/tools/metrics/histograms/extract_histograms.py.me chromium-148.0.7778.96/tools/metrics/histograms/extract_histograms.py
+--- chromium-148.0.7778.96/tools/metrics/histograms/extract_histograms.py.me	2026-05-07 20:35:12.049515419 +0200
++++ chromium-148.0.7778.96/tools/metrics/histograms/extract_histograms.py	2026-05-07 20:41:12.264926376 +0200
+@@ -15,6 +15,7 @@ import itertools
+ import logging
+ import re
+ from typing import Optional, TypedDict
++from typing import Dict, List, Tuple, Union
+ import xml.dom.minidom
+ 
+ import setup_modules  # pylint: disable=unused-import
+@@ -167,7 +168,10 @@ def ExpandHistogramNameWithSuffixes(
+ 
+ 
+ def ExtractEnumsFromXmlTree(
+-    tree: xml.dom.minidom.Element | xml.dom.minidom.Document,
++    tree: Union[
++        xml.dom.minidom.Element,
++        xml.dom.minidom.Document,
++    ],
+ ) -> tuple[dict[str, EnumDict], ExtractionErrors]:
+   """Extracts all <enum> nodes in the tree into a dictionary.
+ 
+@@ -497,7 +501,10 @@ def _ExtractVariantNodes(node: xml.dom.m
+ 
+ 
+ def ExtractHistogramsFromXmlTree(
+-    tree: xml.dom.minidom.Element | xml.dom.minidom.Document,
++    tree: Union[
++        xml.dom.minidom.Element,
++        xml.dom.minidom.Document,
++    ],
+     enums: dict[str, EnumDict]
+ ) -> tuple[dict[str, HistogramDict], dict[str, list[TokenDict]],
+            ExtractionErrors]:
+@@ -620,7 +627,10 @@ def ExtractHistogramsFromXmlTree(
+ 
+ 
+ def ExtractVariantsFromXmlTree(
+-    tree: xml.dom.minidom.Element | xml.dom.minidom.Document,
++    tree: Union[
++        xml.dom.minidom.Element,
++        xml.dom.minidom.Document,
++    ],
+ ) -> tuple[dict[str, list[VariantDict]], ExtractionErrors]:
+   """Extracts all <variants> nodes in the tree into a dictionary.
+ 
+@@ -664,7 +674,10 @@ def _GetObsoleteReason(node: xml.dom.min
+ 
+ 
+ def UpdateHistogramsWithSuffixes(
+-    tree: xml.dom.minidom.Element | xml.dom.minidom.Document,
++    tree: Union[
++        xml.dom.minidom.Element,
++        xml.dom.minidom.Document,
++    ],
+     histograms: dict[str, HistogramDict]) -> ExtractionErrors:
+   """Processes <histogram_suffixes> tags and combines with affected histograms.
+ 

diff --git a/chromium-148-el9-rust-1.88-build-error.patch b/chromium-148-el9-rust-1.88-build-error.patch
new file mode 100644
index 0000000..8a50ab8
--- /dev/null
+++ b/chromium-148-el9-rust-1.88-build-error.patch
@@ -0,0 +1,31 @@
+Fix build error with rust-1.88 on el9
+
+error[E0599]: no method named `file_as_c_str` found for reference `&Location<'_>` in the current scope
+   --> ../../base/logging/logger.rs:133:39
+    |
+133 |         info.location().map(|loc| loc.file_as_c_str()).unwrap_or(c"<unknown file>"),
+    |                                       ^^^^^^^^^^^^^ method not found in `&Location<'_>`
+
+diff -up chromium-148.0.7778.96/base/logging/logger.rs.me chromium-148.0.7778.96/base/logging/logger.rs
+--- chromium-148.0.7778.96/base/logging/logger.rs.me	2026-05-07 22:18:41.995966833 +0200
++++ chromium-148.0.7778.96/base/logging/logger.rs	2026-05-07 22:47:11.740773933 +0200
+@@ -128,9 +128,18 @@ mod ffi {
+ }
+ 
+ fn panic_hook(info: &PanicHookInfo<'_>) {
++    let file_storage;
++    let file_name: &CStr = match info.location() {
++        Some(loc) => {
++            file_storage = CString::new(loc.file()).unwrap();
++            file_storage.as_c_str()
++        }
++        None => c"<unknown file>",
++    };
++
+     print_rust_log(
+         &format_args!("{info}"),
+-        info.location().map(|loc| loc.file_as_c_str()).unwrap_or(c"<unknown file>"),
++        file_name,
+         info.location().map(|loc| loc.line()),
+         LOGGING_FATAL,
+         false,

diff --git a/chromium-latest.py b/chromium-latest.py
index c381d7f..a931922 100755
--- a/chromium-latest.py
+++ b/chromium-latest.py
@@ -331,7 +331,8 @@ if __name__ == '__main__':
                  'third_party/enterprise_companion/chromium_mac_amd64',
                  'third_party/enterprise_companion/chromium_mac_arm64',
                  'third_party/enterprise_companion/chromium_win_x86',
-                 'third_party/enterprise_companion/chromium_win_x86_64']
+                 'third_party/enterprise_companion/chromium_win_x86_64',
+                 'third_party/gperf']
     junk_files = ['third_party/node/linux/node-linux-x64.tar.gz',
                   'buildtools/third_party/eu-strip/bin/eu-strip',
                   'buildtools/linux64/gn']

diff --git a/chromium.spec b/chromium.spec
index ad12858..8f8319b 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -329,6 +329,7 @@ Patch97: chromium-141-glibc-2.42-SYS_SECCOMP.patch
 # need for old ffmpeg 5.x on epel9
 Patch128: chromium-138-el9-ffmpeg-deprecated-apis.patch
 Patch129: chromium-el9-ffmpeg-AV_CODEC_FLAG_COPY_OPAQUE.patch
+Patch130: chromium-148-el9-ffmpeg-build-error.patch
 # disable the check
 Patch131: chromium-107-proprietary-codecs.patch
 # fix tab crash with SIGTRAP error when using system ffmpeg
@@ -349,6 +350,11 @@ Patch143: chromium-148-rust-1.88-enable-unstable_features.patch
 Patch144: chromium-146-rust-1.88-undefined-symbol.patch
 Patch145: chromium-148-use-system-rustc.patch
 
+# Fix FTBFS with python-3.9 on el9
+Patch146: chromium-148-el9-python-3.9-build-error.patch
+# Fix FTBFS with rustc-1.88 on el9
+Patch147: chromium-148-el9-rust-1.88-build-error.patch
+
 # add correct path for Qt6Gui header and libs
 Patch150: chromium-124-qt6.patch
 
@@ -1093,6 +1099,7 @@ Qt6 UI for chromium.
 %if 0%{?rhel} == 9
 %patch -P128 -p1 -b .el9-ffmpeg-deprecated-apis
 %patch -P129 -p1 -b .el9-ffmpeg-AV_CODEC_FLAG_COPY_OPAQUE
+%patch -P130 -p1 -b .el9-ffmpeg-build-error
 %patch -P133 -p1 -b .el9-ffmpeg-5.1.x
 %endif
 %patch -P131 -p1 -b .prop-codecs
@@ -1111,6 +1118,12 @@ Qt6 UI for chromium.
 %patch -P144 -p1 -b .rustc-1.88-undefined-symbol
 %endif
 %patch -P145 -p1 -R -b .use-system-rustc
+
+%if 0%{?rhel} == 9
+%patch -P146 -p1 -b .el9-python-3.9-build-error
+%patch -P147 -p1 -b .el9-rust-1.88-build-error
+%endif
+
 %patch -P150 -p1 -b .qt6
 
 %patch -P300 -p1 -b .swiftshader-missing-include
@@ -1224,12 +1237,12 @@ Qt6 UI for chromium.
 # See `man find` for how the `-exec command {} +` syntax works
 find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{chromium_pybin}=' {} +
 
-# unpack rollup binary for aarch64
+# Unpack rollup binary for aarch64
 %ifarch aarch64
 tar xf %{SOURCE14} && mv package third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-arm64-gnu
 %endif
 
-#unpack rollup binary for ppc64le
+# Unpack rollup binary for ppc64le
 %ifarch ppc64le
 tar xf %{SOURCE15} && mv package third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-powerpc64le-gnu
 %endif 
@@ -1254,6 +1267,10 @@ ln -sf ../../%{chromebuilddir}/gn buildtools/linux64/gn
 ln -sf $(which gn) buildtools/linux64/gn
 %endif
 
+# Remove bundle gperf and replace it with system gperf
+mkdir -p third_party/gperf/cipd/bin
+ln -fs $(which gperf) third_party/gperf/cipd/bin/gperf
+
 %if %{bundlelibusbx}
 # no hackity hack hack
 %else

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 16:09 [rpms/chromium] epel9-next: - Fix FTBFS with old system ffmpeg 5.1.4 on el9 Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox