Bug#717445: pu: package ndiswrapper/1.57-1+deb7u1
oOn Sat, Apr 25, 2015 at 06:33:52PM +0100, Adam D. Barratt wrote:
> On Sat, 2014-12-06 at 21:22 +0100, Philipp Kern wrote:
> > Control: tag -1 + moreinfo
> >
> > Hi,
> >
> > On Sun, Jan 26, 2014 at 02:57:22PM +0100, Julian Andres Klode wrote:
> > > I'm most likely going to ship the patch below in 1.59-2, it just drops
> > > the detection and hard-codes the modprobe.d/ndiswrapper.conf file, as
> > > the other locations are not supported anymore.
> >
> > if this request still applies, please provide an updated debdiff against stable
> > of what you want to ship. Thanks!
>
> Poke.
>
> Regards,
>
> Adam
>
Sorry for not answering. I attached a new diff. The patches had to
be backported from unstable, due to some renamed (KVERS vs KVERS_UNAME)
and moved code (declaration of $modconf), but they should work, as
they are fairly obvious patches.
I do not have any devices to really test things, though.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
- If you don't I might ignore you.
diff --git a/debian/changelog b/debian/changelog
index 5654ab5..73672d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ndiswrapper (1.57-1+deb7u1) oldstable; urgency=medium
+
+ * Use $KERNELRELEASE as target kernel version (Closes: #693638)
+ * Add BUILT_MODULE_NAME to dkms config file (Closes: #690747)
+ * Only support modprobe.d (Closes: #724890)
+
+ -- Julian Andres Klode <jak@debian.org> Fri, 29 May 2015 22:15:51 +0200
+
ndiswrapper (1.57-1) unstable; urgency=low
* Imported Upstream version 1.57
diff --git a/debian/ndiswrapper-dkms.dkms.in b/debian/ndiswrapper-dkms.dkms.in
index 1053506..8c6a6de 100644
--- a/debian/ndiswrapper-dkms.dkms.in
+++ b/debian/ndiswrapper-dkms.dkms.in
@@ -1,4 +1,5 @@
PACKAGE_NAME="ndiswrapper"
PACKAGE_VERSION="@VERSION@"
DEST_MODULE_LOCATION[0]="/updates"
+BUILT_MODULE_NAME[0]="ndiswrapper"
AUTOINSTALL="yes"
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..78961c1
--- /dev/null
+++ b/debian/patches/Add-support-for-3.x-kernel-versions.patch
@@ -0,0 +1,40 @@
+From 8e6e357f6c0246dbed8bea55df215a46978152ad Mon Sep 17 00:00:00 2001
+From: Julian Andres Klode <jak@debian.org>
+Date: Sat, 11 Jan 2014 17:15:39 +0100
+Subject: [PATCH] Hardcode /etc/modprobe.d/ndiswrapper.conf
+
+We do not support modprobe.conf anymore. The code failed to work with
+recent kernels that only export two components in the version,
+so things were broken a bit anyway.
+
+Bug-Debian: http://bugs.debian.org/724890
+---
+ utils/ndiswrapper | 18 +-----------------
+ 1 file changed, 1 insertion(+), 17 deletions(-)
+
+--- a/utils/ndiswrapper
++++ b/utils/ndiswrapper
+@@ -53,22 +53,7 @@ if (@ARGV < 1) {
+ exit(1);
+ }
+
+-my $modconf;
+-if (`uname -r` =~ /(\d+)\.(\d+)\.(\d+)/) {
+- if ($2 > 4) {
+- if (-d "/etc/modprobe.d") {
+- $modconf = "/etc/modprobe.d/ndiswrapper.conf";
+- } else {
+- $modconf = "/etc/modprobe.conf";
+- }
+- } else {
+- if (-d "/etc/modutils") {
+- $modconf = "/etc/modutils/ndiswrapper";
+- } else {
+- $modconf = "/etc/modules.conf";
+- }
+- }
+-}
++my $modconf = "/etc/modprobe.d/ndiswrapper.conf";
+
+ my $res;
+ my $dbg_file;
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 <ben@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
Reply to: