forked from rpms/osbuild-composer
Rebase patch for osbuild-compsoer v105+
This commit is contained in:
parent
9eaab29b1a
commit
3f6a08a2a6
@ -1041,31 +1041,79 @@ index 0000000..f8b21e0
|
|||||||
+ }
|
+ }
|
||||||
+ ]
|
+ ]
|
||||||
+}
|
+}
|
||||||
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go
|
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go
|
||||||
index c20d26a..bbca4d4 100644
|
index 849ca43..e543957 100644
|
||||||
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go
|
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go
|
||||||
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go
|
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go
|
||||||
@@ -152,6 +152,19 @@ func newDistro(name string, minor int) *distribution {
|
@@ -97,6 +97,10 @@ func (d *Distribution) IsRHEL() bool {
|
||||||
runner: &runner.CentOS{Version: uint64(8)},
|
return strings.HasPrefix(d.name, "rhel")
|
||||||
defaultImageConfig: defaultDistroImageConfig,
|
}
|
||||||
|
|
||||||
|
+func (d *Distribution) IsAlma() bool {
|
||||||
|
+ return strings.HasPrefix(d.name, "almalinux")
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
func (d *Distribution) GetDefaultImageConfig() *distro.ImageConfig {
|
||||||
|
if d.DefaultImageConfig == nil {
|
||||||
|
return nil
|
||||||
|
@@ -138,6 +142,21 @@ func NewDistribution(name string, major, minor int) (*Distribution, error) {
|
||||||
|
ostreeRefTmpl: fmt.Sprintf("centos/%d/%%s/edge", major),
|
||||||
|
runner: &runner.CentOS{Version: uint64(major)},
|
||||||
}
|
}
|
||||||
+ case "almalinux":
|
+ case "almalinux":
|
||||||
+ rd = distribution{
|
+ if minor == -1 {
|
||||||
+ name: fmt.Sprintf("almalinux-8.%d", minor),
|
+ return nil, errors.New("AlmaLinux requires a minor version")
|
||||||
+ product: "AlmaLinux",
|
+ }
|
||||||
+ osVersion: fmt.Sprintf("8.%d", minor),
|
+
|
||||||
+ releaseVersion: "8",
|
+ rd = &Distribution{
|
||||||
+ modulePlatformID: "platform:el8",
|
+ name: fmt.Sprintf("almalinux-%d.%d", major, minor),
|
||||||
+ vendor: "almalinux",
|
+ product: "AlmaLinux",
|
||||||
+ ostreeRefTmpl: "almalinux/8/%s/edge",
|
+ osVersion: fmt.Sprintf("%d.%d", major, minor),
|
||||||
+ isolabelTmpl: fmt.Sprintf("AlmaLinux-8-%d-%%s-dvd", minor),
|
+ releaseVersion: fmt.Sprintf("%d", major),
|
||||||
+ runner: &runner.RHEL{Major: uint64(8), Minor: uint64(minor)},
|
+ modulePlatformID: fmt.Sprintf("platform:el%d", major),
|
||||||
+ defaultImageConfig: defaultDistroImageConfig,
|
+ vendor: "almalinux",
|
||||||
|
+ ostreeRefTmpl: fmt.Sprintf("almalinux/%d/%%s/edge", major),
|
||||||
|
+ runner: &runner.RHEL{Major: uint64(major), Minor: uint64(minor)},
|
||||||
+ }
|
+ }
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unknown distro name: %s", name))
|
return nil, fmt.Errorf("unknown distro name: %s", name)
|
||||||
}
|
}
|
||||||
@@ -483,12 +496,12 @@ func ParseID(idStr string) (*distro.ID, error) {
|
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
|
||||||
|
index a70269a..53077de 100644
|
||||||
|
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
|
||||||
|
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
|
||||||
|
@@ -126,6 +126,10 @@ func (t *ImageType) IsRHEL() bool {
|
||||||
|
return t.arch.distro.IsRHEL()
|
||||||
|
}
|
||||||
|
|
||||||
|
+func (t *ImageType) IsAlma() bool {
|
||||||
|
+ return t.arch.distro.IsAlma()
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
func (t *ImageType) ISOLabel() (string, error) {
|
||||||
|
if !t.BootISO {
|
||||||
|
return "", fmt.Errorf("image type %q is not an ISO", t.name)
|
||||||
|
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/distro.go
|
||||||
|
index f35f450..1ec430a 100644
|
||||||
|
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/distro.go
|
||||||
|
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/distro.go
|
||||||
|
@@ -60,10 +60,15 @@ func defaultDistroImageConfig(d *rhel.Distribution) *distro.ImageConfig {
|
||||||
|
func distroISOLabelFunc(t *rhel.ImageType) string {
|
||||||
|
const RHEL_ISO_LABEL = "RHEL-%s-%s-0-BaseOS-%s"
|
||||||
|
const CS_ISO_LABEL = "CentOS-Stream-%s-%s-dvd"
|
||||||
|
+ const ALMA_ISO_LABEL = "AlmaLinux-%s-%s-%s-dvd"
|
||||||
|
+
|
||||||
|
|
||||||
|
if t.IsRHEL() {
|
||||||
|
osVer := strings.Split(t.Arch().Distro().OsVersion(), ".")
|
||||||
|
return fmt.Sprintf(RHEL_ISO_LABEL, osVer[0], osVer[1], t.Arch().Name())
|
||||||
|
+ } else if t.IsAlma() {
|
||||||
|
+ osVer := strings.Split(t.Arch().Distro().OsVersion(), ".")
|
||||||
|
+ return fmt.Sprintf(ALMA_ISO_LABEL, osVer[0], osVer[1], t.Arch().Name())
|
||||||
|
} else {
|
||||||
|
return fmt.Sprintf(CS_ISO_LABEL, t.Arch().Distro().Releasever(), t.Arch().Name())
|
||||||
|
}
|
||||||
|
@@ -418,12 +423,12 @@ func ParseID(idStr string) (*distro.ID, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1080,7 +1128,7 @@ index c20d26a..bbca4d4 100644
|
|||||||
if id.MajorVersion/10 == 8 {
|
if id.MajorVersion/10 == 8 {
|
||||||
// handle single digit minor version
|
// handle single digit minor version
|
||||||
id.MinorVersion = id.MajorVersion % 10
|
id.MinorVersion = id.MajorVersion % 10
|
||||||
@@ -510,8 +523,8 @@ func ParseID(idStr string) (*distro.ID, error) {
|
@@ -445,8 +450,8 @@ func ParseID(idStr string) (*distro.ID, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RHEL uses minor version
|
// RHEL uses minor version
|
||||||
@ -1091,31 +1139,26 @@ index c20d26a..bbca4d4 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
return id, nil
|
return id, nil
|
||||||
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go
|
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/distro.go
|
||||||
index a3b57a9..8918c9b 100644
|
index 2e77b6b..e35ffee 100644
|
||||||
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go
|
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/distro.go
|
||||||
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go
|
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/distro.go
|
||||||
@@ -154,6 +154,19 @@ func newDistro(name string, minor int) *distribution {
|
@@ -43,10 +43,14 @@ var (
|
||||||
runner: &runner.CentOS{Version: uint64(9)},
|
func distroISOLabelFunc(t *rhel.ImageType) string {
|
||||||
defaultImageConfig: defaultDistroImageConfig,
|
const RHEL_ISO_LABEL = "RHEL-%s-%s-0-BaseOS-%s"
|
||||||
}
|
const CS_ISO_LABEL = "CentOS-Stream-%s-BaseOS-%s"
|
||||||
+ case "almalinux":
|
+ const ALMA_ISO_LABEL = "AlmaLinux-%s-%s-%s-dvd"
|
||||||
+ rd = distribution{
|
|
||||||
+ name: fmt.Sprintf("almalinux-9.%d", minor),
|
if t.IsRHEL() {
|
||||||
+ product: "AlmaLinux",
|
osVer := strings.Split(t.Arch().Distro().OsVersion(), ".")
|
||||||
+ osVersion: fmt.Sprintf("9.%d", minor),
|
return fmt.Sprintf(RHEL_ISO_LABEL, osVer[0], osVer[1], t.Arch().Name())
|
||||||
+ releaseVersion: "9",
|
+ } else if t.IsAlma() {
|
||||||
+ modulePlatformID: "platform:el9",
|
+ osVer := strings.Split(t.Arch().Distro().OsVersion(), ".")
|
||||||
+ vendor: "almalinux",
|
+ return fmt.Sprintf(ALMA_ISO_LABEL, osVer[0], osVer[1], t.Arch().Name())
|
||||||
+ ostreeRefTmpl: "almalinux/9/%s/edge",
|
} else {
|
||||||
+ isolabelTmpl: fmt.Sprintf("AlmaLinux-9-%d-%%s-dvd", minor),
|
return fmt.Sprintf(CS_ISO_LABEL, t.Arch().Distro().Releasever(), t.Arch().Name())
|
||||||
+ runner: &runner.RHEL{Major: uint64(9), Minor: uint64(minor)},
|
|
||||||
+ defaultImageConfig: defaultDistroImageConfig,
|
|
||||||
+ }
|
|
||||||
default:
|
|
||||||
panic(fmt.Sprintf("unknown distro name: %s", name))
|
|
||||||
}
|
}
|
||||||
@@ -470,12 +483,12 @@ func ParseID(idStr string) (*distro.ID, error) {
|
@@ -379,12 +383,12 @@ func ParseID(idStr string) (*distro.ID, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1130,7 +1173,7 @@ index a3b57a9..8918c9b 100644
|
|||||||
if id.MajorVersion/10 == 9 {
|
if id.MajorVersion/10 == 9 {
|
||||||
// handle single digit minor version
|
// handle single digit minor version
|
||||||
id.MinorVersion = id.MajorVersion % 10
|
id.MinorVersion = id.MajorVersion % 10
|
||||||
@@ -497,8 +510,8 @@ func ParseID(idStr string) (*distro.ID, error) {
|
@@ -406,8 +410,8 @@ func ParseID(idStr string) (*distro.ID, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RHEL uses minor version
|
// RHEL uses minor version
|
||||||
|
@ -8,11 +8,11 @@ Subject: [PATCH] Remove libreport-rhel-anaconda-bugzilla from anaconda
|
|||||||
vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go | 1 -
|
vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go | 1 -
|
||||||
1 file changed, 1 deletion(-)
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go
|
diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
|
||||||
index 05c54e5..68b0100 100644
|
index 0d5fbe066..1fbbed351 100644
|
||||||
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go
|
--- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
|
||||||
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go
|
+++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
|
||||||
@@ -214,7 +214,6 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet {
|
@@ -228,7 +228,6 @@ func anacondaPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
|
||||||
"libibverbs",
|
"libibverbs",
|
||||||
"libreport-plugin-bugzilla",
|
"libreport-plugin-bugzilla",
|
||||||
"libreport-plugin-reportuploader",
|
"libreport-plugin-reportuploader",
|
||||||
|
Loading…
Reference in New Issue
Block a user