Bug 1632741

Summary: rpm --eval "%dist" doesn't work within RHV-H 4.2
Product: Red Hat Enterprise Virtualization Manager Reporter: Dusan Fodor <dfodor>
Component: redhat-release-virtualization-hostAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: cshao <cshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.7CC: cshao, dfediuck, huzhao, lsurette, mtessun, pstehlik, qiyuan, rdlugyhe, sbonazzo, srevivo, weiwang, yaniwang, ycui, yturgema
Target Milestone: ovirt-4.3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: redhat-release-virtualization-host-4.3-0.0.el7 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-08 12:32:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1633069, 1653669    
Attachments:
Description Flags
Bump release to 4.3.0 and ship the missing macro file none

Description Dusan Fodor 2018-09-25 12:20:09 UTC
It's probably caused by /etc/rpm/macros.dist file missing


Steps to Reproduce:
1. rpm --eval "%dist"

Actual results:
%dist

Expected results:
.el7

Comment 1 Dusan Fodor 2018-09-25 12:23:17 UTC
Workaround is to create the file as following:

echo "    
%rhel 7
%dist .el7
%el7 1" > /etc/rpm/macros.dist

Comment 2 cshao 2018-09-26 02:51:41 UTC
Test version:
rhvh-4.2.7.0-0.20180918.0+1

Test step:
rpm --eval "%dist"

Test result:
%dist

QE can reproduce this issue.

Comment 3 Sandro Bonazzola 2018-09-26 06:34:13 UTC
Created attachment 1487022 [details]
Bump release to 4.3.0 and ship the missing macro file

Comment 4 Dusan Fodor 2018-10-03 12:57:47 UTC
Should this targeted for 4.2 as well?

Comment 5 Sandro Bonazzola 2018-10-03 13:30:50 UTC
(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.

Comment 7 cshao 2018-11-26 07:41:33 UTC
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.

Comment 11 errata-xmlrpc 2019-05-08 12:32:16 UTC
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