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

            A new commit has been pushed.

            Repo   : rpms/chromium
            Branch : epel9-next
            Commit : c7486d096fe3a1ca8ed8015340f7a4712ab8fe45
            Author : Than Ngo <than@redhat.com>
            Date   : 2026-04-26T16:27:06+02:00
            Stats  : +173/-3 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/chromium/c/c7486d096fe3a1ca8ed8015340f7a4712ab8fe45?branch=epel9-next

            Log:
            - Fix FTBFS with rust 1.95
- Backport the upstream fix GL native pixmap import support reset in GpuInit

---
diff --git a/chromium-147-Fix_GL_native_pixmap_import_support_reset_in_GpuInit.patch b/chromium-147-Fix_GL_native_pixmap_import_support_reset_in_GpuInit.patch
new file mode 100644
index 0000000..ac8c4d3
--- /dev/null
+++ b/chromium-147-Fix_GL_native_pixmap_import_support_reset_in_GpuInit.patch
@@ -0,0 +1,75 @@
+commit 268a4c1538bcc5ef3ac0c07db2f69bd540db5182
+Author: Saifuddin Hitawala <hitawala@chromium.org>
+Date:   Wed Apr 22 11:36:01 2026 -0700
+
+    [gpu] Fix GL native pixmap import support reset in GpuInit
+    
+    In GpuInit::InitializeAndStartSandbox(), the support for GL native
+    pixmap import was being set on gpu_feature_info_ before being
+    overwritten by ComputeGpuFeatureInfo(). This caused these flags to
+    be reset to false, leading to media pipeline failures on certain
+    Wayland configurations.
+    
+    This CL fixes the issue by moving setting of these flags after the
+    block where gpu_feature_info_ is written by ComputeGpuFeatureInfo().
+    
+    Bug: 501115509
+    Change-Id: I9e18eacf949a2377dd98a2cce9cd43e0ae7cc2a5
+    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7776335
+    Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
+    Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
+    Reviewed-by: Mingjing Zhang <mjzhang@chromium.org>
+    Cr-Commit-Position: refs/heads/main@{#1618991}
+
+diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
+index be3a16015aad2..b9f71281c639f 100644
+--- a/gpu/ipc/service/gpu_init.cc
++++ b/gpu/ipc/service/gpu_init.cc
+@@ -827,23 +827,6 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
+     }
+   }
+ 
+-#if BUILDFLAG(IS_OZONE)
+-  // We need to get supported formats before sandboxing to avoid an known
+-  // issue which breaks the camera preview. (b/166850715)
+-  {
+-    TRACE_EVENT("gpu,startup", "ui::ozone::IsFormatSupportedForTexturing");
+-    auto* surface_factory =
+-        ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone();
+-    auto* gl_ozone = surface_factory->GetCurrentGLOzone();
+-    if (gl_ozone) {
+-      gpu_feature_info_.supports_nv12_gl_native_pixmap =
+-          gl_ozone->CanImportNativePixmap(viz::MultiPlaneFormat::kNV12);
+-      gpu_feature_info_.supports_p010_gl_native_pixmap =
+-          gl_ozone->CanImportNativePixmap(viz::MultiPlaneFormat::kP010);
+-    }
+-  }
+-#endif  // BUILDFLAG(IS_OZONE)
+-
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   // Driver may create a compatibility profile context when collect graphics
+   // information on Linux platform. Try to collect graphics information
+@@ -866,6 +849,23 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
+   }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
++#if BUILDFLAG(IS_OZONE)
++  // We need to get supported formats before sandboxing to avoid an known
++  // issue which breaks the camera preview. (b/166850715)
++  {
++    TRACE_EVENT("gpu,startup", "ui::ozone::CanImportNativePixmap");
++    auto* surface_factory =
++        ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone();
++    auto* gl_ozone = surface_factory->GetCurrentGLOzone();
++    if (gl_ozone) {
++      gpu_feature_info_.supports_nv12_gl_native_pixmap =
++          gl_ozone->CanImportNativePixmap(viz::MultiPlaneFormat::kNV12);
++      gpu_feature_info_.supports_p010_gl_native_pixmap =
++          gl_ozone->CanImportNativePixmap(viz::MultiPlaneFormat::kP010);
++    }
++  }
++#endif  // BUILDFLAG(IS_OZONE)
++
+   if (gl_use_swiftshader_) {
+     AdjustInfoToSwiftShader();
+   }

diff --git a/chromium-147-rustc-1.95.patch b/chromium-147-rustc-1.95.patch
new file mode 100644
index 0000000..abee7b5
--- /dev/null
+++ b/chromium-147-rustc-1.95.patch
@@ -0,0 +1,81 @@
+Fix build error with rustc 1.95 in f45
+
+error[E0425]: cannot find type `LaneCount` in module `core::simd`
+   --> ../../third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs:234:15
+    |
+234 |   core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+    |               ^^^^^^^^^ not found in `core::simd`
+error[E0405]: cannot find trait `SupportedLaneCount` in module `core::simd`
+   --> ../../third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs:234:41
+    |
+234 |   core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+    |                                         ^^^^^^^^^^^^^^^^^^ not found in `core::simd`
+error[E0425]: cannot find type `LaneCount` in module `core::simd`
+   --> ../../third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs:155:15
+    |
+155 |   core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+    |               ^^^^^^^^^ not found in `core::simd`
+error[E0405]: cannot find trait `SupportedLaneCount` in module `core::simd`
+   --> ../../third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs:155:41
+    |
+155 |   core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+
+
+diff -up chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs.me chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs
+--- chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs.me	2026-04-26 13:19:28.648591553 +0200
++++ chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/pod.rs	2026-04-26 13:23:22.967926065 +0200
+@@ -143,25 +143,7 @@ impl_unsafe_marker_for_simd!(
+   }
+ );
+ 
+-#[rustversion::before(2026-01-27)] // See https://github.com/Lokathor/bytemuck/issues/343
+ #[cfg(feature = "nightly_portable_simd")]
+-#[cfg_attr(
+-  feature = "nightly_docs",
+-  doc(cfg(feature = "nightly_portable_simd"))
+-)]
+-unsafe impl<T, const N: usize> Pod for core::simd::Simd<T, N>
+-where
+-  T: core::simd::SimdElement + Pod,
+-  core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+-{
+-}
+-
+-#[rustversion::since(2026-01-27)] // See https://github.com/Lokathor/bytemuck/issues/343
+-#[cfg(feature = "nightly_portable_simd")]
+-#[cfg_attr(
+-  feature = "nightly_docs",
+-  doc(cfg(feature = "nightly_portable_simd"))
+-)]
+ unsafe impl<T, const N: usize> Pod for core::simd::Simd<T, N>
+ where
+   T: core::simd::SimdElement + Pod,
+diff -up chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs.me chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs
+--- chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs.me	2026-04-26 12:54:16.801715156 +0200
++++ chromium-147.0.7727.116/third_party/rust/chromium_crates_io/vendor/bytemuck-v1/src/zeroable.rs	2026-04-26 13:23:50.948183197 +0200
+@@ -222,25 +222,7 @@ impl_unsafe_marker_for_simd!(
+     }
+ );
+ 
+-#[rustversion::before(2026-01-27)] // See https://github.com/Lokathor/bytemuck/issues/343
+ #[cfg(feature = "nightly_portable_simd")]
+-#[cfg_attr(
+-  feature = "nightly_docs",
+-  doc(cfg(feature = "nightly_portable_simd"))
+-)]
+-unsafe impl<T, const N: usize> Zeroable for core::simd::Simd<T, N>
+-where
+-  T: core::simd::SimdElement + Zeroable,
+-  core::simd::LaneCount<N>: core::simd::SupportedLaneCount,
+-{
+-}
+-
+-#[rustversion::since(2026-01-27)] // See https://github.com/Lokathor/bytemuck/issues/343
+-#[cfg(feature = "nightly_portable_simd")]
+-#[cfg_attr(
+-  feature = "nightly_docs",
+-  doc(cfg(feature = "nightly_portable_simd"))
+-)]
+ unsafe impl<T, const N: usize> Zeroable for core::simd::Simd<T, N>
+ where
+   T: core::simd::SimdElement + Zeroable,

diff --git a/chromium.spec b/chromium.spec
index a1630c6..7c6f92b 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -263,7 +263,7 @@
 
 Name:	chromium
 Version: 147.0.7727.116
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
 Url: http://www.chromium.org/Home
 License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)
@@ -431,10 +431,13 @@ Patch357: chromium-134-type-mismatch-error.patch
 # set clang_lib path
 Patch358: chromium-144-rust-clanglib.patch
 
+# fix FTBFS with rustc 1.95 on F45
+Patch359: chromium-147-rustc-1.95.patch
+
 # PowerPC64 LE support
 # Timothy Pearson's patchset
 # https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches
-Patch359: add-ppc64-architecture-string.patch
+Patch360: add-ppc64-architecture-string.patch
 Patch361: 0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
 
 Patch376: 0001-third_party-angle-Include-missing-header-cstddef-in-.patch
@@ -503,6 +506,8 @@ Patch511: 0001-fips-disable-options.patch
 %endif
 
 # upstream patches
+# Fix GL native pixmap import support reset in GpuInit
+Patch600: chromium-147-Fix_GL_native_pixmap_import_support_reset_in_GpuInit.patch
 
 # Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
 # http://build.chromium.org/buildbot/official/
@@ -1156,8 +1161,12 @@ Qt6 UI for chromium.
 
 %patch -P358 -p1 -b .rust-clang_lib
 
+%if  0%{?fedora} > 44
+%patch -P359 -p1 -b .ftvfs-with-rustc-1.95
+%endif
+
 %ifarch ppc64le
-%patch -P359 -p1 -b .add-ppc64-architecture-string
+%patch -P360 -p1 -b .add-ppc64-architecture-string
 %patch -P361 -p1 -b .0001-sandbox-Enable-seccomp_bpf-for-ppc64
 %patch -P376 -p1 -b .0001-third_party-angle-Include-missing-header-cstddef-in-
 %patch -P377 -p1 -b .0001-Add-PPC64-support-for-boringssl
@@ -1205,6 +1214,7 @@ Qt6 UI for chromium.
 %endif
 
 # Upstream patches
+%patch -P600 -p1 -b .Fix_GL_native_pixmap_import_support_reset_in_GpuInit
 
 # Change shebang in all relevant files in this directory and all subdirectories
 # See `man find` for how the `-exec command {} +` syntax works
@@ -1857,6 +1867,10 @@ fi
 %endif
 
 %changelog
+* Sun Apr 26 2026 Than Ngo <than@redhat.com> - 147.0.7727.116-2
+- Fix FTBFS with rust 1.95
+- Backport the upstream fix GL native pixmap import support reset in GpuInit
+
 * Thu Apr 23 2026 Than Ngo <than@redhat.com> - 147.0.7727.116-1
 - Update to 147.0.7727.116
   * High CVE-2026-6919: Use after free in DevTools

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

only message in thread, other threads:[~2026-08-07 16:08 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:08 [rpms/chromium] epel9-next: - Fix FTBFS with rust 1.95 Than Ngo

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