diff --git a/diskimage_builder/elements/rhel-common/README.rst b/diskimage_builder/elements/rhel-common/README.rst index c7674f82..908acbcf 100644 --- a/diskimage_builder/elements/rhel-common/README.rst +++ b/diskimage_builder/elements/rhel-common/README.rst @@ -122,6 +122,19 @@ is applicable to both physical systems and virtual guests. Other types include hypervisor for virtual hosts, person, domain, rhui, and candlepin for some subscription management applications. +#### REG\_SAT\_REPO +Sets the repository label for Satellite client tools. The defaults are: + ++------------+--------------------------------------------+ +| Release | Repository label | ++============+============================================+ +| RHEL 7 | rhel-7-server-satellite-client-6-rpms | ++------------+--------------------------------------------+ +| RHEL 8 | satellite-client-6-for-rhel-8-${arch}-rpms | ++------------+--------------------------------------------+ +| RHEL 9 | satellite-client-6-for-rhel-9-${arch}-rpms | ++------------+--------------------------------------------+ + Image Build Registration Examples ------------------------------------ To register with Satellite 6, a common example would be to set the following diff --git a/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration b/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration index f1671ef9..ed6f8fea 100755 --- a/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration +++ b/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration @@ -15,17 +15,17 @@ base_repos= if [ "${DIB_RELEASE:-7}" == "7" ]; then base_repos="rhel-7-server-rpms" - satellite_repo="rhel-7-server-rh-common-rpms" + satellite_repo="${REG_SAT_REPO:-"rhel-7-server-satellite-client-6-rpms"}" elif [ "${DIB_RELEASE}" == "8" ]; then if [ -n "${REG_RELEASE:-}" ]; then base_repos="rhel-8-for-${arch}-appstream-eus-rpms rhel-8-for-${arch}-baseos-eus-rpms" else base_repos="rhel-8-for-${arch}-appstream-rpms rhel-8-for-${arch}-baseos-rpms" fi - satellite_repo="satellite-tools-6.5-for-rhel-8-${arch}-rpms" + satellite_repo="${REG_SAT_REPO:-"satellite-client-6-for-rhel-8-${arch}-rpms"}" elif [ "${DIB_RELEASE}" == "9" ]; then base_repos="rhel-9-for-${arch}-appstream-rpms rhel-9-for-${arch}-baseos-rpms" - satellite_repo="rhel-9-for-${arch}-highavailability-rpms" + satellite_repo="${REG_SAT_REPO:-"satellite-client-6-for-rhel-9-${arch}-rpms"}" fi REG_SAT_CERT=${REG_SAT_CERT:-"katello-ca-consumer-latest.noarch.rpm"} diff --git a/releasenotes/notes/bug-2013451-0874e20db0231c56.yaml b/releasenotes/notes/bug-2013451-0874e20db0231c56.yaml new file mode 100644 index 00000000..f5c09293 --- /dev/null +++ b/releasenotes/notes/bug-2013451-0874e20db0231c56.yaml @@ -0,0 +1,16 @@ +--- +features: + - | + Added environment variable ``REG_SAT_REPO`` to the ``rhel-common`` + element. Sets the repository label for Satellite client tools. +fixes: + - | + The ``Satellite Client`` reposotories replaces the ``Satellite Tools`` + repository since Satellite 6.11. The default repo labels in the + ``rhel-common`` element has been updated to reflect this change. + See `Red Hat Satellite 6.11 Release Notes `_. + + To enable users that need to use the legacy ``Satellite Tools`` + repository, the ``REG_SAT_REPO`` environment variable has been added to + enable manual override of the Satellite repository. +