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: Allow users to override command-line options
Date: Fri, 07 Aug 2026 16:04:25 GMT	[thread overview]
Message-ID: <178611866589.1.6281375749354973972.rpms-chromium-693308c0faa4@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/chromium
Branch : epel9-next
Commit : 693308c0faa46ec3ad09865c1c92024ff559732c
Author : Than Ngo <than@redhat.com>
Date   : 2023-01-12T14:42:18+01:00
Stats  : +16/-8 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/chromium/c/693308c0faa46ec3ad09865c1c92024ff559732c?branch=epel9-next

Log:
Allow users to override command-line options

---
diff --git a/chromium-browser.sh b/chromium-browser.sh
index 7e077dc..a67c2a9 100755
--- a/chromium-browser.sh
+++ b/chromium-browser.sh
@@ -39,6 +39,11 @@ export CHROME_VERSION_EXTRA="Built from source for @@BUILD_TARGET@@"
 # We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
 export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
 
+# Allow users to override command-line options and prefer user defined
+# CHROMIUM_USER_FLAGS from env over system wide CHROMIUM_FLAGS
+[[ -f /etc/chromium/chromium.conf ]] && . /etc/chromium/chromium.conf
+CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}
+
 CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
                         --enable-extensions \
                         --enable-user-scripts \
@@ -49,9 +54,4 @@ CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
                         --enable-features=VaapiVideoDecoder,VaapiVideoEncoder \
                         --auto-ssl-client-auth @@EXTRA_FLAGS@@"
 
-# This provides a much better experience on Wayland.
-if [ "$XDG_SESSION_TYPE" == "wayland" ] || [[ $WAYLAND_DISPLAY ]] ; then
-  CHROMIUM_DISTRO_FLAGS="--ozone-platform=wayland $CHROMIUM_DISTRO_FLAGS"
-fi
-
-exec -a "$0" "$HERE/@@CHROMIUM_BROWSER_CHANNEL@@" $CHROMIUM_DISTRO_FLAGS "$@"
+exec -a "$0" "$HERE/@@CHROMIUM_BROWSER_CHANNEL@@" $CHROMIUM_FLAGS $CHROMIUM_DISTRO_FLAGS "$@"

diff --git a/chromium.conf b/chromium.conf
new file mode 100644
index 0000000..ef74e36
--- /dev/null
+++ b/chromium.conf
@@ -0,0 +1,3 @@
+# system wide chromium flags
+
+# CHROMIUM_FLAGS="--ozone-platform=x11 --use-gl=egl"

diff --git a/chromium.spec b/chromium.spec
index 02b5f3d..b351b5f 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -13,7 +13,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 1
+%global use_all_cpus 0
 
 %if %{use_all_cpus}
 %global numjobs %{_smp_build_ncpus}
@@ -30,7 +30,7 @@
 	ninja -j %{numjobs} -C '%1' '%2'
 
 # enable|disable headless client build
-%global build_headless 0
+%global build_headless 1
 
 # enable|disable chrome-remote-desktop build
 %global build_remoting 0
@@ -381,6 +381,7 @@ Patch300: chromium-99.0.4844.51-rhel8-force-disable-use_gnome_keyring.patch
 # https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz
 Source0: chromium-%{version}-clean.tar.xz
 Source1: README.fedora
+Source2: chromium.conf
 Source3: chromium-browser.sh
 Source4: %{chromium_browser_channel}.desktop
 # Also, only used if you want to reproduce the clean tarball.
@@ -1568,6 +1569,9 @@ cp -a chrome/app/theme/chromium/product_logo_24.png %{buildroot}%{_datadir}/icon
 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
 install -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/%{name}/
 
+# Install system wide chromium config
+install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/
+
 mkdir -p %{buildroot}%{_datadir}/applications/
 desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE4}
 
@@ -1619,6 +1623,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
 %doc chrome_policy_list.html *.json
 %license LICENSE
 %config %{_sysconfdir}/%{name}/
+%config(noreplace) %{_sysconfdir}/%{name}/chromium.conf
 %if %{build_remoting}
 %exclude %{_sysconfdir}/%{name}/native-messaging-hosts/*
 %endif

                 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=178611866589.1.6281375749354973972.rpms-chromium-693308c0faa4@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