Repository navigation
bootc: extras (partitions) (HMS-11288, HMS-11287) - #2702
Conversation
4b843ad to
70983d6
Compare
|
The #2700 branch grew a commit to work with mountpoints inside container type filesystems so I've rebased this one. |
70983d6 to
c0f1d5d
Compare
Recently we landed "extras" support for additional artifacts that can be produced alongside an image type. I implemented that only for package based image type definitions. Add support for reading an `extras.yaml` file from the bootc container's legacy usr/lib/bootc-image-builder/). This follows the same pattern as `disk.yaml` and `iso.yaml`. Only partition extras are supported for `bootc` based image types. `sysexts` can be considered in the future but they need some work to figure out how we want to make them nice. Signed-off-by: Simon de Vlieger <[email protected]>
Fill up partitions on `BootcDiskImage` from the `extras.yaml` read from a container and wire up the pipeline generation during manifest creation. Signed-off-by: Simon de Vlieger <[email protected]>
Propagate the extras all the way so we can implement `Extras()` and `ExportsWithExtras()`. Sysext extras are explicitly rejected for bootc images for now. Signed-off-by: Simon de Vlieger <[email protected]>
Document the usage of `--with-extra` for `bootc` based images in the source of configuration document. Signed-off-by: Simon de Vlieger <[email protected]>
c0f1d5d to
d828a77
Compare
|
This PR has been rebased on top of #2700 and I've merged the variant support in as well so it's ready to be undrafted. |
| for name, p := range osInfo.ExtrasInfo.Partitions { | ||
| imgTypeYaml.Extras.Partitions[name] = partitionDef{ | ||
| Mountpoint: p.Mountpoint, | ||
| Filename: p.Filename, | ||
| Compression: p.Compression, | ||
| } | ||
| } |
There was a problem hiding this comment.
If I read it right, we're adding the partition extra here onto every bootc image type. But the actual pipeline is only created for disk image types in manifestForDisk, which I suppose makes sense.
If that's the case, could that cause problems somewhere?
Should the combination of partition extra and non-disk types maybe throw an error?
There was a problem hiding this comment.
It's a good question, we don't really have a nice way of scoping down extras only to specific image types at the moment. Some of the other extras might in the future work for non-disk image types.
We don't have this issue on the non-bootc side of things as there they are defined directly on the image type but in the bootc world the container can be any image type.
For me personally this isn't a big enough issue to include a bunch of filtering (containers that can be turned into ISOs are already quite specific and probably wouldn't include an extras.yaml (or disk.yaml) 1) but let's see how others feel about this too (cc @ondrejbudai / @achilleas-k).
We could opt for the simple approach for now as well and deny any extras in manifestForIso.
|
LGTM, with one small nitty question/finding. |
This is the implementation of the "extras" from #2700 for bootable container based images. It introduces a new
extras.yamlin the well-known configuration location, and wires up the necessary helpers and manifest generation for those exports to work.These extras allow for the production of coupled artifacts when building an image. Specifically in this PR the ability to export partitions separately from the main disk image being produced. This is useful for for example PocketBlue (#2632) where for their Android devices they want the ESP and root partitions separately for flashing.
Usage would look like (for a container that has an
extras.yamllooking like):We only support
partition-type extras for bootable containers (at least initially) as thesysext-type extras are tied to the package sets being installed, in the future we can probably inspect the container for installed packages; or default to always redo the entire transaction but I didn't want to make that decision for this PR.