I have an issue with building kernel module packages. Basicly, whenever
you rebuild the kernel you need to rebuild the kernel modules packages
(i.e dahdi-linux and xtables-addons, iscsi will come soon too)
The goals are:
* you update or rebuild the kernel, and all separate kernel module
packages gets rebuilt automatically.
* be simple. newbies should be able to read the apkbuild and understand
whats going on
* the kernel module packages should increase the pkgrel when rebuilt so
that you dont end up upgrading the kernel but not the kernel module
Currently, if kernel is updated I need to remember to manually go to all
kernel packages an bump the pkgrel. Ideally this should be done
As I can see there are 3 ways to solve this:
1. build all kernel packages in the kernel APKBUILD.
The benefit is: if you rebuild kernel, you rebuild all kernel module
packages. The kernel module ackages inherits the kernel version so for
example dahdi-linux will have the version 220.127.116.11-r4 or similar.
The drawback is that you will rebuild the kernel if you update for
example dadhi-linux. If you want to add more non-standard kernel modules
you will need to modify the kernel APKBUILD.
2. we include the kernel version in the kernel module package pkgver.
This is doe by sourcing the kernel APKBUILD. For example:
# source kernel version
If kernel is 18.104.22.168-r4, the dadhdi-linux-grsec would here end up as
Alternatively we could just add the pkgrels so reduce one digit:
# source kernel version
pkgrel=$(( $_rel + $pkgrel ))
In this example we would end up with
If we now upgrade the kernel to 22.214.171.124-r5 then will 'abuild up2date'
detect that the package is missing and will trigger a rebuild and things
just works. However, it is somewhat hackish, creates ugly version
numbers and is not so simple.
3. the third option is to do more or less what we do today, but have
some kind of sanity check scripts that keeps track on the kernel
versions and kerlen package versions and will make buildrepo fail if the
kernel module package is out of sync with the kernel package. This
requires that maintainer manually bump the pkgrel in the kernel module
APKBUILD. we could have some helper scripts to make that job easier.
Benefit here would be tat its less hackish (no need for the ugly
sourcing of other APKBUILDS) and we have nice version numbers,
dahdi-linux-grsec-126.96.36.199-r2 instead of
But the drawback is that it will not auto rebuild if kernel is updated.
What do you prefer?
Received on Tue Apr 07 2009 - 15:22:18 UTC