Bug 1532930

Summary: cannot rpmbuild kig from source rpm
Product: [Fedora] Fedora Reporter: Maurizio Paolini <paolini>
Component: kf5Assignee: Rex Dieter <rdieter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: jgrulich, jreznik, me, rdieter, than
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: 2018-01-10 18:27:26 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:

Description Maurizio Paolini 2018-01-10 02:18:31 UTC
Description of problem: rpmbuild -ba SPECS/kig.spec produces
    File not found: /home/paolini/rpmbuild/BUILDROOT/kig-17.08.1-1.fc27.i386/usr/share/appdata/org.kde.kig.appdata.xml


Version-Release number of selected component (if applicable):
kig-17.08.1-1.fc27.src.rpm

How reproducible:
by downloading kig-17.08.1-1.fc27.src.rpm, installing it and making rpms from it


Steps to Reproduce:
1. get kig-17.08.1-1.fc27.src.rpm
2. rpm -i kig-17.08.1-1.fc27.src.rpm
3. cd ~/rpmbuild
4. rpmbuild -ba SPECS/kig.spec

Actual results:
RPM build errors:
    Macro expanded in comment on line 106: %{name}.knsrc

    Macro expanded in comment on line 112: %{name}*

    Macro expanded in comment on line 113: %{name}.notifyrc

    Macro expanded in comment on line 116: %{name}*

    File not found: /home/paolini/rpmbuild/BUILDROOT/kig-17.08.1-1.fc27.i386/usr/share/appdata/org.kde.kig.appdata.xml

and no rpm produced


Additional info:

It seems that the kig.spec file should now contain:
appstream-util validate-relax --nonet %{buildroot}%{_kf5_datadir}/metainfo/org.kde.%{name}.appdata.xml ||:

instead of 
appstream-util validate-relax --nonet %{buildroot}%{_kf5_datadir}/appdata/org.kde.%{name}.appdata.xml ||:

in the %check section

and similarly in the %files section

Comment 1 Rex Dieter 2018-01-10 18:11:35 UTC
Sorry, that's a bug in kf5-rpm-macros, the definition of %_kf5_metainfodir for < f28 should be
%{_kf5_datadir}/appdata

to match expectations here.

The intention was to switch to using
%{_kf5_datadir}/metainfo
only for f28+

Comment 2 Maurizio Paolini 2018-01-10 18:19:10 UTC
This makes sense... I hope it will be quickly fixed in kf5, then.

Comment 3 Rex Dieter 2018-01-10 18:27:26 UTC
Fix will land with kf5-5.42.0 coming soon.