commit f45f6e102cf9bab0e3e95ec78df2cfbe8074bcd8
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Sep 10 02:46:29 2020 +0100
Fixes for kernel 4.9
VirtualBox.spec | 9 +++++--
fixes_for_5.9_withoutdrm.patch | 58 ++++++++++++++++++++++++++++++++++++++++++
update_vbox.sh | 6 +----
3 files changed, 66 insertions(+), 7 deletions(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index f878e48..8e79065 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -46,7 +46,7 @@
Name: VirtualBox
Version: 6.1.14
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A general-purpose full virtualizer for PC hardware
License: GPLv2 or (GPLv2 and CDDL)
@@ -95,6 +95,7 @@ Patch70: vbox-python-detection.diff
Patch80: VirtualBox-6.1.4-gcc10.patch
Patch86: VirtualBox-6.1.0-VBoxRem.patch
+Patch88: fixes_for_5.9_withoutdrm.patch
BuildRequires: kBuild >= 0.1.9998.r3093
@@ -312,7 +313,7 @@ rm -r src/VBox/Additions/3D/mesa/mesa-17.3.9/
# src/VBox/GuestHost/OpenGL/include/GL/glext.h have VBOX definitions
#rm -r src/VBox/GuestHost/OpenGL/include/GL
-#rm -rf src/libs/liblzf-3.4/
+#rm -r src/libs/liblzf-3.*/
rm -r src/libs/libpng-1.6.*/
rm -r src/libs/libxml2-2.9.*/
rm -r src/libs/openssl-1.*/
@@ -341,6 +342,7 @@ rm -r src/libs/zlib-1.2.*/
%patch70 -p1 -b .python-detection
%patch80 -p1 -b .gcc10
%patch86 -p1 -b .vboxrem
+%patch88 -p1 -b .kernel-4.9
%build
@@ -894,6 +896,9 @@ getent passwd vboxadd >/dev/null || \
%{_datadir}/%{name}-kmod-%{version}
%changelog
+* Thu Sep 10 2020 Sérgio Basto <sergio(a)serjux.com> - 6.1.14-3
+- Fixes for kernel 4.9
+
* Tue Sep 08 2020 Sérgio Basto <sergio(a)serjux.com> - 6.1.14-2
- Update to VirtualBox-6.1.14a rfbz (#5747)
diff --git a/fixes_for_5.9_withoutdrm.patch b/fixes_for_5.9_withoutdrm.patch
new file mode 100644
index 0000000..5dc00b0
--- /dev/null
+++ b/fixes_for_5.9_withoutdrm.patch
@@ -0,0 +1,58 @@
+This patch file contains the changes needed to compile the VirtualBox
+modules for kernel 5.9.0+.
+
+The changes are as follows:
+1. The kernel headers no longer define HAVE_UNLOCKED_IOCTL; however,
+ this symbol is needed for compilation of VB.
+2. The calling sequence for get_user_pages_remote() is changed.
+3. Routine sched_setscheduler() is replaced by sched_set_fifo_low().
+4. The type of vbox_master_set() is changed from int to void.
+5. Routine drm_gem_object_put_unlocked() is replaced by drm_gem_object_put().
+6. Member offset is removed from struct ttm_buffer_object.
+
+Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+===================================================================
+--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
++++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+@@ -137,7 +137,10 @@
+ #include <linux/interrupt.h>
+ #include <linux/completion.h>
+ #include <linux/compiler.h>
+-#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
++#if RTLNX_VER_MIN(5, 9, 0)
++#define HAVE_UNLOCKED_IOCTL 1 /* defined in linux/fs.h for kernels before 5.9 */
++#endif
++#ifndef HAVE_UNLOCKED_IOCTL
+ # include <linux/smp_lock.h>
+ #endif
+ /* For the shared folders module */
+===================================================================
+--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
++++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+@@ -1181,7 +1181,9 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
+ */
+ else
+ rc = get_user_pages_remote(
++#if RTLNX_VER_MAX(5, 9, 0)
+ pTask, /* Task for fault accounting.
*/
++#endif
+ pTask->mm, /* Whose pages. */
+ R3Ptr, /* Where from. */
+ cPages, /* How many pages. */
+Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
+===================================================================
+--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
++++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
+@@ -92,8 +92,12 @@ DECLHIDDEN(int) rtThreadNativeSetPriorit
+ return VERR_INVALID_PARAMETER;
+ }
+
++#if RTLNX_VER_MAX(5, 9, 0)
+ sched_setscheduler(current, iSchedClass, &Param);
+ #else
++ sched_set_fifo_low(current);
++#endif
++#else
+ RT_NOREF_PV(enmType);
+ #endif
+ RT_NOREF_PV(pThread);
diff --git a/update_vbox.sh b/update_vbox.sh
index 0faaa5a..01c7eda 100755
--- a/update_vbox.sh
+++ b/update_vbox.sh
@@ -1,5 +1,5 @@
VERSION=6.1.14
-REL=2
+REL=3
RAWHIDE=34
REPOS="f33 f32 f31 el8 el7"
if [ -z "$1" ]
@@ -28,11 +28,7 @@ fi
if test $stage -le 1
then
echo STAGE 1
-if test $REL -eq 1
-then
-echo Press enter to upload sources; read dummy;
rfpkg ci -c && git show
-fi
echo Press enter to push and build on rawhide; read dummy;
rfpkg push && rfpkg build --nowait
fi
Show replies by date