runner: add CentOS runner type

New runner type for CentOS 8 and 9.  Copied from RHEL
This commit is contained in:
Achilleas Koutsou 2022-10-12 19:36:33 +02:00 committed by Christian Kellner
parent e9746bed32
commit 5592e6a51f

23
internal/runner/centos.go Normal file
View file

@ -0,0 +1,23 @@
package runner
import "fmt"
type CentOS struct {
Version uint64
}
func (c *CentOS) String() string {
return fmt.Sprintf("org.osbuild.centos%d", c.Version)
}
func (c *CentOS) GetBuildPackages() []string {
packages := []string{
"glibc", // ldconfig
}
if c.Version >= 8 {
packages = append(packages,
"systemd", // systemd-tmpfiles and systemd-sysusers
)
}
return packages
}