RHEL-90: do not install subscription-manager on non-RHEL
Do not install any subscription-manager packages on non-RHEL distro variant of RHEL-90 (meaning CentOS Stream). Subscription-manager is not needed on CentOS Stream and it does not add value to install it by default. It is also not included on images produced by CentOS Stream. Relevant links: - https://gitlab.com/redhat/centos-stream/release-engineering/comps/-/merge_requests/151 - https://bugzilla.redhat.com/show_bug.cgi?id=1962385 - https://gitlab.com/redhat/centos-stream/release-engineering/kickstarts/-/blob/main/CentOS-Stream-9-kvm.ks#L115 Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
8130c892f0
commit
755154179d
1 changed files with 35 additions and 5 deletions
|
|
@ -323,7 +323,6 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"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",
|
||||
|
|
@ -349,6 +348,17 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
},
|
||||
}
|
||||
|
||||
// Do not include this in the distroSpecificPackageSet for now,
|
||||
// because it includes 'insights-client' which is not installed
|
||||
// by default on all RHEL images (although it would probably make sense).
|
||||
if t.arch.distro.isRHEL() {
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"subscription-manager",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
switch t.arch.Name() {
|
||||
case distro.X86_64ArchName:
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
|
|
@ -388,7 +398,7 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
}
|
||||
|
||||
func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"authselect-compat",
|
||||
"chrony",
|
||||
|
|
@ -407,7 +417,6 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"redhat-release",
|
||||
"redhat-release-eula",
|
||||
"rsync",
|
||||
"subscription-manager-cockpit",
|
||||
"tar",
|
||||
"tcpdump",
|
||||
},
|
||||
|
|
@ -431,6 +440,17 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"udisks2",
|
||||
},
|
||||
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t)).Append(distroSpecificPackageSet(t))
|
||||
|
||||
// Ensure to not pull in subscription-manager on non-RHEL distro
|
||||
if t.arch.distro.isRHEL() {
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"subscription-manager-cockpit",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
func vhdCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
|
|
@ -802,7 +822,7 @@ func aarch64EdgeCommitPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
}
|
||||
|
||||
func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"authselect-compat",
|
||||
"chrony",
|
||||
|
|
@ -837,11 +857,21 @@ func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"redhat-release",
|
||||
"redhat-release-eula",
|
||||
"rsync",
|
||||
"subscription-manager-cockpit",
|
||||
"tar",
|
||||
"tcpdump",
|
||||
},
|
||||
}.Append(bootPackageSet(t)).Append(coreOsCommonPackageSet(t)).Append(distroBuildPackageSet(t))
|
||||
|
||||
// Ensure to not pull in subscription-manager on non-RHEL distro
|
||||
if t.arch.distro.isRHEL() {
|
||||
ps = ps.Append(rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"subscription-manager-cockpit",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
// packages that are only in some (sub)-distributions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue