This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 144642 - rpmbuild still parses %defines which are commented with # in specfile
rpmbuild still parses %defines which are commented with # in specfile
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-10 02:39 EST by Ellen Shull
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

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


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

  None (edit)
Description Ellen Shull 2005-01-10 02:39:13 EST
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 02:39:14 EST
Created attachment 109545 [details]
minimal specfile to demonstrate bug
Comment 2 Jeff Johnson 2005-01-10 10:43:25 EST
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.