Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
distro/rhel8: fix default AMI image RHSM configuration
The change in `common.VersionLessThan()` function revealed a bug in the RHEL-8 AMI default image config, which resulted in RHSM configuration to be present in CentOS Stream images. This caused the image build to fail, since the RHSM configuration didn't exist on the filesystem (sub-man is not installed by default on CS images). Previously, the RHSM configuration was always removed from the image config "by luck", as a result of lexicographical comparison of "8-stream" and "8.7" -> "8-stream.0" > "8.7". This is no longer true and comparison result is "8-stream" < "8.7", which resulted in the RHSM configuration not being removed from CentOS Stream images. Moreover, the code in RHEL-8 distro definition was comparing the `osVersion` to "9.1", which was an obvious bug and copy & paste error from previous refactoring. Fixes: - Ensure that the base EC2 image config does not include any RHSM configuration. - Ensure that the RHSM configuration is added only to RHEL EC2 images older than 8.7. Since that version, the configuration is shipped as an RPM included in the image base package set. - Ensure that the RHSM configuration is always added to RHEL AMI (BYOS) images, since the configuration is not shipped there as an RPM. Signed-off-by: Tomáš Hozza <[email protected]>
- Loading branch information