diff --git a/data/distrodefs/fedora/imagetypes.yaml b/data/distrodefs/fedora/imagetypes.yaml index a69a079508..ea64ec97f9 100644 --- a/data/distrodefs/fedora/imagetypes.yaml +++ b/data/distrodefs/fedora/imagetypes.yaml @@ -1634,6 +1634,7 @@ image_types: boot_iso: true image_func: "live_installer" iso_label: "Workstation" + variant: "Workstation" exports: ["bootiso"] required_partition_sizes: *default_required_dir_sizes installer_config: diff --git a/pkg/distro/generic/images.go b/pkg/distro/generic/images.go index d7daf9e0f5..4bfa1cebfc 100644 --- a/pkg/distro/generic/images.go +++ b/pkg/distro/generic/images.go @@ -328,9 +328,22 @@ func osCustomizations(t *imageType, osPackageSet rpmmd.PackageSet, options distr } func installerCustomizations(t *imageType, c *blueprint.Customizations) (manifest.InstallerCustomizations, error) { - isc := manifest.InstallerCustomizations{} - isc.FIPS = c.GetFIPS() - isc.UseLegacyAnacondaConfig = t.ImageTypeYAML.UseLegacyAnacondaConfig + d := t.arch.distro + isoLabel, err := t.ISOLabel() + if err != nil { + return manifest.InstallerCustomizations{}, err + } + + isc := manifest.InstallerCustomizations{ + FIPS: c.GetFIPS(), + UseLegacyAnacondaConfig: t.ImageTypeYAML.UseLegacyAnacondaConfig, + Product: d.Product(), + OSVersion: d.OsVersion(), + Release: fmt.Sprintf("%s %s", d.Product(), d.OsVersion()), + Preview: d.DistroYAML.Preview, + ISOLabel: isoLabel, + Variant: t.Variant, + } installerConfig, err := t.getDefaultInstallerConfig() if err != nil { @@ -540,27 +553,14 @@ func liveInstallerImage(t *imageType, img := image.NewAnacondaLiveInstaller(t.platform, t.Filename()) img.ExtraBasePackages = packageSets[installerPkgsKey] - d := t.arch.distro - - img.Product = d.Product() - img.Variant = "Workstation" - img.OSVersion = d.OsVersion() - img.Release = fmt.Sprintf("%s %s", d.Product(), d.OsVersion()) - img.Preview = d.DistroYAML.Preview - - var err error - img.ISOLabel, err = t.ISOLabel() - if err != nil { - return nil, err - } imgConfig := t.getDefaultImageConfig() if locale := imgConfig.Locale; locale != nil { img.Locale = *locale } + var err error img.InstallerCustomizations, err = installerCustomizations(t, bp.Customizations) - if err != nil { return nil, err } @@ -615,20 +615,6 @@ func imageInstallerImage(t *imageType, img.InstallerCustomizations.AdditionalKernelOpts = append(img.InstallerCustomizations.AdditionalKernelOpts, installerConfig.KickstartUnattendedExtraKernelOpts...) } - d := t.arch.distro - - img.Product = d.Product() - - img.OSVersion = d.OsVersion() - img.Release = fmt.Sprintf("%s %s", d.Product(), d.OsVersion()) - img.Variant = t.Variant - img.Preview = d.DistroYAML.Preview - - img.ISOLabel, err = t.ISOLabel() - if err != nil { - return nil, err - } - img.RootfsCompression = "xz" // This also triggers using the bcj filter return img, nil @@ -746,8 +732,6 @@ func iotInstallerImage(t *imageType, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error) { - d := t.arch.distro - commit, err := makeOSTreePayloadCommit(options.OSTree, t.OSTreeRef()) if err != nil { return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) @@ -784,17 +768,6 @@ func iotInstallerImage(t *imageType, img.InstallerCustomizations.EnabledAnacondaModules = append(img.InstallerCustomizations.EnabledAnacondaModules, anaconda.ModuleUsers) } - img.Product = d.Product() - img.Variant = t.ImageTypeYAML.Variant - img.OSVersion = d.OsVersion() - img.Release = fmt.Sprintf("%s %s", d.Product(), d.OsVersion()) - img.Preview = d.DistroYAML.Preview - - img.ISOLabel, err = t.ISOLabel() - if err != nil { - return nil, err - } - img.RootfsCompression = "xz" // This also triggers using the bcj filter imgConfig := t.getDefaultImageConfig() if locale := imgConfig.Locale; locale != nil { @@ -914,6 +887,7 @@ func iotSimplifiedInstallerImage(t *imageType, img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...) } + // XXX: move to use InstallerCustomizations too d := t.arch.distro img.Product = d.Product() img.Variant = t.ImageTypeYAML.Variant @@ -948,22 +922,7 @@ func netinstImage(t *imageType, img.ExtraBasePackages = packageSets[installerPkgsKey] var err error - img.InstallerCustomizations, err = installerCustomizations(t, bp.Customizations) - - if err != nil { - return nil, err - } - - d := t.arch.distro - - img.Product = d.Product() - img.Variant = t.Variant - img.OSVersion = d.OsVersion() - img.Release = fmt.Sprintf("%s %s", d.Product(), d.OsVersion()) - img.Preview = d.DistroYAML.Preview - - img.ISOLabel, err = t.ISOLabel() if err != nil { return nil, err } diff --git a/pkg/image/anaconda_container_installer.go b/pkg/image/anaconda_container_installer.go index c3e9e7a48d..40a52be5b4 100644 --- a/pkg/image/anaconda_container_installer.go +++ b/pkg/image/anaconda_container_installer.go @@ -26,13 +26,7 @@ type AnacondaContainerInstaller struct { RootfsCompression string - ISOLabel string - Product string - Variant string - Ref string - OSVersion string - Release string - Preview bool + Ref string ContainerSource container.SourceSpec ContainerRemoveSignatures bool @@ -68,18 +62,14 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest, img.platform, repos, "kernel", - img.Product, - img.OSVersion, - img.Preview, + img.InstallerCustomizations, ) anacondaPipeline.ExtraPackages = img.ExtraBasePackages.Include anacondaPipeline.ExcludePackages = img.ExtraBasePackages.Exclude anacondaPipeline.ExtraRepos = img.ExtraBasePackages.Repositories - anacondaPipeline.Variant = img.Variant anacondaPipeline.Biosdevname = (img.platform.GetArch() == arch.ARCH_X86_64) anacondaPipeline.Checkpoint() - anacondaPipeline.InstallerCustomizations = img.InstallerCustomizations if anacondaPipeline.InstallerCustomizations.FIPS { anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules = append( @@ -98,10 +88,10 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest, default: } - bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion) + bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.InstallerCustomizations.Product, img.InstallerCustomizations.OSVersion) bootTreePipeline.Platform = img.platform bootTreePipeline.UEFIVendor = img.platform.GetUEFIVendor() - bootTreePipeline.ISOLabel = img.ISOLabel + bootTreePipeline.ISOLabel = img.InstallerCustomizations.ISOLabel if img.Kickstart == nil { img.Kickstart = &kickstart.Options{} @@ -110,14 +100,14 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest, img.Kickstart.Path = osbuild.KickstartPathOSBuild } - bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.ISOLabel, img.Kickstart.Path)} + bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.InstallerCustomizations.ISOLabel, img.Kickstart.Path)} if anacondaPipeline.InstallerCustomizations.FIPS { bootTreePipeline.KernelOpts = append(bootTreePipeline.KernelOpts, "fips=1") } isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = efiBootPartitionTable(rng) - isoTreePipeline.Release = img.Release + isoTreePipeline.Release = img.InstallerCustomizations.Release isoTreePipeline.Kickstart = img.Kickstart isoTreePipeline.RootfsCompression = img.RootfsCompression @@ -135,7 +125,7 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline.InstallRootfsType = img.InstallRootfsType - isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.ISOLabel) + isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.InstallerCustomizations.ISOLabel) isoPipeline.SetFilename(img.filename) isoPipeline.ISOBoot = img.InstallerCustomizations.ISOBoot artifact := isoPipeline.Export() diff --git a/pkg/image/anaconda_live_installer.go b/pkg/image/anaconda_live_installer.go index 1fe65cae3b..58443e9b96 100644 --- a/pkg/image/anaconda_live_installer.go +++ b/pkg/image/anaconda_live_installer.go @@ -23,13 +23,6 @@ type AnacondaLiveInstaller struct { RootfsCompression string - ISOLabel string - Product string - Variant string - OSVersion string - Release string - Preview bool - // Locale for the installer. This should be set to the same locale as the // ISO OS payload, if known. Locale string @@ -57,18 +50,14 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, img.platform, repos, "kernel", - img.Product, - img.OSVersion, - img.Preview, + img.InstallerCustomizations, ) livePipeline.ExtraPackages = img.ExtraBasePackages.Include livePipeline.ExcludePackages = img.ExtraBasePackages.Exclude - livePipeline.Variant = img.Variant livePipeline.Biosdevname = (img.platform.GetArch() == arch.ARCH_X86_64) livePipeline.Locale = img.Locale - livePipeline.InstallerCustomizations = img.InstallerCustomizations // The live installer has SELinux enabled and targeted livePipeline.SELinux = "targeted" @@ -83,14 +72,14 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, default: } - bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion) + bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.InstallerCustomizations.Product, img.InstallerCustomizations.OSVersion) bootTreePipeline.Platform = img.platform bootTreePipeline.UEFIVendor = img.platform.GetUEFIVendor() - bootTreePipeline.ISOLabel = img.ISOLabel + bootTreePipeline.ISOLabel = img.InstallerCustomizations.ISOLabel bootTreePipeline.DefaultMenu = img.InstallerCustomizations.DefaultMenu kernelOpts := []string{ - fmt.Sprintf("root=live:CDLABEL=%s", img.ISOLabel), + fmt.Sprintf("root=live:CDLABEL=%s", img.InstallerCustomizations.ISOLabel), "rd.live.image", "quiet", "rhgb", @@ -102,7 +91,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, livePipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = efiBootPartitionTable(rng) - isoTreePipeline.Release = img.Release + isoTreePipeline.Release = img.InstallerCustomizations.Release isoTreePipeline.KernelOpts = kernelOpts isoTreePipeline.ISOBoot = img.InstallerCustomizations.ISOBoot @@ -110,7 +99,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline.RootfsCompression = img.RootfsCompression isoTreePipeline.RootfsType = img.InstallerCustomizations.ISORootfsType - isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.ISOLabel) + isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.InstallerCustomizations.ISOLabel) isoPipeline.SetFilename(img.filename) isoPipeline.ISOBoot = img.InstallerCustomizations.ISOBoot diff --git a/pkg/image/anaconda_net_installer.go b/pkg/image/anaconda_net_installer.go index f88d57095a..6b20de982f 100644 --- a/pkg/image/anaconda_net_installer.go +++ b/pkg/image/anaconda_net_installer.go @@ -24,13 +24,6 @@ type AnacondaNetInstaller struct { RootfsCompression string - ISOLabel string - Product string - Variant string - OSVersion string - Release string - Preview bool - Language string } @@ -54,19 +47,14 @@ func (img *AnacondaNetInstaller) InstantiateManifest(m *manifest.Manifest, img.platform, repos, "kernel", - img.Product, - img.OSVersion, - img.Preview, + img.InstallerCustomizations, ) anacondaPipeline.ExtraPackages = img.ExtraBasePackages.Include anacondaPipeline.ExcludePackages = img.ExtraBasePackages.Exclude anacondaPipeline.ExtraRepos = img.ExtraBasePackages.Repositories - anacondaPipeline.Variant = img.Variant anacondaPipeline.Biosdevname = (img.platform.GetArch() == arch.ARCH_X86_64) - anacondaPipeline.InstallerCustomizations = img.InstallerCustomizations - if anacondaPipeline.InstallerCustomizations.FIPS { anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules = append( anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules, @@ -86,13 +74,13 @@ func (img *AnacondaNetInstaller) InstantiateManifest(m *manifest.Manifest, default: } - bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion) + bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.InstallerCustomizations.Product, img.InstallerCustomizations.OSVersion) bootTreePipeline.Platform = img.platform bootTreePipeline.UEFIVendor = img.platform.GetUEFIVendor() - bootTreePipeline.ISOLabel = img.ISOLabel + bootTreePipeline.ISOLabel = img.InstallerCustomizations.ISOLabel bootTreePipeline.DefaultMenu = img.InstallerCustomizations.DefaultMenu - kernelOpts := []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.ISOLabel)} + kernelOpts := []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel)} if anacondaPipeline.InstallerCustomizations.FIPS { kernelOpts = append(kernelOpts, "fips=1") } @@ -102,7 +90,7 @@ func (img *AnacondaNetInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) // TODO: the partition table is required - make it a ctor arg or set a default one in the pipeline isoTreePipeline.PartitionTable = efiBootPartitionTable(rng) - isoTreePipeline.Release = img.Release + isoTreePipeline.Release = img.InstallerCustomizations.Release isoTreePipeline.RootfsCompression = img.RootfsCompression isoTreePipeline.RootfsType = img.InstallerCustomizations.ISORootfsType @@ -114,7 +102,7 @@ func (img *AnacondaNetInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline.ISOBoot = img.InstallerCustomizations.ISOBoot - isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.ISOLabel) + isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.InstallerCustomizations.ISOLabel) isoPipeline.SetFilename(img.filename) isoPipeline.ISOBoot = img.InstallerCustomizations.ISOBoot diff --git a/pkg/image/anaconda_ostree_installer.go b/pkg/image/anaconda_ostree_installer.go index d93ce42fa6..f7c8a94c11 100644 --- a/pkg/image/anaconda_ostree_installer.go +++ b/pkg/image/anaconda_ostree_installer.go @@ -30,13 +30,6 @@ type AnacondaOSTreeInstaller struct { RootfsCompression string - ISOLabel string - Product string - Variant string - OSVersion string - Release string - Preview bool - Commit ostree.SourceSpec // Locale for the installer. This should be set to the same locale as the @@ -64,9 +57,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, img.platform, repos, "kernel", - img.Product, - img.OSVersion, - img.Preview, + img.InstallerCustomizations, ) anacondaPipeline.ExtraPackages = img.ExtraBasePackages.Include anacondaPipeline.ExcludePackages = img.ExtraBasePackages.Exclude @@ -77,12 +68,9 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, Groups: img.Kickstart.Groups, } } - anacondaPipeline.Variant = img.Variant anacondaPipeline.Biosdevname = (img.platform.GetArch() == arch.ARCH_X86_64) anacondaPipeline.Checkpoint() - anacondaPipeline.InstallerCustomizations = img.InstallerCustomizations - if anacondaPipeline.InstallerCustomizations.FIPS { anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules = append( anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules, @@ -100,10 +88,10 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, default: } - bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion) + bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.InstallerCustomizations.Product, img.InstallerCustomizations.OSVersion) bootTreePipeline.Platform = img.platform bootTreePipeline.UEFIVendor = img.platform.GetUEFIVendor() - bootTreePipeline.ISOLabel = img.ISOLabel + bootTreePipeline.ISOLabel = img.InstallerCustomizations.ISOLabel bootTreePipeline.DefaultMenu = img.InstallerCustomizations.DefaultMenu if img.Kickstart == nil || img.Kickstart.OSTree == nil { @@ -112,7 +100,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, if img.Kickstart.Path == "" { img.Kickstart.Path = osbuild.KickstartPathOSBuild } - bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.ISOLabel, img.Kickstart.Path)} + bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.InstallerCustomizations.ISOLabel, img.Kickstart.Path)} if anacondaPipeline.InstallerCustomizations.FIPS { bootTreePipeline.KernelOpts = append(bootTreePipeline.KernelOpts, "fips=1") } @@ -125,7 +113,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = efiBootPartitionTable(rng) - isoTreePipeline.Release = img.Release + isoTreePipeline.Release = img.InstallerCustomizations.Release isoTreePipeline.Kickstart = img.Kickstart isoTreePipeline.RootfsCompression = img.RootfsCompression isoTreePipeline.RootfsType = img.InstallerCustomizations.ISORootfsType @@ -139,7 +127,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, } isoTreePipeline.SubscriptionPipeline = subscriptionPipeline - isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.ISOLabel) + isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.InstallerCustomizations.ISOLabel) isoPipeline.SetFilename(img.filename) isoPipeline.ISOBoot = img.InstallerCustomizations.ISOBoot artifact := isoPipeline.Export() diff --git a/pkg/image/anaconda_tar_installer.go b/pkg/image/anaconda_tar_installer.go index 02e18ccecf..c92ecf608b 100644 --- a/pkg/image/anaconda_tar_installer.go +++ b/pkg/image/anaconda_tar_installer.go @@ -47,13 +47,6 @@ type AnacondaTarInstaller struct { Kickstart *kickstart.Options RootfsCompression string - - ISOLabel string - Product string - Variant string - OSVersion string - Release string - Preview bool } func NewAnacondaTarInstaller(platform platform.Platform, filename string) *AnacondaTarInstaller { @@ -83,9 +76,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, img.platform, repos, "kernel", - img.Product, - img.OSVersion, - img.Preview, + img.InstallerCustomizations, ) anacondaPipeline.ExtraPackages = img.ExtraBasePackages.Include @@ -97,11 +88,8 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, Groups: img.Kickstart.Groups, } } - anacondaPipeline.Variant = img.Variant anacondaPipeline.Biosdevname = (img.platform.GetArch() == arch.ARCH_X86_64) - anacondaPipeline.InstallerCustomizations = img.InstallerCustomizations - if img.OSCustomizations.FIPS { anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules = append( anacondaPipeline.InstallerCustomizations.EnabledAnacondaModules, @@ -123,15 +111,15 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, default: } - bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion) + bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.InstallerCustomizations.Product, img.InstallerCustomizations.OSVersion) bootTreePipeline.Platform = img.platform bootTreePipeline.UEFIVendor = img.platform.GetUEFIVendor() - bootTreePipeline.ISOLabel = img.ISOLabel + bootTreePipeline.ISOLabel = img.InstallerCustomizations.ISOLabel bootTreePipeline.DefaultMenu = img.InstallerCustomizations.DefaultMenu kernelOpts := []string{ - fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.ISOLabel), - fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.ISOLabel, img.Kickstart.Path), + fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel), + fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.InstallerCustomizations.ISOLabel, img.Kickstart.Path), } if img.OSCustomizations.FIPS { @@ -148,7 +136,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) // TODO: the partition table is required - make it a ctor arg or set a default one in the pipeline isoTreePipeline.PartitionTable = efiBootPartitionTable(rng) - isoTreePipeline.Release = img.Release + isoTreePipeline.Release = img.InstallerCustomizations.Release isoTreePipeline.Kickstart = img.Kickstart isoTreePipeline.PayloadPath = tarPath isoTreePipeline.Kickstart.Path = img.Kickstart.Path @@ -165,7 +153,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline.ISOBoot = img.InstallerCustomizations.ISOBoot - isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.ISOLabel) + isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, img.InstallerCustomizations.ISOLabel) isoPipeline.SetFilename(img.filename) isoPipeline.ISOBoot = img.InstallerCustomizations.ISOBoot diff --git a/pkg/image/installer_image_test.go b/pkg/image/installer_image_test.go index c653016dfe..7f2b811d71 100644 --- a/pkg/image/installer_image_test.go +++ b/pkg/image/installer_image_test.go @@ -90,9 +90,9 @@ func TestContainerInstallerUnsetKSOptions(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) assert.Contains(t, mfs, fmt.Sprintf(`"inst.ks=hd:LABEL=%s:/osbuild.ks"`, isolabel)) @@ -102,9 +102,9 @@ func TestContainerInstallerUnsetKSPath(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel // set empty kickstart options (no path) img.Kickstart = &kickstart.Options{} @@ -116,9 +116,9 @@ func TestContainerInstallerSetKSPath(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ Path: "/test.ks", } @@ -132,9 +132,9 @@ func TestContainerInstallerExt4Rootfs(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) @@ -147,9 +147,9 @@ func TestContainerInstallerSquashfsRootfs(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.ISORootfsType = manifest.SquashfsRootfs mfs := instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) @@ -163,9 +163,9 @@ func TestOSTreeInstallerUnsetKSPath(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -179,9 +179,9 @@ func TestOSTreeInstallerSetKSPath(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -197,9 +197,9 @@ func TestOSTreeInstallerExt4Rootfs(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -216,9 +216,9 @@ func TestOSTreeInstallerSquashfsRootfs(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.ISORootfsType = manifest.SquashfsRootfs img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil @@ -236,9 +236,9 @@ func TestTarInstallerUnsetKSOptions(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -250,9 +250,9 @@ func TestTarInstallerUnsetKSPath(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{} mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -265,9 +265,9 @@ func TestTarInstallerSetKSPath(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ Path: "/test.ks", } @@ -283,9 +283,9 @@ func TestTarInstallerExt4Rootfs(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) // Confirm that it includes the rootfs-image pipeline that makes the ext4 rootfs @@ -297,9 +297,9 @@ func TestTarInstallerSquashfsRootfs(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.ISORootfsType = manifest.SquashfsRootfs mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -312,9 +312,9 @@ func TestLiveInstallerExt4Rootfs(t *testing.T) { img := image.NewAnacondaLiveInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) // Confirm that it includes the rootfs-image pipeline that makes the ext4 rootfs @@ -326,9 +326,9 @@ func TestLiveInstallerSquashfsRootfs(t *testing.T) { img := image.NewAnacondaLiveInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.ISORootfsType = manifest.SquashfsRootfs mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -365,9 +365,9 @@ func TestContainerInstallerPanics(t *testing.T) { assert := assert.New(t) img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.PanicsWithError("org.osbuild.grub2.iso: product.name option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) }) - img.Product = product + img.InstallerCustomizations.Product = product assert.PanicsWithError("org.osbuild.grub2.iso: product.version option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) }) - img.OSVersion = osversion + img.InstallerCustomizations.OSVersion = osversion assert.PanicsWithError("org.osbuild.grub2.iso: isolabel option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) }) } @@ -382,11 +382,11 @@ func TestOSTreeInstallerPanics(t *testing.T) { assert.PanicsWithError("org.osbuild.grub2.iso: product.name option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, mockOSTreeCommitSpecs()) }) - img.Product = product + img.InstallerCustomizations.Product = product assert.PanicsWithError("org.osbuild.grub2.iso: product.version option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, mockOSTreeCommitSpecs()) }) - img.OSVersion = osversion + img.InstallerCustomizations.OSVersion = osversion assert.PanicsWithError("org.osbuild.grub2.iso: isolabel option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, mockOSTreeCommitSpecs()) }) } @@ -398,11 +398,11 @@ func TestTarInstallerPanics(t *testing.T) { assert.PanicsWithError("org.osbuild.grub2.iso: product.name option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) }) - img.Product = product + img.InstallerCustomizations.Product = product assert.PanicsWithError("org.osbuild.grub2.iso: product.version option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) }) - img.OSVersion = osversion + img.InstallerCustomizations.OSVersion = osversion assert.PanicsWithError("org.osbuild.grub2.iso: isolabel option is required", func() { instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) }) } @@ -475,9 +475,9 @@ func TestContainerInstallerModules(t *testing.T) { for _, legacy := range []bool{true, false} { t.Run(name, func(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.UseLegacyAnacondaConfig = legacy img.InstallerCustomizations.EnabledAnacondaModules = tc.enable @@ -501,9 +501,9 @@ func TestOSTreeInstallerModules(t *testing.T) { for _, legacy := range []bool{true, false} { t.Run(name, func(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -531,10 +531,9 @@ func TestTarInstallerModules(t *testing.T) { for _, legacy := range []bool{true, false} { t.Run(name, func(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel - + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.UseLegacyAnacondaConfig = legacy img.InstallerCustomizations.EnabledAnacondaModules = tc.enable img.InstallerCustomizations.DisabledAnacondaModules = tc.disable @@ -574,9 +573,9 @@ func TestInstallerLocales(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Locale = input mfs := instantiateAndSerialize(t, img, mockPackageSets(), mockContainerSpecs(), nil) @@ -589,9 +588,9 @@ func TestInstallerLocales(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -608,9 +607,9 @@ func TestInstallerLocales(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.OSCustomizations.Language = input mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -623,9 +622,9 @@ func TestInstallerLocales(t *testing.T) { img := image.NewAnacondaNetInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Language = input mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -638,9 +637,9 @@ func TestInstallerLocales(t *testing.T) { img := image.NewAnacondaLiveInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.Locale = input mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -703,9 +702,9 @@ func findGrub2IsoStageOptions(t *testing.T, mf manifest.OSBuildManifest, pipelin func TestContainerInstallerDracut(t *testing.T) { img := image.NewAnacondaContainerInstaller(testPlatform, "filename", container.SourceSpec{}, "") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel testModules := []string{"test-module"} testDrivers := []string{"test-driver"} @@ -727,9 +726,10 @@ func TestContainerInstallerDracut(t *testing.T) { func TestOSTreeInstallerDracut(t *testing.T) { img := image.NewAnacondaOSTreeInstaller(testPlatform, "filename", ostree.SourceSpec{}) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel + img.Kickstart = &kickstart.Options{ // the ostree options must be non-nil OSTree: &kickstart.OSTree{}, @@ -755,9 +755,9 @@ func TestOSTreeInstallerDracut(t *testing.T) { func TestTarInstallerDracut(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel testModules := []string{"test-module"} testDrivers := []string{"test-driver"} @@ -779,9 +779,9 @@ func TestTarInstallerDracut(t *testing.T) { func TestTarInstallerKernelOpts(t *testing.T) { img := image.NewAnacondaTarInstaller(testPlatform, "filename") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel testOpts := []string{"foo=1", "bar=2"} @@ -800,9 +800,9 @@ func TestNetInstallerExt4Rootfs(t *testing.T) { img := image.NewAnacondaNetInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) // Confirm that it includes the rootfs-image pipeline that makes the ext4 rootfs @@ -814,9 +814,9 @@ func TestNetInstallerSquashfsRootfs(t *testing.T) { img := image.NewAnacondaNetInstaller(testPlatform, "filename") assert.NotNil(t, img) - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel img.InstallerCustomizations.ISORootfsType = manifest.SquashfsRootfs mfs := instantiateAndSerialize(t, img, mockPackageSets(), nil, nil) @@ -827,9 +827,9 @@ func TestNetInstallerSquashfsRootfs(t *testing.T) { func TestNetInstallerDracut(t *testing.T) { img := image.NewAnacondaNetInstaller(testPlatform, "filename") - img.Product = product - img.OSVersion = osversion - img.ISOLabel = isolabel + img.InstallerCustomizations.Product = product + img.InstallerCustomizations.OSVersion = osversion + img.InstallerCustomizations.ISOLabel = isolabel testModules := []string{"test-module"} testDrivers := []string{"test-driver"} diff --git a/pkg/manifest/anaconda_installer.go b/pkg/manifest/anaconda_installer.go index edd60f9b56..0cabbedf1c 100644 --- a/pkg/manifest/anaconda_installer.go +++ b/pkg/manifest/anaconda_installer.go @@ -48,17 +48,11 @@ type AnacondaInstaller struct { // the naming of network devices on the target system. Biosdevname bool - // Variant is the variant of the product being installed, if applicable. - Variant string - platform platform.Platform repos []rpmmd.RepoConfig packageSpecs []rpmmd.PackageSpec kernelName string kernelVer string - product string - version string - preview bool // Interactive defaults is a kickstart stage that can be provided, it // will be written to /usr/share/anaconda/interactive-defaults @@ -85,20 +79,17 @@ func NewAnacondaInstaller(installerType AnacondaInstallerType, buildPipeline Build, platform platform.Platform, repos []rpmmd.RepoConfig, - kernelName, - product, - version string, - preview bool) *AnacondaInstaller { + kernelName string, + instCust InstallerCustomizations, +) *AnacondaInstaller { name := "anaconda-tree" p := &AnacondaInstaller{ - Base: NewBase(name, buildPipeline), - Type: installerType, - platform: platform, - repos: filterRepos(repos, name), - kernelName: kernelName, - product: product, - version: version, - preview: preview, + Base: NewBase(name, buildPipeline), + Type: installerType, + platform: platform, + repos: filterRepos(repos, name), + kernelName: kernelName, + InstallerCustomizations: instCust, } buildPipeline.addDependent(p) return p @@ -232,10 +223,10 @@ func (p *AnacondaInstaller) serialize() osbuild.Pipeline { pipeline.AddStage(osbuild.NewRPMStage(options, osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs))) pipeline.AddStage(osbuild.NewBuildstampStage(&osbuild.BuildstampStageOptions{ Arch: p.platform.GetArch().String(), - Product: p.product, - Variant: p.Variant, - Version: p.version, - Final: !p.preview, + Product: p.InstallerCustomizations.Product, + Variant: p.InstallerCustomizations.Variant, + Version: p.InstallerCustomizations.OSVersion, + Final: !p.InstallerCustomizations.Preview, })) locale := p.Locale diff --git a/pkg/manifest/anaconda_installer_iso_tree.go b/pkg/manifest/anaconda_installer_iso_tree.go index 84f0bd2153..d5bf648880 100644 --- a/pkg/manifest/anaconda_installer_iso_tree.go +++ b/pkg/manifest/anaconda_installer_iso_tree.go @@ -438,8 +438,8 @@ func (p *AnacondaInstallerISOTree) serialize() osbuild.Pipeline { case SyslinuxISOBoot: options := &osbuild.ISOLinuxStageOptions{ Product: osbuild.ISOLinuxProduct{ - Name: p.anacondaPipeline.product, - Version: p.anacondaPipeline.version, + Name: p.anacondaPipeline.InstallerCustomizations.Product, + Version: p.anacondaPipeline.InstallerCustomizations.OSVersion, }, Kernel: osbuild.ISOLinuxKernel{ Dir: "/images/pxeboot", @@ -459,8 +459,8 @@ func (p *AnacondaInstallerISOTree) serialize() osbuild.Pipeline { } options := &osbuild.Grub2ISOLegacyStageOptions{ Product: osbuild.Product{ - Name: p.anacondaPipeline.product, - Version: p.anacondaPipeline.version, + Name: p.anacondaPipeline.InstallerCustomizations.Product, + Version: p.anacondaPipeline.InstallerCustomizations.OSVersion, }, Kernel: osbuild.ISOKernel{ Dir: "/images/pxeboot", diff --git a/pkg/manifest/anaconda_installer_iso_tree_test.go b/pkg/manifest/anaconda_installer_iso_tree_test.go index c9bec04bc2..11195697f4 100644 --- a/pkg/manifest/anaconda_installer_iso_tree_test.go +++ b/pkg/manifest/anaconda_installer_iso_tree_test.go @@ -50,9 +50,11 @@ func newTestAnacondaISOTree() *manifest.AnacondaInstallerISOTree { x86plat, nil, "kernel", - product, - osversion, - preview, + manifest.InstallerCustomizations{ + Product: product, + OSVersion: osversion, + Preview: preview, + }, ) rootfsImagePipeline := manifest.NewISORootfsImg(build, anacondaPipeline) bootTreePipeline := manifest.NewEFIBootTree(build, product, osversion) diff --git a/pkg/manifest/anaconda_installer_test.go b/pkg/manifest/anaconda_installer_test.go index 421a3d7185..5fb2aaef6f 100644 --- a/pkg/manifest/anaconda_installer_test.go +++ b/pkg/manifest/anaconda_installer_test.go @@ -27,7 +27,12 @@ func newAnacondaInstaller() *manifest.AnacondaInstaller { preview := false - installer := manifest.NewAnacondaInstaller(manifest.AnacondaInstallerTypePayload, build, x86plat, nil, "kernel", product, osversion, preview) + instCust := manifest.InstallerCustomizations{ + Product: product, + OSVersion: osversion, + Preview: preview, + } + installer := manifest.NewAnacondaInstaller(manifest.AnacondaInstallerTypePayload, build, x86plat, nil, "kernel", instCust) return installer } diff --git a/pkg/manifest/installer.go b/pkg/manifest/installer.go index fefb9d9e5f..3c87b8c0fe 100644 --- a/pkg/manifest/installer.go +++ b/pkg/manifest/installer.go @@ -24,4 +24,11 @@ type InstallerCustomizations struct { ISOBoot ISOBootType DefaultMenu int + + ISOLabel string + Product string + Variant string + OSVersion string + Release string + Preview bool }