Enable cups.socket on the live ISO #95

Merged
Breadway merged 1 commit from fix/bos-93-live-cups-socket into main 2026-10-20 18:12:07 +08:00
Owner

How it was found

BOS-93: a fresh BOS ISO in QEMU shows "Scheduler is not running" on the Printers page. systemctl is-enabled cups.service cups.socket reports disabled/disabled in the live session. Installed systems already enable cups.socket in iso/airootfs/etc/calamares/post-install.sh, so the gap is live-media only. Confirmed from source: the live airootfs has symlinks only for NetworkManager and bos-live-setup, and no cups entry.

What changed

  • iso/airootfs/etc/systemd/system/sockets.target.wants/cups.socket: absolute symlink to /usr/lib/systemd/system/cups.socket, the same form NetworkManager uses in multi-user.target.wants.
  • scripts/ci-verify-bake.sh: when a staged image is checked, assert the cups.socket link exists. Uses -L because the absolute target only resolves on the booted system.
  • CHANGELOG.md: one plain-language line under [Unreleased].

Tests

  • bash -n scripts/ci-verify-bake.sh: pass.
  • Fixture check in /tmp/opencode/bos93-fixture: a staged tree with the link passes the new check, a tree without it fails.
  • Not run: shellcheck (not installed on this host), and a full ci-verify-bake.sh run (needs a builder home and staged image). No ISO was baked and nothing was tested live.

Refs BOS-93

## How it was found BOS-93: a fresh BOS ISO in QEMU shows "Scheduler is not running" on the Printers page. `systemctl is-enabled cups.service cups.socket` reports disabled/disabled in the live session. Installed systems already enable cups.socket in `iso/airootfs/etc/calamares/post-install.sh`, so the gap is live-media only. Confirmed from source: the live airootfs has symlinks only for NetworkManager and bos-live-setup, and no cups entry. ## What changed - `iso/airootfs/etc/systemd/system/sockets.target.wants/cups.socket`: absolute symlink to `/usr/lib/systemd/system/cups.socket`, the same form NetworkManager uses in multi-user.target.wants. - `scripts/ci-verify-bake.sh`: when a staged image is checked, assert the cups.socket link exists. Uses `-L` because the absolute target only resolves on the booted system. - `CHANGELOG.md`: one plain-language line under [Unreleased]. ## Tests - `bash -n scripts/ci-verify-bake.sh`: pass. - Fixture check in `/tmp/opencode/bos93-fixture`: a staged tree with the link passes the new check, a tree without it fails. - Not run: shellcheck (not installed on this host), and a full `ci-verify-bake.sh` run (needs a builder home and staged image). No ISO was baked and nothing was tested live. Refs BOS-93
The live medium never enabled cups.socket, so Settings > Printers
reported 'Scheduler is not running' until the user started CUPS by hand.
Installed systems already enable it in post-install.sh.

Add the same socket link to the live airootfs as NetworkManager uses,
and assert it in ci-verify-bake.sh when a staged image is checked.

Refs BOS-93
Author
Owner

Review verdict: PASS (head 94b7b1ff46, base f4acaa1d, main unchanged, merge-tree clean)

Verified (static and fixture only; NOTHING was verified on a booted ISO, no ISO build, no boot, no live systemd touched):

  • Git mode and target: iso/airootfs/etc/systemd/system/sockets.target.wants/cups.socket is mode 120000, blob 8015ac2, target text exactly "/usr/lib/systemd/system/cups.socket" (35 bytes, no trailing newline).
  • Package: iso/packages.x86_64 line 317 lists "cups", so the unit ships on the live image.
  • Unit facts (extracted cups.pkg.tar.zst from the Arch extra repo, current build): usr/lib/systemd/system/cups.socket has [Install] WantedBy=sockets.target, so sockets.target.wants is the right dir and the path is right. cups.service has Requires=cups.socket and is started on first connection. cups.path (WantedBy=multi-user.target) only watches /var/cache/cups/org.cups.cupsd to restart cupsd for queued work; it is not needed for first-connect activation. Same set the installed system enables (post-install.sh enables cups.socket only).
  • Convention: the other absolute airootfs link (multi-user.target.wants/NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service) uses the same form. No existing cups link, no airootfs usr/lib/systemd cups override, and profiledef.sh file_permissions has no entry that touches this path.
  • scripts/ci-verify-bake.sh: bash -n OK. shellcheck is not installed on this host, so not run. The new block uses -L inside the AIROOTFS branch and matches the surrounding ok/bad style.
  • Fixture run under /tmp/opencode/pr95-fix with the real script (AIROOTFS only, stub grub-install): with the link, "PASS cups.socket enabled in live image"; without it, "FAIL cups.socket not enabled in live image". The link is dangling on the build host as expected, which is why -L is correct. The overall script result is non-zero in the fixture only because the fixture lacks the other staged files.
  • CHANGELOG.md: one bullet under [Unreleased], same bullet style and plain-language voice as neighbours.
  • Diff hygiene: 3 files, +13/-0, one commit; no em or en dashes, no AI attribution in the diff or commit message.

Caveats: Forgejo shows zero commit statuses on this head and no PR-triggered workflow runs ci-verify-bake.sh, so there are no required checks to observe. The runtime claim (Printers page works and cups.socket is active on the live session) still needs a boot check on a freshly built ISO. Not merged; merge needs explicit user authorization for bos.

Review verdict: PASS (head 94b7b1ff46452028429d45d8dc0569e74ca112b8, base f4acaa1d, main unchanged, merge-tree clean) Verified (static and fixture only; NOTHING was verified on a booted ISO, no ISO build, no boot, no live systemd touched): - Git mode and target: iso/airootfs/etc/systemd/system/sockets.target.wants/cups.socket is mode 120000, blob 8015ac2, target text exactly "/usr/lib/systemd/system/cups.socket" (35 bytes, no trailing newline). - Package: iso/packages.x86_64 line 317 lists "cups", so the unit ships on the live image. - Unit facts (extracted cups.pkg.tar.zst from the Arch extra repo, current build): usr/lib/systemd/system/cups.socket has [Install] WantedBy=sockets.target, so sockets.target.wants is the right dir and the path is right. cups.service has Requires=cups.socket and is started on first connection. cups.path (WantedBy=multi-user.target) only watches /var/cache/cups/org.cups.cupsd to restart cupsd for queued work; it is not needed for first-connect activation. Same set the installed system enables (post-install.sh enables cups.socket only). - Convention: the other absolute airootfs link (multi-user.target.wants/NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service) uses the same form. No existing cups link, no airootfs usr/lib/systemd cups override, and profiledef.sh file_permissions has no entry that touches this path. - scripts/ci-verify-bake.sh: bash -n OK. shellcheck is not installed on this host, so not run. The new block uses -L inside the AIROOTFS branch and matches the surrounding ok/bad style. - Fixture run under /tmp/opencode/pr95-fix with the real script (AIROOTFS only, stub grub-install): with the link, "PASS cups.socket enabled in live image"; without it, "FAIL cups.socket not enabled in live image". The link is dangling on the build host as expected, which is why -L is correct. The overall script result is non-zero in the fixture only because the fixture lacks the other staged files. - CHANGELOG.md: one bullet under [Unreleased], same bullet style and plain-language voice as neighbours. - Diff hygiene: 3 files, +13/-0, one commit; no em or en dashes, no AI attribution in the diff or commit message. Caveats: Forgejo shows zero commit statuses on this head and no PR-triggered workflow runs ci-verify-bake.sh, so there are no required checks to observe. The runtime claim (Printers page works and cups.socket is active on the live session) still needs a boot check on a freshly built ISO. Not merged; merge needs explicit user authorization for bos.
Sign in to join this conversation.
No description provided.