Bug 1632741 - rpm --eval "%dist" doesn't work within RHV-H 4.2
Summary: rpm --eval "%dist" doesn't work within RHV-H 4.2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: redhat-release-virtualization-host
Version: 4.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.3.0
: ---
Assignee: Sandro Bonazzola
QA Contact: cshao
URL:
Whiteboard:
Depends On:
Blocks: 1633069 1653669
TreeView+ depends on / blocked
 
Reported: 2018-09-25 12:20 UTC by Dusan Fodor
Modified: 2019-05-08 12:32 UTC (History)
14 users (show)

Fixed In Version: redhat-release-virtualization-host-4.3-0.0.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-08 12:32:16 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Bump release to 4.3.0 and ship the missing macro file (2.12 KB, patch)
2018-09-26 06:34 UTC, Sandro Bonazzola
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1053 0 None None None 2019-05-08 12:32:47 UTC

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


Note You need to log in before you can comment on or make changes to this bug.