Bug 144642 - rpmbuild still parses %defines which are commented with # in specfile
Summary: rpmbuild still parses %defines which are commented with # in specfile
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-10 07:39 UTC by Ellen Shull
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-10 15:43:25 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
minimal specfile to demonstrate bug (258 bytes, text/plain)
2005-01-10 07:39 UTC, Ellen Shull
no flags Details

Description Ellen Shull 2005-01-10 07:39:13 UTC
Description of problem:
See attached foo.spec for example.  Given my understanding of rpm per Maximum
RPM, the echo output should be the string "good" but instead I get "bad". 
Haven't explored to see if this affects more than the %define directive, but I'd
guess it does.

Version-Release number of selected component (if applicable):
rpm-build-4.3.3-8 in fedora-rawhide, but also tested and same behavior from:
rpm-build-4.0.4-7x.18 in rh7.3
rpm-build-4.3.2-21 in fc3

How reproducible:
always

Steps to Reproduce:
1.  download attached foo.spec
2.  rpmbuild -bp foo.spec
  
Actual results:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.31889
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ echo bad
bad
+ exit 0

Expected results:
as above except "echo good"

Comment 1 Ellen Shull 2005-01-10 07:39:14 UTC
Created attachment 109545 [details]
minimal specfile to demonstrate bug

Comment 2 Jeff Johnson 2005-01-10 15:43:25 UTC
Yep. macor expansion is entirely context free, macros are expanded
wherever they are found, in comments, within quoted strings,
on the false branch of if statements, everywhere.

Do
   # %%define ...
to disable the expansion.


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