Commit 92dc432
committed
fix(forge): correct podman exec UID + relax firstboot hardening + docs
THREE LATENT ISSUES IN THE FIRSTBOOT CHAIN
1. forge-firstboot.sh: 'podman exec --user mios-forge mios-forge ...'
was wrong -- '--user' looks up the username inside the CONTAINER's
/etc/passwd, where the user is 'git' (the Forgejo image's
convention) not 'mios-forge'. Pinned to numeric '816:816' which
matches the in-container UID we configured via USER_UID=816 in the
Quadlet, so the lookup succeeds against the container's nsswitch.
2. mios-forge-firstboot.service: RestrictNamespaces=yes and
RestrictAddressFamilies=AF_UNIX,AF_INET,AF_INET6 broke Podman's
CRIU/conmon attach path on rootful container exec (the runtime
needs CLONE_NEWNS / CLONE_NEWPID family transitions during
exec-attach). Dropped both directives; ReadWritePaths now
explicitly includes /var/lib/containers and /run/containers so the
container state stays writable, and ProtectHome=yes +
ProtectSystem=strict still scope the script's blast radius.
3. Documentation gaps: INDEX.md service-gating table didn't list
mios-forge / mios-forge-firstboot; DEPLOY.md verification section
didn't cover the forge. Both fixed in this commit.
NEW: just forge target
Surfaces forge status post-deploy:
- mios-forge.service active/inactive
- mios-forge-firstboot.service status + .firstboot-done sentinel
- URL, admin user/email (read from install.env)
- 'sudo cat /etc/mios/forge/admin-password' hint
- copy-pasteable 'git remote add origin' line
DOCS UPDATED
INDEX.md \xa75 -- mios-forge + mios-forge-firstboot rows added to the
service-gating table (Condition* directives that
short-circuit each service when its preconditions
aren't met).
DEPLOY.md -- new 'Self-hosted Git forge (mios-forge)' subsection
with end-to-end verification commands and the
default ports.
Justfile -- 'just forge' target (one-shot status + operator
hint surface).1 parent ee5c601 commit 92dc432
5 files changed
Lines changed: 64 additions & 8 deletions
File tree
- usr
- libexec/mios
- lib/systemd/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
0 commit comments