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: - Refactor Python script to automate the removal of bundled binaries
Date: Fri, 07 Aug 2026 16:09:00 GMT [thread overview]
Message-ID: <178611894088.1.14823522786000180837.rpms-chromium-45461da0d83f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/chromium
Branch : epel9-next
Commit : 45461da0d83fb2e6ef9f2077cf4b0b7a5b09cafa
Author : Than Ngo <than@redhat.com>
Date : 2026-05-08T16:49:08+02:00
Stats : +154/-32 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/chromium/c/45461da0d83fb2e6ef9f2077cf4b0b7a5b09cafa?branch=epel9-next
Log:
- Refactor Python script to automate the removal of bundled binaries
- Build with wasm rollup (patch from ungoogle chromium)
- Disable chromium's AI model
---
diff --git a/build-with-wasm-rollup.patch b/build-with-wasm-rollup.patch
new file mode 100644
index 0000000..30c5fbc
--- /dev/null
+++ b/build-with-wasm-rollup.patch
@@ -0,0 +1,117 @@
+--- a/third_party/devtools-frontend/src/front_end/Images/BUILD.gn
++++ b/third_party/devtools-frontend/src/front_end/Images/BUILD.gn
+@@ -28,7 +28,7 @@ node_action("generate_css_vars") {
+ }
+
+ node_action("optimize_images") {
+- script = "node_modules/rollup/dist/bin/rollup"
++ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
+
+ _bundled_entrypoint = target_gen_dir + "/Images.prebundle.js"
+ _output_file_location = target_gen_dir + "/Images.js"
+--- a/third_party/devtools-frontend/src/front_end/models/live-metrics/web-vitals-injected/BUILD.gn
++++ b/third_party/devtools-frontend/src/front_end/models/live-metrics/web-vitals-injected/BUILD.gn
+@@ -26,7 +26,7 @@ devtools_module("web-vitals-injected") {
+ }
+
+ node_action("bundled_library") {
+- script = "node_modules/rollup/dist/bin/rollup"
++ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
+
+ _bundled_entrypoint = target_gen_dir + "/web-vitals-injected.js"
+ _output_file_location = target_gen_dir + "/web-vitals-injected.generated.js"
+--- a/third_party/devtools-frontend/src/front_end/panels/recorder/injected/BUILD.gn
++++ b/third_party/devtools-frontend/src/front_end/panels/recorder/injected/BUILD.gn
+@@ -55,7 +55,7 @@ devtools_entrypoint("bundle") {
+ }
+
+ node_action("bundled_library") {
+- script = "node_modules/rollup/dist/bin/rollup"
++ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
+
+ _bundled_entrypoint = target_gen_dir + "/injected.js"
+ _output_file_location = target_gen_dir + "/injected.generated.js"
+--- a/third_party/devtools-frontend/src/inspector_overlay/BUILD.gn
++++ b/third_party/devtools-frontend/src/inspector_overlay/BUILD.gn
+@@ -38,7 +38,7 @@ action("build_inspector_overlay") {
+ "$target_gen_dir/tool_window_controls.css",
+ "$target_gen_dir/main.js",
+ devtools_location_prepend + "inspector_overlay/loadCSS.rollup.js",
+- devtools_location_prepend + "node_modules/rollup/dist/bin/rollup",
++ devtools_location_prepend + "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup",
+ ]
+
+ outputs = [ "$resources_out_dir/main.js" ]
+--- a/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
++++ b/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py
+@@ -56,7 +56,7 @@ def rollup(input_path, output_path, file
+ [devtools_paths.node_path(),
+ devtools_paths.rollup_path()] +
+ ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] +
+- ['--plugin', rollup_plugin, '--plugin', 'terser'],
++ ['--plugin', rollup_plugin, '--plugin', path.join(devtools_paths.node_modules_path(), '@rollup', 'plugin-terser', 'dist', 'cjs', 'index.js')],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True,
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
+@@ -11,7 +11,7 @@ template("bundle") {
+ "You must define the 'entrypoint' for a bundle target")
+
+ node_action(target_name) {
+- script = "scripts/build/esbuild.js"
++ script = "../../node/node_modules/@rollup/wasm-node/dist/bin/rollup"
+ forward_variables_from(invoker,
+ [
+ "visibility",
+@@ -21,27 +21,23 @@ template("bundle") {
+
+ inputs = [
+ invoker.entrypoint,
++ devtools_location_prepend + "scripts/build/rollup.config.mjs",
+ devtools_location_prepend + "scripts/build/devtools_plugin.js",
+ devtools_location_prepend + "scripts/devtools_paths.js",
+ ]
+
+- _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild"
+- if (host_os == "win") {
+- inputs += [ _esbuild + ".exe" ]
+- } else {
+- inputs += [ _esbuild ]
+- }
+-
+ args = [
++ "--config",
++ rebase_path(
++ devtools_location_prepend + "scripts/build/rollup.config.mjs",
++ root_build_dir),
++ "--input",
+ rebase_path(invoker.entrypoint, root_build_dir),
++ "--file",
+ rebase_path(invoker.output_file_location, root_build_dir),
+ "--configSourcemaps",
+ ]
+
+- if (!is_debug) {
+- args += [ "--minify" ]
+- }
+-
+ outputs = [ invoker.output_file_location ]
+ }
+ }
+--- a/third_party/devtools-frontend/src/scripts/devtools_paths.py
++++ b/third_party/devtools-frontend/src/scripts/devtools_paths.py
+@@ -64,8 +64,11 @@ def license_checker_path():
+
+ def rollup_path():
+ return path.join(
+- node_modules_path(),
+- 'rollup',
++ third_party_path(),
++ 'node',
++ 'node_modules',
++ '@rollup',
++ 'wasm-node',
+ 'dist',
+ 'bin',
+ 'rollup',
diff --git a/chromium-latest.py b/chromium-latest.py
index a931922..04a5dd6 100755
--- a/chromium-latest.py
+++ b/chromium-latest.py
@@ -321,18 +321,32 @@ if __name__ == '__main__':
nacl_versions(chromium_version)
if (args.cleansources):
- junk_dirs = ['build/linux/debian_bullseye_amd64-sysroot',
- 'build/linux/debian_bullseye_i386-sysroot',
- 'third_party/node/linux/node-linux-x64',
- 'third_party/rust-toolchain',
- 'third_party/rust-src',
- 'third_party/devtools-frontend/src/third_party/esbuild',
- 'third_party/enterprise_companion/chromium_linux64',
- '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/gperf']
+ junk_dirs = ['build/linux/debian_bullseye_amd64-sysroot/',
+ 'build/linux/debian_bullseye_i386-sysroot/',
+ 'buildtools/linux64/',
+ 'third_party/node/linux/node-linux-x64/',
+ 'third_party/rust-toolchain/',
+ 'third_party/rust-src/',
+ 'third_party/devtools-frontend/src/third_party/esbuild/',
+ 'third_party/devtools-frontend/src/third_party/rollup_libs/',
+ 'third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-x64-gnu/',
+ 'third_party/enterprise_companion/chromium_linux64/',
+ '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_linux64/cipd/',
+ 'third_party/ninja/',
+ 'third_party/openscreen/src/third_party/ninja/',
+ 'third_party/updater/chrome_linux64/',
+ 'third_party/updater/chrome_linux64_sans_iid/cipd/',
+ 'third_party/updater/chromium_linux64/',
+ 'third_party/updater/chromium_linux64_sans_iid/cipd/',
+ 'third_party/dawn/third_party/ninja/',
+ 'third_party/dawn/tools/golang/',
+ 'third_party/depot_tools/external_bin/',
+ 'third_party/libei/cipd/',
+ 'third_party/gperf/cipd/']
junk_files = ['third_party/node/linux/node-linux-x64.tar.gz',
'buildtools/third_party/eu-strip/bin/eu-strip',
'buildtools/linux64/gn']
@@ -369,6 +383,6 @@ if __name__ == '__main__':
if (not args.prep):
print("Compressing cleaned tree, please wait...")
os.chdir(chromium_root_dir)
- os.system("tar --exclude=\\.svn -cf - chromium-%s | xz -6 -T0 -f > %s" % (chromium_version, chromium_clean_xz_file))
+ os.system("tar --exclude=\\.svn -cf - chromium-%s | xz -v -9e -T0 -f > %s" % (chromium_version, chromium_clean_xz_file))
print("Finished!")
diff --git a/chromium.conf b/chromium.conf
index 31173c6..fc4167e 100644
--- a/chromium.conf
+++ b/chromium.conf
@@ -17,7 +17,8 @@ else
NATIVE_WAYLAND=off
fi
-DISABLE_FEATURES="LensOverlay"
+# Disable chromium's AI model
+DISABLE_FEATURES="LensOverlay,OptimizationGuideOnDeviceModel,PromptAPIForGeminiNano,Compose,TabOrganization"
ENABLE_FEATURES="AllowQt"
CHROMIUM_FLAGS=" --enable-chrome-browser-cloud-management"
if [ "$NATIVE_WAYLAND" == "on" ] ; then
diff --git a/chromium.spec b/chromium.spec
index 8f8319b..d243cee 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -517,6 +517,10 @@ Patch510: 0001-Remove-unused-OpenSSL-config.patch
Patch511: 0001-fips-disable-options.patch
%endif
+# Patches from ungoogle chromium, https://github.com/ungoogled-software/ungoogled-chromium
+# remove rollup binary, build with wasm-rollup
+Patch520: build-with-wasm-rollup.patch
+
# upstream patches
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
@@ -551,11 +555,6 @@ Source13: nodejs-sources.sh
BuildRequires: openssl-devel
%endif
-# https://github.com/rollup/rollup/blob/master/LICENSE-CORE.md
-# third_party/devtools-frontend/src/package-lock.json
-Source14: https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz
-Source15: https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz
-
BuildRequires: clang
BuildRequires: clang-tools-extra
BuildRequires: llvm
@@ -1231,22 +1230,14 @@ Qt6 UI for chromium.
%patch -P502 -p1 -b .flatpak-widevine
%endif
+%patch -P520 -p1 -b .build-with-wasm-rollup
+
# Upstream patches
# Change shebang in all relevant files in this directory and all subdirectories
# 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
-%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
-%ifarch ppc64le
-tar xf %{SOURCE15} && mv package third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-powerpc64le-gnu
-%endif
-
# Add correct path for nodejs binary
mkdir -p third_party/node/linux/node-linux-x64/bin
%if ! %{system_nodejs}
@@ -1261,6 +1252,7 @@ ln -s $(which esbuild) third_party/devtools-frontend/src/third_party/esbuild/esb
# Remove bundle gn and replace it with a system gn or bootstrap gn as it is x86_64 and causes
# FTBFS on other arch like aarch64/ppc64le
+mkdir -p buildtools/linux64/
%if %{bootstrap}
ln -sf ../../%{chromebuilddir}/gn buildtools/linux64/gn
%else
diff --git a/sources b/sources
index 643b7a1..30702c1 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,2 @@
-SHA512 (rollup-linux-arm64-gnu-4.22.4.tgz) = 01d3d1a0d8b734a54ba2508dfd2a7817837577df1ce120671cc2a82ee886e915e0a19e2c965b1eb868a8b33ba69cf1a63ccd8eeea6805ff20975e0d4f1fdba03
-SHA512 (rollup-linux-powerpc64le-gnu-4.22.4.tgz) = dda5422bdc5f596d68190a53b182493c5e9b7e959f85b46785d97285a936662c852c369acb3d043f98fd5754552c003196658a4c37d2f70c91c98de1be13e83a
SHA512 (node-v22.22.0-stripped.tar.gz) = f32a8a73063b3c78cbacf941e11dd529ebcf2618b3ba661966312e49ee9870c43a3acf256e8d331a4b0b621b16a501810c02a3ad763c75884cc250addca8e106
-SHA512 (chromium-148.0.7778.96-clean.tar.xz) = 6702b641b15d2b6e715b24d658721a20c3da578c6304598d0e829e6b2b978209572f51e4ad5f0ba77cb864027c5e274325bb2732d15019e739907dc372a7d14d
+SHA512 (chromium-148.0.7778.96-clean.tar.xz) = 93b038586e7406e21358f68dffcfb0c72c65f0beb508981bbdc60b201d43a4bc7d7af2ca33d13be0c730fd661a3e3e4c20b394492eb25e38429d1795baf92da1
reply other threads:[~2026-08-07 16:09 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=178611894088.1.14823522786000180837.rpms-chromium-45461da0d83f@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