From 63b01bf58cc5004a529ef16f4a7d50bca18603ed Mon Sep 17 00:00:00 2001 From: castrojo Date: Sat, 3 Oct 2026 10:54:45 +0000 Subject: [PATCH] fix(services): enable Avahi and switcheroo-control Utah shipped Avahi and switcheroo-control but left them disabled. Enable avahi-daemon.service/.socket and switcheroo-control.service in configure-services.sh and the desktop preset, install the avahi daemon package, and require the units in the desktop contract (#387, #104). Rebased onto main after #547 (package counts) and #549 (avahi SELinux drop-in, which this needs for the daemon to start). Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 2 +- contracts/bluefin-desktop.toml | 3 +++ docs/skills/desktop-contract.md | 16 ++++++++++++++++ docs/skills/package-contract.md | 2 +- packages/utah.toml | 4 ++++ scripts/configure-services.sh | 4 ++++ site/data/packages.json | 3 ++- .../systemd/system-preset/85-utah-desktop.preset | 4 ++++ 8 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7727d3994..1e3451f67 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ than being noticed later. | | count | | --- | --- | | Bluefin contract installed | **61** | -| Utah additions (GNOME 51, base-image parity, device firmware, desktop services) | 90 | +| Utah additions (GNOME 51, base-image parity, device firmware, desktop services) | 91 | | Genuinely unavailable | **7** | The install writes its resolved list to `/usr/share/utah/contract.txt` and the diff --git a/contracts/bluefin-desktop.toml b/contracts/bluefin-desktop.toml index 508065702..c017e8838 100644 --- a/contracts/bluefin-desktop.toml +++ b/contracts/bluefin-desktop.toml @@ -147,6 +147,8 @@ apps = [ [services] enabled = [ + "avahi-daemon.service", + "avahi-daemon.socket", "bluetooth.service", "bootc-unified-storage.service", "brew-setup.service", @@ -157,6 +159,7 @@ enabled = [ "gdm.service", "input-remapper.service", "ModemManager.service", + "switcheroo-control.service", "ublue-system-setup.service", "uupd.timer", "systemd-boot-update.service", diff --git a/docs/skills/desktop-contract.md b/docs/skills/desktop-contract.md index 6eab24308..b2a69e906 100644 --- a/docs/skills/desktop-contract.md +++ b/docs/skills/desktop-contract.md @@ -67,6 +67,7 @@ The TOML's sections are the contract's table of contents: `99-flatpaks.sh` privileged-setup hook, and the system-flatpaks Brewfile whose app list the contract enumerates. - **`[services]`** — systemd units the preset must enable: `gdm.service`, + `avahi-daemon.service`, `avahi-daemon.socket`, `switcheroo-control.service`, `bluetooth.service`, `ublue-system-setup.service`, `flatpak-preinstall.service`, `flatpak-nuke-fedora.service`, `brew-setup.service`, `dconf-update.service`, `bootc-unified-storage.service`, `uupd.timer`. Update policy delegates @@ -233,6 +234,21 @@ under `[services]` in `packages/utah.toml` and configured in `scripts/configure-services.sh`, which also disables `PrivateTmp` on `systemd-resolved.service` for bootc early-boot DNS resolution. +### Discovery and hybrid-GPU services (#387) + +Keep build-time enablement in `scripts/configure-services.sh` aligned with +`85-utah-desktop.preset`: the script configures the image and the preset +preserves the policy when first-boot presets are applied. Bluefin's +`enable avahi-daemon.*` covers both the service and socket for mDNS discovery; +list both explicitly in the script and preset. `switcheroo-control.service` +supports launching applications on a discrete GPU. `switcheroo-control` is +already in the copied Bluefin package contract; Avahi's client libraries +are not the daemon, so `[services]` in `packages/utah.toml` explicitly +requests `avahi` (#104). Require the full pinned-repository transaction to +resolve before building. The desktop contract checks all three units with +`systemctl is-enabled` in the composed image; discovery and discrete-GPU +launching still need runtime verification on the relevant network/hardware. + ### The serial getty is masked (#103) Two Hummingbird defaults compose into a desktop bug. The base declares the diff --git a/docs/skills/package-contract.md b/docs/skills/package-contract.md index 4fada1a77..7b8401adc 100644 --- a/docs/skills/package-contract.md +++ b/docs/skills/package-contract.md @@ -226,7 +226,7 @@ default branch, preventing unrelated upstream changes from breaking Utah's CI. Update it whenever synchronizing `packages/bluefin.toml` with upstream. Current counts, per the README "Package parity" section: 61 Bluefin contract -packages installed, 90 Utah additions (GNOME 51, base-image parity, device +packages installed, 91 Utah additions (GNOME 51, base-image parity, device firmware, desktop services), 7 genuinely unavailable. `scripts/check-doc-counts.py` (part of `just check`) recomputes these from the manifests and fails if either document drifts from `site/data/packages.json`. diff --git a/packages/utah.toml b/packages/utah.toml index bb7aa7dfa..11f2509b0 100644 --- a/packages/utah.toml +++ b/packages/utah.toml @@ -278,6 +278,9 @@ packages = [ # Bluefin's desktop image adds these to the server base before 40-services.sh # enables their units. uupd is downloaded separately because it is published # as a release binary rather than an RPM in the Hummingbird repositories. +# Avahi's client libraries do not install the daemon. The explicit avahi +# request supplies avahi-daemon.service/socket enabled by the desktop policy +# (#104, #387); switcheroo-control is already in the Bluefin contract. # # systemd-resolved and flatpak are not in the Bluefin contract because Fedora's # base image already carries them. Hummingbird's bootable base does not. @@ -321,6 +324,7 @@ packages = [ # systemd-oomd's pressure-based kills. Revisit it as its own change against # #384's OOM question rather than assuming the omission was an oversight. packages = [ + "avahi", "cryptsetup", "flatpak", "fwupd", diff --git a/scripts/configure-services.sh b/scripts/configure-services.sh index 350134646..bac01c471 100644 --- a/scripts/configure-services.sh +++ b/scripts/configure-services.sh @@ -65,6 +65,10 @@ enable_unit flatpak-preinstall.service # bluez installed. Enable it next to the other desktop units; see #98. enable_unit gdm.service enable_unit bluetooth.service +# Bluefin defaults for mDNS discovery and hybrid-GPU application launching. +enable_unit avahi-daemon.service +enable_unit avahi-daemon.socket +enable_unit switcheroo-control.service enable_unit firewalld.service enable_unit fwupd.service enable_unit fwupd-refresh.timer diff --git a/site/data/packages.json b/site/data/packages.json index 30bfe311f..80dd894e9 100644 --- a/site/data/packages.json +++ b/site/data/packages.json @@ -181,6 +181,7 @@ "blurb": "Units Bluefin adds on top of the server base; the preset cannot enable what was never installed.", "id": "services", "packages": [ + "avahi", "cryptsetup", "flatpak", "fwupd", @@ -208,7 +209,7 @@ } ], "totals": { - "installed": 151, + "installed": 152, "unavailable": 7 }, "unavailable": [ diff --git a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset index cc1b9dd59..39eb5b3d6 100644 --- a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset +++ b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset @@ -2,6 +2,10 @@ # Keep these in /usr/lib so bootc's first-boot preset application sees them. enable gdm.service enable bluetooth.service +# Match Bluefin discovery and hybrid-GPU defaults. +enable avahi-daemon.service +enable avahi-daemon.socket +enable switcheroo-control.service enable firewalld.service enable fwupd.service enable fwupd-refresh.timer