Hello community,

here is the log from the commit of package virtualbox for openSUSE:Factory 
checked in at 2018-11-10 16:49:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virtualbox (Old)
 and      /work/SRC/openSUSE:Factory/.virtualbox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virtualbox"

Sat Nov 10 16:49:53 2018 rev:169 rq:647239 version:5.2.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/virtualbox/virtualbox.changes    2018-09-05 
13:44:19.949850942 +0200
+++ /work/SRC/openSUSE:Factory/.virtualbox.new/virtualbox.changes       
2018-11-10 16:50:35.276401265 +0100
@@ -1,0 +2,68 @@
+Tue Nov  6 08:47:25 UTC 2018 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Fix / simplify python3-virtualbox packages files section. Do not
+  rely on --record-rpm for any version of python, since we can't
+  use it across the band.
+
+-------------------------------------------------------------------
+Mon Nov  5 22:14:57 UTC 2018 - Larry Finger <larry.fin...@gmail.com>
+
+- Made changes requested in comments for request 646211.
+  1. Sustituted /usr/lib/python3.7/site-packages/ => %python3_sitelib
+  2. Reverted change that eliminated use of %{_tmppath}/SITE_FILES for Python 
3.6
+  3. As vboxapisetup.py in Python 3.7 no longer accepts the --record-rpm 
switch,
+     SITE_FILES does not exist, and the individual files must still be listed.
+
+-------------------------------------------------------------------
+Sat Nov  3 04:04:06 UTC 2018 - Larry Finger <larry.fin...@gmail.com>
+
+- Make necessary updates so that VirtualBox will build with Python 3.7 - 
boo#1113894
+  Change kernel module code to build against the API changes in kernel 4.20 - 
This change
+  adds file "fixes_for_4.20.patch".
+
+-------------------------------------------------------------------
+Fri Nov  2 09:48:23 UTC 2018 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Require(pre) virtualbox by the -qt package: otherewise it might
+  happen that virtualbox-qt is installed before virtualbox, which
+  then results in files being assigned to group 'root' instead of
+  'vboxusers', as the group is only created later.
+
+-------------------------------------------------------------------
+Mon Oct 29 20:11:57 UTC 2018 - Larry Finger <larry.fin...@gmail.com>
+
+- Version bump to 5.2.20 (released October 16 2018 by Oracle)
+
+This is a maintenance release. The following items were fixed and/or added:
+
+VMM: fixed task switches triggered by INTn instruction (bug #17979)
+Storage: fixed connecting to certain iSCSI targets (bug #17507)
+Storage: fixed handling of flush requests when configured to be ignored when 
the host I/O cache is used (bug #17573)
+Drag and drop: implemented support for UNC paths (bug #17146)
+Drag and drop: fixed resuming operation when restoring from a saved state (bug 
#17649)
+Drag and drop: fixed copying files with long file names (> 248 characters) 
from guests to Windows hosts (bug #17447)
+Drag and drop: fixed handling files with Unicode names on Windows guests (bug 
#15501)
+Drag and drop: fixed copying empty (0-byte) files to / from guests (bugs 
#14863 + #17443)
+Drag and drop: fixed copying over files from hosts to Linux guests (bug #16025)
+Networking: restore connectivity for guests bridged to host adapters that were 
unavailable temporarily (Windows hosts, bug #17090)
+Guest Control: fixed hang when using --wait-stdout and/or --wait-stderr (bug 
#17386). Needs updating Guest Additions
+Video recording: fixed starting video recording on VM power up (bug #17307)
+Linux Additions: various build fixes for kernel modules on recent 
distributions, and made sure modules end up in initramfs files
+Linux Additions: build fixes for 4.19, thank you Larry Finger
+Linux Additions: various small fixes for video driver
+
+This version also addresses the following vulnerabilities: CVE-2018-0732, 
CVE-2018-2909, CVE-2018-3287
+        CVE-2018-3288, CVE-2018-3289, CVE-2018-3290, CVE-2018-3291, 
CVE-2018-3292, CVE-2018-3293,
+        CVE-2018-3294, CVE-2018-3295, CVE-2018-3296, CVE-2018-3297, and 
CVE-2018-3298. bsc#1112097
+
+-------------------------------------------------------------------
+Thu Sep 20 19:24:48 UTC 2018 - Larry Finger <larry.fin...@gmail.com>
+
+- Fix autostart of VMs, which is no longer handled by the vboxes.service.
+  A new routine "start_vms" is added to the start section of vboxdrv.sh,
+  which is called by vboxdrv.service. Files "vboxes.service", "vboxes.sh",
+  and "virtualbox-sysconfig.vbox" are deleted.
+
+  These changes are to satisfy bsc#1107769.
+
+-------------------------------------------------------------------

Old:
----
  VirtualBox-5.2.18-patched.tar.bz2
  vboxes.service
  vboxes.sh
  virtualbox-sysconfig.vbox

New:
----
  VirtualBox-5.2.20-patched.tar.bz2
  fixes_for_4.20.patch

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

Other differences:
------------------
++++++ virtualbox.spec ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.148397633 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.156397623 +0100
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -40,7 +40,7 @@
 %define _udevrulesdir %{_sysconfdir}/udev/rules.d
 Name:           virtualbox
 # ********* If the VB version exceeds 5.2.x, notify the libvirt maintainer!!
-Version:        5.2.18
+Version:        5.2.20
 Release:        0
 Summary:        VirtualBox is an Emulator
 License:        GPL-2.0-or-later
@@ -62,16 +62,12 @@
 Source9:        %{name}-wrapper.sh
 Source10:       %{name}-LocalConfig.kmk
 Source11:       %{name}-60-vboxdrv.rules
-Source13:       %{name}-sysconfig.vbox
 Source14:       vboxdrv.service
 Source15:       vboxadd-service.service
 Source16:       vboxconfig.sh
 Source17:       vboxguestconfig.sh
 Source18:       fix_usb_rules.sh
 Source19:       vboxdrv.sh
-# init script to start virtual boxes during boot, to be configured via 
/etc/sysconfig/vbox bnc#582398
-Source20:       vboxes.sh
-Source21:       vboxes.service
 Source98:       %{name}-rpmlintrc
 Source99:       %{name}-patch-source.sh
 #rework init scripts to fit suse needs
@@ -132,10 +128,11 @@
 Patch125:       fixes_for_Qt5.11.patch
 # Switch to Python 3.6
 Patch126:       switch_to_python3.6.patch
-# Fix 32-bit builds
 Patch127:       fix_32_bit_builds.patch
 # Fix API changes for kernel 4.19+
 Patch128:       fixes_for_4.19.patch
+# Fix API changes for kernel 4.20+
+Patch129:       fixes_for_4.20.patch
 #
 BuildRequires:  LibVNCServer-devel
 BuildRequires:  SDL-devel
@@ -173,6 +170,7 @@
 BuildRequires:  libqt5-qtx11extras-devel
 BuildRequires:  libvpx-devel
 BuildRequires:  libxslt-devel
+BuildRequires:  libzio-devel
 BuildRequires:  module-init-tools
 BuildRequires:  pam-devel
 BuildRequires:  pulseaudio-devel
@@ -244,7 +242,7 @@
 %package qt
 Summary:        Qt GUI part for %{name}
 Group:          System/Emulators/PC
-Requires:       %{name} = %{version}
+Requires(pre):  %{name} = %{version}
 Requires(pre):  permissions
 Provides:       %{name}-gui = %{version}
 #this is needed during update to trigger installing qt subpackage
@@ -438,6 +436,7 @@
 %patch126 -p1
 %patch127 -p1
 %patch128 -p1
+%patch129 -p1
 
 #copy user manual
 cp %{SOURCE1} UserManual.pdf
@@ -696,18 +695,10 @@
 install -m 0755 %{SOURCE17}                    
%{buildroot}/sbin/vboxguestconfig
 install -m 0755 %{SOURCE18}                    
%{buildroot}/sbin/vbox-fix-usb-rules.sh
 install -m 0755 %{SOURCE19}                    
%{buildroot}%{_vbox_instdir}/vboxdrv.sh
-install -m 0755 %{SOURCE20}                    
%{buildroot}%{_vbox_instdir}/vboxes.sh
-install -m 0644 %{SOURCE21}                    
%{buildroot}%{_unitdir}/vboxes.service
-ln -s %{_vbox_instdir}/vboxes.sh               %{buildroot}%{_sbindir}/rcvboxes
-ln -s %{_vbox_instdir}/vboxdrv.sh              
%{buildroot}%{_sbindir}/rcvboxdrv
 
 # Init script to start virtual boxes 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}/vboxes.service              
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxes.service
-# sysconfig file intended for vboxes script
-install -d -m 755 %{buildroot}%{_fillupdir}
-install -m 640 %{SOURCE13} %{buildroot}%{_fillupdir}/sysconfig.vbox
 
 # config file for vboxdrv script and vboxweb
 install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
@@ -718,7 +709,7 @@
 echo "entering python-virtualbox install section"
 ######################################################
 pushd out/linux.*/release/bin/sdk/installer
-VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install 
--prefix=%{_prefix} --root=%{buildroot} --record-rpm=%{_tmppath}/SITE_FILES
+VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install 
--prefix=%{_prefix} --root=%{buildroot}
 popd
 install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
 cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python 
%{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
@@ -923,16 +914,11 @@
 %dir %{_unitdir}
 %dir %{_unitdir}/multi-user.target.wants
 /usr/lib/virtualbox/vboxdrv.sh
-/usr/lib/virtualbox/vboxes.sh
 %{_unitdir}/vboxdrv.service
-%{_unitdir}/vboxes.service
 %{_unitdir}/multi-user.target.wants/vboxdrv.service
-%{_unitdir}/multi-user.target.wants/vboxes.service
 %dir %{_sysconfdir}/vbox
+##%attr(1775,root,vboxusers) %{_sysconfdir}/vbox
 %config %{_sysconfdir}/vbox/vbox.cfg
-%{_fillupdir}/sysconfig.vbox
-%{_sbindir}/rcvboxes
-%{_sbindir}/rcvboxdrv
 /sbin/vboxconfig
 %{_vbox_instdir}/VBoxCreateUSBNode.sh
 %verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetNAT
@@ -992,13 +978,15 @@
 %dir /media
 %endif
 
-%files -n python3-%{name} -f %{_tmppath}/SITE_FILES
+%files -n python3-%{name}
 %defattr(-, root, root)
 %dir %{_vbox_instdir}/sdk
 %dir %{_vbox_instdir}/sdk/bindings
 %dir %{_vbox_instdir}/sdk/bindings/xpcom
 %{_vbox_instdir}/sdk/bindings/xpcom/python
-%attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_6m.so
+%{_vbox_instdir}/VBoxPython*.so
+%{python3_sitelib}/vboxapi-1.0-*.egg-info
+%{python3_sitelib}/vboxapi/
 
 %files devel
 %defattr(-,root, root)

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

++++++ VirtualBox-5.2.18-patched.tar.bz2 -> VirtualBox-5.2.20-patched.tar.bz2 
++++++
/work/SRC/openSUSE:Factory/virtualbox/VirtualBox-5.2.18-patched.tar.bz2 
/work/SRC/openSUSE:Factory/.virtualbox.new/VirtualBox-5.2.20-patched.tar.bz2 
differ: char 11, line 1

++++++ fix_32_bit_builds.patch ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.232397527 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.232397527 +0100
@@ -1,28 +1,20 @@
-Index: VirtualBox-5.2.12/src/VBox/Additions/linux/sharedfolders/utils.c
+Index: VirtualBox-5.2.20/src/VBox/Additions/linux/sharedfolders/utils.c
 ===================================================================
---- VirtualBox-5.2.12.orig/src/VBox/Additions/linux/sharedfolders/utils.c
-+++ VirtualBox-5.2.12/src/VBox/Additions/linux/sharedfolders/utils.c
-@@ -50,7 +50,11 @@ static void sf_timespec_from_ftime(RTTIM
+--- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/sharedfolders/utils.c
++++ VirtualBox-5.2.20/src/VBox/Additions/linux/sharedfolders/utils.c
+@@ -49,11 +49,11 @@ static void sf_timespec_from_ftime(RTTIM
+     int64_t t = 1000000000 * *time;
      RTTimeSpecSetNano(ts, t);
  }
- #else /* >= 2.6.0 */
+-#else                         /* >= 2.6.0 */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
+-static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
+-#else
++#else /* >= 2.6.0 */
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
-+static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
+ static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
 +#else
- static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
-+#endif
++static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
+ #endif
  {
      int64_t t = RTTimeSpecGetNano(ts);
-     int64_t nsec;
-@@ -60,7 +64,11 @@ static void sf_ftime_from_timespec(struc
-     tv->tv_nsec = nsec;
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
-+static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec64 *tv)
-+#else
- static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
-+#endif
- {
-     int64_t t = (int64_t)tv->tv_nsec + (int64_t)tv->tv_sec * 1000000000;
-     RTTimeSpecSetNano(ts, t);

++++++ fixes_for_4.19.patch ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.256397497 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.260397492 +0100
@@ -1,28 +1,14 @@
-Index: VirtualBox-5.2.18/src/VBox/Additions/linux/drm/vbox_mode.c
+Index: VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_mode.c
 ===================================================================
---- VirtualBox-5.2.18.orig/src/VBox/Additions/linux/drm/vbox_mode.c
-+++ VirtualBox-5.2.18/src/VBox/Additions/linux/drm/vbox_mode.c
-@@ -536,7 +536,11 @@ static void vbox_set_edid(struct drm_con
-       for (i = 0; i < EDID_SIZE - 1; ++i)
-               sum += edid[i];
-       edid[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
-+      drm_connector_update_edid_property(connector, (struct edid *)edid);
-+#else
+--- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/drm/vbox_mode.c
++++ VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_mode.c
+@@ -495,8 +495,8 @@ static void vbox_set_edid(struct drm_con
+       drm_connector_update_edid_property(connector, (struct edid *)edid);
+ #else
        drm_mode_connector_update_edid_property(connector, (struct edid *)edid);
-+#endif
- }
- 
- static int vbox_get_modes(struct drm_connector *connector)
-@@ -703,7 +707,11 @@ static int vbox_connector_init(struct dr
-       drm_connector_register(connector);
+-}
  #endif
++}
  
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
-+      drm_connector_attach_encoder(connector, encoder);
-+#else
-       drm_mode_connector_attach_encoder(connector, encoder);
-+#endif
- 
-       return 0;
- }
+ static int vbox_get_modes(struct drm_connector *connector)
+ {

++++++ fixes_for_4.20.patch ++++++
Index: 
VirtualBox-5.2.20/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
===================================================================
--- 
VirtualBox-5.2.20.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
+++ VirtualBox-5.2.20/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
@@ -84,8 +84,11 @@ static long VBoxNetAdpLinuxIOCtlUnlocked
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
 
 static void vboxNetAdpEthGetDrvinfo(struct net_device *dev, struct 
ethtool_drvinfo *info);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+static int vboxNetAdpEthGetSettings(struct net_device *pNetDev, struct 
ethtool_link_ksettings *link_ksettings);
+#else
 static int vboxNetAdpEthGetSettings(struct net_device *dev, struct ethtool_cmd 
*cmd);
-
+#endif
 
 
/*********************************************************************************************************************************
 *   Global Variables                                                           
                                                  *
@@ -129,7 +132,11 @@ static struct miscdevice g_CtlDev =
 static const struct ethtool_ops gEthToolOpsVBoxNetAdp =
 {
     .get_drvinfo        = vboxNetAdpEthGetDrvinfo,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+    .get_link_ksettings = vboxNetAdpEthGetSettings,
+#else
     .get_settings       = vboxNetAdpEthGetSettings,
+#endif
     .get_link           = ethtool_op_get_link,
 };
 
@@ -200,10 +207,64 @@ static void vboxNetAdpEthGetDrvinfo(stru
                 "N/A");
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+static bool
+convert_link_ksettings_to_legacy_settings(
+       struct ethtool_cmd *legacy_settings,
+       const struct ethtool_link_ksettings *link_ksettings)
+{
+       bool retval = true;
+
+       memset(legacy_settings, 0, sizeof(*legacy_settings));
+       /* this also clears the deprecated fields in legacy structure:
+        * __u8         transceiver;
+        * __u32        maxtxpkt;
+        * __u32        maxrxpkt;
+        */
+
+       retval &= ethtool_convert_link_mode_to_legacy_u32(
+               &legacy_settings->supported,
+               link_ksettings->link_modes.supported);
+       retval &= ethtool_convert_link_mode_to_legacy_u32(
+               &legacy_settings->advertising,
+               link_ksettings->link_modes.advertising);
+       retval &= ethtool_convert_link_mode_to_legacy_u32(
+               &legacy_settings->lp_advertising,
+               link_ksettings->link_modes.lp_advertising);
+       ethtool_cmd_speed_set(legacy_settings, link_ksettings->base.speed);
+       legacy_settings->duplex
+               = link_ksettings->base.duplex;
+       legacy_settings->port
+               = link_ksettings->base.port;
+       legacy_settings->phy_address
+               = link_ksettings->base.phy_address;
+       legacy_settings->autoneg
+               = link_ksettings->base.autoneg;
+       legacy_settings->mdio_support
+               = link_ksettings->base.mdio_support;
+       legacy_settings->eth_tp_mdix
+               = link_ksettings->base.eth_tp_mdix;
+       legacy_settings->eth_tp_mdix_ctrl
+               = link_ksettings->base.eth_tp_mdix_ctrl;
+       legacy_settings->transceiver
+               = link_ksettings->base.transceiver;
+       return retval;
+}
+#endif
 
 /* ethtool_ops::get_settings */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+static int vboxNetAdpEthGetSettings(struct net_device *pNetDev, struct 
ethtool_link_ksettings *link_ksettings)
+#else
 static int vboxNetAdpEthGetSettings(struct net_device *pNetDev, struct 
ethtool_cmd *cmd)
+#endif
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+    struct ethtool_cmd *cmd = kzalloc(sizeof(struct ethtool_cmd), GFP_KERNEL);
+    if (!cmd)
+       return 1;
+    convert_link_ksettings_to_legacy_settings(cmd, link_ksettings);
+#endif
     cmd->supported      = 0;
     cmd->advertising    = 0;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
@@ -218,6 +279,9 @@ static int vboxNetAdpEthGetSettings(stru
     cmd->autoneg        = AUTONEG_DISABLE;
     cmd->maxtxpkt       = 0;
     cmd->maxrxpkt       = 0;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+    kfree(cmd);
+#endif
     return 0;
 }
 
Index: VirtualBox-5.2.20/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
===================================================================
--- VirtualBox-5.2.20.orig/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
+++ VirtualBox-5.2.20/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
@@ -171,11 +171,19 @@ RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPE
 {
     IPRT_LINUX_SAVE_EFL_AC();
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+    struct timespec64 Ts;
+    ktime_get_real_ts64(&Ts);
+#else
     struct timespec Ts;
     ktime_get_real_ts(&Ts);
+#endif
     IPRT_LINUX_RESTORE_EFL_AC();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
+    return RTTimeSpecSetTimespec64(pTime, &Ts);
+#else
     return RTTimeSpecSetTimespec(pTime, &Ts);
-
+#endif
 #else   /* < 2.6.16 */
     struct timeval Tv;
     do_gettimeofday(&Tv);
Index: VirtualBox-5.2.20/include/iprt/time.h
===================================================================
--- VirtualBox-5.2.20.orig/include/iprt/time.h
+++ VirtualBox-5.2.20/include/iprt/time.h
@@ -54,7 +54,6 @@ typedef struct RTTIMESPEC
     int64_t     i64NanosecondsRelativeToUnixEpoch;
 } RTTIMESPEC;
 
-
 /** @name RTTIMESPEC methods
  * @{ */
 
@@ -388,6 +387,7 @@ DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTim
 {
     return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), 
pTimeval->tv_usec);
 }
+
 #endif /* various ways of detecting struct timeval */
 
 
@@ -427,6 +427,25 @@ DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTim
 {
     return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), 
pTimespec->tv_nsec);
 }
+
+#ifndef _LINUX_TIME64_H
+/* With kernel 4.20+, the second argument of time routines change from
+ * struct timespec to struct timespec64. This file is built twice, once
+ * in user mode, and once in kernel mode. In user mode, the struct is
+ * undefined, thus the following definition is provided. The guard macro
+ * from the kernels include/linux/time64.h is _LINUX_TIME64_H, thus
+ * the definition of that macro determines whether the struct is defined.
+ */
+struct timespec64 {
+       long long       tv_sec;                 /* seconds */
+       long            tv_nsec;                /* nanoseconds */
+};
+#endif
+
+DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const 
struct timespec64 *pTimeval)
+{
+    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), 
1000 * pTimeval->tv_nsec);
+}
 #endif /* various ways of detecting struct timespec */
 
 
++++++ switch_to_python3.6.patch ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.308397431 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.308397431 +0100
@@ -1,7 +1,7 @@
-Index: VirtualBox-5.2.16/configure
+Index: VirtualBox-5.2.20/configure
 ===================================================================
---- VirtualBox-5.2.16.orig/configure
-+++ VirtualBox-5.2.16/configure
+--- VirtualBox-5.2.20.orig/configure
++++ VirtualBox-5.2.20/configure
 @@ -1959,17 +1959,17 @@ extern "C" int main(void)
  {
    Py_Initialize();
@@ -19,14 +19,14 @@
  EOF
    found=
 -  SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 
python3.4m python3.5 python3.5m python3.6 python3.6m"
-+  SUPPYTHONLIBS="python3.6m python3.6 python3.6m"
++  SUPPYTHONLIBS="python3.6m python3.6 python3.7m python3.7"
    for p in $PYTHONDIR; do
      for d in $SUPPYTHONLIBS; do
        for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
-Index: VirtualBox-5.2.16/src/VBox/Installer/linux/routines.sh
+Index: VirtualBox-5.2.20/src/VBox/Installer/linux/routines.sh
 ===================================================================
---- VirtualBox-5.2.16.orig/src/VBox/Installer/linux/routines.sh
-+++ VirtualBox-5.2.16/src/VBox/Installer/linux/routines.sh
+--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/routines.sh
++++ VirtualBox-5.2.20/src/VBox/Installer/linux/routines.sh
 @@ -375,8 +375,8 @@ terminate_proc() {
  maybe_run_python_bindings_installer() {
      VBOX_INSTALL_PATH="${1}"
@@ -38,10 +38,10 @@
  if sys.version_info >= (2, 6):
      print \"test\"' 2> /dev/null`" != "test" ]; then
          echo  1>&2 "Python 2.6 or later not available, skipping bindings 
installation."
-Index: VirtualBox-5.2.16/src/bldprogs/scm.cpp
+Index: VirtualBox-5.2.20/src/bldprogs/scm.cpp
 ===================================================================
---- VirtualBox-5.2.16.orig/src/bldprogs/scm.cpp
-+++ VirtualBox-5.2.16/src/bldprogs/scm.cpp
+--- VirtualBox-5.2.20.orig/src/bldprogs/scm.cpp
++++ VirtualBox-5.2.20/src/bldprogs/scm.cpp
 @@ -2031,7 +2031,7 @@ static int scmProcessFileInner(PSCMRWSTA
                              pszTreatAs = "shell";
                          else if (   (cchFirst >= 15 && strncmp(pchFirst, 
"/usr/bin/python", 15) == 0)
@@ -51,10 +51,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-5.2.16/src/libs/libxml2-2.9.4/configure
+Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/configure
 ===================================================================
---- VirtualBox-5.2.16.orig/src/libs/libxml2-2.9.4/configure
-+++ VirtualBox-5.2.16/src/libs/libxml2-2.9.4/configure
+--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/configure
++++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/configure
 @@ -15153,10 +15153,10 @@ PYTHON_SITE_PACKAGES=
  PYTHON_TESTS=
  pythondir=
@@ -79,10 +79,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-5.2.16/src/VBox/ValidationKit/testboxscript/setup.sh
+Index: VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/setup.sh
 ===================================================================
---- VirtualBox-5.2.16.orig/src/VBox/ValidationKit/testboxscript/setup.sh
-+++ VirtualBox-5.2.16/src/VBox/ValidationKit/testboxscript/setup.sh
+--- VirtualBox-5.2.20.orig/src/VBox/ValidationKit/testboxscript/setup.sh
++++ VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/setup.sh
 @@ -644,7 +644,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);\
@@ -92,10 +92,10 @@
      do
          python=`which ${python} 2> /dev/null`
          if [ -n "${python}" -a -x "${python}" ]; then
-Index: VirtualBox-5.2.16/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
+Index: VirtualBox-5.2.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
 ===================================================================
---- VirtualBox-5.2.16.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
-+++ VirtualBox-5.2.16/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
+--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
++++ VirtualBox-5.2.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
 @@ -20,7 +20,7 @@
  %define %PYTHON% 1
  %define VBOXDOCDIR %{_defaultdocdir}/%NAME%
@@ -114,10 +114,10 @@
  %endif
  rm -rf sdk/installer
  mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
-Index: VirtualBox-5.2.16/src/libs/libxml2-2.9.4/libxml.spec.in
+Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml.spec.in
 ===================================================================
---- VirtualBox-5.2.16.orig/src/libs/libxml2-2.9.4/libxml.spec.in
-+++ VirtualBox-5.2.16/src/libs/libxml2-2.9.4/libxml.spec.in
+--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/libxml.spec.in
++++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml.spec.in
 @@ -101,11 +101,11 @@ rm -fr %{buildroot}
  
  make install DESTDIR=%{buildroot}
@@ -133,10 +133,10 @@
  
  
  rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
-Index: VirtualBox-5.2.16/src/libs/libxml2-2.9.4/libxml2.spec
+Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml2.spec
 ===================================================================
---- VirtualBox-5.2.16.orig/src/libs/libxml2-2.9.4/libxml2.spec
-+++ VirtualBox-5.2.16/src/libs/libxml2-2.9.4/libxml2.spec
+--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/libxml2.spec
++++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml2.spec
 @@ -103,7 +103,7 @@ make install DESTDIR=%{buildroot}
  
  %if 0%{?with_python3}
@@ -146,3 +146,36 @@
  make install DESTDIR=%{buildroot}
  %endif # with_python3
  
+Index: VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+===================================================================
+--- VirtualBox-5.2.20.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
++++ VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
+@@ -439,8 +439,10 @@ char *PyTraceback_AsString(PyObject *exc
+       { // a temp scope so I can use temp locals.
+ #if PY_MAJOR_VERSION <= 2
+       char *tempResult = PyString_AsString(obResult);
+-#else
++#elif PY_MINOR_VERSION <= 6
+       char *tempResult = PyUnicode_AsUTF8(obResult);
++#else
++      const char *tempResult = PyUnicode_AsUTF8(obResult);
+ #endif
+       result = (char *)PyMem_Malloc(strlen(tempResult)+1);
+       if (result==NULL)
+Index: VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/PyGBase.cpp
+===================================================================
+--- VirtualBox-5.2.20.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp
++++ VirtualBox-5.2.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 )
+ {
+-      if (this==NULL) return NULL;
++#if PY_MINOR_VERSION <= 6
++      if (!this) return NULL;
++#else
++      if (!this) return NULL;
++#endif
+       if (iid.Equals(NS_GET_IID(nsISupports)))
+               return (nsISupports *)(nsIInternalPython *)this;
+       if (iid.Equals(NS_GET_IID(nsISupportsWeakReference)))

++++++ vbox-vboxadd-init-script.diff ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.356397370 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.360397365 +0100
@@ -1,7 +1,7 @@
-Index: VirtualBox-5.2.14/src/VBox/Additions/linux/installer/vboxadd.sh
+Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh
 ===================================================================
---- VirtualBox-5.2.14.orig/src/VBox/Additions/linux/installer/vboxadd.sh
-+++ VirtualBox-5.2.14/src/VBox/Additions/linux/installer/vboxadd.sh
+--- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/installer/vboxadd.sh
++++ VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh
 @@ -26,11 +26,14 @@
  # Provides:       vboxadd
  # Required-Start:
@@ -18,7 +18,7 @@
  ### END INIT INFO
  
  ## @todo This file duplicates a lot of script with vboxdrv.sh.  When making
-@@ -138,18 +141,9 @@ module_build_log()
+@@ -139,18 +142,9 @@ module_build_log()
  
  dev=/dev/vboxguest
  userdev=/dev/vboxuser
@@ -37,7 +37,7 @@
  running_vboxguest()
  {
      lsmod | grep -q "vboxguest[^_-]"
-@@ -192,12 +186,6 @@ do_vboxguest_non_udev()
+@@ -193,12 +187,6 @@ do_vboxguest_non_udev()
              fail "Cannot create device $dev with major $maj and minor $min"
          }
      fi
@@ -50,7 +50,7 @@
  
      if [ ! -c $userdev ]; then
          maj=10
-@@ -208,12 +196,6 @@ do_vboxguest_non_udev()
+@@ -209,12 +197,6 @@ do_vboxguest_non_udev()
                  rmmod vboxguest 2>/dev/null
                  fail "Cannot create device $userdev with major $maj and minor 
$min"
              }
@@ -63,7 +63,7 @@
          fi
      fi
  }
-@@ -223,9 +205,8 @@ start()
+@@ -224,9 +206,8 @@ start()
      begin "Starting."
      # If we got this far assume that the slow set-up has been done.
      QUICKSETUP=yes
@@ -75,7 +75,7 @@
              no_udev=1
          running_vboxguest || {
              rm -f $dev || {
-@@ -238,7 +219,7 @@ start()
+@@ -239,7 +220,7 @@ start()
  
              $MODPROBE vboxguest >/dev/null 2>&1 || {
                  setup
@@ -84,7 +84,7 @@
                      fail "modprobe vboxguest failed"
              }
              case "$no_udev" in 1)
-@@ -269,7 +250,8 @@ start()
+@@ -270,7 +251,8 @@ start()
      rm -Rf /var/lib/VBoxGuestAdditions/lib
      if /usr/bin/VBoxClient --check3d 2>/dev/null; then
          mkdir -p /var/lib/VBoxGuestAdditions/lib
@@ -94,7 +94,7 @@
          # SELinux for the OpenGL libraries, so that gdm can load them during 
the
          # acceleration support check.  This prevents an "Oh no, something has 
gone
          # wrong!" error when starting EL7 guests.
-@@ -280,6 +262,15 @@ start()
+@@ -281,6 +263,15 @@ start()
              chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
          fi
          echo "/var/lib/VBoxGuestAdditions/lib" > 
/etc/ld.so.conf.d/00vboxvideo.conf
@@ -110,7 +110,7 @@
      fi
      ldconfig
  
-@@ -414,9 +405,9 @@ create_udev_rule()
+@@ -455,9 +446,9 @@ create_udev_rule()
          echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", 
OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules
      fi
  }
@@ -123,7 +123,7 @@
      # And a post-installation script for rebuilding modules when a new kernel
      # is installed.
      mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d
-@@ -446,45 +437,21 @@ shared_folder_setup()
+@@ -487,20 +478,13 @@ shared_folder_setup()
      ## @todo It would be nicer if the kernel module just parsed parameters
      # itself instead of needing a separate binary to do that.
      ln -sf "${INSTALL_DIR}/other/mount.vboxsf" /sbin
@@ -142,24 +142,35 @@
  # setup_script
  setup()
  {
--    export BUILD_TYPE
--    export USERNAME
--
--    MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
--    BUILDINTMP="$MODULE_SRC/build_in_tmp"
--    chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
--
--    test -z "${INSTALL_NO_MODULE_BUILDS}" && setup_modules
--    create_vbox_user
--    create_udev_rule
--    test -z "${INSTALL_NO_MODULE_BUILDS}" && create_module_rebuild_script
--    test -n "${QUICKSETUP}" && return 0
--    shared_folder_setup
--    if  running_vboxguest || running_vboxadd; then
--        info "Running kernel modules will not be replaced until the system is 
restarted"
++<<<<<<< found
+     export BUILD_TYPE
+     export USERNAME
+ 
+@@ -517,16 +501,33 @@ setup()
+     shared_folder_setup
+     if  running_vboxguest || running_vboxadd; then
+         info "Running kernel modules will not be replaced until the system is 
restarted"
 -    fi
 -    return 0
++||||||| expected
++    export BUILD_TYPE
++    export USERNAME
++
++    MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
++    BUILDINTMP="$MODULE_SRC/build_in_tmp"
++    chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
++
++    test -z "${INSTALL_NO_MODULE_BUILDS}" && setup_modules
++    create_vbox_user
++    create_udev_rule
++    test -z "${INSTALL_NO_MODULE_BUILDS}" && create_module_rebuild_script
++    test -n "${QUICKSETUP}" && return 0
++    shared_folder_setup
++    if  running_vboxguest || running_vboxadd; then
++        info "Running kernel modules will not be replaced until the system is 
restarted"
++=======
 +    begin "Recompiling VirtualBox kernel module, NOT. It has been packaged."
++>>>>>>> replacement
 +    succ_msg
  }
  
@@ -174,7 +185,7 @@
          depmod
  
          # Remove old module sources
-@@ -494,13 +461,14 @@ cleanup()
+@@ -536,13 +537,14 @@ cleanup()
      fi
  
      # Clean-up X11-related bits
@@ -193,10 +204,10 @@
      fi
      rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
  }
-Index: VirtualBox-5.2.14/src/VBox/Additions/linux/installer/vboxadd-service.sh
+Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd-service.sh
 ===================================================================
---- 
VirtualBox-5.2.14.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh
-+++ VirtualBox-5.2.14/src/VBox/Additions/linux/installer/vboxadd-service.sh
+--- 
VirtualBox-5.2.20.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh
++++ VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd-service.sh
 @@ -26,7 +26,7 @@
  # Provides:       vboxadd-service
  # Required-Start: vboxadd
@@ -206,10 +217,10 @@
  # Default-Stop:   0 1 6
  # X-Conflicts-With: systemd-timesyncd.service
  # Description:    VirtualBox Additions Service
-Index: VirtualBox-5.2.14/src/VBox/Installer/linux/vboxautostart-service.sh
+Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxautostart-service.sh
 ===================================================================
---- VirtualBox-5.2.14.orig/src/VBox/Installer/linux/vboxautostart-service.sh
-+++ VirtualBox-5.2.14/src/VBox/Installer/linux/vboxautostart-service.sh
+--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/vboxautostart-service.sh
++++ VirtualBox-5.2.20/src/VBox/Installer/linux/vboxautostart-service.sh
 @@ -23,7 +23,7 @@
  # Provides:       vboxautostart-service
  # Required-Start: vboxdrv
@@ -219,10 +230,10 @@
  # Default-Stop:   0 1 6
  # Description:    VirtualBox autostart service
  ### END INIT INFO
-Index: VirtualBox-5.2.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh
+Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxballoonctrl-service.sh
 ===================================================================
---- VirtualBox-5.2.14.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh
-+++ VirtualBox-5.2.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh
+--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh
++++ VirtualBox-5.2.20/src/VBox/Installer/linux/vboxballoonctrl-service.sh
 @@ -23,7 +23,7 @@
  # Provides:       vboxballoonctrl-service
  # Required-Start: vboxdrv
@@ -232,10 +243,10 @@
  # Default-Stop:   0 1 6
  # Description:    VirtualBox watchdog daemon
  ### END INIT INFO
-Index: 
VirtualBox-5.2.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
+Index: 
VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
 ===================================================================
---- 
VirtualBox-5.2.14.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
-+++ 
VirtualBox-5.2.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
+--- 
VirtualBox-5.2.20.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
++++ 
VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
 @@ -31,7 +31,7 @@
  # Provides:       testboxscript-service
  # Required-Start: $network
@@ -245,10 +256,10 @@
  # Default-Stop:   0 1 6
  # Description:    TestBoxScript service
  ### END INIT INFO
-Index: 
VirtualBox-5.2.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
+Index: 
VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
 ===================================================================
---- 
VirtualBox-5.2.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
-+++ 
VirtualBox-5.2.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
+--- 
VirtualBox-5.2.20.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
++++ 
VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
 @@ -31,7 +31,7 @@
  # Provides:       vboxtxs
  # Required-Start: $network
@@ -258,10 +269,10 @@
  # Default-Stop:   0 1 6
  # Description:    VirtualBox Test Execution Service
  ### END INIT INFO
-Index: 
VirtualBox-5.2.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
+Index: 
VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
 ===================================================================
---- 
VirtualBox-5.2.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
-+++ 
VirtualBox-5.2.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
+--- 
VirtualBox-5.2.20.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
++++ 
VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
 @@ -31,7 +31,7 @@
  # Provides:       vboxtxs
  # Required-Start: $network

++++++ vboxconfig.sh ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.392397325 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.396397319 +0100
@@ -21,7 +21,7 @@
 # Check if virtualbox-host-source is installed, quit if not
 if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
        echo "Sources for building host modules are not present,"
-       echo "Use 'sudo zypper install virtualbox-host-source kernel_devel' to 
install them. Quitting .."
+       echo "Use 'sudo zypper install virtualbox-host-source kernel-devel 
kernel-default-devel' to install them. Quitting .."
        exit 1
 fi
 #

++++++ vboxdrv.sh ++++++
--- /var/tmp/diff_new_pack.rWlrG0/_old  2018-11-10 16:50:38.432397274 +0100
+++ /var/tmp/diff_new_pack.rWlrG0/_new  2018-11-10 16:50:38.432397274 +0100
@@ -344,6 +344,30 @@
     fi
 }
 
+start_vms()
+{
+OLD_IFS=$IFS
+IFS=$'\n'
+# read config file
+[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
+#echo "Symbols are $VBOXAUTOSTART_DB and $VBOXAUTOSTART_CONFIG"
+# read autostart config file
+if [ -r $VBOXAUTOSTART_CONFIG ]; then
+       VBoxManage list vms
+# find all the files of type user.start
+        var=$(ls $VBOXAUTOSTART_DB | grep start | grep -v auto)
+# process each file of that type
+        for i in $var; do
+# Extract the user name - the first word on the line            
+                user=$(echo $i | head -n1 | cut -d "." -f1)
+# autostart the VMs for that user
+                su $user -c "/usr/lib/virtualbox/VBoxAutostart --start 
--config $VBOXAUTOSTART_CONFIG"
+        done
+fi
+IFS=$OLD_IFS
+
+}
+
 cleanup()
 {
     for i in /lib/modules/*; do
@@ -407,6 +431,7 @@
 case "$1" in
 start)
     start
+    start_vms
     ;;
 stop)
     stop_vms



Reply via email to