Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virtualbox for openSUSE:Leap:15.3 
checked in at 2021-04-29 11:54:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.3/virtualbox (Old)
 and      /work/SRC/openSUSE:Leap:15.3/.virtualbox.new.1947 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virtualbox"

Thu Apr 29 11:54:47 2021 rev:5 rq:888117 version:6.1.20

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.3/virtualbox/virtualbox.changes  2021-04-15 
14:19:29.483862245 +0200
+++ /work/SRC/openSUSE:Leap:15.3/.virtualbox.new.1947/virtualbox.changes        
2021-04-29 11:54:50.218197506 +0200
@@ -1,0 +2,39 @@
+Tue Apr 20 19:27:40 UTC 2021 - Larry Finger <[email protected]>
+
+- Version bump to (released April 20 2021 by Oracle)
+
+  This is a maintenance release. The following items were fixed and/or added:
+
+  VMM: Fixed extremely poor VM performance depending on the timing of various 
actions (regression in 6.1.0)
+  VMM: Fixed guest OS hanging under certain circumstances when Hyper-V is 
present (bug #20141)
+  VMM: Fixed Guru Meditation error when using a nested hypervisor under 
certain circumstances (bug #20175)
+  VMM: Fixed a SMAP related host panic affecting Solaris 11.4 systems with 
Intel Haswell CPUs or later (bug #16068)
+  OCI: Add cloud-init support for export to OCI and for OCI instance creation
+  GUI: Fixed "Delete all files" leaving behind Logs/VBoxUI.log (bug #20235)
+  Audio: Multiple fixes and enhancements
+  Audio: Fixed detection of duplex audio devices on macOS (5.0 regression; bug 
#20171)
+  Network: Fixed link status reporting for "not attached" adapters
+  Network: Fixed connectivity issues with e1000 in OS/2 guests (6.1.18 
regression; bug #20148)
+  Network: Fixed VxWorks e1000 driver compatibility issue (bug #20182)
+  Network: Fixed GUI checks for port forwarding rules rejecting IPv6 with "Nat 
Network" (bug #14847)
+  DHCP: Don't crash in the presence of fixed address assignments (bug #20128)
+  Serial: Fixed possible VM hang when using the a serial port in disconnected 
mode (bug #19854)
+  Webcam: Fixed interoperability with v4l2loopback and fixed a crash under 
certain circumstances (bug #20176)
+  NVMe: Fixed sporadic Windows VM hang or reboot on high CPU load
+  VBoxManage: Allow changing network adapter attachment of a saved VM with 
"modifyvm"
+  vboximg-mount: Fix for argument processing to honor the '--root' option (6.0 
regression; bug #20073)
+  Linux host and guest: Support kernel versions 5.11 (bug #20198) and 5.12
+  Linux host: Maximum MTU size increased to 16110 for host-only adapters on 
Linux kernels 4.10+ (bug #19122)
+  Linux Guest Additions: Fix vboxvideo module compilation for kernel version 
5.10.x
+  Linux Guest Additions: Fixed kernel module build for RHEL 8.4 beta and 
CentOS Stream (bug #20289)
+
+  File "fixes-for-5.11.patch" is deleted. The issue is fixed upstream.
+  File "vboxautostart.sh" is replaced by "vboxautostart-service.sh"
+  File "vboxautostart.service" is replaced by "vboxautostart-service.service"
+  Fixes boo#1183329 "virtualbox 6.1.18 crashes when it runs nested VM"
+  Fixes boo#1183125 "Leap 15.3 installation in Virtualbox without VBox 
integration"
+  Fixes CVE-2021-2264 and boo#1184542. The directory for the <user>.start 
files for
+    autostarting VMs is moved from /etc/vbox to /etc/vbox/autostart.d. In 
addition, the autostart
+    service is hardened (by Oracle).
+
+-------------------------------------------------------------------

Old:
----
  VirtualBox-6.1.18-patched.tar.bz2
  fixes-for-5.11.patch
  vboxautostart.service
  vboxautostart.sh

New:
----
  VirtualBox-6.1.20-patched.tar.bz2
  vboxautostart-service.service
  vboxautostart-service.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virtualbox.spec ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.438191925 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.442191906 +0200
@@ -15,6 +15,7 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 #create a variable that indicates we are building for Leap 15.{2,3}. These 
versions
 #need to have the guest modules build. Tumbleweed does not.
 #
@@ -76,7 +77,7 @@
 
 # ********* If the VB version exceeds 6.1.x, notify the libvirt maintainer!!
 Name:           virtualbox%{?dash}%{?name_suffix}
-Version:        6.1.18
+Version:        6.1.20
 Release:        0
 Summary:        %{package_summary}
 License:        GPL-2.0-or-later
@@ -115,8 +116,8 @@
 Source20:       README.autostart
 Source21:       vboxweb-service.service
 Source22:       vboxweb-service.sh
-Source23:       vboxautostart.service
-Source24:       vboxautostart.sh
+Source23:       vboxautostart-service.service
+Source24:       vboxautostart-service.sh
 Source97:       README.build
 Source98:       virtualbox-rpmlintrc
 Source99:       virtualbox-patch-source.sh
@@ -195,7 +196,6 @@
 Patch136:       fixes_for_gcc10.patch
 # Fix for changes in GSOAP 2.8.103
 Patch137:       handle_gsoap_208103.patch
-Patch138:       fixes-for-5.11.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
@@ -324,6 +324,21 @@
 and others, and limited virtualization of macOS guests on Apple
 hardware. VirtualBox is freely available as Open Source Software under
 the terms of the GNU Public License (GPL).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ##########################################
 
 %package qt
@@ -341,6 +356,21 @@
 
 %description qt
 This package contains the code for the GUI used to control VMs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 #########################################
 
 %package websrv
@@ -352,6 +382,21 @@
 
 %description websrv
 The VirtualBox web server is used to control headless VMs using a browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 #########################################
 
 %package guest-x11
@@ -365,6 +410,21 @@
 
 %description guest-x11
 This package contains X11 guest utilities and X11 guest mouse and video drivers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ###########################################
 
 %package guest-tools
@@ -381,6 +441,21 @@
 
 %description guest-tools
 VirtualBox guest addition tools.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ###########################################
 
 %package -n python3-%{name}
@@ -399,6 +474,21 @@
 
 %description -n python3-%{name}
 Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ###########################################
 
 %package devel
@@ -412,6 +502,21 @@
 
 %description devel
 Development file for %{name}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ###########################################
 
 %package host-source
@@ -444,6 +549,7 @@
 These can be built for custom kernels using
 sudo /sbin/vboxguestconfig
 %endif
+
 ###########################################
 %package guest-desktop-icons
 Summary:        Icons for guest desktop files
@@ -454,6 +560,21 @@
 
 %description guest-desktop-icons
 This package contains icons for guest desktop files that were created on the 
desktop.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ###########################################
 
 %package vnc
@@ -522,7 +643,6 @@
 %patch135 -p1
 %patch136 -p1
 %patch137 -p1
-%patch138 -p1
 %if 0%{?sle_version} == 150300 && 0%{?is_opensuse} 
 # Patch for Leap 15.3
 %patch139 -p1
@@ -630,6 +750,7 @@
 install -d %{buildroot}%{_unitdir}
 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
 install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
+install -d -m 755 %{buildroot}%{_sysconfdir}/vbox/autostart.d
 install -d -m 755 %{buildroot}%{_udevrulesdir}
 install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d
 
@@ -751,16 +872,17 @@
 install -m 0755 %{SOURCE19}                    
%{buildroot}%{_vbox_instdir}/vboxdrv.sh
 install -m 0644 %{SOURCE21}                    
%{buildroot}%{_unitdir}/vboxweb-service.service
 install -m 0755 %{SOURCE22}                    
%{buildroot}%{_vbox_instdir}/vboxweb-service.sh
-install -m 0644 %{SOURCE23}                    
%{buildroot}%{_unitdir}/vboxautostart.service
+install -m 0644 %{SOURCE23}                    
%{buildroot}%{_unitdir}/vboxautostart-service.service
 ln -s -f %{_sbindir}/service                    
%{buildroot}%{_sbindir}/rcvboxautostart
-install -m 0755 %{SOURCE24}                     
%{buildroot}%{_vbox_instdir}/vboxautostart.sh
+install -m 0755 %{SOURCE24}                     
%{buildroot}%{_vbox_instdir}/vboxautostart-service.sh
 # Init scripts to start virtualbox during boot
 ln -sf %{_unitdir}/vboxdrv.service             
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
 ln -sf %{_unitdir}/vboxadd-service.service     
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
-ln -sf %{_unitdir}/vboxautostart.service        
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart.service
+ln -sf %{_unitdir}/vboxautostart-service.service        
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
 
 # config file for vboxdrv and vboxweb
 install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
+install -d -m 775 %{buildroot}%{_sysconfdir}/vbox/autostart.d
 echo -e "#settings for vboxwebsrn\nVBOXWEB_USER=root" > 
%{buildroot}%{_sysconfdir}/vbox/vbox.cfg
 # config file for vboxautostart
 cat > %{buildroot}%{_sysconfdir}/vbox/autostart.cfg << EOF
@@ -835,7 +957,7 @@
 %pre
 getent group vboxusers >/dev/null || groupadd -r vboxusers
 %service_add_pre vboxdrv.service
-%service_add_pre vboxautostart.service
+%service_add_pre vboxautostart-service.service
 
 %pre guest-tools
 # Add groups for seamless mode and shared folders:
@@ -861,7 +983,7 @@
 %set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
 %set_permissions %{_vbox_instdir}/VBoxHeadless
 %service_add_post vboxdrv.service
-%service_add_post vboxautostart.service
+%service_add_post vboxautostart-service.service
 # add new autostart stuff to the existing default config, if missing
 grep -q VBOXAUTOSTART /etc/default/virtualbox || {
     cat >> /etc/default/virtualbox << EOF
@@ -869,11 +991,17 @@
 # 
-------------------------------------------------------------------------------------------------
 # Autostart
 # 
-------------------------------------------------------------------------------------------------
-VBOXAUTOSTART_DB=/etc/vbox
+VBOXAUTOSTART_DB=/etc/vbox/autostart.d
 VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
 
 EOF
 }
+for entry in /etc/vbox/*.start
+do
+        user=$(basename "$entry" .start)
+        [ "$user" = "*" ] && break
+       mv /etc/vbox/user.start /etc/vbox/autostart.d/.
+done
 
 %post qt
 %set_permissions %{_vbox_instdir}/VirtualBoxVM
@@ -905,9 +1033,9 @@
 #######################################################
 
 %preun
-%stop_on_removal vboxautostart
+%stop_on_removal vboxautostart-service
 %stop_on_removal vboxdrv
-%service_del_preun vboxautostart.service
+%service_del_preun vboxautostart-service.service
 %service_del_preun vboxdrv.service
 exit 0
 
@@ -929,14 +1057,14 @@
 %postun
 /sbin/ldconfig
 %restart_on_update vboxdrv
-%restart_on_update vboxautostart
+%restart_on_update vboxautostart-service
 # immediately restarting virtualbox may not work. As such wait for the next 
reboot to restart
 %if ! %{defined service_del_postun_without_restart}
 export DISABLE_RESTART_ON_UPDATE=yes
-%service_del_postun vboxautostart.service
+%service_del_postun vboxautostart-service.service
 %service_del_postun vboxdrv.service
 %else
-%service_del_postun_without_restart vboxautostart.service
+%service_del_postun_without_restart vboxautostart-service.service
 %service_del_postun_without_restart vboxdrv.service
 %endif
 
@@ -1003,11 +1131,11 @@
 %dir %{_unitdir}
 %dir %{_unitdir}/multi-user.target.wants
 /usr/lib/virtualbox/vboxdrv.sh
-/usr/lib/virtualbox/vboxautostart.sh
+/usr/lib/virtualbox/vboxautostart-service.sh
 %{_unitdir}/vboxdrv.service
-%{_unitdir}/vboxautostart.service
+%{_unitdir}/vboxautostart-service.service
 %{_unitdir}/multi-user.target.wants/vboxdrv.service
-%{_unitdir}/multi-user.target.wants/vboxautostart.service
+%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
 %{_sbindir}/rcvboxdrv
 %{_sbindir}/rcvboxautostart
 /sbin/vboxconfig
@@ -1017,7 +1145,9 @@
 %verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetAdpCtl
 %verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxHeadless
 %dir %{_sysconfdir}/vbox
-%attr(1775,root,root) %{_sysconfdir}/vbox
+%dir %{_sysconfdir}/vbox/autostart.d
+%attr(755,root,root) %{_sysconfdir}/vbox
+%attr(1770,root,vboxusers) %{_sysconfdir}/vbox/autostart.d
 %config %attr(644,root,vboxusers) %{_sysconfdir}/vbox/vbox.cfg
 %config %attr(644,root,vboxusers) %{_sysconfdir}/vbox/autostart.cfg
 
@@ -1212,7 +1342,7 @@
 #
 # build kernel modules for guest and host (check novel-kmp package as example)
 # host  modules : vboxdrv,vboxnetflt,vboxnetadp
-# guest modules : vboxguest,vboxsf vboxvideo (for Leap 15.2 and Leap 15.3)
+# guest modules : vboxguest,vboxsf vboxvideo (for Leap 15.3 and older)
 echo "build kernel modules"
 for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp} \
            out/linux.*/release/bin/additions/src/vbox{guest,sf,video}; do

++++++ README.autostart ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.486191705 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.486191705 +0200
@@ -20,7 +20,7 @@
 ==========
 
 The *first* time a user configures autostart, the command: 
-VBoxManage setproperty autostartdbpath /etc/vbox 
+VBoxManage setproperty autostartdbpath /etc/vbox/autostart.d 
 needs to be run. 
 
 Note: The autostart options are stored in the /etc/vbox file, and in the 

++++++ UserManual.pdf ++++++
(binary differes)

++++++ VirtualBox-6.1.18-patched.tar.bz2 -> VirtualBox-6.1.20-patched.tar.bz2 
++++++
/work/SRC/openSUSE:Leap:15.3/virtualbox/VirtualBox-6.1.18-patched.tar.bz2 
/work/SRC/openSUSE:Leap:15.3/.virtualbox.new.1947/VirtualBox-6.1.20-patched.tar.bz2
 differ: char 11, line 1

++++++ fixes_for_leap15.2.patch ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.590191229 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.590191229 +0200
@@ -1,8 +1,8 @@
-Index: 
VirtualBox-6.1.16/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+Index: 
VirtualBox-6.1.20/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
 ===================================================================
---- 
VirtualBox-6.1.16.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
-+++ VirtualBox-6.1.16/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
-@@ -73,6 +73,10 @@
+--- 
VirtualBox-6.1.20.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
++++ VirtualBox-6.1.20/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+@@ -76,6 +76,10 @@
  #define VBOXNETFLT_OS_SPECFIC 1
  #include "../VBoxNetFltInternal.h"
  
@@ -13,10 +13,10 @@
  typedef struct VBOXNETFLTNOTIFIER {
      struct notifier_block Notifier;
      PVBOXNETFLTINS pThis;
-Index: VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_drv.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
 ===================================================================
---- VirtualBox-6.1.16.orig/src/VBox/Additions/linux/drm/vbox_drv.c
-+++ VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_drv.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_drv.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
 @@ -310,12 +310,15 @@ static void vbox_master_drop(struct drm_
  }
  
@@ -34,13 +34,13 @@
 -          DRIVER_PRIME,
 +          DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
  #else  /* >= 5.4.0 && RHEL >= 8.3 */
-         .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
+               .driver_features = DRIVER_MODESET | DRIVER_GEM | 
DRIVER_HAVE_IRQ,
  #endif /* <  5.4.0 */
-Index: VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_main.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
 ===================================================================
---- VirtualBox-6.1.16.orig/src/VBox/Additions/linux/drm/vbox_main.c
-+++ VirtualBox-6.1.16/src/VBox/Additions/linux/drm/vbox_main.c
-@@ -638,8 +638,12 @@ static inline u64 vbox_bo_mmap_offset(st
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_main.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
+@@ -640,8 +640,12 @@ static inline u64 vbox_bo_mmap_offset(st
  #elif RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,0)
        return bo->bo.addr_space_offset;
  #else
@@ -53,10 +53,10 @@
  }
  
  int
-Index: VirtualBox-6.1.16/include/iprt/cdefs.h
+Index: VirtualBox-6.1.20/include/iprt/cdefs.h
 ===================================================================
---- VirtualBox-6.1.16.orig/include/iprt/cdefs.h
-+++ VirtualBox-6.1.16/include/iprt/cdefs.h
+--- VirtualBox-6.1.20.orig/include/iprt/cdefs.h
++++ VirtualBox-6.1.20/include/iprt/cdefs.h
 @@ -1173,14 +1173,15 @@
   * Tell the compiler that we're falling through to the next case in a switch.
   * @sa RT_FALL_THRU  */

++++++ fixes_for_leap15.3.patch ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.602191174 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.602191174 +0200
@@ -1,7 +1,7 @@
-Index: VirtualBox-6.1.18/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+Index: VirtualBox-6.1.20/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
-+++ VirtualBox-6.1.18/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+--- VirtualBox-6.1.20.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
++++ VirtualBox-6.1.20/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
 @@ -137,9 +137,9 @@
  #include <linux/interrupt.h>
  #include <linux/completion.h>
@@ -14,37 +14,28 @@
  #if !defined(HAVE_UNLOCKED_IOCTL) && RTLNX_VER_MAX(2,6,38)
  # include <linux/smp_lock.h>
  #endif
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.h
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.h
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_drv.h
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.h
-@@ -154,7 +154,6 @@
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_drv.h
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.h
+@@ -154,7 +154,7 @@
  #define S64_MIN         ((s64)(-S64_MAX - 1))
  #endif
  
 -#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
++#if 1 //RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
  # include <drm/drm_file.h>
  # include <drm/drm_drv.h>
  # include <drm/drm_device.h>
-@@ -162,9 +161,6 @@
- # include <drm/drm_fourcc.h>
- # include <drm/drm_irq.h>
- # include <drm/drm_vblank.h>
--#else /* < 5.5.0 || RHEL < 8.3 */
--# include <drm/drmP.h>
--#endif
- #if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
- # include <drm/drm_encoder.h>
- #endif
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_drv.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_drv.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
 @@ -262,11 +262,7 @@ static const struct file_operations vbox
        .read = drm_read,
  };
  
--#if RTLNX_VER_MIN(5,9,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
  static void
 -#else
 -static int
@@ -57,7 +48,7 @@
        schedule_delayed_work(&vbox->refresh_work, VBOX_REFRESH_PERIOD);
        mutex_unlock(&vbox->hw_mutex);
 -
--#if RTLNX_VER_MAX(5,9,0)
+-#if RTLNX_VER_MAX(5,9,0) && !RTLNX_RHEL_MAJ_PREREQ(8,4)
 -      return 0;
 -#endif
  }
@@ -77,20 +68,21 @@
 -# endif
 -          DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
 -#else  /* >= 5.4.0 && RHEL >= 8.3 */
-         .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
+-              .driver_features = DRIVER_MODESET | DRIVER_GEM | 
DRIVER_HAVE_IRQ,
 -#endif /* <  5.4.0 */
-       .dev_priv_size = 0,
++      .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
  
  #if RTLNX_VER_MAX(4,19,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3)
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_fb.c
+       /* Legacy hooks, but still supported. */
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_fb.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_fb.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_fb.c
-@@ -405,11 +405,7 @@ void vbox_fbdev_fini(struct drm_device *
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_fb.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_fb.c
+@@ -410,11 +410,7 @@ void vbox_fbdev_fini(struct drm_device *
                                vbox_bo_unpin(bo);
                        vbox_bo_unreserve(bo);
                }
--#if RTLNX_VER_MIN(5,9,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
                drm_gem_object_put(afb->obj);
 -#else
 -              drm_gem_object_put_unlocked(afb->obj);
@@ -98,11 +90,11 @@
                afb->obj = NULL;
        }
        drm_fb_helper_fini(&fbdev->helper);
-@@ -438,24 +434,10 @@ int vbox_fbdev_init(struct drm_device *d
+@@ -443,24 +439,10 @@ int vbox_fbdev_init(struct drm_device *d
  #else
        drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
  #endif
--#if RTLNX_VER_MIN(5,7,0)
+-#if RTLNX_VER_MIN(5,7,0) || RTLNX_RHEL_MIN(8,4)
          ret = drm_fb_helper_init(dev, &fbdev->helper);
 -#elif RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
 -      ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs);
@@ -114,7 +106,7 @@
        if (ret)
                return ret;
  
--#if RTLNX_VER_MAX(5,7,0)
+-#if RTLNX_VER_MAX(5,7,0) && !RTLNX_RHEL_MAJ_PREREQ(8,4)
 -      ret = drm_fb_helper_single_add_all_connectors(&fbdev->helper);
 -      if (ret)
 -              goto err_fini;
@@ -123,15 +115,15 @@
        /* disable all the possible outputs/crtcs before entering KMS mode */
        drm_helper_disable_unused_functions(dev);
  
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_main.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_main.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_main.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_main.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
 @@ -46,11 +46,7 @@ static void vbox_user_framebuffer_destro
        struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb);
  
        if (vbox_fb->obj)
--#if RTLNX_VER_MIN(5,9,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
                drm_gem_object_put(vbox_fb->obj);
 -#else
 -              drm_gem_object_put_unlocked(vbox_fb->obj);
@@ -139,25 +131,31 @@
  
        drm_framebuffer_cleanup(fb);
        kfree(fb);
-@@ -225,7 +221,7 @@ static struct drm_framebuffer *vbox_user
+@@ -225,11 +221,7 @@ static struct drm_framebuffer *vbox_user
  err_free_vbox_fb:
        kfree(vbox_fb);
  err_unref_obj:
--#if RTLNX_VER_MIN(5,9,0)
-+#if RTLNX_VER_MIN(5,3,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
        drm_gem_object_put(obj);
- #else
-       drm_gem_object_put_unlocked(obj);
-@@ -596,7 +592,7 @@ int vbox_dumb_create(struct drm_file *fi
+-#else
+-      drm_gem_object_put_unlocked(obj);
+-#endif
+       return ERR_PTR(ret);
+ }
+ 
+@@ -596,11 +588,7 @@ int vbox_dumb_create(struct drm_file *fi
                return ret;
  
        ret = drm_gem_handle_create(file, gobj, &handle);
--#if RTLNX_VER_MIN(5,9,0)
-+#if RTLNX_VER_MIN(5,3,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
        drm_gem_object_put(gobj);
- #else
-       drm_gem_object_put_unlocked(gobj);
-@@ -635,17 +631,7 @@ void vbox_gem_free_object(struct drm_gem
+-#else
+-      drm_gem_object_put_unlocked(gobj);
+-#endif
+       if (ret)
+               return ret;
+ 
+@@ -635,17 +623,7 @@ void vbox_gem_free_object(struct drm_gem
  
  static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
  {
@@ -175,10 +173,10 @@
  }
  
  int
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_mode.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_mode.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_mode.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_mode.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_mode.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_mode.c
 @@ -398,7 +398,7 @@ static struct drm_encoder *drm_encoder_f
  static struct drm_encoder *vbox_best_single_encoder(struct drm_connector
                                                    *connector)
@@ -188,20 +186,20 @@
          struct drm_encoder *encoder;
  
          /* There is only one encoder per connector */
-@@ -885,7 +885,7 @@ out_unmap_bo:
+@@ -889,7 +889,7 @@ out_unmap_bo:
  out_unreserve_bo:
        vbox_bo_unreserve(bo);
  out_unref_obj:
--#if RTLNX_VER_MIN(5,9,0)
-+#if RTLNX_VER_MIN(5,3,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
++#if RTLNX_VER_MIN(5,3,0) || RTLNX_RHEL_MIN(8,4)
        drm_gem_object_put(obj);
  #else
        drm_gem_object_put_unlocked(obj);
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_ttm.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_ttm.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_ttm.c
-@@ -349,18 +349,9 @@ int vbox_mm_init(struct vbox_private *vb
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_ttm.c
+@@ -378,24 +378,9 @@ int vbox_mm_init(struct vbox_private *vb
                return ret;
  #endif
        ret = ttm_bo_device_init(&vbox->ttm.bdev,
@@ -209,23 +207,29 @@
 -                               vbox->ttm.bo_global_ref.ref.object,
 -#endif
                                 &vbox_bo_driver,
+-#if RTLNX_VER_MIN(5,11,0)
+-                               dev->dev,
+-#endif
 -#if RTLNX_VER_MIN(3,15,0) || RTLNX_RHEL_MAJ_PREREQ(7,1)
                                 dev->anon_inode->i_mapping,
 -#endif
 -#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
-                                  dev->vma_offset_manager,
+                                dev->vma_offset_manager,
 -#elif RTLNX_VER_MAX(5,2,0) && !RTLNX_RHEL_MAJ_PREREQ(8,2)
 -                               DRM_FILE_PAGE_OFFSET,
 -#endif
+-#if RTLNX_VER_MIN(5,11,0)
+-                               false,
+-#endif
                                 true);
        if (ret) {
                DRM_ERROR("Error initialising bo driver; %d\n", ret);
-@@ -524,7 +515,7 @@ err_free_vboxbo:
+@@ -580,7 +565,7 @@ err_free_vboxbo:
  
  static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo)
  {
--#if RTLNX_VER_MIN(5,9,0)
-+#if RTLNX_VER_MIN(5,3,0)
+-#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4)
++#if RTLNX_VER_MIN(5,3,0) || RTLNX_RHEL_MIN(8,4)
        return bo->bo.mem.start << PAGE_SHIFT;
  #else
        return bo->bo.offset;

++++++ fixes_for_sle12.patch ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.618191101 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.618191101 +0200
@@ -1,8 +1,8 @@
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_drv.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.c
-@@ -331,7 +331,9 @@ static struct drm_driver driver = {
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_drv.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.c
+@@ -330,7 +330,9 @@ static struct drm_driver driver = {
        .master_drop = vbox_master_drop,
  #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2)
  # if RTLNX_VER_MAX(4,14,0) && !RTLNX_RHEL_MAJ_PREREQ(7,5) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
@@ -12,10 +12,10 @@
  # endif
  #endif
  
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_main.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_main.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_main.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_main.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_main.c
 @@ -618,11 +618,13 @@ int vbox_dumb_destroy(struct drm_file *f
  #endif
  
@@ -30,11 +30,11 @@
  
  void vbox_gem_free_object(struct drm_gem_object *obj)
  {
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_ttm.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_ttm.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_ttm.c
-@@ -256,7 +256,7 @@ static struct ttm_backend_func vbox_tt_b
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_ttm.c
+@@ -271,7 +271,7 @@ static struct ttm_backend_func vbox_tt_b
  };
  #endif
  
@@ -43,16 +43,16 @@
  static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
                                         unsigned long size,
                                         u32 page_flags,
-@@ -275,7 +275,7 @@ static struct ttm_tt *vbox_ttm_tt_create
+@@ -290,7 +290,7 @@ static struct ttm_tt *vbox_ttm_tt_create
  #if RTLNX_VER_MAX(5,10,0)
        tt->func = &vbox_tt_backend_func;
  #endif
 -#if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
 +#if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) && 
!defined(SUSE_SLE12)
        if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
- #else
+ #elif RTLNX_VER_MAX(5,11,0)
        if (ttm_tt_init(tt, bo, page_flags)) {
-@@ -288,7 +288,7 @@ static struct ttm_tt *vbox_ttm_tt_create
+@@ -305,7 +305,7 @@ static struct ttm_tt *vbox_ttm_tt_create
  }
  
  #if RTLNX_VER_MAX(4,17,0)
@@ -61,7 +61,7 @@
  static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
  {
        return ttm_pool_populate(ttm);
-@@ -327,7 +327,7 @@ static struct ttm_bo_driver vbox_bo_driv
+@@ -353,7 +353,7 @@ static struct ttm_bo_driver vbox_bo_driv
        .io_mem_reserve = &vbox_ttm_io_mem_reserve,
        .io_mem_free = &vbox_ttm_io_mem_free,
  #if RTLNX_VER_MIN(4,12,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
@@ -70,7 +70,7 @@
        .io_mem_pfn = ttm_bo_default_io_mem_pfn,
  # endif
  #endif
-@@ -500,7 +500,7 @@ int vbox_bo_create(struct drm_device *de
+@@ -556,7 +556,7 @@ int vbox_bo_create(struct drm_device *de
  
        ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
                          ttm_bo_type_device, &vboxbo->placement,
@@ -79,7 +79,7 @@
                          align >> PAGE_SHIFT, false, NULL, acc_size,
  #else
                          align >> PAGE_SHIFT, false, acc_size,
-@@ -533,7 +533,7 @@ static inline u64 vbox_bo_gpu_offset(str
+@@ -589,7 +589,7 @@ static inline u64 vbox_bo_gpu_offset(str
  
  int vbox_bo_pin(struct vbox_bo *bo, u32 mem_type, u64 *gpu_addr)
  {
@@ -87,56 +87,56 @@
 +#if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5) || 
defined(SUSE_SLE12)
        struct ttm_operation_ctx ctx = { false, false };
  #endif
-       int i, ret;
-@@ -551,7 +551,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
-       for (i = 0; i < bo->placement.num_placement; i++)
+       int ret;
+@@ -612,7 +612,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
+ #endif
  
 -#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
 +#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) && 
!defined(SUSE_SLE12)
        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
  #else
        ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
-@@ -569,7 +569,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
+@@ -634,7 +634,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
  
  int vbox_bo_unpin(struct vbox_bo *bo)
  {
 -#if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5)
 +#if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5) || 
defined(SUSE_SLE12)
+ # if RTLNX_VER_MAX(5,11,0)
        struct ttm_operation_ctx ctx = { false, false };
- #endif
-       int i, ret;
-@@ -585,7 +585,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
-       for (i = 0; i < bo->placement.num_placement; i++)
+ # endif
+@@ -657,7 +657,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
                PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
+ #endif
  
 -#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
 +#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) && 
!defined(SUSE_SLE12)
        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
- #else
+ #elif RTLNX_VER_MAX(5,11,0)
        ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
-@@ -603,7 +603,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
+@@ -680,7 +680,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
   */
  int vbox_bo_push_sysram(struct vbox_bo *bo)
  {
--#if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5)
-+#if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5) || 
defined(SUSE_SLE12)
+-# if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5)
++# if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || 
RTLNX_SUSE_MAJ_PREREQ(15,1) || RTLNX_SUSE_MAJ_PREREQ(12,5) || 
defined(SUSE_SLE12)
        struct ttm_operation_ctx ctx = { false, false };
- #endif
+ # endif
        int i, ret;
-@@ -624,7 +624,7 @@ int vbox_bo_push_sysram(struct vbox_bo *
+@@ -701,7 +701,7 @@ int vbox_bo_push_sysram(struct vbox_bo *
        for (i = 0; i < bo->placement.num_placement; i++)
                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
  
--#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
-+#if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) && 
!defined(SUSE_SLE12)
+-# if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
++# if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && 
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) && 
!defined(SUSE_SLE12)
        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
- #else
+ # else
        ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.h
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.h
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_drv.h
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_drv.h
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_drv.h
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_drv.h
 @@ -87,6 +87,9 @@
  #else
  # define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) (0)
@@ -147,10 +147,10 @@
  
  /** @def RTLNX_RHEL_RANGE
   * Check that it's a RedHat kernel in the given version range.
-Index: VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_mode.c
+Index: VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_mode.c
 ===================================================================
---- VirtualBox-6.1.18.orig/src/VBox/Additions/linux/drm/vbox_mode.c
-+++ VirtualBox-6.1.18/src/VBox/Additions/linux/drm/vbox_mode.c
+--- VirtualBox-6.1.20.orig/src/VBox/Additions/linux/drm/vbox_mode.c
++++ VirtualBox-6.1.20/src/VBox/Additions/linux/drm/vbox_mode.c
 @@ -544,7 +544,8 @@ static void vbox_set_edid(struct drm_con
        for (i = 0; i < EDID_SIZE - 1; ++i)
                sum += edid[i];

++++++ switch_to_python3.4+.patch ++++++
--- /var/tmp/diff_new_pack.IYhF3q/_old  2021-04-29 11:54:51.646190973 +0200
+++ /var/tmp/diff_new_pack.IYhF3q/_new  2021-04-29 11:54:51.650190955 +0200
@@ -1,7 +1,7 @@
-Index: VirtualBox-6.1.14/src/bldprogs/scm.cpp
+Index: VirtualBox-6.1.20/src/bldprogs/scm.cpp
 ===================================================================
---- VirtualBox-6.1.14.orig/src/bldprogs/scm.cpp
-+++ VirtualBox-6.1.14/src/bldprogs/scm.cpp
+--- VirtualBox-6.1.20.orig/src/bldprogs/scm.cpp
++++ VirtualBox-6.1.20/src/bldprogs/scm.cpp
 @@ -2206,7 +2206,7 @@ static int scmProcessFileInner(PSCMRWSTA
                              pszTreatAs = "shell";
                          else if (   (cchFirst >= 15 && strncmp(pchFirst, 
"/usr/bin/python", 15) == 0)
@@ -11,10 +11,10 @@
                          else if (   (cchFirst >= 13 && strncmp(pchFirst, 
"/usr/bin/perl", 13) == 0)
                                   || (cchFirst >= 17 && strncmp(pchFirst, 
"/usr/bin/env perl", 17) == 0) )
                              pszTreatAs = "perl";
-Index: VirtualBox-6.1.14/src/libs/libxml2-2.9.4/configure
+Index: VirtualBox-6.1.20/src/libs/libxml2-2.9.4/configure
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/libxml2-2.9.4/configure
-+++ VirtualBox-6.1.14/src/libs/libxml2-2.9.4/configure
+--- VirtualBox-6.1.20.orig/src/libs/libxml2-2.9.4/configure
++++ VirtualBox-6.1.20/src/libs/libxml2-2.9.4/configure
 @@ -15153,10 +15153,10 @@ PYTHON_SITE_PACKAGES=
  PYTHON_TESTS=
  pythondir=
@@ -39,10 +39,10 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_path_PYTHON+:} false; then :
-Index: VirtualBox-6.1.14/src/VBox/ValidationKit/testboxscript/setup.sh
+Index: VirtualBox-6.1.20/src/VBox/ValidationKit/testboxscript/setup.sh
 ===================================================================
---- VirtualBox-6.1.14.orig/src/VBox/ValidationKit/testboxscript/setup.sh
-+++ VirtualBox-6.1.14/src/VBox/ValidationKit/testboxscript/setup.sh
+--- VirtualBox-6.1.20.orig/src/VBox/ValidationKit/testboxscript/setup.sh
++++ VirtualBox-6.1.20/src/VBox/ValidationKit/testboxscript/setup.sh
 @@ -652,7 +652,7 @@ import sys;\
  x = sys.version_info[0] == 2 and (sys.version_info[1] >= 6 or 
(sys.version_info[1] == 5 and sys.version_info[2] >= 1));\
  sys.exit(not x);\
@@ -52,14 +52,14 @@
      do
          python=`which ${python} 2> /dev/null`
          if [ -n "${python}" -a -x "${python}" ]; then
-Index: VirtualBox-6.1.14/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
+Index: VirtualBox-6.1.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
 ===================================================================
---- VirtualBox-6.1.14.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
-+++ VirtualBox-6.1.14/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
+--- VirtualBox-6.1.20.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
++++ VirtualBox-6.1.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
 @@ -20,7 +20,7 @@
  %define %PYTHON% 1
  %define VBOXDOCDIR %{_defaultdocdir}/%NAME%
- %global __requires_exclude_from ^/usr/lib/virtualbox/VBoxPython.*$
+ %global __requires_exclude_from 
^/usr/lib/virtualbox/VBoxPython.*$|^/usr/lib/python.*$|^.*\\.py$
 -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 +%{!?python_sitelib: %define python_sitelib python3 -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  
@@ -74,10 +74,10 @@
  %endif
  rm -rf sdk/installer
  mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
-Index: VirtualBox-6.1.14/src/libs/libxml2-2.9.4/libxml.spec.in
+Index: VirtualBox-6.1.20/src/libs/libxml2-2.9.4/libxml.spec.in
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/libxml2-2.9.4/libxml.spec.in
-+++ VirtualBox-6.1.14/src/libs/libxml2-2.9.4/libxml.spec.in
+--- VirtualBox-6.1.20.orig/src/libs/libxml2-2.9.4/libxml.spec.in
++++ VirtualBox-6.1.20/src/libs/libxml2-2.9.4/libxml.spec.in
 @@ -101,11 +101,11 @@ rm -fr %{buildroot}
  
  make install DESTDIR=%{buildroot}
@@ -93,10 +93,10 @@
  
  
  rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
-Index: VirtualBox-6.1.14/src/libs/libxml2-2.9.4/libxml2.spec
+Index: VirtualBox-6.1.20/src/libs/libxml2-2.9.4/libxml2.spec
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/libxml2-2.9.4/libxml2.spec
-+++ VirtualBox-6.1.14/src/libs/libxml2-2.9.4/libxml2.spec
+--- VirtualBox-6.1.20.orig/src/libs/libxml2-2.9.4/libxml2.spec
++++ VirtualBox-6.1.20/src/libs/libxml2-2.9.4/libxml2.spec
 @@ -103,7 +103,7 @@ make install DESTDIR=%{buildroot}
  
  %if 0%{?with_python3}
@@ -106,10 +106,10 @@
  make install DESTDIR=%{buildroot}
  %endif # with_python3
  
-Index: VirtualBox-6.1.14/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+Index: VirtualBox-6.1.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
-+++ VirtualBox-6.1.14/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+--- VirtualBox-6.1.20.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
++++ VirtualBox-6.1.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
 @@ -439,6 +439,8 @@ char *PyTraceback_AsString(PyObject *exc
        { // a temp scope so I can use temp locals.
  #if PY_MAJOR_VERSION <= 2
@@ -119,10 +119,10 @@
  #else
      /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
        const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);
-Index: VirtualBox-6.1.14/src/libs/xpcom18a4/python/src/PyGBase.cpp
+Index: VirtualBox-6.1.20/src/libs/xpcom18a4/python/src/PyGBase.cpp
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp
-+++ VirtualBox-6.1.14/src/libs/xpcom18a4/python/src/PyGBase.cpp
+--- VirtualBox-6.1.20.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp
++++ VirtualBox-6.1.20/src/libs/xpcom18a4/python/src/PyGBase.cpp
 @@ -183,7 +183,11 @@ PyG_Base::~PyG_Base()
  // Get the correct interface pointer for this object given the IID.
  void *PyG_Base::ThisAsIID( const nsIID &iid )
@@ -136,11 +136,11 @@
        if (iid.Equals(NS_GET_IID(nsISupports)))
                return (nsISupports *)(nsIInternalPython *)this;
        if (iid.Equals(NS_GET_IID(nsISupportsWeakReference)))
-Index: VirtualBox-6.1.14/src/libs/xpcom18a4/python/Makefile.kmk
+Index: VirtualBox-6.1.20/src/libs/xpcom18a4/python/Makefile.kmk
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/xpcom18a4/python/Makefile.kmk
-+++ VirtualBox-6.1.14/src/libs/xpcom18a4/python/Makefile.kmk
-@@ -533,6 +533,52 @@ VBoxPython3_8m_x86_LIBS       = $(VBOX_P
+--- VirtualBox-6.1.20.orig/src/libs/xpcom18a4/python/Makefile.kmk
++++ VirtualBox-6.1.20/src/libs/xpcom18a4/python/Makefile.kmk
+@@ -579,6 +579,52 @@ VBoxPython3_9m_x86_LIBS       = $(VBOX_P
   endif
  endif
  
@@ -193,16 +193,16 @@
  ifdef VBOX_PYTHONDEF_INC
  #
  # Python without versioning
-Index: VirtualBox-6.1.14/src/libs/xpcom18a4/python/gen_python_deps.py
+Index: VirtualBox-6.1.20/src/libs/xpcom18a4/python/gen_python_deps.py
 ===================================================================
---- VirtualBox-6.1.14.orig/src/libs/xpcom18a4/python/gen_python_deps.py
-+++ VirtualBox-6.1.14/src/libs/xpcom18a4/python/gen_python_deps.py
+--- VirtualBox-6.1.20.orig/src/libs/xpcom18a4/python/gen_python_deps.py
++++ VirtualBox-6.1.20/src/libs/xpcom18a4/python/gen_python_deps.py
 @@ -16,7 +16,7 @@ from __future__ import print_function
  import os,sys
  from distutils.version import StrictVersion
  
--versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", 
"3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.8m" ]
-+versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", 
"3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.8m", "3.8", "3.8m" ]
+-versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", 
"3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.8m", "3.9", "3.9m" ]
++versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4", "3.4m", 
"3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.8m", "3.8", "3.8m", 
"3.9", "3.9m" ]
  prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
  known = {}
  

++++++ vboxautostart-service.service ++++++
[Unit]
SourcePath=/usr/lib/virtualbox/vboxautostart-service.sh
Description=
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target 
shutdown.target 
After=vboxdrv.service 
Conflicts=shutdown.target 

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/usr/lib/virtualbox/vboxautostart-service.sh start
ExecStop=/usr/lib/virtualbox/vboxautostart-service.sh stop

[Install]
WantedBy=multi-user.target
++++++ vboxautostart-service.sh ++++++
#!/bin/sh
# $Id: vboxautostart-service.sh 143795 2021-04-15 11:42:37Z vgalitsy $
## @file
# VirtualBox autostart service init script.
#

#
# Copyright (C) 2012-2020 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#

# chkconfig: 345 35 65
# description: VirtualBox autostart service
#
### BEGIN INIT INFO
# Provides:       vboxautostart-service
# Required-Start: vboxdrv
# Required-Stop:  vboxdrv
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    VirtualBox autostart service
### END INIT INFO

PATH=$PATH:/bin:/sbin:/usr/sbin
SCRIPTNAME=vboxautostart-service.sh

[ -f /etc/debian_release -a -f /lib/lsb/init-functions ] || NOLSB=yes
[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg

if [ -n "$INSTALL_DIR" ]; then
    binary="$INSTALL_DIR/VBoxAutostart"
else
    binary="/usr/lib/virtualbox/VBoxAutostart"
fi

# silently exit if the package was uninstalled but not purged,
# applies to Debian packages only (but shouldn't hurt elsewhere)
[ ! -f /etc/debian_release -o -x $binary ] || exit 0

[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox

# Preamble for Gentoo
if [ "`which $0`" = "/sbin/rc" ]; then
    shift
fi

begin_msg()
{
    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    logger -t "${SCRIPTNAME}" "${1}."
}

succ_msg()
{
    logger -t "${SCRIPTNAME}" "${1}."
}

fail_msg()
{
    echo "${SCRIPTNAME}: failed: ${1}." >&2
    logger -t "${SCRIPTNAME}" "failed: ${1}."
}

start_daemon() {
    usr="$1"
    shift
    su - $usr -c "$*"
}

if which start-stop-daemon >/dev/null 2>&1; then
    start_daemon() {
        usr="$1"
        shift
        bin="$1"
        shift
        start-stop-daemon --chuid $usr --start --exec $bin -- $@
    }
fi

vboxdrvrunning() {
    lsmod | grep -q "vboxdrv[^_-]"
}

valid_db_entry() {

    entry="$1"
    [ -z "$entry" ] && return 1

    user="$2"
    [ -z "$user" ] && return 1

    user_name=$(id -n -u "$user" 2>/dev/null)
    [ -z "$user_name" ] && return 1

    user_id=$(id -u "$user" 2>/dev/null)

    # Verify that @user identifies a user *by name* (i.e. not a numeric id).
    # Careful, all numeric user names are legal.
    if [ "$user_id" = "$user" ] && [ "$user_name" != "$user" ]; then
        return 1
    fi

    # Verify whether file name is the same as file owner name.
    [ -z "$(find "$entry" -user "$user" -type f 2>/dev/null)" ] && return 1

    return 0
}

start() {
    [ -z "$VBOXAUTOSTART_DB" ] && exit 0
    [ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0
    begin_msg "Starting VirtualBox VMs configured for autostart" console;
    vboxdrvrunning || {
        fail_msg "VirtualBox kernel module not loaded!"
        exit 0
    }
    PARAMS="--background --start --config $VBOXAUTOSTART_CONFIG"

    # prevent inheriting this setting to VBoxSVC
    unset VBOX_RELEASE_LOG_DEST

    for entry in "$VBOXAUTOSTART_DB"/*.start
    do
        user=$(basename "$entry" .start)
        [ "$user" = "*" ] && break
        valid_db_entry "$entry" "$user" || continue

        start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1
    done

    return $RETVAL
}

stop() {
    [ -z "$VBOXAUTOSTART_DB" ] && exit 0
    [ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0

    PARAMS="--stop --config $VBOXAUTOSTART_CONFIG"

    # prevent inheriting this setting to VBoxSVC
    unset VBOX_RELEASE_LOG_DEST

    for entry in "$VBOXAUTOSTART_DB"/*.stop
    do
        user=$(basename "$entry" .stop)
        [ "$user" = "*" ] && break
        valid_db_entry "$entry" "$user" || continue

        start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1
    done

    return $RETVAL
}

case "$1" in
start)
    start
    ;;
stop)
    stop
    ;;
*)
    echo "Usage: $0 {start|stop}"
    exit 1
esac

exit $RETVAL

Reply via email to