distro/fedora: Added packageSetChain references
* Removed specific function that packaged the fedora cloud package group to avoid collision between fedora-identity-cloud and fedora-identity-basic packages. With the introduction of the PackageSetChains() it is no longer necessary to filter the packages
This commit is contained in:
parent
426085c060
commit
9a4125a37d
2 changed files with 37 additions and 78 deletions
|
|
@ -76,6 +76,9 @@ var (
|
|||
buildPkgsKey: iotBuildPackageSet,
|
||||
osPkgsKey: iotCommitPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
EnabledServices: iotServices,
|
||||
},
|
||||
|
|
@ -100,6 +103,9 @@ var (
|
|||
}
|
||||
},
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
EnabledServices: iotServices,
|
||||
},
|
||||
|
|
@ -121,6 +127,9 @@ var (
|
|||
osPkgsKey: iotCommitPackageSet,
|
||||
installerPkgsKey: iotInstallerPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
Locale: "en_US.UTF-8",
|
||||
EnabledServices: iotServices,
|
||||
|
|
@ -141,6 +150,9 @@ var (
|
|||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: qcow2CommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
DefaultTarget: "graphical.target",
|
||||
EnabledServices: []string{
|
||||
|
|
@ -167,6 +179,9 @@ var (
|
|||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: vhdCommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
Locale: "en_US.UTF-8",
|
||||
EnabledServices: []string{
|
||||
|
|
@ -197,6 +212,9 @@ var (
|
|||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: vmdkCommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
Locale: "en_US.UTF-8",
|
||||
EnabledServices: []string{
|
||||
|
|
@ -223,6 +241,9 @@ var (
|
|||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: openstackCommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
Locale: "en_US.UTF-8",
|
||||
EnabledServices: []string{
|
||||
|
|
@ -259,6 +280,9 @@ var (
|
|||
buildPkgsKey: ec2BuildPackageSet,
|
||||
osPkgsKey: ec2CommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
defaultImageConfig: defaultEc2ImageConfig,
|
||||
kernelOptions: "ro no_timer_check net.ifnames=0 console=tty1",
|
||||
bootable: true,
|
||||
|
|
@ -454,6 +478,7 @@ type imageType struct {
|
|||
filename string
|
||||
mimeType string
|
||||
packageSets map[string]packageSetFunc
|
||||
packageSetChains map[string][]string
|
||||
defaultImageConfig *distro.ImageConfig
|
||||
kernelOptions string
|
||||
defaultSize uint64
|
||||
|
|
@ -591,6 +616,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
|
||||
|
|
|
|||
|
|
@ -245,85 +245,10 @@ func aarch64UEFIBootPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
}
|
||||
}
|
||||
|
||||
// We need to unpack the 'fedora cloud server' group because of the dependency collision with fedora-release-identity
|
||||
// and the packages coming from the blueprint
|
||||
func fedoraCloudServerPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
// Mandatory packages
|
||||
"@core",
|
||||
"cloud-init",
|
||||
"cloud-utils-growpart",
|
||||
"dracut-config-generic",
|
||||
"grubby",
|
||||
"rsync",
|
||||
"tar",
|
||||
|
||||
// Default packages
|
||||
"console-login-helper-messages-issuegen",
|
||||
"console-login-helper-messages-motdgen",
|
||||
"console-login-helper-messages-profile",
|
||||
},
|
||||
Exclude: []string{
|
||||
"grubby-deprecated",
|
||||
"extlinux-bootloader",
|
||||
},
|
||||
}
|
||||
|
||||
r, err := strconv.Atoi(t.Arch().Distro().Releasever())
|
||||
if err != nil {
|
||||
log.Errorf("failed to convert fedora release %s to string: %s", t.Arch().Distro().Releasever(), err)
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
case distro.X86_64ArchName:
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"syslinux",
|
||||
"syslinux-extlinux",
|
||||
"syslinux-extlinux-nonlinux",
|
||||
"syslinux-nonlinux",
|
||||
"mtools",
|
||||
},
|
||||
})
|
||||
}
|
||||
if r > 34 {
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@Bootloader tools for Cloud images",
|
||||
"libpng",
|
||||
"graphite2",
|
||||
"harfbuzz",
|
||||
"freetype",
|
||||
"grub2-tools-extra",
|
||||
},
|
||||
})
|
||||
switch t.Arch().Name() {
|
||||
case distro.X86_64ArchName:
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"efi-filesystem",
|
||||
"efibootmgr",
|
||||
"shim-ia32",
|
||||
"shim-x64",
|
||||
"grub2-efi-ia32",
|
||||
"grub2-efi-x64",
|
||||
"grub2-tools-efi",
|
||||
"mokutil",
|
||||
"efivar-libs",
|
||||
"mtools",
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@Fedora Cloud Server",
|
||||
"chrony",
|
||||
"systemd-udev",
|
||||
"selinux-policy-targeted",
|
||||
|
|
@ -338,8 +263,10 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"gobject-introspection",
|
||||
"plymouth",
|
||||
"zram-generator-defaults",
|
||||
"grubby-deprecated",
|
||||
"extlinux-bootloader",
|
||||
},
|
||||
}.Append(bootPackageSet(t)).Append(fedoraCloudServerPackageSet(t))
|
||||
}.Append(bootPackageSet(t))
|
||||
|
||||
return ps
|
||||
}
|
||||
|
|
@ -372,6 +299,7 @@ func vhdCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@Fedora Cloud Server",
|
||||
"chrony",
|
||||
"systemd-udev",
|
||||
"selinux-policy-targeted",
|
||||
|
|
@ -386,8 +314,10 @@ func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"gobject-introspection",
|
||||
"plymouth",
|
||||
"zram-generator-defaults",
|
||||
"grubby-deprecated",
|
||||
"extlinux-bootloader",
|
||||
},
|
||||
}.Append(bootPackageSet(t)).Append(fedoraCloudServerPackageSet(t))
|
||||
}.Append(bootPackageSet(t))
|
||||
|
||||
return ps
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue