Bug 1493204

Summary: RPM generates incorrect metainfo() provides on F27
Product: [Fedora] Fedora Reporter: Mat Booth <mat.booth>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: ffesti, ignatenko, mjw, packaging-team-maint, pmatilai, pmoravco, robatino, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-19 15:14:23 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: 1396704    
Attachments:
Description Flags
Reproducing SRPM none

Description Mat Booth 2017-09-19 14:55:54 UTC
Created attachment 1328009 [details]
Reproducing SRPM

Description of problem:

If a noarch subpackage contains some metainfo/appdata, builds *always* fail on F27, due to rpmdiff errors.


Steps to Reproduce:

1. See attached SRPM that exhibits the problem: test-breakage-1-1.fc28.src.rpm
2. Attempt to build it in a F27 koji scratch build

The build will fail with the following error on F27 only:

removed     PROVIDES metainfo(/builddir/build/BUILDROOT/test-breakage-1-1.fc27.x86_64/usr/share/appdata/eclipse-jdt.metainfo.xml)  
added       PROVIDES metainfo(/builddir/build/BUILDROOT/test-breakage-1-1.fc27.ppc64le/usr/share/appdata/eclipse-jdt.metainfo.xml)  

See this example F27 scratch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=21971097

However the very same SRPM builds successfully on both F26 and F28. See these example F26 and F28 scratch builds:
https://koji.fedoraproject.org/koji/taskinfo?taskID=21971090
https://koji.fedoraproject.org/koji/taskinfo?taskID=21971106

This appears to be because incorrect provides are being generated in the F27 case. Consider the difference in the provides list that RPM generates between F27 and F28:

$ rpm -qp --provides test-breakage-jdt-1-1.fc27.noarch.rpm
metainfo()
metainfo(/builddir/build/BUILDROOT/test-breakage-1-1.fc27.x86_64/usr/share/appdata/eclipse-jdt.metainfo.xml)
test-breakage-jdt = 1-1.fc27

$ rpm -qp --provides test-breakage-jdt-1-1.fc28.noarch.rpm
metainfo()
metainfo(eclipse-jdt.metainfo.xml)
test-breakage-jdt = 1-1.fc28


As you can see, the F27 version has erroneously included the full buildroot path in the metainfo() provide.

This makes it impossible to include appdata in noarch packages built for F27.

Comment 1 Mat Booth 2017-09-19 14:58:03 UTC
I originally reported this to releng here: https://pagure.io/releng/issue/7037

And was advised to file a bug against RPM

Comment 2 Fedora Blocker Bugs Application 2017-09-19 15:02:26 UTC
Proposed as a Blocker for 27-final by Fedora user mbooth using the blocker tracking app because:

 Makes it impossible build some packages with full appstream metainfo, meaning that at GA, some applications will not be discoverable through gnome-software. This will affect (at the very least) users of Eclipse IDE and it's plugins.

Comment 3 Igor Gnatenko 2017-09-19 15:14:23 UTC

*** This bug has been marked as a duplicate of bug 1483644 ***