RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1438780 - rpm -E '%{?dist}' returns .el7_3 instead of .el7
Summary: rpm -E '%{?dist}' returns .el7_3 instead of .el7
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: redhat-rpm-config
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1465896 1466368
TreeView+ depends on / blocked
 
Reported: 2017-04-04 12:08 UTC by Nadav Goldin
Modified: 2017-09-27 08:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-25 10:12:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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