[OpenAFS-devel] Linux Kernel Module build question

Elliot Lee sopwith@redhat.com
Thu, 12 Jul 2001 12:37:15 -0400 (EDT)


On 12 Jul 2001, Derek Atkins wrote:

> What kind of build-root contamination do you mean?

Changing, adding, removing any of the contents of the build environment
counts as buildroot contamination.

(buildroot in this context meaning the chroot environment that is used for
building packages, not the rpm BuildRoot: that things are installed into
in %install.  Yes, confusion.)

> certainly reproduce all my builds of OpenAFS... and I've _ALWAYS_ done
> it as root.

Root vs. non-root RPM packaging...

Root:
	+ MAKEDEV will work easily.
	+ No need for extra %defattr stuff.

Non-root:
	+ You make sure that someone is not overwriting
	/usr/include/stdio.h accidentally as part of their 'make install'.

Even though I build my personal packages as root, the non-root advantage
is fairly big and outweighs the root advantages.

> But I do also want to support multiple kernels.  Remember that I'm not
> building to a particular distribution like you are, where you control
> the whole build process.  I'm building for a general audience.  That
> means that I don't necessarily know what version of the kernel they've
> got ahead of time, so I want to cover all my based.  That means I want
> to build for every released kernel for that OS.

I gather here that your requirement here is being able to build against
kernel versions other than the currently running one? There has to be a
better way to do this than editing system files during the build, or am I
mistaken...

> > Then, instead of just running the rpm build once, you run the first time
> > to build all of the base packages and then build additional times for
> > each subarchitecture by rebuilding the SRPM with a --target, eg
> >
> > rpm -ba openafs.spec # get initial SRPM and base package
> > rpm --rebuild openafs.src.rpm --target=i586
> > rpm --rebuild openafs.src.rpm --target=i686
>
> Now, _THIS_ would be considered, IMHO, build-root contamination...

There must be a gap in the universe regarding the definition of this
term... :)

> Or you have to be very careful to only build the openafs-kernel
> modules for the other platforms.

Not at all.

If you look at the RH kernel RPM package, it does the right thing for each
possible --target that you can specify. e.g. it skips the kernel-source
package if you use --target=i686, but builds it if you use
--target={i386,alpha,ia64,otherbasearchs...}.

> Me, I'd just rather have one package that contained ALL the modules
> and just be intelligent about which one get's loaded.  Much easier for
> the user, IMHO.  They don't have to figure out which module-package to
> install.

Where is this intelligence supposed to be located?

-- Elliot
Your freedom to change my source code does not translate into my
responsibility to foist your changes upon users at large.