From ed6e7df33dce5757f98daee9962113b616d73a0feb988ae1a2c63705f3164781 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 9 Dec 2020 15:52:37 +0000 Subject: [PATCH 1/2] Accepting request 854196 from home:dimstar:Factory - Fix build with RPM 4.16: Do not install files to buildroot during the build phase: - Do not forcibly require systemd: systemd_ordering is sufficient. For that reason, a workaround is added. OBS-URL: https://build.opensuse.org/request/show/854196 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=576 --- virtualbox.changes | 9 ++++++++- virtualbox.spec | 17 +++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/virtualbox.changes b/virtualbox.changes index c8dcf10..46cc814 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,8 +1,15 @@ +------------------------------------------------------------------- +Tue Dec 8 13:41:09 UTC 2020 - Dominique Leuenberger + +- Fix build with RPM 4.16: Do not install files to buildroot during + the build phase: +- Do not forcibly require systemd: systemd_ordering is sufficient. + ------------------------------------------------------------------- Fri Sep 18 16:36:31 UTC 2020 - Larry Finger - %service_del_postun_without_restart is not yet available in Leap 15.{1,2} of SLE15_SP1. - For that reason, a workaround is added. + For that reason, a workaround is added. ------------------------------------------------------------------- Fri Sep 11 17:58:07 UTC 2020 - Franck Bui diff --git a/virtualbox.spec b/virtualbox.spec index 3d31954..2156852 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -266,7 +266,7 @@ BuildRequires: xorg-x11-libXext-devel-32bit BuildRequires: xorg-x11-libXmu-devel-32bit BuildRequires: xorg-x11-libXt-devel-32bit %endif -%{?systemd_requires} +%{?systemd_ordering} # package i4l-vbox from source package i4l-base shares the directory /etc/vbox # with us, but with different owner. Conflicts: i4l-vbox @@ -585,11 +585,6 @@ echo "build VNC extension pack" # tar must use GNU, not POSIX, format here sed -i 's/tar /tar --format=gnu /' src/VBox/ExtPacks/VNC/Makefile.kmk kmk -C src/VBox/ExtPacks/VNC packing -pushd out/linux.*/release/packages/ -mkdir -p "%{buildroot}%{_datadir}/virtualbox/extensions/" -install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensions/VNC-%{version}.vbox-extpack" -popd -install -D -m 644 "COPYING" "%{buildroot}%{_datadir}/licenses/LICENSE.vnc" %install ################################# @@ -628,6 +623,16 @@ install -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/60-vboxguest.rules %if 0%{?suse_version} > 1320 || 0%{?sle_version} == 120300 install -d -m 755 %{buildroot}/media %endif + +########################################### +echo "entering VNC extension install section" +########################################### +pushd out/linux.*/release/packages/ +mkdir -p "%{buildroot}%{_datadir}/virtualbox/extensions/" +install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensions/VNC-%{version}.vbox-extpack" +popd +install -D -m 644 "COPYING" "%{buildroot}%{_datadir}/licenses/LICENSE.vnc" + # ############################################################## echo "entering guest-x11 install section" From 3c1dc4f2d516c88cb0b4665e57a1971499c144fe2668f86c8c59a0cd0e49d203 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 9 Dec 2020 20:22:12 +0000 Subject: [PATCH 2/2] Accepting request 854343 from home:lwfinger:branches:Virtualization OBS-URL: https://build.opensuse.org/request/show/854343 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=577 --- UserManual.pdf | 4 +- VirtualBox-6.1.14-patched.tar.bz2 | 3 - VirtualBox-6.1.16-patched.tar.bz2 | 3 + fixes_for_5.9.patch | 189 --------------------------- fixes_for_gcc10.patch | 14 +- fixes_for_leap15.2.patch | 39 +++--- handle_gsoap_208103.patch | 19 ++- linux-5.10-address-space-fixes.patch | 16 +++ linux-5.10-framebuffer-fixes.patch | 46 +++++++ linux-5.10-r0drv-memobj-fix-r0.patch | 96 ++++++++++++++ vb-6.1.16-modal-dialog-parent.patch | 47 +++++++ virtualbox.changes | 41 ++++++ virtualbox.spec | 15 ++- 13 files changed, 298 insertions(+), 234 deletions(-) delete mode 100644 VirtualBox-6.1.14-patched.tar.bz2 create mode 100644 VirtualBox-6.1.16-patched.tar.bz2 delete mode 100644 fixes_for_5.9.patch create mode 100644 linux-5.10-address-space-fixes.patch create mode 100644 linux-5.10-framebuffer-fixes.patch create mode 100644 linux-5.10-r0drv-memobj-fix-r0.patch create mode 100644 vb-6.1.16-modal-dialog-parent.patch diff --git a/UserManual.pdf b/UserManual.pdf index 4a974ee..00be293 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0873ad3f3da8aea7bc25dec24ef7f73d85463ddccda8741167b7e7bfa283c5b -size 4904831 +oid sha256:80cc1932ea5d9ec35950d9b593bcb2c12afa9dee851410d72fd589998f53ef42 +size 4906664 diff --git a/VirtualBox-6.1.14-patched.tar.bz2 b/VirtualBox-6.1.14-patched.tar.bz2 deleted file mode 100644 index bc7d3a7..0000000 --- a/VirtualBox-6.1.14-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00d37841df52222a2153665bd135148bad53453e5892e72c493404fd59174c55 -size 120389752 diff --git a/VirtualBox-6.1.16-patched.tar.bz2 b/VirtualBox-6.1.16-patched.tar.bz2 new file mode 100644 index 0000000..4675444 --- /dev/null +++ b/VirtualBox-6.1.16-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66b89a73cbc97b5c818d8db60eeffe7e4216269f3654f88da289413984faae40 +size 120564764 diff --git a/fixes_for_5.9.patch b/fixes_for_5.9.patch deleted file mode 100644 index c7c9a17..0000000 --- a/fixes_for_5.9.patch +++ /dev/null @@ -1,189 +0,0 @@ -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 - #include - #include --#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 - #endif - /* For the shared folders module */ -Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c -=================================================================== ---- 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); -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c -@@ -262,8 +262,13 @@ static const struct file_operations vbox - .read = drm_read, - }; - -+#if RTLNX_VER_MAX(5, 9, 0) - static int vbox_master_set(struct drm_device *dev, - struct drm_file *file_priv, bool from_open) -+#else -+static void vbox_master_set(struct drm_device *dev, -+ struct drm_file *file_priv, bool from_open) -+#endif - { - struct vbox_private *vbox = dev->dev_private; - -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_fb.c -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_fb.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_fb.c -@@ -405,7 +405,11 @@ void vbox_fbdev_fini(struct drm_device * - vbox_bo_unpin(bo); - vbox_bo_unreserve(bo); - } -+#if RTLNX_VER_MIN(5, 9, 0) -+ drm_gem_object_put(afb->obj); -+#else - drm_gem_object_put_unlocked(afb->obj); -+#endif - afb->obj = NULL; - } - drm_fb_helper_fini(&fbdev->helper); -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_main.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c -@@ -40,14 +40,19 @@ - #include - - #include "hgsmi_channels.h" -+#include -+ - - static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb) - { - struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb); - - if (vbox_fb->obj) -+#if RTLNX_VER_MAX(5, 9, 0) - drm_gem_object_put_unlocked(vbox_fb->obj); -- -+#else -+ drm_gem_object_put(vbox_fb->obj); -+#endif - drm_framebuffer_cleanup(fb); - kfree(fb); - } -@@ -221,7 +226,11 @@ static struct drm_framebuffer *vbox_user - err_free_vbox_fb: - kfree(vbox_fb); - err_unref_obj: -+#if RTLNX_VER_MAX(5, 9, 0) - drm_gem_object_put_unlocked(obj); -+#else -+ drm_gem_object_put(obj); -+#endif - return ERR_PTR(ret); - } - -@@ -588,7 +597,11 @@ int vbox_dumb_create(struct drm_file *fi - return ret; - - ret = drm_gem_handle_create(file, gobj, &handle); -+#if RTLNX_VER_MAX(5, 9, 0) - drm_gem_object_put_unlocked(gobj); -+#else -+ drm_gem_object_put(gobj); -+#endif - if (ret) - return ret; - -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.h -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.h -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.h -@@ -417,6 +417,9 @@ struct vbox_bo { - #else - struct ttm_place placements[3]; - #endif -+#if RTLNX_VER_MIN(5, 9, 0) -+ uint64_t offset; -+#endif - int pin_count; - }; - -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_mode.c -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_mode.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_mode.c -@@ -885,8 +885,11 @@ out_unmap_bo: - out_unreserve_bo: - vbox_bo_unreserve(bo); - out_unref_obj: -+#if RTLNX_VER_MAX(5, 9, 0) - drm_gem_object_put_unlocked(obj); -- -+#else -+ drm_gem_object_put(obj); -+#endif - return ret; - } - -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_ttm.c -=================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_ttm.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_ttm.c -@@ -445,7 +445,11 @@ err_free_vboxbo: - - static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo) - { -+#if RTLNX_VER_MAX(5, 9, 0) - return bo->bo.offset; -+#else -+ return bo->offset; -+#endif - } - - int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr) diff --git a/fixes_for_gcc10.patch b/fixes_for_gcc10.patch index 3e68122..cbd2037 100644 --- a/fixes_for_gcc10.patch +++ b/fixes_for_gcc10.patch @@ -1,8 +1,8 @@ -Index: VirtualBox-6.1.14/Config.kmk +Index: VirtualBox-6.1.16/Config.kmk =================================================================== ---- VirtualBox-6.1.14.orig/Config.kmk -+++ VirtualBox-6.1.14/Config.kmk -@@ -2634,11 +2634,17 @@ else +--- VirtualBox-6.1.16.orig/Config.kmk ++++ VirtualBox-6.1.16/Config.kmk +@@ -2630,11 +2630,17 @@ else # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). # Some versions of gcc (e.g. openSUSE11) return only major.minor on `gcc -dumpversion`. # gcc-5 of openSUSE42.1 only returns the major version on `gcc -dumpversion`! @@ -24,10 +24,10 @@ Index: VirtualBox-6.1.14/Config.kmk ifndef DONT_USE_YASM include $(KBUILD_PATH)/tools/YASM.kmk if1of ($(KBUILD_HOST), win os2) -Index: VirtualBox-6.1.14/src/VBox/Debugger/DBGCDumpImage.cpp +Index: VirtualBox-6.1.16/src/VBox/Debugger/DBGCDumpImage.cpp =================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Debugger/DBGCDumpImage.cpp -+++ VirtualBox-6.1.14/src/VBox/Debugger/DBGCDumpImage.cpp +--- VirtualBox-6.1.16.orig/src/VBox/Debugger/DBGCDumpImage.cpp ++++ VirtualBox-6.1.16/src/VBox/Debugger/DBGCDumpImage.cpp @@ -468,7 +468,7 @@ static const char *dbgcMachoCpuType(int3 { switch (iType) diff --git a/fixes_for_leap15.2.patch b/fixes_for_leap15.2.patch index 1ae9a53..a9a0b2f 100644 --- a/fixes_for_leap15.2.patch +++ b/fixes_for_leap15.2.patch @@ -1,7 +1,7 @@ -Index: VirtualBox-6.1.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +Index: VirtualBox-6.1.16/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c =================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c -+++ VirtualBox-6.1.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +--- VirtualBox-6.1.16.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c ++++ VirtualBox-6.1.16/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c @@ -73,6 +73,10 @@ #define VBOXNETFLT_OS_SPECFIC 1 #include "../VBoxNetFltInternal.h" @@ -13,15 +13,18 @@ Index: VirtualBox-6.1.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux. typedef struct VBOXNETFLTNOTIFIER { struct notifier_block Notifier; PVBOXNETFLTINS pThis; -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c +Index: VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_drv.c =================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c -@@ -305,11 +305,13 @@ static void vbox_master_drop(struct drm_ +--- VirtualBox-6.1.16.orig/src/VBox/Additions/linux/drm/vbox_drv.c ++++ VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_drv.c +@@ -310,12 +310,15 @@ static void vbox_master_drop(struct drm_ + } + static struct drm_driver driver = { - #if RTLNX_VER_MAX(5,4,0) - .driver_features = -- DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | +-#if RTLNX_VER_MAX(5,4,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3) +- .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | ++#if RTLNX_VER_MAX(5,4,0) ++ .driver_features = +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) + DRIVER_PRIME | +#endif @@ -30,14 +33,14 @@ Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c # endif - DRIVER_PRIME, + DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, - #else /* >= 5.4.0 */ + #else /* >= 5.4.0 && RHEL >= 8.3 */ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, #endif /* < 5.4.0 */ -Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c +Index: VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_main.c =================================================================== ---- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_main.c -+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c -@@ -628,8 +628,12 @@ static inline u64 vbox_bo_mmap_offset(st +--- VirtualBox-6.1.16.orig/src/VBox/Additions/linux/drm/vbox_main.c ++++ VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_main.c +@@ -638,8 +638,12 @@ static inline u64 vbox_bo_mmap_offset(st #elif RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,0) return bo->bo.addr_space_offset; #else @@ -50,10 +53,10 @@ Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c } int -Index: VirtualBox-6.1.14/include/iprt/cdefs.h +Index: VirtualBox-6.1.16/include/iprt/cdefs.h =================================================================== ---- VirtualBox-6.1.14.orig/include/iprt/cdefs.h -+++ VirtualBox-6.1.14/include/iprt/cdefs.h +--- VirtualBox-6.1.16.orig/include/iprt/cdefs.h ++++ VirtualBox-6.1.16/include/iprt/cdefs.h @@ -1173,14 +1173,15 @@ * Tell the compiler that we're falling through to the next case in a switch. * @sa RT_FALL_THRU */ diff --git a/handle_gsoap_208103.patch b/handle_gsoap_208103.patch index 71b079d..e3dd220 100644 --- a/handle_gsoap_208103.patch +++ b/handle_gsoap_208103.patch @@ -1,17 +1,16 @@ -Index: VirtualBox-6.1.8/src/VBox/Main/webservice/vboxweb.cpp +Index: VirtualBox-6.1.16/src/VBox/Main/webservice/vboxweb.cpp =================================================================== ---- VirtualBox-6.1.8.orig/src/VBox/Main/webservice/vboxweb.cpp -+++ VirtualBox-6.1.8/src/VBox/Main/webservice/vboxweb.cpp -@@ -944,7 +944,11 @@ static void doQueuesLoop() - if (rv == 0) +--- VirtualBox-6.1.16.orig/src/VBox/Main/webservice/vboxweb.cpp ++++ VirtualBox-6.1.16/src/VBox/Main/webservice/vboxweb.cpp +@@ -945,9 +945,9 @@ static void doQueuesLoop() continue; // timeout, not necessary to bother gsoap // r < 0, errno -- if (soap_socket_errno(soap.master) == SOAP_EINTR) -+#if GSOAP_VERSION >= 208103 + #if GSOAP_VERSION >= 208103 +- if (soap_socket_errno == SOAP_EINTR) + if (soap_socket_errno == SOAP_EINTR) -+#else + #else +- if (soap_socket_errno(soap.master) == SOAP_EINTR) + if (soap_socket_errno(fd) == SOAP_EINTR) -+#endif + #endif rv = 0; // re-check if we should terminate break; - } diff --git a/linux-5.10-address-space-fixes.patch b/linux-5.10-address-space-fixes.patch new file mode 100644 index 0000000..c308cca --- /dev/null +++ b/linux-5.10-address-space-fixes.patch @@ -0,0 +1,16 @@ +Index: b/src/VBox/Additions/linux/sharedfolders/regops.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/regops.c ++++ b/src/VBox/Additions/linux/sharedfolders/regops.c +@@ -1401,7 +1401,10 @@ static int vbsf_lock_user_pages_failed_c + /* + * Check that this is valid user memory that is actually in the kernel range. + */ +-#if RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1) ++#if RTLNX_VER_MIN(5,10,0) ++ if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT) ++ && uPtrFrom >= TASK_SIZE_MAX) ++#elif RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1) + if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT) + && uPtrFrom >= USER_DS.seg) + #else diff --git a/linux-5.10-framebuffer-fixes.patch b/linux-5.10-framebuffer-fixes.patch new file mode 100644 index 0000000..9207736 --- /dev/null +++ b/linux-5.10-framebuffer-fixes.patch @@ -0,0 +1,46 @@ +Index: b/src/VBox/Additions/linux/drm/vbox_drv.h +=================================================================== +--- a/src/VBox/Additions/linux/drm/vbox_drv.h ++++ b/src/VBox/Additions/linux/drm/vbox_drv.h +@@ -205,6 +205,13 @@ static inline void drm_gem_object_put(st + } + #endif + ++#ifndef TTM_PL_FLAG_SYSTEM ++#define TTM_PL_FLAG_SYSTEM (1 << TTM_PL_SYSTEM) ++#endif ++#ifndef TTM_PL_FLAG_VRAM ++#define TTM_PL_FLAG_VRAM (1 << TTM_PL_VRAM) ++#endif ++ + #define DRIVER_AUTHOR VBOX_VENDOR + + #define DRIVER_NAME "vboxvideo" +Index: b/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 +@@ -373,11 +373,23 @@ void vbox_ttm_placement(struct vbox_bo * + bo->placement.busy_placement = bo->placements; + + if (domain & TTM_PL_FLAG_VRAM) ++#if RTLNX_VER_MIN(5,10,0) ++ bo->placements[c].mem_type = TTM_PL_VRAM; ++ PLACEMENT_FLAGS(bo->placements[c++]) = ++ TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED; ++#else + PLACEMENT_FLAGS(bo->placements[c++]) = + TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM; ++#endif + if (domain & TTM_PL_FLAG_SYSTEM) ++#if RTLNX_VER_MIN(5,10,0) ++ bo->placements[c].mem_type = TTM_PL_SYSTEM; ++ PLACEMENT_FLAGS(bo->placements[c++]) = ++ TTM_PL_MASK_CACHING; ++#else + PLACEMENT_FLAGS(bo->placements[c++]) = + TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM; ++#endif + if (!c) + PLACEMENT_FLAGS(bo->placements[c++]) = + TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM; diff --git a/linux-5.10-r0drv-memobj-fix-r0.patch b/linux-5.10-r0drv-memobj-fix-r0.patch new file mode 100644 index 0000000..0bbcdea --- /dev/null +++ b/linux-5.10-r0drv-memobj-fix-r0.patch @@ -0,0 +1,96 @@ +Index: src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (Revision 141658) ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (Arbeitskopie) +@@ -56,9 +56,12 @@ + * Whether we use alloc_vm_area (3.2+) for executable memory. + * This is a must for 5.8+, but we enable it all the way back to 3.2.x for + * better W^R compliance (fExecutable flag). */ +-#if RTLNX_VER_MIN(3,2,0) || defined(DOXYGEN_RUNNING) ++#if RTLNX_VER_RANGE(3,2,0, 5,10,0) || defined(DOXYGEN_RUNNING) + # define IPRT_USE_ALLOC_VM_AREA_FOR_EXEC + #endif ++#if RTLNX_VER_MIN(5,10,0) || defined(DOXYGEN_RUNNING) ++# define IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC ++#endif + + /* + * 2.6.29+ kernels don't work with remap_pfn_range() anymore because +@@ -502,7 +505,43 @@ + } + + ++#ifdef IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC + /** ++ * User data passed to the apply_to_page_range() callback. ++ */ ++typedef struct LNXAPPLYPGRANGE ++{ ++ /** Pointer to the memory object. */ ++ PRTR0MEMOBJLNX pMemLnx; ++ /** The page protection flags to apply. */ ++ pgprot_t fPg; ++} LNXAPPLYPGRANGE; ++/** Pointer to the user data. */ ++typedef LNXAPPLYPGRANGE *PLNXAPPLYPGRANGE; ++/** Pointer to the const user data. */ ++typedef const LNXAPPLYPGRANGE *PCLNXAPPLYPGRANGE; ++ ++/** ++ * Callback called in apply_to_page_range(). ++ * ++ * @returns Linux status code. ++ * @param pPte Pointer to the page table entry for the given address. ++ * @param uAddr The address to apply the new protection to. ++ * @param pvUser The opaque user data. ++ */ ++static DECLCALLBACK(int) rtR0MemObjLinuxApplyPageRange(pte_t *pPte, unsigned long uAddr, void *pvUser) ++{ ++ PCLNXAPPLYPGRANGE pArgs = (PCLNXAPPLYPGRANGE)pvUser; ++ PRTR0MEMOBJLNX pMemLnx = pArgs->pMemLnx; ++ uint32_t idxPg = (uAddr - (unsigned long)pMemLnx->Core.pv) >> PAGE_SHIFT; ++ ++ set_pte(pPte, mk_pte(pMemLnx->apPages[idxPg], pArgs->fPg)); ++ return 0; ++} ++#endif ++ ++ ++/** + * Maps the allocation into ring-0. + * + * This will update the RTR0MEMOBJLNX::Core.pv and RTR0MEMOBJ::fMappedToRing0 members. +@@ -584,6 +623,11 @@ + else + # endif + { ++# if defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC) ++ if (fExecutable) ++ pgprot_val(fPg) |= _PAGE_NX; /* Uses RTR0MemObjProtect to clear NX when memory ready, W^X fashion. */ ++# endif ++ + # ifdef VM_MAP + pMemLnx->Core.pv = vmap(&pMemLnx->apPages[0], pMemLnx->cPages, VM_MAP, fPg); + # else +@@ -1851,6 +1895,21 @@ + preempt_enable(); + return VINF_SUCCESS; + } ++# elif defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC) ++ PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)pMem; ++ if ( pMemLnx->fExecutable ++ && pMemLnx->fMappedToRing0) ++ { ++ LNXAPPLYPGRANGE Args; ++ Args.pMemLnx = pMemLnx; ++ Args.fPg = rtR0MemObjLinuxConvertProt(fProt, true /*fKernel*/); ++ int rcLnx = apply_to_page_range(current->active_mm, (unsigned long)pMemLnx->Core.pv + offSub, cbSub, ++ rtR0MemObjLinuxApplyPageRange, (void *)&Args); ++ if (rcLnx) ++ return VERR_NOT_SUPPORTED; ++ ++ return VINF_SUCCESS; ++ } + # endif + + NOREF(pMem); diff --git a/vb-6.1.16-modal-dialog-parent.patch b/vb-6.1.16-modal-dialog-parent.patch new file mode 100644 index 0000000..e41e87c --- /dev/null +++ b/vb-6.1.16-modal-dialog-parent.patch @@ -0,0 +1,47 @@ +Index: b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp +=================================================================== +--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp ++++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp +@@ -16,6 +16,7 @@ + */ + + /* Qt includes: */ ++#include + #include + #include + #ifdef VBOX_WS_WIN +@@ -295,7 +296,7 @@ void UIGlobalSettingsExtension::sltAddPa + extensions << QString("*.%1").arg(VBoxExtPackFileExts[i]); + const QString strFilter = tr("Extension package files (%1)").arg(extensions.join(" ")); + +- const QStringList fileNames = QIFileDialog::getOpenFileNames(strBaseFolder, strFilter, this, strTitle, 0, true, true); ++ const QStringList fileNames = QIFileDialog::getOpenFileNames(strBaseFolder, strFilter, QApplication::activeWindow(), strTitle, 0, true, true); + + QString strFilePath; + if (!fileNames.isEmpty()) +Index: b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp +=================================================================== +--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp ++++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp +@@ -397,10 +397,10 @@ void UIFilePathSelector::selectPath() + switch (m_enmMode) + { + case Mode_File_Open: +- strSelPath = QIFileDialog::getOpenFileName(strInitDir, m_strFileDialogFilters, parentWidget(), m_strFileDialogTitle); break; ++ strSelPath = QIFileDialog::getOpenFileName(strInitDir, m_strFileDialogFilters, QApplication::activeWindow(), m_strFileDialogTitle); break; + case Mode_File_Save: + { +- strSelPath = QIFileDialog::getSaveFileName(strInitDir, m_strFileDialogFilters, parentWidget(), m_strFileDialogTitle); ++ strSelPath = QIFileDialog::getSaveFileName(strInitDir, m_strFileDialogFilters, QApplication::activeWindow(), m_strFileDialogTitle); + if (!strSelPath.isEmpty() && QFileInfo(strSelPath).suffix().isEmpty()) + { + if (m_strFileDialogDefaultSaveExtension.isEmpty()) +@@ -411,7 +411,7 @@ void UIFilePathSelector::selectPath() + break; + } + case Mode_Folder: +- strSelPath = QIFileDialog::getExistingDirectory(strInitDir, parentWidget(), m_strFileDialogTitle); break; ++ strSelPath = QIFileDialog::getExistingDirectory(strInitDir, QApplication::activeWindow(), m_strFileDialogTitle); break; + } + + /* Do nothing if nothing chosen: */ diff --git a/virtualbox.changes b/virtualbox.changes index 46cc814..225782d 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 9 15:35:34 UTC 2020 - Hans-Peter Jansen + +- Add vb-6.1.16-modal-dialog-parent.patch in order to solve the + file selector dialog mouse control issues + ------------------------------------------------------------------- Tue Dec 8 13:41:09 UTC 2020 - Dominique Leuenberger @@ -5,12 +11,47 @@ Tue Dec 8 13:41:09 UTC 2020 - Dominique Leuenberger the build phase: - Do not forcibly require systemd: systemd_ordering is sufficient. +------------------------------------------------------------------- +Mon Dec 7 16:00:15 UTC 2020 - Hans-Peter Jansen + +- Add linux-5.10-r0drv-memobj-fix-r0.patch to fix build with kernel 5.10 +- Add linux-5.10-address-space-fixes.patch to fix sharedfolders with 5.10 +- Add linux-5.10-framebuffer-fixes.patch to fix framebuffer with 5.10 + +------------------------------------------------------------------- +Tue Oct 20 18:14:18 UTC 2020 - Larry Finger + +- Version bump to 6.1.16 (released October 16 2020 by Oracle) + + This is a maintenance release. The following items were fixed and/or added: + File "fixes_for_5.9.patch" deleted - fixed upstream. + + VMM: Fixed random memory corruption and XMM register state corruption inside the VM when Hyper-V is used (bug #19695) + VMM: Fixed VMSVGA 3D support with Linux guests when Hyper-V is used (bug #19884) + GUI: Fixed some Qt related crashes on macOS Big Sur + Oracle Cloud Infrastructure integration: Fixed network integration not working behind some proxies + USB: Mask out remote wake capability to avoid unresponsive devices + Audio: Fixed issues with audio playback after host goes to sleep (bug #18594) + Serial: Keep transferring data if the status line monitoring fails + Serial: Fixed blocking a re-connect when TCP mode is used (bug #19878) + HPET: Fixed inability of guests to use the last timer + VBoxManage: Fixed detection of system locale when running 'VBoxManage unattended install' without --locale (bug #19856) + Linux host and guest: Support kernel version 5.9 (bug #19845) + Linux guest: Workaround to improve resizing of 32-bit VMs with VMSVGA graphics controller, and do not try to use RandR version 1.3 due to bugs causing the X server to hang + Linux guest: Fixed VBoxService crashing in the CPU hot-plug service under certain circumstances during a CPU hot-unplug event (bugs #19902 and #19903) + Linux guest: Fixed Guest additions build for RHEL 8.3 beta (bug #19863) + ------------------------------------------------------------------- Fri Sep 18 16:36:31 UTC 2020 - Larry Finger - %service_del_postun_without_restart is not yet available in Leap 15.{1,2} of SLE15_SP1. For that reason, a workaround is added. +------------------------------------------------------------------- +Fri Sep 18 16:31:26 UTC 2020 - Hans-Peter Jansen + +- keep "Provides: multiversion(kernel)" in kmp package + ------------------------------------------------------------------- Fri Sep 11 17:58:07 UTC 2020 - Franck Bui diff --git a/virtualbox.spec b/virtualbox.spec index 2156852..3293144 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -66,7 +66,7 @@ python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile # ********* If the VB version exceeds 6.1.x, notify the libvirt maintainer!! Name: virtualbox%{?dash}%{?name_suffix} -Version: 6.1.14 +Version: 6.1.16 Release: 0 Summary: %{package_summary} License: GPL-2.0-or-later @@ -179,8 +179,11 @@ Patch135: fix-missing-includes-with-qt-5.15.patch Patch136: fixes_for_gcc10.patch # Fix for changes in GSOAP 2.8.103 Patch137: handle_gsoap_208103.patch -# Fixes for kernel 5.9 -Patch138: fixes_for_5.9.patch +# Fixes for kernel 5.10 +Patch138: linux-5.10-r0drv-memobj-fix-r0.patch +Patch139: linux-5.10-address-space-fixes.patch +Patch140: linux-5.10-framebuffer-fixes.patch +Patch141: vb-6.1.16-modal-dialog-parent.patch Patch999: virtualbox-fix-ui-background-color.patch # @@ -288,8 +291,7 @@ Obsoletes: %{name}-ose < %{version} ### Requirements for virtualbox-kmp ### %if %{kmp_package} BuildRequires: libxml2-devel -%(sed -e '/^Provides: multiversion(kernel)/d' %{_prefix}/lib/rpm/kernel-module-subpackage > %{_builddir}/virtualbox-kmp-template) -%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n virtualbox -f %{SOURCE5} -x kdump um xen pae xenpae pv +%kernel_module_package -p %{SOURCE7} -n virtualbox -f %{SOURCE5} -x kdump um xen pae xenpae pv Obsoletes: virtualbox-guest-kmp Obsoletes: virtualbox-host-kmp # end of kmp_package @@ -505,6 +507,9 @@ This package contains the kernel-modules that VirtualBox uses to create or run v %patch136 -p1 %patch137 -p1 %patch138 -p1 +%patch139 -p1 +%patch140 -p1 +%patch141 -p1 # make VB UI background colors look sane again %patch999 -p1