public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Than Ngo <than@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/chromium] epel9-next: - build with system ffmpeg-free and system libaom
Date: Fri, 07 Aug 2026 16:04:22 GMT	[thread overview]
Message-ID: <178611866209.1.17597062547037920365.rpms-chromium-2148ca21fbc9@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/chromium
            Branch : epel9-next
            Commit : 2148ca21fbc9242fb691b3f30232bdc3d239ca12
            Author : Than Ngo <than@redhat.com>
            Date   : 2023-01-04T08:37:42+01:00
            Stats  : +257/-56 in 6 file(s)
            URL    : https://src.fedoraproject.org/rpms/chromium/c/2148ca21fbc9242fb691b3f30232bdc3d239ca12?branch=epel9-next

            Log:
            - build with system ffmpeg-free and system libaom
- fix widewine extension issue
- vaapi, disable UseChromeOSDirectVideoDecoder
- workaround for linking issue in clang <= 14

---
diff --git a/chromium-100.0.4896.60-widevine-other-locations.patch b/chromium-100.0.4896.60-widevine-other-locations.patch
deleted file mode 100644
index a123b27..0000000
--- a/chromium-100.0.4896.60-widevine-other-locations.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up chromium-100.0.4896.60/chrome/common/chrome_paths.cc.widevine-other-locations chromium-100.0.4896.60/chrome/common/chrome_paths.cc
---- chromium-100.0.4896.60/chrome/common/chrome_paths.cc.widevine-other-locations	2022-04-02 15:48:56.944051789 +0000
-+++ chromium-100.0.4896.60/chrome/common/chrome_paths.cc	2022-04-02 15:52:34.825642103 +0000
-@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
- 
- #if BUILDFLAG(ENABLE_WIDEVINE)
-     case chrome::DIR_BUNDLED_WIDEVINE_CDM:
-+      base::PathService::Get(base::DIR_HOME, &cur);
-+      cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdm.so"));
-+      if (base::PathExists(cur)) {
-+        break;
-+      }
-+      // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
-+      if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
-+        cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"));
-+        break;
-+      }
-       if (!GetComponentDirectory(&cur))
-         return false;
-       cur = cur.AppendASCII(kWidevineCdmBaseDirectory);

diff --git a/chromium-108-clang14-c++20-link-error.patch b/chromium-108-clang14-c++20-link-error.patch
new file mode 100644
index 0000000..968aab2
--- /dev/null
+++ b/chromium-108-clang14-c++20-link-error.patch
@@ -0,0 +1,19 @@
+diff -up chromium-108.0.5359.124/build/config/compiler/BUILD.gn.me chromium-108.0.5359.124/build/config/compiler/BUILD.gn
+--- chromium-108.0.5359.124/build/config/compiler/BUILD.gn.me	2023-01-03 21:02:16.602183035 +0100
++++ chromium-108.0.5359.124/build/config/compiler/BUILD.gn	2023-01-03 21:04:11.606320859 +0100
+@@ -589,15 +589,6 @@ config("compiler") {
+       if (is_clang) {
+         cflags_cc += [ "-fno-trigraphs" ]
+       }
+-    } else if (is_linux) {
+-      # TODO(crbug.com/1284275): Switch to C++20 on all platforms.
+-      if (is_clang) {
+-        cflags_cc += [ "-std=${standard_prefix}++20" ]
+-      } else {
+-        # The gcc bots are currently using GCC 9, which is not new enough to
+-        # support "c++20"/"gnu++20".
+-        cflags_cc += [ "-std=${standard_prefix}++2a" ]
+-      }
+     } else {
+       cflags_cc += [ "-std=${standard_prefix}++17" ]
+     }

diff --git a/chromium-108-ffmpeg-first_dts.patch b/chromium-108-ffmpeg-first_dts.patch
new file mode 100644
index 0000000..42b6313
--- /dev/null
+++ b/chromium-108-ffmpeg-first_dts.patch
@@ -0,0 +1,130 @@
+diff -up chromium-108.0.5359.124/AUTHORS.first_dts chromium-108.0.5359.124/AUTHORS
+--- chromium-108.0.5359.124/AUTHORS.first_dts	2022-12-31 15:30:52.923006393 +0100
++++ chromium-108.0.5359.124/AUTHORS	2022-12-31 15:32:50.431215836 +0100
+@@ -97,6 +97,7 @@ Andra Paraschiv <andra.paraschiv@intel.c
+ Andras Tokodi <a.tokodi@eyeo.com>
+ Andreas Nazlidis <andreas221b@gmail.com>
+ Andreas Papacharalampous <andreas@apap04.com>
++Andreas Schneider <asn@cryptomilk.org>
+ Andrei Borza <andrei.borza@gmail.com>
+ Andrei Parvu <andrei.prv@gmail.com>
+ Andrei Parvu <parvu@adobe.com>
+diff -up chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.cc.first_dts chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.cc
+--- chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.cc.first_dts	2022-12-14 01:39:52.000000000 +0100
++++ chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.cc	2022-12-31 15:30:52.923006393 +0100
+@@ -58,7 +58,7 @@ namespace media {
+ 
+ namespace {
+ 
+-constexpr int64_t kInvalidPTSMarker = static_cast<int64_t>(0x8000000000000000);
++constexpr int64_t kRelativeTsBase = static_cast<int64_t>(0x7ffeffffffffffff);
+ 
+ void SetAVStreamDiscard(AVStream* stream, AVDiscard discard) {
+   DCHECK(stream);
+@@ -91,7 +91,7 @@ static base::TimeDelta FramesToTimeDelta
+                             sample_rate);
+ }
+ 
+-static base::TimeDelta ExtractStartTime(AVStream* stream) {
++static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
+   // The default start time is zero.
+   base::TimeDelta start_time;
+ 
+@@ -101,12 +101,12 @@ static base::TimeDelta ExtractStartTime(
+ 
+   // Next try to use the first DTS value, for codecs where we know PTS == DTS
+   // (excludes all H26x codecs). The start time must be returned in PTS.
+-  if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
++  if (first_dts != AV_NOPTS_VALUE &&
+       stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
+       stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
+       stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
+     const base::TimeDelta first_pts =
+-        ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
++        ConvertFromTimeBase(stream->time_base, first_dts);
+     if (first_pts < start_time)
+       start_time = first_pts;
+   }
+@@ -275,6 +275,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream
+       fixup_negative_timestamps_(false),
+       fixup_chained_ogg_(false),
+       num_discarded_packet_warnings_(0),
++      first_dts_(AV_NOPTS_VALUE),
+       last_packet_pos_(AV_NOPTS_VALUE),
+       last_packet_dts_(AV_NOPTS_VALUE) {
+   DCHECK(demuxer_);
+@@ -341,6 +342,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+   int64_t packet_dts =
+       packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
+ 
++  if (first_dts_ == AV_NOPTS_VALUE && packet->dts != AV_NOPTS_VALUE &&
++      last_packet_dts_ != AV_NOPTS_VALUE) {
++    first_dts_ = packet->dts - (last_packet_dts_ + kRelativeTsBase);
++  }
++
+   // Chained ogg files have non-monotonically increasing position and time stamp
+   // values, which prevents us from using them to determine if a packet should
+   // be dropped. Since chained ogg is only allowed on single track audio only
+@@ -683,6 +689,7 @@ void FFmpegDemuxerStream::FlushBuffers(b
+   ResetBitstreamConverter();
+ 
+   if (!preserve_packet_position) {
++    first_dts_ = AV_NOPTS_VALUE;
+     last_packet_pos_ = AV_NOPTS_VALUE;
+     last_packet_dts_ = AV_NOPTS_VALUE;
+   }
+@@ -1434,7 +1441,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone
+ 
+     max_duration = std::max(max_duration, streams_[i]->duration());
+ 
+-    base::TimeDelta start_time = ExtractStartTime(stream);
++    base::TimeDelta start_time =
++        ExtractStartTime(stream, streams_[i]->first_dts());
+ 
+     // Note: This value is used for seeking, so we must take the true value and
+     // not the one possibly clamped to zero below.
+@@ -1591,7 +1599,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find
+   for (const auto& stream : streams_) {
+     if (!stream || stream->IsEnabled() != enabled)
+       continue;
+-    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
++    if (stream->first_dts() == AV_NOPTS_VALUE)
+       continue;
+     if (!lowest_start_time_stream ||
+         stream->start_time() < lowest_start_time_stream->start_time()) {
+@@ -1612,7 +1620,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find
+     if (stream->type() != DemuxerStream::VIDEO)
+       continue;
+ 
+-    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
++    if (stream->first_dts() == AV_NOPTS_VALUE)
+       continue;
+ 
+     if (!stream->IsEnabled())
+@@ -1926,4 +1934,4 @@ void FFmpegDemuxer::RunPendingSeekCB(Pip
+   std::move(pending_seek_cb_).Run(status);
+ }
+ 
+-}  // namespace media
++}  // namespace media
+\ Kein Zeilenumbruch am Dateiende.
+diff -up chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.h.first_dts chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.h
+--- chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.h.first_dts	2022-12-14 01:39:52.000000000 +0100
++++ chromium-108.0.5359.124/media/filters/ffmpeg_demuxer.h	2022-12-31 15:30:52.924006403 +0100
+@@ -145,6 +145,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream :
+   base::TimeDelta start_time() const { return start_time_; }
+   void set_start_time(base::TimeDelta time) { start_time_ = time; }
+ 
++  int64_t first_dts() const { return first_dts_; }
++
+  private:
+   friend class FFmpegDemuxerTest;
+ 
+@@ -202,6 +204,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream :
+   bool fixup_chained_ogg_;
+ 
+   int num_discarded_packet_warnings_;
++  int64_t first_dts_;
+   int64_t last_packet_pos_;
+   int64_t last_packet_dts_;
+ };

diff --git a/chromium-108-widevine-other-locations.patch b/chromium-108-widevine-other-locations.patch
new file mode 100644
index 0000000..5a29089
--- /dev/null
+++ b/chromium-108-widevine-other-locations.patch
@@ -0,0 +1,32 @@
+diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations chromium-108.0.5359.124/chrome/common/chrome_paths.cc
+--- chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations	2023-01-02 11:10:03.951330305 +0100
++++ chromium-108.0.5359.124/chrome/common/chrome_paths.cc	2023-01-02 13:42:26.781022150 +0100
+@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
+ 
+ #if BUILDFLAG(ENABLE_WIDEVINE)
+     case chrome::DIR_BUNDLED_WIDEVINE_CDM:
++      base::PathService::Get(base::DIR_HOME, &cur);
++      cur = cur.Append(FILE_PATH_LITERAL(".config/chromium/WidevineCdm"));
++      if (base::PathExists(cur)) {
++        break;
++      }
++      // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
++      if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
++        cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm"));
++        break;
++      }
+       if (!GetComponentDirectory(&cur))
+         return false;
+       cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
+diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn
+--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations	2023-01-02 11:10:45.953114153 +0100
++++ chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn	2023-01-02 11:10:45.953114153 +0100
+@@ -22,7 +22,7 @@ buildflag_header("buildflags") {
+ 
+   flags = [
+     "ENABLE_WIDEVINE=$enable_widevine",
+-    "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
++    "BUNDLE_WIDEVINE_CDM=true",
+     "ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
+     "ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm",
+   ]

diff --git a/chromium-browser.sh b/chromium-browser.sh
index 18dfca1..fcb81a3 100755
--- a/chromium-browser.sh
+++ b/chromium-browser.sh
@@ -48,6 +48,7 @@ CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
                         --enable-printing \
                         --enable-gpu-rasterization \
                         --enable-sync \
+                        --disable-features=AudioServiceSandbox,UseChromeOSDirectVideoDecoder \
                         --auto-ssl-client-auth @@EXTRA_FLAGS@@"
 
 # This provides a much better experience on Wayland.

diff --git a/chromium.spec b/chromium.spec
index 2f77de3..51ad22b 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -7,7 +7,7 @@
 
 # This flag is so I can build things very fast on a giant system.
 # Enabling this in koji causes aarch64 builds to timeout indefinitely.
-%global use_all_cpus 0
+%global use_all_cpus 1
 
 %if %{use_all_cpus}
 %global numjobs %{_smp_build_ncpus}
@@ -112,9 +112,6 @@
 # enable system brotli
 %global bundlebrotli 0
 
-# set bundleffmpeg 0 to enable system ffmpeg-free
-%global bundleffmpeg 1
-
 %if 0
 # Chromium's fork of ICU is now something we can't unbundle.
 # This is left here to ease the change if that ever switches.
@@ -158,6 +155,8 @@ BuildRequires: libicu-devel >= 5.4
 %global bundlefreetype 1
 %global bundlelibdrm 1
 %global bundlefontconfig 1
+%global bundleffmpegfree 1
+%global bundlelibaom 1
 %else
 # Chromium really wants to use its bundled harfbuzz. Sigh.
 %global bundleharfbuzz 1
@@ -170,6 +169,8 @@ BuildRequires: libicu-devel >= 5.4
 %global bundlefreetype 1
 %global bundlelibdrm 0
 %global bundlefontconfig 0
+%global bundleffmpegfree 0
+%global bundlelibaom 0
 %endif
 
 ### From 2013 until early 2021, Google permitted distribution builds of
@@ -207,7 +208,7 @@ BuildRequires: libicu-devel >= 5.4
 
 Name:	chromium%{chromium_channel}
 Version: 108.0.5359.124
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
 Url: http://www.chromium.org/Home
 License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
@@ -235,13 +236,16 @@ Patch6: chromium-108-norar.patch
 Patch7: chromium-71.0.3578.98-widevine-r3.patch
 
 # Try to load widevine from other places
-Patch8: chromium-100.0.4896.60-widevine-other-locations.patch
+Patch8: chromium-108-widevine-other-locations.patch
+
+# Do not download proprietary widevine module in the background (thanks Debian)
+Patch9: chromium-99.0.4844.51-widevine-no-download.patch
 
 # Tell bootstrap.py to always use the version of Python we specify
 Patch11: chromium-93.0.4577.63-py3-bootstrap.patch
 
 # Add "Fedora" to the user agent string
-Patch12:	chromium-101.0.4951.41-fedora-user-agent.patch
+Patch12: chromium-101.0.4951.41-fedora-user-agent.patch
 
 # Needs to be submitted..
 Patch51:	chromium-96.0.4664.45-gcc-remoting-constexpr.patch
@@ -280,9 +284,6 @@ Patch69:	chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch
 # Update six to 1.16.0
 Patch70:	chromium-105.0.5195.52-python-six-1.16.0.patch
 
-# Do not download proprietary widevine module in the background (thanks Debian)
-Patch79:	chromium-99.0.4844.51-widevine-no-download.patch
-
 # Fix crashes with components/cast_*
 # Thanks to Gentoo
 Patch80:	chromium-108-EnumTable-crash.patch
@@ -358,6 +359,11 @@ Patch113: chromium-107.0.5304.110-cstring-memset.patch
 # system ffmpeg
 Patch114: chromium-107-ffmpeg-duration.patch
 Patch115: chromium-107-proprietary-codecs.patch
+Patch116: chromium-108-ffmpeg-first_dts.patch
+
+# clang =< 14 and C++20, linker errors std::u16string
+# build failure on rhel
+Patch120: chromium-108-clang14-c++20-link-error.patch
 
 # VAAPI
 # Upstream turned VAAPI on in Linux in 86
@@ -373,18 +379,19 @@ Patch300: chromium-99.0.4844.51-rhel8-force-disable-use_gnome_keyring.patch
 # For Chromium Fedora use chromium-latest.py --stable --ffmpegclean --ffmpegarm
 # If you want to include the ffmpeg arm sources append the --ffmpegarm switch
 # https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz
-Source0:	chromium-%{version}-clean.tar.xz
-Source3:	chromium-browser.sh
-Source4:	%{chromium_browser_channel}.desktop
+Source0: chromium-%{version}-clean.tar.xz
+Source1: README.fedora
+Source3: chromium-browser.sh
+Source4: %{chromium_browser_channel}.desktop
 # Also, only used if you want to reproduce the clean tarball.
-Source5:	clean_ffmpeg.sh
-Source6:	chromium-latest.py
-Source7:	get_free_ffmpeg_source_files.py
+Source5: clean_ffmpeg.sh
+Source6: chromium-latest.py
+Source7: get_free_ffmpeg_source_files.py
 # Get the names of all tests (gtests) for Linux
 # Usage: get_linux_tests_name.py chromium-%%{version} --spec
-Source8:	get_linux_tests_names.py
+Source8: get_linux_tests_names.py
 # GNOME stuff
-Source9:	chromium-browser.xml
+Source9: chromium-browser.xml
 Source11: chrome-remote-desktop@.service
 Source13: master_preferences
 
@@ -426,15 +433,18 @@ BuildRequires: binutils
 %endif
 
 # build with system ffmpeg-free
-%if 0%{?bundleffmpeg}
-# nothing
-%else
+%if ! 0%{?bundleffmpegfree}
 BuildRequires: pkgconfig(libavcodec)
 BuildRequires: pkgconfig(libavfilter)
 BuildRequires: pkgconfig(libavformat)
 BuildRequires: pkgconfig(libavutil)
 %endif
 
+# build with system libaom
+%if ! 0%{?bundlelibaom}
+BuildRequires: libaom-devel
+%endif
+
 BuildRequires:	alsa-lib-devel
 BuildRequires:	atk-devel
 BuildRequires:	bison
@@ -448,9 +458,7 @@ BuildRequires:	glib2-devel
 BuildRequires:	glibc-devel
 BuildRequires:	gperf
 
-%if 0%{?bundleharfbuzz}
-#nothing
-%else
+%if ! 0%{?bundleharfbuzz}
 BuildRequires:	harfbuzz-devel >= 2.4.0
 %endif
 
@@ -458,9 +466,7 @@ BuildRequires: libatomic
 BuildRequires:	libcap-devel
 BuildRequires:	libcurl-devel
 
-%if 0%{?bundlelibdrm}
-#nothing
-%else
+%if ! 0%{?bundlelibdrm}
 BuildRequires:	libdrm-devel
 %endif
 
@@ -741,10 +747,14 @@ Provides: bundled(expat) = 2.2.0
 Provides: bundled(fdmlibm) = 5.3
 
 # Don't get too excited. MPEG and other legally problematic stuff is stripped out.
-%if %{?bundleffmpeg}
+%if %{?bundleffmpegfree}
 Provides: bundled(ffmpeg) = 5.1.2
 %endif
 
+%if 0%{?bundlelibaom}
+Provides: bundled(libaom)
+%endif
+
 Provides: bundled(fips181) = 2.2.3
 
 %if 0%{?bundlefontconfig}
@@ -924,6 +934,7 @@ udev.
 %patch6 -p1 -b .nounrar
 %patch7 -p1 -b .widevine-hack
 %patch8 -p1 -b .widevine-other-locations
+%patch9 -p1 -b .widevine-no-download
 %patch11 -p1 -b .py3
 
 # Short term fixes (usually gcc and backports)
@@ -946,7 +957,6 @@ udev.
 %patch68 -p1 -b .i686-textrels
 %patch69 -p1 -b .update-rjsmin-to-1.2.0
 %patch70 -p1 -b .update-six-to-1.16.0
-%patch79 -p1 -b .widevine-no-download
 %patch80 -p1 -b .EnumTable-crash
 %patch82 -p1 -b .remoting-no-tests
 %patch84 -p1 -b .remoting-missing-cmath-header
@@ -979,9 +989,10 @@ udev.
 
 %patch113 -p1 -b .memset
 
-%if ! 0%{?bundleffmpeg}
+%if ! 0%{?bundleffmpegfree}
 %patch114 -p1 -b .system-ffmppeg
 %patch115 -p1 -b .prop-codecs
+%patch116 -p1 -b .first_dts
 %endif
 
 # EPEL specific patches
@@ -999,6 +1010,10 @@ udev.
 %patch110 -p1 -b .el8-aarch64-libpng16-symbol-prefixes
 %endif
 
+%if 0%{?rhel}
+%patch120 -p1 -b .link-error-clang14
+%endif
+
 # Feature specific patches
 %if %{use_vaapi}
 %patch202 -p1 -b .accel-mjpeg
@@ -1177,18 +1192,22 @@ CHROMIUM_CORE_GN_DEFINES+=' host_toolchain="//build/toolchain/linux/unbundle:def
 CHROMIUM_CORE_GN_DEFINES+=' is_debug=false dcheck_always_on=false dcheck_is_configurable=false'
 CHROMIUM_CORE_GN_DEFINES+=' use_goma=false'
 CHROMIUM_CORE_GN_DEFINES+=' system_libdir="%{_lib}"'
+
 %if %{official_build}
 CHROMIUM_CORE_GN_DEFINES+=' is_official_build=true use_thin_lto=false is_cfi=false chrome_pgo_phase=0 use_debug_fission=true'
 sed -i 's|OFFICIAL_BUILD|GOOGLE_CHROME_BUILD|g' tools/generate_shim_headers/generate_shim_headers.py
 # Too much debuginfo
 sed -i 's|-g2|-g0|g' build/config/compiler/BUILD.gn
 %endif
+
 %if %{useapikey}
 CHROMIUM_CORE_GN_DEFINES+=' google_api_key="%{api_key}"'
 %endif
+
 %if %{userestrictedapikeys}
 CHROMIUM_CORE_GN_DEFINES+=' google_default_client_id="%{default_client_id}" google_default_client_secret="%{default_client_secret}"'
 %endif
+
 %if %{?clang}
   CHROMIUM_CORE_GN_DEFINES+=' is_clang=true'
   CHROMIUM_CORE_GN_DEFINES+=' clang_base_path="%{_prefix}"'
@@ -1198,13 +1217,23 @@ CHROMIUM_CORE_GN_DEFINES+=' google_default_client_id="%{default_client_id}" goog
   CHROMIUM_CORE_GN_DEFINES+=' is_clang=false'
   CHROMIUM_CORE_GN_DEFINES+=' use_lld=false'
 %endif
+
 CHROMIUM_CORE_GN_DEFINES+=' use_sysroot=false disable_fieldtrial_testing_config=true rtc_enable_symbol_export=true'
+
 %if %{use_gold}
 CHROMIUM_CORE_GN_DEFINES+=' use_gold=true'
 %else
 CHROMIUM_CORE_GN_DEFINES+=' use_gold=false'
 %endif
-CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=false'
+
+# if systemwide ffmpeg free is used, the proprietary codecs can be set to true to load the codecs from ffmpeg-free
+# the codecs computation is passed to ffmpeg-free in this case
+%if ! %{?bundleffmpegfree}
+CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="Chrome" proprietary_codecs=true is_component_ffmpeg=true'
+%else
+CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=false is_component_ffmpeg=false'
+%endif
+
 CHROMIUM_CORE_GN_DEFINES+=' media_use_openh264=false'
 CHROMIUM_CORE_GN_DEFINES+=' rtc_use_h264=false'
 CHROMIUM_CORE_GN_DEFINES+=' treat_warnings_as_errors=false'
@@ -1236,8 +1265,6 @@ export CHROMIUM_CORE_GN_DEFINES
 CHROMIUM_BROWSER_GN_DEFINES=""
 CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true icu_use_data_file=true'
 CHROMIUM_BROWSER_GN_DEFINES+=' enable_nacl=false'
-CHROMIUM_BROWSER_GN_DEFINES+=' is_component_ffmpeg=false'
-CHROMIUM_BROWSER_GN_DEFINES+=' is_component_build=false'
 CHROMIUM_BROWSER_GN_DEFINES+=' blink_symbol_level=0 enable_hangout_services_extension=true'
 CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true'
 CHROMIUM_BROWSER_GN_DEFINES+=' enable_widevine=true'
@@ -1267,13 +1294,16 @@ CHROMIUM_HEADLESS_GN_DEFINES+=' use_pulseaudio=false use_udev=false use_gtk=fals
 export CHROMIUM_HEADLESS_GN_DEFINES
 
 build/linux/unbundle/replace_gn_files.py --system-libraries \
+%if ! 0%{?bundlelibaom}
+	libaom \
+%endif
 %if ! 0%{?bundlebrotli}
 	brotli \
 %endif
 %if ! 0%{?bundlefontconfig}
 	fontconfig \
 %endif
-%if ! 0%{?bundleffmpeg}
+%if ! 0%{?bundleffmpegfree}
 	ffmpeg \
 %endif
 %if ! 0%{?bundlefreetype}
@@ -1534,6 +1564,9 @@ appstream-util validate-relax --nonet ${RPM_BUILD_ROOT}%{_datadir}/metainfo/%{ch
 mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps/
 cp -a %{SOURCE9} %{buildroot}%{_datadir}/gnome-control-center/default-apps/
 
+# README.fedora
+cp %{SOURCE1} .
+
 %post
 # Set SELinux labels - semanage itself will adjust the lib directory naming
 # But only do it when selinux is enabled, otherwise, it gets noisy.
@@ -1568,7 +1601,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
 %endif
 
 %files
-%doc AUTHORS
+%doc AUTHORS README.fedora
 %doc chrome_policy_list.html *.json
 %license LICENSE
 %config %{_sysconfdir}/%{name}/
@@ -1576,7 +1609,6 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
 %exclude %{_sysconfdir}/%{name}/native-messaging-hosts/*
 %endif
 %{_bindir}/%{chromium_browser_channel}
-%dir %{chromium_path}
 %{chromium_path}/*.bin
 %{chromium_path}/chrome_*.pak
 %{chromium_path}/chrome_crashpad_handler
@@ -1609,6 +1641,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
 %{chromium_path}/libvulkan.so*
 %{chromium_path}/vk_swiftshader_icd.json
 %endif
+%dir %{chromium_path}/
 %dir %{chromium_path}/locales/
 %lang(af) %{chromium_path}/locales/af.pak
 %lang(am) %{chromium_path}/locales/am.pak
@@ -1705,6 +1738,12 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
 %{chromium_path}/chromedriver
 
 %changelog
+* Wed Jan 04 2023 Than Ngo <than@redhat.com> - 108.0.5359.124-3
+- build with system ffmpeg-free and system libaom
+- fix widewine extension issue
+- vaapi, disable UseChromeOSDirectVideoDecoder
+- workaround for linking issue in clang <= 14
+
 * Sun Jan  1 2023 Tom Callaway <spot@fedoraproject.org> - 108.0.5359.124-2
 - turn headless back on (chrome-remote-desktop will stay off, probably forever)
 

                 reply	other threads:[~2026-08-07 16:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178611866209.1.17597062547037920365.rpms-chromium-2148ca21fbc9@fedoraproject.org \
    --to=than@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox