From ead9731d54ed7cebc39177493adac1f6143ac22e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 16:31:40 +0000 Subject: [PATCH] Install what Bluefin inherits from Fedora's base and Hummingbird already has The image-level parity report (#117) found 277 packages in Bluefin's image that Utah's lacks and that public-hummingbird-x86_64-rpms carries today: Bluefin never names them because Silverblue's base supplies them, and Hummingbird's server-shaped bootable base leaves them out. A new [parity] section in packages/utah.toml adds the desktop-relevant ones -- the NetworkManager connectivity check, ALSA use-case profiles, the English language pack and core font set, and the shell tooling Bluefin users reach for -- 28 names. This is the sweep that briefly rode on #105 and was lifted out at review: out of scope there, and its first version was red. Three names from that version are gone because CI's real transaction rejected their closures, which a first-level Requires check had missed: NetworkManager-wwan needs ModemManager, whose factory build needs libmbim, libqmi and libqrtr-glib that nothing provides; NetworkManager-bluetooth needs libnm-wwan.so from the wwan plugin; poppler-utils needs poppler-data, which Hummingbird does not ship. Each is recorded beside the list with the others that did not resolve (cups, vim-enhanced, the emoji and math fonts, fprintd, alsa-utils), each with its tracking issue. unzip is listed and kept: it was already in [build], but configure-services.sh removed the build tooling after the extension build, so the image did not actually ship it. The removal now skips it and a test pins both halves. install-packages.py adds the section to the install set, verify-rpm-contract asserts it on the built image, and the tests cover the install path, the verifier, and that [parity] duplicates no other section's claim. CI's package availability step is the gate on every name here. Whichever of this and #117 lands second updates parity-baseline.txt. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M --- docs/skills/package-contract.md | 4 ++ packages/utah.toml | 70 ++++++++++++++++++++++++++++++++ scripts/configure-services.sh | 5 ++- scripts/install-packages.py | 3 ++ scripts/verify-rpm-contract.py | 9 +++- tests/test_package_resolution.py | 37 ++++++++++++++++- 6 files changed, 123 insertions(+), 5 deletions(-) diff --git a/docs/skills/package-contract.md b/docs/skills/package-contract.md index f9aefcda..412da7e4 100644 --- a/docs/skills/package-contract.md +++ b/docs/skills/package-contract.md @@ -40,6 +40,10 @@ policy for changing them. - `[gnome]` — GNOME 51 desktop contract Hummingbird does not ship. - `[build]` — toolchain needed to build the pinned GNOME extensions (`scripts/build-gnome-extensions.sh`). + - `[parity]` — what Bluefin inherits from Fedora's base image and Hummingbird + has in its repository but not in its bootable base; CI's package + availability step resolves the real transaction and is the gate on every + name there. - `[services]` — desktop services Bluefin adds on top of the server base. - `[unavailable]` — Bluefin contract packages none of Utah's repositories provide. diff --git a/packages/utah.toml b/packages/utah.toml index 13faa549..3f3a5778 100644 --- a/packages/utah.toml +++ b/packages/utah.toml @@ -7,6 +7,7 @@ # # Sections: # [gnome] GNOME 51 desktop contract Hummingbird does not ship +# [parity] what Bluefin gets from Fedora's base image and Hummingbird has # [build] toolchain needed to build the pinned GNOME extensions # [unavailable] Bluefin contract packages none of Utah's repositories provide # @@ -59,6 +60,75 @@ packages = [ "glibc-all-langpacks", ] +[parity] +# Packages Bluefin's image carries without naming them in bluefin.toml, because +# Fedora's Silverblue base supplies them, and which Hummingbird's repository +# has but its server-shaped bootable base leaves out. Measured, not guessed: +# the image-level parity report (#117, scripts/check-image-parity.py) listed +# 277 such names against public-hummingbird-x86_64-rpms. CI's "Check package +# availability" step resolves the real transaction against the pinned images, +# and is the gate on every name here; a first-level Requires check is not +# enough, as the three ModemManager-shaped exclusions below proved. +# Aligned with Dakota where it ships the same piece: the connectivity check, +# ALSA use-case profiles, the language pack and the core font set. +# +# Left out, with the dependency the pinned repositories do not carry: +# NetworkManager-wwan requires ModemManager, whose factory build +# needs libmbim, libqmi and libqrtr-glib that +# nothing provides -- a factory gap +# NetworkManager-bluetooth requires libnm-wwan.so from the wwan plugin, +# so it falls with it +# poppler-utils Hummingbird's poppler requires poppler-data, +# which Hummingbird does not ship +# cups, cups-client need cups-filters (utah-packages#144) +# vim-enhanced needs libgpm.so.2 (vim-minimal is in the base) +# default-fonts-core-emoji needs google-noto-emoji-color-fonts +# default-fonts-core-math needs stix-fonts (both utah-packages#147) +# fprintd, fprintd-pam in no repository (utah-packages#145) +# alsa-utils in no repository (utah-packages#146) +# +# NetworkManager-wifi is deliberately not here yet: its supplicant and the +# regulatory database are being built by utah-packages#133, and it joins this +# list when the factory image that carries them is pinned (#126). +# +# unzip is also in [build]; it is listed here because configure-services.sh +# removes the build tooling after the extension build, and Bluefin ships +# unzip to users. The removal line skips it for that reason. +packages = [ + # Networking + "NetworkManager-config-connectivity-fedora", + "bind-utils", + "iptables-nft", + # Audio + "alsa-ucm", + # Locale and fonts + "langpacks-en", + "langpacks-fonts-en", + "abattis-cantarell-fonts", + "default-fonts-core-sans", + "default-fonts-core-serif", + "default-fonts-core-mono", + "google-noto-sans-mono-vf-fonts", + "google-noto-serif-vf-fonts", + "google-noto-sans-symbols-2-fonts", + "google-noto-sans-math-fonts", + # Shell and tooling Bluefin users reach for + "bash-completion", + "man-db", + "less", + "which", + "file", + "hostname", + "xxd", + "unzip", + "zip", + "dbus-tools", + "keyutils", + "crypto-policies-scripts", + "python3-pip", + "systemd-container", +] + [build] # Build dependencies for scripts/build-gnome-extensions.sh. # diff --git a/scripts/configure-services.sh b/scripts/configure-services.sh index 74d02c5b..1eb2fb71 100644 --- a/scripts/configure-services.sh +++ b/scripts/configure-services.sh @@ -122,8 +122,9 @@ sed -i 's|uupd|& --disable-module-distrobox|' /usr/lib/systemd/system/uupd.servi sed -i 's@^PrivateTmp=.*@PrivateTmp=no@' /usr/lib/systemd/system/systemd-resolved.service rm -rf /tmp/uupd -# Build-only extension tooling is not part of the desktop image. +# Build-only extension tooling is not part of the desktop image. unzip stays: +# it is in [parity] as well as [build], because Bluefin ships it to users. DNF="$(command -v dnf5 || command -v dnf)" -"$DNF" -y remove --no-autoremove dbus-devel glib2-devel meson sassc unzip +"$DNF" -y remove --no-autoremove dbus-devel glib2-devel meson sassc echo "Utah desktop service configuration complete" diff --git a/scripts/install-packages.py b/scripts/install-packages.py index 09d715ba..842b42f9 100755 --- a/scripts/install-packages.py +++ b/scripts/install-packages.py @@ -54,6 +54,9 @@ def contract(base: Path, overlay: Path, major: str | None) -> list[str]: if major: packages += section(base, f"fedora_v{major}") packages += section(overlay, "gnome") + # Parity with what Bluefin inherits from Fedora's base image and Hummingbird + # has in its repository but not in its bootable base. + packages += section(overlay, "parity") # Service packages are part of the desktop contract as well: 40-services.sh # cannot enable what the server base never installed. packages += section(overlay, "services") diff --git a/scripts/verify-rpm-contract.py b/scripts/verify-rpm-contract.py index 08fb22ff..23ea1db0 100644 --- a/scripts/verify-rpm-contract.py +++ b/scripts/verify-rpm-contract.py @@ -61,19 +61,24 @@ def main() -> int: if resolved.exists(): contract = [line for line in resolved.read_text().split() if line] gnome_names = set(section(overlay, "gnome")) + parity_names = set(section(overlay, "parity")) service_names = set(section(overlay, "services")) - bluefin = [p for p in contract if p not in gnome_names and p not in service_names] + overlay_names = gnome_names | parity_names | service_names + bluefin = [p for p in contract if p not in overlay_names] gnome = [p for p in contract if p in gnome_names] + parity = [p for p in contract if p in parity_names] services = [p for p in contract if p in service_names] else: bluefin = [p for p in section(args.manifest, "fedora") if p not in unavailable] gnome = section(overlay, "gnome") + parity = section(overlay, "parity") services = section(overlay, "services") nvidia = list(NVIDIA_PACKAGES) if "nvidia" in flavor else [] - expected = [*bluefin, *gnome, *services, *nvidia] + expected = [*bluefin, *gnome, *parity, *services, *nvidia] print( f"Verifying {len(bluefin)} Bluefin packages, {len(gnome)} GNOME desktop packages," + f" {len(parity)} parity packages," f" {len(services)} desktop service packages, and {len(nvidia)} NVIDIA packages", flush=True, ) diff --git a/tests/test_package_resolution.py b/tests/test_package_resolution.py index 14350d01..4f6c27fe 100644 --- a/tests/test_package_resolution.py +++ b/tests/test_package_resolution.py @@ -77,6 +77,7 @@ def resolve(self, output, code=1): base.write_text('[fedora]\npackages=["base", "unavailable"]\n' '[fedora_v44]\npackages=["release-specific"]\n') overlay.write_text('[gnome]\npackages=["shell"]\n' + '[parity]\npackages=["manpages"]\n' '[services]\npackages=["resolver"]\n' '[build]\npackages=["compiler"]\n' '[unavailable]\npackages=["unavailable"]\n') @@ -92,7 +93,8 @@ def test_valid_declined_transaction_includes_every_install_section(self): rc, command = self.resolve("Transaction Summary:\nInstall 12 Packages\nOperation aborted.\n") self.assertEqual(rc, 0) self.assertEqual(command[command.index("install") + 1:], - ["base", "release-specific", "shell", "resolver", "compiler"]) + ["base", "release-specific", "shell", "manpages", "resolver", + "compiler"]) self.assertIn("--assumeno", command) self.assertIn("--disablerepo=*", command) for repo in installer.REPOS: @@ -125,5 +127,38 @@ def test_pins_come_from_containerfile(self): checker.pinned_inputs(path) +class ParityContractTests(unittest.TestCase): + OVERLAY = ROOT / "packages/utah.toml" + + def test_parity_section_reaches_the_install_set(self): + contract = installer.contract(ROOT / "packages/bluefin.toml", self.OVERLAY, "44") + for pkg in installer.section(self.OVERLAY, "parity"): + with self.subTest(package=pkg): + self.assertIn(pkg, contract) + + def test_parity_section_duplicates_nothing_but_the_build_tooling_it_keeps(self): + # A name both in [parity] and in bluefin.toml or another overlay section + # is a duplicate claim the verifier rejects. unzip is the one deliberate + # overlap with [build]: configure-services.sh removes the build tooling + # after the extension build and has to keep unzip for the same reason + # it is listed here. + parity = installer.section(self.OVERLAY, "parity") + self.assertEqual(len(set(parity)), len(parity)) + others = set(installer.section(ROOT / "packages/bluefin.toml", "fedora")) + for name in ("gnome", "services", "unavailable"): + others |= set(installer.section(self.OVERLAY, name)) + self.assertEqual(sorted(set(parity) & others), []) + self.assertEqual(sorted(set(parity) & set(installer.section(self.OVERLAY, "build"))), ["unzip"]) + removal = [line for line in (ROOT / "scripts/configure-services.sh").read_text().splitlines() + if "remove --no-autoremove" in line] + self.assertEqual(len(removal), 1) + self.assertNotIn("unzip", removal[0]) + + def test_verifier_asserts_the_parity_section(self): + source = (ROOT / "scripts/verify-rpm-contract.py").read_text() + self.assertIn('parity = section(overlay, "parity")', source) + self.assertIn("*parity,", source) + + if __name__ == "__main__": unittest.main()