You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(eif): resign guest EIFs during host image repack
Extend img2img so that when a host variant embeds guest EIFs (declared
under `[package.metadata.build-variant.guest-images]`), the repack walks
each guest's install path and re-signs every `*.eif` in place via
`eif-builder resign`. The kernel, cmdline, ramdisk, and metadata sections
are byte-preserved; only the SIGNATURE section (and header CRC) are
rewritten. Uses the same [eif] signing profile as the host build.
Adds an end-to-end integration test that builds a host variant embedding
a guest EIF and verifies every guest EIF under the resulting output has
been resigned with the expected certificate.
# and rpm2eif's "no signing.crt ⇒ unsigned" behavior. This keeps repack
272
+
# usable on stripped-down local dev flows without an Infra.toml.
273
+
if [[ -n"${GUEST_IMAGES}" ]];then
274
+
# Fail hard rather than silently skip: an operator who declared
275
+
# `[[guest-images]]` in the manifest expects those EIFs to be resigned
276
+
# (otherwise there is no reason to invoke repack against a host that
277
+
# embeds them). The current implementation walks the extracted `${ROOT_MOUNT}`
278
+
# directory tree, which only exists in the erofs path — for an ext4
279
+
# rootfs, edits go through `debugfs_replace` and there is no live tree
280
+
# to `find` under. Adding an ext4-path implementation is possible (see
281
+
# plan Approach A) but out of scope here. Fail loudly so a future ext4
282
+
# host+guest combination shows up as a concrete task rather than a
283
+
# silently-broken build.
284
+
if [[ "${EROFS_ROOT_PARTITION}"!="yes" ]];then
285
+
echo"img2img: --guest-images is set but rootfs is not erofs; guest-EIF resign is only implemented for erofs rootfs. Enable erofs-root-partition on the host variant or drop the guest-images declaration.">&2
0 commit comments