Bug 1438780

Summary: rpm -E '%{?dist}' returns .el7_3 instead of .el7
Product: Red Hat Enterprise Linux 7 Reporter: Nadav Goldin <ngoldin>
Component: redhat-rpm-configAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: ffesti, gshinar, jblazek, lkocman, lmiksik, sbonazzo, vmukhame
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-25 10:12:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1465896, 1466368    

Description Nadav Goldin 2017-04-04 12:08:04 UTC
Description of problem:
Running RHEL 7.3, the rpm macro '%{?dist}' returns '.el7_3' instead of '.el7', this breaks distro detection and as far as I understand is not according to the Fedora packaging guideline - https://fedoraproject.org/wiki/Packaging:DistTag.


Any ideas? Anything I'm missing here? 


Version-Release number of selected component (if applicable):
redhat-rpm-config-9.1.0-72.el7.noarch
redhat-release-server-7.3-7.el7_3.1.x86_64

How reproducible:
always


Steps to Reproduce:
1.[root@cinteg33 ~]# rpm -E '%{?dist}'
.el7_3


Actual results:
.el7_3


Expected results:
.el7

Additional info:

NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.3 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
Red Hat Enterprise Linux Server release 7.3 (Maipo)
Red Hat Enterprise Linux Server release 7.3 (Maipo)
cpe:/o:redhat:enterprise_linux:7.3:ga:server

Comment 2 Nadav Goldin 2017-04-04 12:10:09 UTC
Note that running the 'dist.sh' script directly works:
[root@cinteg33 ~]# /usr/lib/rpm/redhat/dist.sh
.el7

Comment 3 Nadav Goldin 2017-04-04 12:40:58 UTC
I should say that it does not happen on el7.3 machines(CSB for instance is ok). This specific is:
Linux cinteg33 3.10.0-514.10.2.el7.bz1420450.x86_64 #1 SMP Thu Mar 30 08:28:00 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Comment 4 Nadav Goldin 2017-04-25 11:28:21 UTC
ping.
any news on this?

Comment 5 Karel Srot 2017-07-03 14:24:20 UTC
(In reply to Nadav Goldin from comment #3)
> I should say that it does not happen on el7.3 machines(CSB for instance is
> ok). This specific is:
> Linux cinteg33 3.10.0-514.10.2.el7.bz1420450.x86_64 #1 SMP Thu Mar 30
> 08:28:00 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

This is due to 
  redhat-release-server-7.3-7.el7_3.1.x86_64
being present.

Comment 6 Florian Festi 2017-07-15 07:49:47 UTC
Still need to figure out whether to fix this here or in redhat-release-server

Comment 9 Lubos Kocman 2017-09-25 09:56:27 UTC
Hello folks

getting el7_3 is totally expected in EUS/AUS. Although a package with such dist-tag gets released rarely (usually with retirement notice). Otherwise all the eus/aus/z-stream/els customers usually have redhat-release released on GA day.

We're not going to change this as it's expected feature which also affects all the z-stream/eus/aus builds by providing distinguishable dist-tag.

I believe that /etc/os-release would be much wiser. It even states "Red Hat Enterprise Linux".

Lubos

Comment 10 Karel Srot 2017-09-25 10:12:40 UTC
Thank you Lubos.

Based on the feedback above I am Closing this bug as NOTABUG as the reported behaviour is intentional.