[CentOS] os-release file doesn't match upstream?

Thu Apr 2 09:21:03 UTC 2015
Alain Péan <alain.pean at lpn.cnrs.fr>

Le 01/04/2015 20:23, Stephen Harris a écrit :
> On a fully patched C7 machine...
>
>    % cat /etc/redhat-release
>    CentOS Linux release 7.1.1503 (Core)
>
>    % cat /etc/os-release
>    NAME="CentOS Linux"
>    VERSION="7 (Core)"
>    ID="centos"
>    ID_LIKE="rhel fedora"
>    VERSION_ID="7"
>    PRETTY_NAME="CentOS Linux 7 (Core)"
>    ANSI_COLOR="0;31"
>    CPE_NAME="cpe:/o:centos:centos:7"
>    HOME_URL="https://www.centos.org/"
>    BUG_REPORT_URL="https://bugs.centos.org/"
>
>    CENTOS_MANTISBT_PROJECT="CentOS-7"
>    CENTOS_MANTISBT_PROJECT_VERSION="7"
>    REDHAT_SUPPORT_PRODUCT="centos"
>    REDHAT_SUPPORT_PRODUCT_VERSION="7"
>    
> In particular note the version ID is 7
>
> On a RedHat machine:
>    % cat /etc/redhat-release
>    Red Hat Enterprise Linux Server release 7.1 (Maipo)
>
>    % cat /etc/os-release
>    NAME="Red Hat Enterprise Linux Server"
>    VERSION="7.1 (Maipo)"
>    ID="rhel"
>    ID_LIKE="fedora"
>    VERSION_ID="7.1"
>    PRETTY_NAME="Red Hat Enterprise Linux Server 7.1 (Maipo)"
>    ANSI_COLOR="0;31"
>    CPE_NAME="cpe:/o:redhat:enterprise_linux:7.1:GA:server"
>    HOME_URL="https://www.redhat.com/"
>    BUG_REPORT_URL="https://bugzilla.redhat.com/"
>
>    REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
>    REDHAT_BUGZILLA_PRODUCT_VERSION=7.1
>    REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
>    REDHAT_SUPPORT_PRODUCT_VERSION="7.1"
>
> Here the version ID is 7.1; different to CentOS.
>
> Is this a bug or is it deliberate?

Just when CentOS "7.1" was released, the content of redhat-release file 
was :
[root at centos-test ~]# cat /etc/redhat-release
Derived from Red Hat Enterprise Linux 7.1 (Source)

Then Karanbir corrected that, as it was not coherent with previous 
content, and broke some tools and scripts :
[root at centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

It is now :
[root at centos-test ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

I think the content of the os-release file has not been corrected 
accordingly, and is not coherent with RHEL. But if you read the 
announces mailing list, it seems indeed deliberate, as already said...

Alain

-- 
Administrateur Système/Réseau
Laboratoire de Photonique et Nanostructures (LPN/CNRS - UPR20)
Centre de Recherche Alcatel Data IV - Marcoussis
route de Nozay - 91460 Marcoussis
Tel : 01-69-63-61-34