Bug 873847 - Warning: Recognition of file ... for filename with spaces.
Summary: Warning: Recognition of file ... for filename with spaces.
Keywords:
Status: CLOSED DUPLICATE of bug 783932
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-06 19:52 UTC by Alec Leamas
Modified: 2012-11-08 05:17 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-08 05:17:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.