feat: keel assemble refuses a template with a kernel or bootloader #89
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/container-template-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decision 0052: a container template must never contain a kernel, an initrd, firmware, a bootloader or the installer. These now live in a boot layer of their own (Keel-Linux/common#47, Keel-Linux/buildtasks
bt-layer --boot).Change
keel.layers.container:MACHINE_ONLYis a list of fnmatch patterns, each with its reason.check(rootfs)readsvar/lib/dpkg/statusand refuses the rootfs (exitASSEMBLE_FAILED) if any matching package is recorded. A package that was removed but not purged also counts. A dpkg database that is missing or unreadable is refused too.keel assemble --templatecallscheckbefore packing, so neither the template nor its.sha512is written. A rootfs assembled without--template, which is what the ISO is made from, is not checked.tests/test_layers_container.py. The fixture is the package list of the published core 19.0-9 template: its 28 machine-only packages must match and the 18 close-named packages it keeps must not. Future kernel, UEFI and microcode names are covered too, as are dpkg states, a template that is refused and not written, and a rootfs-only assemble. The synthetic core layer now carries a dpkg status file. Coverage is 100 % forcontainer.pyandassemble.pyand 99 % in total.The 28 packages came to about 190 MB of core 19.0-9's 904 MB. Locally, with the same set purged, core's tar.zst went from 360.3 to 199.8 MB and web's from 383.1 to 224.0 MB.
Merge order
Merge this last: first Keel-Linux/common#47 and the buildtasks PR, then rebuild the layers with
keel-release --rebuild. The current layers still contain the kernel, so this version refuses them.Locally, the full suite had 21 failures outside the layer code, in mesh tests such as
tests/test_mesh_vipbridge.py. That file also fails on main in this environment. CI is the reference.