Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 14463 - Nested %if handling in spec files is broken
Nested %if handling in spec files is broken
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: 16392 16843 19399 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-07-22 12:28 EDT by Charles R. Anderson
Modified: 2007-04-18 12:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 17:41:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch from H.J. Lu (4.44 KB, patch)
2000-08-29 15:23 EDT, Jeff Johnson
no flags Details | Diff
clean diff against rpm-4.0.4-7x.18.src.rpm (3.46 KB, patch)
2003-05-01 21:41 EDT, Virgil
no flags Details | Diff

  None (edit)
Description Charles R. Anderson 2000-07-22 12:28:53 EDT
I'm getting this error with rpm-3.0.5-6x (from ftp.redhat.de) on Red Hat

>rpm -ba -v -v -v --target=i386,i586,i686 kernel-2.2.16-ipsec.spec
Building target platforms: i386,i586,i686
Building for target i386
parse error in expression
parseExpressionBoolean returns -1

The relevent bits of the spec file are below.   I added an ipsec define as
a third optional component to the kernel-2.2.16-3 spec file to build with
freeswan.   I used the same ugly method as lfs and ext3, and doubled the
number of %if statements, because I see no way around it.  This spec file
builds fine with rpm-3.0.4-0.48 on an i586 box.

Line 22 below is the first %if %{ext3}.

# define lfs as either 0 (for off) or 1 (for on) when making the kernel
%define subrelease 3.1
%define ipsec 1
%define lfs 0
%define ext3 0
Version: %{kversion}
%if %{ipsec}

%if %{lfs}
%if %{ext3}
Release: %{subrelease}.ipsec.lfs.ext3
Release: %{subrelease}.ipsec.lfs
%if %{ext3}
Release: %{subrelease}.ipsec.ext3
Release: %{subrelease}.ipsec


%if %{lfs}
%if %{ext3}
Release: %{subrelease}.lfs.ext3
Release: %{subrelease}.lfs
%if %{ext3}
Release: %{subrelease}.ext3
Release: %{subrelease}

Comment 1 Jeff Johnson 2000-08-16 16:18:02 EDT
This is due to the patch at bugzilla #11485. You have the following choices for
now (I
will not be able to change rpm for a couple of weeks due to impending Red Hat
7.0 release):

1) fix the kernel spec file. I believe that the latest Raw Hide kernel has these

2) revert the #11485 patch and rebuild rpm.

3) I have a patch from H. J. Lu that fixes the problem, but I dunno at the
moment if that
will be the final fix. Send mail to <jbj@redhat.com> if you wish the patch.
Comment 2 Jeff Johnson 2000-08-16 16:18:45 EDT
*** Bug 16392 has been marked as a duplicate of this bug. ***
Comment 3 Jeff Johnson 2000-08-24 11:11:28 EDT
*** Bug 16843 has been marked as a duplicate of this bug. ***
Comment 4 Jeff Johnson 2000-08-29 15:23:34 EDT
Created attachment 3083 [details]
Patch from H.J. Lu
Comment 5 Jeff Johnson 2000-10-19 16:22:20 EDT
*** Bug 19399 has been marked as a duplicate of this bug. ***
Comment 6 panu.matilainen 2000-11-13 10:16:22 EST
BTW this still happens with rpm-4.0-4 and 4.0.1-0.6 from rawhide. H.J's patch
fixes it though.
Comment 7 Jeff Johnson 2001-02-22 16:39:48 EST
Changing component.
Comment 8 David Juran 2002-02-16 06:10:28 EST
And the bug still seems to be there for 4.0.2-6x
Comment 9 Edward Rudd 2002-08-08 23:06:36 EDT
This still happens with rpm 4.0.4-7x on a RH 7.2 system..
Is this going to be fixed sometime??
Comment 10 David Juran 2002-08-10 09:21:28 EDT
And the error is still there in rpm 4.0.4-7x.18 in RH 7.3 as well...
Comment 11 David Juran 2002-12-15 06:30:02 EST
The bug still seems to exists in rpm-4.1-1.06 in RedHat 8.0
Comment 12 Virgil 2003-05-01 20:12:29 EDT
Still not working in RedHat 9.  rpm-4.2-0.69
Comment 13 Virgil 2003-05-01 21:41:13 EDT
Created attachment 91468 [details]
clean diff against rpm-4.0.4-7x.18.src.rpm

This is HJ's patch, cleaned up to apply against rpm-4.0.4-7x.18.src.rpm from
RedHat 7.3.
Comment 14 Bill Nottingham 2005-09-29 17:41:55 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.

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