diff --git a/internal/distro/distro.go b/internal/distro/distro.go index c6553d263..24598193b 100644 --- a/internal/distro/distro.go +++ b/internal/distro/distro.go @@ -116,6 +116,9 @@ type ImageType interface { // Returns the package set names safe to install custom packages via custom repositories. PayloadPackageSets() []string + // Returns named arrays of package set names which should be depsolved in a chain. + PackageSetsChains() map[string][]string + // Returns the names of the stages that will produce the build output. Exports() []string diff --git a/internal/distro/distro_test.go b/internal/distro/distro_test.go index be547ad58..c619ab6fe 100644 --- a/internal/distro/distro_test.go +++ b/internal/distro/distro_test.go @@ -99,3 +99,10 @@ func TestDistro_Version(t *testing.T) { require.Error(err, "Invalid manifest did not return an error") } } + +func TestDistro_ImageType_PackageSetsChains(t *testing.T) { + dr := distroregistry.NewDefault() + for _, distroName := range dr.List() { + distro_test_common.TestImageType_PackageSetsChains(t, dr.GetDistro(distroName)) + } +} diff --git a/internal/distro/distro_test_common/distro_test_common.go b/internal/distro/distro_test_common/distro_test_common.go index 3fa439935..702e860f8 100644 --- a/internal/distro/distro_test_common/distro_test_common.go +++ b/internal/distro/distro_test_common/distro_test_common.go @@ -226,3 +226,26 @@ func GetTestingPackageSpecSets(packageName, arch string, pkgSetNames []string) m } return testPackageSpecSets } + +// Ensure that all package sets defined in the package set chains are defined for the image type +func TestImageType_PackageSetsChains(t *testing.T, d distro.Distro) { + distroName := d.Name() + for _, archName := range d.ListArches() { + arch, err := d.GetArch(archName) + require.Nil(t, err) + for _, imageTypeName := range arch.ListImageTypes() { + t.Run(fmt.Sprintf("%s/%s/%s", distroName, archName, imageTypeName), func(t *testing.T) { + imageType, err := arch.GetImageType(imageTypeName) + require.Nil(t, err) + + imagePkgSets := imageType.PackageSets(blueprint.Blueprint{}) + for _, pkgSetsChain := range imageType.PackageSetsChains() { + for _, packageSetName := range pkgSetsChain { + _, ok := imagePkgSets[packageSetName] + assert.Truef(t, ok, "package set %q defined in a package set chain is not present in the image package sets", packageSetName) + } + } + }) + } + } +} diff --git a/internal/distro/fedora33/distro.go b/internal/distro/fedora33/distro.go index ff986d102..966c49338 100644 --- a/internal/distro/fedora33/distro.go +++ b/internal/distro/fedora33/distro.go @@ -253,6 +253,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{"packages"} } +func (t *imageType) PackageSetsChains() map[string][]string { + return map[string][]string{} +} + func (t *imageType) Exports() []string { return distro.ExportsFallback() } diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go index f6ea55a95..ef7be8674 100644 --- a/internal/distro/rhel8/distro.go +++ b/internal/distro/rhel8/distro.go @@ -244,6 +244,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{"packages"} } +func (t *imageType) PackageSetsChains() map[string][]string { + return map[string][]string{} +} + func (t *imageType) Exports() []string { return distro.ExportsFallback() } diff --git a/internal/distro/rhel84/distro.go b/internal/distro/rhel84/distro.go index 90a38a70a..41dbb0a51 100644 --- a/internal/distro/rhel84/distro.go +++ b/internal/distro/rhel84/distro.go @@ -291,6 +291,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{"packages"} } +func (t *imageType) PackageSetsChains() map[string][]string { + return map[string][]string{} +} + func (t *imageType) Exports() []string { if len(t.exports) > 0 { return t.exports diff --git a/internal/distro/rhel84/distro_v2.go b/internal/distro/rhel84/distro_v2.go index 0c9153d02..7979d2421 100644 --- a/internal/distro/rhel84/distro_v2.go +++ b/internal/distro/rhel84/distro_v2.go @@ -144,6 +144,10 @@ func (t *imageTypeS2) PayloadPackageSets() []string { return []string{"packages"} } +func (t *imageTypeS2) PackageSetsChains() map[string][]string { + return map[string][]string{} +} + func (t *imageTypeS2) Exports() []string { return t.exports } diff --git a/internal/distro/rhel85/distro.go b/internal/distro/rhel85/distro.go index f1bd5f751..627eff3a1 100644 --- a/internal/distro/rhel85/distro.go +++ b/internal/distro/rhel85/distro.go @@ -291,6 +291,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{blueprintPkgsKey} } +func (t *imageType) PackageSetsChains() map[string][]string { + return map[string][]string{osPkgsKey: {osPkgsKey, blueprintPkgsKey}} +} + func (t *imageType) Exports() []string { return t.exports } diff --git a/internal/distro/rhel86/distro.go b/internal/distro/rhel86/distro.go index 0afa64c2c..9ad8312c4 100644 --- a/internal/distro/rhel86/distro.go +++ b/internal/distro/rhel86/distro.go @@ -238,6 +238,7 @@ type imageType struct { filename string mimeType string packageSets map[string]packageSetFunc + packageSetChains map[string][]string defaultImageConfig *distro.ImageConfig kernelOptions string defaultSize uint64 @@ -372,6 +373,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{blueprintPkgsKey} } +func (t *imageType) PackageSetsChains() map[string][]string { + return t.packageSetChains +} + func (t *imageType) Exports() []string { if len(t.exports) > 0 { return t.exports @@ -697,6 +702,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: edgeBuildPackageSet, osPkgsKey: edgeCommitPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices, }, @@ -721,6 +729,9 @@ func newDistro(distroName string) distro.Distro { } }, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices, }, @@ -768,6 +779,9 @@ func newDistro(distroName string) distro.Distro { osPkgsKey: edgeCommitPackageSet, installerPkgsKey: edgeInstallerPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices, }, @@ -818,6 +832,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: qcow2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ DefaultTarget: "multi-user.target", RHSMConfig: map[distro.RHSMSubscriptionStatus]*osbuild.RHSMStageOptions{ @@ -850,6 +867,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: vhdCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: []string{ "sshd", @@ -875,6 +895,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: azureRhuiCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ Timezone: "Etc/UTC", Locale: "en_US.UTF-8", @@ -1022,6 +1045,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: vmdkCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * GigaByte, @@ -1040,6 +1066,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: openstackCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * GigaByte, @@ -1249,6 +1278,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: ec2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultAMIImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -1269,6 +1301,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: ec2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultAMIImageConfig, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", bootable: true, @@ -1288,6 +1323,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2PackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -1308,6 +1346,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2PackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfig, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", bootable: true, @@ -1327,6 +1368,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2HaPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", bootable: true, @@ -1458,6 +1502,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2SapPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2SapImageConfigX86_64, 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, @@ -1599,6 +1646,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: gcePackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultGceByosImageConfig, kernelOptions: "net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y crashkernel=auto console=ttyS0,38400n8d", bootable: true, @@ -1644,6 +1694,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: gceRhuiPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultGceRhuiImageConfig, kernelOptions: "net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y crashkernel=auto console=ttyS0,38400n8d", bootable: true, @@ -1669,6 +1722,9 @@ func newDistro(distroName string) distro.Distro { } }, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, pipelines: tarPipelines, buildPipelines: []string{"build"}, payloadPipelines: []string{"os", "root-tar"}, @@ -1683,6 +1739,9 @@ func newDistro(distroName string) distro.Distro { osPkgsKey: bareMetalPackageSet, installerPkgsKey: anacondaPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, rpmOstree: false, bootISO: true, bootable: true, diff --git a/internal/distro/rhel90/distro.go b/internal/distro/rhel90/distro.go index 7b91010ff..cc38ab403 100644 --- a/internal/distro/rhel90/distro.go +++ b/internal/distro/rhel90/distro.go @@ -226,6 +226,7 @@ type imageType struct { filename string mimeType string packageSets map[string]packageSetFunc + packageSetChains map[string][]string defaultImageConfig *distro.ImageConfig kernelOptions string defaultSize uint64 @@ -360,6 +361,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{blueprintPkgsKey} } +func (t *imageType) PackageSetsChains() map[string][]string { + return t.packageSetChains +} + func (t *imageType) Exports() []string { if len(t.exports) > 0 { return t.exports @@ -676,6 +681,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: edgeBuildPackageSet, osPkgsKey: edgeCommitPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices, }, @@ -700,6 +708,9 @@ func newDistro(distroName string) distro.Distro { } }, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ EnabledServices: edgeServices, }, @@ -750,6 +761,9 @@ func newDistro(distroName string) distro.Distro { osPkgsKey: edgeCommitPackageSet, installerPkgsKey: edgeInstallerPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ Locale: "en_US.UTF-8", EnabledServices: edgeServices, @@ -801,6 +815,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: qcow2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ DefaultTarget: "multi-user.target", RHSMConfig: map[distro.RHSMSubscriptionStatus]*osbuild.RHSMStageOptions{ @@ -833,6 +850,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: vhdCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ Locale: "en_US.UTF-8", EnabledServices: []string{ @@ -859,6 +879,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: vmdkCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ Locale: "en_US.UTF-8", }, @@ -880,6 +903,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: openstackCommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: &distro.ImageConfig{ Locale: "en_US.UTF-8", }, @@ -1094,6 +1120,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: ec2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultAMIImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295", bootable: true, @@ -1114,6 +1143,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: ec2CommonPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultAMIImageConfig, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0", bootable: true, @@ -1133,6 +1165,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2PackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295", bootable: true, @@ -1153,6 +1188,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2PackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfig, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0", bootable: true, @@ -1172,6 +1210,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2HaPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2ImageConfigX86_64, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295", bootable: true, @@ -1303,6 +1344,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: ec2BuildPackageSet, osPkgsKey: rhelEc2SapPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultEc2SapImageConfigX86_64, 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, @@ -1443,6 +1487,9 @@ func newDistro(distroName string) distro.Distro { buildPkgsKey: distroBuildPackageSet, osPkgsKey: gcePackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultImageConfig: defaultGceImageConfig, kernelOptions: "net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y console=ttyS0,38400n8d", bootable: true, @@ -1468,6 +1515,9 @@ func newDistro(distroName string) distro.Distro { } }, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, pipelines: tarPipelines, buildPipelines: []string{"build"}, payloadPipelines: []string{"os", "root-tar"}, @@ -1482,6 +1532,9 @@ func newDistro(distroName string) distro.Distro { osPkgsKey: bareMetalPackageSet, installerPkgsKey: anacondaPackageSet, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, rpmOstree: false, bootISO: true, bootable: true, diff --git a/internal/distro/rhel90beta/distro.go b/internal/distro/rhel90beta/distro.go index 4fe17846f..abb0dadbb 100644 --- a/internal/distro/rhel90beta/distro.go +++ b/internal/distro/rhel90beta/distro.go @@ -182,6 +182,7 @@ type imageType struct { filename string mimeType string packageSets map[string]rpmmd.PackageSet + packageSetChains map[string][]string enabledServices []string disabledServices []string defaultTarget string @@ -322,6 +323,10 @@ func (t *imageType) PayloadPackageSets() []string { return []string{blueprintPkgsKey} } +func (t *imageType) PackageSetsChains() map[string][]string { + return t.packageSetChains +} + func (t *imageType) Exports() []string { return t.exports } @@ -590,6 +595,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: edgeBuildPackageSet(), osPkgsKey: edgeCommitPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, enabledServices: edgeServices, rpmOstree: true, pipelines: edgeCommitPipelines, @@ -607,6 +615,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { osPkgsKey: edgeCommitPackageSet(), containerPkgsKey: {Include: []string{"httpd"}}, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, enabledServices: edgeServices, rpmOstree: true, bootISO: false, @@ -632,6 +643,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { osPkgsKey: edgeCommitPackageSet(), installerPkgsKey: edgeInstallerPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, enabledServices: edgeServices, rpmOstree: true, bootISO: true, @@ -650,6 +664,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { packageSets: map[string]rpmmd.PackageSet{ osPkgsKey: qcow2CommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, bootable: true, defaultSize: 10 * GigaByte, pipelines: qcow2Pipelines, @@ -666,6 +683,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { packageSets: map[string]rpmmd.PackageSet{ osPkgsKey: vhdCommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, enabledServices: []string{ "sshd", "waagent", @@ -688,6 +708,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { packageSets: map[string]rpmmd.PackageSet{ osPkgsKey: vmdkCommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * GigaByte, @@ -705,6 +728,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { packageSets: map[string]rpmmd.PackageSet{ osPkgsKey: openstackCommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, kernelOptions: "ro net.ifnames=0", bootable: true, defaultSize: 4 * GigaByte, @@ -736,6 +762,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: ec2CommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", @@ -757,6 +786,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: ec2CommonPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", @@ -777,6 +809,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: rhelEc2PackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", @@ -798,6 +833,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: rhelEc2PackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto", @@ -818,6 +856,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: rhelEc2HaPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto", @@ -839,6 +880,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { buildPkgsKey: ec2BuildPackageSet(), osPkgsKey: rhelEc2SapPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, defaultTarget: "multi-user.target", enabledServices: ec2EnabledServices, 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", @@ -860,6 +904,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { Exclude: []string{"rng-tools"}, }, }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, pipelines: tarPipelines, buildPipelines: []string{"build"}, payloadPipelines: []string{"os", "root-tar"}, @@ -874,6 +921,9 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro { osPkgsKey: bareMetalPackageSet(), installerPkgsKey: installerPackageSet(), }, + packageSetChains: map[string][]string{ + osPkgsKey: {osPkgsKey, blueprintPkgsKey}, + }, rpmOstree: false, bootISO: true, bootable: true, diff --git a/internal/distro/test_distro/distro.go b/internal/distro/test_distro/distro.go index ca513952b..81f4552da 100644 --- a/internal/distro/test_distro/distro.go +++ b/internal/distro/test_distro/distro.go @@ -196,6 +196,10 @@ func (t *TestImageType) PayloadPackageSets() []string { return []string{} } +func (t *TestImageType) PackageSetsChains() map[string][]string { + return map[string][]string{} +} + func (t *TestImageType) Exports() []string { return distro.ExportsFallback() }