It's probably caused by /etc/rpm/macros.dist file missing Steps to Reproduce: 1. rpm --eval "%dist" Actual results: %dist Expected results: .el7
Workaround is to create the file as following: echo " %rhel 7 %dist .el7 %el7 1" > /etc/rpm/macros.dist
Test version: rhvh-4.2.7.0-0.20180918.0+1 Test step: rpm --eval "%dist" Test result: %dist QE can reproduce this issue.
Created attachment 1487022 [details] Bump release to 4.3.0 and ship the missing macro file
Should this targeted for 4.2 as well?
(In reply to Dusan Fodor from comment #4) > Should this targeted for 4.2 as well? Not considered critical so didn't backport to 4.2. I can backport for 4.2.8 if workaround in comment #1 is not enough for 4.2.
Test version: redhat-virtualization-host-4.3-20181122.0.el7_6 imgbased-1.1.1-0.1.el7ev.noarch redhat-release-virtualization-host-4.3-0.0.el7.x86_64 # rpm --eval "%dist" .el7 # ll /etc/rpm/macros.dist -rw-r--r--. 1 root root 42 Sep 26 02:49 /etc/rpm/macros.dist Test result: rpm --eval "%dist" work well on RHV-H 4.3. So the bug is fixed, change bug status to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1053