Bug 99100

Summary: rpm macros can be read from comment sections.
Product: [Retired] Red Hat Linux Reporter: William Hamish Bell <wbell>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-17 23:32:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description William Hamish Bell 2003-07-14 15:27:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
If a hapless spec file author has placed something like %prep within a comment
area of the spec file rpmbuild sees this as a second macro and exits with an
error.  Previous versions of rpm did not have this problem.

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

How reproducible:
Always

Steps to Reproduce:
1. Take a working spec file and put %prep within a comment before %prep
2. Try to rebuild the package.
3.
    

Actual Results:  You get an error that there is a second %prep at the line where
the real 
%prep target is given.

Expected Results:  rpmbuild should ignore the commented section and not check
within it for 
%prep or %install etc.

Additional info:

Comment 1 Jeff Johnson 2003-07-17 23:32:01 UTC
Yes. macros are expanded wherever they are found, and the
redhat-rpm-config package is now overloading %prep as a
(multiline) macro.

Either add an escaping '%' before %prep in a comment, or
erase the redhat-rpm-config package.