Bug 1596192

Summary: Impossible to define the DISTTAG tag using the %{disttag} macro
Product: [Fedora] Fedora Reporter: Petr Šabata <psabata>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 28CC: igor.raits, mjw, packaging-team-maint, pmatilai, pmoravco, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1596193 (view as bug list) Environment:
Last Closed: 2018-08-09 06:28:19 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: 1596193    

Description Petr Šabata 2018-06-28 12:07:50 UTC
Description of problem:
It is currently impossible to define the DISTTAG tag using the %{disttag} macro.  We would like to utilize this tag to store module build information, in addition to DISTRIBUTION.

Version-Release number of selected component (if applicable):
rpm-4.14.1-9.fc28.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Define %disttag in your ~/.rpmmacros
2. Build an RPM
3. Check for its presence with rpm -q --qf '%{disttag}\n'

Actual results:
DISTTAG is not defined.

Expected results:
DISTTAG is defined.

Additional info:
This is supposedly going into 4.14.2 but, if possible, we would like to have this sooner as it's blocking MBS changes.

Comment 1 Panu Matilainen 2018-06-29 13:23:50 UTC
This should be fixed in rawhide now (rpm >= 4.14.2-rc1)

Comment 2 Petr Šabata 2018-07-13 09:33:19 UTC
FWIW, confirmed.

Comment 3 Petr Šabata 2018-07-31 17:51:46 UTC
Re-opening because I've just noticed that it still doesn't work for SRPMs.
%distribution does, for example.  Binary RPMs are fine.

Comment 4 Panu Matilainen 2018-08-01 07:55:27 UTC
Right, it's indeed not among the tags that are copied to src.rpm. Fixed upstream now:
https://github.com/rpm-software-management/rpm/commit/9296916dddc922b0459929681452c657df4fe69e

Comment 5 Panu Matilainen 2018-08-09 06:28:19 UTC
Copying to src.rpm added in rpm >= 4.14.2-rc2 now in rawhide so closing again.