[CentOS-devel] there's something happened between kernel 2.6.28-128.1.1 and 2.6.18-128.1.6 compilation

Tue Apr 21 09:32:17 UTC 2009
Karanbir Singh <mail-lists at karan.org>

Farkas Levente wrote:
> - it's kernel bug (eg. kernel's spec is wrong)

imho, the problem is in the kernel-2.6.spec and this section specifically:

%if %{with_headers}
BuildRequires: unifdef
%endif

specially when things like this are being done:

%ifarch i586 i686 ppc64iseries
%define with_headers 0
%endif

and..

%ifarch noarch
%define with_up 0
%define with_headers 0
%define with_debug 0
%define all_arch_configs kernel-%{kversion}-*.config
%endif

-----
the 'problem' you have in this case, is directly a fallout from the fact 
that depending on what arch-target the kernel-2.6.spec is built for, you 
might or might not get a usable src.rpm ( in your case, you didnt ).

We always use the src.rpm from the 'first target built'; wherein 
'target' can not really be predicted since there are many threads each 
handling specific targets all running to different loads.

Given that Red Hat only published one set of sources ( in this case, 
from their ppc builders ) - this is an issue they should address 
upstream there. Since even ppc targets seem to impact what 
BuildRequires: are setup for the sources.

For now, and since we know this is a problem with the src.rpm out there, 
I'll replace the sources with a source only build done locally. And mark 
this as an issue for all future kernel builds. But a resolution to the 
issue upstream would still be something that should be attempted.

btw, I completely fail to see why you would want to have a 
kernel*.src.rpm that isnt usable to build a i686 kernel; so why 
conditional'ise the BuildRequires:  ? Sounds like the Red Hat 
buildsystem might be broken :) I hope they dont do the really stupid 
mock trick of trying to build a src.rpm from a src.rpm first and then 
try to build it. or if they need that, perhaps they are not building 
from src.rpms at all[1]

- KB