Rename rhel86 package to rhel8

With 8.3 support dropped, the rhel86 package defines all the supported
RHEL 8 versions except 8.4.

RHEL 8.4 will be merged into the rhel8 package soon.
This commit is contained in:
Achilleas Koutsou 2022-06-30 16:50:16 +02:00 committed by Tom Gundersen
parent 723c34984c
commit 57df5c2eaa
10 changed files with 30 additions and 30 deletions

View file

@ -13,7 +13,7 @@ import (
"github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/blueprint"
"github.com/osbuild/osbuild-composer/internal/distro" "github.com/osbuild/osbuild-composer/internal/distro"
"github.com/osbuild/osbuild-composer/internal/distro/fedora" "github.com/osbuild/osbuild-composer/internal/distro/fedora"
rhel "github.com/osbuild/osbuild-composer/internal/distro/rhel86" rhel "github.com/osbuild/osbuild-composer/internal/distro/rhel8"
"github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/dnfjson"
"github.com/osbuild/osbuild-composer/internal/rpmmd" "github.com/osbuild/osbuild-composer/internal/rpmmd"
) )

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
import ( import (
"encoding/json" "encoding/json"

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
import ( import (
"math/rand" "math/rand"

View file

@ -1,4 +1,4 @@
package rhel86_test package rhel8_test
import ( import (
"fmt" "fmt"
@ -11,7 +11,7 @@ import (
"github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/blueprint"
"github.com/osbuild/osbuild-composer/internal/distro" "github.com/osbuild/osbuild-composer/internal/distro"
"github.com/osbuild/osbuild-composer/internal/distro/distro_test_common" "github.com/osbuild/osbuild-composer/internal/distro/distro_test_common"
"github.com/osbuild/osbuild-composer/internal/distro/rhel86" "github.com/osbuild/osbuild-composer/internal/distro/rhel8"
) )
type rhelFamilyDistro struct { type rhelFamilyDistro struct {
@ -22,7 +22,7 @@ type rhelFamilyDistro struct {
var rhelFamilyDistros = []rhelFamilyDistro{ var rhelFamilyDistros = []rhelFamilyDistro{
{ {
name: "rhel", name: "rhel",
distro: rhel86.New(), distro: rhel8.New(),
}, },
} }
@ -436,7 +436,7 @@ func TestImageTypeAliases(t *testing.T) {
func TestDistro_ManifestError(t *testing.T) { func TestDistro_ManifestError(t *testing.T) {
// Currently, the only unsupported configuration is OSTree commit types // Currently, the only unsupported configuration is OSTree commit types
// with Kernel boot options // with Kernel boot options
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Kernel: &blueprint.KernelCustomization{ Kernel: &blueprint.KernelCustomization{
@ -548,12 +548,12 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
} }
} }
func TestRhel86_ListArches(t *testing.T) { func TestRHEL8_ListArches(t *testing.T) {
arches := rhel86.New().ListArches() arches := rhel8.New().ListArches()
assert.Equal(t, []string{"aarch64", "ppc64le", "s390x", "x86_64"}, arches) assert.Equal(t, []string{"aarch64", "ppc64le", "s390x", "x86_64"}, arches)
} }
func TestRhel86_GetArch(t *testing.T) { func TestRHEL8_GetArch(t *testing.T) {
arches := []struct { arches := []struct {
name string name string
errorExpected bool errorExpected bool
@ -594,21 +594,21 @@ func TestRhel86_GetArch(t *testing.T) {
} }
func TestRhel86_Name(t *testing.T) { func TestRhel86_Name(t *testing.T) {
distro := rhel86.New() distro := rhel8.New()
assert.Equal(t, "rhel-86", distro.Name()) assert.Equal(t, "rhel-86", distro.Name())
} }
func TestRhel86_ModulePlatformID(t *testing.T) { func TestRhel86_ModulePlatformID(t *testing.T) {
distro := rhel86.New() distro := rhel8.New()
assert.Equal(t, "platform:el8", distro.ModulePlatformID()) assert.Equal(t, "platform:el8", distro.ModulePlatformID())
} }
func TestRhel86_KernelOption(t *testing.T) { func TestRhel86_KernelOption(t *testing.T) {
distro_test_common.TestDistro_KernelOption(t, rhel86.New()) distro_test_common.TestDistro_KernelOption(t, rhel8.New())
} }
func TestDistro_CustomFileSystemManifestError(t *testing.T) { func TestDistro_CustomFileSystemManifestError(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -636,7 +636,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
} }
func TestDistro_TestRootMountPoint(t *testing.T) { func TestDistro_TestRootMountPoint(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -665,7 +665,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
} }
func TestDistro_CustomFileSystemSubDirectories(t *testing.T) { func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -696,7 +696,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
} }
func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) { func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -735,7 +735,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
} }
func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) { func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -769,7 +769,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
} }
func TestDistro_CustomFileSystemPatternMatching(t *testing.T) { func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{
@ -801,7 +801,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
} }
func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) { func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
r8distro := rhel86.New() r8distro := rhel8.New()
bp := blueprint.Blueprint{ bp := blueprint.Blueprint{
Customizations: &blueprint.Customizations{ Customizations: &blueprint.Customizations{
Filesystem: []blueprint.FilesystemCustomization{ Filesystem: []blueprint.FilesystemCustomization{

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
// This file defines package sets that are used by more than one image type. // This file defines package sets that are used by more than one image type.

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
import ( import (
"github.com/osbuild/osbuild-composer/internal/disk" "github.com/osbuild/osbuild-composer/internal/disk"

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
import ( import (
"fmt" "fmt"

View file

@ -1,4 +1,4 @@
package rhel86 package rhel8
import ( import (
"fmt" "fmt"

View file

@ -9,8 +9,8 @@ import (
"github.com/osbuild/osbuild-composer/internal/distro" "github.com/osbuild/osbuild-composer/internal/distro"
"github.com/osbuild/osbuild-composer/internal/distro/fedora" "github.com/osbuild/osbuild-composer/internal/distro/fedora"
"github.com/osbuild/osbuild-composer/internal/distro/rhel7" "github.com/osbuild/osbuild-composer/internal/distro/rhel7"
"github.com/osbuild/osbuild-composer/internal/distro/rhel8"
"github.com/osbuild/osbuild-composer/internal/distro/rhel84" "github.com/osbuild/osbuild-composer/internal/distro/rhel84"
"github.com/osbuild/osbuild-composer/internal/distro/rhel86"
"github.com/osbuild/osbuild-composer/internal/distro/rhel90" "github.com/osbuild/osbuild-composer/internal/distro/rhel90"
) )
@ -22,10 +22,10 @@ var supportedDistros = []supportedDistro{
{fedora.NewF36, fedora.NewHostDistro}, {fedora.NewF36, fedora.NewHostDistro},
{rhel7.New, rhel7.NewHostDistro}, {rhel7.New, rhel7.NewHostDistro},
{rhel84.New, rhel84.NewHostDistro}, {rhel84.New, rhel84.NewHostDistro},
{rhel86.New, rhel86.NewHostDistro}, {rhel8.New, rhel8.NewHostDistro},
{rhel86.NewRHEL85, rhel86.NewRHEL85HostDistro}, {rhel8.NewRHEL85, rhel8.NewRHEL85HostDistro},
{rhel86.NewRHEL87, rhel86.NewRHEL87HostDistro}, {rhel8.NewRHEL87, rhel8.NewRHEL87HostDistro},
{rhel86.NewCentos, rhel86.NewCentosHostDistro}, {rhel8.NewCentos, rhel8.NewCentosHostDistro},
{rhel90.New, rhel90.NewHostDistro}, {rhel90.New, rhel90.NewHostDistro},
{rhel90.NewRHEL91, rhel90.NewRHEL91HostDistro}, {rhel90.NewRHEL91, rhel90.NewRHEL91HostDistro},
{rhel90.NewCentos, rhel90.NewCentosHostDistro}, {rhel90.NewCentos, rhel90.NewCentosHostDistro},

View file

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/osbuild/osbuild-composer/internal/distro" "github.com/osbuild/osbuild-composer/internal/distro"
rhel8 "github.com/osbuild/osbuild-composer/internal/distro/rhel86" "github.com/osbuild/osbuild-composer/internal/distro/rhel8"
) )
// Test that all distros are registered properly and that Registry.List() works. // Test that all distros are registered properly and that Registry.List() works.