diff --git a/UserManual.pdf b/UserManual.pdf index 7080456..f31f2b1 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e520c8fd6c7249fc89e39f61c117537fe9e469688af0912c45517c27f9c2255 -size 4363880 +oid sha256:a7ad57de95dfbc9a7ade2fa776c2c5c932de0f59611aefcd32bb492c89b313b2 +size 4366804 diff --git a/VirtualBox-5.1.18-patched.tar.bz2 b/VirtualBox-5.1.18-patched.tar.bz2 deleted file mode 100644 index f85c6cd..0000000 --- a/VirtualBox-5.1.18-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac5c5430ab29021b133948b88d8960d39a9a80caae0da927a482d6d8a0ad3acd -size 81031394 diff --git a/VirtualBox-5.1.22-patched.tar.bz2 b/VirtualBox-5.1.22-patched.tar.bz2 new file mode 100644 index 0000000..7c5b2e2 --- /dev/null +++ b/VirtualBox-5.1.22-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60f50d53eae32af5a13c3c5a7ce64683a97c74c81ac05021df273068e821fc0f +size 81174832 diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index 023805d..e447b38 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -1,7 +1,7 @@ -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh +Index: VirtualBox-5.1.22/src/VBox/Additions/linux/installer/vboxadd.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/installer/vboxadd.sh -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh +--- VirtualBox-5.1.22.orig/src/VBox/Additions/linux/installer/vboxadd.sh ++++ VirtualBox-5.1.22/src/VBox/Additions/linux/installer/vboxadd.sh @@ -23,9 +23,12 @@ # Provides: vboxadd # Required-Start: @@ -16,7 +16,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh ### END INIT INFO ## @todo This file duplicates a lot of script with vboxdrv.sh. When making -@@ -94,7 +97,6 @@ fail() +@@ -108,7 +111,6 @@ fail() dev=/dev/vboxguest userdev=/dev/vboxuser @@ -24,7 +24,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh owner=vboxadd group=1 -@@ -140,12 +142,6 @@ do_vboxguest_non_udev() +@@ -162,12 +164,6 @@ do_vboxguest_non_udev() fail "Cannot create device $dev with major $maj and minor $min" } fi @@ -37,7 +37,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh if [ ! -c $userdev ]; then maj=10 -@@ -156,12 +152,6 @@ do_vboxguest_non_udev() +@@ -178,12 +174,6 @@ do_vboxguest_non_udev() rmmod vboxguest 2>/dev/null fail "Cannot create device $userdev with major $maj and minor $min" } @@ -50,31 +50,29 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh fi fi } -@@ -171,13 +161,6 @@ start() +@@ -193,9 +183,8 @@ start() begin "Starting the VirtualBox Guest Additions" console; # If we got this far assume that the slow set-up has been done. QUICKSETUP=yes -- if test -r $config; then -- . $config -- else -- fail "Configuration file $config not found" -- fi -- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || -- fail "Configuration file $config not complete" - uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null && - ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || - no_udev=1 -@@ -193,7 +176,7 @@ start() - $MODPROBE vboxguest >/dev/null 2>&1 || { - setup +- if test -z "${INSTALL_NO_MODULE_BUILDS}"; then +- uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null && +- ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || ++ uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null && ++ ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || + no_udev=1 + running_vboxguest || { + rm -f $dev || { +@@ -209,7 +198,7 @@ start() $MODPROBE vboxguest >/dev/null 2>&1 || { -- /sbin/rcvboxadd-x11 cleanup -+ #/sbin/rcvboxadd-x11 cleanup - fail "modprobe vboxguest failed" + setup + $MODPROBE vboxguest >/dev/null 2>&1 || { +- ${INSTALL_DIR}/init/vboxadd-x11 cleanup ++ ${INSTALL_DIR}#/init/vboxadd-x11 cleanup + fail "modprobe vboxguest failed" + } } - } -@@ -217,14 +200,14 @@ start() - } +@@ -234,14 +223,14 @@ start() + fi # INSTALL_NO_MODULE_BUILDS # Put the X.Org driver in place. This is harmless if it is not needed. - /sbin/rcvboxadd-x11 setup @@ -91,7 +89,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh # 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. -@@ -237,6 +220,15 @@ start() +@@ -254,6 +243,15 @@ start() chcon -h -t lib_t "/var/lib/VBoxGuestAdditions/lib/libEGL.so.1" fi echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf @@ -107,27 +105,38 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh fi ldconfig -@@ -382,7 +374,7 @@ extra_setup() - ln -sf "$lib_path/$PACKAGE/mount.vboxsf" /sbin - # And an rc file to re-build the kernel modules and re-set-up the X server. - ln -sf "$lib_path/$PACKAGE/vboxadd" /sbin/rcvboxadd -- ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11 +@@ -394,9 +392,9 @@ create_udev_rule() + echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules + fi + } +- +-create_module_rebuild_script() +-{ ++ # And an rc file to re-build the kernel modules and re-set-up the X server. ++ ln -sf "$lib_path/$PACKAGE/vboxadd" /sbin/rcvboxadd + #ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11 # And a post-installation script for rebuilding modules when a new kernel # is installed. mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d -@@ -415,49 +407,13 @@ EOF +@@ -427,47 +425,18 @@ 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 "$lib_path/$PACKAGE/mount.vboxsf" /sbin +- # SELinux security context for the mount helper. +- if test -e /etc/selinux/config; then +- # This is correct. semanage maps this to the real path, and it aborts +- # with an error, telling you what you should have typed, if you specify +- # the real path. The "chcon" is there as a back-up for old guests. +- command -v semanage > /dev/null && +- semanage fcontext -a -t mount_exec_t "/usr/lib/$PACKAGE/mount.vboxsf" +- chcon -t mount_exec_t "$lib_path/$PACKAGE/mount.vboxsf" +- fi +- succ_msg +-} +- # setup_script setup() { -- begin "Building Guest Additions kernel modules" console -- if test -r $config; then -- . $config -- else -- fail "Configuration file $config not found" -- fi -- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || -- fail "Configuration file $config not complete" - export BUILD_TYPE - export USERNAME - @@ -136,20 +145,16 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh - BUILDINTMP="$MODULE_SRC/build_in_tmp" - chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1 - -- if setup_modules; then -- mod_succ=0 -- else -- mod_succ=1 -- show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed." +- 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 +- begin "Running kernel modules will not be replaced until the system is restarted" - fi -- test -n "${QUICKSETUP}" && return "${mod_succ}" -- extra_setup -- if [ "$mod_succ" -eq "0" ]; then -- if running_vboxguest || running_vboxadd; then -- begin "You should restart your guest to make sure the new modules are actually used" console -- fi -- fi -- return "${mod_succ}" +- return 0 + begin "Recompiling VirtualBox kernel module, NOT. It has been packaged." + succ_msg } @@ -157,36 +162,37 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh # cleanup_script cleanup() { -- if test -r $config; then -- . $config -- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || -- fail "Configuration file $config not complete" -- else -- fail "Configuration file $config not found" -- fi -- - # Delete old versions of VBox modules. - cleanup_modules - depmod -@@ -468,12 +424,12 @@ cleanup() - done +- if test -z "${INSTALL_NO_MODULE_BUILDS}"; then +- # Delete old versions of VBox modules. +- cleanup_modules ++ # Delete old versions of VBox modules. ++ cleanup_modules + depmod + + # Remove old module sources +@@ -477,13 +446,14 @@ cleanup() + fi # Clean-up X11-related bits -- /sbin/rcvboxadd-x11 cleanup +- ${INSTALL_DIR}/init/vboxadd-x11 cleanup + #/sbin/rcvboxadd-x11 cleanup # Remove other files rm /sbin/mount.vboxsf 2>/dev/null - rm /sbin/rcvboxadd 2>/dev/null -- rm /sbin/rcvboxadd-x11 2>/dev/null +- if test -z "${INSTALL_NO_MODULE_BUILDS}"; then +- rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd +- rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null ++ rm /sbin/rcvboxadd 2>/dev/null + #rm /sbin/rcvboxadd-x11 2>/dev/null - rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd - rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null ++ rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd ++ rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null + fi rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null -Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh + } +Index: VirtualBox-5.1.22/src/VBox/Additions/linux/installer/vboxadd-service.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh -+++ VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh +--- VirtualBox-5.1.22.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh ++++ VirtualBox-5.1.22/src/VBox/Additions/linux/installer/vboxadd-service.sh @@ -20,7 +20,7 @@ # Provides: vboxadd-service # Required-Start: vboxadd @@ -196,10 +202,10 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh # Default-Stop: 0 1 6 # Description: VirtualBox Additions Service ### END INIT INFO -Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh +Index: VirtualBox-5.1.22/src/VBox/Installer/linux/vboxautostart-service.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxautostart-service.sh -+++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh +--- VirtualBox-5.1.22.orig/src/VBox/Installer/linux/vboxautostart-service.sh ++++ VirtualBox-5.1.22/src/VBox/Installer/linux/vboxautostart-service.sh @@ -20,7 +20,7 @@ # Provides: vboxautostart-service # Required-Start: vboxdrv @@ -209,10 +215,10 @@ Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh # Default-Stop: 0 1 6 # Description: VirtualBox autostart service ### END INIT INFO -Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh +Index: VirtualBox-5.1.22/src/VBox/Installer/linux/vboxballoonctrl-service.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh -+++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh +--- VirtualBox-5.1.22.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh ++++ VirtualBox-5.1.22/src/VBox/Installer/linux/vboxballoonctrl-service.sh @@ -20,7 +20,7 @@ # Provides: vboxballoonctrl-service # Required-Start: vboxdrv @@ -222,10 +228,10 @@ Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh # Default-Stop: 0 1 6 # Description: VirtualBox watchdog daemon ### END INIT INFO -Index: VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +Index: VirtualBox-5.1.22/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh -+++ VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +--- VirtualBox-5.1.22.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh ++++ VirtualBox-5.1.22/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh @@ -31,7 +31,7 @@ # Provides: testboxscript-service # Required-Start: $network @@ -235,10 +241,10 @@ Index: VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscrip # Default-Stop: 0 1 6 # Description: TestBoxScript service ### END INIT INFO -Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +Index: VirtualBox-5.1.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh -+++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +--- VirtualBox-5.1.22.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh ++++ VirtualBox-5.1.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network @@ -248,10 +254,10 @@ Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs # Default-Stop: 0 1 6 # Description: VirtualBox Test Execution Service ### END INIT INFO -Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +Index: VirtualBox-5.1.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh =================================================================== ---- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh -+++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +--- VirtualBox-5.1.22.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh ++++ VirtualBox-5.1.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network diff --git a/vboxadd-service.service b/vboxadd-service.service new file mode 100644 index 0000000..d73e302 --- /dev/null +++ b/vboxadd-service.service @@ -0,0 +1,21 @@ +[Unit] +SourcePath=/etc/init.d/vboxadd-service +Description=Start/Stop VirtualBox Guest Linux module +After=remote-fs.target +Wants=remote-fs.target + +[Service] +Type=simple +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SuccessExitStatus=5 6 +ExecStart=/etc/init.d/vboxadd-service start +ExecStop=/etc/init.d/vboxadd-service stop + +[Install] +WantedBy=multi-user.target.wants + diff --git a/vboxdrv.service b/vboxdrv.service new file mode 100644 index 0000000..22bcda9 --- /dev/null +++ b/vboxdrv.service @@ -0,0 +1,21 @@ +[Unit] +Description=Start/Stop VirtualBox host kernel modules +SourcePath=/etc/init.d/vboxdrv +After=remote-fs.target +Wants=remote-fs.target + +[Service] +Type=simple +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SuccessExitStatus=5 6 +ExecStart=/etc/init.d/vboxdrv start +ExecStop=/etc/init.d/vboxdrv stop + +[Install] +WantedBy=multi-user.target.wants + diff --git a/virtualbox.changes b/virtualbox.changes index 10c01b5..8408077 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Sat Apr 29 17:24:10 UTC 2017 - Larry.Finger@lwfinger.net + +- Version bump to 5.1.22 (released 2017-04-28 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + +VMM: fixed VERR_IEM_INSTR_NOT_IMPLEMENTED Guru Meditation under certain conditions (5.1 regression; mostly Mac OS X hosts; bugs #15693, #15801, #16274, #16569, #16663) +VMM: fixed software virtualization on Solaris hosts (5.1.20 regression) +Storage: fixed a potential hang under rare circumstances (bug #16677) +Storage: fixed a potential crash under rare circumstances (asynchronous I/O disabled or during maintenance file operations like merging snapshots) +Linux hosts: make the ALSA backend work again as well as loading the GL libraries on certain hosts (5.1.20 regression; bugs #16667, #16693) +Linux Additions: fixed mount.vboxsf symlink problem (5.1.20 regression; bug #16670) + +------------------------------------------------------------------- +Sat Apr 29 04:38:33 UTC 2017 - Larry.Finger@lwfinger.net + +- VirtualBox has always been started by systemd utilizing the old-style scripts in /etc/init.d. + These should be converted to the service files native to systemd. This issue has been forced + as a recent update to Tumbleweed broke the startup of VB for both TW hosts and guests. This + change starts the conversion to native systemd files. The original scripts are still used; however, + service files are used to start and stop the VB components. In a later change, all action will + be accomplished using systemd service files. + + Two new files named "vboxdrv.service" and "vboxadd-service.service" are added. + +------------------------------------------------------------------- +Thu Apr 20 19:51:27 UTC 2017 - Larry.Finger@lwfinger.net + +- Fixes for CVE-2017-3561, CVE-2017-3563, CVE-2017-3576, CVE-2017-3558, CVE-2017-3587 + CVE-2017-3559, CVE-2017-3575, CVE-2017-3538, CVE-2017-3513 + Version bump to 5.1.20 (released 2017-04-18 by Oracle) + + This is a maintenance release. The following items were fixed and/or added: + + GUI: don't check if the Extension Pack is up-to-date if the user is about to install a new Extension Pack (bug #16317) + GUI: fixed a possible crash when switching a multi-monitor VM into full-screen or seamless mode + GUI: several mini-toolbar fixes in full-screen / seamless mode (X11 hosts only) + GUI: don't crash on restoring defaults in the appliance import dialog + Windows Additions: another fix for automatic logins for Windows Vista and newer (bug #15904) + ICH9: fix for Windows guests with a huge amount (>64G) of guest memory + BIOS: fixed El Torito hard disk emulation geometry calculation (thanks Dwight Engen) + ------------------------------------------------------------------- Sat Apr 8 23:10:36 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 5d0fa41..9db4ee5 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -22,7 +22,7 @@ %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_sysconfdir}/udev/rules.d Name: virtualbox -Version: 5.1.18 +Version: 5.1.22 Release: 0 Summary: VirtualBox is an Emulator License: GPL-2.0+ @@ -47,6 +47,8 @@ Source11: %{name}-60-vboxdrv.rules # init script to start virtual boxes during boot, to be configured via /etc/sysconfig/vbox bnc#582398 Source12: %{name}-vboxes Source13: %{name}-sysconfig.vbox +Source14: vboxdrv.service +Source15: vboxadd-service.service Source98: %{name}-rpmlintrc Source99: %{name}-patch-source.sh #rework init scripts to fit suse needs @@ -100,6 +102,7 @@ BuildRequires: SDL-devel BuildRequires: acpica BuildRequires: alsa-devel BuildRequires: bin86 +BuildRequires: systemd-rpm-macros %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else @@ -181,6 +184,7 @@ BuildRequires: xorg-x11-libXext-devel-32bit BuildRequires: xorg-x11-libXmu-devel-32bit BuildRequires: xorg-x11-libXt-devel-32bit %endif +%{?systemd_requires} %description VirtualBox is an extremely feature rich, high performance product @@ -461,6 +465,8 @@ install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/drivers install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/input install -d -m 755 %{buildroot}%{_sysconfdir}/default install -d -m 755 %{buildroot}%{_sysconfdir}/init.d +install -d %{buildroot}%{_unitdir} +install -d %{buildroot}%{_unitdir}/multi-user.target.wants install -d -m 755 %{buildroot}%{_sysconfdir}/vbox install -d -m 755 %{buildroot}%{_udevrulesdir} install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d @@ -580,6 +586,11 @@ sed -i "s|%{NOLSB}%|yes|g;s|%{DEBIAN}%||g;s|%{PACKAGE}%|virtualbox|g" \ src/VBox/Installer/linux/vboxdrv.sh install -m 744 src/VBox/Installer/linux/vboxdrv.sh %{buildroot}%{_sysconfdir}/init.d/vboxdrv ln -s %{_sysconfdir}/init.d/vboxdrv %{buildroot}%{_sbindir}/rcvboxdrv +# Service files to load kernel modules on boot +install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service +install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service +install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service +install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service # Init script to start virtual boxes during boot install -m 755 %{SOURCE12} %{buildroot}%{_sysconfdir}/init.d/vboxes ln -s %{_sysconfdir}/init.d/vboxes %{buildroot}%{_sbindir}/rcvboxes @@ -656,11 +667,13 @@ popd %pre getent group vboxusers >/dev/null || groupadd -r vboxusers +%service_add_pre vboxdrv.service %pre guest-tools # Add groups for seamless mode and shared folders: getent group vboxguest >/dev/null || groupadd -r vboxguest getent group vboxsf >/dev/null || groupadd -r vboxsf +%service_add_pre vboadd.service ####################################################### # scriptlets - post @@ -676,6 +689,7 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf %set_permissions %{_vbox_instdir}/VBoxNetAdpCtl %set_permissions %{_vbox_instdir}/VBoxHeadless %set_permissions %{_vbox_instdir}/VBoxSDL +%service_add_post vboxdrv.service %post qt %set_permissions %{_vbox_instdir}/VirtualBox @@ -692,6 +706,7 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf %post guest-tools %fillup_and_insserv -f -y vboxadd %fillup_and_insserv -f -y vboxadd-service +%service_add_post vboxadd-service.service %post websrv %fillup_and_insserv -f -y vboxweb-service @@ -701,11 +716,13 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf %preun %stop_on_removal vboxdrv +%service_del_preun vboxdrv.service exit 0 %preun guest-tools %stop_on_removal vboxadd-service %stop_on_removal vboxadd +%service_del_preun vboxadd-service.service exit 0 %preun websrv @@ -720,11 +737,15 @@ exit 0 /sbin/ldconfig %restart_on_update vboxdrv %insserv_cleanup +# immediately restarting virtualbox may not work. As such wait for the next reboot to restart +export DISABLE_RESTART_ON_UPDATE=yes +%service_del_postun vboxdrv.service %postun guest-tools %restart_on_update vboxadd %restart_on_update vboxadd-service %insserv_cleanup +%service_del_postun vboxadd-service.service %postun websrv %restart_on_update vboxweb-service @@ -794,6 +815,10 @@ exit 0 %dir %{_datadir}/virtualbox %config %{_sysconfdir}/default/virtualbox %config %{_sysconfdir}/init.d/vboxdrv +%dir %{_unitdir} +%dir %{_unitdir}/multi-user.target.wants +%{_unitdir}/vboxdrv.service +%{_unitdir}/multi-user.target.wants/vboxdrv.service %dir %{_sysconfdir}/vbox %config %{_sysconfdir}/vbox/vbox.cfg %{_sysconfdir}/init.d/vboxes @@ -843,6 +868,8 @@ exit 0 %{_udevrulesdir}/60-vboxguest.rules %config %{_sysconfdir}/init.d/vboxadd %config %{_sysconfdir}/init.d/vboxadd-service +%{_unitdir}/vboxadd-service.service +%{_unitdir}/multi-user.target.wants/vboxadd-service.service %{_sbindir}/rcvboxadd %{_sbindir}/rcvboxadd-service %if 0%{?suse_version} > 1310