Skip to content

fix(buildsys): include EIF artifacts in copy_guest_image_artifacts - #690

Merged
ginglis13 merged 1 commit into
bottlerocket-os:developfrom
ginglis13:fix-eif-guest-copy
Jul 28, 2026
Merged

ginglis13 merged 1 commit into
bottlerocket-os:developfrom
ginglis13:fix-eif-guest-copy

Conversation

@ginglis13

@ginglis13 ginglis13 commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Issue number:

n/a

Description of changes:

rpm2eif produces three artifacts that use naming conventions
incompatible with the existing dot-suffix allowlist: {prefix}.eif,
{prefix}-disk.img, and {prefix}-kernel.

Without this fix, copy_guest_image_artifacts silently drops all
EIF outputs when embedding a guest variant into a host image, because
the find glob *.${suffix} never matches the hyphen-separated
names.

Add eif to IMAGE_ARTIFACT_SUFFIXES and introduce a new
IMAGE_ARTIFACT_GLOBS array for patterns that cannot be expressed as
dot-suffixes. Update guest-images-helper to iterate both arrays when
building the find command. Update shell and Rust integration tests to
cover the new artifact types.

Testing done:

Built a variant with these changes, image-format = "eif", standalone-image = true, and bottlerocket-os/bottlerocket-core-kit#944

After building the host variant, extracted its EROFS root partition and checked the guest embed paths:

$ dump.erofs --ls --path /…/usr/share/bottlerocket/guests/enclave /tmp/host-root.img

NID TYPE  FILENAME
26123648    1  bottlerocket-aws-dev-enclave-x86_64-1.63.0-7e3a523f-disk.img
26140035    1  bottlerocket-aws-dev-enclave-x86_64-1.63.0-7e3a523f-kernel
26146876    1  bottlerocket-aws-dev-enclave-x86_64-1.63.0-7e3a523f.eif
26153717    7  latest-disk.img
26153721    7  latest-kernel
 7463527    7  latest.eif

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@ginglis13
ginglis13 requested a review from jmt-lab July 27, 2026 21:41
rpm2eif produces three artifacts that use naming conventions
incompatible with the existing dot-suffix allowlist: {prefix}.eif,
{prefix}-disk.img, and {prefix}-kernel.

Without this fix, `copy_guest_image_artifacts` silently drops all
EIF outputs when embedding a guest variant into a host image, because
the find glob `*.${suffix}` never matches the hyphen-separated
names.

Add `eif` to IMAGE_ARTIFACT_SUFFIXES and introduce a new
IMAGE_ARTIFACT_GLOBS array for patterns that cannot be expressed as
dot-suffixes. Update guest-images-helper to iterate both arrays when
building the find command. Update shell and Rust integration tests to
cover the new artifact types.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@ginglis13
ginglis13 force-pushed the fix-eif-guest-copy branch from 4945804 to 1b853e2 Compare July 27, 2026 21:42

@jmt-lab jmt-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ginglis13

Copy link
Copy Markdown
Contributor Author

Added testing details

@ginglis13
ginglis13 merged commit b4575c0 into bottlerocket-os:develop Jul 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants