[SOLVED]RPM macros %{?centos_version} and %{rhel_version}

Issues related to applications and software problems
Post Reply
rdeterre
Posts: 6
Joined: 2014/07/15 13:45:44

[SOLVED]RPM macros %{?centos_version} and %{rhel_version}

Post by rdeterre » 2014/10/06 21:09:30

It seems like the RPM spec file macros %{?centos_version} and %{?rhel_version} are not defined in CentOS 7. Is it expected, or am I doing a mistake?

If this is normal, is there a way to discriminate CentOS 7 in a .spec file?

Thanks,

Romain
Last edited by rdeterre on 2014/10/10 16:09:40, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: RPM macros %{?centos_version} and %{rhel_version}

Post by TrevorH » 2014/10/07 09:57:44

I don't see either in el6 or in el7. If you look in /etc/rpm/macros.dist then both have %centos_ver, %centos, %rhel, and %dist defined.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

rdeterre
Posts: 6
Joined: 2014/07/15 13:45:44

Re: RPM macros %{?centos_version} and %{rhel_version}

Post by rdeterre » 2014/10/07 14:08:39

Thank you, it's great to know where those macros are defined.

Romain

Post Reply