[CentOS] CentOS/RHEL versioning scheme?

Fri Jun 3 18:06:19 UTC 2005
Johnny Hughes <mailing-lists at hughesjr.com>

On Fri, June 3, 2005 9:49 am, Morten Kjeldgaard said:
> I am a bit puzzled at the versioning scheme of the RedHat clone family.
>
> RedHat seems to use integer 4, Tao and Centos does the same. If you do
>
> rpm -q --qf '%{version}\n' -f /etc/redhat-release
>
> you get '4'.
>
> However, Scientific Linux uses 4.0, and that seems to me to be a more
> logical choise, since presumable there are going to be versions 4.1,
> 4.2, etc.
>
> Is there any good reason for the version of package centos-release NOT
> to be 4.0? It has a significance in automated scripts trying to work out
> which distribution and version you are running, and it seems silly to
> treat the different RHEL4 clones differently.
>
> It would make sense for CentOS to coordinate/agree_upon a common scheme
> among the different distributions.
>
> Cheers,
> Morten
>
> PS: Perhaps someone can provide info about other RHEL clone distros!
>

We (CentOS) chose to use 4 to be compatable with the dag repo ... and
other 3rd party software.  Tao Linux and WhiteBox Linux do the same.

4 (or 3 for CentOS-3.x) will always be the version ... and:

http://mirror.centos.org/centos/4/

Will always point to the latest version of the distro.  /4/ will always be
a symlink to the latest version (4.1, 4.2, 4.3, etc.).

If you look at the redhat-release file, you can cat it and get the real
release as well.  So, you can use this in a script to get the number you
are looking for:

cat /etc/redhat-release | awk {'print $3'}

and you can use:

rpm -q --qf '%{version}\n' -f /etc/redhat-release

to get a number that is compatable to RHEL's numbering scheme.

-- 
Johnny Hughes
<http://www.HughesJR.com/>