Hi All,
It looks like update_ood_portal fails to recognize it is running on Oracle Linux 8 and therefor falls back to attempt updating based off SCL install.
I believe this is handled in the following logic in /opt/ood/ood-portal-generator/lib/ood_portal_generator.rb
def scl_apache?
return true if os_release_file.nil?
env = Dotenv.parse(os_release_file)
return false if ("#{env['ID']} #{env['ID_LIKE']}" =~ /rhel/ && env['VERSION_ID'] =~ /^8/)
true
end
For reference, this is the output of /etc/os-release on OEL 8:
NAME="Oracle Linux Server"
VERSION="8.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.3
It looks like it is getting a good match on ... env['VERSION_ID'] =~ /^8/
. It looks like RHEL and CentOS get matches on the "#{env['ID']} #{env['ID_LIKE']}" =~ /rhel/
logic because their output of ID_LIKE is “ID_LIKE=“rhel fedora””.
I seemed to get a successful run when changing return false if ("#{env['ID']} #{env['ID_LIKE']}" =~ /rhel/ && env['VERSION_ID'] =~ /^8/)
to return false if ("#{env['ID']} #{env['ID_LIKE']}" =~ /fedora/ && env['VERSION_ID'] =~ /^8/)
which maps to “fedora” instead of RHEL. This looks like it would work on CentOS as well but have not confirmed with RHEL.
-Morgan