[rpm-list] Re: escaping '%' in a file name.
Jason Pyeron
jpyeron at pdinc.us
Tue May 29 02:29:18 UTC 2012
_____
From: rpm-list-bounces at lists.rpm.org [mailto:rpm-list-bounces at lists.rpm.org] On
Behalf Of Jordan Sissel
Sent: Monday, May 28, 2012 21:30
To: General discussion about the RPM package manager
Subject: [rpm-list] Re: escaping '%' in a file name.
On Mon, May 28, 2012 at 6:29 PM, Jordan Sissel <jls at semicomplete.com> wrote:
Howdy folks!
I'm mostly noting this here for posterity.
I'm trying to package software that has files with '%' in the names. I tried a
few things, but nothing worked. Googling found only this thread from 2003 which
indicated that "%%" "should" work but it does not (thread;
://tech.groups.yahoo.com/group/rpm-list/message/21824
<http://tech.groups.yahoo.com/group/rpm-list/message/21824> )
If my %files section is follows, for testing all possible permutations ;)
%files
/example/%name
/example/%%name
/example/%%%name
/example/%%%%name
/example/%{%}name
/example/\%name
The error with rpmbuild is:
RPM build errors:
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/helloworld
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/helloworld
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/%helloworld
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/helloworld
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/%{%}name
File not found:
/tmp/package-rpm-build20120528-31204-qsgxuu/BUILD/example/\helloworld
Judging from the above, it appears the correct way to escape a single % in a
filename is to use '%%%'
-Jordan
Replying to my own nonsense.
I misread the output. None of my attempted escapes actually worked.
Any ideas?
This works for me:
Name: test
Version: 0.0
Release: 0
Summary: none
Group: any
License: none
%description
none
%install
mkdir -p /tmp/foo
> /tmp/foo/%.txt
%files
/tmp/foo/%.txt
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us
<http://www.pdinc.us/> -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20120528/2ae45945/attachment-0001.html>
More information about the Rpm-list
mailing list