From 115c0717c4097b0e0d142c8d476c4edabdd56b47 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 23 Nov 2022 22:09:29 +0100 Subject: [PATCH] manifest: remove Anaconda pipeline from EFIBootTree Remove dependence of EFIBootTree pipeline (efiboot-tree) on an Anaconda pipeline. The Anaconda pipeline was used to get the product and version strings, so we pass those in instead. This way, we an use the pipeline without needing an Anaconda pipeline. The EFI tree shouldn't depend on an installer (or any) pipeline. --- internal/image/image_installer.go | 2 +- internal/image/ostree_installer.go | 2 +- internal/manifest/efi_boot_tree.go | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/internal/image/image_installer.go b/internal/image/image_installer.go index 585cd5f56..a7bf4c830 100644 --- a/internal/image/image_installer.go +++ b/internal/image/image_installer.go @@ -109,7 +109,7 @@ func (img *ImageInstaller) InstantiateManifest(m *manifest.Manifest, rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline) rootfsImagePipeline.Size = 4 * common.GibiByte - bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, anacondaPipeline) + bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion) bootTreePipeline.Platform = img.Platform bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor() bootTreePipeline.ISOLabel = isoLabel diff --git a/internal/image/ostree_installer.go b/internal/image/ostree_installer.go index 5f2f06822..1109fd544 100644 --- a/internal/image/ostree_installer.go +++ b/internal/image/ostree_installer.go @@ -86,7 +86,7 @@ func (img *OSTreeInstaller) InstantiateManifest(m *manifest.Manifest, rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline) rootfsImagePipeline.Size = 4 * common.GibiByte - bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, anacondaPipeline) + bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion) bootTreePipeline.Platform = img.Platform bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor() bootTreePipeline.KSPath = kspath diff --git a/internal/manifest/efi_boot_tree.go b/internal/manifest/efi_boot_tree.go index 80e83768c..bac430323 100644 --- a/internal/manifest/efi_boot_tree.go +++ b/internal/manifest/efi_boot_tree.go @@ -13,7 +13,8 @@ type EFIBootTree struct { Platform platform.Platform - anacondaPipeline *Anaconda + product string + version string UEFIVendor string ISOLabel string @@ -22,10 +23,11 @@ type EFIBootTree struct { KernelOpts []string } -func NewEFIBootTree(m *Manifest, buildPipeline *Build, anacondaPipeline *Anaconda) *EFIBootTree { +func NewEFIBootTree(m *Manifest, buildPipeline *Build, product, version string) *EFIBootTree { p := &EFIBootTree{ - Base: NewBase(m, "efiboot-tree", buildPipeline), - anacondaPipeline: anacondaPipeline, + Base: NewBase(m, "efiboot-tree", buildPipeline), + product: product, + version: version, } buildPipeline.addDependent(p) m.addPipeline(p) @@ -59,8 +61,8 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline { grubOptions := &osbuild.GrubISOStageOptions{ Product: osbuild.Product{ - Name: p.anacondaPipeline.product, - Version: p.anacondaPipeline.version, + Name: p.product, + Version: p.version, }, Kernel: osbuild.ISOKernel{ Dir: "/images/pxeboot",