303.6. chromium-155.0.8059.84
Chromium web browser, on GTK 3 with Wayland and X11
| Version | 155.0.8059.84, release 2 |
| Shelf | browsers — Web, Gemini and text-mode browsers |
| Phase | 44_apps (Applications), 17 of 422 in build order |
| Licence | BSD-3-Clause |
| Homepage | https://www.chromium.org/Home |
| Build time | 843.6 SBU |
| Installed size | 300.4 MiB in 25 files |
| Recipe | ports/core/browsers/chromium/kpkgbuild |
About
Chromium is the open-source browser Google Chrome is built from. This port builds it from the Linux source tarball for musl, with the tree’s clang, lld, Rust and Node, on GTK 3 with both the Wayland and X11 Ozone platforms. It installs one program, /usr/lib/chromium/chromium, started through the /usr/bin/chromium wrapper. Firefox ESR stays the default browser; Chromium claims no MIME type.
Three sets of changes make the build possible: this port’s own patches, the musl and distribution patches of copium (a patch collection for Chromium packagers, fetched as a second source and applied by name), and the steps in build.sh that put the tree’s own tools and libraries where Chromium’s build would otherwise use the prebuilt copies it downloads for its developers.
Sources
chromium-155.0.8059.84.tar.xz(1.9 GiB)
sha256927e7813bbe4c35e28e31b376a1eb17057068d329dc780722ec21b37186a0507
upstream: https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/155.0.8059.84/chromium-155.0.8059.84-linux.tar.xz
archive copy: sources-1/browsers--chromium-155.0.8059.84.tar.xzcopium-155.2.tar.gz(22.8 KiB)
sha25675f74472812e6a79efd165b76565b4177701535921ca74e2f1ef3be4722b1531
upstream: https://codeberg.org/selfisekai/copium/archive/155.2.tar.gz
archive copy: sources-1/browsers--copium-155.2.tar.gzchromium-vendor-155.0.8059.84.tar.xz(17.4 MiB)
sha2565c8a5ebf33605e59f7fdf16dcf8c3c9f9f324e07f2351f64c9fe66a27ed471ca
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-1/browsers--chromium-vendor-154.0.8037.57.tar.xz
Dependencies
Depends on: clang, lld, compiler-rt, rust, crubit, bindgen, nodejs, python3, gn, ninja, gperf, bison, flex, perl, go, esbuild, typescript-go, pkgconf, gtk3, glib, at-spi2-core, dbus, nss, nspr, cups, krb5, alsa-lib, libpulse, pipewire, libva, libdrm, mesa, wayland, libxkbcommon, libX11, libxcb, xcb-proto, libXcomposite, libXdamage, libXext, libXfixes, libXrandr, libXtst, libXi, libXrender, libxshmfence, libffi, fontconfig, freetype2, harfbuzz, brotli, dav1d, double-conversion, flac, libjpeg-turbo, libsecret, libusb, libwebp, openh264, opus, zlib, zstd, pciutils, eudev, libcap, curl, minizip.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
0001-hotfix-ignore-a-new-warning-in-rust-1.89.patch— hotfix: ignore a new warning in rust 1.89disable-dns_config_service.patch— On Linux, compilesdns_config_service_fuchsia.ccin place ofdns_config_service_linux.cc, and drops the Linux unit test. The Linux service readsresolv.confandnsswitch.confwith glibc’s resolver state; the Fuchsia one is a stub that reads and watches nothing.gnrt-no-tls.patch— Buildsgnrt’sreqwestdependency without its default features, so no TLS stack is among the crates the tool needs;gnrtmakes no network request here.kdos-toolchain.patch— Fits Chromium’s build to this toolchain. It looks for compiler-rt inlib/linuxwith an architecture suffix (libclang_rt.builtins-x86_64.a), the layout the tree’s compiler-rt installs, instead of a per-triple directory; it targetsx86_64-pc-linux-muslin C and C++ andx86_64-unknown-linux-muslin Rust, and adds the latter toknown-target-triples.txt; it passes-Ctarget-feature=-crt-staticto rustc, because Rust’s musl target links statically and this Rust code links into dynamically linked programs; and it drops some compiler flags:-fdiagnostics-show-inlining-chain,-fno-lifetime-dse, the-split-threshold-for-reg-with-hintoption,-fsanitize-ignore-for-ubsan-feature, and the-Wallon Chromium’s own code.musl-conditional-tkill.patch— Lets a renderer calltkill, which musl’spthread_killuses and V8 calls while profiling, but only when the renderer is PID 1 of its own PID namespace with the user-namespace sandbox, where a signal can reach only its own threads.musl-sandbox.patch— Fits the seccomp sandbox to the system calls musl makes. A threadcloneis allowed whatever combination ofCLONE_SETTLS,CLONE_PARENT_SETTID,CLONE_CHILD_CLEARTIDandCLONE_DETACHEDit carries, not only glibc’s exact set;set_tid_address,mremapandmembarrierjoin the baseline’s allowed sets; the renderer may callpwritev2and the three scheduler calls; and the baseline policy allowssched_getparam,sched_getschedulerandsched_setscheduleroutright.musl-tid-caching.patch— After the sandbox forks a process into a new PID namespace, writes the real thread id into musl’s thread structure, as Chromium already does for glibc’s cache. musl’s structure is not public, so the patch declares a copy of its layout.no-execinfo.patch— Compiles out every use of<execinfo.h>,backtrace()andbacktrace_symbols()when the C library is not glibc: in V8, in SwiftShader’s LLVM configuration and inbase/debug/stack_trace.cc, which then prints no stack trace.no-mallinfo.patch— Compiles out the uses ofmallinfo()andmallinfo2(), which musl’s allocator does not provide, in Chromium’s memory dump and process metrics, TensorFlow Lite’s profiler and SwiftShader’s LLVM, and drops themallinfo()that PartitionAlloc’s allocator shim exports in their place. The process metrics then report a malloc usage of 0.no-res-ninit-nclose.patch—ScopedResStateuses the globalres_initpath rather thanres_ninit, and its destructor calls nores_nclose; musl has neither function.no-sandbox-settls.patch— Turns off theCLONE_VM | CLONE_VFORK | CLONE_SETTLSpath insandbox/linux/services/credentials.cc, so thatcloneruns without them. The patch’s own note gives the reason: that use ofCLONE_SETTLSis invalid, and musl’sclone()is to refuse it withEINVAL.protobuf-pure-python.patch— Adds_api_implementation.pyto Chromium’s protobuf Python package, choosing the pure-Python implementation before protobuf probes for a compiled one. The system’s compiledgoogle._upbbelongs to another protobuf release and fails against this tree’sgoogle.protobuf.message.rust-cbor.patch— Debian’s patch: the Rust CBOR parser, and its Crubit bindings, are used only whenenable_cpp_api_from_rustis set, instead of in every build that is not Cronet.temp-failure-retry.patch— Defines glibc’sTEMP_FAILURE_RETRYmacro, which retries a call that failed withEINTR, in the setuid sandbox’sprocess_util.h; musl has no such macro.unbundle-official-build.patch— The shim headers that stand in for bundled libraries refuse to compile in an official build; the patch ties that check to a Google Chrome build instead, so an official build with system libraries works.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install chromium'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/browsers/chromium.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/browsers/chromium
echo '927e7813bbe4c35e28e31b376a1eb17057068d329dc780722ec21b37186a0507 chromium-155.0.8059.84.tar.xz' | sha256sum -c -
echo '75f74472812e6a79efd165b76565b4177701535921ca74e2f1ef3be4722b1531 copium-155.2.tar.gz' | sha256sum -c -
echo '5c8a5ebf33605e59f7fdf16dcf8c3c9f9f324e07f2351f64c9fe66a27ed471ca chromium-vendor-155.0.8059.84.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/chromium
SRC=$SRC_ROOT/chromium-155.0.8059.84
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf chromium-155.0.8059.84.tar.xz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf copium-155.2.tar.gz -C "$SRC_ROOT"
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _copium, vendordir and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
for p in 0001-hotfix-ignore-a-new-warning-in-rust-1.89 kdos-toolchain \
disable-dns_config_service musl-sandbox musl-conditional-tkill \
musl-tid-caching no-execinfo \
no-mallinfo no-res-ninit-nclose no-sandbox-settls temp-failure-retry \
rust-cbor unbundle-official-build gnrt-no-tls protobuf-pure-python; do
patch -p1 -i "$PORT_SRC/$p.patch"
done
for p in cr138-node-version-check cr140-musl-prctl \
cr143-libsync-__BEGIN_DECLS cr145-iwyu-dev_t \
cr145-musl-unfortify-SkDescriptor \
cr146-swiftshader-unfortify-memset-memcpy \
cr146-unfortify-blink-display_item_list cr147-is-musl-libcxx \
cr148-rust-1.95-bytemuck cr148-v8-no-san-trap \
cr149-musl-alloc-shim-dispatch cr149-rust-toolchain-var \
cr151-dawn-cgo_enabled cr152-unbundle-opus-devtools \
cr155-no-python-vendoring cr153-typescript-break-definitions \
cr152-unbundle-minizip-undo-unicode cr153-unbundle-opus-iamf \
cr155-devtools-typescript-6.x-isolated-declarations; do
patch -p1 -i "$SRC_ROOT/copium/$p.patch"
done
python3 - <<'PY'
import os
for root, dirs, files in os.walk('.'):
for f in files:
p = os.path.join(root, f)
if os.path.islink(p) or not os.path.isfile(p):
continue
with open(p, 'rb') as fh:
if fh.read(4) == b'\x7fELF':
os.remove(p)
PY
install -d third_party/node/linux/node-linux-x64/bin third_party/gperf/cipd/bin
ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
ln -sf /usr/bin/gperf third_party/gperf/cipd/bin/gperf
install -m755 /usr/lib/typescript-go/tsc third_party/typescript/linux-amd64/src/lib/tsc
for _arch in amd64 ""; do
install -d third_party/dawn/tools/golang/linux-$_arch/bin
ln -sf /usr/bin/go third_party/dawn/tools/golang/linux-$_arch/bin/go
done
install -d third_party/rust-toolchain/bin third_party/rust-toolchain/lib/third_party
for _t in cargo rustc rustfmt cc_bindings_from_rs; do
ln -sf /usr/bin/$_t third_party/rust-toolchain/bin/$_t
done
ln -sfn /usr/lib/rustlib third_party/rust-toolchain/lib/rustlib
ln -sfn /usr/share/crubit third_party/rust-toolchain/lib/third_party/crubit
install -d buildtools/linux64-format
ln -sf /usr/bin/clang-format buildtools/linux64-format/clang-format
rustc -V > third_party/rust-toolchain/VERSION
cp third_party/rust-toolchain/VERSION third_party/rust-toolchain/INSTALLED_VERSION
(
cd tools/crates/gnrt
tar xf "$PORT_SRC/$name-vendor-$version.tar.xz"
RUSTFLAGS="-C target-feature=-crt-static" cargo build --release --offline
)
tools/crates/gnrt/target/release/gnrt gen --for-std third_party/rust-toolchain/lib/rustlib/src/rust
ln -sf /usr/bin/esbuild third_party/devtools-frontend/src/third_party/esbuild/esbuild
_system="brotli dav1d double-conversion flac fontconfig freetype harfbuzz
libdrm libjpeg libsecret libusb libwebp openh264 opus zlib zstd"
for _lib in $_system libjpeg_turbo unrar; do
find . -type f -path "*third_party/$_lib/*" \
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -path './base/third_party/icu/*' \
\! -path './third_party/libxml/*' \
\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
\! -path './third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h' \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
python3 build/linux/unbundle/replace_gn_files.py --system-libraries $_system
export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm
export CFLAGS="${CFLAGS/-std=gnu11/} -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -D__THROW="
export CXXFLAGS="$CXXFLAGS -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -D__THROW="
export RUSTC_BOOTSTRAP=1
gn gen out/Release --args='
is_official_build = true
is_debug = false
symbol_level = 0
blink_symbol_level = 0
is_clang = true
is_musl = true
clang_base_path = "/usr"
clang_version = "23"
clang_use_chrome_plugins = false
custom_toolchain = "//build/toolchain/linux/unbundle:default"
host_toolchain = "//build/toolchain/linux/unbundle:default"
use_sysroot = false
use_custom_libcxx = true
use_lld = true
use_mold = false
use_siso = false
use_thin_lto = false
is_cfi = false
chrome_pgo_phase = 0
treat_warnings_as_errors = false
fatal_linker_warnings = false
enable_nocompile_tests = false
blink_enable_generated_code_formatting = false
enable_rust = true
rust_bindgen_root = "/usr"
v8_metagen_libclang_so = "/usr/lib/libclang.so"
v8_metagen_libclang_bindings_dir = "../../third_party/llvm-libclang/bindings/python"
node_version_check = false
use_official_google_api_keys = false
google_api_key = ""
google_default_client_id = ""
google_default_client_secret = ""
disable_fieldtrial_testing_config = true
enable_hangout_services_extension = false
enable_widevine = false
enable_vr = false
safe_browsing_use_unrar = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"
ozone_platform_wayland = true
ozone_platform_x11 = true
use_qt5 = false
use_qt6 = false
use_gio = true
use_cups = true
use_kerberos = true
use_vaapi = true
use_pulseaudio = true
link_pulseaudio = true
rtc_use_pipewire = true
rtc_link_pipewire = true
use_system_libffi = true
icu_use_data_file = true
'
ulimit -n 4096 2>/dev/null || ulimit -n "$(ulimit -Hn)"
ninja -C out/Release $MAKEFLAGS chrome chrome_crashpad_handler
_app=/usr/lib/chromium
install -Dm755 out/Release/chrome "$PKG$_app/chromium"
install -Dm755 out/Release/chrome_crashpad_handler "$PKG$_app/chrome_crashpad_handler"
for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak \
icudtl.dat v8_context_snapshot.bin libEGL.so libGLESv2.so \
libvulkan.so.1 libvk_swiftshader.so vk_swiftshader_icd.json; do
install -m644 "out/Release/$f" "$PKG$_app/$f"
done
chmod 755 "$PKG$_app"/*.so "$PKG$_app"/*.so.1
install -Dm644 out/Release/locales/en-US.pak "$PKG$_app/locales/en-US.pak"
install -Dm644 out/Release/locales/en-GB.pak "$PKG$_app/locales/en-GB.pak"
install -d "$PKG/usr/bin"
cat > "$PKG/usr/bin/chromium" <<'KDOS_SH'
#!/bin/sh
export CHROME_WRAPPER=/usr/bin/chromium
export CHROME_DESKTOP=chromium.desktop
export GOOGLE_API_KEY=no
export GOOGLE_DEFAULT_CLIENT_ID=no
export GOOGLE_DEFAULT_CLIENT_SECRET=no
exec /usr/lib/chromium/chromium --ozone-platform-hint=auto $CHROMIUM_FLAGS "$@"
KDOS_SH
chmod 755 "$PKG/usr/bin/chromium"
install -d "$PKG/etc/chromium/policies/managed"
cat > "$PKG/etc/chromium/policies/managed/kdos.json" <<'EOF'
{
"MetricsReportingEnabled": false,
"UrlKeyedAnonymizedDataCollectionEnabled": false,
"ComponentUpdatesEnabled": false,
"SafeBrowsingProtectionLevel": 0,
"PasswordLeakDetectionEnabled": false,
"DnsOverHttpsMode": "off",
"SearchSuggestEnabled": false,
"AlternateErrorPagesEnabled": false,
"TranslateEnabled": false,
"NetworkPredictionOptions": 2,
"SpellCheckServiceEnabled": false,
"SpellcheckEnabled": false,
"BrowserSignin": 0,
"SyncDisabled": true,
"PromotionsEnabled": false,
"DefaultBrowserSettingEnabled": false,
"BackgroundModeEnabled": false,
"GenAiDefaultSettings": 2
}
EOF
chmod 644 "$PKG/etc/chromium/policies/managed/kdos.json"
cat > "$PKG$_app/initial_preferences" <<'EOF'
{
"distribution": { "require_eula": false },
"browser": { "custom_chrome_frame": false },
"extensions": { "theme": { "system_theme": 1 } }
}
EOF
chmod 644 "$PKG$_app/initial_preferences"
for _s in 24 48 64 128 256; do
install -Dm644 "chrome/app/theme/chromium/product_logo_$_s.png" \
"$PKG/usr/share/icons/hicolor/${_s}x${_s}/apps/chromium.png"
done
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/chromium.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=Chromium
GenericName=Web Browser
Comment=Browse the World Wide Web
Exec=chromium %U
Icon=chromium
Terminal=false
StartupNotify=true
StartupWMClass=chromium
Categories=Network;WebBrowser;
Keywords=web;browser;internet;www;http;chromium;chrome;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Exec=chromium --new-window %U
[Desktop Action new-private-window]
Name=New Incognito Window
Exec=chromium --incognito %U
EOF
chmod 644 "$PKG/usr/share/applications/chromium.desktop"
install -Dm644 LICENSE "$PKG/usr/share/licenses/$name/LICENSE"
The switches, and why each is set:
${CFLAGS/-std=gnu11/}— Removes the tree’s-std=gnu11fromCFLAGS. The unbundle toolchain appends the environment’s flags last on every compile line, where the tree’s standard would override the one Chromium picks for each source.CC=clang,AR=llvm-ar,NM=llvm-nm— WithCXX=clang++, the programs the unbundle toolchain reads from the environment.-Wno-unknown-warning-option,-Wno-builtin-macro-redefined,-Wno-deprecated-declarations— Added toCFLAGSandCXXFLAGS: no warning for a warning switch clang does not know, for redefining a built-in macro, or for a call to a deprecated declaration.-D__THROW=— Defines__THROW, a glibc header macro that musl does not provide, as nothing, so declarations written with it compile.RUSTC_BOOTSTRAP=1— Lets the stablerustcaccept the unstable features Chromium’s Rust code uses.is_official_build = true,is_debug = false,symbol_level = 0,blink_symbol_level = 0— A release build with Chromium’s official optimisation settings and no debugging symbols, Blink’s included.is_clang = true,clang_base_path = "/usr",clang_version = "23",clang_use_chrome_plugins = false— Compile with the system clang.clang_versionis the major version that names its resource directory, where the build finds compiler-rt; Chromium’s own clang plugins are not part of the tree’s clang.is_musl = true— An argument added by copium’scr147-is-musl-libcxx.patch. musl defines no macro by which code can detect it, so the build tells libc++ through this argument (_LIBCPP_HAS_MUSL_LIBC).custom_toolchain = "//build/toolchain/linux/unbundle:default",host_toolchain = "//build/toolchain/linux/unbundle:default"— Chromium’s toolchain for distributions, which takes the compiler and theCFLAGS,CXXFLAGSandLDFLAGSfrom the environment, for both the target and the build host.use_sysroot = false— Compile against the system’s headers and libraries rather than the Debian sysroot Chromium downloads.use_custom_libcxx = true— Build and link the copy of libc++ in Chromium’s source; Chromium’s default.use_lld = true,use_mold = false,use_siso = false— Link with lld, not mold, and drive the build with ninja rather than Google’s siso.use_thin_lto = false,is_cfi = false,chrome_pgo_phase = 0— No link-time optimisation, and none of the control-flow-integrity checks and profile-guided optimisation that an official Linux build turns on by default. Clang’s CFI works only under LTO.treat_warnings_as_errors = false,fatal_linker_warnings = false— A compiler or linker version other than Chromium’s raises warnings Chromium’s does not; neither stops the build.enable_nocompile_tests = false,blink_enable_generated_code_formatting = false— No no-compile tests, and no running clang-format over Blink’s generated code.enable_rust = true,rust_bindgen_root = "/usr"— Build Chromium’s Rust code with the tree’s Rust, and findbindgenin/usr/bin.v8_metagen_libclang_so = "/usr/lib/libclang.so",v8_metagen_libclang_bindings_dir = "../../third_party/llvm-libclang/bindings/python"— V8’s metagen step parses V8’s headers through libclang. Its default loads the prebuiltlibclang.sointhird_party/llvm-libclang, which the ELF purge inbuild.shdeletes; these point it at the tree’s clang library and keep the Python bindings that ship beside the deleted copy. The two are set together or not at all.node_version_check = false— An argument added by copium’scr138-node-version-check.patch; the build accepts the tree’s Node.js, whose version differs from the one Chromium pins.use_official_google_api_keys = false,google_api_key = "",google_default_client_id = "",google_default_client_secret = ""— Build with no Google API keys, so the services that need them (sync and sign-in among them) are not available.disable_fieldtrial_testing_config = true— Compile in none of the field-trial testing configuration.enable_hangout_services_extension = false,enable_widevine = false,enable_vr = false— No Hangouts services extension, no Widevine support for protected video, and no WebXR.safe_browsing_use_unrar = false— Build withoutthird_party/unrar, which Chromium allows leaving out for licence reasons;build.shdeletes that source as well.proprietary_codecs = true,ffmpeg_branding = "Chrome"— Decode the patent-encumbered formats, H.264 and AAC among them, through the bundled FFmpeg.ozone_platform_wayland = true,ozone_platform_x11 = true— Compile both display platforms. The wrapper passes--ozone-platform-hint=auto, which picks Wayland in the session.use_qt5 = false,use_qt6 = false— No Qt platform integration; GTK 3 alone.use_gio = true,use_cups = true,use_kerberos = true,use_vaapi = true— GIO, printing through cups, Kerberos authentication through krb5, and VA-API video decoding through libva.use_pulseaudio = true,link_pulseaudio = true— Sound through the PulseAudio API, linked withDT_NEEDEDrather than loaded withdlopen, so a missing or mismatched library shows at load time.rtc_use_pipewire = true,rtc_link_pipewire = true— Screen capture for WebRTC through PipeWire, linked directly the same way.use_system_libffi = true— Link the tree’s libffi.icu_use_data_file = true— Load ICU’s data fromicudtl.datbeside the program instead of linking it in.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/chromium, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf chromium-155.0.8059.84-2.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/chromium, and runs the triggers its paths call for.
Contents
Installed programs: chromium.
Installed directories: /etc/chromium/policies, /usr/lib/chromium, /usr/share/licenses/chromium.
Notes
The source tarball carries prebuilt programs for Chromium’s developers. Before anything is configured, build.sh deletes every ELF file in the tree, then links the tree’s own node, gperf, go, esbuild, clang-format, cargo, rustc, rustfmt and Crubit’s cc_bindings_from_rs, the Rust standard library and Crubit’s support library, and a copy of typescript-go’s tsc, into the places the build looks for its downloaded toolchains. It writes rustc -V into third_party/rust-toolchain/VERSION, which the GN files read as the toolchain’s revision. A tool this step does not link is a tool the build cannot find; the esbuild and crubit ports are pinned to the versions this Chromium names (see the ports catalogue).
Chromium compiles Rust’s standard library itself, from GN rules that its gnrt tool generates. gnrt is a Rust program in tools/crates/gnrt, and its crates are the port’s vendor bundle (vendoring = rust, vendordir = tools/crates/gnrt, see vendoring): build.sh unpacks the bundle there, builds gnrt offline, and runs gnrt gen --for-std against the Rust source the tree’s Rust installs.
The libraries in _system are taken from their ports: build.sh deletes the bundled copies’ sources, keeping their GN files, and build/linux/unbundle/replace_gn_files.py points the build at the system’s. ffmpeg, ICU, libxml and the rest stay bundled.
ulimit -n is raised to 4096 (or the hard limit) before ninja runs. Only the chrome and chrome_crashpad_handler targets are built, and the install copies the program and its crash handler, the resource packs, ICU’s data, the V8 snapshot, the ANGLE, Vulkan loader and SwiftShader libraries and the en-US and en-GB locale packs alone.
The /usr/bin/chromium wrapper sets the three Google API variables to no. With none configured, Chromium shows an infobar about missing API keys at every start. It adds the contents of $CHROMIUM_FLAGS to the command line. The managed policy file, /etc/chromium/policies/managed/kdos.json, turns off metrics and URL-keyed data collection, component updates, Safe Browsing, password leak detection, sign-in and sync, spell checking and its network service, translation, search suggestions, the suggestions on error pages, network prediction, DNS over HTTPS, promotions, the default-browser check, background mode and the generative AI features.
/usr/lib/chromium/initial_preferences, beside the program, is read once, when a profile is created, and gives that profile three defaults the user can change afterwards in Settings > Appearance. distribution.require_eula false skips the Linux terms-of-service dialog, which an unbranded build fills with the placeholder “This Space Intentionally Blank”; without the file the dialog opens on every new profile. browser.custom_chrome_frame false gives the window KWin’s title bar instead of Chromium’s own, which is the default on Wayland. extensions.theme.system_theme 1 selects the GTK theme: under Plasma, Chromium’s own choice is the Qt theme, which use_qt6 = false leaves out of the build, so without the key a new profile falls back to the grey Classic theme. GTK 3 reads the Breeze GTK theme and the colours kde-gtk-config writes from the Plasma colour scheme, so the toolbar follows the accent and light or dark mode.