1
0
forked from pool/virtualbox

Accepting request 794398 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/794398
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=197
This commit is contained in:
Dominique Leuenberger 2020-04-17 22:27:47 +00:00 committed by Git OBS Bridge
commit 8406503725
10 changed files with 79 additions and 210 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35d01bc6505a6a58b56013359841bb61135a3f3a17efe05cac9106c32498d347
size 4891142
oid sha256:557587dfc3941efbeb73d2cbc1bf52d86d015696588839d6bf31895f9b70b84f
size 4893199

View File

@ -1,66 +0,0 @@
Index: VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
+++ VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
@@ -100,16 +100,19 @@ static void x11Connect(struct X11CONTEXT
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
if (!XRRQueryExtension(pContext->pDisplay, &pContext->hRandREventBase, &pContext->hRandRErrorBase))
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
if (!XRRQueryVersion(pContext->pDisplay, &pContext->hRandRMajor, &pContext->hRandRMinor))
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
pContext->rootWindow = DefaultRootWindow(pContext->pDisplay);
}
Index: VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
+++ VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
@@ -215,7 +215,6 @@ DECLCALLBACK(void) ShClX11RequestFromX11
*
* @returns VBox status code.
*/
-#if 0
static int vboxClipboardConnect(void)
{
LogFlowFuncEnter();
@@ -245,7 +244,6 @@ static int vboxClipboardConnect(void)
LogFlowFuncLeaveRC(rc);
return rc;
}
-#endif
/**
* The main loop of our clipboard reader.
@@ -469,7 +467,7 @@ static int run(struct VBCLSERVICE **ppIn
RT_NOREF(ppInterface, fDaemonised);
/* Initialise the guest library. */
- int rc = 0; //vboxClipboardConnect();
+ int rc = vboxClipboardConnect();
if (RT_SUCCESS(rc))
{
#ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
@@ -477,9 +475,9 @@ static int run(struct VBCLSERVICE **ppIn
if (RT_SUCCESS(rc))
{
#endif
- RTThreadSleep(60 * 1000);
+ // RTThreadSleep(60 * 1000);
- //rc = vboxClipboardMain();
+ rc = vboxClipboardMain();
#ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
int rc2 = vboxClipboardFUSEStop();

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:947e0fb682f094b3d5feb5791148d6957355a6abc34dd1081e8573e926636fa6
size 120044114

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df272e0583953e4839cbd0ddaaf232a2aad724297afe92808a9fb6eca73f7834
size 113939098

View File

@ -1,20 +0,0 @@
Index: VirtualBox-6.1.4/src/VBox/Main/src-all/Global.cpp
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Main/src-all/Global.cpp
+++ VirtualBox-6.1.4/src/VBox/Main/src-all/Global.cpp
@@ -284,13 +284,13 @@ const Global::OSType Global::sOSTypes[]
{ "Linux", "Linux", "OpenSUSE", "openSUSE (32-bit)",
VBOXOSTYPE_OpenSUSE, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
- 1024, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 1024, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 },
{ "Linux", "Linux", "OpenSUSE_64", "openSUSE (64-bit)",
VBOXOSTYPE_OpenSUSE_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC
| VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
- 1024, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 1024, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 },
{ "Linux", "Linux", "Turbolinux", "Turbolinux (32-bit)",

View File

@ -1,106 +0,0 @@
Index: VirtualBox-6.1.2/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
===================================================================
--- VirtualBox-6.1.2.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+++ VirtualBox-6.1.2/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
@@ -843,9 +843,13 @@ DECLHIDDEN(int) vboxPciOsDevMapRegion(PV
if (!rcLnx)
{
/* For now no caching, try to optimize later. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+ RTR0PTR R0PtrMapping = ioremap(pci_resource_start(pPciDev, iRegion),
+ pci_resource_len(pPciDev, iRegion));
+#else
RTR0PTR R0PtrMapping = ioremap_nocache(pci_resource_start(pPciDev, iRegion),
pci_resource_len(pPciDev, iRegion));
-
+#endif
if (R0PtrMapping != NIL_RTR0PTR)
pIns->aRegionR0Mapping[iRegion] = R0PtrMapping;
else
Index: VirtualBox-6.1.2/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- VirtualBox-6.1.2.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ VirtualBox-6.1.2/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -1461,9 +1461,13 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKerne
* MMIO / physical memory.
*/
Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+ pMemLnx->Core.pv = ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
+#else
pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
: ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
+#endif
if (pMemLnx->Core.pv)
{
/** @todo fix protection. */
Index: VirtualBox-6.1.2/include/iprt/time.h
===================================================================
--- VirtualBox-6.1.2.orig/include/iprt/time.h
+++ VirtualBox-6.1.2/include/iprt/time.h
@@ -32,6 +32,24 @@
#include <iprt/cdefs.h>
#include <iprt/types.h>
#include <iprt/assertcompile.h>
+#ifdef __KERNEL__
+/* This header is used for both kernel- and user-space code. Beginning
+ * with v5.6.0-rc3 as part of the Y2038 conversion, several of the
+ * time handling macros were hidden. Thus, user- and kernel-space
+ * names are different.
+ */
+#include <linux/version.h>
+#include <linux/time64.h>
+#include <linux/ktime.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+#include <linux/time_types.h>
+#define timespec __kernel_old_timespec
+#define ktime_get_ts ktime_get_ts64
+#undef time_t
+#define time_t ktime_t
+#define timeval __kernel_old_timeval
+#endif /* kernel version >= 5.6.0 */
+#endif /* __KERNEL__ */
RT_C_DECLS_BEGIN
@@ -433,12 +451,6 @@ DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTim
}
-# ifdef _LINUX_TIME64_H
-DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
-{
- return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
-}
-# endif
#endif /* various ways of detecting struct timespec */
Index: VirtualBox-6.1.2/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
===================================================================
--- VirtualBox-6.1.2.orig/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
+++ VirtualBox-6.1.2/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
@@ -35,6 +35,10 @@
#include <iprt/asm.h>
+DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
+{
+ return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
+}
DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void)
{
@@ -43,7 +47,11 @@ DECLINLINE(uint64_t) rtTimeGetSystemNano
* Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
*/
uint64_t u64;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+ struct timespec64 Ts;
+#else
struct timespec Ts;
+#endif
ktime_get_ts(&Ts);
u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
return u64;

36
fixes_for_5.7.patch Normal file
View File

@ -0,0 +1,36 @@
Index: VirtualBox-6.1.4/src/VBox/Additions/linux/drm/vbox_fb.c
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/linux/drm/vbox_fb.c
+++ VirtualBox-6.1.4/src/VBox/Additions/linux/drm/vbox_fb.c
@@ -47,7 +47,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
-
#include <VBoxVideo.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) && !defined(RHEL_74)
@@ -431,7 +430,11 @@ int vbox_fbdev_init(struct drm_device *d
drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
+ ret = drm_fb_helper_init(dev, &fbdev->helper);
+#else
ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs);
+#endif
#else
ret =
drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs,
@@ -440,7 +443,11 @@ int vbox_fbdev_init(struct drm_device *d
if (ret)
return ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
+ ret = 0;
+#else
ret = drm_fb_helper_single_add_all_connectors(&fbdev->helper);
+#endif
if (ret)
goto err_fini;

View File

@ -28,8 +28,6 @@ devrules()
#
# Ensure that ~/.config/VirtualBox exists
mkdir -p ~/.config/VirtualBox
# Originally, this information was in ~/.vbox. Remove any files found there
rm -rf ~/.vbox
# Get the inode for /usr/lib/udev/rules.d/60-vboxdrv.rules
INODE=$(stat /usr/lib/udev/rules.d/60-vboxdrv.rules | grep Inode | cut -d' ' -f3)
if [ ! -f ~/.config/VirtualBox/enable ] && [ ! -f ~/.config/VirtualBox/disable ] ; then

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Wed Apr 15 17:40:41 UTC 2020 - Larry Finger <Larry.Finger@gmail.com>
- Version bump to 6.1.6 (released April 14 2020 by Oracle)
This version fixes bsc#1169249, bsc#1169202, and bsc#1166782.
This is a maintenance release. The following items were fixed and/or added:
GUI: Multiple enhancements including visual elements updates
Graphics: Fixed monitor resizing and multi-monitor handling bugs on X11 guests with VMSVGA graphics adapter
Graphics: Enhancements in 2D and 3D acceleration and rendering
USB: Multiple enhancements improving prformance and stability
Serial port: Improve error handling and fix hang when host port disappears
VBoxManage: Multiple fixes for guestcontrol operations
API: Fix for exception handling bug in Python bindings
Shared clipboard: Multiple fixes including possible crash and HTML data support
Linux host and guest: Support Linux kernel 5.6 (bug #19312)
File "VirtualBox-6.1.4-VBoxClient-vmsvga-x11-crash.patch" removed - fixed upstream.
File "fixes_for_5.6.patch" removed - fixed upstream.
File "change_default_display.patch" removed - fixed upstream.
-------------------------------------------------------------------
Mon Apr 13 18:02:12 UTC 2020 - Larry Finger <Larry.Finger@gmail.com>
- Fix bug that deletes everything in ~/.vbox/
-------------------------------------------------------------------
Mon Apr 13 17:22:38 UTC 2020 - Larry Finger <Larry.Finger@gmail.com>
- Fix builds for kernel 5.7. File "fixes_for_5.7.patch" is added.
-------------------------------------------------------------------
Thu Apr 9 21:49:36 UTC 2020 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -47,7 +47,7 @@ python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile
%define _udevrulesdir /usr/lib/udev/rules.d
Name: virtualbox
# ********* If the VB version exceeds 6.1.x, notify the libvirt maintainer!!
Version: 6.1.4
Version: 6.1.6
Release: 0
Summary: VirtualBox is an Emulator
License: GPL-2.0-or-later
@ -150,16 +150,12 @@ Patch132: fixes_for_qt5.13.patch
Patch133: fixes_for_leap15.2.patch
# Fixes for API changes in kernel 5.6
Patch134: fixes_for_5.5.patch
# Fixes for API changes in kernel 5.6
Patch135: fixes_for_5.6.patch
# Fis VBoxClient Crashes
Patch136: VirtualBox-6.1.4-VBoxClient-vmsvga-x11-crash.patch
# Fix build for Qt 5.15
Patch137: fix-missing-includes-with-qt-5.15.patch
Patch135: fix-missing-includes-with-qt-5.15.patch
# Fix builds with GCC10
Patch138: fixes_for_gcc10.patch
# Change default display type
Patch139: change_default_display.patch
Patch136: fixes_for_gcc10.patch
# Fix build for kernel 5.7
Patch137: fixes_for_5.7.patch
Patch999: virtualbox-fix-ui-background-color.patch
#
BuildRequires: LibVNCServer-devel
@ -465,8 +461,6 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
%patch135 -p1
%patch136 -p1
%patch137 -p1
%patch138 -p1
%patch139 -p1
# make VB UI background colors look sane again
%patch999 -p1