Bug with installer script - adoptium repo

Note - If you do not fill in every section below, your post won’t be answered - you must provide the steps you have followed so far and the actions you’ve already taken. Make sure to remove this notice from your post too.

OS Name/Version: RHEL 9.0

Product Name/Version: AMP One-line installer.

Problem Description:
There’s a bug with the installer and the creation of the adoptium repo for yum. It’s adding a 9.0 to the repo URL when the actual URl contains just a 9 for the RHEL repo.

Updating Subscription Management repositories.
Adoptium                                         35  B/s |  80  B     00:02    
Errors during downloading metadata for repository 'Adoptium':
  - Status code: 404 for https://packages.adoptium.net/artifactory/rpm/rhel/9.0/x86_64/repodata/repomd.xml (IP: 54.148.95.12)
Error: Failed to download metadata for repo 'Adoptium': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Bad adoptium repo config.

[Adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/9.0/x86_64
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public

Good adoptium repo config.

name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/9/x86_64
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public

Steps to reproduce:

  • Step 1 Create virtual machine using rhel-baseos-9.0-x86_64-boot.iso.
  • Step 2 Logon and run one-liner script.

Actions taken to resolve so far:
If I modify the /etc/os-release/ file and remove all the .0’s from it, it creates the repo with the correct url and installs fine.

What’s the contents of your /etc/os-release file?

Also you might be the first person to use actual RHEL to run AMP instead of one of its relatives.

This is still a problem with RHEL 9.1. Easy enough to bypass locally by hard-coding the correct version into the install script, but would be nice to get this fixed for future installs.

Here are the contents of /etc/os-release

NAME="Red Hat Enterprise Linux"
VERSION="9.1 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.1"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.1 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.1
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.1"