Skip to content

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Aug 28, 2025

[port https://github.com/osbuild/bootc-image-builder/pull/1033 to pkg/distro/bootc - need to unblock https://github.com/osbuild/bootc-image-builder/pull/1014]

If the target image contains an aboot.img, then we automatically write it to the A slot boot partition.

If the target image contains an aboot.img, then we automatically
write it to the A slot boot partition.

Co-Authored-By: Michael Vogt <[email protected]>
@mvo5 mvo5 requested a review from a team as a code owner August 28, 2025 10:34
@mvo5 mvo5 requested review from croissanne, supakeen and thozza and removed request for a team August 28, 2025 10:34
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +122 to +125
sourcePipeline := "build"
if t.arch.distro.buildSourceInfo != nil {
sourcePipeline = "target"
}
Copy link
Member

Choose a reason for hiding this comment

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

Thanks to not being heavily involved in the bib development, I have a hard time figuring out why the sourcePipeline is set to these values. I tried to look into the bootc distro and see what the purpose of buildSourceInfo is, but there is no information available on that.

So, IMHO, this would deserve some comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was actually thinking about this too this morning. This comes straight (and unchanged) from bib but I wonder if its incorrect there actually. We do not have a "target" pipeline iirc, only build/image and the image pipeline will not contain the full bootc filesystem view iirc because we do not mount it by default. Maybe @alexlarsson can have a quick look and comment if/what we are missing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Normally, we run the "target" container (i.e. the bootc container you want to deploy in the disk image) as the "build" pipeline, but if your bootc container doesn't have the required tooling (such as the automotive minimal images) then we can use another container as the build pipeline.

However, we then need to copy things like disk customization from another source, not the build container. We do this in BootcDiskImage.InstantiateManifestFromContainers() by creating a new pipeline "target" that just copies the target container image to the tree.

I agree that looking at "buildSourceInfo" for this data is a bit hard to understand. Ideally the code in InstantiateManifestFromContainers should store a "ImageCustomizationPipelineName" variable somewhere we can just use.

@alexlarsson
Copy link
Contributor

Note, with #1816 merged, and osbuild/bootc-image-builder#1014 on the way, I think maybe we don't need this change?

If we add support in the yaml to set payload: raw with a filename, then at least for automotive, I'm fine with moving to use a yaml disk customization and setting the aboot raw source directly in that.

@mvo5
Copy link
Contributor Author

mvo5 commented Sep 3, 2025

Closing in favor of the new mechanism via disk.yaml which is more flexible #1816

@mvo5 mvo5 closed this Sep 3, 2025
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.

4 participants