[Pkg-dkms-maint] Bug#710535: dkms: Add option to build for all kernels
Daniel Dehennin
daniel.dehennin at baby-gnu.org
Fri May 31 17:41:32 UTC 2013
Package: dkms
Severity: wishlist
Version: 2.2.0.3-1.2
Dear Maintainer,
In our derivative we provided a patched kernel.
To avoid overpatching the kernel for drivers, we provides DKMS packages,
but we have an issue with detection of newest kernel version.
The version comparaison is based on $(uname -r), if we provide a kernel
with the same number but a "lower" local part, the DKMS module is not
compiled for it, for example:
The work around is to let dkms_autoinstaller do the job: 1) install the
DKMS module, then install the kernel headers, installing both in the
same "apt-get install" invocation fails.
I made a patch to add an option to build the DKMS modules for all
installed kernels.
Regards.
The following changes since commit 58ced114e00149af4c7f5af49fd066e8fbed32b9:
update changelog (2011-12-07 13:30:49 -0600)
are available in the git repository at:
git://git.baby-gnu.org/dkms.git feature/build-for-all-kernels
for you to fetch changes up to 71e6b386bcc4b48192f2363bbc79c0caf1fd9057:
Add an option to build and install module for all kernel versions. (2013-05-31 19:28:06 +0200)
----------------------------------------------------------------
Daniel Dehennin (1):
Add an option to build and install module for all kernel versions.
dkms.8 | 6 ++++++
dkms_common.postinst | 8 ++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dkms.8 b/dkms.8
index 908d9db..deb8bfa 100644
--- a/dkms.8
+++ b/dkms.8
@@ -832,6 +832,12 @@ being built for does not match against this regular expression, the dkms build
will error out. For example, if you set it as ="^2\.4.*", your module would not be
built for 2.6 kernels.
.TP
+.B BUILD_ALL_KERNELS=
+If this directive is set to
+.B yes
+then your module will be built for all founded kernels. By default,
+the module is built only for the current one and newest.
+.TP
.B BUILD_EXCLUSIVE_ARCH=
This optional directive functions very similarly to
.B BUILD_EXCLUSIVE_KERNEL
diff --git a/dkms_common.postinst b/dkms_common.postinst
index d8cf3a7..370b0a8 100644
--- a/dkms_common.postinst
+++ b/dkms_common.postinst
@@ -189,7 +189,9 @@ fi
#
# NOTE: if the headers are not installed then the
# module won't be built, as usual
-if [ -z "$UPGRADE" ]; then
+if [ -n "$BUILD_ALL_KERNELS" ]; then
+ echo "Force build for all kernels..."
+elif [ -z "$UPGRADE" ]; then
echo "First Installation: checking all kernels..."
for KERNEL in $KERNELS; do
if [ ${KERNEL} = ${CURRENT_KERNEL} ]; then
@@ -211,7 +213,9 @@ NEWEST_KERNEL=$(get_newest_kernel "$KERNELS")
if [ `_is_kernel_name_correct $CURRENT_KERNEL` = "yes" ]; then
# See if it's worth building the module for both the newest kernel
# and for the current kernel
- if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
+ if [ -n "BUILD_ALL_KERNELS" ]; then
+ echo "Building for $KERNELS"
+ elif [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
echo "Building for $CURRENT_KERNEL and $NEWEST_KERNEL"
KERNELS="$CURRENT_KERNEL $NEWEST_KERNEL"
else
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (90, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.8-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dkms-maint/attachments/20130531/dc471295/attachment.pgp>
More information about the Pkg-dkms-maint
mailing list