distro: introduce PackageSetsChains() method to ImageType

Introduce a new method `PackageSetsChains()` to the `ImageType`
interface, which returns a named lists of package sets, which should be
depolved together in a chain.

Extend all distro implementations with the new method.

Add a unit test ensuring that if an image type defines some package set
name chains, that all of the listed package set names are present in the
package set map returned by the image type.

The method is currently not used anywhere. This is a preparation for
switching from current way of depsolving to the chain depsolving.
This commit is contained in:
Tomas Hozza 2022-04-21 15:42:00 +02:00 committed by Ondřej Budai
parent 04d45a0fce
commit fee529cd0a
12 changed files with 219 additions and 0 deletions

View file

@ -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

View file

@ -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))
}
}

View file

@ -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)
}
}
})
}
}
}

View file

@ -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()
}

View file

@ -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()
}

View file

@ -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

View file

@ -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
}

View file

@ -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
}

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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()
}