From fadfe8ba5d3add34f0ca1943a46e9bc78bbc9995c9d196d5eeb5406064502123 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 22 Nov 2017 16:53:50 +0000 Subject: [PATCH] - Remove file "fix_KMS_support.patch" - Fixed upstream Add new patch file "fixes_for_4.15.patch". Modified vboxconfig.sh to issue a warning when there is a version mismatch rather than abort. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=384 --- fix_KMS_support.patch | 14 -------------- fixes_for_4.15.patch | 15 +++++++++++++++ vboxconfig.sh | 8 +++----- virtualbox.changes | 7 +++++++ virtualbox.spec | 15 +++++++++------ 5 files changed, 34 insertions(+), 25 deletions(-) delete mode 100644 fix_KMS_support.patch create mode 100644 fixes_for_4.15.patch diff --git a/fix_KMS_support.patch b/fix_KMS_support.patch deleted file mode 100644 index c5d39c9..0000000 --- a/fix_KMS_support.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: VirtualBox-5.1.22/src/VBox/Additions/linux/drm/vbox_fb.c -=================================================================== ---- VirtualBox-5.1.22.orig/src/VBox/Additions/linux/drm/vbox_fb.c -+++ VirtualBox-5.1.22/src/VBox/Additions/linux/drm/vbox_fb.c -@@ -409,6 +409,9 @@ static void vbox_fbdev_destroy(struct dr - LogFunc(("vboxvideo: %d\n", __LINE__)); - if (fbdev->helper.fbdev) { - info = fbdev->helper.fbdev; -+#ifdef CONFIG_FB_DEFERRED_IO -+ fb_deferred_io_cleanup(info); -+#endif - unregister_framebuffer(info); - if (info->cmap.len) - fb_dealloc_cmap(&info->cmap); diff --git a/fixes_for_4.15.patch b/fixes_for_4.15.patch new file mode 100644 index 0000000..aecbc56 --- /dev/null +++ b/fixes_for_4.15.patch @@ -0,0 +1,15 @@ +Index: VirtualBox-5.1.30/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c +=================================================================== +--- VirtualBox-5.1.30.orig/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c ++++ VirtualBox-5.1.30/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c +@@ -1584,7 +1584,9 @@ RTDECL(int) RTTimerCreateEx(PRTTIMER *pp + else + #endif + { +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) ++ __init_timer(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer, TIMER_PINNED); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) + init_timer_pinned(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer); + #else + init_timer(&pTimer->aSubTimers[iCpu].u.Std.LnxTimer); diff --git a/vboxconfig.sh b/vboxconfig.sh index a5a7eb8..18efcb4 100644 --- a/vboxconfig.sh +++ b/vboxconfig.sh @@ -21,16 +21,14 @@ fi # Check if virtualbox-host-source is installed, quit if not if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then echo "Sources for building host modules are not present," - echo "Use 'sudo zypper install virtualbox-host-source' to install them. Quitting .." + echo "Use 'sudo zypper install virtualbox-host-source kernel_devel' to install them. Quitting .." exit 1 fi # # Check if virtualbox-host-source version matches virtualbox version if [ "$(rpm -q virtualbox virtualbox-host-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then - echo "virtualbox-host-source package version doesn't match" - echo "the version of virtualbox package." - echo "Reinstall virtualbox-host-source package. Quitting .." - exit 1 + echo "virtualbox-host-source package version doesn't match the version of virtualbox package." + echo "This situation is probably not fatal, thus we will try to continue .." fi # Prerequisites are available, start build pushd $SOURCE > /dev/null 2>&1 diff --git a/virtualbox.changes b/virtualbox.changes index 61a8173..52e9ffb 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 22 16:39:22 UTC 2017 - Larry.Finger@lwfinger.net + +- Remove file "fix_KMS_support.patch" - Fixed upstream + Add new patch file "fixes_for_4.15.patch". + Modified vboxconfig.sh to issue a warning when there is a version mismatch rather than abort. + ------------------------------------------------------------------- Sat Nov 11 03:40:07 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 76bb319..2854db6 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -103,8 +103,8 @@ Patch114: fixes_for_4.14.patch Patch115: vbox_fix_for_gcc7.patch # Fix for missing include needed for server 1.19 Patch116: Fix_for_server_1.19.patch -# Fix for missing cleanup in KMS support -Patch117: fix_KMS_support.patch +# Fix for removal of init_timer_pinned() in kernel 4.15 +Patch117: fixes_for_4.15.patch # Fix invalid use of internal headers Patch118: internal-headers.patch # Fix kernl API change in Leap 15 @@ -124,6 +124,7 @@ BuildRequires: libboost_headers-devel %else BuildRequires: boost-devel %endif +BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: dev86 BuildRequires: device-mapper-devel BuildRequires: dmidecode @@ -135,7 +136,7 @@ BuildRequires: glibc-devel-static BuildRequires: gsoap-devel BuildRequires: java-devel >= 1.6.0 BuildRequires: kbuild >= 0.1.9998svn2808 -BuildRequires: kernel-syms +#BuildRequires: kernel-syms BuildRequires: libcap-devel BuildRequires: libcurl-devel BuildRequires: libelf-devel @@ -244,9 +245,9 @@ websrv GUI part for %{name}. %package host-KMP Summary: Host kernel module for VirtualBox +#%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv Group: System/Emulators/PC -%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv -Requires: kernel-devel +Requires: %{kernel_module_package_buildreqs} %description host-KMP This package contains the kernel-module for VirtualBox. @@ -256,7 +257,7 @@ This package contains the kernel-module for VirtualBox. Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC %kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen pae xenpae pv -Requires: kernel-devel +Requires: %{kernel_module_package_buildreqs} %description guest-KMP This package contains the kernel-module for VirtualBox. @@ -325,6 +326,8 @@ Summary: Source files for %{name} host kernel modules Group: Development/Sources Requires: %{name} = %{version} Requires: gcc +Requires: kernel-devel +Requires: libelf-devel Requires: make BuildArch: noarch