Hello community,
here is the log from the commit of package virtualbox-ose for openSUSE:Factory
checked in at Fri May 14 00:50:09 CEST 2010.
--------
--- virtualbox-ose/virtualbox-ose.changes 2010-04-19 00:16:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/virtualbox-ose/virtualbox-ose.changes 2010-05-11 12:36:06.000000000 +0200
@@ -1,0 +2,45 @@
+Mon May 10 15:15:42 UTC 2010 - mseben@novell.com
+
+- updated to 3.1.8
+ * VMM: fixed crash with the OpenSUSE 11.3 milestone kernel during early boot (software virtualization only; bug #5457)
+ * VMM: fixed invalid state during teleportation
+ * VMM: fixed OS/2 guest crash with nested paging enabled
+ * VMM: fixed massive display performance loss (AMD-V with nested paging only)
+ * GUI: fixed off-by-one bug when passing absolute mouse coordinates to the guest (3.1.6 regression)
+ * GUI: show the real version of the Guest Additions, not the interface version
+ * GUI: when adding a DVD or floppy slot in the VM mass storage settings dialog, don't attach a random medium but just leave the slot empty
+ * GUI: added --seamless and --fullscreen command line switches (bug #4220)
+ * GUI: fixed a SEGFAULT under rare circumstances
+ * 2D Video acceleration: fixed display issues when working with non 32-bit modes (bugs 6094 & #6208)
+ * LsiLogic: Fixed detection of hard disks attached to port 0 when using the drivers from LSI
+ * ATA: Fixed sporadic crash with Linux guests when having a hard disk and DVD drive on the same channel (bug 6079)
+ * Network: allow to start a VM even if not all network adapters are attached
+ * Network: promiscuous mode support for e1000 and simparavirtualized adapters (bug 6519)
+ * NAT: fixed ICMP latency (non-Windows hosts only; bug 6427)
+ * SCSI: fixed guest crashes under certain circumstances when booting from SCSI devices
+ * VBoxManage: fixed modifyvm --natnet default
+ * Solaris Hosts: fixed a kernel panic when bridged networking might fail to initialize
+ * Solaris Hosts: fixed priority tagged VLAN packets in bridged networking
+ * Shared folders: fixed issue with copying read-only files (Linux guests only; bug 4890)
+ * Shared folders: renamed the guest kernel module from vboxvfs to vboxsf to make it load on demand by the Linux kernel. Fixes mounting from /etc/fstab in Ubuntu 10.04
+ * Shared folders: fixed setuid file permissions (Solaris guests only).
+ * Shared folders: fixed deleting directories recursively (Solaris guests only; bug 6513)
+ * Guest Additions: support seamless and dynamic resizing on certain older X11 guests (bug 5840)
+ * Solaris Additions: fixed OpenGL library dependencies (bug 6435)
+ * Keyboard/Mouse emulation: fixed handling of simultaneous mouse/keyboard events under certain circumstances (bug 5375)
+ * Mouse emulation: never switch straight back from Explorer to IntelliMouse mode as it confuses the FreeBSD mouse driver (bug 6488)
+ * SDK: fixed memory leak in IDisplay::takeScreenShotSlow() (bug 6549)
+ * 3D support: fixed Final frame of Compiz animation not updated to the screen (Mac OS X only) (bug 4653)
+ * VRDP: allow to bind to localhost only on Mac OS X (bug 5227)
+ * Linux hosts: add host USB support for Ubuntu 10.04 and other hosts without the hal daemon or usbfs (bug 6343)
+ * webservice: more structs and array fixes in PHP bindings (bug 5657)
+ * Windows hosts: make the bridged networking driver notify dll be correctly unregistred on uninstall (bug 5780)
+- dropped VBoxRandR.sh (from xorg-x11-driver-virtualbox-ose) by
+ upstream : VBoxClient now handles dynamic resizing using library
+ calls, not a shell script see http://www.virtualbox.org/changeset/27601
+- deprecated vbox-fix_PF_storm.diff
+- use older version of disable-updates patch
+- fix typo in %verify_permissions in spec file
+- virtualbox-ose-vboxes init script changes from rbos@opensuse.org
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
VirtualBox-3.1.6-OSE-patched.tar.bz2
VirtualBox-3.1.6-UserManual.pdf
vbox-fix_PF_storm.diff
virtualbox-ose-3.1.6-rpmlintrc
New:
----
VirtualBox-3.1.8-OSE-patched.tar.bz2
VirtualBox-3.1.8-OSE.tar.bz2
VirtualBox-3.1.8-UserManual.pdf
virtualbox-ose-3.1.8-rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virtualbox-ose.spec ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:49.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:49.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package virtualbox-ose (Version 3.1.6)
+# spec file for package virtualbox-ose (Version 3.1.8)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -39,8 +39,8 @@
%endif
#
ExclusiveArch: %ix86 x86_64
-Version: 3.1.6
-Release: 6
+Version: 3.1.8
+Release: 1
Summary: VirtualBox OSE is an Emulator
License: GPLv2+
Group: System/Emulators/PC
@@ -74,10 +74,6 @@
Patch3: vbox-disable-updates.diff
#fix return values which trigger post build checks and coused build error - should goes to upstream
Patch4: vbox-ret-in-nonvoid-fnc.diff
-#Check for write conflicts with our hypervisor mapping early on. If the guest happens to access a non-present page,
-#where vbox's hypervsor is currently mapped, then we'll create a #PF storm in the guest.
-#patch grabbed from svn : http://www.virtualbox.org/changeset/28090
-Patch5: vbox-fix_PF_storm.diff
#build xorg additions against system libs and headers, this patch could be dropped in next release
#but we have to switch to vbox{mouse,video}_drv_18.so
Patch6: vbox-system-xorg.patch
@@ -158,14 +154,13 @@
%setup -q -n VirtualBox-%{version}_OSE
%patch1
%patch2
-%patch3 -p1
+%patch3
%patch4 -p1
-%patch5
%patch6
%patch7
%patch99 -p1
#copy user manual
-cp %{S:1} ./UserManual.pdf
+%__cp %{S:1} ./UserManual.pdf
%build
# This package failed when testing with -Wl,-as-needed being default.
@@ -188,9 +183,9 @@
#
# build kernel modules for guest and host (check novel-kmp package as example)
# host modules : vboxdrv,vboxnetflt,vboxnetadp
-# guest modules : vboxguest,vboxvfs,vboxvideo
+# guest modules : vboxguest,vboxsf,vboxvideo
for vbox_module in out/linux.*/release/bin/src/vbox{drv,netflt,netadp} \
- out/linux.*/release/bin/additions/src/vbox{guest,vfs,video}
+ out/linux.*/release/bin/additions/src/vbox{guest,sf,video}
do
module_name=`/usr/bin/basename $vbox_module` #get the module name from path
for flavor in %flavors_to_build; do #go trought the all flavors (desktop,default ...)
@@ -200,7 +195,7 @@
# copy vboxdrv (for host) and vboxguest (for guest) module symbols:
test $module_name = "vboxnetflt" || test $module_name = "vboxnetadp" && \
%__cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers $PWD/modules_build_dir/$flavor/$module_name
- test $module_name = "vboxvfs" && \
+ test $module_name = "vboxsf" && \
%__cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers $PWD/modules_build_dir/$flavor/$module_name
#and build module $module_name for $flavor flavor and %_target_cpu architecture
%__make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/modules_build_dir/$flavor/$module_name
@@ -241,7 +236,7 @@
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
#to install modules we use here similar steps like in build phase, go trought the all modules :
-for module_name in vbox{drv,netflt,netadp,guest,vfs,video}
+for module_name in vbox{drv,netflt,netadp,guest,sf,video}
do
#and trought the all flavors
for flavor in %flavors_to_build; do
@@ -298,9 +293,6 @@
# install init script which start VBoxClient daemon (support for clipboard,autoresize,seamless windows)
%__install -m 755 src/VBox/Additions/x11/Installer/98vboxadd-xclient \
%{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh
-# script which handle dynamic display changes
-%__install -m 755 src/VBox/Additions/x11/Installer/VBoxRandR.sh \
- %{buildroot}%{_bindir}/VBoxRandR
%if %suse_version >= 1130
# add snipet to vbox mouse integration recognize
%__install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/60-vboxmouse.conf
@@ -405,11 +397,10 @@
%restart_on_update vboxadd
%insserv_cleanup
%verifyscript
-verify_permissions \
- -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless \
- -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox \
%if %suse_version > 1110
- -e %{_vbox_instdir}/VBoxNetAdpCtl
+%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox -e %{_vbox_instdir}/VBoxNetAdpCtl
+%else
+%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox
%endif
#-e %{_vbox_instdir}/VBoxNetDHCP
@@ -450,7 +441,11 @@
%{_var}/adm/fillup-templates/sysconfig.vbox
%{_sbindir}/rcvboxes
#check setuid bit
+%if %suse_version > 1110
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetAdpCtl
+%else
+%{_vbox_instdir}/VBoxNetAdpCtl
+%endif
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxBFE
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxHeadless
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSDL
@@ -465,7 +460,6 @@
%dir %{_libdir}/xorg/modules/input
%dir %{_libdir}/dri/
%{_bindir}/VBoxClient
-%{_bindir}/VBoxRandR
%{_libdir}/VBoxOGL*.so
%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
%{_libdir}/xorg/modules/input/vboxmouse_drv.so
++++++ VirtualBox-3.1.6-OSE-patched.tar.bz2 -> VirtualBox-3.1.8-OSE-patched.tar.bz2 ++++++
virtualbox-ose/VirtualBox-3.1.6-OSE-patched.tar.bz2 /mounts/work_src_done/STABLE/virtualbox-ose/VirtualBox-3.1.8-OSE-patched.tar.bz2 differ: char 11, line 1
++++++ VirtualBox-3.1.6-OSE-patched.tar.bz2 -> VirtualBox-3.1.8-OSE.tar.bz2 ++++++
virtualbox-ose/VirtualBox-3.1.6-OSE-patched.tar.bz2 /mounts/work_src_done/STABLE/virtualbox-ose/VirtualBox-3.1.8-OSE.tar.bz2 differ: char 11, line 1
++++++ VirtualBox-3.1.6-UserManual.pdf -> VirtualBox-3.1.8-UserManual.pdf ++++++
(binary differes)
++++++ vbox-disable-updates.diff ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:49.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:49.000000000 +0200
@@ -1,21 +1,64 @@
-Our OS provides superior way of dealing with updates (PackageKit).
-Let's not bug the user with updates that are not yet packaged.
-
-Lubomir Rintel
-
-diff -up VirtualBox-3.1.0_OSE/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp.noupdate VirtualBox-3.1.0_OSE/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp
---- VirtualBox-3.1.0_OSE/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp.noupdate 2009-11-12 15:25:16.000000000 +0100
-+++ VirtualBox-3.1.0_OSE/src/VBox/Frontends/VirtualBox/src/VBoxUpdateDlg.cpp 2009-11-12 15:28:49.000000000 +0100
-@@ -186,7 +186,11 @@ void VBoxUpdateData::decode()
- if (parser.size() > 1)
- {
- QDate date = QDate::fromString (parser [1], Qt::ISODate);
-- mDate = date.isValid() ? date : QDate::currentDate();
-+ if (date.isValid()) {
-+ mDate = date;
-+ } else {
-+ mPeriodIndex = PeriodNever;
-+ }
- }
-
- /* Parse 'branch' value */
+Index: src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsUpdate.cpp
+===================================================================
+@@ -45,7 +45,8 @@ void VBoxGLSettingsUpdate::getFrom (cons
+ {
+ VBoxUpdateData data (vboxGlobal().virtualBox().GetExtraData (VBoxDefs::GUI_UpdateDate));
+
+- mCbCheck->setChecked (!data.isNoNeedToCheck());
++ mCbCheck->setChecked (false);
++
+ if (mCbCheck->isChecked())
+ {
+ mCbOncePer->setCurrentIndex (data.periodIndex());
+Index: src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+===================================================================
+--- src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp.orig
++++ src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+@@ -5115,6 +5115,9 @@ void VBoxGlobal::showRegistrationDialog
+ */
+ void VBoxGlobal::showUpdateDialog (bool aForce)
+ {
++ // Disable update dialog for openSUSE
++ return;
++
+ /* Silently check in one day after current time-stamp */
+ QTimer::singleShot (24 /* hours */ * 60 /* minutes */ *
+ 60 /* seconds */ * 1000 /* milliseconds */,
+Index: src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
+===================================================================
+--- src/VBox/Frontends/VirtualBox/src/VBoxHelpActions.cpp 2009-03-13 11:38:50.000000000 +0100
++++ src/VBox/Frontends/VirtualBox/src/VBoxHelpActions.cpp 2009-04-15 17:03:52.000000000 +0200
+@@ -87,8 +87,8 @@
+ #endif
+
+ aMenu->addAction (updateAction);
+- updateAction->setEnabled (vboxGlobal().virtualBox().
+- GetExtraData (VBoxDefs::GUI_UpdateDlgWinID).isEmpty());
++ updateAction->setDisabled( true );
++
+
+ #ifndef Q_WS_MAC
+ aMenu->addSeparator();
+Index: src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsUpdate.ui
+===================================================================
+--- src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsUpdate.ui.orig
++++ src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsUpdate.ui
+@@ -18,6 +18,9 @@
+ </comment>
+ <class>VBoxGLSettingsUpdate</class>
+ <widget class="QWidget" name="VBoxGLSettingsUpdate" >
++ <property name="enabled" >
++ <bool>false</bool>
++ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+@@ -48,7 +51,7 @@
+ <string>&Check for updates</string>
+ </property>
+ <property name="checked" >
+- <bool>true</bool>
++ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
++++++ vbox-vboxadd-init-script.diff ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:49.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:49.000000000 +0200
@@ -45,15 +45,15 @@
fi
fi
-- if [ -n "$BUILDVBOXVFS" ]; then
-- running_vboxvfs || {
-+ running_vboxvfs || {
- $MODPROBE vboxvfs > /dev/null 2>&1 || {
+- if [ -n "$BUILDVBOXSF" ]; then
+- running_vboxsf || {
++ running_vboxsf || {
+ $MODPROBE vboxsf > /dev/null 2>&1 || {
if dmesg | grep "vboxConnect failed" > /dev/null 2>&1; then
fail_msg
@@ -270,8 +256,7 @@ start()
fi
- fail "modprobe vboxvfs failed"
+ fail "modprobe vboxsf failed"
}
- }
- fi
@@ -61,20 +61,20 @@
# Mount all shared folders from /etc/fstab. Normally this is done by some
# other startup script but this requires the vboxdrv kernel module loaded.
-@@ -287,10 +272,8 @@ stop()
+@@ -288,10 +273,8 @@ stop()
if ! umount -a -t vboxsf 2>/dev/null; then
fail "Cannot unmount vboxsf folders"
fi
-- if [ -n "$BUILDVBOXVFS" ]; then
-- if running_vboxvfs; then
-- rmmod vboxvfs 2>/dev/null || fail "Cannot unload module vboxvfs"
+- if [ -n "$BUILDVBOXSF" ]; then
+- if running_vboxsf; then
+- rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
- fi
-+ if running_vboxvfs; then
-+ rmmod vboxvfs 2>/dev/null || fail "Cannot unload module vboxvfs"
++ if running_vboxsf; then
++ rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
fi
if running_vboxguest; then
rmmod vboxguest 2>/dev/null || fail "Cannot unload module vboxguest"
-@@ -310,106 +293,8 @@ restart()
+@@ -311,106 +294,8 @@ restart()
# setup_script
setup()
{
@@ -84,9 +84,9 @@
- find /lib/modules/`uname -r` -name "vboxvideo\.*" 2>/dev/null|xargs rm -f 2>/dev/null
- succ_msg
- fi
-- if find /lib/modules/`uname -r` -name "vboxvfs\.*" 2>/dev/null|grep -q vboxvfs; then
-- begin "Removing old VirtualBox vboxvfs kernel module"
-- find /lib/modules/`uname -r` -name "vboxvfs\.*" 2>/dev/null|xargs rm -f 2>/dev/null
+- if find /lib/modules/`uname -r` -name "vboxsf\.*" 2>/dev/null|grep -q vboxsf; then
+- begin "Removing old VirtualBox vboxsf kernel module"
+- find /lib/modules/`uname -r` -name "vboxsf\.*" 2>/dev/null|xargs rm -f 2>/dev/null
- succ_msg
- fi
- if find /lib/modules/`uname -r` -name "vboxguest\.*" 2>/dev/null|grep -q vboxguest; then
@@ -112,9 +112,9 @@
- fail "Look at $LOG to find out what went wrong"
- fi
- succ_msg
-- if [ -n "$BUILDVBOXVFS" ]; then
+- if [ -n "$BUILDVBOXSF" ]; then
- begin "Building the shared folder support module"
-- if ! $BUILDVBOXVFS \
+- if ! $BUILDVBOXSF \
- --use-module-symvers /tmp/vboxguest-Module.symvers \
- --no-print-directory install >> $LOG 2>&1; then
- fail "Look at $LOG to find out what went wrong"
@@ -172,13 +172,14 @@
- # executing this command from service scripts. Shouldn't hurt for other distributions.
- chcon -u system_u -t mount_exec_t "$lib_path/$PACKAGE/mount.vboxsf" > /dev/null 2>&1
-
-+ begin "Recompiling VirtualBox kernel modules, NOT. It has been packaged."
- succ_msg
+- succ_msg
- if running_vboxguest || running_vboxadd; then
- printf "You should restart your guest to make sure the new modules are actually used\n\n"
- else
- start
- fi
++ begin "Recompiling VirtualBox kernel modules, NOT. It has been packaged."
++ succ_msg
}
# cleanup_script
++++++ virtualbox-ose-3.1.6-rpmlintrc -> virtualbox-ose-3.1.8-rpmlintrc ++++++
++++++ virtualbox-ose-guest-kmp-files ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:50.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:50.000000000 +0200
@@ -1,6 +1,6 @@
%defattr (-,root,root)
%dir /lib/modules/%2-%1/
%dir /lib/modules/%2-%1/updates
-/lib/modules/%2-%1/updates/vboxvfs.ko
+/lib/modules/%2-%1/updates/vboxsf.ko
/lib/modules/%2-%1/updates/vboxvideo.ko
/lib/modules/%2-%1/updates/vboxguest.ko
++++++ virtualbox-ose-sysconfig.vbox ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:50.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:50.000000000 +0200
@@ -7,19 +7,17 @@
#
# The variable VBOX_AUTOSTART holds the virtual machines to be started during
# boot time. One entry must contain the virtual machine name and the
-# VBOX_USER_HOME directory. They are separated with a ";". Multiple entries
-# (virtual machines) are separated with a space. The VBOX_USER_HOME is often
-# the directory $HOME/.VirtualBox. It must be specified as the virtual machine
-# can be maintained by a regular user, but root is starting the virtual machine.
+# virtual machine owner. They are separated with a ";". Multiple entries
+# (virtual machines) are separated with a space.
#
# Examples:
-# MachineName1;VBOX_USER_HOME
+# MachineName1;user1
#
# One virtual machine:
-# openSUSE_Factory;/home/openSUSE/.VirtualBox
+# openSUSE_Factory;vbox
#
# Multiple virtual machines:
-# openSUSE_Factory;/home/openSUSE/.VirtualBox openSUSE_stable;/home/openSUSE/.VirtualBox
+# openSUSE_Factory;vbox openSUSE_stable;suse
#
VBOX_AUTOSTART=""
++++++ virtualbox-ose-vboxes ++++++
--- /var/tmp/diff_new_pack.3iWpYr/_old 2010-05-14 00:49:50.000000000 +0200
+++ /var/tmp/diff_new_pack.3iWpYr/_new 2010-05-14 00:49:50.000000000 +0200
@@ -5,8 +5,7 @@
# Based on
# http://www.amiryan.org/2009/11/04/virtualbox-init-d-service-autostart-script...
#
-# openSUSEfied by Richard Bos <rbos at opensuse dot org> - 2010
-# http://www.linuxjournal.com/content/start-and-control-konsole-dbus
+# By Richard Bos <rbos at opensuse dot org> - May 2010
### BEGIN INIT INFO
# Provides: vboxes
@@ -51,7 +50,7 @@
# with force-reload (in case signaling is not supported) are
# considered a success.
-VBOXMGR_BIN=/usr/bin/VBoxManage
+VBOXMGR_BIN=/usr/lib/virtualbox/VBoxManage
if [[ ! -x $VBOXMGR_BIN ]]; then
echo "$VBOXMGR_BIN does not exist"
if [ "$1" = "stop" ]; then
@@ -61,26 +60,36 @@
fi;
fi
+VBOXHeadLess_BIN=/usr/lib/virtualbox/VBoxHeadless
+if [[ ! -x $VBOXHeadLess_BIN ]]; then
+ echo "$VBOXHeadLess_BIN does not exist"
+ if [ "$1" = "start" ]; then
+ exit 6;
+ else
+ exit 0
+ fi;
+fi
+
PRG=$(basename $0)
SERVICE="Virtualbox machines"
[ -r /etc/sysconfig/vbox ] && . /etc/sysconfig/vbox
-start()
-{
+start() {
+
N=1
for VBOX in $VBOX_AUTOSTART; do
-
+
if grep -q \; <<< "$VBOX"; then
VBOX_NAME[$N]=$(cut -d\; -f1 <<< "$VBOX")
- VBOX_HOME[$N]=$(cut -d\; -f2 <<< "$VBOX")
+ VBOX_USER[$N]=$(cut -d\; -f2 <<< "$VBOX")
else
VBOX_NAME[$N]="$VBOX"
- VBOX_HOME[$N]=""
+ VBOX_USER[$N]=""
fi
N=$(($N+1))
done
-
+
VBOXES=${#VBOX_NAME[*]}
if [ $VBOXES -eq 0 ]; then
@@ -93,60 +102,70 @@
echo -n "Starting $SERVICE: "
while [[ $N -le $VBOXES ]]; do
if [[ $N -lt $VBOXES ]]; then
- echo -n "${VBOX_NAME[$N]}, "
+ echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}), "
else
- echo ${VBOX_NAME[$N]}
+ echo "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
fi
N=$(($N+1))
done
N=1
while [[ $N -le $VBOXES ]]; do
- VBOX_RUNNING=$(VBoxManage list --long runningvms |
- sed -n 's/^Name: *//p' | grep "${VBOX_NAME[$N]}")
- if [[ -z "$VBOX_RUNNING" ]]; then
+ if [[ -n "${VBOX_USER[$N]}" ]]; then
+
+ if grep --quiet --word-regexp ${VBOX_USER[$N]} /etc/passwd; then
- if [[ -n "${VBOX_HOME[$N]}" ]]; then
+ # The tag "Name:" occurs in multiple sections. Require at least 7 blanks
+ # with an additional flexible amount of spaces. At the moment of writing
+ # 13 spaces are needed.
+ VBOX_RUNNING=$(su ${VBOX_USER[$N]} -c "VBoxManage list --long runningvms" |
+ sed -n 's/^Name:[[:blank:]]\{7\} *//p' | grep -w "${VBOX_NAME[$N]}")
- if [[ -d "${VBOX_HOME[$N]}/Machines" ]]; then
-
- VBOX_PRESENT=$($VBOXMGR_BIN list --long vms | sed -n 's/Name: *//p' |
- grep -w "${VBOX_NAME[$N]}")
+ if [[ -z "$VBOX_RUNNING" ]]; then
+
+ VBOX_PRESENT=$(su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN list --long vms" |
+ sed -n 's/^Name:[[:blank:]]\{7\} *//p' | grep -w "${VBOX_NAME[$N]}")
if [[ -n "$VBOX_PRESENT" ]]; then
- $VBOXMGR_BIN -q startvm "${VBOX_NAME[$N]}" -type headless > /tmp/$PRG.$$ 2>&1
+
+ # VBoxManage startvm does not result in a VM with working networking
+ # su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN -q startvm "${VBOX_NAME[$N]}" -type headless" > /tmp/$PRG.$$ 2>&1
+ # Start virtualbox in Headless mode
+ su ${VBOX_USER[$N]} -c "$VBOXHeadLess_BIN --startvm "${VBOX_NAME[$N]}"" > /tmp/$PRG.$$ 2>&1 &
RETVAL=$?
if [[ $RETVAL == 0 ]]; then
- echo -n " Starting virtual machine ${VBOX_NAME[$N]}"
+ echo -n " Starting virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
rc_status -v -r
else
- echo -n " ${VBOX_NAME[$N]}: failed with the following output: "
+ echo -n " Starting virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) failed with the following output: "
rc_failed; rc_status -v -r
+ # Give the VBOXHeadLess_BIN some time to write the output file
+ sleep 2
cat /tmp/$PRG.$$
fi
rm /tmp/$PRG.$$
else
- echo -n " ${VBOX_NAME[$N]}: virtual machine not found"
+ echo -n " Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) does not exist"
rc_status -s -r
fi
else
- echo -n " ${VBOX_NAME[$N]}: VBOX_USER_HOME (${VBOX_HOME[$N]}) not found"
- rc_status -s -r
+ echo -n " Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) is already running"
+ rc_status -v -r
fi
else
- echo -n " ${VBOX_NAME[$N]}: no VBOX_USER_HOME configured"
+ echo -n " Virtual machine: ${VBOX_NAME[$N]}, VBOX_USER: ${VBOX_USER[$N]} does not exist"
rc_status -s -r
fi
else
- echo -n " ${VBOX_NAME[$N]}: already running"
- rc_status -v -r
+ echo -n " Virtual machine: ${VBOX_NAME[$N]}: VBOX_USER not configured"
+ rc_status -s -r
fi
N=$(($N+1))
@@ -154,13 +173,29 @@
fi
}
-stop()
-{
+stop() {
+
+ for VBOX in $VBOX_AUTOSTART; do
+
+ if grep -q \; <<< "$VBOX"; then
+ VBOX_USER=$(cut -d\; -f2 <<< "$VBOX")
+
+ # Only add the user to the list, if not present yet
+ if ! grep -qw "$VBOX_USER" <<< "$VBOX_USERS"; then
+ VBOX_USERS="$VBOX_USERS $VBOX_USER"
+ fi
+ fi
+ done
+
N=1
- VBOX_RUNNING=$($VBOXMGR_BIN list --long runningvms | sed -n 's/^Name: *//p')
- for VBOX in $VBOX_RUNNING; do
- VBOX_NAME[$N]="$VBOX"
- N=$(($N+1))
+ for VBOX_USER in $VBOX_USERS; do
+ VBOX_RUNNING=$(su $VBOX_USER -c "$VBOXMGR_BIN list --long runningvms" |
+ sed -n 's/^Name:[[:blank:]]\{7\} *//p')
+ for VBOX in $VBOX_RUNNING; do
+ VBOX_NAME[$N]="$VBOX"
+ VBOX_USER[$N]="$VBOX_USER"
+ N=$(($N+1))
+ done
done
VBOXES=${#VBOX_NAME[*]}
@@ -174,9 +209,9 @@
N=1
while [[ $N -le $VBOXES ]]; do
if [[ $N -lt $VBOXES ]]; then
- echo -n "${VBOX_NAME[$N]}, "
+ echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}), "
else
- echo "${VBOX_NAME[$N]}"
+ echo "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
fi
N=$(($N+1))
done
@@ -185,10 +220,10 @@
while [[ $N -le $VBOXES ]]; do
echo -n " ${VBOX_NAME[$N]}: "
- $VBOXMGR_BIN -q controlvm "${VBOX_NAME[$N]}" savestate
+ su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN -q controlvm "${VBOX_NAME[$N]}" savestate"
RETVAL=$?
- echo -n " Shutting down virtual machine ${VBOX_NAME[$N]}"
+ echo -n " Shutting down virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
if [[ $RETVAL == $? ]]; then
rc_status -v -r
else
@@ -199,25 +234,51 @@
fi
}
-status()
-{
+status() {
+
+ for VBOX in $VBOX_AUTOSTART; do
+
+ if grep -q \; <<< "$VBOX"; then
+ VBOX_USER=$(cut -d\; -f2 <<< "$VBOX")
+
+ # Only add the user to the list, if not present yet
+ if ! grep -qw "$VBOX_USER" <<< "$VBOX_USERS"; then
+ VBOX_USERS="$VBOX_USERS $VBOX_USER"
+ fi
+ fi
+ done
+
N=1
- VBOX_RUNNING=$($VBOXMGR_BIN list --long runningvms | sed -n 's/^Name: *//p')
- for VBOX in $VBOX_RUNNING; do
- VBOX_NAME[$N]="$VBOX"
- N=$(($N+1))
+ for VBOX_USER in $VBOX_USERS; do
+ # The tag "Name:" occurs in multiple sections. Require at least 7 blanks
+ # with an additional flexible amount of spaces. At the moment of writing
+ # 13 spaces are needed.
+ VBOX_RUNNING=$(su $VBOX_USER -c "$VBOXMGR_BIN list --long runningvms" |
+ sed -n 's/^Name:[[:blank:]]\{7\} *//p')
+ for VBOX in $VBOX_RUNNING; do
+ VBOX_NAME[$N]="$VBOX"
+ VBOX_USER[$N]="$VBOX_USER"
+ N=$(($N+1))
+ done
done
VBOXES=${#VBOX_NAME[*]}
if [[ $VBOXES -eq 0 ]]; then
- echo -n "Shutting down $SERVICE: no virtual machines running."
+ echo -n "$SERVICE: no virtual machines running."
rc_status -s -r
else
N=1
while [[ $N -le $VBOXES ]]; do
- STATE=$($VBOXMGR_BIN showvminfo "${VBOX_NAME[$N]}" | sed -n 's/State: *//p')
- printf "%-40s %s" "${VBOX_NAME[$N]}" "$STATE"
+ # The long sed line changes the output from:
+ # running (since 2010-04-25T14:51:57.373000000)
+ # to:
+ # running (since 2010-04-25 14:51:57)
+ #
+ STATE=$(su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN showvminfo "${VBOX_NAME[$N]}"" |
+ sed -n 's/State: *//p' |
+ sed 's/\([0-9][0-9]\)\.[0-9]\{9\}/\1/;s/\([0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/')
+ printf " %-56s %s" "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}):" "$STATE"
rc_status -v
N=$(($N+1))
done
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org