distro/rhel84: add centos 8 stream support
The image definition is shared with the latest RHEL 8.y one (8.4 currently). I expect that we the introduction of 8.5 support, we point the centos 8 distro at it. The test repositories and manifests use the official CentOS composes. From what I can tell, they are persistent. This is not guaranteed though, so we might need to switch to RPMRepo at some point. The "classic" CentOS 8 should also be buildable but due to the chicken and egg issue (this commit will get into Centos "8.4" but Centos "8.4" isn't a thing yet), we cannot test it and therefore it might be broken. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
6feba70758
commit
5eb402415d
26 changed files with 76009 additions and 114 deletions
|
|
@ -63,7 +63,7 @@ func NewComposer(config *ComposerConfigFile, stateDir, cacheDir string, logger *
|
|||
return nil, err
|
||||
}
|
||||
|
||||
c.distros, err = distro.NewRegistry(fedora32.New(), fedora33.New(), rhel8.New(), rhel84.New())
|
||||
c.distros, err = distro.NewRegistry(fedora32.New(), fedora33.New(), rhel8.New(), rhel84.New(), rhel84.NewCentos())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error loading distros: %v", err)
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ func NewComposer(config *ComposerConfigFile, stateDir, cacheDir string, logger *
|
|||
func (c *Composer) InitWeldr(repoPaths []string, weldrListener net.Listener) error {
|
||||
archName := common.CurrentArch()
|
||||
|
||||
hostDistro, beta, err := c.distros.FromHost()
|
||||
hostDistro, beta, isStream, err := c.distros.FromHost()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -102,6 +102,11 @@ func (c *Composer) InitWeldr(repoPaths []string, weldrListener net.Listener) err
|
|||
name += "-beta"
|
||||
}
|
||||
|
||||
// override repository for centos stream, remove when CentOS 8 is EOL
|
||||
if isStream && name == "centos-8" {
|
||||
name = "centos-stream-8"
|
||||
}
|
||||
|
||||
repos, err := rpmmd.LoadRepositories(repoPaths, name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error loading repositories for %s: %v", hostDistro.Name(), err)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
distros, err := distro.NewRegistry(fedora32.New(), fedora33.New(), rhel8.New(), rhel84.New())
|
||||
distros, err := distro.NewRegistry(fedora32.New(), fedora33.New(), rhel8.New(), rhel84.New(), rhel84.NewCentos())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue