go.mod: update osbuild/images to v0.120.0

This adds the RHEL 10.1 and 9.7 repositories

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-02-27 12:40:09 +01:00 committed by Tomáš Hozza
parent d5a77ffcb5
commit 06e232b55e
21 changed files with 528 additions and 19 deletions

View file

@ -148,6 +148,11 @@ type OSCustomizations struct {
// NoBLS configures the image bootloader with traditional menu entries
// instead of BLS. Required for legacy systems like RHEL 7.
NoBLS bool
// FirstBoot sets if the machine-id should be written with the
// magic value that determines if the machine is being booted for the
// first time.
FirstBoot bool
}
// OS represents the filesystem tree of the target image. This roughly
@ -808,6 +813,12 @@ func (p *OS) serialize() osbuild.Pipeline {
pipeline.AddStage(osbuild.NewCAStageStage())
}
if p.FirstBoot {
pipeline.AddStage(osbuild.NewMachineIdStage(&osbuild.MachineIdStageOptions{
FirstBoot: osbuild.MachineIdFirstBootYes,
}))
}
if p.SElinux != "" {
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),