Bug 14463
Summary: | Nested %if handling in spec files is broken | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Charles R. Anderson <cra> | ||||||
Component: | rpm-build | Assignee: | Jeff Johnson <jbj> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.3 | CC: | djuran, pmatilai, redhat, wuth | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2005-09-29 21:41:55 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
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 changes. 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> if you wish the patch. *** Bug 16392 has been marked as a duplicate of this bug. *** *** Bug 16843 has been marked as a duplicate of this bug. *** Created attachment 3083 [details]
Patch from H.J. Lu
*** Bug 19399 has been marked as a duplicate of this bug. *** BTW this still happens with rpm-4.0-4 and 4.0.1-0.6 from rawhide. H.J's patch fixes it though. Changing component. And the bug still seems to be there for 4.0.2-6x This still happens with rpm 4.0.4-7x on a RH 7.2 system.. Is this going to be fixed sometime?? And the error is still there in rpm 4.0.4-7x.18 in RH 7.3 as well... The bug still seems to exists in rpm-4.1-1.06 in RedHat 8.0 Still not working in RedHat 9. rpm-4.2-0.69 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.
Closing bugs on older, no longer supported, releases. Apologies for any lack of response. For RPM issues, please try a current release such as Fedora Core 4; if bugs persist, please open a new issue. |
I'm getting this error with rpm-3.0.5-6x (from ftp.redhat.de) on Red Hat 6.2: >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 /home/cra/src/redhat/SPECS/kernel-2.2.16-ipsec.spec:22: 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 %else Release: %{subrelease}.ipsec.lfs %endif %else %if %{ext3} Release: %{subrelease}.ipsec.ext3 %else Release: %{subrelease}.ipsec %endif %endif %else %if %{lfs} %if %{ext3} Release: %{subrelease}.lfs.ext3 %else Release: %{subrelease}.lfs %endif %else %if %{ext3} Release: %{subrelease}.ext3 %else Release: %{subrelease} %endif %endif %endif