Bug 91072 - %{configure} is executed even when it's inside comments
%{configure} is executed even when it's inside comments
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2003-05-17 07:04 EDT by Kyriakos Sidiropoulos
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-21 20:06:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
foo SOURCE and .spec file for bug demonstration (10.00 KB, text/plain)
2003-05-17 07:06 EDT, Kyriakos Sidiropoulos
no flags Details

  None (edit)
Description Kyriakos Sidiropoulos 2003-05-17 07:04:47 EDT
Description of problem:
%{configure} is executed even when it's inside comments

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

How reproducible:
Always reproducable (in the following way)

Steps to Reproduce:
0) Get the submitted rpm_configure_bug.tar
1) su
2) cp rpm_configure_bug.tar /usr/src/redhat; cd /usr/src/redhat/; \
   tar xvf rpm_configure_bug.tar; cd SPECS
3) rpmbuild -ba test.spec
Actual results:
+ ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu
--target=athlon-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man
/home/Raptor/D_rpm_build_bench/temp/rpm-tmp.55833: line 29: ./configure: No such
file or
error: Bad exit status from /home/Raptor/D_rpm_build_bench/temp/rpm-tmp.55833

RPM build errors:
    Bad exit status from /home/Raptor/D_rpm_build_bench/temp/rpm-tmp.55833 (%build)

Which obviously means that '%{configure}' is executed even thought
it's commented out in the spec file.

Expected results:
Rpmbuild should abort packaging because of the: exit 1
command. (deliberately put in the %{build} section)

Additional info:
With the same spec file lines like
# %{prep}
# %{setup}
don't seem to create problems.
Comment 1 Kyriakos Sidiropoulos 2003-05-17 07:06:21 EDT
Created attachment 91756 [details]
foo SOURCE and .spec file for bug demonstration
Comment 2 Jeff Johnson 2003-05-21 20:06:30 EDT
Yup, macros's are context free, expanded inside quotes, in comments, wherever
they are found. Multi-line macros, when expanded in comments, then cause
problems for other parsers.

Add a 2nd %, as in
    ## %%configure
to prevent the expansion.

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