From 7f251d0e0d93169d6659c906a18268eb08df9014734ac3f3671e9ff03faca8c7 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 17 Nov 2021 18:23:55 +0000 Subject: [PATCH 1/2] Accepting request 932012 from home:lwfinger:branches:Virtualization - Fix builds for Kernel 5.16. File "fixes_for-5.16.patch" is added. Reorder some of the patch numbers. OBS-URL: https://build.opensuse.org/request/show/932012 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=622 --- fixes-for-5.16.patch | 80 ++++++++++++++++++++++++++++++++++++++++++++ virtualbox.changes | 6 ++++ virtualbox.spec | 65 ++++++++++++++++++++++++++++++----- 3 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 fixes-for-5.16.patch diff --git a/fixes-for-5.16.patch b/fixes-for-5.16.patch new file mode 100644 index 0000000..77ad9f8 --- /dev/null +++ b/fixes-for-5.16.patch @@ -0,0 +1,80 @@ +Index: VirtualBox-6.1.28/include/iprt/types.h +=================================================================== +--- VirtualBox-6.1.28.orig/include/iprt/types.h ++++ VirtualBox-6.1.28/include/iprt/types.h +@@ -90,8 +90,13 @@ RT_C_DECLS_END + * though they need to be long long unsigned and long long int). These + * defines conflict with our declaration in stdint.h. Adding the defines + * below omits the definitions in the system header. ++ * + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # define _UINT64_T_DECLARED + # define _INT64_T_DECLARED + # define _UINTPTR_T_DECLARED +@@ -131,13 +136,19 @@ RT_C_DECLS_END + * 3. Starting with 2.6.24, linux/types.h typedefs uintptr_t. + * We work around these issues here and nowhere else. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # if defined(__cplusplus) + typedef bool _Bool; + # endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # define bool linux_bool + # define true linux_true + # define false linux_false ++#endif + # define uintptr_t linux_uintptr_t + # include + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) +@@ -185,7 +196,11 @@ RT_C_DECLS_END + # undef true + # undef bool + # else ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # include + # endif + +Index: VirtualBox-6.1.28/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +=================================================================== +--- VirtualBox-6.1.28.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h ++++ VirtualBox-6.1.28/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +@@ -35,7 +35,9 @@ + * Then use the linux bool type for all the stuff include here. + */ + #include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #define bool linux_bool ++#endif + + #if RT_GNUC_PREREQ(4, 6) + # pragma GCC diagnostic push +Index: VirtualBox-6.1.28/src/VBox/Runtime/include/internal/iprt.h +=================================================================== +--- VirtualBox-6.1.28.orig/src/VBox/Runtime/include/internal/iprt.h ++++ VirtualBox-6.1.28/src/VBox/Runtime/include/internal/iprt.h +@@ -41,8 +41,10 @@ + && defined(IN_RING0) \ + && defined(MODULE) \ + && !defined(RT_NO_EXPORT_SYMBOL) +-# define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */ + # include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) ++# define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */ ++#endif + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + # include + # else diff --git a/virtualbox.changes b/virtualbox.changes index 1fd200c..19b6bde 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 17 06:07:49 UTC 2021 - Larry Finger + +- Fix builds for Kernel 5.16. File "fixes_for-5.16.patch" is added. + Reorder some of the patch numbers. + ------------------------------------------------------------------- Wed Oct 20 05:48:42 UTC 2021 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index f66c710..a1366e8 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -174,13 +174,14 @@ Patch135: fix-missing-includes-with-qt-5.15.patch Patch136: fixes_for_gcc10.patch # Fix for changes in GSOAP 2.8.103 Patch137: handle_gsoap_208103.patch -# Fix for struct file_operations backport in 15.3 -Patch139: fixes_for_leap15.3.patch -Patch141: vb-6.1.16-modal-dialog-parent.patch # Fixes for kernel 5.14 -Patch142: fixes_for_5.14.patch +Patch138: fixes_for_5.14.patch +Patch139: fixes-for-5.15.patch +Patch140: fixes-for-5.16.patch +# Fix for struct file_operations backport in 15.3 +Patch142: fixes_for_leap15.3.patch +Patch143: vb-6.1.16-modal-dialog-parent.patch Patch144: fixes_for_leap15.4.patch -Patch145: fixes-for-5.15.patch Patch999: virtualbox-fix-ui-background-color.patch # # Common BuildRequires for both virtualbox and virtualbox-kmp @@ -314,6 +315,11 @@ the terms of the GNU Public License (GPL). + + + + + ########################################## %package qt Summary: Qt GUI part for %{name} @@ -342,6 +348,11 @@ This package contains the code for the GUI used to control VMs. + + + + + ######################################### %package websrv Summary: WebService GUI part for %{name} @@ -364,6 +375,11 @@ The VirtualBox web server is used to control headless VMs using a browser. + + + + + ######################################### %package guest-x11 Summary: VirtualBox X11 drivers for mouse and video @@ -388,6 +404,11 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers + + + + + ########################################### %package guest-tools Summary: VirtualBox guest tools @@ -417,6 +438,11 @@ VirtualBox guest addition tools. + + + + + ########################################### %package -n python3-%{name} Summary: Python bindings for %{name} @@ -446,6 +472,11 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package. + + + + + ########################################### %package devel Summary: Devel files for %{name} @@ -470,6 +501,11 @@ Development file for %{name} + + + + + ########################################### %package host-source Summary: Source files for %{name} host kernel modules @@ -512,6 +548,11 @@ sudo /usr/sbin/vboxguestconfig + + + + + ########################################### %package guest-desktop-icons Summary: Icons for guest desktop files @@ -535,6 +576,11 @@ This package contains icons for guest desktop files that were created on the des + + + + + ########################################### %package vnc Summary: VNC desktop sharing @@ -602,17 +648,18 @@ This package contains the kernel-modules that VirtualBox uses to create or run v %patch135 -p1 %patch136 -p1 %patch137 -p1 +%patch138 -p1 +%patch139 -p1 +%patch140 -p1 %if 0%{?sle_version} == 150300 && 0%{?is_opensuse} # Patch for Leap 15.3 -%patch139 -p1 -%endif -%patch141 -p1 %patch142 -p1 +%endif %if 0%{?sle_version} == 1504 && 0%{?is_opensuse} # Patch for Leap 15.4 %patch144 -p1 %endif -%patch145 -p1 +%patch143 -p1 # make VB UI background colors look sane again %patch999 -p1 From eb72d76ac8acdbfa76f3c61bcc807f777a0e9589a2948593db67b953e18c2b8e Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 17 Nov 2021 19:44:48 +0000 Subject: [PATCH 2/2] Accepting request 932026 from home:lwfinger:branches:Virtualization - Fix builds for Kernel 5.16. File "fixes-for-5.16.patch" is added. OBS-URL: https://build.opensuse.org/request/show/932026 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=623 --- virtualbox.changes | 4 ++-- virtualbox.spec | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/virtualbox.changes b/virtualbox.changes index 19b6bde..68c33fd 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- -Wed Nov 17 06:07:49 UTC 2021 - Larry Finger +Wed Nov 17 19:26:11 UTC 2021 - Larry Finger -- Fix builds for Kernel 5.16. File "fixes_for-5.16.patch" is added. +- Fix builds for Kernel 5.16. File "fixes-for-5.16.patch" is added. Reorder some of the patch numbers. ------------------------------------------------------------------- diff --git a/virtualbox.spec b/virtualbox.spec index a1366e8..eebd90f 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -321,6 +321,7 @@ the terms of the GNU Public License (GPL). ########################################## + %package qt Summary: Qt GUI part for %{name} Group: System/Emulators/PC @@ -354,6 +355,7 @@ This package contains the code for the GUI used to control VMs. ######################################### + %package websrv Summary: WebService GUI part for %{name} Group: System/Emulators/PC @@ -381,6 +383,7 @@ The VirtualBox web server is used to control headless VMs using a browser. ######################################### + %package guest-x11 Summary: VirtualBox X11 drivers for mouse and video Group: System/X11/Servers/XF86_4 @@ -410,6 +413,7 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers ########################################### + %package guest-tools Summary: VirtualBox guest tools Group: System/Emulators/PC @@ -444,6 +448,7 @@ VirtualBox guest addition tools. ########################################### + %package -n python3-%{name} Summary: Python bindings for %{name} Group: Development/Libraries/Python @@ -478,6 +483,7 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package. ########################################### + %package devel Summary: Devel files for %{name} Group: Development/Libraries/Other @@ -507,6 +513,7 @@ Development file for %{name} ########################################### + %package host-source Summary: Source files for %{name} host kernel modules Group: Development/Sources @@ -554,6 +561,7 @@ sudo /usr/sbin/vboxguestconfig ########################################### + %package guest-desktop-icons Summary: Icons for guest desktop files Group: System/Emulators/PC @@ -582,6 +590,7 @@ This package contains icons for guest desktop files that were created on the des ########################################### + %package vnc Summary: VNC desktop sharing Group: System/Emulators/PC