From 23dfa4f25416d5e4ebb15f171a7dde8de1bbd18565727f3cd68759126541ac98 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 24 Sep 2019 16:49:12 +0000 Subject: [PATCH 1/5] Accepting request 732783 from home:lwfinger:branches:Virtualization - Add BuildRequires for device-mapper - Add file "fixes_for_5.4.patch" to handle API changes in kernel 5.4 OBS-URL: https://build.opensuse.org/request/show/732783 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=505 --- fixes_for_5.4.patch | 72 +++++++++++++++++++++++++++++++++++++++++++++ virtualbox.changes | 7 +++++ virtualbox.spec | 4 +++ 3 files changed, 83 insertions(+) create mode 100644 fixes_for_5.4.patch diff --git a/fixes_for_5.4.patch b/fixes_for_5.4.patch new file mode 100644 index 0000000..394069b --- /dev/null +++ b/fixes_for_5.4.patch @@ -0,0 +1,72 @@ +Index: VirtualBox-6.0.12/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c ++++ VirtualBox-6.0.12/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +@@ -924,8 +924,13 @@ static void vboxNetFltLinuxSkBufToSG(PVB + for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++) + { + skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) ++ pSG->aSegs[iSeg].cb = pFrag->bv_len; ++ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; ++#else + pSG->aSegs[iSeg].cb = pFrag->size; + pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; ++#endif + Log6((" %p", pSG->aSegs[iSeg].pv)); + pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; + Assert(iSeg <= pSG->cSegsAlloc); +@@ -940,8 +945,13 @@ static void vboxNetFltLinuxSkBufToSG(PVB + for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++) + { + skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) ++ pSG->aSegs[iSeg].cb = pFrag->bv_len; ++ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; ++#else + pSG->aSegs[iSeg].cb = pFrag->size; + pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; ++#endif + Log6((" %p", pSG->aSegs[iSeg].pv)); + pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; + Assert(iSeg <= pSG->cSegsAlloc); +Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c ++++ VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c +@@ -444,8 +444,10 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHY + + SetPageReserved(&paPages[iPage]); + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) + MY_SET_PAGES_EXEC(&paPages[iPage], 1); + #endif ++#endif + } + *pPhys = page_to_phys(paPages); + pvRet = phys_to_virt(page_to_phys(paPages)); +@@ -492,8 +494,10 @@ RTR0DECL(void) RTMemContFree(void *pv, s + { + ClearPageReserved(&paPages[iPage]); + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) + MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); + #endif ++#endif + } + __free_pages(paPages, cOrder); + IPRT_LINUX_RESTORE_EFL_AC(); +Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c ++++ VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c +@@ -36,6 +36,9 @@ + #include + #include "internal/thread.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) ++#include ++#endif + + RTDECL(RTTHREAD) RTThreadSelf(void) + { diff --git a/virtualbox.changes b/virtualbox.changes index 599b2a6..6ac42ba 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Sep 23 17:17:18 UTC 2019 - Larry Finger + +- Add BuildRequires for device-mapper + +- Add file "fixes_for_5.4.patch" to handle API changes in kernel 5.4 + ------------------------------------------------------------------- Sat Sep 7 21:28:46 UTC 2019 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index c81950d..315d58a 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -147,6 +147,8 @@ Patch131: fixes_for_5.3.patch # Fixes for Qt5.13 on 32-bit systems Patch132: fixes_for_qt5.13.patch #endif +# Fixes for API changes in kernel 5.4 +Patch133: fixes_for_5.4.patch Patch999: virtualbox-fix-ui-background-color.patch # BuildRequires: LibVNCServer-devel @@ -163,6 +165,7 @@ BuildRequires: boost-devel %endif BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: dev86 +BuildRequires: device-mapper BuildRequires: device-mapper-devel BuildRequires: dmidecode BuildRequires: e2fsprogs-devel @@ -449,6 +452,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %ifarch %ix86 && 0%{?qt5ver} >= 51300 %patch132 -p1 %endif +%patch133 -p1 # make VB UI background colors look sane again %patch999 -p1 From 25fd248a040eb016d9800714fc0cb115505a6ccc487847bdf3f770929ff8b9b7 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 26 Sep 2019 15:11:54 +0000 Subject: [PATCH 2/5] Accepting request 733474 from home:lwfinger:branches:Virtualization - Remove BuildRequires for device-mapper as workarounds for OBS bugs are not allowed. - Added file "set_graphics_type.patch" to set graphics adapter type to VBoxVGA boo#1151896 OBS-URL: https://build.opensuse.org/request/show/733474 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=506 --- set_graphics_type.patch | 193 ++++++++++++++++++++++++++++++++++++++++ virtualbox.changes | 10 +++ virtualbox.spec | 4 +- 3 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 set_graphics_type.patch diff --git a/set_graphics_type.patch b/set_graphics_type.patch new file mode 100644 index 0000000..dbed6ab --- /dev/null +++ b/set_graphics_type.patch @@ -0,0 +1,193 @@ +Index: VirtualBox-6.0.12/src/VBox/Main/src-all/Global.cpp +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Main/src-all/Global.cpp ++++ VirtualBox-6.0.12/src/VBox/Main/src-all/Global.cpp +@@ -183,159 +183,159 @@ const Global::OSType Global::sOSTypes[] + + { "Linux", "Linux", "Linux22", "Linux 2.2", + VBOXOSTYPE_Linux22, VBOXOSHINT_RTCUTC, +- 64, 4, 2 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 64, 4, 2 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux24", "Linux 2.4 (32-bit)", + VBOXOSTYPE_Linux24, VBOXOSHINT_RTCUTC, +- 128, 16, 4 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 128, 16, 4 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux24_64", "Linux 2.4 (64-bit)", + VBOXOSTYPE_Linux24_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC, +- 128, 16, 4 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 128, 16, 4 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux26", "Linux 2.6 / 3.x / 4.x (32-bit)", + VBOXOSTYPE_Linux26, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 512, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 512, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux26_64", "Linux 2.6 / 3.x / 4.x (64-bit)", + VBOXOSTYPE_Linux26_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", "ArchLinux", "Arch Linux (32-bit)", + VBOXOSTYPE_ArchLinux, 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", "ArchLinux_64", "Arch Linux (64-bit)", + VBOXOSTYPE_ArchLinux_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", "Debian", "Debian (32-bit)", + VBOXOSTYPE_Debian, 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", "Debian_64", "Debian (64-bit)", + VBOXOSTYPE_Debian_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", "Fedora", "Fedora (32-bit)", + VBOXOSTYPE_FedoraCore, 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", "Fedora_64", "Fedora (64-bit)", + VBOXOSTYPE_FedoraCore_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", "Gentoo", "Gentoo (32-bit)", + VBOXOSTYPE_Gentoo, 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", "Gentoo_64", "Gentoo (64-bit)", + VBOXOSTYPE_Gentoo_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", "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, ++ 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", "Mandriva_64", "Mandriva (64-bit)", + VBOXOSTYPE_Mandriva_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", "Oracle", "Oracle (32-bit)", + VBOXOSTYPE_Oracle, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_X2APIC, +- 1024, 16, 12 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 12 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Oracle_64", "Oracle (64-bit)", + VBOXOSTYPE_Oracle_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | VBOXOSHINT_X2APIC, +- 1024, 16, 12 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 12 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "RedHat", "Red Hat (32-bit)", + VBOXOSTYPE_RedHat, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | 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", "RedHat_64", "Red Hat (64-bit)", + VBOXOSTYPE_RedHat_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | 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", "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)", + VBOXOSTYPE_Turbolinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 384, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 384, 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_64", "Turbolinux (64-bit)", + VBOXOSTYPE_Turbolinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 384, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 384, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Ubuntu", "Ubuntu (32-bit)", + VBOXOSTYPE_Ubuntu, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 1024, 16, 10 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 10 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Ubuntu_64", "Ubuntu (64-bit)", + VBOXOSTYPE_Ubuntu_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 1024, 16, 10 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 10 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Xandros", "Xandros (32-bit)", + VBOXOSTYPE_Xandros, VBOXOSHINT_RTCUTC | VBOXOSHINT_X2APIC, +- 256, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 256, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Xandros_64", "Xandros (64-bit)", + VBOXOSTYPE_Xandros_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_X2APIC, +- 256, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 256, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux", "Other Linux (32-bit)", + VBOXOSTYPE_Linux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 256, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 256, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux_64", "Other Linux (64-bit)", + VBOXOSTYPE_Linux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC + | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 512, 16, 8 * _1G64, GraphicsControllerType_VMSVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 512, 16, 8 * _1G64, GraphicsControllerType_VBoxVGA, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_STAC9700 }, + + { "Solaris", "Solaris", "Solaris", "Oracle Solaris 10 5/09 and earlier (32-bit)", diff --git a/virtualbox.changes b/virtualbox.changes index 6ac42ba..099b48b 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Sep 26 14:46:23 UTC 2019 - Larry Finger + +- Remove BuildRequires for device-mapper as workarounds for OBS bugs are not allowed. + +------------------------------------------------------------------- +Wed Sep 25 17:22:31 UTC 2019 - Larry Finger + +- Added file "set_graphics_type.patch" to set graphics adapter type to VBoxVGA boo#1151896 + ------------------------------------------------------------------- Mon Sep 23 17:17:18 UTC 2019 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 315d58a..475b340 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -95,6 +95,8 @@ Patch9: vbox-deprec-gsoap-service-proxies.diff #fix failed linking process during build - this patch is just quick workaround Patch10: vbox-gsoapssl-deps.diff #PATCH-FIX-OPENSUSE implement messagebox (VBoxPermissionMessage app), which is displayed, when user +# Set graphics adapter type to VBoxVGA boo#1151896 +Patch98: set_graphics_type.patch #try to start VirtualBox and is not member of vboxusers group Patch99: vbox-permissions_warning.diff #PATCH-FIX-OPENSUSE Do not include build dates on binaries, makes build-compare happier @@ -165,7 +167,6 @@ BuildRequires: boost-devel %endif BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: dev86 -BuildRequires: device-mapper BuildRequires: device-mapper-devel BuildRequires: dmidecode BuildRequires: e2fsprogs-devel @@ -419,6 +420,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch98 -p1 %patch99 -p1 %patch100 -p1 %patch101 -p1 From 6f89660efea64e9a38d2aa958c8dbf47fcfcef6f0f860aed9eb5cbf2f6a7a7a4 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 2 Oct 2019 22:12:15 +0000 Subject: [PATCH 3/5] Accepting request 734678 from home:lwfinger:branches:Virtualization - Update file "fixes_for_5.4.patch" to handle removal of DRIVER_PRIME and rework of struct ttm_buffer_object. These are needed for Kernel_HEAD_standard. OBS-URL: https://build.opensuse.org/request/show/734678 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=507 --- fixes_for_5.4.patch | 37 +++++++++++++++++++++++++++++++++++++ virtualbox.changes | 6 ++++++ 2 files changed, 43 insertions(+) diff --git a/fixes_for_5.4.patch b/fixes_for_5.4.patch index 394069b..d02a488 100644 --- a/fixes_for_5.4.patch +++ b/fixes_for_5.4.patch @@ -70,3 +70,40 @@ Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c RTDECL(RTTHREAD) RTThreadSelf(void) { +Index: VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_drv.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Additions/linux/drm/vbox_drv.c ++++ VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_drv.c +@@ -271,11 +271,13 @@ static void vbox_master_drop(struct drm_ + + static struct drm_driver driver = { + .driver_features = +- DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) ++ DRIVER_PRIME | ++#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) + DRIVER_IRQ_SHARED | + #endif +- DRIVER_PRIME, ++ DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, + .dev_priv_size = 0, + + .load = vbox_driver_load, +Index: VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_main.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Additions/linux/drm/vbox_main.c ++++ VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_main.c +@@ -619,8 +619,12 @@ static inline u64 vbox_bo_mmap_offset(st + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70) + return bo->bo.addr_space_offset; + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) ++ return drm_vma_node_offset_addr(&bo->bo.base.vma_node); ++#else + return drm_vma_node_offset_addr(&bo->bo.vma_node); + #endif ++#endif + } + + int diff --git a/virtualbox.changes b/virtualbox.changes index 099b48b..ca4b1e3 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 2 19:08:58 UTC 2019 - Larry Finger + +- Update file "fixes_for_5.4.patch" to handle removal of DRIVER_PRIME and rework of + struct ttm_buffer_object. + ------------------------------------------------------------------- Thu Sep 26 14:46:23 UTC 2019 - Larry Finger From 7f4e49c8f4eeb49d07801e5a2466c662f5ccac8d18c02ad4fe1e1844336d18be Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 7 Oct 2019 18:39:56 +0000 Subject: [PATCH 4/5] Accepting request 735938 from home:lwfinger:branches:Virtualization - Rework "fixes_for_5.4.patch" to unconditionally remove set_pages_nx() and set_pages_x() as these changes are backported to Kernel:HEAD:KMP. OBS-URL: https://build.opensuse.org/request/show/735938 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=508 --- fixes_for_5.4.patch | 22 ++++++++++------------ virtualbox.changes | 6 ++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/fixes_for_5.4.patch b/fixes_for_5.4.patch index d02a488..812a7b0 100644 --- a/fixes_for_5.4.patch +++ b/fixes_for_5.4.patch @@ -34,25 +34,23 @@ Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c =================================================================== --- VirtualBox-6.0.12.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c +++ VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c -@@ -444,8 +444,10 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHY +@@ -443,9 +443,6 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHY + } SetPageReserved(&paPages[iPage]); - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - MY_SET_PAGES_EXEC(&paPages[iPage], 1); - #endif -+#endif +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ +- MY_SET_PAGES_EXEC(&paPages[iPage], 1); +-#endif } *pPhys = page_to_phys(paPages); pvRet = phys_to_virt(page_to_phys(paPages)); -@@ -492,8 +494,10 @@ RTR0DECL(void) RTMemContFree(void *pv, s +@@ -491,9 +488,6 @@ RTR0DECL(void) RTMemContFree(void *pv, s + for (iPage = 0; iPage < cPages; iPage++) { ClearPageReserved(&paPages[iPage]); - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); - #endif -+#endif +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ +- MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); +-#endif } __free_pages(paPages, cOrder); IPRT_LINUX_RESTORE_EFL_AC(); diff --git a/virtualbox.changes b/virtualbox.changes index ca4b1e3..7193dd0 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 7 14:58:25 UTC 2019 - Larry Finger + +- Rework "fixes_for_5.4.patch" to unconditionally remove set_pages_nx() and + set_pages_x() as these changes are backported to Kernel:HEAD:KMP. + ------------------------------------------------------------------- Wed Oct 2 19:08:58 UTC 2019 - Larry Finger From 547750be9bdb5e5cd86f507eaa41ce4230aa6aaafbfab2025f445e5674ff5b8a Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 8 Oct 2019 16:39:42 +0000 Subject: [PATCH 5/5] Accepting request 736271 from home:sndirsch:branches:Virtualization - added "BuildRequires: pkgconfig(xdamage)" in order to fix build with upcoming changes in libglvnd/Mesa OBS-URL: https://build.opensuse.org/request/show/736271 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=509 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 1 + 2 files changed, 7 insertions(+) diff --git a/virtualbox.changes b/virtualbox.changes index 7193dd0..204b2b6 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 8 16:28:12 UTC 2019 - Stefan Dirsch + +- added "BuildRequires: pkgconfig(xdamage)" in order to fix build + with upcoming changes in libglvnd/Mesa + ------------------------------------------------------------------- Mon Oct 7 14:58:25 UTC 2019 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 475b340..a81e8cc 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -213,6 +213,7 @@ BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xau) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xcursor) +BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xextproto)