The web console is named in every install line, and a host that has none gets one #409

Merged
enricobuehler merged 1 commits from worktree-fedora-web-console-install into main 2026-08-27 10:48:33 +00:00
Owner

Reported from the field: the guided installer left a Fedora box with a host and no web console — and then printed the console's URL anyway. A host without a console can't pair, can't approve a device and can't change a setting, so that box does nothing and offers no way to fix itself.

It was never the packaging

punktfunk-web is present in all four registries — checked live against each:

registry carries punktfunk-web
rpm/fedora-44 (0.31.1 … 0.31.4)
rpm/bazzite
debian stable
arch

Root cause

scripts/install.sh gated the entire install step on one binary while installing three packages:

if command -v punktfunk-host >/dev/null 2>&1; then
    say "punktfunk-host is already installed … — skipping the install, continuing with setup"

Reproduced with the real script against a faked Fedora 44 os-release:

$ PUNKTFUNK_INSTALL_OS_RELEASE=… sh scripts/install.sh --dry-run --yes --no-start   # host on PATH
==> punktfunk-host is already installed (0.31.4) — skipping the install, continuing with setup
    1. Open the web console:  https://<host-ip>:47992      ← nothing is serving this

No dnf line runs, so punktfunk-web is never added. A Fedora user who first ran the docs' sudo dnf install punktfunk, or had any earlier host on the box, hits this on every re-run. Step 6 then silently dropped punktfunk-web from the units it enables, and the banner promised the URL regardless — so nothing anywhere said the console was missing.

The fix

  • Ask per package, not all-or-nothing: punktfunk-host / punktfunk-web-server / punktfunk-scripting. A box that got the host by hand, from an older docs line, or from a package manager set to drop weak deps now gets its console on a re-run. Installing a package that is already there is a no-op, so re-running stays safe.
  • Every install line names the console. apt leaned on Recommends: punktfunk-web and pacman on an optdepend — both vanish under APT::Install-Recommends "0" / install_weak_deps=False / plain pacman. dnf already named it.
  • Stop lying when it's absent: step 6 warns instead of silently skipping, and the closing banner offers the install line rather than a URL nothing serves.

The packages keep their weak deps on purpose — a hard Requires would break the COPR build, which has no bun and ships no console at all. No documented path leans on them any more.

Channels already correct — verified, unchanged

channel how the console arrives
Bazzite sysext image bakes in web + scripting (CI passes both RPMs to build-sysext.sh)
NixOS services.punktfunk.web.enable defaults to host.enable
SteamOS install.sh defaults WITH_WEB=1 (--no-web to opt out)
Windows bundled unconditionally, behind the payload guard added after 0.22.1/0.22.2 shipped console-less
COPR documented exception — no bun in mock; the README points at the Gitea registry

Why no gate caught it

  • check-docs-drift.sh gate 7 asserted the install line only as far as the host package name, so a line that dropped the console still passed. It now names all three, per family.
  • installer-smoke.yml asserted punktfunk-host --version and nothing about the console. It now asserts the binary and the user unit per family, and carries the reported failure as a test: remove punktfunk-web, re-run the installer, require it back.

Checks

  • sh -n scripts/install.sh — clean
  • scripts/ci/check-docs-drift.sh — all 7 gates, exit 0, zero ::error::
  • data/platforms.json valid, and identical to the docs-site/src/data copy (gate 5)
  • All three installer scenarios by hand: clean box installs all three · host-only now installs the console · all-present still prints already installed (the smoke test greps for it)
  • Touches no Rust, so the rustfmt pre-push gates are unaffected

data/platforms.json is the source for both the docs and the installer, so the per-distro pages, the install landing page and the web-console page moved with it — including a "No console on a box that has the host?" recovery block for anyone already stuck:

sudo dnf install punktfunk-web        # Fedora
systemctl --user enable --now punktfunk-web
Reported from the field: the guided installer left a **Fedora** box with a host and no web console — and then printed the console's URL anyway. A host without a console can't pair, can't approve a device and can't change a setting, so that box does nothing and offers no way to fix itself. ## It was never the packaging `punktfunk-web` is present in all four registries — checked live against each: | registry | carries `punktfunk-web` | |---|---| | `rpm/fedora-44` | ✅ (0.31.1 … 0.31.4) | | `rpm/bazzite` | ✅ | | `debian stable` | ✅ | | `arch` | ✅ | ## Root cause `scripts/install.sh` gated the **entire** install step on **one** binary while installing **three** packages: ```sh if command -v punktfunk-host >/dev/null 2>&1; then say "punktfunk-host is already installed … — skipping the install, continuing with setup" ``` Reproduced with the real script against a faked Fedora 44 os-release: ``` $ PUNKTFUNK_INSTALL_OS_RELEASE=… sh scripts/install.sh --dry-run --yes --no-start # host on PATH ==> punktfunk-host is already installed (0.31.4) — skipping the install, continuing with setup 1. Open the web console: https://<host-ip>:47992 ← nothing is serving this ``` No `dnf` line runs, so `punktfunk-web` is never added. A Fedora user who first ran the docs' `sudo dnf install punktfunk`, or had any earlier host on the box, hits this on every re-run. Step 6 then silently dropped `punktfunk-web` from the units it enables, and the banner promised the URL regardless — so nothing anywhere said the console was missing. ## The fix - **Ask per package**, not all-or-nothing: `punktfunk-host` / `punktfunk-web-server` / `punktfunk-scripting`. A box that got the host by hand, from an older docs line, or from a package manager set to drop weak deps now gets its console on a re-run. Installing a package that is already there is a no-op, so re-running stays safe. - **Every install line names the console.** apt leaned on `Recommends: punktfunk-web` and pacman on an optdepend — both vanish under `APT::Install-Recommends "0"` / `install_weak_deps=False` / plain pacman. dnf already named it. - **Stop lying when it's absent**: step 6 warns instead of silently skipping, and the closing banner offers the install line rather than a URL nothing serves. The packages **keep** their weak deps on purpose — a hard `Requires` would break the COPR build, which has no bun and ships no console at all. No documented path leans on them any more. ## Channels already correct — verified, unchanged | channel | how the console arrives | |---|---| | Bazzite sysext | image bakes in web + scripting (CI passes both RPMs to `build-sysext.sh`) | | NixOS | `services.punktfunk.web.enable` defaults to `host.enable` | | SteamOS | `install.sh` defaults `WITH_WEB=1` (`--no-web` to opt out) | | Windows | bundled unconditionally, behind the payload guard added after 0.22.1/0.22.2 shipped console-less | | COPR | documented exception — no bun in mock; the README points at the Gitea registry | ## Why no gate caught it - `check-docs-drift.sh` **gate 7** asserted the install line only as far as the host package name, so a line that dropped the console still passed. It now names all three, per family. - `installer-smoke.yml` asserted `punktfunk-host --version` and **nothing** about the console. It now asserts the binary and the user unit per family, and carries the reported failure as a test: remove `punktfunk-web`, re-run the installer, require it back. ## Checks - `sh -n scripts/install.sh` — clean - `scripts/ci/check-docs-drift.sh` — all 7 gates, exit 0, zero `::error::` - `data/platforms.json` valid, and identical to the `docs-site/src/data` copy (gate 5) - All three installer scenarios by hand: clean box installs all three · host-only now installs the console · all-present still prints `already installed` (the smoke test greps for it) - Touches no Rust, so the rustfmt pre-push gates are unaffected `data/platforms.json` is the source for both the docs and the installer, so the per-distro pages, the install landing page and the web-console page moved with it — including a **"No console on a box that has the host?"** recovery block for anyone already stuck: ```sh sudo dnf install punktfunk-web # Fedora systemctl --user enable --now punktfunk-web ```
enricobuehler added 1 commit 2026-08-27 10:34:29 +00:00
fix(install): the web console is named in every install line, and a host that has none gets one
ci / bun-nix (pull_request) Successful in 24s
ci / docs-drift (pull_request) Successful in 25s
ci / docs-site (pull_request) Successful in 57s
ci / web (pull_request) Successful in 1m1s
installer-smoke / smoke (arch) (pull_request) Successful in 49s
ci / rust-arm64 (pull_request) Successful in 1m27s
apple / swift (pull_request) Successful in 2m6s
apple / distribute (pull_request) Skipped
apple / screenshots (pull_request) Skipped
installer-smoke / smoke (fedora-44) (pull_request) Successful in 2m21s
installer-smoke / smoke (debian-13) (pull_request) Successful in 3m19s
android / android (pull_request) Successful in 5m15s
ci / rust (pull_request) Successful in 6m10s
f6d85f11e2
Reported from the field: the guided installer (scripts/install.sh) left a Fedora box with a host
and no web console — and then printed the console's URL anyway. Reproduced with the real script
against a faked Fedora 44 os-release: with `punktfunk-host` on PATH the installer prints "already
installed — skipping the install" and never runs its dnf line, so `punktfunk-web` is never added.
The console is where you pair, approve a device and change every setting, so that box can stream
nothing and offers no way to fix it.

The registry was never the problem: `punktfunk-web` is present in the fedora-44 and bazzite RPM
groups, the debian repo and the arch repo (checked all four). The install step was gated on ONE
binary while installing THREE packages.

  * scripts/install.sh asks per package (host / punktfunk-web-server / punktfunk-scripting) instead
    of skipping everything the moment the host binary exists. A box that got the host by hand, from
    an older docs line, or from a package manager set to drop weak deps now gets its console on a
    re-run. Installing a package that is already there is a no-op, so re-running stays safe.
  * The install lines NAME the console on every family. apt relied on `Recommends: punktfunk-web`
    and pacman on an optdepend, both of which vanish under `APT::Install-Recommends "0"` /
    `install_weak_deps=False` / plain pacman. dnf already named it. The packages keep their weak
    deps — a hard Requires would break the COPR build, which has no bun and ships no console — but
    no documented path leans on them any more.
  * The installer stops lying when the console is absent: step 6 warns instead of silently dropping
    punktfunk-web from the units it enables, and the closing banner offers the install line rather
    than a URL nothing serves.

Verified unchanged on the channels that were already right: the Bazzite sysext bakes in web +
scripting, the NixOS module defaults `web.enable` to `host.enable`, the SteamOS script defaults
`WITH_WEB=1`, and the Windows installer bundles the console unconditionally behind a payload guard
added after 0.22.1/0.22.2 shipped without one. COPR is the documented exception (no bun in mock).

The gates that let this ship:
  * check-docs-drift.sh gate 7 asserted the install line only as far as the host package name, so
    a line that dropped the console still passed. It now names all three per family.
  * installer-smoke.yml asserted `punktfunk-host --version` and nothing about the console. It now
    asserts the binary and the user unit per family, and carries the reported failure as a test:
    remove punktfunk-web, re-run the installer, require it back.

data/platforms.json is the source for both the docs and the installer, so the per-distro pages,
the install landing page and the web-console page were updated with it — including a "no console on
a box that has the host?" recovery block for anyone already in this state.
enricobuehler merged commit 91fa05bc21 into main 2026-08-27 10:48:33 +00:00
enricobuehler deleted branch worktree-fedora-web-console-install 2026-08-27 10:48:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#409