Bug 220449

Summary: rpmbuild can not handle paths with whitespace
Product: [Fedora] Fedora Reporter: Felix Schwarz <felix.schwarz>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-25 17:09:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Felix Schwarz 2006-12-21 13:06:16 UTC
example command:
> rpmbuild -ba --define '_topdir /home/fs/eg g/build/bdist.linux-x86_64/rpm' --clean
> build/bdist.linux-x86_64/rpm/SPECS/texttemplate.spec

This fails with:
(...)
 > + umask 022
 > + cd /home/fs/eg g/build/bdist.linux-x86_64/rpm/BUILD
 > /var/tmp/rpm-tmp.16608: line 21: cd: /home/fs/eg: No such file or directory

So I tried to quote the path:
> rpmbuild -ba --define '_topdir "/home/fs/eg g/build/bdist.linux-x86_64/rpm"'
> --clean build/bdist.linux-x86_64/rpm/SPECS/texttemplate.spec

result:
> error: File "/home/fs/eg
> g/build/bdist.linux-x86_64/rpm"/SOURCES/texttemplate-0.2.0.tar.gz: No such file or
> directory

Obviously, rpmbuild just concats the given path with other components. So I went
for quoting with backslashes:
> rpmbuild -ba --define '_topdir /home/fs/eg\ g/build/bdist.linux-x86_64/rpm'
--clean
> build/bdist.linux-x86_64/rpm/SPECS/texttemplate.spec

result:
> error: File /home/fs/eg
g/build/bdist.linux-x86_64/rpm/SOURCES/texttemplate-0.2.0.tar.gz: 
> No such file or directory

Double/Tripple backslashes did not work either.

Comment 1 Jeff Johnson 2006-12-28 23:27:37 UTC
rpm-4.4.8-0.7 will handle white space in %_topdir.

Note that there's many other places that need fixing, its not only %_topdir
that won't handle white space in paths.

UPSTREAM

Comment 2 Red Hat Bugzilla 2007-08-21 05:30:35 UTC
User pnasrat's account has been closed

Comment 3 Panu Matilainen 2007-08-22 06:35:19 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 4 Panu Matilainen 2007-09-04 11:33:50 UTC
FWIW, rpmbuild whitespace issues have been largely fixed in upstream rpm.org,
but various other things like build-helper scripts not handling whitespace
remain. Not to mention other issues in rpm whitespace handling...

Comment 5 Panu Matilainen 2007-10-25 11:26:54 UTC
Moving to devel, not going to get fixed in FC6 at this point

Comment 6 Panu Matilainen 2008-01-25 17:09:17 UTC
Should be fixed in 4.4.2.3-0.1.rc1