distro/rhel85: add install option for grub2 stage
Add a new `install` option to the `grub2StageOptions` which directly translates to the `uefi.install` option for the grub2 stage. This should be false for all existing pipelines, where RPM directly is used to fill `/boot/efi/EFI/<vendor>`. Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net> Co-Developed-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
parent
4fdf4dbd01
commit
f08fa8c5ca
2 changed files with 10 additions and 9 deletions
|
|
@ -47,7 +47,7 @@ func qcow2Pipelines(t *imageType, customizations *blueprint.Customizations, opti
|
|||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer, false))
|
||||
treePipeline.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ func vhdPipelines(t *imageType, customizations *blueprint.Customizations, option
|
|||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer, false))
|
||||
treePipeline.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ func vmdkPipelines(t *imageType, customizations *blueprint.Customizations, optio
|
|||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer, false))
|
||||
treePipeline.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ func openstackPipelines(t *imageType, customizations *blueprint.Customizations,
|
|||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer, false))
|
||||
treePipeline.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ func ec2CommonPipelines(t *imageType, customizations *blueprint.Customizations,
|
|||
|
||||
treePipeline.AddStage(osbuild.NewFSTabStage(partitionTable.FSTabStageOptionsV2()))
|
||||
kernelVer := kernelVerStr(packageSetSpecs[blueprintPkgsKey], customizations.GetKernel().Name, t.Arch().Name())
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer))
|
||||
treePipeline.AddStage(bootloaderConfigStage(t, partitionTable, customizations.GetKernel(), kernelVer, false))
|
||||
// The last stage must be the SELinux stage
|
||||
treePipeline.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
|
|
@ -1011,7 +1011,7 @@ func qemuPipeline(inputPipelineName, inputFilename, outputFilename, format, qcow
|
|||
return p
|
||||
}
|
||||
|
||||
func bootloaderConfigStage(t *imageType, partitionTable disk.PartitionTable, kernel *blueprint.KernelCustomization, kernelVer string) *osbuild.Stage {
|
||||
func bootloaderConfigStage(t *imageType, partitionTable disk.PartitionTable, kernel *blueprint.KernelCustomization, kernelVer string, install bool) *osbuild.Stage {
|
||||
if t.arch.name == distro.S390xArchName {
|
||||
return osbuild.NewZiplStage(new(osbuild.ZiplStageOptions))
|
||||
}
|
||||
|
|
@ -1019,7 +1019,7 @@ func bootloaderConfigStage(t *imageType, partitionTable disk.PartitionTable, ker
|
|||
kernelOptions := t.kernelOptions
|
||||
uefi := t.supportsUEFI()
|
||||
legacy := t.arch.legacy
|
||||
return osbuild.NewGRUB2Stage(grub2StageOptions(partitionTable.RootPartition(), partitionTable.BootPartition(), kernelOptions, kernel, kernelVer, uefi, legacy))
|
||||
return osbuild.NewGRUB2Stage(grub2StageOptions(partitionTable.RootPartition(), partitionTable.BootPartition(), kernelOptions, kernel, kernelVer, uefi, legacy, install))
|
||||
}
|
||||
|
||||
func bootloaderInstStage(filename string, pt *disk.PartitionTable, arch *architecture, kernelVer string, devices *osbuild.Devices, mounts *osbuild.Mounts, disk *osbuild.Device) *osbuild.Stage {
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ func xorrisofsStageOptions(filename string, arch string) *osbuild.XorrisofsStage
|
|||
}
|
||||
|
||||
func grub2StageOptions(rootPartition *disk.Partition, bootPartition *disk.Partition, kernelOptions string,
|
||||
kernel *blueprint.KernelCustomization, kernelVer string, uefi bool, legacy string) *osbuild.GRUB2StageOptions {
|
||||
kernel *blueprint.KernelCustomization, kernelVer string, uefi bool, legacy string, install bool) *osbuild.GRUB2StageOptions {
|
||||
if rootPartition == nil {
|
||||
panic("root partition must be defined for grub2 stage, this is a programming error")
|
||||
}
|
||||
|
|
@ -333,7 +333,8 @@ func grub2StageOptions(rootPartition *disk.Partition, bootPartition *disk.Partit
|
|||
|
||||
if uefi {
|
||||
stageOptions.UEFI = &osbuild.GRUB2UEFI{
|
||||
Vendor: "redhat",
|
||||
Vendor: "redhat",
|
||||
Install: install,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue