diff -Nru virtualbox-5.1.8-dfsg/debian/changelog virtualbox-5.1.8-dfsg/debian/changelog --- virtualbox-5.1.8-dfsg/debian/changelog 2016-11-09 09:11:46.000000000 +0000 +++ virtualbox-5.1.8-dfsg/debian/changelog 2016-11-16 09:52:19.000000000 +0000 @@ -1,8 +1,10 @@ -virtualbox (5.1.8-dfsg-6build1) zesty; urgency=medium +virtualbox (5.1.8-dfsg-7~build1) zesty; urgency=medium - * Rebuild against new libvpx4. + * d/p/linux-4.9-fix.patch (LP: #1642163): + - Fix build with kernel 4.9, cherry-picking upstream + commit 64561 64562 64564 - -- Gianfranco Costamagna Wed, 09 Nov 2016 10:11:46 +0100 + -- Gianfranco Costamagna Wed, 16 Nov 2016 10:18:29 +0100 virtualbox (5.1.8-dfsg-6) unstable; urgency=medium diff -Nru virtualbox-5.1.8-dfsg/debian/control virtualbox-5.1.8-dfsg/debian/control --- virtualbox-5.1.8-dfsg/debian/control 2016-10-21 15:54:29.000000000 +0000 +++ virtualbox-5.1.8-dfsg/debian/control 2016-11-04 09:37:47.000000000 +0000 @@ -18,7 +18,7 @@ gsoap (>= 2.8.16), iasl, imagemagick, - kbuild (>= 1:0.1.9998svn2695), + kbuild (>= 1:0.1.9998svn2814~), libasound2-dev, libcap-dev, libcurl4-gnutls-dev, diff -Nru virtualbox-5.1.8-dfsg/debian/patches/linux-4.9-fix.patch virtualbox-5.1.8-dfsg/debian/patches/linux-4.9-fix.patch --- virtualbox-5.1.8-dfsg/debian/patches/linux-4.9-fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ virtualbox-5.1.8-dfsg/debian/patches/linux-4.9-fix.patch 2016-11-16 09:38:36.000000000 +0000 @@ -0,0 +1,87 @@ +Description: cherry-pick upstream 64561 64562 and 64534 +Index: src/VBox/Additions/linux/drm/vbox_ttm.c +=================================================================== +--- a/src/VBox/Additions/linux/drm/vbox_ttm.c ++++ b/src/VBox/Additions/linux/drm/vbox_ttm.c +@@ -224,6 +224,8 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) + r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem); ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) ++ r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem); + #else +- r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem); ++ r = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem); + #endif + return r; + +Index: src/VBox/Additions/linux/sharedfolders/dirops.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/dirops.c ++++ b/src/VBox/Additions/linux/sharedfolders/dirops.c +@@ -749,5 +749,9 @@ + */ + static int sf_rename(struct inode *old_parent, struct dentry *old_dentry, +- struct inode *new_parent, struct dentry *new_dentry) ++ struct inode *new_parent, struct dentry *new_dentry ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ , unsigned flags ++#endif ++ ) + { + int err = 0, rc = VINF_SUCCESS; +@@ -755,4 +759,12 @@ + + TRACE(); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ if (flags) ++ { ++ LogFunc(("rename with flags=%x\n", flags)); ++ return -EINVAL; ++ } ++#endif + + if (sf_g != GET_GLOB_INFO(new_parent->i_sb)) +Index: src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -1050,6 +1050,12 @@ + rc = get_user_pages(R3Ptr, /* Where from. */ + cPages, /* How many pages. */ ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ fWrite ? FOLL_WRITE | /* Write to memory. */ ++ FOLL_FORCE /* force write access. */ ++ : 0, /* Write to memory. */ ++# else + fWrite, /* Write to memory. */ + fWrite, /* force write access. */ ++# endif + &pMemLnx->apPages[0], /* Page array. */ + papVMAs); /* vmas */ +@@ -1064,6 +1070,12 @@ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ fWrite ? FOLL_WRITE | /* Write to memory. */ ++ FOLL_FORCE /* force write access. */ ++ : 0, /* Write to memory. */ ++# else + fWrite, /* Write to memory. */ + fWrite, /* force write access. */ ++# endif + &pMemLnx->apPages[0], /* Page array. */ + papVMAs); /* vmas */ +@@ -1073,6 +1085,12 @@ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ fWrite ? FOLL_WRITE | /* Write to memory. */ ++ FOLL_FORCE /* force write access. */ ++ : 0, /* Write to memory. */ ++# else + fWrite, /* Write to memory. */ + fWrite, /* force write access. */ ++# endif + &pMemLnx->apPages[0], /* Page array. */ + papVMAs); /* vmas */ diff -Nru virtualbox-5.1.8-dfsg/debian/patches/old-python.patch virtualbox-5.1.8-dfsg/debian/patches/old-python.patch --- virtualbox-5.1.8-dfsg/debian/patches/old-python.patch 1970-01-01 00:00:00.000000000 +0000 +++ virtualbox-5.1.8-dfsg/debian/patches/old-python.patch 2016-11-04 08:58:36.000000000 +0000 @@ -0,0 +1,14 @@ +Description: Consider the old pyton in jessie as working +Author: Gianfranco Costamagna + +--- virtualbox-5.1.8-dfsg.orig/configure ++++ virtualbox-5.1.8-dfsg/configure +@@ -2114,7 +2114,7 @@ extern "C" int main(void) + } + EOF + found= +- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.5 python3.5m" ++ SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m" + for p in $PYTHONDIR; do + for d in $SUPPYTHONLIBS; do + for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do diff -Nru virtualbox-5.1.8-dfsg/debian/patches/series virtualbox-5.1.8-dfsg/debian/patches/series --- virtualbox-5.1.8-dfsg/debian/patches/series 2016-10-21 15:54:29.000000000 +0000 +++ virtualbox-5.1.8-dfsg/debian/patches/series 2016-11-16 09:18:28.000000000 +0000 @@ -16,3 +16,5 @@ 36-fix-vnc-version-string.patch fix-build.patch python3.patch +old-python.patch +linux-4.9-fix.patch