commit e50025afc14fb9514c22fe52caa8698c0b69051b
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Apr 22 12:23:01 2021 +0100
Add back Mageia support and default Linux OS as Fedora
From Mageia add VirtualBox-6.0.10-convert-map-python3.patch
Add a couple of patches of openSuse for qt and
virtualbox-snpritnf-buffer-overflow.patch
Drop patch of aiobug is for EL6 only
VirtualBox-5.1.0-add-Mageia-support.patch | 195 -----------------------
VirtualBox-6.0.10-convert-map-python3.patch | 9 ++
VirtualBox-6.1.20-add-Mageia-support.patch | 238 ++++++++++++++++++++++++++++
VirtualBox-OSE-4.0.2-aiobug.patch | 28 ----
VirtualBox.spec | 34 +++-
fixes_for_Qt5.11to15.patch | 65 ++++++++
os_mageia.png | Bin 4254 -> 1982 bytes
os_mageia_64_x2.png | Bin 0 -> 4624 bytes
os_mageia_64_x3.png | Bin 0 -> 6936 bytes
os_mageia_64_x4.png | Bin 0 -> 8227 bytes
os_mageia_x2.png | Bin 0 -> 3858 bytes
os_mageia_x3.png | Bin 0 -> 5641 bytes
os_mageia_x4.png | Bin 0 -> 7064 bytes
vbox-default-os-type.diff | 25 +++
virtualbox-snpritnf-buffer-overflow.patch | 12 ++
15 files changed, 378 insertions(+), 228 deletions(-)
---
diff --git a/VirtualBox-6.0.10-convert-map-python3.patch
b/VirtualBox-6.0.10-convert-map-python3.patch
new file mode 100644
index 0000000..1bae0f4
--- /dev/null
+++ b/VirtualBox-6.0.10-convert-map-python3.patch
@@ -0,0 +1,9 @@
+diff -Nurp VirtualBox-6.0.10.orig/src/VBox/RDP/client-1.8.4/keymaps/convert-map
VirtualBox-6.0.10/src/VBox/RDP/client-1.8.4/keymaps/convert-map
+--- VirtualBox-6.0.10.orig/src/VBox/RDP/client-1.8.4/keymaps/convert-map 2019-07-12
11:38:37.000000000 +0300
++++ VirtualBox-6.0.10/src/VBox/RDP/client-1.8.4/keymaps/convert-map 2019-08-30
19:06:04.712761560 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2
++#!/usr/bin/env python3
+ # -*-Python-*-
+ #
+ # Copyright 2001 Peter Åstrand <astrand(a)cendio.se> for Cendio AB
diff --git a/VirtualBox-6.1.20-add-Mageia-support.patch
b/VirtualBox-6.1.20-add-Mageia-support.patch
new file mode 100644
index 0000000..17a157e
--- /dev/null
+++ b/VirtualBox-6.1.20-add-Mageia-support.patch
@@ -0,0 +1,238 @@
+
+ include/VBox/ostypes.h | 2 ++
+ src/VBox/Additions/linux/installer/vboxadd-x11.sh | 6
++++++
+ src/VBox/Devices/VMMDev/VMMDev.cpp | 1 +
+ src/VBox/Frontends/VirtualBox/VirtualBox2.qrc | 2 ++
+ src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc | 2 ++
+ src/VBox/Frontends/VirtualBox/VirtualBox2_x3.qrc | 2 ++
+ src/VBox/Frontends/VirtualBox/VirtualBox2_x4.qrc | 2 ++
+ src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp | 2 ++
+ src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp | 6
++++--
+ src/VBox/Installer/linux/VBoxSysInfo.sh | 5
+++++
+ src/VBox/Installer/linux/distributions_rpm | 15
+++++++++++++++
+ src/VBox/Main/src-all/Global.cpp | 11
+++++++++++
+ src/VBox/Main/src-server/ApplianceImpl.cpp | 2 ++
+ src/VBox/Main/src-server/MachineImpl.cpp | 2 ++
+ src/VBox/Main/xml/Settings.cpp | 1 +
+ 15 files changed, 59 insertions(+), 2 deletions(-)
+
+diff -Nurp VirtualBox-6.1.20.orig/include/VBox/ostypes.h
VirtualBox-6.1.20/include/VBox/ostypes.h
+--- VirtualBox-6.1.20.orig/include/VBox/ostypes.h 2021-04-20 07:22:16.000000000 +0300
++++ VirtualBox-6.1.20/include/VBox/ostypes.h 2021-04-20 22:23:34.664631359 +0300
+@@ -112,6 +112,8 @@ typedef enum VBOXOSTYPE
+ VBOXOSTYPE_Xandros_x64 = 0x5D100,
+ VBOXOSTYPE_Oracle = 0x5E000,
+ VBOXOSTYPE_Oracle_x64 = 0x5E100,
++ VBOXOSTYPE_Mageia = 0x5F000,
++ VBOXOSTYPE_Mageia_x64 = 0x5F100,
+ VBOXOSTYPE_FreeBSD = 0x60000,
+ VBOXOSTYPE_FreeBSD_x64 = 0x60100,
+ VBOXOSTYPE_OpenBSD = 0x61000,
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Additions/linux/installer/vboxadd-x11.sh
VirtualBox-6.1.20/src/VBox/Additions/linux/installer/vboxadd-x11.sh
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/installer/vboxadd-x11.sh 2021-04-20
07:24:21.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/installer/vboxadd-x11.sh 2021-04-20
22:23:34.686632426 +0300
+@@ -94,8 +94,14 @@ install_x11_startup_app() {
+ x11_autostart="/etc/xdg/autostart"
+ kde_autostart="/usr/share/autostart"
+ redhat_dir=/etc/X11/Xsession.d
++ mageia_dir=/etc/X11/xinit.d
+ mandriva_dir=/etc/X11/xinit.d
+ debian_dir=/etc/X11/xinit/xinitrc.d
++ if [ -d "$mageia_dir" -a -w "$mageia_dir" -a -x
"$mageia_dir" ]
++ then
++ install -m 0644 $app_src "$mageia_dir/$app_dest"
++ found=1
++ fi
+ if [ -d "$mandriva_dir" -a -w "$mandriva_dir" -a -x
"$mandriva_dir" ]
+ then
+ install -m 0644 $app_src "$mandriva_dir/$app_dest"
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Devices/VMMDev/VMMDev.cpp
VirtualBox-6.1.20/src/VBox/Devices/VMMDev/VMMDev.cpp
+--- VirtualBox-6.1.20.orig/src/VBox/Devices/VMMDev/VMMDev.cpp 2021-04-20
07:30:47.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Devices/VMMDev/VMMDev.cpp 2021-04-20 22:23:34.690632620
+0300
+@@ -200,6 +200,7 @@ static void vmmdevLogGuestOsInfo(VBoxGue
+ case VBOXOSTYPE_OpenSUSE: pszOs = "openSUSE";
break;
+ case VBOXOSTYPE_FedoraCore: pszOs = "Fedora";
break;
+ case VBOXOSTYPE_Gentoo: pszOs = "Gentoo";
break;
++ case VBOXOSTYPE_Mageia: pszOs = "Mageia";
break;
+ case VBOXOSTYPE_Mandriva: pszOs = "Mandriva";
break;
+ case VBOXOSTYPE_RedHat: pszOs = "RedHat";
break;
+ case VBOXOSTYPE_Turbolinux: pszOs =
"TurboLinux"; break;
+diff -Nurp
VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
+---
VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp 2021-04-20
07:31:49.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp 2021-04-20
22:23:34.690632620 +0300
+@@ -326,6 +326,8 @@ UIIconPoolGeneral::UIIconPoolGeneral()
+ 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("Mageia",
":/os_mageia.png");
++ m_guestOSTypeIconNames.insert("Mageia_64",
":/os_mageia_64.png");
+ m_guestOSTypeIconNames.insert("Mandriva",
":/os_mandriva.png");
+ m_guestOSTypeIconNames.insert("Mandriva_64",
":/os_mandriva_64.png");
+ m_guestOSTypeIconNames.insert("RedHat",
":/os_redhat.png");
+diff -Nurp
VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
+---
VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp 2021-04-20
07:32:00.000000000 +0300
++++
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp 2021-04-20
22:23:34.694632814 +0300
+@@ -137,8 +137,10 @@ static const osTypePattern gs_OSTypePatt
+ { 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("Mag.*64", Qt::CaseInsensitive),
"Mageia_64" },
++ { QRegExp("Mag", Qt::CaseInsensitive),
"Mageia" },
++ { QRegExp("Man.*64", Qt::CaseInsensitive),
"Mandriva_64" },
++ { QRegExp("Man", Qt::CaseInsensitive),
"Mandriva" },
+ { 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 -Nurp VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
+--- VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2021-04-20
07:31:25.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2021-04-20
22:23:34.695632862 +0300
+@@ -64,6 +64,8 @@
+ <file
alias="os_linux_64.png">images/os_linux_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_mageia.png">images/os_mageia.png</file>
++ <file
alias="os_mageia_64.png">images/os_mageia_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_netbsd.png">images/os_netbsd.png</file>
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc
+--- VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc 2021-04-20
07:31:25.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc 2021-04-20
22:23:34.695632862 +0300
+@@ -67,6 +67,8 @@
+ <file
alias="os_linux_x2.png">images/x2/os_linux_x2.png</file>
+ <file
alias="os_macosx_64_x2.png">images/x2/os_macosx_64_x2.png</file>
+ <file
alias="os_macosx_x2.png">images/x2/os_macosx_x2.png</file>
++ <file
alias="os_mageia_64_x2.png">images/x2/os_mageia_64_x2.png</file>
++ <file
alias="os_mageia_x2.png">images/x2/os_mageia_x2.png</file>
+ <file
alias="os_mandriva_64_x2.png">images/x2/os_mandriva_64_x2.png</file>
+ <file
alias="os_mandriva_x2.png">images/x2/os_mandriva_x2.png</file>
+ <file
alias="os_netbsd_64_x2.png">images/x2/os_netbsd_64_x2.png</file>
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x3.qrc
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x3.qrc
+--- VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x3.qrc 2021-04-20
07:31:25.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x3.qrc 2021-04-20
22:23:34.695632862 +0300
+@@ -67,6 +67,8 @@
+ <file
alias="os_linux_x3.png">images/x3/os_linux_x3.png</file>
+ <file
alias="os_macosx_64_x3.png">images/x3/os_macosx_64_x3.png</file>
+ <file
alias="os_macosx_x3.png">images/x3/os_macosx_x3.png</file>
++ <file
alias="os_mageia_64_x3.png">images/x3/os_mageia_64_x3.png</file>
++ <file
alias="os_mageia_x3.png">images/x3/os_mageia_x3.png</file>
+ <file
alias="os_mandriva_64_x3.png">images/x3/os_mandriva_64_x3.png</file>
+ <file
alias="os_mandriva_x3.png">images/x3/os_mandriva_x3.png</file>
+ <file
alias="os_netbsd_64_x3.png">images/x3/os_netbsd_64_x3.png</file>
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x4.qrc
VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x4.qrc
+--- VirtualBox-6.1.20.orig/src/VBox/Frontends/VirtualBox/VirtualBox2_x4.qrc 2021-04-20
07:31:25.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Frontends/VirtualBox/VirtualBox2_x4.qrc 2021-04-20
22:23:34.695632862 +0300
+@@ -67,6 +67,8 @@
+ <file
alias="os_linux_x4.png">images/x4/os_linux_x4.png</file>
+ <file
alias="os_macosx_64_x4.png">images/x4/os_macosx_64_x4.png</file>
+ <file
alias="os_macosx_x4.png">images/x4/os_macosx_x4.png</file>
++ <file
alias="os_mageia_64_x4.png">images/x4/os_mageia_64_x4.png</file>
++ <file
alias="os_mageia_x4.png">images/x4/os_mageia_x4.png</file>
+ <file
alias="os_mandriva_64_x4.png">images/x4/os_mandriva_64_x4.png</file>
+ <file
alias="os_mandriva_x4.png">images/x4/os_mandriva_x4.png</file>
+ <file
alias="os_netbsd_64_x4.png">images/x4/os_netbsd_64_x4.png</file>
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Installer/linux/distributions_rpm
VirtualBox-6.1.20/src/VBox/Installer/linux/distributions_rpm
+--- VirtualBox-6.1.20.orig/src/VBox/Installer/linux/distributions_rpm 2021-04-20
07:32:09.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Installer/linux/distributions_rpm 2021-04-20
22:23:34.695632862 +0300
+@@ -7,6 +7,21 @@ openSUSE114 = OPENSUSE_11_4
+ openSUSE113 = OPENSUSE_11_3
+ sles11.0 = SLES_11_0
+ sles10.1 = SLES_10_1
++mga15 = MAGEIA_15
++mga14 = MAGEIA_14
++mga13 = MAGEIA_13
++mga12 = MAGEIA_12
++mga11 = MAGEIA_11
++mga10 = MAGEIA_10
++mga9 = MAGEIA_9
++mga8 = MAGEIA_8
++mga7 = MAGEIA_7
++mga6 = MAGEIA_6
++mga5 = MAGEIA_5
++mga4 = MAGEIA_4
++mga3 = MAGEIA_3
++mga2 = MAGEIA_2
++mga1 = MAGEIA_1
+ mdv2011.0 = MANDRIVA_2011_0
+ fedora33 = FEDORA_33
+ fedora32 = FEDORA_32
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Installer/linux/VBoxSysInfo.sh
VirtualBox-6.1.20/src/VBox/Installer/linux/VBoxSysInfo.sh
+--- VirtualBox-6.1.20.orig/src/VBox/Installer/linux/VBoxSysInfo.sh 2021-04-20
07:32:09.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Installer/linux/VBoxSysInfo.sh 2021-04-20
22:23:34.695632862 +0300
+@@ -44,6 +44,11 @@ get_linux_info () {
+ # Debian-based system
+ release=`cat /etc/debian_version`
+ print_linux_info "Debian" $release
++ elif [ -r /etc/mageia-release ]
++ then
++ # Mageia-based system
++ release=`cat /etc/mageia-release | sed -e 's/[A-Za-z ]* release //'`
++ print_linux_info "Mageia" $release
+ elif [ -r /etc/mandriva-release ]
+ then
+ # Mandriva-based system
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Main/src-all/Global.cpp
VirtualBox-6.1.20/src/VBox/Main/src-all/Global.cpp
+--- VirtualBox-6.1.20.orig/src/VBox/Main/src-all/Global.cpp 2021-04-20 07:32:15.000000000
+0300
++++ VirtualBox-6.1.20/src/VBox/Main/src-all/Global.cpp 2021-04-20 22:23:34.699633056
+0300
+@@ -249,6 +249,17 @@ const Global::OSType Global::sOSTypes[]
+ 1024, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM,
0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3,
AudioControllerType_AC97, AudioCodecType_AD1980 },
+
++ { "Linux", "Linux", "Mageia",
"Mageia (32-bit)",
++ VBOXOSTYPE_Mageia, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET |
VBOXOSHINT_X2APIC,
++ 1024, 16, 20 * _1G64, GraphicsControllerType_VMSVGA,
NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3,
AudioControllerType_AC97, AudioCodecType_AD1980 },
++
++ { "Linux", "Linux", "Mageia_64",
"Mageia (64-bit)",
++ VBOXOSTYPE_Mandriva_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX |
VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC
++ | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC,
++ 1024, 16, 20 * _1G64, GraphicsControllerType_VMSVGA,
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,
+ 1024, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM,
0, StorageControllerType_PIIX4, StorageBus_IDE,
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Main/src-server/ApplianceImpl.cpp
VirtualBox-6.1.20/src/VBox/Main/src-server/ApplianceImpl.cpp
+--- VirtualBox-6.1.20.orig/src/VBox/Main/src-server/ApplianceImpl.cpp 2021-04-20
07:32:17.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Main/src-server/ApplianceImpl.cpp 2021-04-20
22:23:34.700633105 +0300
+@@ -218,6 +218,7 @@ static const osTypePattern g_aOsTypesPat
+ {"SUSE", VBOXOSTYPE_OpenSUSE},
+ {"Novell", VBOXOSTYPE_OpenSUSE},
+ {"Red Hat", VBOXOSTYPE_RedHat},
++ {"Mageia", VBOXOSTYPE_Mageia},
+ {"Mandriva", VBOXOSTYPE_Mandriva},
+ {"Ubuntu", VBOXOSTYPE_Ubuntu},
+ {"Debian", VBOXOSTYPE_Debian},
+@@ -254,6 +255,7 @@ static const osTypePattern g_aOsTypesPat
+ {"SUSE", VBOXOSTYPE_OpenSUSE_x64},
+ {"Novell", VBOXOSTYPE_OpenSUSE_x64},
+ {"Red Hat", VBOXOSTYPE_RedHat_x64},
++ {"Mageia", VBOXOSTYPE_Mageia_x64},
+ {"Mandriva", VBOXOSTYPE_Mandriva_x64},
+ {"Ubuntu", VBOXOSTYPE_Ubuntu_x64},
+ {"Debian", VBOXOSTYPE_Debian_x64},
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Main/src-server/MachineImpl.cpp
VirtualBox-6.1.20/src/VBox/Main/src-server/MachineImpl.cpp
+--- VirtualBox-6.1.20.orig/src/VBox/Main/src-server/MachineImpl.cpp 2021-04-20
07:32:18.000000000 +0300
++++ VirtualBox-6.1.20/src/VBox/Main/src-server/MachineImpl.cpp 2021-04-20
22:23:34.701633153 +0300
+@@ -1360,6 +1360,8 @@ HRESULT Machine::getEffectiveParavirtPro
+ || mUserData->s.strOsType == "Gentoo_64"
+ || mUserData->s.strOsType == "Mandriva"
+ || mUserData->s.strOsType == "Mandriva_64"
++ || mUserData->s.strOsType == "Mageia"
++ || mUserData->s.strOsType == "Mageia_64"
+ || mUserData->s.strOsType == "OpenSUSE"
+ || mUserData->s.strOsType == "OpenSUSE_64"
+ || mUserData->s.strOsType == "Oracle"
+diff -Nurp VirtualBox-6.1.20.orig/src/VBox/Main/xml/Settings.cpp
VirtualBox-6.1.20/src/VBox/Main/xml/Settings.cpp
+--- VirtualBox-6.1.20.orig/src/VBox/Main/xml/Settings.cpp 2021-04-20 07:32:21.000000000
+0300
++++ VirtualBox-6.1.20/src/VBox/Main/xml/Settings.cpp 2021-04-20 22:23:34.701633153 +0300
+@@ -5673,6 +5673,7 @@ const struct {
+ { "opensuse", "OpenSUSE" },
+ { "fedoracore", "Fedora" },
+ { "gentoo", "Gentoo" },
++ { "mageia", "Mageia" },
+ { "mandriva", "Mandriva" },
+ { "redhat", "RedHat" },
+ { "ubuntu", "Ubuntu" },
diff --git a/VirtualBox.spec b/VirtualBox.spec
index 85570aa..70f7fa3 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -46,7 +46,7 @@
Name: VirtualBox
Version: 6.1.20
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A general-purpose full virtualizer for PC hardware
License: GPLv2 or (GPLv2 and CDDL)
@@ -70,16 +70,24 @@ Source9: 96-vbox-server.preset
Source10: vboxweb.service
Source20: os_mageia.png
Source21: os_mageia_64.png
+Source22: os_mageia_x2.png
+Source23: os_mageia_64_x2.png
+Source24: os_mageia_x3.png
+Source25: os_mageia_64_x3.png
+Source26: os_mageia_x4.png
+Source27: os_mageia_64_x4.png
Patch1: VirtualBox-6.0.0-noupdate.patch
Patch2: VirtualBox-6.1.0-strings.patch
-Patch18: VirtualBox-OSE-4.0.2-aiobug.patch
+Patch3: vbox-default-os-type.diff
#Patch27: VirtualBox-gcc.patch
+#to revert on EL7
Patch29: 590355dbdcffa4081c377fd31565e172785b390c.patch
# from ArchLinux
Patch40: 007-python2-path.patch
# from Mageia
-#Patch50: VirtualBox-5.1.0-add-Mageia-support.patch
+Patch50: VirtualBox-6.1.20-add-Mageia-support.patch
Patch51: VirtualBox-5.1.0-revert-VBox.sh.patch
+Patch52: VirtualBox-6.0.10-convert-map-python3.patch
# from Fedora
# Do not show an error dialog when not running under vbox
# Do not start VBoxClient --vmsvga, we run VBoxClient --vmsvga as
@@ -88,6 +96,8 @@ Patch60: VirtualBox-5.2.10-xclient.patch
#Patch61: 0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch
# from OpenSuse
Patch70: vbox-python-detection.diff
+Patch71: fixes_for_Qt5.11to15.patch
+Patch72: virtualbox-snpritnf-buffer-overflow.patch
Patch80: VirtualBox-6.1.4-gcc10.patch
Patch86: VirtualBox-6.1.0-VBoxRem.patch
@@ -292,6 +302,9 @@ which is generated during the build of main package.
%setup -q -n %{name}-%{version}%{?prereltag}
# add Mageia images
cp -a %{SOURCE20} %{SOURCE21} src/VBox/Frontends/VirtualBox/images/
+cp -a %{SOURCE22} %{SOURCE23} src/VBox/Frontends/VirtualBox/images/x2/
+cp -a %{SOURCE24} %{SOURCE25} src/VBox/Frontends/VirtualBox/images/x3/
+cp -a %{SOURCE26} %{SOURCE27} src/VBox/Frontends/VirtualBox/images/x4/
# Remove prebuilt binary tools
find -name '*.py[co]' -delete
@@ -316,20 +329,23 @@ rm -r src/libs/zlib-1.2.*/
%patch1 -p1 -b .noupdates
%patch2 -p1 -b .strings
-%patch18 -p1 -b .aiobug
+%patch3 -p1 -b .default_os_fedora
#patch27 -p1 -b .gcc
%if 0%{?rhel} && 0%{?rhel} < 8
%patch29 -p2 -R -b .gsoap3
%endif
%if %{with python3}
%patch40 -p1 -b .python2_path
+%patch52 -p1 -b .convert-map-python3
%endif
# mageia support not ready for 6.0
-#patch50 -p1 -b .mageia-support
+%patch50 -p1 -b .mageia-support
%patch51 -p1 -b .revert-VBox.sh
%patch60 -p1 -b .xclient
#patch61 -p1 -b .automount
%patch70 -p1 -b .python-detection
+%patch71 -p1 -b .qt
+%patch72 -p1 -b .snpritnf-buffer-overflow
%patch80 -p1 -b .gcc10
%patch86 -p1 -b .vboxrem
%patch87 -p1 -b .fix-file-picker
@@ -393,6 +409,8 @@ kmk %{_smp_mflags} \
VBOX_WITHOUT_PRECOMPILED_HEADERS=1 \
VBOX_BUILD_PUBLISHER=%{publisher}
+# SDK_VBOX_LZF_LIBS="lzf" \
+# SDK_VBOX_LZF_INCS="/usr/include/liblzf" \
# VBOX_WITH_TESTCASES= \
# VBOX_WITH_VALIDATIONKIT= \
# VBOX_XCURSOR_LIBS="Xcursor Xext X11 GL" \
@@ -886,6 +904,12 @@ getent passwd vboxadd >/dev/null || \
%{_datadir}/%{name}-kmod-%{version}
%changelog
+* Thu Apr 22 2021 Sérgio Basto <sergio(a)serjux.com> - 6.1.20-2
+- Add back Mageia support and default Linux OS as Fedora
+- From Mageia add VirtualBox-6.0.10-convert-map-python3.patch
+- Add a couple of patches of openSuse for qt and
virtualbox-snpritnf-buffer-overflow.patch
+- Drop patch of aiobug is for EL6 only
+
* Wed Apr 21 2021 Sérgio Basto <sergio(a)serjux.com> - 6.1.20-1
- Update VirtualBox to 6.1.20
diff --git a/fixes_for_Qt5.11to15.patch b/fixes_for_Qt5.11to15.patch
new file mode 100644
index 0000000..8d4681b
--- /dev/null
+++ b/fixes_for_Qt5.11to15.patch
@@ -0,0 +1,65 @@
+--- VirtualBox-6.1.14.orig/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h
++++ VirtualBox-6.1.14/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h
+@@ -83,6 +83,7 @@
+ #include <QtWidgets/qgraphicsitem.h>
+ #include <QtWidgets/qgraphicslayoutitem.h>
+ #include <QtWidgets/qgraphicswidget.h>
++#include <QtWidgets/qbuttongroup.h>
+ #include <QtCore/QMetaType>
+ #include <QtGui/qevent.h>
+ #include <QtGui/qtouchdevice.h>
+---
VirtualBox-6.1.14.orig/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
++++
VirtualBox-6.1.14/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
+@@ -18,6 +18,7 @@
+ /* Qt includes: */
+ #include <QButtonGroup>
+ #include <QRegExpValidator>
++#include <QButtonGroup>
+
+ /* GUI includes: */
+ #include "QIWidgetValidator.h"
+--- VirtualBox-6.1.2.orig/include/VBox/VBoxGL2D.h
++++ VirtualBox-6.1.2/include/VBox/VBoxGL2D.h
+@@ -113,7 +113,7 @@ typedef GLvoid (APIENTRY *PFNVBOXVHWA_UN
+ /* GL_ARB_pixel_buffer_object*/
+ #ifndef Q_WS_MAC
+ /* apears to be defined on mac */
+-typedef ptrdiff_t GLsizeiptr;
++typedef long int GLsizeiptr;
+ #endif
+
+ #ifndef GL_READ_ONLY
+--- VirtualBox-6.1.2.orig/src/VBox/Devices/Graphics/vmsvga_glext/glext.h
++++ VirtualBox-6.1.2/src/VBox/Devices/Graphics/vmsvga_glext/glext.h
+@@ -6194,7 +6194,11 @@ typedef char GLchar;
+ #ifndef GL_VERSION_1_5
+ /* GL types for handling large vertex buffer objects */
+ typedef ptrdiff_t GLintptr;
++#if __BITS_PER_LONG != 64
+ typedef ptrdiff_t GLsizeiptr;
++#else
++typedef long int GLsizeiptr;
++#endif
+ #endif
+
+ #ifndef GL_ARB_vertex_buffer_object
+--- VirtualBox-6.1.12.orig/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
++++ VirtualBox-6.1.12/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
+@@ -18,6 +18,7 @@
+ /* Qt includes: */
+ #include <QApplication>
+ #include <QLabel>
++#include <QPainterPath>
+ #include <QPaintEvent>
+ #include <QStyle>
+ #include <QVBoxLayout>
+--- VirtualBox-6.1.12.orig/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
++++ VirtualBox-6.1.12/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
+@@ -37,7 +37,6 @@ class QIcon;
+ class QLabel;
+ class QMouseEvent;
+ class QObject;
+-class QPainterPath;
+ class QPaintEvent;
+ class QResizeEvent;
+ class QString;
diff --git a/os_mageia.png b/os_mageia.png
index 44f0fb5..ee70392 100644
Binary files a/os_mageia.png and b/os_mageia.png differ
diff --git a/os_mageia_64_x2.png b/os_mageia_64_x2.png
new file mode 100644
index 0000000..ce6d96a
Binary files /dev/null and b/os_mageia_64_x2.png differ
diff --git a/os_mageia_64_x3.png b/os_mageia_64_x3.png
new file mode 100644
index 0000000..19df395
Binary files /dev/null and b/os_mageia_64_x3.png differ
diff --git a/os_mageia_64_x4.png b/os_mageia_64_x4.png
new file mode 100644
index 0000000..caa5397
Binary files /dev/null and b/os_mageia_64_x4.png differ
diff --git a/os_mageia_x2.png b/os_mageia_x2.png
new file mode 100644
index 0000000..3ef3782
Binary files /dev/null and b/os_mageia_x2.png differ
diff --git a/os_mageia_x3.png b/os_mageia_x3.png
new file mode 100644
index 0000000..973cb44
Binary files /dev/null and b/os_mageia_x3.png differ
diff --git a/os_mageia_x4.png b/os_mageia_x4.png
new file mode 100644
index 0000000..d785d01
Binary files /dev/null and b/os_mageia_x4.png differ
diff --git a/vbox-default-os-type.diff b/vbox-default-os-type.diff
new file mode 100644
index 0000000..dccfe1c
--- /dev/null
+++ b/vbox-default-os-type.diff
@@ -0,0 +1,25 @@
+Index:
VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
+===================================================================
+---
VirtualBox-6.0.0.orig/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
++++ VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
+@@ -251,15 +251,15 @@ void UINameAndSystemEditor::sltFamilyCha
+ if (iIndexWin7 != -1)
+ m_pComboType->setCurrentIndex(iIndexWin7);
+ }
+- /* Or select Oracle Linux item for Linux family as default: */
++ /* Or select Fedora item for Linux family as default: */
+ else if (m_strFamilyId == "Linux")
+ {
+- QString strDefaultID = "Oracle";
++ QString strDefaultID = "Fedora";
+ if (ARCH_BITS == 64 && m_fSupportsHWVirtEx &&
m_fSupportsLongMode)
+ strDefaultID += "_64";
+- const int iIndexUbuntu = m_pComboType->findData(strDefaultID, TypeID);
+- if (iIndexUbuntu != -1)
+- m_pComboType->setCurrentIndex(iIndexUbuntu);
++ const int iIndexFedora = m_pComboType->findData(strDefaultID, TypeID);
++ if (iIndexFedora != -1)
++ m_pComboType->setCurrentIndex(iIndexFedora);
+ }
+ /* Else simply select the first one present: */
+ else
diff --git a/virtualbox-snpritnf-buffer-overflow.patch
b/virtualbox-snpritnf-buffer-overflow.patch
new file mode 100644
index 0000000..33507a9
--- /dev/null
+++ b/virtualbox-snpritnf-buffer-overflow.patch
@@ -0,0 +1,12 @@
+Index: VirtualBox-5.1.4/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
+===================================================================
+---
VirtualBox-5.1.4.orig/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
++++ VirtualBox-5.1.4/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c
+@@ -833,6 +833,7 @@ dt_gmatch(const char *s, const char *p)
+ #else
+ return (p == NULL || *p == '\0' || RTStrSimplePatternMatch(p, s)); /** @todo
implement gmatch. */
+ #endif
++ return 0;
+ }
+
+ char *