Bug 873847

Summary: Warning: Recognition of file ... for filename with spaces.
Product: [Fedora] Fedora Reporter: Alec Leamas <leamas.alec>
Component: redhat-rpm-configAssignee: Panu Matilainen <pmatilai>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 17CC: a.badger, cweyl, ffesti, jnovy, jonathan, jzeleny, manuel.wolfshant, packaging-team, pknirsch, pmatilai, tmz, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-08 05:17:39 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 Alec Leamas 2012-11-06 19:52:16 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Run rpmlint on a package with filenames containing spaces e. g.,
https://dl.dropbox.com/u/17870887/spotify-client-0.8.4.103.g9cb177b.260-1.fc17.src.rpm

2. Watch warnings like these:
warning: Recognition of file "/home/leamas/rpmbuild/BUILDROOT/spotify-client-0.8.4.103.g9cb177b.260-1.fc17.i386/usr/share/spotify/theme/default/Now" failed: mode 000000 cannot open `/home/leamas/rpmbuild/BUILDROOT/spotify-client-0.8.4.103.g9cb177b.260-1.fc17.i386/usr/share/spotify/theme/default/Now' (No such file or directory

These warnings apply for the path 
"/usr/share/spotify/theme/default/Now Playing/share.png"


Actual results: Warnings, rpmlint cant handle files.

Expected results: No warnings, rpmlint handles paths with spaces without problems.

Comment 1 Alec Leamas 2012-11-06 19:58:17 UTC
Oops... wrong component.  This happens when invoking rpmbuild, in package rpm-build which  is not in list. Trying rpmrebuild.

Comment 2 Anderson Silva 2012-11-06 22:45:35 UTC
not rpmrebuild... still the wrong component.

Comment 3 Alec Leamas 2012-11-06 23:30:14 UTC
(In reply to comment #2)
> not rpmrebuild... still the wrong component.

OTOH, Tom Callaway moved it to rpm in between (thanks!).

Might add that the problem seems related to filtering. The warnings occurred when I added the %filter code, without this it was fine. Running on F17, rpm-build-4.9.1.3-8

Comment 4 Panu Matilainen 2012-11-07 07:36:13 UTC
It's indeed an issue with the Fedora-specific filtering macros from redhat-rpm-config, easily avoided by using the built-in filtering (see http://rpm.org/wiki/PackagerDocs/DependencyGenerator)

The problem is here:

%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \

When there are spaces in ${FILE}, it get passed as multiple separate arguments to rpmdeps which obviously wont work, and just adding the apparently missing quotes doesn't help either. I guess there's some extra shell magic needed, or alternatively this would work:

%global __deploop() while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -%{1}; done | /bin/sort -u \

CC'ing Chris Weyl who introduced these macros and switching component to redhat-rpm-config.

Comment 5 Alec Leamas 2012-11-07 09:34:40 UTC
Hm... just about two months ago I used the proper %__requires_exclude macros. Forgetting fast, it seems. But I guess this will happen at least others again and again until someone finds the time to update the fedora packaging guidelines.

Anyway, thanks for pointing out the correct macros. The bug is obviously still there, but not a problem for me.

Comment 6 Panu Matilainen 2012-11-08 05:17:39 UTC

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