plans: installer I2 re-brief of C2-13a (row 230, #1732) and C2-13b (row 226, #1727) for Vikunja #432. Q189: both units WantedBy=multi-user.target, root's 2c step enables both and starts the bus then the Console, no hand start at step 9 (gosalyn-0064, mos-1122, mos-1123). Row 190 landed first, so row 230 renders @CONFIG_ENV@ and @SESSION_ENV@
This commit is contained in:
1 parent
8a14931fa4
commit
ffc124bf68
1 file changed
+26
-12
@@ -761,6 +761,9 @@ Dewey approves the manifest. The webui suite is green on Sage's gate, along with
|
||||
|
||||
## C2-13a unit render and host precheck
|
||||
|
||||
Gitea #1732. Installer I2 with C2-13b, Vikunja P19 #432 (mos-1118). Re-briefed 2026-10-20 for Q189
|
||||
(the Console starts at install and at boot) and row 190's landing.
|
||||
|
||||
### Problem
|
||||
|
||||
The hub runs on 10.1.1.54 as `mosaic` under `/srv/mosaic`, as two system units,
|
||||
@@ -840,9 +843,13 @@ The render. It renders two system units from the checkout's existing templates a
|
||||
and empty otherwise.
|
||||
- `@CLAUDE_ENV@` is the line `Environment=MOSAIC_CLAUDE_BIN=<--claude>` when `factory` is given
|
||||
`--claude`, and empty otherwise.
|
||||
- Row 190 (round 3, in review) adds `@CONFIG_ENV@` and `@SESSION_ENV@` to the templates. They aren't on
|
||||
refactor, and the render refuses an unknown token, so whichever of rows 190 and 230 lands second adds
|
||||
both to this script with tests. A comment at the script's token list says so (gosalyn-0057 item 4).
|
||||
- `@CONFIG_ENV@` and `@SESSION_ENV@`, which row 190 added to the templates (landed 00d4cc1f6). The
|
||||
render refuses an unknown token, and row 190 landed first, so this row renders both, with tests
|
||||
(gosalyn-0057 item 4). Fill them as `scripts/instance.sh:85-107` does: for the default instance
|
||||
`dev` the `@CONFIG_ENV@` line is deleted and `@SESSION_ENV@` is the session env path under `%h`, which
|
||||
the `%h` rule below then makes literal. A named instance takes instance.sh's
|
||||
`Environment=MOSAIC_CONFIG=` line. The bus template's `EnvironmentFile=` line is now
|
||||
`mosaic-bus.service.in:25`, `EnvironmentFile=-@SESSION_ENV@`, and the checks below match it there.
|
||||
- `%h` becomes the literal `--home`, because in a system unit `%h` is root's home.
|
||||
- After the render it refuses any `@[A-Z_]+@` or `%h` left in either unit.
|
||||
|
||||
@@ -861,17 +868,20 @@ line restricts namespaces or system calls. A session's bwrap needs a user, PID a
|
||||
(`packages/seat/src/sandbox.mjs:67`) and a mount namespace, and `RestrictNamespaces=`,
|
||||
`PrivateUsers=` or `SystemCallFilter=` can each take one away, so it refuses a template or render that
|
||||
holds any of them.
|
||||
- `[Install]`. In the bus unit, `WantedBy=default.target` is replaced by `WantedBy=multi-user.target`,
|
||||
not followed by a second line (webby-0036 N1). The Console unit renders with no `[Install]` section
|
||||
(webby-0036 B1, mos-1097). The script enables only the bus unit. Jason starts the Console at design
|
||||
10 step 9 and after each boot.
|
||||
- No `After=` or `Wants=`. The Console never starts at boot, so there is no boot order to set, and
|
||||
serve calls the bus per request, so it starts without the bus (webby-0036 N2). The step 9 order is
|
||||
manual: the bus, then the Console. Stop in reverse.
|
||||
- `[Install]`. Each unit renders `WantedBy=multi-user.target` as its one `WantedBy=` line. In the bus
|
||||
unit it replaces `WantedBy=default.target`, not followed by a second line (webby-0036 N1). The
|
||||
Console unit gets the same line (Q189, mos-1122, mos-1123, gosalyn-0064 item 1). That reverses
|
||||
mos-1097 item 1 and webby-0036 B1's "no `[Install]` on the Console".
|
||||
- Root's 2c step enables both units, then starts the bus and then the Console (gosalyn-0064 item 2,
|
||||
design ruling after r11 at 8614ba87c). Both come back after a boot on their own. Design 10 step 9 has
|
||||
no hand start (item 3), and nothing in I1 or I3 starts the Console by hand either.
|
||||
- No `After=` or `Wants=`. serve calls the bus per request, so the Console starts without the bus
|
||||
(webby-0036 N2), and a boot that brings the Console up first is safe. The port below 1024, its
|
||||
capability lines and its precheck stay (mos-1110).
|
||||
|
||||
Checks. It refuses unless `User=`, `Group=`, `ExecStart=`, the bus unit's `EnvironmentFile=`, the
|
||||
hardening lines and the Console's two capability lines match fixed values. `EnvironmentFile=` is the
|
||||
line in `packages/cli/systemd/mosaic-bus.service.in:24`, with the literal home. The Console unit has
|
||||
line in `packages/cli/systemd/mosaic-bus.service.in:25` (`:24` before row 190), with the literal home. The Console unit has
|
||||
none, and it refuses one. It also refuses:
|
||||
- any `PermissionsStartOnly=`, and any `Exec*=` value whose leading run of prefix characters (`@`, `-`,
|
||||
`:`, `+`, `!`) holds a `+` or `!`. systemd takes those prefixes in any order, so `-+/srv/mosaic/x`
|
||||
@@ -935,7 +945,9 @@ It also prints free memory and verifies that HOME is `<home>`.
|
||||
default list and for `/usr/bin/node`, which gives `/usr/bin:/usr/local/bin:/bin`. Its `ExecStart=` is
|
||||
the copy's `scripts/mosaic`
|
||||
- the Console unit's `ExecStart=` starts with `--node` and holds the flags in order
|
||||
- the bus unit has exactly one `WantedBy=`, `multi-user.target`, and the Console unit has no `[Install]`
|
||||
- each unit has exactly one `WantedBy=`, `multi-user.target`
|
||||
- against a fake `systemctl` that records its argv, a clean run enables both units, then starts the bus,
|
||||
then the Console, in that order. A failed bus start refuses with the Console not started
|
||||
- both units hold the four hardening lines once, in order, and only the Console holds the two
|
||||
capability lines
|
||||
- a check of the script for `systemctl link` finds nothing
|
||||
@@ -996,6 +1008,8 @@ Webby approves the manifest. The test file and the cli suite are green on Sage's
|
||||
|
||||
## C2-13b install script and library precheck
|
||||
|
||||
Gitea #1727. Installer I2 with C2-13a, Vikunja P19 #432 (mos-1118).
|
||||
|
||||
### Problem
|
||||
|
||||
Nothing installs a library business on her host, and C2-13a's precheck doesn't yet check the library
|
||||
|
||||
Reference in new issue
Block a user