Control: tag -1 + upstream patch

On Sat, 20 Sep 2014 16:30:17 +0200, gregor herrmann wrote:

> Setting up linux-headers-3.17-rc5-common (3.17~rc5-1~exp1) ...
> Setting up linux-headers-3.17-rc5-amd64 (3.17~rc5-1~exp1) ...
> Examining /etc/kernel/header_postinst.d.
> run-parts: executing /etc/kernel/header_postinst.d/dkms 3.17-rc5-amd64
> Error! Bad return status for module build on kernel: 3.17-rc5-amd64 (x86_64)
> Consult /var/lib/dkms/virtualbox/4.3.14/build/make.log for more information.

I've now taken the patch from
https://forums.virtualbox.org/viewtopic.php?f=7&t=59537#p296925 ,
adjusted the paths and put it into debian/patches.

The module compiles, and VirtualBox starts and runs the only VM I
have.

Attached as a debdiff.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Kurt Ostbahn & Die Kombo: Vata, Mutta, Kind
diff -Nru virtualbox-4.3.14-dfsg/debian/changelog virtualbox-4.3.14-dfsg/debian/changelog
--- virtualbox-4.3.14-dfsg/debian/changelog	2014-07-26 15:25:39.000000000 +0200
+++ virtualbox-4.3.14-dfsg/debian/changelog	2014-09-21 14:11:22.000000000 +0200
@@ -1,3 +1,12 @@
+virtualbox (4.3.14-dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "modules fail to build with 3.17-rc5":
+    add patch 39-3.17-compat.patch, taken from forums.virtualbox.org.
+    (Closes: #762282)
+
+ -- gregor herrmann <gre...@debian.org>  Sun, 21 Sep 2014 14:04:33 +0200
+
 virtualbox (4.3.14-dfsg-1) unstable; urgency=medium
 
   [ Gianfranco Costamagna ]
diff -Nru virtualbox-4.3.14-dfsg/debian/patches/39-3.17-compat.patch virtualbox-4.3.14-dfsg/debian/patches/39-3.17-compat.patch
--- virtualbox-4.3.14-dfsg/debian/patches/39-3.17-compat.patch	1970-01-01 01:00:00.000000000 +0100
+++ virtualbox-4.3.14-dfsg/debian/patches/39-3.17-compat.patch	2014-09-21 14:10:48.000000000 +0200
@@ -0,0 +1,53 @@
+Description: fixes for 3.17 compatibility
+Origin: https://forums.virtualbox.org/viewtopic.php?p=296650#p296650
+Bug-Debian: https://bugs.debian.org/762282
+Reviewed-by: gregor herrmann <gre...@debian.org>
+Last-Update: 2014-09-21
+
+--- a/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
++++ b/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
+@@ -52,6 +52,25 @@
+ 
+ #define VBOXNETADP_FROM_IFACE(iface) ((PVBOXNETADP) ifnet_softc(iface))
+ 
++/*******************************
++source for the 4th parameter alloc_netdev fix for kernel 3.17-rc1 is:
++https://github.com/proski/madwifi/commit/c5246021b7b8580c2aeb0a145903acc07d246ac1
++*/
++#ifndef NET_NAME_UNKNOWN
++#undef alloc_netdev
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
++#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
++  alloc_netdev(sizeof_priv, name, setup)
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
++#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
++  alloc_netdev_mq(sizeof_priv, name, setup, 1)
++#else
++#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
++  alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)
++#endif
++#endif
++/*******************************/
++
+ /*******************************************************************************
+ *   Internal Functions                                                         *
+ *******************************************************************************/
+@@ -183,6 +202,7 @@
+     /* No need for private data. */
+     pNetDev = alloc_netdev(sizeof(VBOXNETADPPRIV),
+                            pThis->szName[0] ? pThis->szName : VBOXNETADP_LINUX_NAME,
++                           NET_NAME_UNKNOWN,
+                            vboxNetAdpNetDevInit);
+     if (pNetDev)
+     {
+--- a/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
++++ b/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
+@@ -191,7 +191,7 @@
+         struct page **papPagesIterator = papPages;
+         pVmArea->nr_pages = cPages;
+         pVmArea->pages    = papPages;
+-        if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC, &papPagesIterator))
++        if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC, papPagesIterator))
+         {
+             PRTMEMLNXHDREX pHdrEx = (PRTMEMLNXHDREX)pVmArea->addr;
+             pHdrEx->pVmArea     = pVmArea;
diff -Nru virtualbox-4.3.14-dfsg/debian/patches/series virtualbox-4.3.14-dfsg/debian/patches/series
--- virtualbox-4.3.14-dfsg/debian/patches/series	2014-04-05 22:23:56.000000000 +0200
+++ virtualbox-4.3.14-dfsg/debian/patches/series	2014-09-21 14:07:18.000000000 +0200
@@ -14,3 +14,4 @@
 32-disable-guest-version-check.patch
 35-libvdeplug-soname.patch
 36-fix-vnc-version-string.patch
+39-3.17-compat.patch

Attachment: signature.asc
Description: Digital Signature

Reply via email to