Bug 746319 - impossible to escape % sign in rpmspec file list.
Summary: impossible to escape % sign in rpmspec file list.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm
Version: 5.5
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-14 18:30 UTC by Mathieu Jobin
Modified: 2011-10-17 07:16 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-17 07:16:06 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mathieu Jobin 2011-10-14 18:30:34 UTC
Description of problem:
impossible to escape % sign in rpmspec file list.

Version-Release number of selected component (if applicable):


How reproducible:
very 

Steps to Reproduce:
1. try to build http://edgeapi.rubyonrails.org/classes/Rails/Railtie.html
which contains files with %name% string in it.
2. use gem2rpm to generate basic spec file.
3. try to rpmbuild it
  
Actual results:
fails

Expected results:
rpm

Additional info:
I tried %%name and even %%%%name
I tried setting variable 
%define nname name
and doing 
%%%{nname}

nothing works

Comment 1 Panu Matilainen 2011-10-17 07:16:06 UTC
Every % in spec needs double escaping, thus is the file has '%name%' string in it, it needs to be escaped as '%%name%%'. Failure to do proper escaping would be a bug in gem2rpm (which is not part of RHEL-5 AFAICS), not in rpm.


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