diff --git a/modules/i3status-rust/README.md b/modules/i3status-rust/README.md index 6759d3c..b0cb60c 100644 --- a/modules/i3status-rust/README.md +++ b/modules/i3status-rust/README.md @@ -2,7 +2,7 @@ The bars as a module (novox/hq ADR 0208, research 026/05). -- Installs `i3status-rust`, and `pacman-contrib` for `checkupdates`, which the update block uses. +- Installs `i3status-rust`. The update block's `checkupdates` comes from `pacman-contrib`, which the `pacman` module installs on every node; two modules declaring one package is refused at composition. Claims the mesh's `node-bar` seat (no verbs yet, ADR 0208 ยง2). Requires `x11-display` on its own machine: its bars are i3bar's. - Owns `~/.config/i3status-rust/`, both bars (`top-bar.toml`, `bottom-bar.toml`) and their icon set @@ -82,5 +82,5 @@ Until one of them is chosen, **the laptop's bar shows no battery** once this mod - The battery block waits for one of the two ways above. - The watchdog would be a user unit once user-scoped units ship (mesh-host #72). It is not, because it runs per session and ends with the session, as a session-start line already does. -- `pacman-contrib` is declared here. A future `pacman` module that wants `checkupdates` or `paccache` - takes it over, since a package is declared once per node. +- `pacman-contrib` is the `pacman` module's, which took it over as foreseen: a package is declared + once per node. diff --git a/modules/i3status-rust/cmd/i3status-rust-tools/manifest_test.go b/modules/i3status-rust/cmd/i3status-rust-tools/manifest_test.go index 0b4dde1..1487c2b 100644 --- a/modules/i3status-rust/cmd/i3status-rust-tools/manifest_test.go +++ b/modules/i3status-rust/cmd/i3status-rust-tools/manifest_test.go @@ -22,7 +22,7 @@ func TestItClaimsTheBarSeatAndRequiresTheXDisplay(t *testing.T) { if !reflect.DeepEqual(m.Requires, []string{"x11-display"}) { t.Fatalf("requires: %v", m.Requires) } - if present, absent := m.packages(); !reflect.DeepEqual(present, []string{"i3status-rust", "pacman-contrib"}) || absent != nil { + if present, absent := m.packages(); !reflect.DeepEqual(present, []string{"i3status-rust"}) || absent != nil { t.Fatalf("packages: %v, absent %v", present, absent) } } diff --git a/modules/i3status-rust/module.json b/modules/i3status-rust/module.json index f0249c1..febb652 100644 --- a/modules/i3status-rust/module.json +++ b/modules/i3status-rust/module.json @@ -32,11 +32,6 @@ "type": "package", "package": "i3status-rust" }, - { - "id": "update-check", - "type": "package", - "package": "pacman-contrib" - }, { "id": "configuration-dir", "type": "directory", diff --git a/modules/lemurs/README.md b/modules/lemurs/README.md index 47670ad..f6537a3 100644 --- a/modules/lemurs/README.md +++ b/modules/lemurs/README.md @@ -5,9 +5,10 @@ The login manager as a module (novox/hq ADR 0208, research 026, to-be 42 phase 2 - **Claims `node-login-manager`** and serves its verb `sessions`. - **Package `lemurs`**, from the official repositories. It replaces the user repository's `lemurs-git` that both workstations run. -- **Service `lemurs.service`, enabled at boot.** It is its own `display-manager.service` alias. Its - state is declared as nothing: a push never starts, stops or restarts the login manager, because - restarting it ends the session it started. A change to its configuration applies at its next +- **Service `lemurs.service`, enabled at boot and running.** It is its own `display-manager.service` + alias. It declares no restart or reload trigger, so a push starts it only where it is not running + and never restarts it, because restarting it ends the session it started. (A state is required: + the host refuses `boot` on a service that leaves its state to the machine.) A change to its configuration applies at its next start (a reboot). - **Gated by `package-manager`, `service-manager` and `seat`.** A machine without a display has nothing to log into. diff --git a/modules/lemurs/cmd/lemurs-tools/manifest_test.go b/modules/lemurs/cmd/lemurs-tools/manifest_test.go index b2a2815..3876469 100644 --- a/modules/lemurs/cmd/lemurs-tools/manifest_test.go +++ b/modules/lemurs/cmd/lemurs-tools/manifest_test.go @@ -75,12 +75,14 @@ func TestTheOfficialPackageAndItsServiceEnabledButNeverRestarted(t *testing.T) { t.Fatalf("the official package, not lemurs-git: %v", p) } s := resource(t, m, "service") - if s["unit"] != "lemurs.service" || s["boot"] != "enabled" { + // Running and enabled: the host refuses boot without a state (a stateless service declares only + // its triggers). Running starts it only where it is not; with no trigger, nothing restarts it. + if s["unit"] != "lemurs.service" || s["boot"] != "enabled" || s["state"] != "running" { t.Fatalf("%v", s) } - for _, k := range []string{"state", "restart-on", "reload-on"} { + for _, k := range []string{"restart-on", "reload-on"} { if _, ok := s[k]; ok { - t.Fatalf("the login manager is never started, stopped or restarted by a push (%s): a change applies at its next start", k) + t.Fatalf("the login manager is never restarted by a push (%s): a change applies at its next start", k) } } if strings.Join(m.Capabilities, ",") != "package-manager,service-manager,seat" { diff --git a/modules/lemurs/module.json b/modules/lemurs/module.json index 1c79a7c..bf56ee1 100644 --- a/modules/lemurs/module.json +++ b/modules/lemurs/module.json @@ -48,6 +48,7 @@ "id": "service", "type": "service", "unit": "lemurs.service", + "state": "running", "boot": "enabled" } ],