Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

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

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.

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:

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.