distro/rhel7: update distribution implementation
Update the implementation of the distro.Distro interface to match the one in RHEL 8, 9, and Fedora. The main change is that the runner is a runner.Runner and not a string. The runner name is now rhel79 (changed from rhel7). This is functionally equivalent based on osbuild's runner version fallback logic.
This commit is contained in:
parent
a93ae83c5c
commit
6fdf917271
6 changed files with 8 additions and 7 deletions
|
|
@ -179,7 +179,7 @@ var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{
|
|||
func vhdPipelines(compress bool) pipelinesFunc {
|
||||
return func(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
||||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey], t.arch.distro.runner))
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey], t.arch.distro.runner.String()))
|
||||
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/runner"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -61,7 +62,7 @@ var distroMap = map[string]distribution{
|
|||
releaseVersion: "7",
|
||||
modulePlatformID: "platform:el7",
|
||||
vendor: "redhat",
|
||||
runner: "org.osbuild.rhel7",
|
||||
runner: &runner.RHEL{Major: uint64(7), Minor: uint64(9)},
|
||||
defaultImageConfig: defaultDistroImageConfig,
|
||||
},
|
||||
}
|
||||
|
|
@ -75,7 +76,7 @@ type distribution struct {
|
|||
releaseVersion string
|
||||
modulePlatformID string
|
||||
vendor string
|
||||
runner string
|
||||
runner runner.Runner
|
||||
arches map[string]distro.Arch
|
||||
defaultImageConfig *distro.ImageConfig
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ func qcow2CommonPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
|
||||
func qcow2Pipelines(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
||||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey], t.arch.distro.runner))
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey], t.arch.distro.runner.String()))
|
||||
|
||||
partitionTable, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
"pipelines": [
|
||||
{
|
||||
"name": "build",
|
||||
"runner": "org.osbuild.rhel7",
|
||||
"runner": "org.osbuild.rhel79",
|
||||
"stages": [
|
||||
{
|
||||
"type": "org.osbuild.rpm",
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
"pipelines": [
|
||||
{
|
||||
"name": "build",
|
||||
"runner": "org.osbuild.rhel7",
|
||||
"runner": "org.osbuild.rhel79",
|
||||
"stages": [
|
||||
{
|
||||
"type": "org.osbuild.rpm",
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
"pipelines": [
|
||||
{
|
||||
"name": "build",
|
||||
"runner": "org.osbuild.rhel7",
|
||||
"runner": "org.osbuild.rhel79",
|
||||
"stages": [
|
||||
{
|
||||
"type": "org.osbuild.rpm",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue