distro/rhel9: update image-installer to new definition

Add the image function and remove the pipeline function.
Remove the build package set.

The image function (imageInstallerImage) was adapted from the same one
in Fedora.
This commit is contained in:
Achilleas Koutsou 2022-11-14 20:28:33 +01:00 committed by Christian Kellner
parent e031b45377
commit 108ac3931b
2 changed files with 30 additions and 2 deletions

View file

@ -35,7 +35,6 @@ var (
filename: "installer.iso",
mimeType: "application/x-iso9660-image",
packageSets: map[string]packageSetFunc{
buildPkgsKey: anacondaBuildPackageSet,
osPkgsKey: bareMetalPackageSet,
installerPkgsKey: anacondaPackageSet,
},
@ -45,7 +44,7 @@ var (
rpmOstree: false,
bootISO: true,
bootable: true,
pipelines: imageInstallerPipelines,
image: imageInstallerImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "anaconda-tree", "bootiso-tree", "bootiso"},
exports: []string{"bootiso"},

View file

@ -325,3 +325,32 @@ func edgeRawImage(workload workload.Workload,
return img, nil
}
func imageInstallerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.Spec,
rng *rand.Rand) (image.ImageKind, error) {
img := image.NewImageInstaller()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], options, containers, customizations)
img.ExtraBasePackages = packageSets[installerPkgsKey]
img.Users = users.UsersFromBP(customizations.GetUsers())
img.Groups = users.GroupsFromBP(customizations.GetGroups())
d := t.arch.distro
img.ISOLabelTempl = d.isolabelTmpl
img.Product = d.product
img.OSName = "redhat"
img.OSVersion = d.osVersion
img.Release = fmt.Sprintf("%s %s", d.product, d.osVersion)
img.Filename = t.Filename()
return img, nil
}