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   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-25 12:09:17 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Felix Schwarz 2006-12-21 08:06:16 EST
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

> 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'
> build/bdist.linux-x86_64/rpm/SPECS/texttemplate.spec

> error: File /home/fs/eg
> No such file or directory

Double/Tripple backslashes did not work either.
Comment 1 Jeff Johnson 2006-12-28 18:27:37 EST
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.

Comment 2 Red Hat Bugzilla 2007-08-21 01:30:35 EDT
User pnasrat@redhat.com's account has been closed
Comment 3 Panu Matilainen 2007-08-22 02:35:19 EDT
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Comment 4 Panu Matilainen 2007-09-04 07:33:50 EDT
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 07:26:54 EDT
Moving to devel, not going to get fixed in FC6 at this point
Comment 6 Panu Matilainen 2008-01-25 12:09:17 EST
Should be fixed in