Repository navigation
test(sysext): restore the GRUB live media coverage on a verity-only extension - #5110
Merged
Merged
Conversation
…xtension 01323bd reverted the whole GRUB live media chain because one commit in it, de2579b, moved hello.sh out of /usr/local/bin on the premise that a sysext cannot merge there. That premise is wrong: 99_sysext.yaml puts /usr/local/bin in SYSTEMD_SYSEXT_HIERARCHIES on both the UKI and the GRUB drop-in, and uki_test.go has been asserting a merge there for a while. The cause of the original red was the other commit in the chain, 1ee2586, and the revert threw that away with it. tests/assets/sysext was baked onto every ISO, and its work.sysext.raw is verity and signed with the test db.key. Only a UKI cell enrols the matching certificate, so on a plain GRUB cell (secureboot: false for the whole test-core matrix) dm-verity setup fails with ENOKEY, which is a hard return out of systemd-sysext's merge_subprocess rather than a soft skip, and the refresh takes every other extension on the machine down with it. That is what reddened test-core/bundles, an unrelated spec. Restore the chain without de2579b: the asset directory splits into sysext-uki (verity and signed) and sysext-grub (verity only, same hello.sh payload), _build-iso.yaml picks one by trusted_boot behind a test_sysext_overlay opt-in so a release ISO ships neither, and the GRUB half of the sweep gets its spec back. Point immucore's verity-signature tests at the UKI directory, which is where the signed asset now lives, and cover the GRUB asset too: kairos-io#4989 both skips an image that fails the policy and skips a signed one on a boot with no certificates, so the GRUB media has to carry an extension that check keeps, or the sweep has nothing left to merge. hello-broke stays off the GRUB overlay: kairos-io#4989 would drop it before systemd-sysext saw it, so asserting on it belongs in a spec about that filter rather than in this one. Part of kairos-io#4966 Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
ci-robbot
temporarily deployed
to
fork-pr-builds
October 1, 2026 12:19 — with
GitHub Actions
Inactive
This was referenced Oct 1, 2026
Closed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4966
Summary
01323bd5reverted the whole GRUB live media chain because of one commit init,
de2579bf, which movedhello.shout of/usr/local/binon the premisethat a sysext cannot merge there. That premise is wrong, and the revert message
is right about why:
99_sysext.yamllists/usr/local/bininSYSTEMD_SYSEXT_HIERARCHIESon both the UKI and the GRUB drop-in, anduki_test.gohas been asserting a merge there for a while.The cause of the original red was a different commit in the same chain,
1ee2586d, and reverting the chain threw that fix away too. Before it,tests/assets/sysextwas baked onto every ISO, and itswork.sysext.rawisverity and signed with
tests/assets/keys/db.key. Only a UKI cell enrolsthe matching certificate; the whole
test-corematrix runssecureboot: false.So on a plain GRUB cell dm-verity setup fails:
and that is a hard return out of
merge_subprocessin systemd'ssrc/sysext/sysext.c, not then_ignored++; continue;an incompatible imagegets. One such image therefore costs the machine every other extension, which
is how an unrelated spec,
test-core / bundles, went red (#5004).This restores the chain without
de2579bf:tests/assets/sysextsplits intosysext-uki(verity and signed) andsysext-grub(verity only, no signature partition, samehello.shpayloadin
/usr/local/bin)._build-iso.yamlpicks the directory fromtrusted_boot, behind atest_sysext_overlayopt-in that defaults to false, andrelease.yamlpinsit false at every caller, so a shipped ISO carries neither.
tests/sysext_live_media_test.gocomes back as thesysextcell of thetest-corematrix, asserting the extension reaches/var/lib/kairos/extensions, is enabled for the booted state, is linked into/run/extensions, is merged into/usr/local/binand runs.immucore/pkg/state/verity_signature_internal_test.goarrived in #4989 afterthe revert, so its
assetsconstant pointed at the merged directory. It nowpoints at
sysext-uki, where the signed asset lives, and gains two cases thatread the GRUB asset: #4989 skips both an image that fails the policy and a
signed image on a boot with no certificates, so the GRUB media has to carry an
extension that check keeps or the sweep has nothing left to merge.
hello-broke.sysext.rawstays off the GRUB overlay. Since #4989 immucore woulddrop it before
systemd-sysext refreshsaw it, so asserting on it is a test ofthat filter and belongs in a spec about the filter, not in this one.
How it was tested
go test ./immucore/pkg/state/...passes, including the three new cases thatread
tests/assets/sysext-grub/work.sysext.rawand assert it carries noverity signature and is kept on a GRUB boot.
go vet ./immucore/...andgo vet ./...in thetestsmodule are clean, sothe restored spec still compiles against current
master.state at
caacbc85, which passedyamllintandactionlintin CI before therevert.
git rev-parsewas used to confirm the restored blobs match1ee2586dandcaacbc85exactly, and thatsysext-grub/work.sysext.rawisthe pre-
de2579bfimage.Not tested in a boot. There is no QEMU, no
/dev/kvmand no docker in theenvironment this was written in, so CI is the reproduction. The revert asked
for the next attempt to start from a real local reproduction and I cannot
provide one. What I can say is that this isolates the question to a single
variable: with
de2579bfleft out, the GRUB extension merges/usr/local/binagain. If
test-core / installreds on the edgevpn bundle it declares withrootfs_path: /usr/local/bin(tests/install_test.go:173), that red is thereproduction, and
de2579bf's observation was right even though its statedcause was not. If it stays green, the revert's objection is settled and the
coverage is back.
AI was used to write this change. No human has read it yet.