On Sun, Jul 21, 2013 at 12:26:00AM +0200, Andreas Beckmann wrote: > Package: release.debian.org > Severity: normal > Tags: wheezy > User: release.debian....@packages.debian.org > Usertags: pu > > Hi, > > there are two bugs affecting ndiswrapper-dkms that should be fixed in > wheezy: > * the module fails to build for a kernel that is not running (#693638) > * dkms throws up during kernel upgrades (#690747)
The second does not make sense. It would only add support for 3.4-3.7, as ndiswrapper 1.57 does not compile against 3.8. The only supported of those is 3.4. Backports is already at 3.9, so it seems unlikely that someone wants to run a 3.4 kernel with ndiswrapper. It works with 3.2 AFAICT, and that's the reason I did not workaroud this bug in stable. For supporting kernels newer than 3.2, the best way seems to be a backport of 1.58-1 (or -2, once I added a patch for 3.10 kernels). But it might make sense to include the patch: * Patch userland for 3.X kernels While there is no bug report for that, it fixes the ndiswrapper tool to use modprobe.d and modprobe.conf on 3.X kernels, instead of modutils/ and modules.conf. > > The changes are cherry-picked from 1.58-1 and adjusted for 1.57. > > I can do a NMU, but I'd prefer a maintainer upload fixing this. > @jak (Cc:ed): Shall I push my wheezy branch to the git repo? In general, I prefer git patches against tag/1.57-1 over branches, so I can review the individual commits. In this case, I'd like some further changes as mentioned above, so I came up with the attached patch (committed in a *local* branch). Please comment. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
diff --git a/debian/changelog b/debian/changelog index 5654ab5..acdab74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ndiswrapper (1.57-1+deb7u1) stable; urgency=low + + * Use $KERNELRELEASE as target kernel version (Closes: #693638) + * Patch userland for 3.X kernels + + -- Julian Andres Klode <j...@debian.org> Sun, 21 Jul 2013 14:42:49 +0200 + ndiswrapper (1.57-1) unstable; urgency=low * Imported Upstream version 1.57 diff --git a/debian/patches/Add-support-for-3.x-kernel-versions.patch b/debian/patches/Add-support-for-3.x-kernel-versions.patch new file mode 100644 index 0000000..1fea628 --- /dev/null +++ b/debian/patches/Add-support-for-3.x-kernel-versions.patch @@ -0,0 +1,28 @@ +From 71ec9e8a80b74652d660232b560bbe1dfa7915ba Mon Sep 17 00:00:00 2001 +From: Tim Gardner <tim.gard...@canonical.com> +Date: Mon, 13 Feb 2012 14:19:58 -0700 +Subject: [PATCH] Add support for 3.x kernel versions + +As suggested by Kano on Freenode #ubuntu-kernel + +Signed-off-by: Tim Gardner <tim.gard...@canonical.com> +--- + utils/ndiswrapper | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/ndiswrapper b/utils/ndiswrapper +index 4bb91f2..ba082a3 100755 +--- a/utils/ndiswrapper ++++ b/utils/ndiswrapper +@@ -55,7 +55,7 @@ if (@ARGV < 1) { + + my $modconf; + if (`uname -r` =~ /(\d+)\.(\d+)\.(\d+)/) { +- if ($2 > 4) { ++ if (($2 > 4) || ($1 > 2)) { + if (-d "/etc/modprobe.d") { + $modconf = "/etc/modprobe.d/ndiswrapper.conf"; + } else { +-- +1.8.3.2 + diff --git a/debian/patches/ndiswrapper-use-KERNELRELEASE.patch b/debian/patches/ndiswrapper-use-KERNELRELEASE.patch new file mode 100644 index 0000000..f1cb786 --- /dev/null +++ b/debian/patches/ndiswrapper-use-KERNELRELEASE.patch @@ -0,0 +1,22 @@ +From: Ben Hutchings <b...@decadent.org.uk> +Subject: Use $KERNELRELEASE as target kernel version +Bug-Debian: http://bugs.debian.org/693638 + +We must not assume that the running kernel version is the target +version! DKMS and later Kbuild set $KERNELRELEASE to be the target +kernel version. + +--- a/driver/Makefile ++++ b/driver/Makefile +@@ -12,7 +12,11 @@ DISTFILES = \ + # By default, we try to compile the modules for the currently running + # kernel. But it's the first approximation, as we will re-read the + # version from the kernel sources. ++ifeq (,$(KERNELRELEASE)) + KVERS ?= $(shell uname -r) ++else ++KVERS ?= $(KERNELRELEASE) ++endif + + # KBUILD is the path to the Linux kernel build tree. It is usually the + # same as the kernel source tree, except when the kernel was compiled in diff --git a/debian/patches/series b/debian/patches/series index 2335794..99ec0d6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ ndiswrapper-harden.patch +ndiswrapper-use-KERNELRELEASE.patch +Add-support-for-3.x-kernel-versions.patch
pgp0QRs7xRXnZ.pgp
Description: PGP signature