I have several versions of Oracle Linux, but distro doesn't recognize all of them correctly.
Oracle Linux 5.11
host-ci087 (Oracle 5.11) ➜ ~ python -c "import distro; print distro.linux_distribution()"
(u'EnterpriseEnterpriseServer', u'5.11', u'Carthage')
host-ci087 (Oracle 5.11) ➜ ~ lsb_release -a
LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.11 (Carthage)
Release: 5.11
Codename: Carthage
I guess we should fix NORMALIZED_LSB_ID by adding 'enterpriseenterpriseserver': 'oracle'.
I think it has always been EnterpriseEnterpriseServer and not EnterpriseEnterprise like we already have in NORMALIZED_LSB_ID, but I don't have older versions to test against.
Oracle Linux 6.1
host-ci089 (Oracle 6.1) ➜ ~ python -c "import distro; print distro.linux_distribution()"
(u'Red Hat Enterprise Linux Server', u'6.1', u'Santiago')
host-ci089 (Oracle 6.1) ➜ ~ lsb_release -a
command not found: lsb_release
host-ci089 (Oracle 6.1) ➜ ~ cat /etc/oracle-release
Oracle Linux Server release 6.1
lsb_release is gone and /etc/os-release isn't there either but we should be able to identify that this is Oracle by reading /etc/oracle-release. The problem is that the files /etc/centos-release and /etc/redhat-release are there as well, and take precedence when sorted.
host-ci089 (Oracle 6.1) ➜ ~ cat /etc/centos-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)
host-ci089 (Oracle 6.1) ➜ ~ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)
Oracle Linux 6.10 and 7.x
These versions work fine by reading /etc/os-release. One remark though: the comment on NORMALIZED_OS_ID says ol means Oracle Enterprise Linux, but this old name was dropped since Oracle Linux 5 (including) so the versions that have /etc/os-release and the ol ID are already called by the new name, "Oracle Linux", and are not "Oracle Enterprise Linux".
I have several versions of Oracle Linux, but
distrodoesn't recognize all of them correctly.Oracle Linux 5.11
I guess we should fix
NORMALIZED_LSB_IDby adding'enterpriseenterpriseserver': 'oracle'.I think it has always been
EnterpriseEnterpriseServerand notEnterpriseEnterpriselike we already have inNORMALIZED_LSB_ID, but I don't have older versions to test against.Oracle Linux 6.1
lsb_releaseis gone and/etc/os-releaseisn't there either but we should be able to identify that this is Oracle by reading/etc/oracle-release. The problem is that the files/etc/centos-releaseand/etc/redhat-releaseare there as well, and take precedence when sorted.Oracle Linux 6.10 and 7.x
These versions work fine by reading
/etc/os-release. One remark though: the comment onNORMALIZED_OS_IDsaysolmeansOracle Enterprise Linux, but this old name was dropped since Oracle Linux 5 (including) so the versions that have/etc/os-releaseand theolID are already called by the new name, "Oracle Linux", and are not "Oracle Enterprise Linux".