GRI-2173: mask gnome-initial-setup's first-login and upgrade-login wizards #303

Merged
vivy merged 2 commits from fix/GRI-2173-mask-gnome-initial-setup-wizards into dev 2026-11-17 13:41:15 +00:00
Member

Summary

Fixes #301

install.sh already wrote ~/.config/gnome-initial-setup-done for the kiosk
user, which stops only gnome-initial-setup-first-login.service. Ubuntu
26.04's gnome-initial-setup 50.0 adds a second per-user unit,
gnome-initial-setup-upgrade-login.service, that is gated on that same done
file plus a release-named marker (upgrade-<VERSION_ID>-done) — so writing
the done file is exactly what triggers the upgrade wizard, and it opens on
top of the player after every boot following an Ubuntu upgrade.

kiosk_apply's wizard step is replaced with a new kiosk_skip_wizard
function that, for the kiosk user only:

  1. Masks all three per-user units (gnome-initial-setup-first-login,
    gnome-initial-setup-upgrade-login, gnome-initial-setup-copy-worker) to
    /dev/null under ~/.config/systemd/user/, so no future release can
    bring them back by name alone.
  2. Keeps writing gnome-initial-setup-done, and also writes
    ~/.config/gnome-initial-setup/upgrade-<VERSION_ID>-done read from
    /etc/os-release (now $OS_RELEASE, overridable like the other path
    variables), belt and braces in case a unit is ever renamed.
  3. chown -h "$user:$user" every directory, marker and symlink created —
    fixing the old chown "$user:" call, which left ~/.config as
    scryglass:root rather than scryglass:scryglass. -h matters here
    because the masks are symlinks and the old call (without -h) would try
    to chown their target, /dev/null.
  4. Runs on install, reinstall and upgrade (idempotent either way), and
    never touches another user's home or masks the units system-wide — the
    admin's own account keeps gnome-initial-setup working normally.

Test plan

  • scripts/tests/install-client-kiosk-test.sh extended with a dedicated
    "wizard masks" section (fixture /etc/os-release content, checks all
    three masks, both done markers, chown -h user:group on every path,
    idempotency on a second run, and the no-os-release fallback) plus
    matching assertions inside the existing "whole step" install/upgrade
    integration test. All assertions pass locally.
  • scripts/tests/install-client-unit-test.sh and
    scripts/tests/install-client-upgrade-test.sh still pass unmodified
    (confirmed the former's "no systemd user manager" skip is pre-existing
    on this build host, unrelated to this change).
  • bash -n install.sh — syntax clean.
  • CI run on this branch (.github/workflows/ci.yml job "install.sh
    client upgrade" runs this exact test file).
  • Vivy's acceptance check on the campus test client 10.1.255.95: reboot,
    confirm no Welcome window, and the session journal shows the three
    units masked/skipped.
## Summary Fixes https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/issues/301 `install.sh` already wrote `~/.config/gnome-initial-setup-done` for the kiosk user, which stops only `gnome-initial-setup-first-login.service`. Ubuntu 26.04's `gnome-initial-setup` 50.0 adds a second per-user unit, `gnome-initial-setup-upgrade-login.service`, that is gated on that same done file plus a release-named marker (`upgrade-<VERSION_ID>-done`) — so writing the done file is exactly what *triggers* the upgrade wizard, and it opens on top of the player after every boot following an Ubuntu upgrade. `kiosk_apply`'s wizard step is replaced with a new `kiosk_skip_wizard` function that, for the kiosk user only: 1. Masks all three per-user units (`gnome-initial-setup-first-login`, `gnome-initial-setup-upgrade-login`, `gnome-initial-setup-copy-worker`) to `/dev/null` under `~/.config/systemd/user/`, so no future release can bring them back by name alone. 2. Keeps writing `gnome-initial-setup-done`, and also writes `~/.config/gnome-initial-setup/upgrade-<VERSION_ID>-done` read from `/etc/os-release` (now `$OS_RELEASE`, overridable like the other path variables), belt and braces in case a unit is ever renamed. 3. `chown -h "$user:$user"` every directory, marker and symlink created — fixing the old `chown "$user:"` call, which left `~/.config` as `scryglass:root` rather than `scryglass:scryglass`. `-h` matters here because the masks are symlinks and the old call (without `-h`) would try to chown their target, `/dev/null`. 4. Runs on install, reinstall *and* upgrade (idempotent either way), and never touches another user's home or masks the units system-wide — the admin's own account keeps gnome-initial-setup working normally. ## Test plan - [x] `scripts/tests/install-client-kiosk-test.sh` extended with a dedicated "wizard masks" section (fixture `/etc/os-release` content, checks all three masks, both done markers, `chown -h user:group` on every path, idempotency on a second run, and the no-os-release fallback) plus matching assertions inside the existing "whole step" install/upgrade integration test. All assertions pass locally. - [x] `scripts/tests/install-client-unit-test.sh` and `scripts/tests/install-client-upgrade-test.sh` still pass unmodified (confirmed the former's "no systemd user manager" skip is pre-existing on this build host, unrelated to this change). - [x] `bash -n install.sh` — syntax clean. - [ ] CI run on this branch (`.github/workflows/ci.yml` job "install.sh client upgrade" runs this exact test file). - [ ] Vivy's acceptance check on the campus test client 10.1.255.95: reboot, confirm no Welcome window, and the session journal shows the three units masked/skipped.
GRI-2173: mask gnome-initial-setup's first-login and upgrade-login wizards
Some checks failed
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 14s
CI / cargo deny (pull_request) Successful in 1m1s
CI / cargo deny advisories (pull_request) Failing after 1m19s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 2m20s
CI / frontend-web (pull_request) Successful in 1m25s
CI / cargo test (pull_request) Successful in 5m38s
CI / Notify gate failed (pull_request) Successful in 1s
CI / CI (pull_request) Failing after 1s
c8230e3a67
Writing gnome-initial-setup-done only stopped the first-login wizard.
Ubuntu 26.04's gnome-initial-setup 50.0 adds a second, upgrade-login
unit that is gated on that same done file and a release-named marker,
so it opened on top of the player on every boot after an upgrade.

Mask all three per-user units (first-login, upgrade-login, and the
copy-worker they share) to /dev/null in the kiosk user's own systemd
directory, so no future release can bring them back, and keep writing
both done markers belt and braces. Everything the step creates is now
chowned with -h and a group, fixing scryglass:root ownership left by
the old `chown "$user:"` call.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Member

Security judgement and fix: PR #308 accepts RUSTSEC-2026-0543 (chrono, unmaintained, no CVE, no fix available) with a dated deny.toml entry, same shape as the existing three. Full reasoning on issue #305. Once #308 merges to dev, rebasing this branch should clear cargo deny advisories.

Security judgement and fix: [PR #308](https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/308) accepts RUSTSEC-2026-0543 (chrono, unmaintained, no CVE, no fix available) with a dated `deny.toml` entry, same shape as the existing three. Full reasoning on [issue #305](https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/issues/305#issuecomment-14633). Once #308 merges to `dev`, rebasing this branch should clear `cargo deny advisories`.
Owner

#308 is in dev: the RUSTSEC-2026-0543 red is fixed there. Merge origin/dev into this branch (or re-run CI) to pick it up.

#308 is in `dev`: the RUSTSEC-2026-0543 red is fixed there. Merge `origin/dev` into this branch (or re-run CI) to pick it up.
Merge remote-tracking branch 'origin/dev' into fix/GRI-2173-mask-gnome-initial-setup-wizards
All checks were successful
CI / cargo fmt (pull_request) Successful in 5s
CI / the pre-push hook (pull_request) Successful in 6s
CI / install.sh client upgrade (pull_request) Successful in 14s
CI / cargo clippy (pull_request) Successful in 2m6s
CI / cargo deny (pull_request) Successful in 1m17s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo deny advisories (pull_request) Successful in 1m0s
CI / frontend-web (pull_request) Successful in 1m38s
CI / cargo test (pull_request) Successful in 6m2s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
5c2dfcceb4
vivy merged commit 685581104c into dev 2026-11-17 13:41:15 +00:00
vivy deleted branch fix/GRI-2173-mask-gnome-initial-setup-wizards 2026-11-17 13:41:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!303
No description provided.