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

Best practices for kernel patches?

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?

Arguments in favor of applying to unpatched sources:

- Useful with all kernel sources, not just Debian's (and thus easier to use
  with the latest, unpackaged kernels)
- Pristine upstream source
- Convenient for kernel developers and heavy patchers

Arguments in favor of applying to patched sources:

- In the absence of other patch conflicts, makes everything work nicely and
  automatically with kernel-package
- Convenient for users

I don't want to have to choose between them.  Possibilities:

- Ship patches for both kernel versions, and somehow detect which one to
  apply at patch time.  Is there a reliable way to check whether a given
  kernel tree comes from the kernel-source packages?  Is README.Debian
  always present?

- Ship a kernel-patch package for the Debian diff, so that it can be
  automatically reversed.  This would still require a detection mechanism as
  above, but patch packages would only have to ship one version.

- Include support in the kernel-source packages for unpatching themselves
  for use with third-party patches.  Yes, I know that the diffs are
  currently shipped in the source .diff.gz, but that isn't available as part
  of the installed package, so it is useless for packaged patches.

None of these are satisfying to me.  What do other folks do?

 - mdz

Reply to: