Bug 91072 - %{configure} is executed even when it's inside comments
Summary: %{configure} is executed even when it's inside comments
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
(Show other bugs)
Version: 8.0
Hardware: All Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-05-17 11:04 UTC by Kyriakos Sidiropoulos
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-22 00:06:30 UTC
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 11:06 UTC, Kyriakos Sidiropoulos
no flags Details

Description Kyriakos Sidiropoulos 2003-05-17 11:04:47 UTC
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 11:06:21 UTC
Created attachment 91756 [details]
foo SOURCE and .spec file for bug demonstration

Comment 2 Jeff Johnson 2003-05-22 00:06:30 UTC
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.