[packages/VirtualBox] - fix kernelmodule build for kernel 4.4.169 - rel 3

baggins baggins at pld-linux.org
Fri Dec 28 15:25:17 CET 2018


commit dce9c015acacd35e2af585d9adb904f81d4060b4
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 28 23:24:51 2018 +0900

    - fix kernelmodule build for kernel 4.4.169
    - rel 3

 VirtualBox.spec      |  4 +++-
 kernel-4.4.169.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index a825d32..d1f36d3 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -42,7 +42,7 @@ exit 1
 
 %define		qtver	5.6.0
 
-%define		rel		2
+%define		rel		3
 %define		pname		VirtualBox
 Summary:	VirtualBox - x86 hardware virtualizer
 Summary(pl.UTF-8):	VirtualBox - wirtualizator sprzętu x86
@@ -81,6 +81,7 @@ Patch13:	%{pname}-no-scrextend.patch
 Patch14:	%{pname}-multipython.patch
 Patch15:	%{pname}-lightdm-1.19.2.patch
 Patch16:	%{pname}-no-vboxvideo.patch
+Patch17:	kernel-4.4.169.patch
 URL:		http://www.virtualbox.org/
 %if %{with userspace}
 %ifarch %{x8664}
@@ -568,6 +569,7 @@ tar -zxf guest-modules.tar.gz -C GuestDrivers
 ../src/VBox/HostDrivers/linux/export_modules.sh --file host-modules.tar.gz --without-hardening
 tar -zxf host-modules.tar.gz -C HostDrivers
 cd -
+%patch17 -p1
 %endif
 
 # using system kBuild package
diff --git a/kernel-4.4.169.patch b/kernel-4.4.169.patch
new file mode 100644
index 0000000..5b475c5
--- /dev/null
+++ b/kernel-4.4.169.patch
@@ -0,0 +1,40 @@
+--- VirtualBox-6.0.0/PLD-MODULE-BUILD/HostDrivers/vboxdrv/r0drv/linux/memobj-r0drv-linux.c~	2018-12-28 14:24:08.000000000 +0100
++++ VirtualBox-6.0.0/PLD-MODULE-BUILD/HostDrivers/vboxdrv/r0drv/linux/memobj-r0drv-linux.c	2018-12-28 14:35:39.146820962 +0100
+@@ -1027,7 +1027,7 @@
+ 
+ /* openSUSE Leap 42.3 detection :-/ */
+ #if    LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) \
+-    && LINUX_VERSION_CODE <  KERNEL_VERSION(4, 6, 0) \
++    && LINUX_VERSION_CODE <  KERNEL_VERSION(4, 4, 169) \
+     && defined(FAULT_FLAG_REMOTE)
+ # define GET_USER_PAGES_API     KERNEL_VERSION(4, 10, 0) /* no typo! */
+ #else
+@@ -1113,7 +1113,7 @@
+                                 pTask->mm,              /* Whose pages. */
+                                 R3Ptr,                  /* Where from. */
+                                 cPages,                 /* How many pages. */
+-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)
++# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 169)
+                                 fWrite ? FOLL_WRITE |   /* Write to memory. */
+                                          FOLL_FORCE     /* force write access. */
+                                        : 0,             /* Write to memory. */
+--- VirtualBox-6.0.0/PLD-MODULE-BUILD/GuestDrivers/vboxguest/r0drv/linux/memobj-r0drv-linux.c~	2018-12-28 23:06:27.000000000 +0900
++++ VirtualBox-6.0.0/PLD-MODULE-BUILD/GuestDrivers/vboxguest/r0drv/linux/memobj-r0drv-linux.c	2018-12-28 23:17:25.075959807 +0900
+@@ -1027,7 +1027,7 @@
+ 
+ /* openSUSE Leap 42.3 detection :-/ */
+ #if    LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) \
+-    && LINUX_VERSION_CODE <  KERNEL_VERSION(4, 6, 0) \
++    && LINUX_VERSION_CODE <  KERNEL_VERSION(4, 4, 169) \
+     && defined(FAULT_FLAG_REMOTE)
+ # define GET_USER_PAGES_API     KERNEL_VERSION(4, 10, 0) /* no typo! */
+ #else
+@@ -1113,7 +1113,7 @@
+                                 pTask->mm,              /* Whose pages. */
+                                 R3Ptr,                  /* Where from. */
+                                 cPages,                 /* How many pages. */
+-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)
++# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 169)
+                                 fWrite ? FOLL_WRITE |   /* Write to memory. */
+                                          FOLL_FORCE     /* force write access. */
+                                        : 0,             /* Write to memory. */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/dce9c015acacd35e2af585d9adb904f81d4060b4



More information about the pld-cvs-commit mailing list