Bug 746319

Summary: impossible to escape % sign in rpmspec file list.
Product: Red Hat Enterprise Linux 5 Reporter: Mathieu Jobin <somekool>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.5   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-17 07:16:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.