From 74f978b1bbc3c38a2623618e22f2a8a7048c6630 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 3 Jul 2026 13:48:40 -0400 Subject: [PATCH] bazzite: replace dnf shell wrapper with dnf5 symlink Bazzite's /usr/bin/dnf is a 1KB bash wrapper that intercepts install/remove args and prints a docs URL pointing at rpm-ostree unless it detects a container or a dev-mode ostree deployment. Our kexec-booted install has neither: the image build wipes /sysroot/ostree/deploy/ + masks rpm-ostreed, so dnf install prints the URL and exits 1. Since ostree is gone the guard has no purpose here; point dnf at dnf5 directly so 'dnf install linux-ps5' works Fedora-style. --- distros/bazzite/build-rootfs.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/distros/bazzite/build-rootfs.sh b/distros/bazzite/build-rootfs.sh index f4067a1..e891c90 100755 --- a/distros/bazzite/build-rootfs.sh +++ b/distros/bazzite/build-rootfs.sh @@ -79,6 +79,17 @@ cp /etc/resolv.conf "$CHROOT/etc/resolv.conf" chroot "$CHROOT" /bin/bash -e <<"BAZIN" # Disable rpm-ostree services — we're a flat fs now. systemctl mask rpm-ostreed.service rpm-ostree-countme.service rpm-ostree-bootstatus.service 2>/dev/null || true + + # Bazzite ships /usr/bin/dnf as a shell wrapper that refuses `install` / + # `remove` unless it detects a container or a dev-mode ostree deployment + # (points users at rpm-ostree instead). Neither condition holds on our + # flat-fs kexec-booted install, so `dnf install` prints a docs URL and + # exits 1. Replace the wrapper with a direct dnf5 symlink — with ostree + # gone the guard has no purpose here. + if [ -f /usr/bin/dnf ] && head -1 /usr/bin/dnf | grep -q "^#!.*bash"; then +rm -f /usr/bin/dnf +ln -s dnf5 /usr/bin/dnf + fi # Drop the embedded ostree object store + deploy tree. With # rpm-ostree masked, the running rootfs is the flat OCI # extract — /sysroot/ostree/repo/objects/ is a deduplicated