kernel rebuild does'nt build actual kernel

Tom 'spot' Callaway tcallawa at redhat.com
Thu Mar 4 15:02:32 UTC 2004


On Mon, 2004-03-01 at 23:32 -0500, Tom Diehl wrote:


> > Sorry to be a pest Tom but the *spec file is so poorly commented and
> > the comments that are there are so ambiguous it is really difficult
> > to tell from readin them what any of it supposed to be doing.

> > I'm guessing the various arch can be turned off here:
> > 
> >   # groups of related archs
> >   %define all_x86 i386 i586 i686
> >   %define all_sparc sparc sparc64

No. All this is doing is variable definitions. Its definining "all_x86"
as a list, containing the members "i386", "i586", and "i686". Note that
it is used here to set additional definitions:

%ifarch %{all_x86}
%define all_arch_configs kernel-%{kversion}-i?86*.config
%define _64bit 0
%endif

So, in English, "If we're i386, i586, or i686, use the kernel-*i?86.
configs, and disable the 64 bit variable."

All its doing here is setting variables so that one spec file can be
used for multiple arches.

> >   # Override generic defaults with per-arch defaults 
> >   
> >   # First, architecture-specific kernels off on all other archs (ifnarch)
> >   %ifnarch i386 x86_64 sparc
> >   %define buildsource 0
> >   %endif
> > 
> > `Other' than what?
> > 
> > Does this mean i386 x86_64 sparc are turned off?
> > Or does it mean everything else is turned off?

No. What this means in English is "If the arch is not i386, x86_64, or
sparc, do not build the source package." The only arch that you want a
kernel-source package for is one of those three, because the source is
not optimized for any specific arch, only the binaries. This is why
there is a kernel-source*.i386.rpm and not a kernel-source*.i686.rpm.

The old conditional methods from the 2.4 kernel are no longer present in
the 2.6 kernel spec. And while the spec could probably use a little bit
of commenting, as a whole, its a LOT less difficult to parse than the
2.4 spec.

hth,

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora SPARC Linux Project Leader

"The author's mathematical treatment of the conception of purpose is
novel and highly ingenious, but heretical and, so far as the present
social order is concerned, dangerous and potentially subversive. Not 
to be published." -- Aldous Huxley's "Brave New World"





More information about the test mailing list