RHEL-9.0: replace the @core package group with a static list of packages

Don't use the `@core` package group in image definitions, because it is
not intended as the minimal package set for virtual / cloud images. In
addition, its content is changing without us knowing, which has
consequences such as the recent discovery of the fact that TuneD is no
longer installed by default on RHEL images, while it definitely should be.

Replace the `@core` package group with the `coreOsCommonPackageSet`
package set. The content of it is based on the latest `@core` group
definition with a few modifications, so that image package sets
never end up having the same package listed in the `Include` and `Exclude`
package set at the same time. All additions have been accompanied with a
comment and all removals have been kept commented out with a comment.

The fact that the change does not have any effect on image package sets
was verified by regenerating all RHEL-9.0 image test cases. There is
however one change in the VMDK image. Specifically the
`python3-libselinux` package have been added. The reason is that the
latest `@core` group definition was used when defining the content of
`coreOsCommonPackageSet`, however the `@core` group definition in the
RPMRepo snapshot used for the image test case didn't include the package
yet.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-11-26 14:31:40 +01:00 committed by Achilleas Koutsou
parent aee86c1199
commit bab13f3c90
2 changed files with 271 additions and 65 deletions

View file

@ -281,20 +281,141 @@ func s390xLegacyBootPackageSet(t *imageType) rpmmd.PackageSet {
// OS package sets
// Replacement of the previously used @core package group
func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet {
ps := rpmmd.PackageSet{
Include: []string{
"audit",
"basesystem",
"bash",
"coreutils",
"cronie",
"crypto-policies",
"crypto-policies-scripts",
"curl",
"dnf",
"yum",
"e2fsprogs",
"filesystem",
//"firewalld", // excluded by some images using the @core
"glibc",
"grubby",
"hostname",
"iproute",
"iproute-tc",
"iputils",
"kbd",
"kexec-tools",
"less",
"logrotate",
"man-db",
"ncurses",
"openssh-clients",
"openssh-server",
"p11-kit",
"parted",
"passwd",
"policycoreutils",
"procps-ng",
"rootfiles",
"rpm",
"rpm-plugin-audit",
"rsyslog",
"selinux-policy-targeted",
"setup",
"shadow-utils",
"subscription-manager", // should be included only if 'redhat-release' is in the package set, which it always is
"sssd-common",
"sssd-kcm",
"sudo",
"systemd",
"tuned",
"util-linux",
"vim-minimal",
"xfsprogs",
"authselect",
"prefixdevname",
"dnf-plugins-core",
//"dracut-config-rescue", // excluded by most of the images using @core group
"NetworkManager",
"NetworkManager-team",
"NetworkManager-tui",
"libsysfs",
"linux-firmware",
"lshw",
"lsscsi",
"kernel-tools",
"sg3_utils",
"sg3_utils-libs",
"python3-libselinux",
},
}
switch t.arch.Name() {
case distro.X86_64ArchName:
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"irqbalance",
"microcode_ctl",
// the ones below are excluded most of the time
// "iwl100-firmware",
// "iwl105-firmware",
// "iwl135-firmware",
// "iwl1000-firmware",
// "iwl2000-firmware",
// "iwl2030-firmware",
// "iwl3160-firmware",
// "iwl5000-firmware",
// "iwl5150-firmware",
// "iwl6000g2a-firmware",
// "iwl6050-firmware",
// "iwl7260-firmware",
},
})
case distro.Aarch64ArchName:
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"irqbalance",
},
})
case distro.Ppc64leArchName:
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"irqbalance",
"opal-prd",
"ppc64-diag-rtas",
"powerpc-utils-core",
"lsvpd",
},
})
case distro.S390xArchName:
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"s390utils-core",
},
})
}
return ps
}
func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
return rpmmd.PackageSet{
Include: []string{
"@core",
//"@core", // replaced by coreOsCommonPackageSet package set
"authselect-compat",
"chrony",
"cloud-init",
"cloud-utils-growpart",
"cockpit-system",
"cockpit-ws",
"dnf",
//"dnf", // part of coreOsCommonPackageSet package set
"dnf-utils",
"dosfstools",
"NetworkManager",
//"NetworkManager", // part of coreOsCommonPackageSet package set
"nfs-utils",
"oddjob",
"oddjob-mkhomedir",
@ -307,8 +428,8 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
"subscription-manager-cockpit",
"tar",
"tcpdump",
"tuned",
"yum",
//"tuned", // part of coreOsCommonPackageSet package set
//"yum", // part of coreOsCommonPackageSet package set
},
Exclude: []string{
"aic94xx-firmware",
@ -317,47 +438,48 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
"alsa-tools-firmware",
"biosdevname",
"dnf-plugin-spacewalk",
"dracut-config-rescue",
//"dracut-config-rescue", // removed from the coreOsCommonPackageSet package set
"fedora-release",
"fedora-repos",
"firewalld",
//"firewalld", // removed from the coreOsCommonPackageSet package set
"iprutils",
"ivtv-firmware",
"iwl100-firmware",
"iwl1000-firmware",
"iwl105-firmware",
"iwl135-firmware",
"iwl2000-firmware",
"iwl2030-firmware",
"iwl3160-firmware",
"iwl5000-firmware",
"iwl5150-firmware",
"iwl6000g2a-firmware",
"iwl6000g2b-firmware",
"iwl6050-firmware",
"iwl7260-firmware",
// "iwl100-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl1000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl105-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl135-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl2000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl2030-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl3160-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl5000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl5150-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6000g2a-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6000g2b-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6050-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl7260-firmware", // removed from the coreOsCommonPackageSet package set
"langpacks-*",
"langpacks-en",
"langpacks-en",
//"langpacks-en", // duplicate entry
"libertas-sd8787-firmware",
"nss",
"plymouth",
"rng-tools",
"udisks2",
},
}.Append(bootPackageSet(t)).Append(distroSpecificPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t)).Append(distroSpecificPackageSet(t))
}
func vhdCommonPackageSet(t *imageType) rpmmd.PackageSet {
return rpmmd.PackageSet{
ps := rpmmd.PackageSet{
Include: []string{
// Defaults
"@Core",
//"@Core", // replaced by coreOsCommonPackageSet package set
"langpacks-en",
"tuned",
//"tuned", // part of coreOsCommonPackageSet package set
// From the lorax kickstart
"selinux-policy-targeted",
//"selinux-policy-targeted", // part of coreOsCommonPackageSet package set
"chrony",
"firewalld", // used to be part of coreOsCommonPackageSet package set
"WALinuxAgent",
"python3",
"net-tools",
@ -369,74 +491,146 @@ func vhdCommonPackageSet(t *imageType) rpmmd.PackageSet {
"dhcp-client",
},
Exclude: []string{
"dracut-config-rescue",
//"dracut-config-rescue", // removed from the coreOsCommonPackageSet package set
"rng-tools",
},
}.Append(bootPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t))
if t.arch.Name() == distro.X86_64ArchName {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
// packages below used to come from @core group and were not excluded
// they may not be needed at all, but kept them here to not need
// to exclude them instead in all other images
"iwl100-firmware",
"iwl105-firmware",
"iwl135-firmware",
"iwl1000-firmware",
"iwl2000-firmware",
"iwl2030-firmware",
"iwl3160-firmware",
"iwl5000-firmware",
"iwl5150-firmware",
"iwl6000g2a-firmware",
"iwl6050-firmware",
"iwl7260-firmware",
},
})
}
return ps
}
func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet {
return rpmmd.PackageSet{
ps := rpmmd.PackageSet{
Include: []string{
"@core",
//"@core", // replaced by coreOsCommonPackageSet package set
"chrony",
"firewalld",
"langpacks-en",
"open-vm-tools",
"selinux-policy-targeted",
"tuned",
//"selinux-policy-targeted", // part of coreOsCommonPackageSet package set
//"tuned", // part of coreOsCommonPackageSet package set
},
Exclude: []string{
"dracut-config-rescue",
//"dracut-config-rescue", // removed from the coreOsCommonPackageSet package set
"rng-tools",
},
}.Append(bootPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t))
if t.arch.Name() == distro.X86_64ArchName {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
// packages below used to come from @core group and were not excluded
// they may not be needed at all, but kept them here to not need
// to exclude them instead in all other images
"iwl100-firmware",
"iwl105-firmware",
"iwl135-firmware",
"iwl1000-firmware",
"iwl2000-firmware",
"iwl2030-firmware",
"iwl3160-firmware",
"iwl5000-firmware",
"iwl5150-firmware",
"iwl6000g2a-firmware",
"iwl6050-firmware",
"iwl7260-firmware",
},
})
}
return ps
}
func openstackCommonPackageSet(t *imageType) rpmmd.PackageSet {
return rpmmd.PackageSet{
ps := rpmmd.PackageSet{
Include: []string{
// Defaults
"@Core",
//"@Core", // replaced by coreOsCommonPackageSet package set
"langpacks-en",
"tuned",
//"tuned", // part of coreOsCommonPackageSet package set
"firewalld", // used to be part of coreOsCommonPackageSet package set
// From the lorax kickstart
"selinux-policy-targeted",
//"selinux-policy-targeted", // part of coreOsCommonPackageSet package set
"cloud-init",
"qemu-guest-agent",
"spice-vdagent",
},
Exclude: []string{
"dracut-config-rescue",
//"dracut-config-rescue", // removed from the coreOsCommonPackageSet package set
"rng-tools",
},
}.Append(bootPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t))
if t.arch.Name() == distro.X86_64ArchName {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
// packages below used to come from @core group and were not excluded
// they may not be needed at all, but kept them here to not need
// to exclude them instead in all other images
"iwl100-firmware",
"iwl105-firmware",
"iwl135-firmware",
"iwl1000-firmware",
"iwl2000-firmware",
"iwl2030-firmware",
"iwl3160-firmware",
"iwl5000-firmware",
"iwl5150-firmware",
"iwl6000g2a-firmware",
"iwl6050-firmware",
"iwl7260-firmware",
},
})
}
return ps
}
func ec2CommonPackageSet(t *imageType) rpmmd.PackageSet {
return rpmmd.PackageSet{
Include: []string{
"@core",
//"@core", // replaced by coreOsCommonPackageSet package set
"authselect-compat",
"chrony",
"cloud-init",
"cloud-utils-growpart",
"dhcp-client",
"dracut-config-rescue", // used to be part of @core group but excluded by most images
"yum-utils",
"dracut-config-generic",
"gdisk",
"grub2",
"langpacks-en",
"NetworkManager",
//"NetworkManager", // part of coreOsCommonPackageSet package set
"NetworkManager-cloud-setup",
"redhat-release",
"redhat-release-eula",
"rsync",
"tar",
"tuned",
//"tuned", // part of coreOsCommonPackageSet package set
"qemu-guest-agent",
},
Exclude: []string{
@ -444,26 +638,26 @@ func ec2CommonPackageSet(t *imageType) rpmmd.PackageSet {
"alsa-firmware",
"alsa-tools-firmware",
"biosdevname",
"firewalld",
//"firewalld", // not part of coreOsCommonPackageSet package set any more
"iprutils",
"ivtv-firmware",
"iwl1000-firmware",
"iwl100-firmware",
"iwl105-firmware",
"iwl135-firmware",
"iwl2000-firmware",
"iwl2030-firmware",
"iwl3160-firmware",
"iwl5000-firmware",
"iwl5150-firmware",
"iwl6000g2a-firmware",
"iwl6000g2b-firmware",
"iwl6050-firmware",
"iwl7260-firmware",
// "iwl1000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl100-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl105-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl135-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl2000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl2030-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl3160-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl5000-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl5150-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6000g2a-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6000g2b-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl6050-firmware", // removed from the coreOsCommonPackageSet package set
// "iwl7260-firmware", // removed from the coreOsCommonPackageSet package set
"libertas-sd8787-firmware",
"plymouth",
},
}.Append(bootPackageSet(t)).Append(distroSpecificPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t)).Append(distroSpecificPackageSet(t))
}
// rhel-ec2 image package set
@ -679,11 +873,12 @@ func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
"chrony",
"cockpit-system",
"cockpit-ws",
"@core",
//"@core", // replaced by coreOsCommonPackageSet package set
"dhcp-client",
"dnf",
//"dnf", // part of coreOsCommonPackageSet package set
"dnf-utils",
"dosfstools",
"firewalld", // used to be part of coreOsCommonPackageSet package set
"iwl1000-firmware",
"iwl100-firmware",
"iwl105-firmware",
@ -699,7 +894,7 @@ func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
"iwl7260-firmware",
"lvm2",
"net-tools",
"NetworkManager",
//"NetworkManager", // part of coreOsCommonPackageSet package set
"nfs-utils",
"oddjob",
"oddjob-mkhomedir",
@ -710,14 +905,14 @@ func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
"redhat-release",
"redhat-release-eula",
"rsync",
"selinux-policy-targeted",
//"selinux-policy-targeted", // part of coreOsCommonPackageSet package set
"subscription-manager-cockpit",
"tar",
"tcpdump",
"tuned",
"yum",
//"tuned", // part of coreOsCommonPackageSet package set
//"yum", // part of coreOsCommonPackageSet package set
},
}.Append(bootPackageSet(t)).Append(distroBuildPackageSet(t))
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t)).Append(distroBuildPackageSet(t))
}
// packages that are only in some (sub)-distributions

View file

@ -753,6 +753,7 @@
"sha256:f27279ad4284843cc7d3c81ccf9eb11dbac4826a20d65e643b2f4404ef76fff1",
"sha256:9430eea24431470fa135cb08ea1be9731794445c3a1ed7e178aa8aa81a91a717",
"sha256:1fc66abab29fa0c42939862b41b98e4d90165985dfd4c2c0c78330e350879758",
"sha256:3beca4e8341b55f857ec0ff5ffd985bdb77879fae48e687a56811b8ac500e558",
"sha256:e944eb6ecda4b121fa4cb62b08264665e34c3f9079644a0bd5fe6f470d6ca53b",
"sha256:2642e4623fcf504cfaaeac1bfec8d5dab0de93b2f038931e7789461cf3107c59",
"sha256:9092b0ad7e9d343d446ae0030763c2e526ff922e7680df4c29d507e38c858d7d",
@ -9122,6 +9123,15 @@
"remote_location": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-appstream-n9.0-20210930/Packages/python-unversioned-command-3.9.7-1.el9.noarch.rpm",
"checksum": "sha256:1fc66abab29fa0c42939862b41b98e4d90165985dfd4c2c0c78330e350879758"
},
{
"name": "python3-libselinux",
"epoch": 0,
"version": "3.2",
"release": "6.el9",
"arch": "x86_64",
"remote_location": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el9/el9-x86_64-appstream-n9.0-20210930/Packages/python3-libselinux-3.2-6.el9.x86_64.rpm",
"checksum": "sha256:3beca4e8341b55f857ec0ff5ffd985bdb77879fae48e687a56811b8ac500e558"
},
{
"name": "python3-unbound",
"epoch": 0,
@ -9730,6 +9740,7 @@
"python3-libdnf-0.63.0-4.el9.x86_64",
"python3-librepo-1.14.0-6.el9.x86_64",
"python3-libs-3.9.7-1.el9.x86_64",
"python3-libselinux-3.2-6.el9.x86_64",
"python3-libxml2-2.9.12-4.el9.x86_64",
"python3-linux-procfs-0.6.3-2.el9.noarch",
"python3-nftables-0.9.8-7.el9.x86_64",