From 9cc43327124fe3606283af958643662d95f3df0444ee9cf66a6a46892bc96180 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 4 Mar 2017 05:07:22 +0000 Subject: [PATCH 1/4] - Fix for missing global in vboxsf that prevented mounting shared folders for kernel 4.10. This change is the fix for bsc #1027967. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=315 --- vbox_fix_4.10_api_changes.patch | 34 ++++++--------------------------- virtualbox.changes | 6 ++++++ 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/vbox_fix_4.10_api_changes.patch b/vbox_fix_4.10_api_changes.patch index 5993884..0daa282 100644 --- a/vbox_fix_4.10_api_changes.patch +++ b/vbox_fix_4.10_api_changes.patch @@ -3,35 +3,13 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c =================================================================== --- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/lnkops.c +++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c -@@ -88,6 +88,31 @@ static const char *sf_get_link(struct de - } - # endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) */ +@@ -90,7 +90,9 @@ static const char *sf_get_link(struct de -+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) -+/* -+ * A helper for ->readlink(). This should be used *ONLY* for symlinks that -+ * have ->get_link() not calling nd_jump_link(). Using (or not using) it -+ * for any given inode is up to filesystem. -+ */ -+static int generic_readlink(struct dentry *dentry, char __user *buffer, -+ int buflen) -+{ -+ DEFINE_DELAYED_CALL(done); -+ struct inode *inode = d_inode(dentry); -+ const char *link = inode->i_link; -+ int res; -+ -+ if (!link) { -+ link = inode->i_op->get_link(dentry, inode, &done); -+ if (IS_ERR(link)) -+ return PTR_ERR(link); -+ } -+ res = readlink_copy(buffer, buflen, link); -+ do_delayed_call(&done); -+ return res; -+} -+#endif -+ struct inode_operations sf_lnk_iops = { ++# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) .readlink = generic_readlink, ++#endif + # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) + .get_link = sf_get_link + # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) diff --git a/virtualbox.changes b/virtualbox.changes index d290781..61f4f0b 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 4 05:00:03 UTC 2017 - Larry.Finger@lwfinger.net + +- Fix for missing global in vboxsf that prevented mounting shared folders + for kernel 4.10. This change is the fix for bsc #1027967. + ------------------------------------------------------------------- Tue Feb 28 21:06:30 UTC 2017 - dimstar@opensuse.org From 5ebf5a7f37805ace3de7972d437523f016a6342834397b5c03cdbbec613ad1fe Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 8 Mar 2017 21:20:56 +0000 Subject: [PATCH 2/4] - Fix API changes for kernel 4.11. This change adds file "vbox_fix_4.11_api_changes.patch". Make some changes to various script files to remove reference to run level 4, which is not used. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=316 --- vbox-vboxadd-init-script.diff | 78 ++++++++++++++++++ vbox_fix_4.11_api_changes.patch | 139 ++++++++++++++++++++++++++++++++ virtualbox.changes | 6 ++ virtualbox.spec | 3 + 4 files changed, 226 insertions(+) create mode 100644 vbox_fix_4.11_api_changes.patch diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index c2600aa..023805d 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -183,3 +183,81 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh +@@ -20,7 +20,7 @@ + # Provides: vboxadd-service + # Required-Start: vboxadd + # Required-Stop: vboxadd +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: VirtualBox Additions Service + ### END INIT INFO +Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxautostart-service.sh ++++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh +@@ -20,7 +20,7 @@ + # Provides: vboxautostart-service + # Required-Start: vboxdrv + # Required-Stop: vboxdrv +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: VirtualBox autostart service + ### END INIT INFO +Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh ++++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh +@@ -20,7 +20,7 @@ + # Provides: vboxballoonctrl-service + # Required-Start: vboxdrv + # Required-Stop: vboxdrv +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: VirtualBox watchdog daemon + ### END INIT INFO +Index: VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh ++++ VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +@@ -31,7 +31,7 @@ + # Provides: testboxscript-service + # Required-Start: $network + # Required-Stop: +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: TestBoxScript service + ### END INIT INFO +Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh ++++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +@@ -31,7 +31,7 @@ + # Provides: vboxtxs + # Required-Start: $network + # Required-Stop: +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: VirtualBox Test Execution Service + ### END INIT INFO +Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh ++++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +@@ -31,7 +31,7 @@ + # Provides: vboxtxs + # Required-Start: $network + # Required-Stop: +-# Default-Start: 2 3 4 5 ++# Default-Start: 2 3 5 + # Default-Stop: 0 1 6 + # Description: VirtualBox Test Execution Service + ### END INIT INFO diff --git a/vbox_fix_4.11_api_changes.patch b/vbox_fix_4.11_api_changes.patch new file mode 100644 index 0000000..543cced --- /dev/null +++ b/vbox_fix_4.11_api_changes.patch @@ -0,0 +1,139 @@ +Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c ++++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c +@@ -40,8 +40,9 @@ + #include + + #include "internal/magics.h" +- +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#endif + /********************************************************************************************************************************* + * Structures and Typedefs * + *********************************************************************************************************************************/ +@@ -206,7 +207,7 @@ static int rtSemMutexLinuxRequestSleep(P + break; + + /* Go to sleep. */ +- set_task_state(pSelf, fInterruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); ++ set_current_state(fInterruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); + spin_unlock_irq(&pThis->Spinlock); + + lTimeout = schedule_timeout(lTimeout); +Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c ++++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c +@@ -32,6 +32,9 @@ + #include "the-linux-kernel.h" + #include "internal/iprt.h" + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#endif + + #include + #include +Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c ++++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c +@@ -35,6 +35,10 @@ + #include + #include + #include "internal/thread.h" ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#include ++#endif + + + RTDECL(RTTHREAD) RTThreadSelf(void) +Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c ++++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c +@@ -38,11 +38,13 @@ + #include + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#endif + + #include "waitqueue-r0drv-linux.h" + #include "internal/magics.h" + +- + /********************************************************************************************************************************* + * Structures and Typedefs * + *********************************************************************************************************************************/ +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/utils.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/utils.c ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/utils.c +@@ -290,8 +290,15 @@ sf_dentry_revalidate(struct dentry *dent + has inode at all) from these new attributes we derive [kstat] via + [generic_fillattr] */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++int sf_getattr(const struct path *path, struct kstat *kstat, ++ u32 request_mask, unsigned int flags) ++{ ++ struct dentry *dentry = path->dentry; ++#else + int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat) + { ++#endif + int err; + + TRACE(); +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/vfsmod.h +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/vfsmod.h ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/vfsmod.h +@@ -100,8 +100,13 @@ extern int sf_stat(const char *caller, + SHFLSTRING *path, PSHFLFSOBJINFO result, int ok_to_fail); + extern int sf_inode_revalidate(struct dentry *dentry); + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) +-extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, +- struct kstat *kstat); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++extern int sf_getattr(const struct path *path, struct kstat *kstat, ++ u32 request_mask, unsigned int flags); ++#else ++extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, ++ struct kstat *kstat); ++#endif + extern int sf_setattr(struct dentry *dentry, struct iattr *iattr); + #endif + extern int sf_path_from_dentry(const char *caller, struct sf_glob_info *sf_g, +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/regops.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/regops.c ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/regops.c +@@ -445,7 +445,11 @@ static int sf_reg_release(struct inode * + } + + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++static int sf_reg_fault(struct vm_fault *vmf) ++#else + static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ++#endif + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) + static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type) + # define SET_TYPE(t) *type = (t) +@@ -459,6 +463,9 @@ static struct page *sf_reg_nopage(struct + loff_t off; + uint32_t nread = PAGE_SIZE; + int err; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++ struct vm_area_struct *vma = vmf->vma; ++#endif + struct file *file = vma->vm_file; + struct inode *inode = GET_F_DENTRY(file)->d_inode; + struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb); diff --git a/virtualbox.changes b/virtualbox.changes index 61f4f0b..07ddb06 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 8 21:18:08 UTC 2017 - Larry.Finger@lwfinger.net + +- Fix API changes for kernel 4.11. This change adds file "vbox_fix_4.11_api_changes.patch". + Make some changes to various script files to remove reference to run level 4, which is not used. + ------------------------------------------------------------------- Sat Mar 4 05:00:03 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 976f763..69c9871 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -94,6 +94,8 @@ Patch113: vbox_remove_smp_mflags.patch Patch116: Fix_for_server_1.19.patch # Patch117: vbox_fix_4.10_api_changes.patch +# Fix kernel 4.11 API changes +Patch118: vbox_fix_4.11_api_changes.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -338,6 +340,7 @@ This package contains icons for guest desktop files that were created on the des %patch113 -p1 %patch116 -p1 %patch117 -p1 +%patch118 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf From 8d6f50e5ae7e2fb0a6d70a0f9667417d9d106d0666c377739c00f378fffb7783 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 9 Mar 2017 18:59:35 +0000 Subject: [PATCH 3/4] - Removed "vbox_fix_4.10_api_changes.patch" - fixed upstream Removed "vbox_fix_4.11_api_changes.patch" - fixed upstream - Version bump to 5.1.16 (released 2017-03-08 by Oracle) This is a maintenance release. The following items were fixed and/or added: VMM: don't access the MSR_IA32_SMM_MONITOR_CTL MSR if dual-monitor treatment is not available (KVM workaround, bug #14965) VMM: another fix for handling certain MSRs on ancient CPUs without VT-x support for MSR bitmaps VMM: fixed VERR_SSM_LOAD_CPUID_MISMATCH errors when restoring a saved state with SMP guests on hosts without the CPUID/HTT bit set (bug #16428) VMM: fixed a bug in call gate emulation VMM: FWAIT instruction fix VMM: fixed a sporadic guest hang under certain conditions GUI: hide the mini-toolbar from the taskbar and the pager on certain X11 hosts GUI: better error handling on the global settings / network / host-only / DHCP server settings GUI: fixes for full-screen with multiple screens Host-only Network: fixed host-only adapter creation issue preventing VirtualBox installation on Windows 10 hosts (bug #16379) NAT network: fixed two potential crashes in the DHCP server ICH9: fixed incorrect initialization of the primary bus for PCI bridges (5.1.14 regression) Storage: LsiLogic fix for Windows 10 USB: fixed not being able to attach certain USB devices having invalid characters in the device strings (5.0.18 regression; bug #15956) USB: several fixes for the USB/IP support (bug #16462) VBoxSVC: fixed another crash during shutdown under rare circumstances VBoxSVC: fixed a stack overflow on (Windows debug builds only; bug #16409) OVF: when importing an appliance handle more than 10 network adapters if the OVA was created by VirtualBox (bug #16401) OVF: fixes for exporting and importing appliances with many disks (bug #16402) VBoxManage: fixed regression with modifyhd --resize (bug #16311) rdesktop-vrdp: source code tarball fixes Linux Installers: do not rebuild kernel modules unnecessarily (bug #16408) Linux hosts: added an action for opening the VM manager window to the .desktop file Linux hosts / guests: Linux 4.11 compile fixes (bug #16506) Linux Additions: added vboxsf FS modules alias (bug #16404) Linux Additions: fix for the shared folders kernel module to compile on Linux 4.10 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=317 --- UserManual.pdf | 4 +-- vbox-vboxdrv-init-script.diff | 11 +++--- vbox_fix_4.11_api_changes.patch | 64 +++++++++++++++++++++++++++++++++ vbox_remove_smp_mflags.patch | 20 +++++------ virtualbox.changes | 39 ++++++++++++++++++++ virtualbox.spec | 9 +---- 6 files changed, 121 insertions(+), 26 deletions(-) diff --git a/UserManual.pdf b/UserManual.pdf index b9d761f..139d788 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:40d625bf41b86bc7c6c6895e29c0ce50e5dd0697bf18b56c5b810eeeb3a912a4 -size 4357657 +oid sha256:e70059d634b8003dd17f751b36928a5ada8448b11c19dfe69472087d3137eb8a +size 4362838 diff --git a/vbox-vboxdrv-init-script.diff b/vbox-vboxdrv-init-script.diff index d36c5d0..40cbf6f 100644 --- a/vbox-vboxdrv-init-script.diff +++ b/vbox-vboxdrv-init-script.diff @@ -1,7 +1,7 @@ -Index: VirtualBox-5.1.4/src/VBox/Installer/linux/vboxdrv.sh +Index: VirtualBox-5.1.16/src/VBox/Installer/linux/vboxdrv.sh =================================================================== ---- VirtualBox-5.1.4.orig/src/VBox/Installer/linux/vboxdrv.sh -+++ VirtualBox-5.1.4/src/VBox/Installer/linux/vboxdrv.sh +--- VirtualBox-5.1.16.orig/src/VBox/Installer/linux/vboxdrv.sh ++++ VirtualBox-5.1.16/src/VBox/Installer/linux/vboxdrv.sh @@ -19,11 +19,12 @@ # ### BEGIN INIT INFO @@ -19,7 +19,7 @@ Index: VirtualBox-5.1.4/src/VBox/Installer/linux/vboxdrv.sh ### END INIT INFO ## @todo This file duplicates a lot of script with vboxadd.sh. When making -@@ -258,13 +259,6 @@ start() +@@ -261,13 +262,6 @@ start() fi fi # ensure permissions @@ -33,12 +33,11 @@ Index: VirtualBox-5.1.4/src/VBox/Installer/linux/vboxdrv.sh if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" fi -@@ -395,36 +389,8 @@ cleanup() +@@ -387,35 +381,8 @@ cleanup() # setup_script setup() { - begin_msg "Building VirtualBox kernel modules" console -- cleanup - if ! $BUILDINTMP \ - --save-module-symvers /tmp/vboxdrv-Module.symvers \ - --module-source "$MODULE_SRC/vboxdrv" \ diff --git a/vbox_fix_4.11_api_changes.patch b/vbox_fix_4.11_api_changes.patch index 543cced..1973597 100644 --- a/vbox_fix_4.11_api_changes.patch +++ b/vbox_fix_4.11_api_changes.patch @@ -137,3 +137,67 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/regops.c struct file *file = vma->vm_file; struct inode *inode = GET_F_DENTRY(file)->d_inode; struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb); +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_drv.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.c ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_drv.c +@@ -45,6 +45,11 @@ + /* + * Authors: Dave Airlie + */ ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#include ++#endif + #include "vbox_drv.h" + + #include +@@ -57,7 +62,6 @@ + + #include + #include +- + int vbox_modeset = -1; + + MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); +Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h ++++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +@@ -31,8 +31,11 @@ + * Include iprt/types.h to install the bool wrappers. + * Then use the linux bool type for all the stuff include here. + */ ++#include + #include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) + #define bool linux_bool ++#endif + + #if RT_GNUC_PREREQ(4, 6) + # pragma GCC diagnostic push +@@ -44,7 +47,6 @@ + # endif + #endif + +-#include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + # include + #else +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_fb.c +=================================================================== +--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/drm/vbox_fb.c ++++ VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_fb.c +@@ -46,6 +46,11 @@ + * Authors: Dave Airlie + */ + /* Include from most specific to most general to be able to override things. */ ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#include ++#endif + #include "vbox_drv.h" + #include + #include diff --git a/vbox_remove_smp_mflags.patch b/vbox_remove_smp_mflags.patch index 61bb787..7844159 100644 --- a/vbox_remove_smp_mflags.patch +++ b/vbox_remove_smp_mflags.patch @@ -1,26 +1,26 @@ -Index: VirtualBox-5.1.8/src/libs/libxml2-2.9.2/libxml.spec.in +Index: VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml.spec.in =================================================================== ---- VirtualBox-5.1.8.orig/src/libs/libxml2-2.9.2/libxml.spec.in -+++ VirtualBox-5.1.8/src/libs/libxml2-2.9.2/libxml.spec.in -@@ -69,7 +69,7 @@ at parse time or later once the document +--- VirtualBox-5.1.16.orig/src/libs/libxml2-2.9.4/libxml.spec.in ++++ VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml.spec.in +@@ -94,7 +94,7 @@ at parse time or later once the document %build %configure -make %{_smp_mflags} -+make ++make %install rm -fr %{buildroot} -Index: VirtualBox-5.1.8/src/libs/libxml2-2.9.2/libxml2.spec +Index: VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml2.spec =================================================================== ---- VirtualBox-5.1.8.orig/src/libs/libxml2-2.9.2/libxml2.spec -+++ VirtualBox-5.1.8/src/libs/libxml2-2.9.2/libxml2.spec -@@ -69,7 +69,7 @@ at parse time or later once the document +--- VirtualBox-5.1.16.orig/src/libs/libxml2-2.9.4/libxml2.spec ++++ VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml2.spec +@@ -94,7 +94,7 @@ at parse time or later once the document %build %configure -make %{_smp_mflags} -+make ++make %install rm -fr %{buildroot} diff --git a/virtualbox.changes b/virtualbox.changes index 07ddb06..a672518 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Thu Mar 9 18:54:31 UTC 2017 - Larry.Finger@lwfinger.net + +- Removed "vbox_fix_4.10_api_changes.patch" - fixed upstream + Removed "vbox_fix_4.11_api_changes.patch" - fixed upstream + +- Version bump to 5.1.16 (released 2017-03-08 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + + VMM: don't access the MSR_IA32_SMM_MONITOR_CTL MSR if dual-monitor treatment is not available (KVM workaround, bug #14965) + VMM: another fix for handling certain MSRs on ancient CPUs without VT-x support for MSR bitmaps + VMM: fixed VERR_SSM_LOAD_CPUID_MISMATCH errors when restoring a saved state with SMP guests on hosts without the CPUID/HTT bit set (bug #16428) + VMM: fixed a bug in call gate emulation + VMM: FWAIT instruction fix + VMM: fixed a sporadic guest hang under certain conditions + GUI: hide the mini-toolbar from the taskbar and the pager on certain X11 hosts + GUI: better error handling on the global settings / network / host-only / DHCP server settings + GUI: fixes for full-screen with multiple screens + Host-only Network: fixed host-only adapter creation issue preventing VirtualBox installation on Windows 10 hosts (bug #16379) + NAT network: fixed two potential crashes in the DHCP server + ICH9: fixed incorrect initialization of the primary bus for PCI bridges (5.1.14 regression) + Storage: LsiLogic fix for Windows 10 + USB: fixed not being able to attach certain USB devices having invalid characters in the device strings (5.0.18 regression; bug #15956) + USB: several fixes for the USB/IP support (bug #16462) + VBoxSVC: fixed another crash during shutdown under rare circumstances + VBoxSVC: fixed a stack overflow on (Windows debug builds only; bug #16409) + OVF: when importing an appliance handle more than 10 network adapters if the OVA was created by VirtualBox (bug #16401) + OVF: fixes for exporting and importing appliances with many disks (bug #16402) + VBoxManage: fixed regression with modifyhd --resize (bug #16311) + rdesktop-vrdp: source code tarball fixes + Linux Installers: do not rebuild kernel modules unnecessarily (bug #16408) + Linux hosts: added an action for opening the VM manager window to the .desktop file + Linux hosts / guests: Linux 4.11 compile fixes (bug #16506) + Linux Additions: added vboxsf FS modules alias (bug #16404) + Linux Additions: fix for the shared folders kernel module to compile on Linux 4.10 + Linux Additions: properly install the Linux kernel module override rule on distributions without /etc/depmod.d + Windows Additions: fixed a crash with recent Windows 10 builds if 3D is disabled (bug #15973) + ------------------------------------------------------------------- Wed Mar 8 21:18:08 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 69c9871..67ccdd4 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -22,7 +22,7 @@ %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_sysconfdir}/udev/rules.d Name: virtualbox -Version: 5.1.14 +Version: 5.1.16 Release: 0 Summary: VirtualBox is an Emulator License: GPL-2.0+ @@ -93,10 +93,6 @@ Patch113: vbox_remove_smp_mflags.patch # Fix for missing include needed for server 1.19 Patch116: Fix_for_server_1.19.patch # -Patch117: vbox_fix_4.10_api_changes.patch -# Fix kernel 4.11 API changes -Patch118: vbox_fix_4.11_api_changes.patch -# BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel BuildRequires: acpica @@ -138,7 +134,6 @@ BuildRequires: update-desktop-files BuildRequires: which BuildRequires: xorg-x11 BuildRequires: xorg-x11-server -#BuildRequires: xorg-x11-server > 7.6_1.18.4-2.1 BuildRequires: xorg-x11-server-sdk BuildRequires: yasm BuildRequires: zlib-devel-static @@ -339,8 +334,6 @@ This package contains icons for guest desktop files that were created on the des %patch112 -p1 %patch113 -p1 %patch116 -p1 -%patch117 -p1 -%patch118 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf From 4be1f2dff3986fef35dd61a1250cf7caf554c971a55bf807c3e648501c58754e Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 9 Mar 2017 19:01:36 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=318 --- VirtualBox-5.1.14-patched.tar.bz2 | 3 - VirtualBox-5.1.16-patched.tar.bz2 | 3 + vbox_fix_4.10_api_changes.patch | 15 --- vbox_fix_4.11_api_changes.patch | 203 ------------------------------ 4 files changed, 3 insertions(+), 221 deletions(-) delete mode 100644 VirtualBox-5.1.14-patched.tar.bz2 create mode 100644 VirtualBox-5.1.16-patched.tar.bz2 delete mode 100644 vbox_fix_4.10_api_changes.patch delete mode 100644 vbox_fix_4.11_api_changes.patch diff --git a/VirtualBox-5.1.14-patched.tar.bz2 b/VirtualBox-5.1.14-patched.tar.bz2 deleted file mode 100644 index 7e71d0f..0000000 --- a/VirtualBox-5.1.14-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68f9019043e4ae409b357fc65c67dcc41b3afdfc09de4442b988f4d8dfb6e544 -size 80296668 diff --git a/VirtualBox-5.1.16-patched.tar.bz2 b/VirtualBox-5.1.16-patched.tar.bz2 new file mode 100644 index 0000000..002696e --- /dev/null +++ b/VirtualBox-5.1.16-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b3034fcf52cf92f9f7db21882f2e438fefa48ca173852923e4e88f10c3a645e +size 80996784 diff --git a/vbox_fix_4.10_api_changes.patch b/vbox_fix_4.10_api_changes.patch deleted file mode 100644 index 0daa282..0000000 --- a/vbox_fix_4.10_api_changes.patch +++ /dev/null @@ -1,15 +0,0 @@ - -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/lnkops.c -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c -@@ -90,7 +90,9 @@ static const char *sf_get_link(struct de - - struct inode_operations sf_lnk_iops = - { -+# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) - .readlink = generic_readlink, -+#endif - # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) - .get_link = sf_get_link - # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) diff --git a/vbox_fix_4.11_api_changes.patch b/vbox_fix_4.11_api_changes.patch deleted file mode 100644 index 1973597..0000000 --- a/vbox_fix_4.11_api_changes.patch +++ /dev/null @@ -1,203 +0,0 @@ -Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c -+++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c -@@ -40,8 +40,9 @@ - #include - - #include "internal/magics.h" -- -- -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#endif - /********************************************************************************************************************************* - * Structures and Typedefs * - *********************************************************************************************************************************/ -@@ -206,7 +207,7 @@ static int rtSemMutexLinuxRequestSleep(P - break; - - /* Go to sleep. */ -- set_task_state(pSelf, fInterruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); -+ set_current_state(fInterruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); - spin_unlock_irq(&pThis->Spinlock); - - lTimeout = schedule_timeout(lTimeout); -Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c -+++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c -@@ -32,6 +32,9 @@ - #include "the-linux-kernel.h" - #include "internal/iprt.h" - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#endif - - #include - #include -Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c -+++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c -@@ -35,6 +35,10 @@ - #include - #include - #include "internal/thread.h" -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#include -+#endif - - - RTDECL(RTTHREAD) RTThreadSelf(void) -Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c -+++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c -@@ -38,11 +38,13 @@ - #include - #include - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#endif - - #include "waitqueue-r0drv-linux.h" - #include "internal/magics.h" - -- - /********************************************************************************************************************************* - * Structures and Typedefs * - *********************************************************************************************************************************/ -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/utils.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/utils.c -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/utils.c -@@ -290,8 +290,15 @@ sf_dentry_revalidate(struct dentry *dent - has inode at all) from these new attributes we derive [kstat] via - [generic_fillattr] */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+int sf_getattr(const struct path *path, struct kstat *kstat, -+ u32 request_mask, unsigned int flags) -+{ -+ struct dentry *dentry = path->dentry; -+#else - int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat) - { -+#endif - int err; - - TRACE(); -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/vfsmod.h -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/vfsmod.h -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/vfsmod.h -@@ -100,8 +100,13 @@ extern int sf_stat(const char *caller, - SHFLSTRING *path, PSHFLFSOBJINFO result, int ok_to_fail); - extern int sf_inode_revalidate(struct dentry *dentry); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) --extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, -- struct kstat *kstat); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+extern int sf_getattr(const struct path *path, struct kstat *kstat, -+ u32 request_mask, unsigned int flags); -+#else -+extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, -+ struct kstat *kstat); -+#endif - extern int sf_setattr(struct dentry *dentry, struct iattr *iattr); - #endif - extern int sf_path_from_dentry(const char *caller, struct sf_glob_info *sf_g, -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/regops.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/regops.c -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/regops.c -@@ -445,7 +445,11 @@ static int sf_reg_release(struct inode * - } - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+static int sf_reg_fault(struct vm_fault *vmf) -+#else - static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf) -+#endif - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) - static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type) - # define SET_TYPE(t) *type = (t) -@@ -459,6 +463,9 @@ static struct page *sf_reg_nopage(struct - loff_t off; - uint32_t nread = PAGE_SIZE; - int err; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+ struct vm_area_struct *vma = vmf->vma; -+#endif - struct file *file = vma->vm_file; - struct inode *inode = GET_F_DENTRY(file)->d_inode; - struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb); -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_drv.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.c -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_drv.c -@@ -45,6 +45,11 @@ - /* - * Authors: Dave Airlie - */ -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#include -+#endif - #include "vbox_drv.h" - - #include -@@ -57,7 +62,6 @@ - - #include - #include -- - int vbox_modeset = -1; - - MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); -Index: VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h -+++ VirtualBox-5.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h -@@ -31,8 +31,11 @@ - * Include iprt/types.h to install the bool wrappers. - * Then use the linux bool type for all the stuff include here. - */ -+#include - #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) - #define bool linux_bool -+#endif - - #if RT_GNUC_PREREQ(4, 6) - # pragma GCC diagnostic push -@@ -44,7 +47,6 @@ - # endif - #endif - --#include - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) - # include - #else -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_fb.c -=================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/drm/vbox_fb.c -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/drm/vbox_fb.c -@@ -46,6 +46,11 @@ - * Authors: Dave Airlie - */ - /* Include from most specific to most general to be able to override things. */ -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#include -+#include -+#endif - #include "vbox_drv.h" - #include - #include