Commit 742e09a
committed
fix(postcheck): #11 filters boot-order false positives from tmpfiles dry-run
Build was failing at postcheck #11 with:
/usr/lib/tmpfiles.d/mios-infra.conf:5: Failed to resolve group 'cockpit': Unknown group
/usr/lib/tmpfiles.d/mios-infra.conf:6: Failed to resolve group 'cockpit': Unknown group
cockpit is declared by upstream cockpit-bridge's sysusers.d entry. At
runtime the boot order is sysusers -> tmpfiles, so tmpfiles resolves
the group fine. At BUILD time inside the OCI image, sysusers has not
run, so a tmpfiles --dry-run reports a false positive.
Fix: harvest every user + group declared by ANY sysusers.d file (both
/etc/sysusers.d and /usr/lib/sysusers.d, awk first-field of u/g lines)
and filter out only the 'Failed to resolve (user|group) X: Unknown
(user|group)' warnings whose X is in that declared set. Genuine
tmpfiles errors -- bad path syntax, unknown line type, missing
required field, /var/run/lock paths (caught by #9), etc. -- still fail
the build.
Tested all three scenarios:
- cockpit (declared in sysusers.d) -> warning dropped
- unknown_grp (NOT declared) -> warning kept (would fail)
- 'Unknown line type XXXX' (real error) -> kept (would fail)
awk uses match($0, regex, array) which is gawk-only -- the Fedora
bootc base image ships gawk as /usr/bin/awk so this is safe.1 parent fecf03f commit 742e09a
1 file changed
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
303 | 312 | | |
304 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
305 | 324 | | |
306 | 325 | | |
307 | 326 | | |
308 | 327 | | |
309 | 328 | | |
310 | 329 | | |
311 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
312 | 347 | | |
313 | 348 | | |
314 | 349 | | |
315 | 350 | | |
316 | 351 | | |
317 | 352 | | |
318 | | - | |
| 353 | + | |
319 | 354 | | |
320 | 355 | | |
321 | 356 | | |
| |||
0 commit comments