From 1ed39ee4572c8290cb790f229e22a82ef5fb87b898e409839b88f64f612645c7 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 23 Feb 2017 19:51:51 +0000 Subject: [PATCH 1/4] Accepting request 460007 from home:kukuk:branches:Virtualization - Require insserv and fillup by the packages who call it in the pre/post install sections OBS-URL: https://build.opensuse.org/request/show/460007 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=310 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/virtualbox.changes b/virtualbox.changes index 1e2a13a..ae063b5 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 23 12:37:09 CET 2017 - kukuk@suse.de + +- Require insserv and fillup by the packages who call it in the + pre/post install sections + ------------------------------------------------------------------- Thu Feb 2 15:30:05 UTC 2017 - adam.majer@suse.de diff --git a/virtualbox.spec b/virtualbox.spec index f66f2fe..1986180 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -164,6 +164,8 @@ Requires: %{name}-host-kmp = %{version} Requires(post): sysvinit(syslog) Requires(pre): permissions Requires(pre): pwdutils +Requires(pre): %insserv_prereq +Requires(pre): %fillup_prereq Recommends: %{name}-gui = %{version} #rename from ose version: Provides: %{name}-ose = %{version} @@ -209,6 +211,7 @@ Summary: WebService GUI part for %{name} Group: System/Emulators/PC Requires: %{name} = %{version} Provides: %{name}-gui = %{version} +Requires(pre): %insserv_prereq %description websrv websrv GUI part for %{name}. @@ -254,6 +257,7 @@ Supplements: modalias(pci:v000080EEd0000BEEFsv*sd*bc*sc*i*) #rename from "ose" version: Provides: %{name}-ose-guest-tools = %{version} Obsoletes: %{name}-ose-guest-tools < %{version} +Requires(pre): %insserv_prereq %description guest-tools VirtualBox guest addition tools. From 76da1100ef4620e561e1f066ce4eb37926c86d841f11679de9aa9cf25c9360fd Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 24 Feb 2017 03:39:53 +0000 Subject: [PATCH 2/4] - Fix 3D acceleration as reported in bsc #1024934. The steps needed are as follows: - Remove file "vbox_prevent_wrong_SONAME.patch" - the original SONAME values are needed for libGL.so.1 and libEGL.so.1 to be replaced by VBoxOGL.so and VBoxEGL.so, respectively. - Package VBoxEGL.so OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=311 --- vbox-vboxadd-init-script.diff | 23 ++++++++++++++++------- vbox_prevent_wrong_SONAME.patch | 13 ------------- virtualbox.changes | 8 ++++++++ virtualbox.spec | 8 +++++--- 4 files changed, 29 insertions(+), 23 deletions(-) delete mode 100644 vbox_prevent_wrong_SONAME.patch diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index 4bd20f3..3775c00 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -1,7 +1,7 @@ -Index: VirtualBox-5.1.4/src/VBox/Additions/linux/installer/vboxadd.sh +Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh =================================================================== ---- VirtualBox-5.1.4.orig/src/VBox/Additions/linux/installer/vboxadd.sh -+++ VirtualBox-5.1.4/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 @@ -23,9 +23,12 @@ # Provides: vboxadd # Required-Start: @@ -73,7 +73,7 @@ Index: VirtualBox-5.1.4/src/VBox/Additions/linux/installer/vboxadd.sh fail "modprobe vboxguest failed" } } -@@ -217,7 +200,7 @@ start() +@@ -217,14 +200,14 @@ start() } # Put the X.Org driver in place. This is harmless if it is not needed. @@ -82,7 +82,16 @@ Index: VirtualBox-5.1.4/src/VBox/Additions/linux/installer/vboxadd.sh # Install the guest OpenGL drivers. For now we don't support # multi-architecture installations rm -f /etc/ld.so.conf.d/00vboxvideo.conf -@@ -378,7 +361,7 @@ extra_setup() + 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 "${INSTALL_DIR}/lib/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.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. +@@ -382,7 +365,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 @@ -91,7 +100,7 @@ Index: VirtualBox-5.1.4/src/VBox/Additions/linux/installer/vboxadd.sh # And a post-installation script for rebuilding modules when a new kernel # is installed. mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d -@@ -411,49 +394,13 @@ EOF +@@ -415,49 +398,13 @@ EOF # setup_script setup() { @@ -143,7 +152,7 @@ Index: VirtualBox-5.1.4/src/VBox/Additions/linux/installer/vboxadd.sh # Delete old versions of VBox modules. cleanup_modules depmod -@@ -464,12 +411,12 @@ cleanup() +@@ -468,12 +415,12 @@ cleanup() done # Clean-up X11-related bits diff --git a/vbox_prevent_wrong_SONAME.patch b/vbox_prevent_wrong_SONAME.patch deleted file mode 100644 index 0fea800..0000000 --- a/vbox_prevent_wrong_SONAME.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk -=================================================================== ---- VirtualBox-5.1.2.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk -+++ VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk -@@ -221,7 +221,7 @@ if1of ($(KBUILD_TARGET), linux solaris f - dl - endif - else -- VBoxOGL_SONAME.linux = libGL.so.1 -+ VBoxOGL_SONAME.linux = VBoxOGL.so.1 - VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain - endif - endif diff --git a/virtualbox.changes b/virtualbox.changes index ae063b5..8cc2007 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Feb 24 03:34:35 UTC 2017 - Larry.Finger@lwfinger.net + +- Fix 3D acceleration as reported in bsc #1024934. The steps needed are as follows: + - Remove file "vbox_prevent_wrong_SONAME.patch" - the original SONAME values are needed for + libGL.so.1 and libEGL.so.1 to be replaced by VBoxOGL.so and VBoxEGL.so, respectively. + - Package VBoxEGL.so + ------------------------------------------------------------------- Thu Feb 23 12:37:09 CET 2017 - kukuk@suse.de diff --git a/virtualbox.spec b/virtualbox.spec index 1986180..dfd43d9 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -83,8 +83,6 @@ Patch107: virtualbox-sed-params.patch Patch108: virtualbox-snpritnf-buffer-overflow.patch # Patch to add code to explain USB Passthru Patch109: vbox-usb-warning.diff -# Prevent Guest Additions from creating wrong SONAME -Patch111: vbox_prevent_wrong_SONAME.patch # Fix change in kernel API for ttm_bo_move_memcpy() Patch112: modify_for_4_8_bo_move.patch # Remove all mention of _smp_mflags @@ -333,7 +331,6 @@ This package contains icons for guest desktop files that were created on the des %patch107 -p1 %patch108 -p1 %patch109 -p1 -%patch111 -p1 %patch112 -p1 %patch113 -p1 %patch116 -p1 @@ -508,6 +505,9 @@ popd # VBoxOGL* libs for guest-x11 subpackage install -m 644 out/linux.*/release/bin/additions/VBoxOGL*.so \ %{buildroot}%{_libdir} +# VBoxEGL* libs for guest-x11 subpackage +install -m 755 out/linux.*/release/bin/additions/VBoxEGL*.so \ + %{buildroot}%{_libdir} # make link for dri lib ln -s %{_libdir}/VBoxOGL.so %{buildroot}%{_libdir}/dri/vboxvideo_dri.so # install init script which start VBoxClient daemon (support for clipboard,autoresize,seamless windows) @@ -760,6 +760,7 @@ exit 0 %{_vbox_instdir}/VBoxSharedCrOpenGL.so %{_vbox_instdir}/VBoxSharedFolders.so %{_vbox_instdir}/VBoxVMM.so +#%{_vbox_instdir}/VBoxVNC.so %{_vbox_instdir}/VBoxXPCOMC.so %{_vbox_instdir}/VBoxXPCOM.so %{_vbox_instdir}/VBoxDD2RC.rc @@ -823,6 +824,7 @@ exit 0 %dir %{_libdir}/dri/ %{_bindir}/VBoxClient %{_libdir}/VBoxOGL*.so +%{_libdir}/VBoxEGL*.so %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so %{_libdir}/dri/vboxvideo_dri.so %{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh From f63b7ffb65173f8d76874e020853096486e0b2bba9e46e0a9c8bd5a644ce4440 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 26 Feb 2017 20:21:39 +0000 Subject: [PATCH 3/4] - The fix for 3D acceleration only works for Gmome desktops. KDE desktops fail. Accordingly, 3D acceleration must still be disabled "out-of-the-box". File /etc/init.d/vboxadd contains comments on the modifications needed to turn 3D acceleration on, thus Gnome users may turn it on selectively. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=312 --- vbox-vboxadd-init-script.diff | 22 +++++++++++++++++++--- virtualbox.changes | 8 ++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index 3775c00..c2600aa 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -91,7 +91,23 @@ 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. -@@ -382,7 +365,7 @@ extra_setup() +@@ -237,6 +220,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 ++ # 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 + +@@ -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 @@ -100,7 +116,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh # 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 +398,13 @@ EOF +@@ -415,49 +407,13 @@ EOF # setup_script setup() { @@ -152,7 +168,7 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh # Delete old versions of VBox modules. cleanup_modules depmod -@@ -468,12 +415,12 @@ cleanup() +@@ -468,12 +424,12 @@ cleanup() done # Clean-up X11-related bits diff --git a/virtualbox.changes b/virtualbox.changes index 8cc2007..8a68d17 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Feb 26 20:17:02 UTC 2017 - Larry.Finger@lwfinger.net + +- The fix for 3D acceleration only works for Gmome desktops. KDE desktops fail. Accordingly, + 3D acceleration must still be disabled "out-of-the-box". File /etc/init.d/vboxadd contains + comments on the modifications needed to turn 3D acceleration on, thus Gnome users may turn + it on selectively. + ------------------------------------------------------------------- Fri Feb 24 03:34:35 UTC 2017 - Larry.Finger@lwfinger.net From a7a3bd043a6383fdb952e3fd32372dd22c9844e76edd9c200ac44619d0668cc4 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 1 Mar 2017 14:44:22 +0000 Subject: [PATCH 4/4] Accepting request 461275 from home:dimstar:Factory - Do not proivde libGL.so.1 and libEGL.so.1 symbols into the rpm database. OBS-URL: https://build.opensuse.org/request/show/461275 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=313 --- virtualbox.changes | 6 ++++++ virtualbox.spec | 3 +++ 2 files changed, 9 insertions(+) diff --git a/virtualbox.changes b/virtualbox.changes index 8a68d17..d290781 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 28 21:06:30 UTC 2017 - dimstar@opensuse.org + +- Do not proivde libGL.so.1 and libEGL.so.1 symbols into the rpm + database. + ------------------------------------------------------------------- Sun Feb 26 20:17:02 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index dfd43d9..976f763 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -16,6 +16,9 @@ # +# Do not provide libGL.so symbols - they are owned by Mesa already and this could potentially confuse rpm/zypp +%global __provides_exclude ^libE?GL.so.1.*$ + %define _vbox_instdir %{_libexecdir}/virtualbox %define _udevrulesdir %{_sysconfdir}/udev/rules.d Name: virtualbox