Funny one that caused e.g. unability to properly use %ifs for kernel rpms. I don't know if this is reported, but I see this bug for very long time already, and query for 'rpm' and 'arch' didn't find any refs for this. Here it is: %define var 1 %ifarch i386 %if %{var} echo var %endif %endif For this, rpm will complain "parseExpressionBoolean returns -1" to the '%if %{var}' line. If the order is changed (i.e. %ifarch inside %ifvar), all works fine. This bug caused funny bug in kernel rpm. Redhat places kernel-sources and kernel-headers to one package by default, but there is a define in kernel.spec (%define headersinsource 1) that can be changed. Ok, I see this thing in spec: %files source ... %{!?headersinsource:%files headers} ... This wont work (no kernel-headers produced even if headersinsource is set to 0). If I change this to %if ! %{headersinsource} %files headers %endif rpm will build for i386 and -headers will be created, but it will complain to the line `%if ! %{headersinsource}' for e.g. i686 (with the same message). So, there is no ability currently exists to make kernel-headers package, while at least one of this bugs not fixed. I don't know why it won't build -headers in the first place -- line %{!?headersinsource:%files headers} looks strange to me. But I can't say that this is an rpm bug also, as this at least not documented anywhere. So there is may be one bug (nested %ifs) or two bugs.
BTW, probably this is the same thing as was with %define inside false %ifarch that was fixed. (see bug 11485, http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=11485 ).
*** This bug has been marked as a duplicate of 14463 ***