From a2c46bdf3aa547a83f30e2b69b2e943234598c71 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Tue, 16 Aug 2022 11:54:26 +0200 Subject: [PATCH] distro: rename `rhel90` -> `rhel9` Make the package and directory naming consistent with RHEL-7 and RHEL-8. --- internal/distro/{rhel90 => rhel9}/distro.go | 2 +- .../distro/{rhel90 => rhel9}/distro_test.go | 40 +++++++++---------- .../distro/{rhel90 => rhel9}/package_sets.go | 2 +- .../{rhel90 => rhel9}/partition_tables.go | 2 +- .../distro/{rhel90 => rhel9}/pipelines.go | 2 +- .../distro/{rhel90 => rhel9}/stage_options.go | 2 +- internal/distroregistry/distroregistry.go | 8 ++-- 7 files changed, 29 insertions(+), 29 deletions(-) rename internal/distro/{rhel90 => rhel9}/distro.go (99%) rename internal/distro/{rhel90 => rhel9}/distro_test.go (96%) rename internal/distro/{rhel90 => rhel9}/package_sets.go (99%) rename internal/distro/{rhel90 => rhel9}/partition_tables.go (99%) rename internal/distro/{rhel90 => rhel9}/pipelines.go (99%) rename internal/distro/{rhel90 => rhel9}/stage_options.go (99%) diff --git a/internal/distro/rhel90/distro.go b/internal/distro/rhel9/distro.go similarity index 99% rename from internal/distro/rhel90/distro.go rename to internal/distro/rhel9/distro.go index 0dd49ab7f..536f16423 100644 --- a/internal/distro/rhel90/distro.go +++ b/internal/distro/rhel9/distro.go @@ -1,4 +1,4 @@ -package rhel90 +package rhel9 import ( "encoding/json" diff --git a/internal/distro/rhel90/distro_test.go b/internal/distro/rhel9/distro_test.go similarity index 96% rename from internal/distro/rhel90/distro_test.go rename to internal/distro/rhel9/distro_test.go index 56f3aea97..506c4113e 100644 --- a/internal/distro/rhel90/distro_test.go +++ b/internal/distro/rhel9/distro_test.go @@ -1,4 +1,4 @@ -package rhel90_test +package rhel9_test import ( "fmt" @@ -11,7 +11,7 @@ import ( "github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/distro" "github.com/osbuild/osbuild-composer/internal/distro/distro_test_common" - "github.com/osbuild/osbuild-composer/internal/distro/rhel90" + "github.com/osbuild/osbuild-composer/internal/distro/rhel9" ) type rhelFamilyDistro struct { @@ -22,7 +22,7 @@ type rhelFamilyDistro struct { var rhelFamilyDistros = []rhelFamilyDistro{ { name: "rhel", - distro: rhel90.New(), + distro: rhel9.New(), }, } @@ -428,7 +428,7 @@ func TestImageTypeAliases(t *testing.T) { func TestDistro_ManifestError(t *testing.T) { // Currently, the only unsupported configuration is OSTree commit types // with Kernel boot options - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Kernel: &blueprint.KernelCustomization{ @@ -540,12 +540,12 @@ func TestArchitecture_ListImageTypes(t *testing.T) { } } -func TestRhel90_ListArches(t *testing.T) { - arches := rhel90.New().ListArches() +func TestRhel9_ListArches(t *testing.T) { + arches := rhel9.New().ListArches() assert.Equal(t, []string{"aarch64", "ppc64le", "s390x", "x86_64"}, arches) } -func TestRhel90_GetArch(t *testing.T) { +func TestRhel9_GetArch(t *testing.T) { arches := []struct { name string errorExpected bool @@ -585,22 +585,22 @@ func TestRhel90_GetArch(t *testing.T) { } } -func TestRhel90_Name(t *testing.T) { - distro := rhel90.New() +func TestRhel9_Name(t *testing.T) { + distro := rhel9.New() assert.Equal(t, "rhel-90", distro.Name()) } -func TestRhel90_ModulePlatformID(t *testing.T) { - distro := rhel90.New() +func TestRhel9_ModulePlatformID(t *testing.T) { + distro := rhel9.New() assert.Equal(t, "platform:el9", distro.ModulePlatformID()) } -func TestRhel90_KernelOption(t *testing.T) { - distro_test_common.TestDistro_KernelOption(t, rhel90.New()) +func TestRhel9_KernelOption(t *testing.T) { + distro_test_common.TestDistro_KernelOption(t, rhel9.New()) } func TestDistro_CustomFileSystemManifestError(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -628,7 +628,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) { } func TestDistro_TestRootMountPoint(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -657,7 +657,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) { } func TestDistro_CustomFileSystemSubDirectories(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -688,7 +688,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) { } func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -727,7 +727,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) { } func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -761,7 +761,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) { } func TestDistro_CustomFileSystemPatternMatching(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ @@ -793,7 +793,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) { } func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) { - r9distro := rhel90.New() + r9distro := rhel9.New() bp := blueprint.Blueprint{ Customizations: &blueprint.Customizations{ Filesystem: []blueprint.FilesystemCustomization{ diff --git a/internal/distro/rhel90/package_sets.go b/internal/distro/rhel9/package_sets.go similarity index 99% rename from internal/distro/rhel90/package_sets.go rename to internal/distro/rhel9/package_sets.go index 9a00b63da..5af007697 100644 --- a/internal/distro/rhel90/package_sets.go +++ b/internal/distro/rhel9/package_sets.go @@ -1,4 +1,4 @@ -package rhel90 +package rhel9 // This file defines package sets that are used by more than one image type. diff --git a/internal/distro/rhel90/partition_tables.go b/internal/distro/rhel9/partition_tables.go similarity index 99% rename from internal/distro/rhel90/partition_tables.go rename to internal/distro/rhel9/partition_tables.go index 6099de348..14a826272 100644 --- a/internal/distro/rhel90/partition_tables.go +++ b/internal/distro/rhel9/partition_tables.go @@ -1,4 +1,4 @@ -package rhel90 +package rhel9 import ( "github.com/osbuild/osbuild-composer/internal/disk" diff --git a/internal/distro/rhel90/pipelines.go b/internal/distro/rhel9/pipelines.go similarity index 99% rename from internal/distro/rhel90/pipelines.go rename to internal/distro/rhel9/pipelines.go index f0a910806..11cf71ae0 100644 --- a/internal/distro/rhel90/pipelines.go +++ b/internal/distro/rhel9/pipelines.go @@ -1,4 +1,4 @@ -package rhel90 +package rhel9 import ( "fmt" diff --git a/internal/distro/rhel90/stage_options.go b/internal/distro/rhel9/stage_options.go similarity index 99% rename from internal/distro/rhel90/stage_options.go rename to internal/distro/rhel9/stage_options.go index a964c7d9c..7b0a932b0 100644 --- a/internal/distro/rhel90/stage_options.go +++ b/internal/distro/rhel9/stage_options.go @@ -1,4 +1,4 @@ -package rhel90 +package rhel9 import ( "fmt" diff --git a/internal/distroregistry/distroregistry.go b/internal/distroregistry/distroregistry.go index 04d894034..586d78a93 100644 --- a/internal/distroregistry/distroregistry.go +++ b/internal/distroregistry/distroregistry.go @@ -10,7 +10,7 @@ import ( "github.com/osbuild/osbuild-composer/internal/distro/fedora" "github.com/osbuild/osbuild-composer/internal/distro/rhel7" "github.com/osbuild/osbuild-composer/internal/distro/rhel8" - "github.com/osbuild/osbuild-composer/internal/distro/rhel90" + "github.com/osbuild/osbuild-composer/internal/distro/rhel9" ) // When adding support for a new distribution, add it here. @@ -25,9 +25,9 @@ var supportedDistros = []supportedDistro{ {rhel8.NewRHEL86, rhel8.NewRHEL86HostDistro}, {rhel8.NewRHEL87, rhel8.NewRHEL87HostDistro}, {rhel8.NewCentos, rhel8.NewCentosHostDistro}, - {rhel90.New, rhel90.NewHostDistro}, - {rhel90.NewRHEL91, rhel90.NewRHEL91HostDistro}, - {rhel90.NewCentos, rhel90.NewCentosHostDistro}, + {rhel9.New, rhel9.NewHostDistro}, + {rhel9.NewRHEL91, rhel9.NewRHEL91HostDistro}, + {rhel9.NewCentos, rhel9.NewCentosHostDistro}, } type supportedDistro struct {