Install Chrome, and keep /opt in the image rather than in /var #5
Loading…
Reference in a new issue
No description provided.
Delete branch "chrome-and-image-owned-opt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds Google Chrome, and changes
/optfrom host state to image content so that it can survive an upgrade./optis now image contentbootc-rootfs.shused to write the ostree convention,/opt→/var/opt. That has the same problem as everything else in/var: bootc only materialises the image's/varon the initial install, so anything a package installs under/optat build time never appears on a host that arrives throughbootc upgrade. The generated tmpfiles entries exist precisely to work around this, and a 431 MiB browser is not something to recreate with a tmpfiles entry./optis now the one state directory that is moved rather than emptied: contents go to/usr/lib/opt— the same relocation rpm-ostree does — and/optbecomes a symlink to it. Vendor software installed there ships read-only and composefs-verified like the rest of/usr.The cost is a writable
/opton a deployed host./usr/localis still backed by/varfor machine-local additions.ostree-state-overlay@opt.servicewould hand writability back, but it ships inostree-boot, which this image does not install and which also carries ostree's own boot-time units into an image that boots off bootc's dracut module — a change to test, not a drop-in. Upstream's guidance inostree-state-overlay@.service(8)is to prefer symlinking just the mutable parts into/varanyway.Chrome
Second vendor apt repository after Anthropic's, same pattern in
build/google-chrome.sh: fetch the key, pin its fingerprint (EB4C1BFD…D38B4796, which also matches the key embedded in Chrome's own postinst), write a deb822 entry, install.Three corrections beyond
claude-desktop.sh:google-chrome-os4.sources.repo_add_once="false"suppresses the postinst's new-install path, but a second branch recreates agoogle-chrome.sourcesthat already exists, on the theory a dist-upgrade may have commented it out. Under our own name it matches neither./opt/google/chrome/chrome, and AppArmor matches the resolved path rather than the symlink, so it stops attaching once the tree moves under/usr/lib/opt. It is inert on Debian, which does not restrict unprivileged user namespaces the way Ubuntu does — but a profile that silently matches nothing is worse than none./etc/cron.daily/google-chromeremoved. It symlinks into/opt/google/chrome/cron/, where the script callsinstall_keyunconditionally and writes to/usr/share/keyrings— read-only on a deployed host. Nothing runs it today because no cron daemon is installed; removing it keeps that true if one is ever added.Why not just
chromiumchromiumis in trixiemainand most arguments for Google's build don't apply to it:proprietary_codecs=true,ffmpeg_branding="Chrome",use_vaapi=trueon amd64,is_official_build=true, Google-assigned API keys in/etc/chromium.d/apikeys, and version parity with Chrome stable. Installed size is comparable (~375 MiB vs ~440 MiB).What decided it is what Debian cannot ship: no Widevine CDM (
widevine-installeriscontrib, trixie-backports only), so no Netflix/Prime/Spotify web; and--media-router=0by default, so no Chromecast. Also no component updater, so no CRLSet revocation updates.Both can be installed side by side if wanted;
update-alternativessorts outx-www-browser.Verified
/optrelocation block, against a fake root with content and with an empty/opt.sed, against the real profile from the current deb — producesprofile google-chrome-stable /usr/lib/opt/google/chrome/chrome flags=(unconfined).bootc container lintcheck touches/opt(all fifteen in bootc 1.16.9).sysuserswarning: thechromemgmtgroup is only created when/etc/default/google-chromesetsinstall_device_trust_key_management_command=true, which this does not.var-tmpfilesgets simpler — nothing lands in/var, sod /var/optis dropped fromos4-base-dirs.conf.Not verified
This has not been built or booted. The
/opt→/usr/lib/optmove is a boot-path change and wants a realbootc installbefore it goes near hardware. The specific thing to watch on first boot is that/opt/google/chrome/chrome-sandboxkeeps its setuid bit through composefs — the composefs root mountsrowithoutnosuidandsudo/newuidmapwork today, but that is inference rather than a test.🤖 Generated with Claude Code