forked from pool/virtualbox
Accepting request 662944 from Virtualization
You missed my latest changes... - proper permissions for /etc/vbox/*.cfg - remove ambiguous labels in vboxdrv: fixes restart and such - make autostarting synchronous again - improve README.autostart - add new autostart variables to the existing /etc/default/virtualbox in %post, if missing (forwarded request 662706 from frispete) OBS-URL: https://build.opensuse.org/request/show/662944 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=171
This commit is contained in:
commit
3983768917
36
README.autostart
Normal file
36
README.autostart
Normal file
@ -0,0 +1,36 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
Users, that want to use the VirtualBox autostart feature, have to be
|
||||
members of the vboxusers group.
|
||||
|
||||
E.g.:
|
||||
sudo usermod -aG vboxusers USERNAME
|
||||
|
||||
Preparation
|
||||
===========
|
||||
|
||||
For each autostart user, add a section in /etc/vbox/autostart.cfg:
|
||||
|
||||
USERNAME = {
|
||||
allow = true
|
||||
}
|
||||
|
||||
Users work
|
||||
==========
|
||||
|
||||
The *first* time a user configures autostart, the command:
|
||||
VBoxManage setproperty autostartdbpath /etc/vbox
|
||||
needs to be run.
|
||||
|
||||
Note: The autostart options are stored in the /etc/vbox file, and in the
|
||||
VM itself. If moving a VM, these options may need to be set again.
|
||||
|
||||
Prepare a VM to start automatically:
|
||||
VBoxManage modifyvm <uuid|vmname> --autostart-enabled <on|off>
|
||||
|
||||
Choose a shut down mode:
|
||||
VBoxManage modifyvm <uuid|vmname> --autostop-type <disabled|savestate|poweroff|acpishutdown>
|
||||
|
||||
Restart the vboxdrv service to start the VMs in question
|
||||
sudo service vboxdrv restart
|
@ -1,44 +0,0 @@
|
||||
Index: VirtualBox-5.2.8/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.8.orig/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||
+++ VirtualBox-5.2.8/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||
@@ -46,7 +46,7 @@
|
||||
typedef struct RTR0SEMLNXWAIT
|
||||
{
|
||||
/** The wait queue entry. */
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
wait_queue_entry_t WaitQE;
|
||||
#else
|
||||
wait_queue_t WaitQE;
|
||||
Index: VirtualBox-5.2.8/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.8.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||
+++ VirtualBox-5.2.8/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||
@@ -150,6 +150,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOX
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+# if 1
|
||||
+#define SKB_GSO_UDP 0
|
||||
+#endif
|
||||
+
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
|
||||
# define VBOX_HAVE_SKB_VLAN
|
||||
#else
|
||||
Index: VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.8.orig/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
+++ VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||
@@ -401,11 +401,7 @@ static struct drm_encoder *vbox_best_sin
|
||||
|
||||
/* pick the encoder ids */
|
||||
if (enc_id)
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
return drm_encoder_find(connector->dev, NULL, enc_id);
|
||||
-#else
|
||||
- return drm_encoder_find(connector->dev, enc_id);
|
||||
-#endif
|
||||
|
||||
return NULL;
|
||||
}
|
@ -1,32 +1,32 @@
|
||||
Index: VirtualBox-5.2.20/configure
|
||||
Index: b/configure
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/configure
|
||||
+++ VirtualBox-5.2.20/configure
|
||||
@@ -1959,17 +1959,17 @@ extern "C" int main(void)
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1963,17 +1963,17 @@ extern "C" int main(void)
|
||||
{
|
||||
Py_Initialize();
|
||||
printf("found version %s", PY_VERSION);
|
||||
-#if PY_VERSION_HEX >= 0x02060000
|
||||
+#if PY_VERSION_HEX >= 0x03060000
|
||||
+#if PY_VERSION_HEX >= 0x03040000
|
||||
printf(", OK.\n");
|
||||
return 0;
|
||||
#else
|
||||
- printf(", expected version 2.6 or higher\n");
|
||||
+ printf(", expected version 3.6 or higher\n");
|
||||
+ printf(", expected version 3.4 or higher\n");
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
EOF
|
||||
found=
|
||||
- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m"
|
||||
+ SUPPYTHONLIBS="python3.6m python3.6 python3.7m python3.7"
|
||||
+ SUPPYTHONLIBS="python3.4 python3.4m python3.5 python3.5m python3.6m python3.6 python3.7m python3.7"
|
||||
for p in $PYTHONDIR; do
|
||||
for d in $SUPPYTHONLIBS; do
|
||||
for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
|
||||
Index: VirtualBox-5.2.20/src/VBox/Installer/linux/routines.sh
|
||||
Index: b/src/VBox/Installer/linux/routines.sh
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/routines.sh
|
||||
+++ VirtualBox-5.2.20/src/VBox/Installer/linux/routines.sh
|
||||
--- a/src/VBox/Installer/linux/routines.sh
|
||||
+++ b/src/VBox/Installer/linux/routines.sh
|
||||
@@ -375,8 +375,8 @@ terminate_proc() {
|
||||
maybe_run_python_bindings_installer() {
|
||||
VBOX_INSTALL_PATH="${1}"
|
||||
@ -38,11 +38,11 @@ Index: VirtualBox-5.2.20/src/VBox/Installer/linux/routines.sh
|
||||
if sys.version_info >= (2, 6):
|
||||
print \"test\"' 2> /dev/null`" != "test" ]; then
|
||||
echo 1>&2 "Python 2.6 or later not available, skipping bindings installation."
|
||||
Index: VirtualBox-5.2.20/src/bldprogs/scm.cpp
|
||||
Index: b/src/bldprogs/scm.cpp
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/bldprogs/scm.cpp
|
||||
+++ VirtualBox-5.2.20/src/bldprogs/scm.cpp
|
||||
@@ -2031,7 +2031,7 @@ static int scmProcessFileInner(PSCMRWSTA
|
||||
--- a/src/bldprogs/scm.cpp
|
||||
+++ b/src/bldprogs/scm.cpp
|
||||
@@ -2033,7 +2033,7 @@ static int scmProcessFileInner(PSCMRWSTA
|
||||
pszTreatAs = "shell";
|
||||
else if ( (cchFirst >= 15 && strncmp(pchFirst, "/usr/bin/python", 15) == 0)
|
||||
|| (cchFirst >= 19 && strncmp(pchFirst, "/usr/bin/env python", 19) == 0) )
|
||||
@ -51,10 +51,10 @@ Index: VirtualBox-5.2.20/src/bldprogs/scm.cpp
|
||||
else if ( (cchFirst >= 13 && strncmp(pchFirst, "/usr/bin/perl", 13) == 0)
|
||||
|| (cchFirst >= 17 && strncmp(pchFirst, "/usr/bin/env perl", 17) == 0) )
|
||||
pszTreatAs = "perl";
|
||||
Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/configure
|
||||
Index: b/src/libs/libxml2-2.9.4/configure
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/configure
|
||||
+++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/configure
|
||||
--- a/src/libs/libxml2-2.9.4/configure
|
||||
+++ b/src/libs/libxml2-2.9.4/configure
|
||||
@@ -15153,10 +15153,10 @@ PYTHON_SITE_PACKAGES=
|
||||
PYTHON_TESTS=
|
||||
pythondir=
|
||||
@ -79,10 +79,10 @@ Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/configure
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_PYTHON+:} false; then :
|
||||
Index: VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
Index: b/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
+++ VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
--- a/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
+++ b/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
@@ -644,7 +644,7 @@ import sys;\
|
||||
x = sys.version_info[0] == 2 and (sys.version_info[1] >= 6 or (sys.version_info[1] == 5 and sys.version_info[2] >= 1));\
|
||||
sys.exit(not x);\
|
||||
@ -92,10 +92,10 @@ Index: VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/setup.sh
|
||||
do
|
||||
python=`which ${python} 2> /dev/null`
|
||||
if [ -n "${python}" -a -x "${python}" ]; then
|
||||
Index: VirtualBox-5.2.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
Index: b/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
+++ VirtualBox-5.2.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
--- a/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
+++ b/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
@@ -20,7 +20,7 @@
|
||||
%define %PYTHON% 1
|
||||
%define VBOXDOCDIR %{_defaultdocdir}/%NAME%
|
||||
@ -114,10 +114,10 @@ Index: VirtualBox-5.2.20/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
|
||||
%endif
|
||||
rm -rf sdk/installer
|
||||
mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
|
||||
Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
Index: b/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
+++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
--- a/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
+++ b/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
@@ -101,11 +101,11 @@ rm -fr %{buildroot}
|
||||
|
||||
make install DESTDIR=%{buildroot}
|
||||
@ -133,10 +133,10 @@ Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml.spec.in
|
||||
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
Index: b/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
+++ VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
--- a/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
+++ b/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
@@ -103,7 +103,7 @@ make install DESTDIR=%{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
@ -146,10 +146,10 @@ Index: VirtualBox-5.2.20/src/libs/libxml2-2.9.4/libxml2.spec
|
||||
make install DESTDIR=%{buildroot}
|
||||
%endif # with_python3
|
||||
|
||||
Index: VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
Index: b/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
+++ VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
--- a/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
+++ b/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
@@ -439,8 +439,10 @@ char *PyTraceback_AsString(PyObject *exc
|
||||
{ // a temp scope so I can use temp locals.
|
||||
#if PY_MAJOR_VERSION <= 2
|
||||
@ -162,10 +162,10 @@ Index: VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
#endif
|
||||
result = (char *)PyMem_Malloc(strlen(tempResult)+1);
|
||||
if (result==NULL)
|
||||
Index: VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
Index: b/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
===================================================================
|
||||
--- VirtualBox-5.2.20.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
+++ VirtualBox-5.2.20/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
--- a/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
+++ b/src/libs/xpcom18a4/python/src/PyGBase.cpp
|
||||
@@ -183,7 +183,11 @@ PyG_Base::~PyG_Base()
|
||||
// Get the correct interface pointer for this object given the IID.
|
||||
void *PyG_Base::ThisAsIID( const nsIID &iid )
|
99
vboxdrv.sh
99
vboxdrv.sh
@ -210,7 +210,7 @@ cleanup_usb()
|
||||
rm -rf /dev/vboxusb
|
||||
}
|
||||
|
||||
start()
|
||||
start_drv()
|
||||
{
|
||||
begin_msg "Starting VirtualBox services" console
|
||||
if [ -d /proc/xen ]; then
|
||||
@ -267,7 +267,7 @@ start()
|
||||
succ_msg "VirtualBox services started"
|
||||
}
|
||||
|
||||
stop()
|
||||
stop_drv()
|
||||
{
|
||||
begin_msg "Stopping VirtualBox services" console
|
||||
|
||||
@ -297,51 +297,29 @@ stop()
|
||||
succ_msg "VirtualBox services stopped"
|
||||
}
|
||||
|
||||
# enter the following variables in /etc/default/virtualbox:
|
||||
# SHUTDOWN_USERS="foo bar"
|
||||
# check for running VMs of user foo and user bar
|
||||
# SHUTDOWN=poweroff
|
||||
# SHUTDOWN=acpibutton
|
||||
# SHUTDOWN=savestate
|
||||
# select one of these shutdown methods for running VMs
|
||||
stop_vms()
|
||||
{
|
||||
wait=0
|
||||
for i in $SHUTDOWN_USERS; do
|
||||
# don't create the ipcd directory with wrong permissions!
|
||||
if [ -d /tmp/.vbox-$i-ipc ]; then
|
||||
export VBOX_IPC_SOCKETID="$i"
|
||||
VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null`
|
||||
if [ -n "$VMS" ]; then
|
||||
if [ "$SHUTDOWN" = "poweroff" ]; then
|
||||
begin_msg "Powering off remaining VMs"
|
||||
for v in $VMS; do
|
||||
$VBOXMANAGE --nologo controlvm $v poweroff
|
||||
done
|
||||
succ_msg "Remaining VMs powered off"
|
||||
elif [ "$SHUTDOWN" = "acpibutton" ]; then
|
||||
begin_msg "Sending ACPI power button event to remaining VMs"
|
||||
for v in $VMS; do
|
||||
$VBOXMANAGE --nologo controlvm $v acpipowerbutton
|
||||
wait=30
|
||||
done
|
||||
succ_msg "ACPI power button event sent to remaining VMs"
|
||||
elif [ "$SHUTDOWN" = "savestate" ]; then
|
||||
begin_msg "Saving state of remaining VMs"
|
||||
for v in $VMS; do
|
||||
$VBOXMANAGE --nologo controlvm $v savestate
|
||||
done
|
||||
succ_msg "State of remaining VMs saved"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# wait for some seconds when doing ACPI shutdown
|
||||
if [ "$wait" -ne 0 ]; then
|
||||
begin_msg "Waiting for $wait seconds for VM shutdown"
|
||||
sleep $wait
|
||||
succ_msg "Waited for $wait seconds for VM shutdown"
|
||||
fi
|
||||
OLD_IFS=$IFS
|
||||
IFS=$'\n'
|
||||
# read config file
|
||||
[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
||||
[ -z "$VBOXAUTOSTART_DB" ] && return
|
||||
[ -z "$VBOXAUTOSTART_CONFIG" ] && return
|
||||
# read autostart config file
|
||||
if [ -r $VBOXAUTOSTART_CONFIG ]; then
|
||||
# find all the files of type username.stop
|
||||
var=$(ls $VBOXAUTOSTART_DB | grep stop | grep -v auto)
|
||||
# process each file of that type
|
||||
for i in $var; do
|
||||
# Extract the user name - the first word on the line
|
||||
user=$(echo $i | head -n1 | cut -d "." -f1)
|
||||
# autostop the VMs for that user
|
||||
begin_msg "Stopping VMs for user $user" console
|
||||
su - $user -c "/usr/lib/virtualbox/VBoxAutostart --stop --config $VBOXAUTOSTART_CONFIG"
|
||||
succ_msg "VMs for user $user stopped"
|
||||
done
|
||||
fi
|
||||
IFS=$OLD_IFS
|
||||
}
|
||||
|
||||
start_vms()
|
||||
@ -350,25 +328,26 @@ OLD_IFS=$IFS
|
||||
IFS=$'\n'
|
||||
# read config file
|
||||
[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
||||
#echo "Symbols are $VBOXAUTOSTART_DB and $VBOXAUTOSTART_CONFIG"
|
||||
[ -z "$VBOXAUTOSTART_DB" ] && return
|
||||
[ -z "$VBOXAUTOSTART_CONFIG" ] && return
|
||||
# read autostart config file
|
||||
if [ -r $VBOXAUTOSTART_CONFIG ]; then
|
||||
VBoxManage list vms
|
||||
# find all the files of type user.start
|
||||
# find all the files of type username.start
|
||||
var=$(ls $VBOXAUTOSTART_DB | grep start | grep -v auto)
|
||||
# process each file of that type
|
||||
for i in $var; do
|
||||
# Extract the user name - the first word on the line
|
||||
user=$(echo $i | head -n1 | cut -d "." -f1)
|
||||
# autostart the VMs for that user
|
||||
su $user -c "/usr/lib/virtualbox/VBoxAutostart --start --config $VBOXAUTOSTART_CONFIG"
|
||||
begin_msg "Starting VMs for user $user" console
|
||||
su - $user -c "/usr/lib/virtualbox/VBoxAutostart --start --config $VBOXAUTOSTART_CONFIG"
|
||||
succ_msg "VMs for user $user started"
|
||||
done
|
||||
fi
|
||||
IFS=$OLD_IFS
|
||||
|
||||
}
|
||||
|
||||
cleanup()
|
||||
cleanup_vb()
|
||||
{
|
||||
for i in /lib/modules/*; do
|
||||
# We could just do "rm -f", but we only want to try deleting folders if
|
||||
@ -390,7 +369,7 @@ cleanup()
|
||||
}
|
||||
|
||||
# setup_script
|
||||
setup()
|
||||
setup_vb()
|
||||
{
|
||||
# Try to build the host kernel modules in case prepackaging has failed
|
||||
/sbin/vboxconfig
|
||||
@ -430,18 +409,18 @@ dmnstatus()
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
start_drv
|
||||
start_vms
|
||||
;;
|
||||
stop)
|
||||
stop_vms
|
||||
stop
|
||||
stop_drv
|
||||
;;
|
||||
stop_vms)
|
||||
stop_vms
|
||||
;;
|
||||
restart)
|
||||
stop && start
|
||||
"$0" stop && "$0" start
|
||||
;;
|
||||
setup)
|
||||
# Create udev rule and USB device nodes.
|
||||
@ -450,17 +429,17 @@ setup)
|
||||
## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have
|
||||
## working fall-back code here anyway, and the "right" code is more complex
|
||||
## than the fall-back. Unnecessary duplication?
|
||||
stop && cleanup
|
||||
stop_drv && cleanup_vb
|
||||
setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR"
|
||||
setup && start
|
||||
setup_vb && start_drv
|
||||
;;
|
||||
cleanup)
|
||||
stop && cleanup
|
||||
stop_drv && cleanup_vb
|
||||
cleanup_usb
|
||||
;;
|
||||
force-reload)
|
||||
stop
|
||||
start
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
status)
|
||||
dmnstatus
|
||||
|
@ -1,19 +1,10 @@
|
||||
# /etc/default/virtualbox
|
||||
#
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# In the "SHUTDOWN_USERS" list all users for which a check for runnings VMs should be done during
|
||||
# shutdown of "vboxdrv" resp. the server:
|
||||
# SHUTDOWN_USERS="foo bar"
|
||||
#
|
||||
# Set "SHUTDOWN" to one of "poweroff", "acpibutton" or "savestate" depending on which of the
|
||||
# shutdown methods for running VMs are wanted:
|
||||
# SHUTDOWN="poweroff"
|
||||
# SHUTDOWN="acpibutton"
|
||||
# SHUTDOWN="savestate"
|
||||
# Autostart
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
#
|
||||
#SHUTDOWN_USERS="foo bar"
|
||||
#SHUTDOWN="savestate"
|
||||
VBOXAUTOSTART_DB=/etc/vbox
|
||||
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# By default, vboxdrv creates a file /etc/udev/rules.d/60-vboxdrv.rules every time, it is started,
|
||||
|
@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 8 18:10:09 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- proper permissions for /etc/vbox/*.cfg
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 8 14:17:50 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- remove ambiguous labels in vboxdrv: fixes restart and such
|
||||
- make autostarting synchronous again
|
||||
- improve README.autostart
|
||||
- add new autostart variables to the existing /etc/default/virtualbox
|
||||
in %post, if missing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 5 12:10:20 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- replace switch_to_python3.6.patch with switch_to_python3.4+.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 21:43:02 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- remove fixes_for_leap15.patch, upstream has incorporated it
|
||||
- add conflict with i4l-vbox due to shared /etc/vbox
|
||||
- adjust /etc/vbox permissions
|
||||
- add /etc/vbox/autostart.cfg
|
||||
- fix vboxdrv.sh: apply new autostart mechanics to stop_vms()
|
||||
- remove obsolete shutdown section in /etc/default/virtualbox
|
||||
- add VBOXAUTOSTART_{DB,CONFIG} to /etc/default/virtualbox
|
||||
- supply README.autostart
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 27 01:04:06 UTC 2018 - Larry Finger <Larry.Finger@gmail.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package virtualbox
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -68,6 +68,7 @@ Source16: vboxconfig.sh
|
||||
Source17: vboxguestconfig.sh
|
||||
Source18: fix_usb_rules.sh
|
||||
Source19: vboxdrv.sh
|
||||
Source20: README.autostart
|
||||
Source98: %{name}-rpmlintrc
|
||||
Source99: %{name}-patch-source.sh
|
||||
#rework init scripts to fit suse needs
|
||||
@ -117,16 +118,14 @@ Patch115: vbox_fix_for_gcc7.patch
|
||||
Patch116: Fix_for_server_1.19.patch
|
||||
# Fix invalid use of internal headers
|
||||
Patch118: internal-headers.patch
|
||||
# Fix kernel API change in Leap 15
|
||||
Patch119: fixes_for_leap15.patch
|
||||
# Fix rpmlint error for script /lib/usr/virtualbox/vboxshell.py
|
||||
Patch120: fixes_for_python.patch
|
||||
# Remove vboxvideo from build
|
||||
Patch121: remove_vbox_video_build.patch
|
||||
# Fix build for Qt 5.11
|
||||
Patch122: fixes_for_Qt5.11.patch
|
||||
# Switch to Python 3.6
|
||||
Patch123: switch_to_python3.6.patch
|
||||
# Switch to Python 3.4+
|
||||
Patch123: switch_to_python3.4+.patch
|
||||
Patch124: fix_32_bit_builds.patch
|
||||
# Fix API changes for kernel 4.20+
|
||||
Patch125: fixes_for_4.20.patch
|
||||
@ -229,6 +228,10 @@ BuildRequires: xorg-x11-libXmu-devel-32bit
|
||||
BuildRequires: xorg-x11-libXt-devel-32bit
|
||||
%endif
|
||||
%{?systemd_requires}
|
||||
# package i4l-vbox from source package i4l-base shares the directory /etc/vbox
|
||||
# with us, but with different owner.
|
||||
Conflicts: i4l-vbox
|
||||
|
||||
%posttrans
|
||||
|
||||
%description
|
||||
@ -427,9 +430,6 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
||||
%patch115 -p1
|
||||
%patch116 -p1
|
||||
%patch118 -p1
|
||||
%if 0%{suse_version} == 1500
|
||||
%patch119 -p1
|
||||
%endif
|
||||
%patch120 -p1
|
||||
%patch121 -p1
|
||||
%patch122 -p1
|
||||
@ -442,6 +442,8 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
||||
cp %{SOURCE1} UserManual.pdf
|
||||
#copy kbuild config
|
||||
cp %{SOURCE10} LocalConfig.kmk
|
||||
#copy autostart doc
|
||||
cp %{SOURCE20} README.autostart
|
||||
#
|
||||
##########################
|
||||
####workaround kmk_sed --v
|
||||
@ -690,6 +692,7 @@ install -m 644 %{SOURCE9} %{buildroot}%{_bindir}/VirtualBox
|
||||
|
||||
# Service files to load kernel modules on boot
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxdrv
|
||||
install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service
|
||||
install -m 0755 %{SOURCE16} %{buildroot}/sbin/vboxconfig
|
||||
install -m 0755 %{SOURCE17} %{buildroot}/sbin/vboxguestconfig
|
||||
@ -703,6 +706,14 @@ ln -sf %{_unitdir}/vboxadd-service.service %{buildroot}%{_unitdir}/multi-user.ta
|
||||
# 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
|
||||
cat > %{buildroot}%{_sysconfdir}/vbox/autostart.cfg << EOF
|
||||
default_policy = deny
|
||||
# Create an entry for each user allowed to use autostart
|
||||
myusername = {
|
||||
allow = true
|
||||
}
|
||||
|
||||
EOF
|
||||
# install udev helper script for creating usb devices
|
||||
install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_vbox_instdir}/VBoxCreateUSBNode.sh
|
||||
######################################################
|
||||
@ -789,6 +800,18 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
|
||||
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
||||
%service_add_post vboxdrv.service
|
||||
# add new autostart stuff to the existing default config, if missing
|
||||
grep -q VBOXAUTOSTART /etc/default/virtualbox || {
|
||||
cat >> /etc/default/virtualbox << EOF
|
||||
#
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Autostart
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
VBOXAUTOSTART_DB=/etc/vbox
|
||||
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
%post qt
|
||||
%set_permissions %{_vbox_instdir}/VirtualBox
|
||||
@ -859,7 +882,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc UserManual.pdf
|
||||
%doc README.autostart UserManual.pdf
|
||||
%{_bindir}/VBoxManage
|
||||
%{_bindir}/VBoxHeadless
|
||||
%{_bindir}/VBoxTunctl
|
||||
@ -916,15 +939,17 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
/usr/lib/virtualbox/vboxdrv.sh
|
||||
%{_unitdir}/vboxdrv.service
|
||||
%{_unitdir}/multi-user.target.wants/vboxdrv.service
|
||||
%dir %{_sysconfdir}/vbox
|
||||
##%attr(1775,root,vboxusers) %{_sysconfdir}/vbox
|
||||
%config %{_sysconfdir}/vbox/vbox.cfg
|
||||
%{_sbindir}/rcvboxdrv
|
||||
/sbin/vboxconfig
|
||||
%{_vbox_instdir}/VBoxCreateUSBNode.sh
|
||||
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetNAT
|
||||
%verify(not mode) %attr(4750,root,vboxusers) %{_vbox_instdir}/VBoxNetDHCP
|
||||
%verify(not mode) %attr(4750,root,vboxusers) %{_vbox_instdir}/VBoxNetAdpCtl
|
||||
%verify(not mode) %attr(4750,root,vboxusers) %{_vbox_instdir}/VBoxHeadless
|
||||
%dir %{_sysconfdir}/vbox
|
||||
%attr(1775,root,vboxusers) %{_sysconfdir}/vbox
|
||||
%config %attr(644,root,vboxusers) %{_sysconfdir}/vbox/vbox.cfg
|
||||
%config %attr(644,root,vboxusers) %{_sysconfdir}/vbox/autostart.cfg
|
||||
|
||||
%files qt
|
||||
%defattr(-, root, root)
|
||||
|
Loading…
Reference in New Issue
Block a user