1
0
forked from pool/virtualbox

Accepting request 932027 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/932027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=227
This commit is contained in:
Dominique Leuenberger 2021-11-20 01:38:32 +00:00 committed by Git OBS Bridge
commit 4e19f40af8
3 changed files with 151 additions and 9 deletions

80
fixes-for-5.16.patch Normal file
View File

@ -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 <stddef.h>
+#else
+# include <linux/stddef.h>
+#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 <stddef.h>
+#else
+# include <linux/stddef.h>
+#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 <linux/version.h>
# 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 <stddef.h>
+#else
+# include <linux/stddef.h>
+#endif
# include <sys/types.h>
# 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 <iprt/types.h>
+#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 <linux/version.h>
+#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 <generated/autoconf.h>
# else

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 17 19:26:11 UTC 2021 - Larry Finger <Larry.Finger@gmail.com>
- 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 <Larry.Finger@gmail.com> Wed Oct 20 05:48:42 UTC 2021 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -174,13 +174,14 @@ Patch135: fix-missing-includes-with-qt-5.15.patch
Patch136: fixes_for_gcc10.patch Patch136: fixes_for_gcc10.patch
# Fix for changes in GSOAP 2.8.103 # Fix for changes in GSOAP 2.8.103
Patch137: handle_gsoap_208103.patch 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 # 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 Patch144: fixes_for_leap15.4.patch
Patch145: fixes-for-5.15.patch
Patch999: virtualbox-fix-ui-background-color.patch Patch999: virtualbox-fix-ui-background-color.patch
# #
# Common BuildRequires for both virtualbox and virtualbox-kmp # Common BuildRequires for both virtualbox and virtualbox-kmp
@ -314,7 +315,13 @@ the terms of the GNU Public License (GPL).
########################################## ##########################################
%package qt %package qt
Summary: Qt GUI part for %{name} Summary: Qt GUI part for %{name}
Group: System/Emulators/PC Group: System/Emulators/PC
@ -342,7 +349,13 @@ This package contains the code for the GUI used to control VMs.
######################################### #########################################
%package websrv %package websrv
Summary: WebService GUI part for %{name} Summary: WebService GUI part for %{name}
Group: System/Emulators/PC Group: System/Emulators/PC
@ -364,7 +377,13 @@ The VirtualBox web server is used to control headless VMs using a browser.
######################################### #########################################
%package guest-x11 %package guest-x11
Summary: VirtualBox X11 drivers for mouse and video Summary: VirtualBox X11 drivers for mouse and video
Group: System/X11/Servers/XF86_4 Group: System/X11/Servers/XF86_4
@ -388,7 +407,13 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers
########################################### ###########################################
%package guest-tools %package guest-tools
Summary: VirtualBox guest tools Summary: VirtualBox guest tools
Group: System/Emulators/PC Group: System/Emulators/PC
@ -417,7 +442,13 @@ VirtualBox guest addition tools.
########################################### ###########################################
%package -n python3-%{name} %package -n python3-%{name}
Summary: Python bindings for %{name} Summary: Python bindings for %{name}
Group: Development/Libraries/Python Group: Development/Libraries/Python
@ -446,7 +477,13 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
########################################### ###########################################
%package devel %package devel
Summary: Devel files for %{name} Summary: Devel files for %{name}
Group: Development/Libraries/Other Group: Development/Libraries/Other
@ -470,7 +507,13 @@ Development file for %{name}
########################################### ###########################################
%package host-source %package host-source
Summary: Source files for %{name} host kernel modules Summary: Source files for %{name} host kernel modules
Group: Development/Sources Group: Development/Sources
@ -512,7 +555,13 @@ sudo /usr/sbin/vboxguestconfig
########################################### ###########################################
%package guest-desktop-icons %package guest-desktop-icons
Summary: Icons for guest desktop files Summary: Icons for guest desktop files
Group: System/Emulators/PC Group: System/Emulators/PC
@ -535,7 +584,13 @@ This package contains icons for guest desktop files that were created on the des
########################################### ###########################################
%package vnc %package vnc
Summary: VNC desktop sharing Summary: VNC desktop sharing
Group: System/Emulators/PC Group: System/Emulators/PC
@ -602,17 +657,18 @@ This package contains the kernel-modules that VirtualBox uses to create or run v
%patch135 -p1 %patch135 -p1
%patch136 -p1 %patch136 -p1
%patch137 -p1 %patch137 -p1
%patch138 -p1
%patch139 -p1
%patch140 -p1
%if 0%{?sle_version} == 150300 && 0%{?is_opensuse} %if 0%{?sle_version} == 150300 && 0%{?is_opensuse}
# Patch for Leap 15.3 # Patch for Leap 15.3
%patch139 -p1
%endif
%patch141 -p1
%patch142 -p1 %patch142 -p1
%endif
%if 0%{?sle_version} == 1504 && 0%{?is_opensuse} %if 0%{?sle_version} == 1504 && 0%{?is_opensuse}
# Patch for Leap 15.4 # Patch for Leap 15.4
%patch144 -p1 %patch144 -p1
%endif %endif
%patch145 -p1 %patch143 -p1
# make VB UI background colors look sane again # make VB UI background colors look sane again
%patch999 -p1 %patch999 -p1