Skip to content

Commit

Permalink
Fedora: Update package sets for upstream changes
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Whalen <[email protected]>
  • Loading branch information
Paul Whalen authored and achilleas-k committed Feb 28, 2024
1 parent e259fdb commit a70ea5f
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions pkg/distro/fedora/package_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ func iotCommitPackageSet(t *imageType) rpmmd.PackageSet {
"openssh-server",
"openssl",
"parsec",
"passwd",
"pinentry",
"podman",
"podman-plugins",
"policycoreutils",
"policycoreutils-python-utils",
"polkit",
Expand Down Expand Up @@ -177,6 +175,15 @@ func iotCommitPackageSet(t *imageType) rpmmd.PackageSet {
},
}

if common.VersionLessThan(t.arch.distro.osVersion, "40") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"passwd", // provided by shadow-utils in F40+
"podman-plugins", // deprecated in podman 5
},
})
}

return ps
}

Expand Down Expand Up @@ -221,7 +228,7 @@ func bootableContainerPackageSet(t *imageType) rpmmd.PackageSet {
"openssh-server",
"openssl",
"ostree",
"passwd", "shadow-utils", // User configuration
"shadow-utils", // User configuration
"podman",
"rpm-ostree",
"selinux-policy-targeted",
Expand Down Expand Up @@ -250,6 +257,14 @@ func bootableContainerPackageSet(t *imageType) rpmmd.PackageSet {
},
}

if common.VersionLessThan(t.arch.distro.osVersion, "40") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"passwd", // provided by shadow-utils in F40+
},
})
}

switch t.Arch().Name() {
case arch.ARCH_AARCH64.String():
ps.Append(rpmmd.PackageSet{
Expand Down Expand Up @@ -667,7 +682,6 @@ func iotSimplifiedInstallerPackageSet(t *imageType) rpmmd.PackageSet {
"lvm2",
"mdadm",
"nss-softokn",
"passwd",
"policycoreutils",
"policycoreutils-python-utils",
"procps-ng",
Expand All @@ -679,5 +693,19 @@ func iotSimplifiedInstallerPackageSet(t *imageType) rpmmd.PackageSet {
},
})

if common.VersionGreaterThanOrEqual(t.arch.distro.osVersion, "40") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"shadow-utils", // includes passwd
},
})
} else if common.VersionLessThan(t.arch.distro.osVersion, "40") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"passwd",
},
})
}

return ps
}

0 comments on commit a70ea5f

Please sign in to comment.