distro/rhel85: make isolinux installation optional

isolinux might not be wanted if legacy support is not desired or if it
is not supported by the architecture, i.e. by anything else than x86.
This commit is contained in:
Christian Kellner 2021-08-20 13:06:21 +02:00 committed by Tom Gundersen
parent 4126f4e17a
commit 242e1d69ee
2 changed files with 16 additions and 10 deletions

View file

@ -490,7 +490,7 @@ func edgeInstallerPipelines(t *imageType, customizations *blueprint.Customizatio
ostreeRepoPath := "/ostree/repo"
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), ostreePayloadStages(options, ostreeRepoPath)))
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), ostreeKickstartStageOptions(fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref)))
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name()))
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), false))
return pipelines, nil
}
@ -522,7 +522,7 @@ func tarInstallerPipelines(t *imageType, customizations *blueprint.Customization
tarPayloadStages := []*osbuild.Stage{tarStage("os", tarPath)}
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), tarPayloadStages))
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), tarKickstartStageOptions(fmt.Sprintf("file://%s", tarPath))))
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name()))
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), true))
return pipelines, nil
}
@ -900,12 +900,12 @@ func bootISOTreePipeline(kernelVer string, arch string, ksOptions *osbuild.Kicks
return p
}
func bootISOPipeline(filename string, arch string) *osbuild.Pipeline {
func bootISOPipeline(filename string, arch string, isolinux bool) *osbuild.Pipeline {
p := new(osbuild.Pipeline)
p.Name = "bootiso"
p.Build = "name:build"
p.AddStage(osbuild.NewXorrisofsStage(xorrisofsStageOptions(filename, arch), xorrisofsStageInputs("bootiso-tree")))
p.AddStage(osbuild.NewXorrisofsStage(xorrisofsStageOptions(filename, arch, isolinux), xorrisofsStageInputs("bootiso-tree")))
p.AddStage(osbuild.NewImplantisomd5Stage(&osbuild.Implantisomd5StageOptions{Filename: filename}))
return p

View file

@ -300,18 +300,24 @@ func discinfoStageOptions(arch string) *osbuild.DiscinfoStageOptions {
}
}
func xorrisofsStageOptions(filename string, arch string) *osbuild.XorrisofsStageOptions {
return &osbuild.XorrisofsStageOptions{
func xorrisofsStageOptions(filename string, arch string, isolinux bool) *osbuild.XorrisofsStageOptions {
options := &osbuild.XorrisofsStageOptions{
Filename: filename,
VolID: fmt.Sprintf("RHEL-8-5-0-BaseOS-%s", arch),
SysID: "LINUX",
Boot: osbuild.XorrisofsBoot{
EFI: "images/efiboot.img",
}
if isolinux {
options.Boot = &osbuild.XorrisofsBoot{
Image: "isolinux/isolinux.bin",
Catalog: "isolinux/boot.cat",
},
EFI: "images/efiboot.img",
IsohybridMBR: "/usr/share/syslinux/isohdpfx.bin",
}
options.IsohybridMBR = "/usr/share/syslinux/isohdpfx.bin"
}
return options
}
func grub2StageOptions(rootPartition *disk.Partition, bootPartition *disk.Partition, kernelOptions string,