[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best practices for kernel patches?

On Thu, 6 Dec 2001 21:23, Herbert Xu wrote:
> > I have started work on packaging a kernel patch, and I've run into an
> > issue that I'm sure that others have dealt with already.
> >
> > Should kernel-patch packages contain diffs against the official kernel,
> > or against the patched Debian sources?
> IMHO the best option is to not package them at all.  Kernel-patch packages
> were originally devised to allow us to maintain kernel packages for
> multiple architectures as the upstream kernel doesn't work out of the
> box on all of them.
> It still doesn't, yet we're now using kernel-patch packages for every
> single patch out there.  This is not what it was designed for and that is
> why you're finding all these problems.

So what do you suggest that we do with kernel patches which are required for 
applications we want to patch?

It's common for the process of getting a kernel patch to correctly apply to 
take several hours the first time you do it.  First you have to get the 
source to the latest patch (easier said than done when patches are released 
without clear version numbers).  Then you have to get it to apply (which is a 
pain when the patch is distributed as a tar file containing a set of files 
and a patch to Config.in and Makefile files).  Then you sometimes have to 
resolve conflicts with other common patches (EG if two patches both require 
adding a new local variable to a function then they can't both add it at the 
same line - adding one at the start of the variable declaration section and 
the other at the end works).

After doing all that the amount of extra work required to create the Debian 
kernel-patch package is minimal, but can save large numbers of people all 
this work!  So it makes no sense to fail to package the result of such work 
in some way.  If you think that a kernel-patch package using 
dh_installkpatches is the wrong solution then please tell us of a better way 
of doing it.

http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

Reply to: