View Issue Details

IDProjectCategoryView StatusLast Update
0000022AlmaLinux-8-OTHERpublic2021-02-22 16:19
Reporteralmalinux4all Assigned Toalukoshko  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
OSAlmaLinux8.3_beta 
Summary0000022: rpm --eval '%{almalinux}' does not return correct version
DescriptionIf you run the following in AlmaLinux, then you get the correct major version

[[email protected] ~]# rpm --eval '%{rhel}'
8

[[email protected] ~]# rpm --eval '%{centos}'
8

However, this does not work if you use alma or almalinux, see below. Maybe it is a different string that I need to use?

[[email protected] ~]# rpm --eval '%{alma}'
%{alma}

[[email protected] ~]# rpm --eval '%{almalinux}'
%{almalinux}

I would expect this to return 8, as in case of rhel and centos strings.

Thanks,
AlmaLinux4All
TagsNo tags attached.
abrt_hash
URL

Activities

alukoshko

2021-02-13 17:29

developer   ~0000023

Thanks for report.
You can find all supported distro macroses in /etc/rpm/macros.dist file.
AlmaLinux uses %{almalinux_ver}.

almalinux4all

2021-02-13 19:01

reporter   ~0000025

Thanks for this

alukoshko

2021-02-13 19:09

developer   ~0000026

%{almalinux} macro will also be added in next AlmaLinux 8.3 Beta/RC release to make things more intuitive.
Thank you for pointing this out.

alukoshko

2021-02-22 16:19

developer   ~0000033

AlmaLinux 8.3 RC was released with this bug fixed
https://almalinux.org/blog/almalinux-8-3-rc-release-notes/

Issue History

Date Modified Username Field Change
2021-02-13 11:07 almalinux4all New Issue
2021-02-13 17:29 alukoshko Note Added: 0000023
2021-02-13 19:01 almalinux4all Note Added: 0000025
2021-02-13 19:09 alukoshko Note Added: 0000026
2021-02-22 16:19 alukoshko Assigned To => alukoshko
2021-02-22 16:19 alukoshko Status new => closed
2021-02-22 16:19 alukoshko Resolution open => fixed
2021-02-22 16:19 alukoshko Note Added: 0000033