1
0
forked from pool/virtualbox

Accepting request 110918 from home:mseben:branches:Virtualization

-clean up virtualbox-60-vboxdrv.rules and use fillup_only for vbox sysconfig file
- added vbox-vboxweb-init-script.diff to use proper pid file and runlevels in vboxweb initscript

OBS-URL: https://build.opensuse.org/request/show/110918
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=79
This commit is contained in:
Michal Seben 2012-03-24 17:13:42 +00:00 committed by Git OBS Bridge
parent a0ed944f7a
commit a056eedb87
4 changed files with 57 additions and 39 deletions

View File

@ -2,15 +2,6 @@ Index: src/VBox/Installer/linux/vboxdrv.sh.in
===================================================================
--- src/VBox/Installer/linux/vboxdrv.sh.in.orig
+++ src/VBox/Installer/linux/vboxdrv.sh.in
@@ -3,7 +3,7 @@
# Linux kernel module init script
#
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2007-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -19,11 +19,12 @@
#
### BEGIN INIT INFO
@ -27,15 +18,6 @@ Index: src/VBox/Installer/linux/vboxdrv.sh.in
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
@@ -58,7 +59,7 @@ fi
# silently exit if the package was uninstalled but not purged,
# applies to Debian packages only
-[ -z "$DEBIAN" -o -x $VBOXMANAGE -a -x $BUILDVBOXDRV ] || exit 0
+[ -z "$DEBIAN" -o -x $VBOXMANAGE -a -x $BUILDVBOXDRV ] || exit 1
if [ -n "$NOLSB" ]; then
if [ -f /etc/redhat-release ]; then
@@ -195,13 +196,6 @@ start()
fi
fi

View File

@ -0,0 +1,22 @@
Index: VirtualBox-4.1.8_OSE/src/VBox/Installer/linux/vboxweb-service.sh.in
===================================================================
--- VirtualBox-4.1.8_OSE.orig/src/VBox/Installer/linux/vboxweb-service.sh.in
+++ VirtualBox-4.1.8_OSE/src/VBox/Installer/linux/vboxweb-service.sh.in
@@ -20,7 +20,7 @@
# Provides: vboxweb-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 web service API
### END INIT INFO
@@ -50,7 +50,7 @@ if [ -f /etc/redhat-release ]; then
PIDFILE="/var/lock/subsys/vboxweb-service"
elif [ -f /etc/SuSE-release ]; then
system=suse
- PIDFILE="/var/lock/subsys/vboxweb-service"
+ PIDFILE="/var/run/vboxweb-service"
elif [ -f /etc/debian_version ]; then
system=debian
PIDFILE="/var/run/vboxweb-service"

View File

@ -2,11 +2,13 @@
Sun Mar 18 08:18:34 UTC 2012 - mseben@gmail.com
- use pie/fPIE for setuid binaries (vbox-fpie.diff) (bnc#743143)
- clean up virtualbox-60-vboxdrv.rules and use fillup_only for vbox sysconfig file
- added vbox-vboxweb-init-script.diff to use proper pid file and runlevels in vboxweb initscript
-------------------------------------------------------------------
Wed Mar 14 20:45:06 UTC 2012 - mseben@gmail.com
- enabled websrv feature
- enabled websrv feature, this feature is now provided by new subpackage virtualbox-websrv
- added vbox-visibility.diff to fix websrv build (ommit -fvisibility=hidden gcc flag for gsoap related builds)
-------------------------------------------------------------------

View File

@ -104,9 +104,10 @@ Source12: %{name}-vboxes
Source13: %{name}-sysconfig.vbox
Source98: %{name}-%{version}-rpmlintrc
Source99: %{name}-patch-source.sh
#rework init script
#rework init scripts to fit suse needs
Patch1: vbox-vboxdrv-init-script.diff
Patch2: vbox-vboxadd-init-script.diff
Patch3: vbox-vboxweb-init-script.diff
#fix return values which trigger post build checks and coused build error - should goes to upstream
Patch4: vbox-ret-in-nonvoid-fnc.diff
#fix/enable config (rpath, docs, VNC)
@ -245,6 +246,7 @@ Development file for %{name}
%setup -q -n VirtualBox-%{version}_OSE
%patch1
%patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
@ -440,32 +442,32 @@ echo "entering virtualbox(-qt) install section"
pushd out/linux.*/release/bin
%__install -m 755 VBoxManage %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxHeadless %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxSDL %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxSDL %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxTunctl %{buildroot}%{_vbox_instdir}
# create links to vbox tools in PATH - they could be usefull for controlling vbox from command line
%__ln_s %{_vbox_instdir}/VBoxManage %{buildroot}%{_bindir}/VBoxManage
%__ln_s %{_vbox_instdir}/VBoxHeadless \
%{buildroot}%{_bindir}/VBoxHeadless
%{buildroot}%{_bindir}/VBoxHeadless
%__ln_s %{_vbox_instdir}/VBoxSDL %{buildroot}%{_bindir}/VBoxSDL
%__ln_s %{_vbox_instdir}/VBoxTunctl %{buildroot}%{_bindir}/VBoxTunctl
%__install -m 755 VBoxSVC %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxSVC %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxXPCOMIPCD %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxExtPackHelperApp %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxTestOGL %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxPermissionMessage \
%{buildroot}%{_vbox_instdir}
%{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxNetDHCP %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxNetAdpCtl %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxBFE %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxBFE %{buildroot}%{_vbox_instdir}
%__install -m 755 VirtualBox %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxEFI*.fd %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxSysInfo.sh %{buildroot}%{_vbox_instdir}
%__install -m 755 *.so %{buildroot}%{_vbox_instdir}
%__install -m 644 V*.gc %{buildroot}%{_vbox_instdir}
%__install -m 644 *.r0 %{buildroot}%{_vbox_instdir}
%__install -m 755 VBoxSysInfo.sh %{buildroot}%{_vbox_instdir}
%__install -m 755 *.so %{buildroot}%{_vbox_instdir}
%__install -m 644 V*.gc %{buildroot}%{_vbox_instdir}
%__install -m 644 *.r0 %{buildroot}%{_vbox_instdir}
%__install -m 644 components/* %{buildroot}%{_vbox_instdir}/components/
# install languages
%__install -m 644 nls/* %{buildroot}%{_datadir}/virtualbox/nls/
%__install -m 644 nls/* %{buildroot}%{_datadir}/virtualbox/nls/
popd
# install desktop file
@ -474,27 +476,33 @@ popd
# create a menu entry
%__install -m 644 out/linux.*/release/bin/VBox.png \
%{buildroot}%{_datadir}/pixmaps/virtualbox.png
%{buildroot}%{_datadir}/pixmaps/virtualbox.png
# install udev rule for host (virtualbox)
%__install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/udev/rules.d/60-vboxdrv.rules
# install config with session shutdown defs
%__install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox
#install wrapper script
%__install -m 644 %{S:9} %{buildroot}%{_bindir}/VirtualBox
%__install -m 644 %{S:9} %{buildroot}%{_bindir}/VirtualBox
# modify and install the vboxdrv init script
# TODO: some of this stuff breaks the fillup macros below?
%__sed -i "s|%NOLSB%|yes|g;s|%DEBIAN%||g;s|%PACKAGE%|virtualbox|g" src/VBox/Installer/linux/vboxdrv.sh.in
%__install -m 744 src/VBox/Installer/linux/vboxdrv.sh.in \
%{buildroot}%{_sysconfdir}/init.d/vboxdrv
%{buildroot}%{_sysconfdir}/init.d/vboxdrv
%__ln_s %{_sysconfdir}/init.d/vboxdrv \
%{buildroot}%{_sbindir}/rcvboxdrv
%{buildroot}%{_sbindir}/rcvboxdrv
# Init script to start virtual boxes during boot
%__install -m 755 %{S:12} %{buildroot}%{_sysconfdir}/init.d/vboxes
%__install -m 755 %{S:12} %{buildroot}%{_sysconfdir}/init.d/vboxes
%__ln_s %{_sysconfdir}/init.d/vboxes \
%{buildroot}%{_sbindir}/rcvboxes
%__install -d -m 755 %{buildroot}%{_var}/adm/fillup-templates
install -m 700 %{S:13} %{buildroot}%{_var}/adm/fillup-templates/sysconfig.vbox
%{buildroot}%{_sbindir}/rcvboxes
# sysconfig file intended for vboxes script
%__install -d -m 755 %{buildroot}%{_var}/adm/fillup-templates
install -m 700 %{S:13} %{buildroot}%{_var}/adm/fillup-templates/sysconfig.vbox
# config file for vboxdrv script and vboxweb
%__install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
echo -e "#settings for vboxwebsrn\nVBOXWEB_USER=root" > \
%{buildroot}%{_sysconfdir}/vbox/vbox.cfg
######################################################
echo "entrering python-virtualbox install section"
@ -559,8 +567,10 @@ groupadd -r vboxusers 2>/dev/null || :
%post
/sbin/ldconfig
#skip the fill up part and enable vboxdrv by default
%fillup_and_insserv -f -y vboxdrv
%fillup_only -an vboxes
#setup our sysconfig file /etc/sysconfig/vbox
%fillup_only -an vbox
%if %suse_version >= 1140
%set_permissions %{_vbox_instdir}/VBoxNetDHCP
%set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
@ -685,6 +695,8 @@ exit 0
%config %{_sysconfdir}/default/virtualbox
%config(noreplace) %{_sysconfdir}/udev/rules.d/60-vboxdrv.rules
%config %{_sysconfdir}/init.d/vboxdrv
%dir %{_sysconfdir}/vbox
%config %{_sysconfdir}/vbox/vbox.cfg
%{_sysconfdir}/init.d/vboxes
%{_var}/adm/fillup-templates/sysconfig.vbox
%{_sbindir}/rcvboxes