Bug 1130361

Summary: epel-7 root sets ".el7.centos" dist tag
Product: [Fedora] Fedora Reporter: Benjamin Gilbert <bgilbert>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: anoopcs, bgilbert, grantmc, jdisnard, mebrown, msimacek, mstevens, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1176079 (view as bug list) Environment:
Last Closed: 2014-10-20 13:47:33 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: 1176079    

Description Benjamin Gilbert 2014-08-15 03:12:43 UTC
Description of problem:
Building with the epel-7-x86_64 root produces a dist tag of ".el7.centos" instead of ".el7".

Version-Release number of selected component (if applicable):
1.1.41-1.fc20

How reproducible:
Always

Steps to Reproduce:
1. yumdownloader --source pv
2. mock -r epel-7-x86_64 --rebuild pv-1.5.1-1.fc20.src.rpm
3. cd /var/lib/mock/epel-7-x86_64/result/
4. ls pv-1*4.rpm

Actual results:
pv-1.5.1-1.el7.centos.x86_64.rpm

Expected results:
pv-1.5.1-1.el7.x86_64.rpm

Additional info:
This has been reported to CentOS in <http://bugs.centos.org/view.php?id=7416> but they claim the build system should be overriding their dist tag.

Comment 1 Miroslav Suchý 2014-08-15 07:11:15 UTC
Hmm, and why we should override it?

Dist tag is for marking *distribution* version of package. I.e. Fedora in Koji override dist tag. But why we should alter it. It does not have sense to me.

Well it would make sense to me, if we override it to something like ".el7.localbuild". But I guess people would like this even less.

Comment 2 Pavel Raiskup 2014-08-15 07:46:07 UTC
FWIW, I don't like the 'centos' string there also - for me, mock tries to
simulate what is happening in koji including the results.  And for epel-6 (and
oder?) the results contans '.el6' same as in koji.

If looked at such installed package, it seems that it is CentOS origin package
including some CentOS downstream changes.

Comment 3 Benjamin Gilbert 2014-08-16 04:32:29 UTC
- Packages are often intended for all EL-7 variants, not just CentOS, but the dist tag implies that a package is specialized for CentOS in some way.  This affects private/third-party repositories that build their packages using mock.  It seems pointless to force packagers to create a custom root just to fix the dist tag.

- It'd be good to stay consistent with EL-5, EL-6, Fedora, and koji builds for EL-7.

- The fact that epel-7 packages are built with CentOS is really an implementation detail that shouldn't be exposed in the package version.

Comment 4 Miroslav Suchý 2014-08-18 10:48:08 UTC
> - The fact that epel-7 packages are built with CentOS is really an
> implementation detail that shouldn't be exposed in the package version.

This implementation detail, which matter. This is real intention and origin of dist tag. To mark from which distribution it somes. And yes epel-X-<arch> comes from CentOS.

And BTW you can still install packages with .el7.centos dist tag on real RHEL. There is nothing bad on this.

And another BTW - we are working on adding RHSM support to mock, which would allow you to user real RHEL as buildroot. But that is not finished yet.

Comment 5 Benjamin Gilbert 2014-08-18 16:43:44 UTC
According to <http://fedoraproject.org/wiki/Packaging:DistTag#.25.7Bdist.7D_in_the_Release:_field>, the dist tag marks a package as built *for* a particular distribution, not built *on* a particular distribution.  The mechanics of how the package was built are indeed an implementation detail.

epel-5 and epel-6 are also built using CentOS but they don't put it in the dist tag.

Comment 6 Morten Stevens 2014-08-25 14:51:19 UTC
Please check:

http://bugs.centos.org/view.php?id=7416

I would suggest adding this line to the epel-7-x86_64.cfg file:
config_opts['macros']['%dist'] = ".el7"

Comment 7 Miroslav Suchý 2014-10-20 13:47:33 UTC
I can confirm that #6 really works. So if somebody want .el7 you can either:
 * put this line in your config
 * use rhnplugin option in config and build against real RHEL.

But right now epel-7-x86_64 chroot builds against CentOS (and therefore for CentOS).