Commit 23594c2
feat(build): honor [packages.<X>].enable + [deployment].target_<Y>
Commit 3 of 3 in the configurator-as-SSOT chain:
Commit A (fef19cf): toml schema -- enable flags + [deployment]
Commit B (3ea193d): configurator -- toggles for packages + targets
Commit C (this): build pipe -- honor the toggles
Build pipeline changes:
1. automation/lib/packages.sh now exports `_is_section_enabled
<category>` -- an awk-only TOML reader (no python3 dep, safe at
the very-early build phases when only base RPMs are present)
that returns 0 (enabled) for missing/true values and 1
(disabled) only when the toml explicitly has
`[packages.<category>].enable = false`.
`install_packages` and `install_packages_optional` consult
`_is_section_enabled` first and skip the dnf invocation entirely
when the operator unchecked the group in /configurator.html:
[packages.gaming].enable=false -- skipping (operator disabled
via /configurator.html)
`install_packages_strict` is unchanged on purpose -- it's used
for foundation-required packages (base, kernel, critical, etc.)
which the configurator HTML doesn't expose as toggles.
2. /usr/libexec/mios/mios-build-driver builds BIB_FORMATS from
[deployment].target_<key> in the layered toml. Resolution
precedence:
a. $MIOS_BIB_FORMATS env override (fast-iter dev)
b. ~/.config/mios/mios.toml [deployment].target_X = true
c. /etc/mios/mios.toml [deployment].target_X = true
d. /usr/share/mios/mios.toml [deployment].target_X = true
e. historical hard-default: "vhdx qcow2 iso raw wsl"
Underscore-to-hyphen translation for BIB --type:
toml: target_anaconda_iso -> BIB --type anaconda-iso
Default behavior with shipped vendor toml: identical to before
(vhdx qcow2 iso raw wsl). Difference is the operator can now
toggle ami / ova / anaconda_iso ON via the configurator without
editing build-mios.ps1 / mios-build-driver.
Verified the awk parsers against the real
/usr/share/mios/mios.toml on this box:
[packages.bloat].enable -> false (will be skipped)
[packages.gaming].enable -> true (will install)
[deployment] targets enabled -> vhdx qcow2 iso raw wsl
Bash syntax of both edited files: clean.
End-to-end behavior the operator now sees:
1. Open /configurator.html in Epiphany (mios-build-driver step).
2. Uncheck e.g. "ceph" + "freeipa" + check "ami" + "ova".
3. Save -> mios.toml writes
[packages.ceph].enable = false
[packages.freeipa].enable = false
[deployment].target_ami = true
[deployment].target_ova = true
4. Build proceeds:
[packages.sh] [packages.ceph].enable=false -- skipping
[packages.sh] [packages.freeipa].enable=false -- skipping
building vhdx ... qcow2 ... iso ... raw ... wsl ... ami ... ova
5. Output artifacts in /var/lib/mios/build/output/ now include
ami + ova in addition to the 5 portable formats.
The full configurator-as-SSOT chain is in place. The operator's
choices in the HTML drive the actual build with no terminal
prompts (other than password when password_policy=interactive,
per the toml schema's secrets policy).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 3ea193d commit 23594c2
2 files changed
Lines changed: 83 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
129 | 159 | | |
130 | 160 | | |
| 161 | + | |
| 162 | + | |
131 | 163 | | |
132 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
133 | 169 | | |
134 | 170 | | |
135 | 171 | | |
| |||
165 | 201 | | |
166 | 202 | | |
167 | 203 | | |
168 | | - | |
169 | | - | |
| 204 | + | |
170 | 205 | | |
171 | 206 | | |
172 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
173 | 212 | | |
174 | 213 | | |
175 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
360 | 393 | | |
361 | 394 | | |
362 | 395 | | |
363 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
364 | 400 | | |
365 | | - | |
| 401 | + | |
366 | 402 | | |
367 | 403 | | |
368 | 404 | | |
369 | 405 | | |
370 | 406 | | |
371 | 407 | | |
372 | | - | |
| 408 | + | |
373 | 409 | | |
374 | 410 | | |
375 | 411 | | |
| |||
0 commit comments