Re: rpmbuild and whitespace in path names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I had a similar problem with not only directory but file names.  Solution that was arrived at was to insure that the entire path (directory and file names) was either quoted or escaped in the Spec file.  The key for our solution is the use of the Spec file.

Felix Schwarz <felix.schwarz@xxxxxx> wrote:
Hi,

can anyone help me building rpms when the _topdir path name contains whitespace?

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.

Yes, I can rename/symlink the directory but I think that software should be able to deal
with whitespace in pathnames. After all, just passing commands unquoted to shell commands
is bad. And *denying* the use of proper quoting is /evil/ -- IMHO.

Any hints how to resolve that issue? If not, does anyone know the bug report number in
bugzilla (I didn't find one)?

fs

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux