manifest: add support for selecting grub2.legacy

Older OS versions (RHEL 7) with older versions of grub2 don't support
BLS entries.  Setting NoBLS to true configures the bootloader with
traditional menu entries through the grub2.legacy osbuild stage.  This
requires specifying extra information for the OS to the pipeline:
version, product, and nick.
This commit is contained in:
Achilleas Koutsou 2023-01-23 23:45:18 +01:00 committed by Tomáš Hozza
parent 83fc8218d6
commit b39d802155
3 changed files with 69 additions and 25 deletions

View file

@ -26,6 +26,11 @@ type LiveImage struct {
Filename string
Compression string
PartTool osbuild.PartTool
NoBLS bool
OSProduct string
OSVersion string
OSNick string
}
func NewLiveImage() *LiveImage {
@ -47,6 +52,10 @@ func (img *LiveImage) InstantiateManifest(m *manifest.Manifest,
osPipeline.OSCustomizations = img.OSCustomizations
osPipeline.Environment = img.Environment
osPipeline.Workload = img.Workload
osPipeline.NoBLS = img.NoBLS
osPipeline.OSProduct = img.OSProduct
osPipeline.OSVersion = img.OSVersion
osPipeline.OSNick = img.OSNick
imagePipeline := manifest.NewRawImage(m, buildPipeline, osPipeline)
imagePipeline.PartTool = img.PartTool