diff --git a/cmd/osbuild-dnf-json-tests/main_test.go b/cmd/osbuild-dnf-json-tests/main_test.go index 5dc84af6c85..471b1a2f8d9 100644 --- a/cmd/osbuild-dnf-json-tests/main_test.go +++ b/cmd/osbuild-dnf-json-tests/main_test.go @@ -101,29 +101,8 @@ func TestDepsolvePackageSets(t *testing.T) { require.Nilf(t, err, "failed to get %q image type of %q/%q distro/arch", qcow2ImageTypeName, distroStruct.Name(), distro.X86_64ArchName) imagePkgSets := qcow2Image.PackageSets(blueprint.Blueprint{Packages: []blueprint.Package{{Name: "bind"}}}, distro.ImageOptions{}, x86Repos) - imagePkgSetChains := qcow2Image.PackageSetsChains() - require.NotEmptyf(t, imagePkgSetChains, "the %q image has no package set chains defined", qcow2ImageTypeName) - - expectedPackageSpecsSetNames := func(pkgSets map[string][]rpmmd.PackageSet, pkgSetChains map[string][]string) []string { - expectedPkgSpecsSetNames := make([]string, 0, len(pkgSets)) - chainPkgSets := make(map[string]struct{}, len(pkgSets)) - for name, pkgSetChain := range pkgSetChains { - expectedPkgSpecsSetNames = append(expectedPkgSpecsSetNames, name) - for _, pkgSetName := range pkgSetChain { - chainPkgSets[pkgSetName] = struct{}{} - } - } - for name := range pkgSets { - if _, ok := chainPkgSets[name]; ok { - continue - } - expectedPkgSpecsSetNames = append(expectedPkgSpecsSetNames, name) - } - return expectedPkgSpecsSetNames - }(imagePkgSets, imagePkgSetChains) gotPackageSpecsSets := make(map[string][]rpmmd.PackageSpec, len(imagePkgSets)) - for name, pkgSet := range imagePkgSets { res, err := solver.Depsolve(pkgSet) if err != nil { @@ -131,6 +110,7 @@ func TestDepsolvePackageSets(t *testing.T) { } gotPackageSpecsSets[name] = res } + expectedPackageSpecsSetNames := []string{"build", "os"} require.EqualValues(t, len(expectedPackageSpecsSetNames), len(gotPackageSpecsSets)) for _, name := range expectedPackageSpecsSetNames { _, ok := gotPackageSpecsSets[name] diff --git a/internal/distro/rhel8/ami.go b/internal/distro/rhel8/ami.go index 17bcd0647eb..8f4a95dfe30 100644 --- a/internal/distro/rhel8/ami.go +++ b/internal/distro/rhel8/ami.go @@ -15,9 +15,6 @@ func amiImgTypeX86_64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: ec2CommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAMIImageConfigX86_64(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -42,9 +39,6 @@ func ec2ImgTypeX86_64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: rhelEc2PackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultEc2ImageConfigX86_64(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -68,9 +62,6 @@ func ec2HaImgTypeX86_64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: rhelEc2HaPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultEc2ImageConfigX86_64(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -93,9 +84,6 @@ func amiImgTypeAarch64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: ec2CommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAMIImageConfig(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", bootable: true, @@ -118,9 +106,6 @@ func ec2ImgTypeAarch64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: rhelEc2PackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultEc2ImageConfig(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", bootable: true, @@ -143,9 +128,6 @@ func ec2SapImgTypeX86_64(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: rhelEc2SapPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultEc2SapImageConfigX86_64(rd), kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto processor.max_cstate=1 intel_idle.max_cstate=1", bootable: true, diff --git a/internal/distro/rhel8/azure.go b/internal/distro/rhel8/azure.go index a7aa2e0c51a..bbd39ab2aed 100644 --- a/internal/distro/rhel8/azure.go +++ b/internal/distro/rhel8/azure.go @@ -19,9 +19,6 @@ func azureRhuiImgType() imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: azureRhuiPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAzureRhuiImageConfig.InheritFrom(defaultAzureImageConfig), kernelOptions: defaultAzureKernelOptions, bootable: true, @@ -43,9 +40,6 @@ func azureSapImgType(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: azureSapPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: SapAzureImageConfig(rd), kernelOptions: defaultAzureKernelOptions, bootable: true, @@ -67,9 +61,6 @@ func azureByosImgType() imageType { // the ec2 buildroot is required due to the cloud-init stage and dependency on YAML osPkgsKey: azurePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAzureByosImageConfig.InheritFrom(defaultAzureImageConfig), kernelOptions: defaultAzureKernelOptions, bootable: true, @@ -92,9 +83,6 @@ func azureImgType() imageType { // the ec2 buildroot is required due to the cloud-init stage and dependency on YAML osPkgsKey: azurePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAzureImageConfig, kernelOptions: defaultAzureKernelOptions, bootable: true, diff --git a/internal/distro/rhel8/bare_metal.go b/internal/distro/rhel8/bare_metal.go index 25fee36e2ea..0886a94ed49 100644 --- a/internal/distro/rhel8/bare_metal.go +++ b/internal/distro/rhel8/bare_metal.go @@ -38,9 +38,6 @@ func tarImgType() imageType { } }, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, image: tarImage, buildPipelines: []string{"build"}, payloadPipelines: []string{"os", "root-tar"}, diff --git a/internal/distro/rhel8/edge.go b/internal/distro/rhel8/edge.go index 2fb82cb10dd..75cf91e2f24 100644 --- a/internal/distro/rhel8/edge.go +++ b/internal/distro/rhel8/edge.go @@ -17,9 +17,6 @@ func edgeCommitImgType(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: edgeCommitPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices(rd), }, @@ -46,9 +43,6 @@ func edgeOCIImgType(rd distribution) imageType { } }, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices(rd), }, diff --git a/internal/distro/rhel8/gce.go b/internal/distro/rhel8/gce.go index e936acb0fca..24a5a45d411 100644 --- a/internal/distro/rhel8/gce.go +++ b/internal/distro/rhel8/gce.go @@ -18,9 +18,6 @@ func gceImgType(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: gcePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultGceByosImageConfig(rd), kernelOptions: gceKernelOptions, bootable: true, @@ -42,9 +39,6 @@ func gceRhuiImgType(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: gceRhuiPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultGceRhuiImageConfig(rd), kernelOptions: gceKernelOptions, bootable: true, diff --git a/internal/distro/rhel8/imagetype.go b/internal/distro/rhel8/imagetype.go index 6b87ec0ac97..125989dd08f 100644 --- a/internal/distro/rhel8/imagetype.go +++ b/internal/distro/rhel8/imagetype.go @@ -50,7 +50,6 @@ type imageType struct { compression string // TODO: remove from image definition and make it a transport option mimeType string packageSets map[string]packageSetFunc - packageSetChains map[string][]string defaultImageConfig *distro.ImageConfig kernelOptions string defaultSize uint64 @@ -119,7 +118,7 @@ func (t *imageType) PayloadPackageSets() []string { } func (t *imageType) PackageSetsChains() map[string][]string { - return t.packageSetChains + return nil } func (t *imageType) Exports() []string { diff --git a/internal/distro/rhel8/qcow2.go b/internal/distro/rhel8/qcow2.go index a775282076e..a232cc40289 100644 --- a/internal/distro/rhel8/qcow2.go +++ b/internal/distro/rhel8/qcow2.go @@ -16,9 +16,6 @@ func qcow2ImgType(rd distribution) imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: qcow2CommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: &distro.ImageConfig{ DefaultTarget: common.ToPtr("multi-user.target"), }, @@ -57,9 +54,6 @@ func openstackImgType() imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: openstackCommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * common.GibiByte, diff --git a/internal/distro/rhel8/vmdk.go b/internal/distro/rhel8/vmdk.go index 3d5da275066..a5d37ff8911 100644 --- a/internal/distro/rhel8/vmdk.go +++ b/internal/distro/rhel8/vmdk.go @@ -13,9 +13,6 @@ func vmdkImgType() imageType { packageSets: map[string]packageSetFunc{ osPkgsKey: vmdkCommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * common.GibiByte, diff --git a/internal/distro/rhel9/ami.go b/internal/distro/rhel9/ami.go index 769c50ae8db..8c985c1b4be 100644 --- a/internal/distro/rhel9/ami.go +++ b/internal/distro/rhel9/ami.go @@ -17,9 +17,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: ec2CommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: amiKernelOptions, bootable: true, bootType: distro.LegacyBootType, @@ -39,9 +36,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: rhelEc2PackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: amiKernelOptions, bootable: true, bootType: distro.LegacyBootType, @@ -62,9 +56,6 @@ var ( buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2HaPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: amiKernelOptions, bootable: true, bootType: distro.LegacyBootType, @@ -84,9 +75,6 @@ var ( buildPkgsKey: ec2BuildPackageSet, osPkgsKey: ec2CommonPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0", bootable: true, defaultSize: 10 * common.GibiByte, @@ -106,9 +94,6 @@ var ( buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2PackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0", bootable: true, defaultSize: 10 * common.GibiByte, @@ -128,9 +113,6 @@ var ( buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2SapPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 processor.max_cstate=1 intel_idle.max_cstate=1", bootable: true, bootType: distro.LegacyBootType, diff --git a/internal/distro/rhel9/azure.go b/internal/distro/rhel9/azure.go index fa06e03541e..213da7bc4b5 100644 --- a/internal/distro/rhel9/azure.go +++ b/internal/distro/rhel9/azure.go @@ -17,9 +17,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: azurePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAzureImageConfig, kernelOptions: defaultAzureKernelOptions, bootable: true, @@ -39,9 +36,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: azurePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, defaultImageConfig: defaultAzureByosImageConfig.InheritFrom(defaultAzureImageConfig), kernelOptions: defaultAzureKernelOptions, bootable: true, diff --git a/internal/distro/rhel9/bare_metal.go b/internal/distro/rhel9/bare_metal.go index 30e49775b5d..cf13dc4b314 100644 --- a/internal/distro/rhel9/bare_metal.go +++ b/internal/distro/rhel9/bare_metal.go @@ -20,9 +20,6 @@ var ( } }, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, image: tarImage, buildPipelines: []string{"build"}, payloadPipelines: []string{"os", "root-tar"}, @@ -37,9 +34,6 @@ var ( osPkgsKey: bareMetalPackageSet, installerPkgsKey: anacondaPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, rpmOstree: false, bootISO: true, bootable: true, diff --git a/internal/distro/rhel9/gce.go b/internal/distro/rhel9/gce.go index 8e7083a6379..60f8b0e6d3a 100644 --- a/internal/distro/rhel9/gce.go +++ b/internal/distro/rhel9/gce.go @@ -17,9 +17,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: gcePackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: gceKernelOptions, bootable: true, bootType: distro.UEFIBootType, @@ -38,9 +35,6 @@ var ( packageSets: map[string]packageSetFunc{ osPkgsKey: gceRhuiPackageSet, }, - packageSetChains: map[string][]string{ - osPkgsKey: {osPkgsKey, blueprintPkgsKey}, - }, kernelOptions: gceKernelOptions, bootable: true, bootType: distro.UEFIBootType, diff --git a/internal/distro/rhel9/imagetype.go b/internal/distro/rhel9/imagetype.go index be852bdffc2..2c21c98dd73 100644 --- a/internal/distro/rhel9/imagetype.go +++ b/internal/distro/rhel9/imagetype.go @@ -53,7 +53,6 @@ type imageType struct { compression string // TODO: remove from image definition and make it a transport option mimeType string packageSets map[string]packageSetFunc - packageSetChains map[string][]string defaultImageConfig *distro.ImageConfig kernelOptions string defaultSize uint64 @@ -122,7 +121,7 @@ func (t *imageType) PayloadPackageSets() []string { } func (t *imageType) PackageSetsChains() map[string][]string { - return t.packageSetChains + return nil } func (t *imageType) Exports() []string {