$ git diff --patch-with-stat --summary dbf91c7c1aa3c06222f43e3ce4aec9dc97df6bd8..1ebea4397fd8a73f87b0e33c9bf7c80101e73e21
.abf.yml | 6 +-
06-xsession.patch | 23 ++
07-vboxnetflt-reference.patch | 16 ++
16-no-update.patch | 124 +++++++++
18-system-xorg.patch | 18 ++
27-hide-host-cache-warning.patch | 43 ++++
29-fix-ftbfs-as-needed.patch | 16 ++
37-python-3.7-support.patch | 17 ++
..._BETA3-dont-check-for-mkisofs-or-makeself.patch | 20 +-
VirtualBox-5.2.10-allow-gcc-8.0.patch | 14 +
...alBox-5.2.12-add-support-for-OpenMandriva.patch | 286 +++++++++++++++++++++
VirtualBox-5.2.16-use-xcb-on-wayland.patch | 12 +
fix-build-failure-new-acpica-unix.patch | 40 +++
videorec.patch | 85 ++++++
virtualbox-5.2.10-python-3.7.patch | 13 +
virtualbox-5.2.10-qt-5.11.patch | 11 +
virtualbox.spec | 66 ++++-
17 files changed, 782 insertions(+), 28 deletions(-)
create mode 100644 06-xsession.patch
create mode 100644 07-vboxnetflt-reference.patch
create mode 100644 16-no-update.patch
create mode 100644 18-system-xorg.patch
create mode 100644 27-hide-host-cache-warning.patch
create mode 100644 29-fix-ftbfs-as-needed.patch
create mode 100644 37-python-3.7-support.patch
create mode 100644 VirtualBox-5.2.10-allow-gcc-8.0.patch
create mode 100644 VirtualBox-5.2.12-add-support-for-OpenMandriva.patch
create mode 100644 VirtualBox-5.2.16-use-xcb-on-wayland.patch
create mode 100644 fix-build-failure-new-acpica-unix.patch
create mode 100644 videorec.patch
create mode 100644 virtualbox-5.2.10-python-3.7.patch
create mode 100644 virtualbox-5.2.10-qt-5.11.patch
diff --git a/.abf.yml b/.abf.yml
index 45c6ee4..074358a 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,3 +1,5 @@
sources:
- VirtualBox-5.2.8.tar.bz2: d25f64eb8d5f12072e4a57b32e08b2e512bdf517
- UserManual.pdf: 154cf373adf9816d43d15a2bb63f050bc4f22791
+ VirtualBox-5.2.16.tar.bz2: 833fbc0a8a93193c7d7e96c7e7869daaf4d63236
+ UserManual.pdf: ac6ad3862b13257d6a7bd9d60b5a041bac108bc1
+ os_openmandriva.png: 3c1c957c644369db0009773c895fbbb0617d5785
+ os_openmandriva_64.png: 80cce1aee0eea3e7aed9ee36d5829c0f0fa50fd4
diff --git a/06-xsession.patch b/06-xsession.patch
new file mode 100644
index 0000000..f881659
--- /dev/null
+++ b/06-xsession.patch
@@ -0,0 +1,23 @@
+Description: Make Xsession.d script ignore errors.
+Author: Michael Meskes <meskes@debian.org>
+
+Index: virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+===================================================================
+--- virtualbox.orig/src/VBox/Additions/x11/Installer/98vboxadd-xclient 2013-11-19 03:40:59.137475714 -0500
++++ virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient 2013-11-19 03:40:59.133475714 -0500
+@@ -30,9 +30,9 @@ done
+ # This script can also be triggered by a connection over SSH, which is not
+ # what we had in mind, so we do not start VBoxClient in that case. We do
+ # not use "exit" here as this script is "source"d, not executed.
+- /usr/bin/VBoxClient --clipboard
+- /usr/bin/VBoxClient --checkhostversion
+- /usr/bin/VBoxClient --display
+- /usr/bin/VBoxClient --seamless
+- /usr/bin/VBoxClient --draganddrop
++ /usr/bin/VBoxClient --clipboard || true
++ /usr/bin/VBoxClient --checkhostversion || true
++ /usr/bin/VBoxClient --display || true
++ /usr/bin/VBoxClient --seamless || true
++ /usr/bin/VBoxClient --draganddrop || true
+ fi
+
diff --git a/07-vboxnetflt-reference.patch b/07-vboxnetflt-reference.patch
new file mode 100644
index 0000000..6094ed1
--- /dev/null
+++ b/07-vboxnetflt-reference.patch
@@ -0,0 +1,16 @@
+Description: Made error message tell about missing vboxnetflt module.
+Author: Michael Meskes <meskes@debian.org>
+
+Index: virtualbox/src/VBox/Devices/Network/DrvIntNet.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Devices/Network/DrvIntNet.cpp 2013-11-19 03:41:03.413475913 -0500
++++ virtualbox/src/VBox/Devices/Network/DrvIntNet.cpp 2013-11-19 03:41:03.409475913 -0500
+@@ -1766,7 +1766,7 @@
+ return VERR_PDM_NO_ATTACHED_DRIVER;
+ }
+ return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
+- N_("Failed to open/create the internal network '%s'"), pThis->szNetwork);
++ N_("Failed to open/create the internal network '%s' (you might need to modprobe vboxnetflt to make it accessible)"), pThis->szNetwork);
+ }
+
+ AssertRelease(OpenReq.hIf != INTNET_HANDLE_INVALID);
diff --git a/16-no-update.patch b/16-no-update.patch
new file mode 100644
index 0000000..a4bc6a0
--- /dev/null
+++ b/16-no-update.patch
@@ -0,0 +1,124 @@
+Description: Disable "Check for Updates" action.
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/272212
+Author: Daniel Hahler <ubuntu@thequod.de>, Felix Geyer <fgeyer@debian.org>
+
+diff a/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp b/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
+Index: virtualbox/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
++++ virtualbox/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
+@@ -482,6 +482,8 @@
+
+ void UIUpdateManager::sltForceCheck()
+ {
++ return;
++
+ /* Force call for new version check: */
+ sltCheckIfUpdateIsNecessary(true /* force call */);
+ }
+Index: virtualbox/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
++++ virtualbox/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
+@@ -1116,7 +1116,6 @@
+ m_pool[UIActionIndex_M_Application_S_Preferences] = new UIActionSimplePreferences(this);
+ #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+ m_pool[UIActionIndex_M_Application_S_NetworkAccessManager] = new UIActionSimpleNetworkAccessManager(this);
+- m_pool[UIActionIndex_M_Application_S_CheckForUpdates] = new UIActionSimpleCheckForUpdates(this);
+ #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+ m_pool[UIActionIndex_M_Application_S_ResetWarnings] = new UIActionSimpleResetWarnings(this);
+ m_pool[UIActionIndex_M_Application_S_Close] = new UIActionSimplePerformClose(this);
+@@ -1162,8 +1161,6 @@
+ #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+ connect(action(UIActionIndex_M_Application_S_NetworkAccessManager), &UIAction::triggered,
+ gNetworkManager, &UINetworkManager::show, Qt::UniqueConnection);
+- connect(action(UIActionIndex_M_Application_S_CheckForUpdates), &UIAction::triggered,
+- gUpdateManager, &UIUpdateManager::sltForceCheck, Qt::UniqueConnection);
+ #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+ connect(action(UIActionIndex_M_Application_S_ResetWarnings), &UIAction::triggered,
+ &msgCenter(), &UIMessageCenter::sltResetSuppressedMessages, Qt::UniqueConnection);
+@@ -1244,7 +1241,7 @@
+ if (!fUpdateAllowed)
+ {
+ m_restrictedActionsMenuApplication[UIActionRestrictionLevel_Base] = (UIExtraDataMetaDefs::MenuApplicationActionType)
+- (m_restrictedActionsMenuApplication[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::MenuApplicationActionType_CheckForUpdates);
++ (m_restrictedActionsMenuApplication[UIActionRestrictionLevel_Base]);
+ }
+ #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+
+Index: virtualbox/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
+===================================================================
+--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
++++ virtualbox/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
+@@ -62,7 +62,6 @@
+ UIActionIndex_M_Application_S_Preferences,
+ #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+ UIActionIndex_M_Application_S_NetworkAccessManager,
+- UIActionIndex_M_Application_S_CheckForUpdates,
+ #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+ UIActionIndex_M_Application_S_ResetWarnings,
+ UIActionIndex_M_Application_S_Close,
+Index: virtualbox/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
++++ virtualbox/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
+@@ -304,6 +304,10 @@
+ #endif /* !VBOX_WITH_NETFLT */
+ break;
+ }
++ case GlobalSettingsPageType_Update:
++ {
++ return false;
++ }
+ default:
+ break;
+ }
+Index: virtualbox/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
++++ virtualbox/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
+@@ -1435,8 +1435,6 @@
+ /* 'About' action goes to Application menu: */
+ pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_About));
+ # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+- /* 'Check for Updates' action goes to Application menu: */
+- pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
+ /* 'Network Access Manager' action goes to Application menu: */
+ pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
+ # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+@@ -1479,7 +1476,7 @@
+ addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
+ # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+ addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
+- addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
++// addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
+ # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+ addAction(actionPool()->action(UIActionIndex_M_Application_S_ResetWarnings));
+ addAction(actionPool()->action(UIActionIndexST_M_File_S_Close));
+@@ -1506,9 +1504,6 @@
+ # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
+ /* 'Network Access Manager' action goes to 'File' menu: */
+ pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
+- /* 'Check for Updates' action goes to 'File' menu: */
+- if (gEDataManager->applicationUpdateEnabled())
+- pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_CheckForUpdates));
+ # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
+ /* 'Reset Warnings' action goes 'File' menu: */
+ pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_ResetWarnings));
+Index: virtualbox/doc/manual/en_US/user_Introduction.xml
+===================================================================
+--- virtualbox.orig/doc/manual/en_US/user_Introduction.xml
++++ virtualbox/doc/manual/en_US/user_Introduction.xml
+@@ -1771,10 +1771,12 @@
+ used to trigger certain VM actions (see <xref
+ linkend="specialcharacters"/>)</para>
+ </listitem>
++<!--
+ <listitem>
+ <para><emphasis role="bold">Update</emphasis> Enables the user
+ to specify various settings for Automatic Updates.</para>
+ </listitem>
++-->
+ <listitem>
+ <para><emphasis role="bold">Language</emphasis> Enables the user to
+ specify the GUI language.</para>
diff --git a/18-system-xorg.patch b/18-system-xorg.patch
new file mode 100644
index 0000000..0630698
--- /dev/null
+++ b/18-system-xorg.patch
@@ -0,0 +1,18 @@
+Description: Build the X.Org driver only for the selected system X Server version.
+Author: Michael Meskes <meskes@debian.org>, Felix Geyer <fgeyer@debian.org>
+
+diff --git a/src/VBox/Additions/common/VBoxGuest/lib/Makefile.kmk b/src/VBox/Additions/common/VBoxGuest/lib/Makefile.kmk
+index 8cf43e8fe..6ee1d415e 100644
+--- a/src/VBox/Additions/common/VBoxGuest/lib/Makefile.kmk
++++ b/src/VBox/Additions/common/VBoxGuest/lib/Makefile.kmk
+@@ -39,10 +39,6 @@ LIBRARIES += \
+ VBoxGuestR3Lib \
+ VBoxGuestR3LibShared
+ ifndef VBOX_ONLY_VALIDATIONKIT
+- if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
+- LIBRARIES += \
+- VBoxGuestR3LibXFree86
+- endif
+ if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
+ LIBRARIES += \
+ VBoxGuestR3LibXOrg
diff --git a/27-hide-host-cache-warning.patch b/27-hide-host-cache-warning.patch
new file mode 100644
index 0000000..0ccfea5
--- /dev/null
+++ b/27-hide-host-cache-warning.patch
@@ -0,0 +1,43 @@
+Description: Silently enable the host I/O cache when the image is on an ext4/XFS partition.
+ No need to warn users about it.
+Author: Felix Geyer <fgeyer@debian.org>
+
+diff --git a/src/VBox/Main/src-client/ConsoleImpl2.cpp b/src/VBox/Main/src-client/ConsoleImpl2.cpp
+index 61dbf0a59..cfb76fc48 100644
+--- a/src/VBox/Main/src-client/ConsoleImpl2.cpp
++++ b/src/VBox/Main/src-client/ConsoleImpl2.cpp
+@@ -4038,34 +4038,12 @@ int Console::i_checkMediumLocation(IMedium *pMedium, bool *pfUseHostIOCache)
+ if ( enmFsTypeFile == RTFSTYPE_EXT4
+ || enmFsTypeFile == RTFSTYPE_XFS)
+ {
+- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",
+- N_("The host I/O cache for at least one controller is disabled "
+- "and the medium '%ls' for this VM "
+- "is located on an %s partition. There is a known Linux "
+- "kernel bug which can lead to the corruption of the virtual "
+- "disk image under these conditions.\n"
+- "Either enable the host I/O cache permanently in the VM "
+- "settings or put the disk image and the snapshot folder "
+- "onto a different file system.\n"
+- "The host I/O cache will now be enabled for this medium"),
+- strFile.raw(), enmFsTypeFile == RTFSTYPE_EXT4 ? "ext4" : "xfs");
+ *pfUseHostIOCache = true;
+ }
+ else if ( ( enmFsTypeSnap == RTFSTYPE_EXT4
+ || enmFsTypeSnap == RTFSTYPE_XFS)
+ && !mfSnapshotFolderExt4WarningShown)
+ {
+- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",
+- N_("The host I/O cache for at least one controller is disabled "
+- "and the snapshot folder for this VM "
+- "is located on an %s partition. There is a known Linux "
+- "kernel bug which can lead to the corruption of the virtual "
+- "disk image under these conditions.\n"
+- "Either enable the host I/O cache permanently in the VM "
+- "settings or put the disk image and the snapshot folder "
+- "onto a different file system.\n"
+- "The host I/O cache will now be enabled for this medium"),
+- enmFsTypeSnap == RTFSTYPE_EXT4 ? "ext4" : "xfs");
+ *pfUseHostIOCache = true;
+ mfSnapshotFolderExt4WarningShown = true;
+ }
diff --git a/29-fix-ftbfs-as-needed.patch b/29-fix-ftbfs-as-needed.patch
new file mode 100644
index 0000000..a66501e
--- /dev/null
+++ b/29-fix-ftbfs-as-needed.patch
@@ -0,0 +1,16 @@
+Description: Fix FTBFS with ld --as-needed.
+Origin: vendor, http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-emulation/virtualbox/files/virtualbox-4.1.4-asneeded.patch?revision=1.2&view=markup
+
+Index: virtualbox/Config.kmk
+===================================================================
+--- virtualbox.orig/Config.kmk 2015-04-02 15:46:59.611743003 +0200
++++ virtualbox/Config.kmk 2015-04-02 15:46:59.611743003 +0200
+@@ -6409,7 +6409,7 @@
+ TEMPLATE_VBoxBldProg_LDFLAGS.amd64 = -m64
+ TEMPLATE_VBoxBldProg_LDFLAGS.sparc64 = -m64
+ ifeq ($(KBUILD_HOST),linux)
+-TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl
++TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl crypt
+ else ifeq ($(KBUILD_HOST),os2)
+ TEMPLATE_VBoxBldProg_TOOL = GXX3OMF
+ TEMPLATE_VBoxBldProg_LIBS = socket iconv
diff --git a/37-python-3.7-support.patch b/37-python-3.7-support.patch
new file mode 100644
index 0000000..a780370
--- /dev/null
+++ b/37-python-3.7-support.patch
@@ -0,0 +1,17 @@
+Description: add python 3.7m as a supported version
+Author: Michael Hudson-Doyle <michael.hudson@ubuntu.com>
+Origin: vendor
+Last-Update: 2018-07-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure
++++ b/configure
+@@ -1964,7 +1964,7 @@
+ }
+ EOF
+ found=
+- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m"
++ SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m"
+ for p in $PYTHONDIR; do
+ for d in $SUPPYTHONLIBS; do
+ for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
diff --git a/VirtualBox-5.0.0_BETA3-dont-check-for-mkisofs-or-makeself.patch b/VirtualBox-5.0.0_BETA3-dont-check-for-mkisofs-or-makeself.patch
index a4d964e..4258409 100644
--- a/VirtualBox-5.0.0_BETA3-dont-check-for-mkisofs-or-makeself.patch
+++ b/VirtualBox-5.0.0_BETA3-dont-check-for-mkisofs-or-makeself.patch
@@ -1,20 +1,12 @@
---- VirtualBox-5.0.0_BETA3/configure 2015-05-09 11:45:04.405620955 +0000
-+++ VirtualBox-5.0.0_BETA3/configure.tpg 2015-05-09 11:46:10.924373618 +0000
-@@ -2706,7 +2706,7 @@
- # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
- # [ "$OS" != "darwin" ] && check_yasm
- [ "$OS" != "darwin" ] && check_xsltproc
-- [ "$OS" != "darwin" ] && check_mkisofs
-+ #[ "$OS" != "darwin" ] && check_mkisofs
- fi
-
- # the libraries
-@@ -2774,7 +2774,7 @@
+diff -Naur VirtualBox-5.2.16/configure VirtualBox-5.2.16.tpg/configure
+--- VirtualBox-5.2.16/configure 2018-07-27 16:16:32.858489000 +0000
++++ VirtualBox-5.2.16.tpg/configure 2018-07-27 16:19:05.690495478 +0000
+@@ -2823,8 +2823,6 @@
+ fi
check_compiler_h
[ $ONLY_ADDITIONS -eq 0 -a "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
- # tools/common/makeself*
+- # tools/common/makeself*
- [ $OSE -ge 1 ] && check_makeself
-+ #[ $OSE -ge 1 ] && check_makeself
fi
[ -n "$SETUP_WINE" ] && setup_wine
diff --git a/VirtualBox-5.2.10-allow-gcc-8.0.patch b/VirtualBox-5.2.10-allow-gcc-8.0.patch
new file mode 100644
index 0000000..cc88a3a
--- /dev/null
+++ b/VirtualBox-5.2.10-allow-gcc-8.0.patch
@@ -0,0 +1,14 @@
+diff -up VirtualBox-5.2.10/configure.omv~ VirtualBox-5.2.10/configure
+--- VirtualBox-5.2.10/configure.omv~ 2018-04-27 00:06:59.430723900 +0200
++++ VirtualBox-5.2.10/configure 2018-04-27 00:07:12.610421993 +0200
+@@ -440,8 +440,8 @@ check_gcc()
+ elif [ $cc_maj -lt 4 \
+ -o \( $cc_maj -eq 4 -a $cc_min -lt 4 -a "$OS" != "darwin" \) \
+ -o \( $cc_maj -eq 4 -a $cc_min -lt 2 -a "$OS" = "darwin" \) \
+- -o $cc_maj -gt 7 ]; then
+- log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x...7.x"
++ -o $cc_maj -gt 8 ]; then
++ log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x...8.x"
+ fail really
+ else
+ log_success "found version $cc_ver"
diff --git a/VirtualBox-5.2.12-add-support-for-OpenMandriva.patch b/VirtualBox-5.2.12-add-support-for-OpenMandriva.patch
new file mode 100644
index 0000000..6784535
--- /dev/null
+++ b/VirtualBox-5.2.12-add-support-for-OpenMandriva.patch
@@ -0,0 +1,286 @@
+diff -Naur VirtualBox-5.2.16/include/VBox/ostypes.h VirtualBox-5.2.16.tpg/include/VBox/ostypes.h
+--- VirtualBox-5.2.16/include/VBox/ostypes.h 2018-07-16 14:56:51.000000000 +0000
++++ VirtualBox-5.2.16.tpg/include/VBox/ostypes.h 2018-07-26 12:38:26.110659019 +0000
+@@ -95,8 +95,8 @@
+ VBOXOSTYPE_FedoraCore_x64 = 0x57100,
+ VBOXOSTYPE_Gentoo = 0x58000,
+ VBOXOSTYPE_Gentoo_x64 = 0x58100,
+- VBOXOSTYPE_Mandriva = 0x59000,
+- VBOXOSTYPE_Mandriva_x64 = 0x59100,
++ VBOXOSTYPE_OpenMandriva = 0x59000,
++ VBOXOSTYPE_OpenMandriva_x64 = 0x59100,
+ VBOXOSTYPE_RedHat = 0x5A000,
+ VBOXOSTYPE_RedHat_x64 = 0x5A100,
+ VBOXOSTYPE_Turbolinux = 0x5B000,
+diff -Naur VirtualBox-5.2.16/src/VBox/Additions/linux/installer/vboxadd-x11.sh VirtualBox-5.2.16.tpg/src/VBox/Additions/linux/installer/vboxadd-x11.sh
+--- VirtualBox-5.2.16/src/VBox/Additions/linux/installer/vboxadd-x11.sh 2018-07-16 14:57:09.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Additions/linux/installer/vboxadd-x11.sh 2018-07-26 12:39:20.921661108 +0000
+@@ -94,11 +94,11 @@
+ x11_autostart="/etc/xdg/autostart"
+ kde_autostart="/usr/share/autostart"
+ redhat_dir=/etc/X11/Xsession.d
+- mandriva_dir=/etc/X11/xinit.d
++ openmandriva_dir=/etc/X11/xinit.d
+ debian_dir=/etc/X11/xinit/xinitrc.d
+- if [ -d "$mandriva_dir" -a -w "$mandriva_dir" -a -x "$mandriva_dir" ]
++ if [ -d "$openmandriva_dir" -a -w "$openmandriva_dir" -a -x "$openmandriva_dir" ]
+ then
+- install -m 0644 $app_src "$mandriva_dir/$app_dest"
++ install -m 0644 $app_src "$openmandriva_dir/$app_dest"
+ found=1
+ fi
+ if [ -d "$x11_autostart" -a -w "$x11_autostart" -a -x "$x11_autostart" ]
+diff -Naur VirtualBox-5.2.16/src/VBox/Devices/VMMDev/VMMDev.cpp VirtualBox-5.2.16.tpg/src/VBox/Devices/VMMDev/VMMDev.cpp
+--- VirtualBox-5.2.16/src/VBox/Devices/VMMDev/VMMDev.cpp 2018-07-16 15:02:14.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Devices/VMMDev/VMMDev.cpp 2018-07-26 12:40:01.760662665 +0000
+@@ -196,7 +196,7 @@
+ case VBOXOSTYPE_OpenSUSE: pszOs = "openSUSE"; break;
+ case VBOXOSTYPE_FedoraCore: pszOs = "Fedora"; break;
+ case VBOXOSTYPE_Gentoo: pszOs = "Gentoo"; break;
+- case VBOXOSTYPE_Mandriva: pszOs = "Mandriva"; break;
++ case VBOXOSTYPE_OpenMandriva: pszOs = "OpenMandriva"; break;
+ case VBOXOSTYPE_RedHat: pszOs = "RedHat"; break;
+ case VBOXOSTYPE_Turbolinux: pszOs = "TurboLinux"; break;
+ case VBOXOSTYPE_Ubuntu: pszOs = "Ubuntu"; break;
+diff -Naur VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
+--- VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc 2018-07-16 15:02:44.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc 2018-07-26 12:40:32.026663818 +0000
+@@ -290,8 +290,8 @@
+ <file alias="os_linux26_64.png">images/os_linux26_64.png</file>
+ <file alias="os_macosx.png">images/os_macosx.png</file>
+ <file alias="os_macosx_64.png">images/os_macosx_64.png</file>
+- <file alias="os_mandriva.png">images/os_mandriva.png</file>
+- <file alias="os_mandriva_64.png">images/os_mandriva_64.png</file>
++ <file alias="os_openmandriva.png">images/os_openmandriva.png</file>
++ <file alias="os_openmandriva_64.png">images/os_openmandriva_64.png</file>
+ <file alias="os_netbsd.png">images/os_netbsd.png</file>
+ <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file>
+ <file alias="os_netware.png">images/os_netware.png</file>
+diff -Naur VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
+--- VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp 2018-07-16 15:02:53.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp 2018-07-26 12:40:53.611664641 +0000
+@@ -316,8 +316,8 @@
+ m_guestOSTypeIconNames.insert("Fedora_64", ":/os_fedora_64.png");
+ m_guestOSTypeIconNames.insert("Gentoo", ":/os_gentoo.png");
+ m_guestOSTypeIconNames.insert("Gentoo_64", ":/os_gentoo_64.png");
+- m_guestOSTypeIconNames.insert("Mandriva", ":/os_mandriva.png");
+- m_guestOSTypeIconNames.insert("Mandriva_64", ":/os_mandriva_64.png");
++ m_guestOSTypeIconNames.insert("OpenMandriva", ":/os_openmandriva.png");
++ m_guestOSTypeIconNames.insert("OpenMandriva_64", ":/os_openmandriva_64.png");
+ m_guestOSTypeIconNames.insert("RedHat", ":/os_redhat.png");
+ m_guestOSTypeIconNames.insert("RedHat_64", ":/os_redhat_64.png");
+ m_guestOSTypeIconNames.insert("Turbolinux", ":/os_turbolinux.png");
+diff -Naur VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
+--- VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp 2018-07-26 12:36:44.973655000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp 2018-07-26 12:45:28.943675133 +0000
+@@ -213,6 +213,10 @@
+
+ /* Choose the 1st item to be the current: */
+ m_pComboFamily->setCurrentIndex(0);
++ /* Default to Linux */
++ const int liIndex = m_pComboFamily->findData("Linux", TypeID);
++ if (liIndex != -1)
++ m_pComboFamily->setCurrentIndex(liIndex);
+ /* And update the linked widgets accordingly: */
+ sltFamilyChanged(m_pComboFamily->currentIndex());
+ }
+@@ -317,6 +321,16 @@
+ if (iTypeIndex != -1)
+ m_pComboType->setCurrentIndex(iTypeIndex);
+ }
++ /* Or select OpenMandriva item for Linux family as default: */
++ else if (strFamilyId == "Linux")
++ {
++ QString strDefaultID = "OpenMandriva";
++ if (ARCH_BITS == 64 && m_fSupportsHWVirtEx && m_fSupportsLongMode)
++ strDefaultID += "_64";
++ const int iIndexOpenMandriva = m_pComboType->findData(strDefaultID, TypeID);
++ if (iIndexOpenMandriva != -1)
++ m_pComboType->setCurrentIndex(iIndexOpenMandriva);
++ }
+ /* Or select Windows 7 item for Windows family as default: */
+ else if (strFamilyId == "Windows")
+ {
+@@ -327,16 +341,6 @@
+ if (iIndexWin7 != -1)
+ m_pComboType->setCurrentIndex(iIndexWin7);
+ }
+- /* Or select Ubuntu item for Linux family as default: */
+- else if (strFamilyId == "Linux")
+- {
+- QString strDefaultID = "Mandriva";
+- if (ARCH_BITS == 64 && m_fSupportsHWVirtEx && m_fSupportsLongMode)
+- strDefaultID += "_64";
+- const int iIndexMandriva = m_pComboType->findData(strDefaultID, TypeID);
+- if (iIndexMandriva != -1)
+- m_pComboType->setCurrentIndex(iIndexMandriva);
+- }
+ /* Else simply select the first one present: */
+ else
+ m_pComboType->setCurrentIndex(0);
+diff -Naur VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
+--- VirtualBox-5.2.16/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp 2018-07-16 15:03:01.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp 2018-07-26 12:45:59.240676288 +0000
+@@ -138,8 +138,8 @@
+ { QRegExp("Fe.*32", Qt::CaseInsensitive), "Fedora" },
+ { QRegExp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" },
+ { QRegExp("((Gen)|(Sab)).*32", Qt::CaseInsensitive), "Gentoo" },
+- { QRegExp("((Man)|(Mag)).*64", Qt::CaseInsensitive), "Mandriva_64" },
+- { QRegExp("((Man)|(Mag)).*32", Qt::CaseInsensitive), "Mandriva" },
++ { QRegExp("((Man)|(Mag)).*64", Qt::CaseInsensitive), "OpenMandriva_64" },
++ { QRegExp("((Man)|(Mag)).*32", Qt::CaseInsensitive), "OpenMandriva" },
+ { QRegExp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" },
+ { QRegExp("((Red)|(rhel)|(cen)).*32", Qt::CaseInsensitive), "RedHat" },
+ { QRegExp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" },
+diff -Naur VirtualBox-5.2.16/src/VBox/Installer/linux/VBoxSysInfo.sh VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/VBoxSysInfo.sh
+--- VirtualBox-5.2.16/src/VBox/Installer/linux/VBoxSysInfo.sh 2018-07-16 15:03:14.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/VBoxSysInfo.sh 2018-07-26 12:46:36.034677690 +0000
+@@ -44,11 +44,11 @@
+ # Debian-based system
+ release=`cat /etc/debian_version`
+ print_linux_info "Debian" $release
+- elif [ -r /etc/mandriva-release ]
++ elif [ -r /etc/openmandriva-release ]
+ then
+- # Mandriva-based system
+- release=`cat /etc/mandriva-release | sed -e 's/[A-Za-z ]* release //'`
+- print_linux_info "Mandriva" $release
++ # OpenMandriva-based system
++ release=`cat /etc/openmandriva-release | sed -e 's/[A-Za-z ]* release //'`
++ print_linux_info "OpenMandriva" $release
+ elif [ -r /etc/fedora-release ]
+ then
+ # Fedora-based
+diff -Naur VirtualBox-5.2.16/src/VBox/Installer/linux/distributions_rpm VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/distributions_rpm
+--- VirtualBox-5.2.16/src/VBox/Installer/linux/distributions_rpm 2018-07-16 15:03:15.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/distributions_rpm 2018-07-26 12:47:13.431679115 +0000
+@@ -7,6 +7,9 @@
+ sles11.0 = SLES_11_0
+ sles10.1 = SLES_10_1
+ mdv2011.0 = MANDRIVA_2011_0
++omv2014.0 = OPENMANDRIVA_2014_0
++omv2015.0 = OPENMANDRIVA_Lx3
++omv4000 = OPENMANDRIVA_Lx4
+ fedora26 = FEDORA_26
+ fedora25 = FEDORA_25
+ fedora24 = FEDORA_24
+diff -Naur VirtualBox-5.2.16/src/VBox/Installer/linux/rpm/rules VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/rpm/rules
+--- VirtualBox-5.2.16/src/VBox/Installer/linux/rpm/rules 2018-07-16 15:03:15.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/rpm/rules 2018-07-26 12:49:33.395684449 +0000
+@@ -47,6 +47,9 @@
+ ifeq ($(wildcard rpm/rules),)
+ $(error call rpm/rules from src/VBox/Installer/linux)
+ endif
++ifeq ($(shell if grep -q '^%distsuffix' /usr/lib/rpm/macros.d/macros.OpenMandriva 2>/dev/null; then echo yes; fi),yes)
++$(error Fix /usr/lib/rpm/macros.d/macros.OpenMandriva)
++endif
+
+ verpkg := VirtualBox-5.2
+ current := $(shell pwd)
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h VirtualBox-5.2.16.tpg/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h
+--- VirtualBox-5.2.16/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h 2018-07-16 15:03:17.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h 2018-07-26 12:49:56.334685324 +0000
+@@ -908,8 +908,8 @@
+ CIMOSType_CIMOS_NovellOES = 86,
+ CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+ CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
++ CIMOSType_CIMOS_OpenMandriva = 89,
++ CIMOSType_CIMOS_OpenMandriva_64 = 90,
+ CIMOSType_CIMOS_TurboLinux = 91,
+ CIMOSType_CIMOS_TurboLinux_64 = 92,
+ CIMOSType_CIMOS_Ubuntu = 93,
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h VirtualBox-5.2.16.tpg/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h
+--- VirtualBox-5.2.16/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h 2018-07-16 15:03:17.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/cbinding/VBoxCAPI_v3_0.h 2018-07-26 12:50:17.859686144 +0000
+@@ -1358,8 +1358,8 @@
+ CIMOSType_CIMOS_NovellOES = 86,
+ CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+ CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
++ CIMOSType_CIMOS_OpenMandriva = 89,
++ CIMOSType_CIMOS_OpenMandriva_64 = 90,
+ CIMOSType_CIMOS_TurboLinux = 91,
+ CIMOSType_CIMOS_TurboLinux_64 = 92,
+ CIMOSType_CIMOS_Ubuntu = 93,
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/include/ovfreader.h VirtualBox-5.2.16.tpg/src/VBox/Main/include/ovfreader.h
+--- VirtualBox-5.2.16/src/VBox/Main/include/ovfreader.h 2018-07-16 15:03:19.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/include/ovfreader.h 2018-07-26 12:50:34.948686795 +0000
+@@ -153,8 +153,8 @@
+ CIMOSType_CIMOS_NovellOES = 86,
+ CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+ CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
++ CIMOSType_CIMOS_OpenMandriva = 89,
++ CIMOSType_CIMOS_OpenMandriva_64 = 90,
+ CIMOSType_CIMOS_TurboLinux = 91,
+ CIMOSType_CIMOS_TurboLinux_64 = 92,
+ CIMOSType_CIMOS_Ubuntu = 93,
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/src-all/Global.cpp VirtualBox-5.2.16.tpg/src/VBox/Main/src-all/Global.cpp
+--- VirtualBox-5.2.16/src/VBox/Main/src-all/Global.cpp 2018-07-16 15:03:19.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/src-all/Global.cpp 2018-07-26 12:52:00.827690068 +0000
+@@ -250,13 +250,13 @@
+ 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 },
+
+- { "Linux", "Linux", "Mandriva", "Mandriva (32-bit)",
+- VBOXOSTYPE_Mandriva, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
++ { "Linux", "Linux", "OpenMandriva", "OpenMandriva (32-bit)",
++ VBOXOSTYPE_OpenMandriva, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
+ 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 },
+
+- { "Linux", "Linux", "Mandriva_64", "Mandriva (64-bit)",
+- VBOXOSTYPE_Mandriva_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC
++ { "Linux", "Linux", "OpenMandriva_64", "OpenMandriva (64-bit)",
++ VBOXOSTYPE_OpenMandriva_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC
+ | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
+ 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 },
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/src-server/ApplianceImpl.cpp VirtualBox-5.2.16.tpg/src/VBox/Main/src-server/ApplianceImpl.cpp
+--- VirtualBox-5.2.16/src/VBox/Main/src-server/ApplianceImpl.cpp 2018-07-16 15:03:20.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/src-server/ApplianceImpl.cpp 2018-07-26 12:52:53.873692089 +0000
+@@ -165,8 +165,8 @@
+ { ovf::CIMOSType_CIMOS_SunJavaDesktopSystem, VBOXOSTYPE_Linux },
+ { ovf::CIMOSType_CIMOS_TurboLinux, VBOXOSTYPE_Turbolinux },
+ { ovf::CIMOSType_CIMOS_TurboLinux_64, VBOXOSTYPE_Turbolinux_x64 },
+- { ovf::CIMOSType_CIMOS_Mandriva, VBOXOSTYPE_Mandriva },
+- { ovf::CIMOSType_CIMOS_Mandriva_64, VBOXOSTYPE_Mandriva_x64 },
++ { ovf::CIMOSType_CIMOS_OpenMandriva, VBOXOSTYPE_OpenMandriva },
++ { ovf::CIMOSType_CIMOS_OpenMandriva_64, VBOXOSTYPE_OpenMandriva_x64 },
+ { ovf::CIMOSType_CIMOS_Ubuntu, VBOXOSTYPE_Ubuntu },
+ { ovf::CIMOSType_CIMOS_Ubuntu_64, VBOXOSTYPE_Ubuntu_x64 },
+ { ovf::CIMOSType_CIMOS_Debian, VBOXOSTYPE_Debian },
+@@ -228,7 +228,7 @@
+ {"SUSE", VBOXOSTYPE_OpenSUSE},
+ {"Novell", VBOXOSTYPE_OpenSUSE},
+ {"Red Hat", VBOXOSTYPE_RedHat},
+- {"Mandriva", VBOXOSTYPE_Mandriva},
++ {"OpenMandriva", VBOXOSTYPE_OpenMandriva},
+ {"Ubuntu", VBOXOSTYPE_Ubuntu},
+ {"Debian", VBOXOSTYPE_Debian},
+ {"QNX", VBOXOSTYPE_QNX},
+@@ -257,7 +257,7 @@
+ {"SUSE", VBOXOSTYPE_OpenSUSE_x64},
+ {"Novell", VBOXOSTYPE_OpenSUSE_x64},
+ {"Red Hat", VBOXOSTYPE_RedHat_x64},
+- {"Mandriva", VBOXOSTYPE_Mandriva_x64},
++ {"OpenMandriva", VBOXOSTYPE_OpenMandriva_x64},
+ {"Ubuntu", VBOXOSTYPE_Ubuntu_x64},
+ {"Debian", VBOXOSTYPE_Debian_x64},
+ {"Linux 2.4", VBOXOSTYPE_Linux24_x64},
+diff -Naur VirtualBox-5.2.16/src/VBox/Main/xml/Settings.cpp VirtualBox-5.2.16.tpg/src/VBox/Main/xml/Settings.cpp
+--- VirtualBox-5.2.16/src/VBox/Main/xml/Settings.cpp 2018-07-16 15:03:23.000000000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Main/xml/Settings.cpp 2018-07-26 12:53:20.741693113 +0000
+@@ -5095,7 +5095,7 @@
+ { "opensuse", "OpenSUSE" },
+ { "fedoracore", "Fedora" },
+ { "gentoo", "Gentoo" },
+- { "mandriva", "Mandriva" },
++ { "openmandriva", "OpenMandriva" },
+ { "redhat", "RedHat" },
+ { "ubuntu", "Ubuntu" },
+ { "xandros", "Xandros" },
diff --git a/VirtualBox-5.2.16-use-xcb-on-wayland.patch b/VirtualBox-5.2.16-use-xcb-on-wayland.patch
new file mode 100644
index 0000000..c85ff0a
--- /dev/null
+++ b/VirtualBox-5.2.16-use-xcb-on-wayland.patch
@@ -0,0 +1,12 @@
+diff -Naur VirtualBox-5.2.16/src/VBox/Installer/linux/VBox.sh VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/VBox.sh
+--- VirtualBox-5.2.16/src/VBox/Installer/linux/VBox.sh 2018-07-25 12:27:21.803763000 +0000
++++ VirtualBox-5.2.16.tpg/src/VBox/Installer/linux/VBox.sh 2018-07-25 12:31:32.200747261 +0000
+@@ -110,7 +110,7 @@
+ APP=`basename $0`
+ case "$APP" in
+ VirtualBox|virtualbox)
+- exec "$INSTALL_DIR/VirtualBox" "$@"
++ QT_QPA_PLATFORM=xcb exec "$INSTALL_DIR/VirtualBox" "$@"
+ ;;
+ VBoxManage|vboxmanage)
+ exec "$INSTALL_DIR/VBoxManage" "$@"
diff --git a/fix-build-failure-new-acpica-unix.patch b/fix-build-failure-new-acpica-unix.patch
new file mode 100644
index 0000000..cf17c8d
--- /dev/null
+++ b/fix-build-failure-new-acpica-unix.patch
@@ -0,0 +1,40 @@
+Description: This is a fix for the new build failure introduced by new acpica-unix,
+ lets workaround it for now
+ see discussion in: https://github.com/acpica/acpica/commit/f9a88a4c1cd020b6a5475d63b29626852a0b5f37#diff-95e84a7c99c268ce5433dea47cf17ec0
+Author: FreeBSD team https://svnweb.freebsd.org/ports/head/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk?revision=469000&view=co
+Bug-Debian: https://bugs.debian.org/899318
+Last-Update: 2018-05-25
+
+--- virtualbox-5.2.12-dfsg.orig/src/VBox/Devices/Makefile.kmk
++++ virtualbox-5.2.12-dfsg/src/VBox/Devices/Makefile.kmk
+@@ -828,7 +828,12 @@ if !defined(VBOX_ONLY_EXTPACKS)
+
+ $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
+ $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
++ $(QUIET)$(RM) -f $@ $@.tmp
+ $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
++ $(QUIET)$(MV) -f $@ $@.tmp
++ $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
++ --output $@ $@.tmp
++ $(QUIET)$(RM) -f $@.tmp
+
+ vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
+
+@@ -838,6 +843,8 @@ if !defined(VBOX_ONLY_EXTPACKS)
+ $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
+ $(QUIET)$(MV) -f $@ $@.tmp
+ $(QUIET)$(SED) -e "s/AmlCode/AmlCodeSsdtStandard/g" \
++ -e "s/__VBOXSSDT-STANDARD_HEX__/__VBOXSSDT_STANDARD_HEX__/g" \
++ -e "s/vboxssdt-standard_aml_code/AmlCodeSsdtStandard/g" \
+ --output $@ $@.tmp
+ $(QUIET)$(RM) -f $@.tmp
+
+@@ -853,6 +860,8 @@ if !defined(VBOX_ONLY_EXTPACKS)
+ $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1
+ $(QUIET)$(MV) -f $@ $@.tmp
+ $(QUIET)$(SED) -e "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
++ -e "s/__VBOXSSDT-CPUHOTPLUG_HEX__/__VBOXSSDT_CPUHOTPLUG_HEX__/g" \
++ -e "s/vboxssdt-cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
+ --output $@ $@.tmp
+ $(QUIET)$(RM) -f $@.tmp $@.pre $@.pre1
+
diff --git a/videorec.patch b/videorec.patch
new file mode 100644
index 0000000..f5f96d2
--- /dev/null
+++ b/videorec.patch
@@ -0,0 +1,85 @@
+Index: virtualbox/configure
+===================================================================
+--- virtualbox.orig/configure
++++ virtualbox/configure
+@@ -1653,6 +1654,41 @@
+
+
+ #
++# Check for libopus
++#
++check_libopus()
++{
++ if [ ! -z "$BUILD_LIBOPUS" ]; then
++ test_header libopus
++ if which_wrapper pkg-config > /dev/null; then
++ libopus_ver=`pkg-config opus --modversion 2>> $LOG`
++ if [ $? -eq 0 ]; then
++ FLGOPUS=`pkg-config opus --cflags`
++ INCOPUS=`strip_I "$FLGOPUS"`
++ LIBOPUS=`pkg-config opus --libs`
++ fi
++ cat > $ODIR.tmp_src.cc << EOF
++#include <cstdio>
++#include <opus/opus.h>
++extern "C" int main(void)
++{
++ OpusEncoder *test;
++ printf("found, OK.\n");
++}
++EOF
++ [ -n "$INCOPUS" ] && I_INCOPUS=`prefix_I "$INCOPUS"`
++ if test_compile "$LIBOPUS $I_INCOPUS" opus opus; then
++ if test_execute; then
++ cnf_append "SDK_VBOX_OPUS_INCS" "$INCOPUS"
++ cnf_append "SDK_VBOX_OPUS_LIBS" "`strip_l "$LIBOPUS"`"
++ fi
++ fi
++ fi
++ fi
++}
++
++
++#
+ # Check for libvpx
+ #
+ check_vpx()
+@@ -2529,6 +2563,9 @@
+ --enable-hardening)
+ WITH_HARDENING=2
+ ;;
++ --enable-system-libopus)
++ BUILD_LIBOPUS=1
++ ;;
+ --disable-udptunnel)
+ WITH_UDPTUNNEL=0
+ ;;
+@@ -2754,6 +2791,7 @@
+ check_ssl
+ check_curl
+ [ $WITH_LIBVPX -eq 1 ] && check_vpx
++ check_libopus
+ [ "$OS" != "darwin" ] && check_z
+ [ "$OS" != "darwin" ] && check_png
+ [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
+diff --git a/Config.kmk b/Config.kmk
+index ee6f70771..0d2408384 100644
+--- a/Config.kmk
++++ b/Config.kmk
+@@ -1179,14 +1179,14 @@ ifdef VBOX_OSE
+ ifn1of ($(KBUILD_TARGET), darwin linux solaris win)
+ VBOX_WITH_INSTALLER=
+ endif
+- # if1of ($(KBUILD_TARGET), win)
++ if1of ($(KBUILD_TARGET), win)
+ # Undefine codec libraries which are not needed.
+ VBOX_WITH_LIBVPX=
+ VBOX_WITH_LIBOPUS=
+ # Disable video recording (with audio support).
+ VBOX_WITH_VIDEOREC=
+ VBOX_WITH_AUDIO_VIDEOREC=
+- # endif
++ endif
+ # branding
+ VBOX_BRAND_LICENSE_HTML := $(PATH_ROOT)/doc/License-gpl-2.0.html
+ VBOX_BRAND_LICENSE_RTF := $(PATH_ROOT)/doc/License-gpl-2.0.rtf
diff --git a/virtualbox-5.2.10-python-3.7.patch b/virtualbox-5.2.10-python-3.7.patch
new file mode 100644
index 0000000..dcac7e9
--- /dev/null
+++ b/virtualbox-5.2.10-python-3.7.patch
@@ -0,0 +1,13 @@
+diff -up VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp.omv~ VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+--- VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp.omv~ 2018-04-27 01:37:19.442871087 +0200
++++ VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp 2018-04-27 01:37:33.612523461 +0200
+@@ -440,7 +440,7 @@ char *PyTraceback_AsString(PyObject *exc
+ #if PY_MAJOR_VERSION <= 2
+ char *tempResult = PyString_AsString(obResult);
+ #else
+- char *tempResult = PyUnicode_AsUTF8(obResult);
++ const char *tempResult = PyUnicode_AsUTF8(obResult);
+ #endif
+ result = (char *)PyMem_Malloc(strlen(tempResult)+1);
+ if (result==NULL)
+diff -up VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/PyXPCOM.h.omv~ VirtualBox-5.2.10/src/libs/xpcom18a4/python/src/PyXPCOM.h
diff --git a/virtualbox-5.2.10-qt-5.11.patch b/virtualbox-5.2.10-qt-5.11.patch
new file mode 100644
index 0000000..6062edf
--- /dev/null
+++ b/virtualbox-5.2.10-qt-5.11.patch
@@ -0,0 +1,11 @@
+diff -up VirtualBox-5.2.10/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp.omv~ VirtualBox-5.2.10/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
+--- VirtualBox-5.2.10/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp.omv~ 2018-04-27 01:31:42.763060610 +0200
++++ VirtualBox-5.2.10/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp 2018-04-27 01:32:08.839427839 +0200
+@@ -23,6 +23,7 @@
+ # include <QRegExpValidator>
+
+ /* GUI includes: */
++# include <QButtonGroup>
+ # include "QIWidgetValidator.h"
+ # include "UIGlobalSettingsProxy.h"
+ # include "UIExtraDataManager.h"
diff --git a/virtualbox.spec b/virtualbox.spec
index bf348c7..e26323d 100644
--- a/virtualbox.spec
+++ b/virtualbox.spec
@@ -1,7 +1,17 @@
+%ifarch %{ix86}
+# This is bogus, but at normal optimization levels, gcc
+# tries to allocate more memory than 32-bit address space
+# can hold :/
+%global optflags %{optflags} -g0 -fno-lto -fuse-ld=bfd -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+%global ldflags %{ldflags} -g0 -fno-lto -fuse-ld=bfd -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+%endif
+
# Workaround for the dependency generator somehow
# thinking x11-driver-video-vboxvideo provides libGL.so.1()(64bit)
# causing Mesa to go missing...
%define __noautoprov 'libGL.*'
+%global __provides_exclude ^VBox|\^libGL\\.so\\.1|\^libEGL\\.so\\.1
+%global __requires_exclude ^VBox
%define beta %{nil}
%define kname vboxdrv
@@ -24,7 +34,7 @@
%ifarch %{ix86}
%define vbox_platform linux.x86
%endif
-%ifarch x86_64
+%ifarch x86_64 znver1
%define vbox_platform linux.amd64
%endif
@@ -42,7 +52,7 @@
Summary: A general-purpose full virtualizer for x86 hardware
Name: virtualbox
-Version: 5.2.8
+Version: 5.2.16
Release: 1
License: GPLv2
Group: Emulators
@@ -53,17 +63,22 @@ Source3: virtualbox-tmpfiles.conf
Source4: 60-vboxadd.perms
Source5: vboxadd.service
Source6: vboxweb.service
+Source20: os_openmandriva.png
+Source21: os_openmandriva_64.png
Source100: virtualbox.rpmlintrc
# (tpg) dkms is used to build kernel modules, so use it everywhere
Patch1: virtualbox-fix-modules-rebuild-command.patch
Patch3: VirtualBox-4.1.8-futex.patch
Patch4: virtualbox-fix-vboxadd-req.patch
+Patch5: virtualbox-5.2.10-qt-5.11.patch
+Patch6: virtualbox-5.2.10-python-3.7.patch
# (tmb) disable update notification (OpenSuSe)
Patch7: VirtualBox-4.3.0-noupdate-check.patch
# don't check for:
# - mkisofs: we're not going to build the additions .iso file
# - makeself: we're not going to create the stanalone .run installers
Patch9: VirtualBox-5.0.0_BETA3-dont-check-for-mkisofs-or-makeself.patch
+Patch10: VirtualBox-5.2.10-allow-gcc-8.0.patch
Patch16: virtualbox-default-to-mandriva.patch
Patch18: VirtualBox-5.1.8-gsoap-2.8.13.patch
@@ -71,12 +86,29 @@ Patch22: virtualbox-no-prehistoric-xfree86.patch
Patch23: VirtualBox-5.0.10-no-bundles.patch
Patch24: VirtualBox-5.0.18-xserver_guest_xorg19.patch
-ExclusiveArch: %{ix86} x86_64
+# "Borrowed" from Debian
+Patch103: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/06-xsession.patch
+Patch104: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/07-vboxnetflt-reference.patch
+Patch107: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/16-no-update.patch
+Patch108: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/18-system-xorg.patch
+Patch109: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/27-hide-host-cache-warning.patch
+Patch110: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/29-fix-ftbfs-as-needed.patch
+Patch111: https://sources.debian.org/data/contrib/v/virtualbox/5.2.16-dfsg-3/debian/patches/37-python-3.7-support.patch
+
+# (tpg) add support for OpenMandriva
+Patch200: VirtualBox-5.2.12-add-support-for-OpenMandriva.patch
+# (tpg) do not crash on Wayland
+Patch201: VirtualBox-5.2.16-use-xcb-on-wayland.patch
+
+ExclusiveArch: %{ix86} x86_64 znver1
BuildRequires: dev86
BuildRequires: dkms
BuildRequires: gawk
+%ifnarch %{ix86}
BuildRequires: gsoap
+%endif
BuildRequires: acpica
+BuildRequires: yasm
BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: xsltproc
BuildRequires: libcap-devel
@@ -88,11 +120,12 @@ BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(ext2fs)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
+BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libIDL-2.0)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libvncserver)
-BuildRequires: pkgconfig(python2)
+BuildRequires: pkgconfig(python)
BuildRequires: qt5-qttools
BuildRequires: qt5-linguist-tools
BuildRequires: pkgconfig(Qt5Core)
@@ -123,9 +156,8 @@ BuildRequires: docbook-dtd44-xml
%endif
# bogus devel-file-in-non-devel-package errors in dkms subpackage
BuildConflicts: rpmlint < 1.4-37
-
Requires(post,preun,postun): rpm-helper
-Requires: kmod(vboxdrv) = %{version}
+#Requires: kmod(vboxdrv) = %{version}
Suggests: %{name}-doc
Conflicts: dkms-%{name} < 5.0.24-1
@@ -146,9 +178,9 @@ Kernel support for VirtualBox.
%package guest-additions
Summary: Additions for VirtualBox guest systems
Group: Emulators
-Requires: kmod(vboxguest) = %{version}
-Requires: kmod(vboxsf) = %{version}
-Requires: kmod(vboxvideo) = %{version}
+#Requires: kmod(vboxguest) = %{version}
+#Requires: kmod(vboxsf) = %{version}
+#Requires: kmod(vboxvideo) = %{version}
Requires: x11-driver-video-vboxvideo
Requires(post,preun): rpm-helper
@@ -163,7 +195,7 @@ Group: System/Kernel and hardware
Obsoletes: dkms-vboxadd < %{version}-%{release}
%rename dkms-vboxvfs
%rename dkms-vboxsf
-%rename dkms-vboxvideo = %{version}-%{release}
+%rename dkms-vboxvideo
Conflicts: dkms-%{name} < 4.1.8
Requires(pre): dkms
Requires(post,preun): dkms
@@ -196,6 +228,9 @@ This package contains the user manual PDF file for %{name}.
%setup -qn %{distname}
%apply_patches
+# add OpenMandriva images
+cp -a %{SOURCE20} %{SOURCE21} src/VBox/Frontends/VirtualBox/images/
+
# Remove bundle X11 sources and some lib sources, before patching.
mv src/VBox/Additions/x11/x11include/mesa-7.2 src/VBox/Additions/x11/
rm -rf src/VBox/Additions/x11/x11include/*
@@ -223,8 +258,11 @@ VBOX_USE_SYSTEM_GL_HEADERS := 1
VBOX_NO_LEGACY_XORG_X11 := 1
VBOX_USE_SYSTEM_GL_HEADERS := 1
XSERVER_VERSION := %{x11_server_majorver}
-VBOX_BLD_PYTHON:=/usr/bin/python2
+VBOX_BLD_PYTHON:=/usr/bin/python
VBOX_GTAR:=
+TOOL_YASM_AS=yasm
+VBOX_WITH_REGISTRATION_REQUEST=
+VBOX_WITH_UPDATE_REQUEST=
EOF
sed -i 's/CXX="g++"/CXX="g++ -std=c++11"/' configure
@@ -238,7 +276,9 @@ export PATH=$PWD/BFD:$PATH
export LIBPATH_LIB="%{_lib}"
./configure \
--enable-vnc \
+%ifnarch %{ix86}
--enable-webservice \
+%endif
--disable-kmods \
--enable-qt5 \
--enable-pulse \
@@ -556,13 +596,15 @@ set -x
%{vboxlibdir}/VBoxXPCOMIPCD
%{vboxlibdir}/vboxkeyboard.tar.bz2
%{vboxlibdir}/vboxshell.py
+%ifnarch %{ix86}
%{vboxlibdir}/vboxwebsrv
+%{vboxlibdir}/webtest
+%endif
%{vboxlibdir}/virtualbox.xml
%{vboxlibdir}/scripts
%{vboxlibdir}/tools
%{vboxlibdir}/ExtensionPacks
%{vboxlibdir}/rdesktop-vrdp*
-%{vboxlibdir}/webtest
# this files need proper permission
%attr(4711,root,root) %{vboxlibdir}/VBoxHeadless
%attr(4711,root,root) %{vboxlibdir}/VBoxSDL