[OpenAFS-devel] Linux Kernel Module build question

Jeremy Katz katzj@linuxpower.org
Thu, 12 Jul 2001 13:52:05 -0700


On Thursday, July 12 2001, Derek Atkins said:
> Jeremy Katz <katzj@linuxpower.org> writes:
> > The problem isn't so much the hassle, it's the amount of build root
> > contamination which is possible if something goes awry. =\  Build root
> > pollution bad, reproducibility of builds good.  
> 
> What kind of build-root contamination do you mean?  I suppose that,
> yes, one could actually change things in the base system while running
> as root, but that doesn't mean one _HAS_ to do so.  And I can
> certainly reproduce all my builds of OpenAFS... and I've _ALWAYS_ done
> it as root.

I think Elliot covered this one pretty well... 
 
> 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.

If you're building for a general audience, then you definitely want them
to be able to easily build for the kernel they're running.  For the
other case, again, why are you expecting that people are going to be
regularly upgrading their OpenAFS and not their kernel when there are
known security issues for older kernels.  You should be able to build
for the following three strata (for Red Hat Linux releases) and have
things work -- Red Hat Linux 6.x, Red Hat Linux 7.0, Red Hat Linux 7.1.
You're not going to get away with any less binary packages than that,
but if you make it so that it's EASY to rebuild the kernel module for
your specific machine, then the question of requiring every single
kernel build ever to work becomes less of an issue.

> [snip]
> > 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...  Or
> you have to be very careful to only build the openafs-kernel modules
> for the other platforms.  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.

No, this is the normal way to build packages for multiple architectures.
OpenAFS doesn't exist in a vacuum and if it doesn't play nice with
others (in this case, the host machine and distribution), then its
chances of seeing more support are slim.
 
Jeremy

-- 
Jeremy Katz
katzj@linuxpower.org	| jlkatz@eos.ncsu.edu
http://linuxpower.org	| Developer, NCSU Realm Kit for Red Hat Linux
GPG fingerprint: 367E 8B6B 5E57 2BDB 972A 4D73 C83C B4E8 89FE 392D