1
0
forked from pool/virtualbox
virtualbox/vbox-vboxadd-init-script.diff
Larry Finger 41af935351 - Version bump to 5.2.6 (released 2018-01-15 by Oracle)
Fixes for the following vulnerabilities (bsc#1076372)
CVE-2018-2694, CVE-2018-2698, CVE-2018-2685, CVE-2018-2686, CVE-2018-2687, CVE-2018-2688
CVE-2018-2689, CVE-2018-2690, CVE-2018-2676, CVE-2018-2693, CVE-2017-5715
 
This is a maintenance release. The following items were fixed and/or added:
    GUI: fixed occasional screen corruption when host screen resolutio n is changed
    User interface: increase proposed disk size when creating new VMs for Windows 7 and newer
    User interface: various improvements for high resolution screens
    VMM: Fixed problems using 256MB VRAM in raw-mode VMs
    Audio: implemented support for audio playback and recording for macOS guests
    Audio: further timing improvements for Windows 10 guests
    Linux hosts: fixed problem accessing mini-toolbar under XFCE (bug #17280, contributed by Dusan Gallo)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=397
2018-01-17 18:52:30 +00:00

283 lines
11 KiB
Diff

Index: VirtualBox-5.2.6/src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/Additions/linux/installer/vboxadd.sh
+++ VirtualBox-5.2.6/src/VBox/Additions/linux/installer/vboxadd.sh
@@ -26,11 +26,14 @@
# Provides: vboxadd
# Required-Start:
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Should-Start: $remote_fs
+# Should-Stop: $remote_fs
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# X-Start-Before: display-manager
# X-Service-Type: oneshot
# Description: VirtualBox Linux Additions kernel modules
+# Short-Description: VirtualBox Linux Additions kernel modules
### END INIT INFO
## @todo This file duplicates a lot of script with vboxdrv.sh. When making
@@ -130,19 +133,10 @@ log()
dev=vboxguest
userdev=vboxuser
-config=/var/lib/VBoxGuestAdditions/config
owner=vboxadd
group=1
usergroup=vboxadd
-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"
-
running_vboxguest()
{
lsmod | grep -q "vboxguest[^_-]"
@@ -185,12 +179,6 @@ do_vboxguest_non_udev()
fail "Cannot create device /dev/$dev with major $maj and minor $min"
}
fi
- chown $owner:$group /dev/$dev 2>/dev/null || {
- rm -f /dev/$dev 2>/dev/null
- rm -f /dev/$userdev 2>/dev/null
- rmmod vboxguest 2>/dev/null
- fail "Cannot change owner $owner:$group for device /dev/$dev"
- }
if [ ! -c /dev/$userdev ]; then
maj=10
@@ -201,12 +189,6 @@ do_vboxguest_non_udev()
rmmod vboxguest 2>/dev/null
fail "Cannot create device /dev/$userdev with major $maj and minor $min"
}
- chown $owner:$usergroup /dev/$userdev 2>/dev/null || {
- rm -f /dev/$dev 2>/dev/null
- rm -f /dev/$userdev 2>/dev/null
- rmmod vboxguest 2>/dev/null
- fail "Cannot change owner $owner:$usergroup for device /dev/$userdev"
- }
fi
fi
}
@@ -216,9 +198,8 @@ start()
begin "Starting."
# If we got this far assume that the slow set-up has been done.
QUICKSETUP=yes
- 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/$dev || {
@@ -231,7 +212,7 @@ start()
$MODPROBE vboxguest >/dev/null 2>&1 || {
setup
- $MODPROBE vboxguest >/dev/null 2>&1 ||
+ $MODPROBE vboxguest >/dev/null 2>&1 || {
fail "modprobe vboxguest failed"
}
case "$no_udev" in 1)
@@ -254,14 +235,15 @@ start()
fi # INSTALL_NO_MODULE_BUILDS
# Put the X.Org driver in place. This is harmless if it is not needed.
- "${INSTALL_DIR}/init/vboxadd-x11" setup 2>> "${LOG}"
+ #/sbin/rcvboxadd-x11 setup
# Install the guest OpenGL drivers. For now we don't support
# multi-architecture installations
rm -f /etc/ld.so.conf.d/00vboxvideo.conf
rm -Rf /var/lib/VBoxGuestAdditions/lib
if /usr/bin/VBoxClient --check3d 2>/dev/null; then
mkdir -p /var/lib/VBoxGuestAdditions/lib
- ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
+ ln -sf "/usr/lib64/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
+ ln -sf "/usr/lib64/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
# 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.
@@ -272,6 +254,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
+ # The above code will enable 3D acceleration for Gnome VM desktops. For Plasma 5 (KDE)
+ # VM's almost everything breaks. For that reason, acceleration MUST be disabled here.
+ # Gnome users that want this feature should delete the two 'rm' commands that follow.
+ # You will need to repeat this modification EVERY time the VirtualBox package is
+ # reinstalled
+ # Any KDE user that deletes the two 'rm' commands MUST know how to recover your sustem
+ # from a mode 3 boot. YOU HAVE BEEN WARNED.
+ rm /var/lib/VBoxGuestAdditions/lib/*
+ rm /etc/ld.so.conf.d/00vboxvideo.conf
fi
ldconfig
@@ -408,9 +399,9 @@ create_udev_rule()
echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"${userdev}\", OWNER=\"${owner}\", GROUP=\"${usergroup}\", MODE=\"0660\"" >> /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
@@ -440,45 +431,21 @@ 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
- # 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 "${INSTALL_DIR}/other/mount.vboxsf"
- chcon -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf"
- fi
+ succ_msg
}
# 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"
- fi
- return 0
+ begin "Recompiling VirtualBox kernel module, NOT. It has been packaged."
+ succ_msg
}
# cleanup_script
cleanup()
{
- 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
@@ -488,13 +455,14 @@ cleanup()
fi
# Clean-up X11-related bits
- "${INSTALL_DIR}/init/vboxadd-x11" cleanup 2>> "${LOG}"
+ #/sbin/rcvboxadd-x11 cleanup
# Remove other files
rm /sbin/mount.vboxsf 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
fi
rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
}
Index: VirtualBox-5.2.6/src/VBox/Additions/linux/installer/vboxadd-service.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh
+++ VirtualBox-5.2.6/src/VBox/Additions/linux/installer/vboxadd-service.sh
@@ -26,7 +26,7 @@
# Provides: vboxadd-service
# Required-Start: vboxadd
# Required-Stop: vboxadd
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# X-Conflicts-With: systemd-timesyncd.service
# Description: VirtualBox Additions Service
Index: VirtualBox-5.2.6/src/VBox/Installer/linux/vboxautostart-service.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/Installer/linux/vboxautostart-service.sh
+++ VirtualBox-5.2.6/src/VBox/Installer/linux/vboxautostart-service.sh
@@ -23,7 +23,7 @@
# Provides: vboxautostart-service
# Required-Start: vboxdrv
# Required-Stop: vboxdrv
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox autostart service
### END INIT INFO
Index: VirtualBox-5.2.6/src/VBox/Installer/linux/vboxballoonctrl-service.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh
+++ VirtualBox-5.2.6/src/VBox/Installer/linux/vboxballoonctrl-service.sh
@@ -23,7 +23,7 @@
# Provides: vboxballoonctrl-service
# Required-Start: vboxdrv
# Required-Stop: vboxdrv
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox watchdog daemon
### END INIT INFO
Index: VirtualBox-5.2.6/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
+++ VirtualBox-5.2.6/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
@@ -31,7 +31,7 @@
# Provides: testboxscript-service
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: TestBoxScript service
### END INIT INFO
Index: VirtualBox-5.2.6/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
+++ VirtualBox-5.2.6/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
@@ -31,7 +31,7 @@
# Provides: vboxtxs
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Test Execution Service
### END INIT INFO
Index: VirtualBox-5.2.6/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
===================================================================
--- VirtualBox-5.2.6.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
+++ VirtualBox-5.2.6/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
@@ -31,7 +31,7 @@
# Provides: vboxtxs
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Test Execution Service
### END INIT INFO