osc copypac from project:home:mseben:branches:Virtualization package:virtualbox-ose revision:7
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=1
This commit is contained in:
commit
23e21a1790
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
VirtualBox-4.0.0-UserManual.pdf
Normal file
3
VirtualBox-4.0.0-UserManual.pdf
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:717a3b6ce54f43615d4419fc4346b379f2a5a9531b4dd9d9884edcdfd9baf91a
|
||||
size 4039751
|
3
VirtualBox-4.0.0-patched.tar.bz2
Normal file
3
VirtualBox-4.0.0-patched.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9ee1d4c3b2ad8a5e05c265da569c907f22e74bffaa3eae03cf7568ab985824c
|
||||
size 43757083
|
15
vbox-default-os-type.diff
Normal file
15
vbox-default-os-type.diff
Normal file
@ -0,0 +1,15 @@
|
||||
--- src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp.orig 2010-11-10 21:27:23.000000000 +0100
|
||||
+++ src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp 2010-11-10 21:27:53.000000000 +0100
|
||||
@@ -199,10 +199,10 @@
|
||||
if (xpIndex != -1)
|
||||
mCbType->setCurrentIndex (xpIndex);
|
||||
}
|
||||
- /* Or select Ubuntu item for Linux family as default */
|
||||
+ /* Or select openSUSE item for Linux family as default */
|
||||
else if (familyId == "Linux")
|
||||
{
|
||||
- int ubIndex = mCbType->findData ("Ubuntu", RoleTypeID);
|
||||
+ int ubIndex = mCbType->findData ("OpenSUSE", RoleTypeID);
|
||||
if (ubIndex != -1)
|
||||
mCbType->setCurrentIndex (ubIndex);
|
||||
}
|
66
vbox-disable-updates.diff
Normal file
66
vbox-disable-updates.diff
Normal file
@ -0,0 +1,66 @@
|
||||
Index: src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
|
||||
===================================================================
|
||||
--- src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp.orig
|
||||
+++ src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.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.orig 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>
|
73
vbox-no-build-dates.diff
Normal file
73
vbox-no-build-dates.diff
Normal file
@ -0,0 +1,73 @@
|
||||
--- src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp.orig
|
||||
+++ src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
|
||||
@@ -1150,10 +1150,9 @@ DECLCALLBACK(int) VMPowerUpThread(RTTHRE
|
||||
char szNowUct[64];
|
||||
RTTimeSpecToString(RTTimeNow(&TimeSpec), szNowUct, sizeof(szNowUct));
|
||||
RTLogRelLogger(pLogger, 0, ~0U,
|
||||
- "VBoxBFE %s (%s %s) release log\n"
|
||||
+ "VBoxBFE %s release log\n"
|
||||
"Log opened %s\n",
|
||||
- VBOX_VERSION_STRING, __DATE__, __TIME__,
|
||||
- szNowUct);
|
||||
+ VBOX_VERSION_STRING, szNowUct);
|
||||
|
||||
/* register this logger as the release logger */
|
||||
RTLogRelSetDefaultInstance(pLogger);
|
||||
--- src/VBox/Main/ConsoleImpl.cpp.orig
|
||||
+++ src/VBox/Main/ConsoleImpl.cpp
|
||||
@@ -5063,13 +5063,12 @@ HRESULT Console::consoleInitReleaseLog(c
|
||||
char szTmp[256];
|
||||
RTTimeSpecToString(RTTimeNow(&timeSpec), szTmp, sizeof(szTmp));
|
||||
RTLogRelLogger(loggerRelease, 0, ~0U,
|
||||
- "VirtualBox %s r%u %s (%s %s) release log\n"
|
||||
+ "VirtualBox %s r%u %s release log\n"
|
||||
#ifdef VBOX_BLEEDING_EDGE
|
||||
"EXPERIMENTAL build " VBOX_BLEEDING_EDGE "\n"
|
||||
#endif
|
||||
"Log opened %s\n",
|
||||
- VBOX_VERSION_STRING, RTBldCfgRevision(), VBOX_BUILD_TARGET,
|
||||
- __DATE__, __TIME__, szTmp);
|
||||
+ VBOX_VERSION_STRING, RTBldCfgRevision(), VBOX_BUILD_TARGET, szTmp);
|
||||
|
||||
vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp));
|
||||
if (RT_SUCCESS(vrc) || vrc == VERR_BUFFER_OVERFLOW)
|
||||
--- src/VBox/Main/generic/OpenGLTestApp.cpp.orig
|
||||
+++ src/VBox/Main/generic/OpenGLTestApp.cpp
|
||||
@@ -141,13 +141,12 @@ static int vboxInitLogging(const char *p
|
||||
char szTmp[256];
|
||||
RTTimeSpecToString(RTTimeNow(&timeSpec), szTmp, sizeof(szTmp));
|
||||
RTLogRelLogger(loggerRelease, 0, ~0U,
|
||||
- "VBoxTestGL %s r%u %s (%s %s) release log\n"
|
||||
+ "VBoxTestGL %s r%u %s release log\n"
|
||||
#ifdef VBOX_BLEEDING_EDGE
|
||||
"EXPERIMENTAL build " VBOX_BLEEDING_EDGE "\n"
|
||||
#endif
|
||||
"Log opened %s\n",
|
||||
- VBOX_VERSION_STRING, RTBldCfgRevision(), VBOX_BUILD_TARGET,
|
||||
- __DATE__, __TIME__, szTmp);
|
||||
+ VBOX_VERSION_STRING, RTBldCfgRevision(), VBOX_BUILD_TARGET, szTmp);
|
||||
|
||||
vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp));
|
||||
if (RT_SUCCESS(vrc) || vrc == VERR_BUFFER_OVERFLOW)
|
||||
--- src/VBox/Frontends/VBoxFB/VBoxFB.cpp.orig
|
||||
+++ src/VBox/Frontends/VBoxFB/VBoxFB.cpp
|
||||
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("VirtualBox DirectFB GUI built %s %s\n"
|
||||
"(C) 2004-" VBOX_C_YEAR " " VBOX_VENDOR "\n"
|
||||
- "(C) 2004-2005 secunet Security Networks AG\n", __DATE__, __TIME__);
|
||||
+ "(C) 2004-2005 secunet Security Networks AG\n");
|
||||
|
||||
for (;;)
|
||||
{
|
||||
--- src/VBox/Runtime/common/string/uniread.cpp.orig
|
||||
+++ src/VBox/Runtime/common/string/uniread.cpp
|
||||
@@ -979,7 +979,7 @@ int PrintHeader(const char *argv0)
|
||||
" *\n"
|
||||
" * IPRT - Unicode Tables.\n"
|
||||
" *\n"
|
||||
- " * Automatically Generated by %s (" __DATE__ " " __TIME__ ")\n"
|
||||
+ " * Automatically Generated by %s\n"
|
||||
" */\n"
|
||||
"\n"
|
||||
"/*\n"
|
70
vbox-permissions_warning.diff
Normal file
70
vbox-permissions_warning.diff
Normal file
@ -0,0 +1,70 @@
|
||||
Index: VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/Makefile.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-3.2.2_OSE.orig/src/VBox/Frontends/VirtualBox/Makefile.kmk
|
||||
+++ VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/Makefile.kmk
|
||||
@@ -48,7 +48,7 @@ endif
|
||||
# The targets.
|
||||
#
|
||||
ifdef VBOX_WITH_HARDENING
|
||||
-PROGRAMS += VirtualBoxHardened
|
||||
+PROGRAMS += VirtualBoxHardened VBoxPermissionsMessage
|
||||
DLLS += VirtualBox
|
||||
else
|
||||
PROGRAMS += VirtualBox
|
||||
@@ -94,6 +94,10 @@ if1of ($(KBUILD_TARGET), freebsd linux n
|
||||
VirtualBox_SDKS += LIBSDL
|
||||
endif
|
||||
|
||||
+VBoxPermissionsMessage_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
|
||||
+VBoxPermissionsMessage_NAME = VBoxPermissionMessage
|
||||
+VBoxPermissionsMessage_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
|
||||
+
|
||||
ifdef VBOX_WITH_ICHAT_THEATER
|
||||
# For testing iChat Theater stuff change the sdk path (HACK ALERT!)
|
||||
VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
|
||||
@@ -366,6 +370,9 @@ ifdef VBOX_WITH_REGISTRATION
|
||||
src/wizards/registration/UIRegistrationWzd.cpp
|
||||
endif
|
||||
|
||||
+VBoxPermissionsMessage_SOURCES = \
|
||||
+ src/VBoxPermissionsMessage.cpp
|
||||
+
|
||||
VirtualBox_SOURCES = \
|
||||
src/main.cpp \
|
||||
src/VBoxAboutDlg.cpp \
|
||||
@@ -537,6 +544,8 @@ endif
|
||||
# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
|
||||
VirtualBox_QT_MODULES = Core Gui Network
|
||||
|
||||
+VBoxPermissionsMessage_QT_MODULES = Core Gui Network
|
||||
+
|
||||
if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
|
||||
VirtualBox_QT_MODULES += OpenGL
|
||||
endif
|
||||
@@ -757,6 +766,8 @@ $$(PATH_VirtualBox)/VirtualBox-icon.rc:
|
||||
|
||||
endif # win
|
||||
|
||||
+INSTALLS += VBoxPermissionsMessage
|
||||
+VBoxPermissionsMessage_INST = $(INST_VIRTUALBOX)
|
||||
|
||||
ifeq ($(KBUILD_TARGET),darwin)
|
||||
#
|
||||
Index: VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/src/VBoxPermissionsMessage.cpp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/src/VBoxPermissionsMessage.cpp
|
||||
@@ -0,0 +1,12 @@
|
||||
+#include <QtGui/QApplication>
|
||||
+#include <QtGui/QMessageBox>
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ QApplication app(argc, argv);
|
||||
+ QMessageBox msgBox;
|
||||
+ msgBox.setWindowTitle(QObject::tr("Permissions problem !"));
|
||||
+ msgBox.setText(QObject::tr("You are not a member of the \"vboxusers\" group. Please add yourself to this group before starting VirtualBox. You could do it using: Yast / Security and Users / User and Group management. Don't forget re-login your user account!"));
|
||||
+ int ret = msgBox.exec();
|
||||
+ app.quit();
|
||||
+ return 0;
|
||||
+}
|
||||
\ No newline at end of file
|
24
vbox-ret-in-nonvoid-fnc.diff
Normal file
24
vbox-ret-in-nonvoid-fnc.diff
Normal file
@ -0,0 +1,24 @@
|
||||
Index: VirtualBox-3.1.4_OSE/src/VBox/Devices/PC/Etherboot-src/core/nic.c
|
||||
===================================================================
|
||||
--- VirtualBox-3.1.4_OSE.orig/src/VBox/Devices/PC/Etherboot-src/core/nic.c
|
||||
+++ VirtualBox-3.1.4_OSE/src/VBox/Devices/PC/Etherboot-src/core/nic.c
|
||||
@@ -478,6 +478,7 @@ int eth_load(struct dev *dev __unused)
|
||||
}
|
||||
interruptible_sleep(2); /* lay off the server for a while */
|
||||
longjmp(restart_etherboot, -1);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
Index: VirtualBox-3.1.4_OSE/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
|
||||
===================================================================
|
||||
--- VirtualBox-3.1.4_OSE.orig/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
|
||||
+++ VirtualBox-3.1.4_OSE/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
|
||||
@@ -81,6 +81,7 @@ dead_download - Restart etherboot if pro
|
||||
**************************************************************************/
|
||||
static sector_t dead_download ( unsigned char *data __unused, unsigned int len __unused, int eof __unused) {
|
||||
longjmp(restart_etherboot, -2);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#ifdef IMAGE_MULTIBOOT
|
13
vbox-rpath.diff
Normal file
13
vbox-rpath.diff
Normal file
@ -0,0 +1,13 @@
|
||||
Index: VirtualBox-4.0.0_OSE/Config.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-4.0.0_OSE.orig/Config.kmk
|
||||
+++ VirtualBox-4.0.0_OSE/Config.kmk
|
||||
@@ -580,7 +580,7 @@ endif
|
||||
#VBOX_PATH_APP_PRIVATE = /usr/lib/virtualbox
|
||||
ifdef VBOX_WITH_HARDENING
|
||||
if1of ($(KBUILD_TARGET), linux solaris)
|
||||
- VBOX_PATH_APP_PRIVATE = /opt/VirtualBox
|
||||
+ VBOX_PATH_APP_PRIVATE = /usr/lib/virtualbox
|
||||
else ifeq ($(KBUILD_TARGET),darwin)
|
||||
VBOX_PATH_APP_PRIVATE = /Applications/VirtualBox.app/Contents/MacOS
|
||||
else ifeq ($(KBUILD_TARGET),freebsd)
|
88
vbox-vboxadd-init-script.diff
Normal file
88
vbox-vboxadd-init-script.diff
Normal file
@ -0,0 +1,88 @@
|
||||
Index: src/VBox/Additions/linux/installer/vboxadd.sh
|
||||
===================================================================
|
||||
--- src/VBox/Additions/linux/installer/vboxadd.sh.orig
|
||||
+++ src/VBox/Additions/linux/installer/vboxadd.sh
|
||||
@@ -21,11 +21,12 @@
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vboxadd
|
||||
-# Required-Start:
|
||||
-# Required-Stop:
|
||||
-# Default-Start: 2 3 4 5
|
||||
+# Required-Start: $remote_fs
|
||||
+# Required-Stop: $remote_fs
|
||||
+# Default-Start: 2 3 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: VirtualBox Linux Additions kernel modules
|
||||
+# Short-Description: VirtualBox Linux Additions kernel modules
|
||||
### END INIT INFO
|
||||
|
||||
PATH=$PATH:/bin:/sbin:/usr/sbin
|
||||
@@ -165,8 +166,6 @@ fi
|
||||
|
||||
dev=/dev/vboxguest
|
||||
userdev=/dev/vboxuser
|
||||
-owner=vboxadd
|
||||
-group=1
|
||||
|
||||
test_sane_kernel_dir()
|
||||
{
|
||||
@@ -236,12 +235,6 @@ do_vboxguest_non_udev()
|
||||
fail "Cannot create device $dev with major $maj and minor $min"
|
||||
}
|
||||
fi
|
||||
- chown $owner:$group $dev 2>/dev/null || {
|
||||
- rm -f $dev 2>/dev/null
|
||||
- rm -f $userdev 2>/dev/null
|
||||
- rmmod vboxguest 2>/dev/null
|
||||
- fail "Cannot change owner $owner:$group for device $dev"
|
||||
- }
|
||||
|
||||
if [ ! -c $userdev ]; then
|
||||
maj=10
|
||||
@@ -252,12 +245,6 @@ do_vboxguest_non_udev()
|
||||
rmmod vboxguest 2>/dev/null
|
||||
fail "Cannot create device $userdev with major $maj and minor $min"
|
||||
}
|
||||
- chown $owner:$group $userdev 2>/dev/null || {
|
||||
- rm -f $dev 2>/dev/null
|
||||
- rm -f $userdev 2>/dev/null
|
||||
- rmmod vboxguest 2>/dev/null
|
||||
- fail "Cannot change owner $owner:$group for device $userdev"
|
||||
- }
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -286,8 +273,7 @@ start()
|
||||
do_vboxguest_non_udev;;
|
||||
esac
|
||||
|
||||
- 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
|
||||
@@ -297,8 +283,7 @@ start()
|
||||
fi
|
||||
fail "modprobe vboxsf failed"
|
||||
}
|
||||
- }
|
||||
- fi
|
||||
+ }
|
||||
|
||||
# Mount all shared folders from /etc/fstab. Normally this is done by some
|
||||
# other startup script but this requires the vboxdrv kernel module loaded.
|
||||
@@ -315,10 +300,8 @@ stop()
|
||||
if ! umount -a -t vboxsf 2>/dev/null; then
|
||||
fail "Cannot unmount vboxsf folders"
|
||||
fi
|
||||
- if [ -n "$BUILDVBOXSF" ]; then
|
||||
- if running_vboxsf; then
|
||||
- rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
|
||||
- fi
|
||||
+ 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"
|
53
vbox-vboxdrv-init-script.diff
Normal file
53
vbox-vboxdrv-init-script.diff
Normal file
@ -0,0 +1,53 @@
|
||||
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
|
||||
# Provides: vboxdrv
|
||||
-# Required-Start: $syslog
|
||||
-# Required-Stop:
|
||||
-# Default-Start: 2 3 4 5
|
||||
-# Default-Stop: 1
|
||||
+# Required-Start: $syslog $remote_fs
|
||||
+# Required-Stop: $syslog $remote_fs
|
||||
+# Default-Start: 2 3 5
|
||||
+# Default-Stop: 0 1 6
|
||||
# Short-Description: VirtualBox Linux kernel module
|
||||
+# Description: VirtualBox Linux kernel module
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
|
||||
@@ -56,7 +57,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
|
||||
@@ -189,13 +190,6 @@ start()
|
||||
failure "Cannot create device $DEVICE with major $MAJOR and minor $MINOR"
|
||||
fi
|
||||
fi
|
||||
- # ensure permissions
|
||||
- if ! chown :%GROUP% $DEVICE 2>/dev/null; then
|
||||
- rmmod vboxnetadp 2>/dev/null
|
||||
- rmmod vboxnetflt 2>/dev/null
|
||||
- rmmod vboxdrv 2>/dev/null
|
||||
- failure "Cannot change group %GROUP% for device $DEVICE"
|
||||
- fi
|
||||
if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then
|
||||
failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why"
|
||||
fi
|
3
virtualbox-4.0.0-rpmlintrc
Normal file
3
virtualbox-4.0.0-rpmlintrc
Normal file
@ -0,0 +1,3 @@
|
||||
addFilter("incoherent-init-script-name vboxdrv")
|
||||
addFilter("incoherent-init-script-name vboxadd")
|
||||
addFilter("xorg-x11-driver-virtualbox-ose.* shlib-policy-missing-suffix")
|
1
virtualbox-60-vboxdrv.rules
Normal file
1
virtualbox-60-vboxdrv.rules
Normal file
@ -0,0 +1 @@
|
||||
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
|
2
virtualbox-60-vboxguest.rules
Normal file
2
virtualbox-60-vboxguest.rules
Normal file
@ -0,0 +1,2 @@
|
||||
KERNEL=="vboxguest", NAME="vboxguest", OWNER="root", MODE="0660" ENV{ID_INPUT}="1", ENV{ID_INPUT_MOUSE}="1"
|
||||
KERNEL=="vboxuser", NAME="vboxuser", OWNER="root", MODE="0600", TAG+="udev-acl"
|
5
virtualbox-60-vboxmouse.conf
Normal file
5
virtualbox-60-vboxmouse.conf
Normal file
@ -0,0 +1,5 @@
|
||||
Section "InputClass"
|
||||
Identifier "VBoxMouse"
|
||||
Driver "vboxmouse"
|
||||
MatchDevicePath "/dev/vboxguest"
|
||||
EndSection
|
16
virtualbox-default.virtualbox
Normal file
16
virtualbox-default.virtualbox
Normal file
@ -0,0 +1,16 @@
|
||||
# /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"
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
#
|
||||
#SHUTDOWN_USERS="foo bar"
|
||||
#SHUTDOWN="savestate"
|
6
virtualbox-guest-kmp-files
Normal file
6
virtualbox-guest-kmp-files
Normal file
@ -0,0 +1,6 @@
|
||||
%defattr (-,root,root)
|
||||
%dir /lib/modules/%2-%1/
|
||||
%dir /lib/modules/%2-%1/updates
|
||||
/lib/modules/%2-%1/updates/vboxsf.ko
|
||||
/lib/modules/%2-%1/updates/vboxvideo.ko
|
||||
/lib/modules/%2-%1/updates/vboxguest.ko
|
3
virtualbox-guest-preamble
Normal file
3
virtualbox-guest-preamble
Normal file
@ -0,0 +1,3 @@
|
||||
Requires: kernel-%1
|
||||
Provides: virtualbox-guest-kmp = %version
|
||||
Obsoletes: virtualbox-ose-guest-kmp
|
6
virtualbox-host-kmp-files
Normal file
6
virtualbox-host-kmp-files
Normal file
@ -0,0 +1,6 @@
|
||||
%defattr (-,root,root)
|
||||
%dir /lib/modules/%2-%1/
|
||||
%dir /lib/modules/%2-%1/updates
|
||||
/lib/modules/%2-%1/updates/vboxdrv.ko
|
||||
/lib/modules/%2-%1/updates/vboxnetadp.ko
|
||||
/lib/modules/%2-%1/updates/vboxnetflt.ko
|
3
virtualbox-host-preamble
Normal file
3
virtualbox-host-preamble
Normal file
@ -0,0 +1,3 @@
|
||||
Requires: kernel-%1
|
||||
Provides: virtualbox-host-kmp = %version
|
||||
Obsoletes: virtualbox-ose-host-kmp
|
54
virtualbox-patch-source.sh
Normal file
54
virtualbox-patch-source.sh
Normal file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
REMOVE_DIRS=(
|
||||
src/VBox/Additions/WINNT
|
||||
src/VBox/Additions/os2
|
||||
kBuild/bin
|
||||
kBuild/msgstyles
|
||||
kBuild/tools
|
||||
kBuild/sdks
|
||||
tools/darwin.x86
|
||||
tools/darwin.amd64
|
||||
tools/freebsd.x86
|
||||
tools/os2.x86
|
||||
tools/solaris.x86
|
||||
tools/solaris.amd64
|
||||
tools/win.amd64
|
||||
tools/win.x86
|
||||
tools/linux.x86
|
||||
tools/linux.amd64
|
||||
)
|
||||
|
||||
set -o errexit
|
||||
|
||||
CMDNAME=${0##*/}
|
||||
SOURCEDIR=${0%$CMDNAME}
|
||||
|
||||
BASENAME=${1%.tar.bz2}
|
||||
|
||||
trap "rm -rf \"$BASENAME-patched.tar\" \"$BASENAME-patched.tar.bz2\"" ERR
|
||||
|
||||
for (( N=0 ; N<${#REMOVE_DIRS[@]} ; N++ )) ; do
|
||||
#REMOVE_DIRS[N]="$BASENAME/${REMOVE_DIRS[N]}"
|
||||
# use a wildcard because VirtualBox-1.6.0-OSE != VirtualBox-1.6.0_OSE
|
||||
REMOVE_DIRS[N]="*/${REMOVE_DIRS[N]}"
|
||||
done
|
||||
|
||||
cd "$SOURCEDIR" >/dev/null
|
||||
|
||||
if ! test -f "$BASENAME.tar.bz2" ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -f "$BASENAME-patched.tar.bz2" ; then
|
||||
if test "$BASENAME.tar.bz2" -ot "$BASENAME-patched.tar.bz2" ; then
|
||||
if test $CMDNAME -ot "$BASENAME-patched.tar.bz2" ; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -a "$BASENAME.tar.bz2" "$BASENAME-patched.tar.bz2"
|
||||
bunzip2 "$BASENAME-patched.tar.bz2"
|
||||
tar --wildcards --delete -f "$BASENAME-patched.tar" "${REMOVE_DIRS[@]}"
|
||||
bzip2 "$BASENAME-patched.tar"
|
23
virtualbox-sysconfig.vbox
Normal file
23
virtualbox-sysconfig.vbox
Normal file
@ -0,0 +1,23 @@
|
||||
## Path: System/Virtual Machines/VBox
|
||||
## Description: Virtual box machines to autostart during boot
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Configuration file for the script /etc/init.d/vboxes
|
||||
#
|
||||
# The variable VBOX_AUTOSTART holds the virtual machines to be started during
|
||||
# boot time. One entry must contain the virtual machine name and the
|
||||
# virtual machine owner. They are separated with a ";". Multiple entries
|
||||
# (virtual machines) are separated with a space.
|
||||
#
|
||||
# Examples:
|
||||
# MachineName1;user1
|
||||
#
|
||||
# One virtual machine:
|
||||
# openSUSE_Factory;vbox
|
||||
#
|
||||
# Multiple virtual machines:
|
||||
# openSUSE_Factory;vbox openSUSE_stable;suse
|
||||
#
|
||||
VBOX_AUTOSTART=""
|
||||
|
307
virtualbox-vboxes
Normal file
307
virtualbox-vboxes
Normal file
@ -0,0 +1,307 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# chkconfig: - 91 35
|
||||
# description: Starts and stops vbox autostart VMs.
|
||||
# Based on
|
||||
# http://www.amiryan.org/2009/11/04/virtualbox-init-d-service-autostart-scriptu
|
||||
#
|
||||
# By Richard Bos <rbos at opensuse dot org> - May 2010
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vboxes
|
||||
# Required-Start: $network vboxdrv $ALL
|
||||
# Required-Stop: $network $named
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 3 4 5 6
|
||||
# Short-Description: Autostart Virtual Box VMs
|
||||
# Description: Autostart Virtual Box VMs that are mentioned in /etc/sysconfig/vbox file
|
||||
### END INIT INFO
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v be verbose in local rc status and clear it afterwards
|
||||
# rc_status -v -r ditto and clear both the local and overall rc status
|
||||
# rc_status -s display "skipped" and exit with status 3
|
||||
# rc_status -u display "unused" and exit with status 3
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_failed <num> set local and overall rc status to <num>
|
||||
# rc_reset clear both the local and overall rc status
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
# rc_active checks whether a service is activated by symlinks
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
VBOXMGR_BIN=/usr/lib/virtualbox/VBoxManage
|
||||
if [[ ! -x $VBOXMGR_BIN ]]; then
|
||||
echo "$VBOXMGR_BIN does not exist"
|
||||
if [ "$1" = "stop" ]; then
|
||||
exit 0;
|
||||
else
|
||||
exit 6
|
||||
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() {
|
||||
|
||||
N=1
|
||||
for VBOX in $VBOX_AUTOSTART; do
|
||||
|
||||
if grep -q \; <<< "$VBOX"; then
|
||||
VBOX_NAME[$N]=$(cut -d\; -f1 <<< "$VBOX")
|
||||
VBOX_USER[$N]=$(cut -d\; -f2 <<< "$VBOX")
|
||||
else
|
||||
VBOX_NAME[$N]="$VBOX"
|
||||
VBOX_USER[$N]=""
|
||||
fi
|
||||
N=$(($N+1))
|
||||
done
|
||||
|
||||
VBOXES=${#VBOX_NAME[*]}
|
||||
|
||||
if [ $VBOXES -eq 0 ]; then
|
||||
# The virtual machines have to be configured in /etc/sysconfig/vbox
|
||||
echo -n "Starting $SERVICE: no virtual machines configured"
|
||||
rc_status -u
|
||||
else
|
||||
|
||||
N=1
|
||||
echo -n "Starting $SERVICE: "
|
||||
while [[ $N -le $VBOXES ]]; do
|
||||
if [[ $N -lt $VBOXES ]]; then
|
||||
echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}), "
|
||||
else
|
||||
echo "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
|
||||
fi
|
||||
N=$(($N+1))
|
||||
done
|
||||
|
||||
N=1
|
||||
while [[ $N -le $VBOXES ]]; do
|
||||
|
||||
if [[ -n "${VBOX_USER[$N]}" ]]; then
|
||||
|
||||
if grep --quiet --word-regexp ${VBOX_USER[$N]} /etc/passwd; 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 [[ -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
|
||||
|
||||
# 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]} (user: ${VBOX_USER[$N]})"
|
||||
rc_status -v -r
|
||||
else
|
||||
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 " Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) does not exist"
|
||||
rc_status -s -r
|
||||
fi
|
||||
|
||||
else
|
||||
echo -n " Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) is already running"
|
||||
rc_status -v -r
|
||||
fi
|
||||
|
||||
else
|
||||
echo -n " Virtual machine: ${VBOX_NAME[$N]}, VBOX_USER: ${VBOX_USER[$N]} does not exist"
|
||||
rc_status -s -r
|
||||
fi
|
||||
|
||||
else
|
||||
echo -n " Virtual machine: ${VBOX_NAME[$N]}: VBOX_USER not configured"
|
||||
rc_status -s -r
|
||||
fi
|
||||
|
||||
N=$(($N+1))
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
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[*]}
|
||||
|
||||
if [[ $VBOXES -eq 0 ]]; then
|
||||
echo -n "Shutting down $SERVICE: no virtual machines running."
|
||||
rc_status -s -r
|
||||
else
|
||||
|
||||
echo -n "Shutting down $SERVICE: "
|
||||
N=1
|
||||
while [[ $N -le $VBOXES ]]; do
|
||||
if [[ $N -lt $VBOXES ]]; then
|
||||
echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}), "
|
||||
else
|
||||
echo "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
|
||||
fi
|
||||
N=$(($N+1))
|
||||
done
|
||||
|
||||
N=1
|
||||
while [[ $N -le $VBOXES ]]; do
|
||||
|
||||
echo -n " ${VBOX_NAME[$N]}: "
|
||||
su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN -q controlvm "${VBOX_NAME[$N]}" savestate"
|
||||
RETVAL=$?
|
||||
|
||||
echo -n " Shutting down virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
|
||||
if [[ $RETVAL == $? ]]; then
|
||||
rc_status -v -r
|
||||
else
|
||||
rc_failed; rc_status -v -r
|
||||
fi
|
||||
N=$(($N+1))
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
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 "$SERVICE: no virtual machines running."
|
||||
rc_status -s -r
|
||||
else
|
||||
N=1
|
||||
while [[ $N -le $VBOXES ]]; do
|
||||
# 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
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|force-reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $PRG {start|stop|restart|force-reload|status}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
4
virtualbox-wrapper.sh
Normal file
4
virtualbox-wrapper.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
export QT_NO_KDE_INTEGRATION=1
|
||||
/usr/bin/id -nG | grep -v -e "root" -e "vboxusers" >/dev/null && /usr/lib/virtualbox/VBoxPermissionMessage && exit
|
||||
LD_LIBRARY_PATH="/usr/lib/virtualbox${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" /usr/lib/virtualbox/VirtualBox $@
|
1981
virtualbox.changes
Normal file
1981
virtualbox.changes
Normal file
File diff suppressed because it is too large
Load Diff
599
virtualbox.spec
Normal file
599
virtualbox.spec
Normal file
@ -0,0 +1,599 @@
|
||||
#
|
||||
# spec file for package virtualbox (Version 3.9.80)
|
||||
#
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define _vbox_instdir /usr/lib/virtualbox
|
||||
|
||||
Name: virtualbox
|
||||
BuildRequires: fdupes
|
||||
%if %suse_version > 1110
|
||||
BuildRequires: acpica dmidecode
|
||||
%else
|
||||
BuildRequires: pmtools
|
||||
%endif
|
||||
BuildRequires: bin86 dev86 libidl-devel libqt4-devel libxslt-devel yasm
|
||||
BuildRequires: SDL-devel kernel-syms module-init-tools
|
||||
BuildRequires: e2fsprogs-devel libcap-devel libcurl-devel python-devel update-desktop-files
|
||||
BuildRequires: hal-devel pulseaudio-devel xorg-x11 xorg-x11-devel xorg-x11-server xorg-x11-server-sdk
|
||||
BuildRequires: LibVNCServer-devel gcc43-c++ kbuild pam-devel udev
|
||||
#added for vbox 4.0.0
|
||||
BuildRequires: zlib-devel-static
|
||||
%ifarch amd64 x86_64 ia32e em64t
|
||||
BuildRequires: hal-32bit
|
||||
BuildRequires: xorg-x11-libX11-devel-32bit xorg-x11-libXt-devel-32bit xorg-x11-libs-32bit
|
||||
BuildRequires: xorg-x11-libXext-devel-32bit xorg-x11-libXmu-devel-32bit
|
||||
BuildRequires: gcc43-32bit libstdc++43-devel-32bit
|
||||
%endif
|
||||
#
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
Version: 4.0.0
|
||||
Release: 1
|
||||
Summary: VirtualBox is an Emulator
|
||||
License: GPLv2+
|
||||
Group: System/Emulators/PC
|
||||
Url: http://www.virtualbox.org/
|
||||
#
|
||||
# so you don't need to repack virtualbox by hand, just add new release of VirtualBox-x.x.x.tar.bz2 and line below with
|
||||
# script virtualbox-patch-source.sh will do the job :)
|
||||
# WARNING: This is not a comment, but the real command to repack souce
|
||||
#%(bash %{_sourcedir}/virtualbox-patch-source.sh VirtualBox-%{version}.tar.bz2)
|
||||
Source0: VirtualBox-%{version}-patched.tar.bz2
|
||||
Source1: VirtualBox-%{version}-UserManual.pdf
|
||||
Source2: %{name}-60-vboxdrv.rules
|
||||
Source3: %{name}-60-vboxguest.rules
|
||||
Source4: %{name}-default.virtualbox
|
||||
Source5: %{name}-host-kmp-files
|
||||
Source6: %{name}-guest-kmp-files
|
||||
Source7: %{name}-host-preamble
|
||||
Source8: %{name}-guest-preamble
|
||||
Source9: %{name}-wrapper.sh
|
||||
# since 11.3 we need this conf instead of HAL's fdi to define vbox mouse
|
||||
Source10: %{name}-60-vboxmouse.conf
|
||||
# init script to start virtual boxes during boot, to be configured via /etc/sysconfig/vbox bnc#582398
|
||||
Source12: %{name}-vboxes
|
||||
Source13: %{name}-sysconfig.vbox
|
||||
Source98: %{name}-%{version}-rpmlintrc
|
||||
Source99: %{name}-patch-source.sh
|
||||
#rework init script
|
||||
Patch1: vbox-vboxdrv-init-script.diff
|
||||
Patch2: vbox-vboxadd-init-script.diff
|
||||
#disable update in vbox gui
|
||||
##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
|
||||
#fix rpath
|
||||
Patch5: vbox-rpath.diff
|
||||
#PATCH-FIX-OPENSUSE implement messagebox (VBoxPermissionMessage app), which is displayed, when user
|
||||
#try to start VirtualBox and is not memeber of vboxusers group
|
||||
Patch99: vbox-permissions_warning.diff
|
||||
#PATCH-FIX-OPENSUSE Do not include build dates on binaries, makes build-compare happier
|
||||
Patch100: vbox-no-build-dates.diff
|
||||
Patch101: vbox-default-os-type.diff
|
||||
#
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: pwdutils permissions
|
||||
Requires: %{name}-host-kmp = %version
|
||||
#Suggests: %{name}-qt = %version
|
||||
Recommends: %{name}-qt = %version
|
||||
|
||||
%description
|
||||
VirtualBox is an extremely feature rich, high performance product
|
||||
for enterprise customers, it is also the only professional solution
|
||||
that is freely available as Open Source Software under the terms of the
|
||||
GNU Public License (GPL).
|
||||
##########################################
|
||||
%package qt
|
||||
License: GPLv2+
|
||||
Summary: Qt GUI part for %{name}
|
||||
Group: System/Emulators/PC
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description qt
|
||||
Qt GUI part for %{name}.
|
||||
#########################################
|
||||
%package host-KMP
|
||||
License: GPLv2+
|
||||
Summary: Host kernel module for VirtualBox
|
||||
Group: System/Emulators/PC
|
||||
# SUSE specify macro to define host kmp package
|
||||
%{?suse_kernel_module_package:%suse_kernel_module_package -p %{S:7} -n %{name}-host -f %{S:5} kdump um xen xenpae}
|
||||
|
||||
%description host-KMP
|
||||
This package contains the kernel-module for VirtualBox.
|
||||
##########################################
|
||||
%package guest-KMP
|
||||
License: GPLv2+
|
||||
Summary: Guest kernel modules for VirtualBox
|
||||
Group: System/Emulators/PC
|
||||
#SUSE specify macro to define guest kmp package
|
||||
%{?suse_kernel_module_package:%suse_kernel_module_package -p %{S:8} -n %{name}-guest -f %{S:6} kdump um xen xenpae}
|
||||
|
||||
%description guest-KMP
|
||||
This package contains the kernel-module for VirtualBox.
|
||||
##########################################
|
||||
%package guest-x11
|
||||
License: GPLv2+
|
||||
Summary: VirtualBox X11 drivers for mouse and video
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires: %{name}-guest-kmp = %version
|
||||
Supplements: modalias(pci:v000080EEd0000BEEFsv*sd*bc*sc*i*)
|
||||
|
||||
%description guest-x11
|
||||
VirtualBox
|
||||
This package contains X11 guest utilities and X11 guest mouse and video drivers
|
||||
###########################################
|
||||
%package guest-tools
|
||||
License: GPLv2+
|
||||
Summary: VirtualBox guest tools
|
||||
Group: System/Emulators/PC
|
||||
Requires: %{name}-guest-kmp = %version
|
||||
Supplements: modalias(pci:v000080EEd0000BEEFsv*sd*bc*sc*i*)
|
||||
|
||||
%description guest-tools
|
||||
VirtualBox guest addition tools.
|
||||
###########################################
|
||||
%package -n python-%{name}
|
||||
|
||||
|
||||
Summary: Python bindings for %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description -n python-%{name}
|
||||
Python XPCOM bindings to %{name}.
|
||||
###########################################
|
||||
%package devel
|
||||
License: GPLv2+
|
||||
Summary: Devel files for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-%{name} = %{version}
|
||||
|
||||
%description devel
|
||||
Development file for %{name}
|
||||
###########################################
|
||||
%prep
|
||||
%setup -q -n VirtualBox-%{version}_OSE
|
||||
%patch1
|
||||
%patch2
|
||||
##%patch3
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch99 -p1
|
||||
%patch100
|
||||
%patch101
|
||||
#copy user manual
|
||||
%__cp %{S:1} ./UserManual.pdf
|
||||
|
||||
%build
|
||||
# This package failed when testing with -Wl,-as-needed being default.
|
||||
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
||||
export SUSE_ASNEEDED=0
|
||||
# turn on vnc feature by hand, this line could be dropped when we could use configure script
|
||||
echo VBOX_WITH_VNC=1 >> Config.kmk
|
||||
#
|
||||
# --with-gcc=/usr/bin/gxx-4.3 do configure and set proper gcc - currently vbox support only gcc<=4.4
|
||||
# --disable-kmods \ don't build Linux kernel modules - but use SUSE specific way see few lines under
|
||||
# --nofatal try to avoid build fail caused by missing makeself package
|
||||
# --disable-kmods build virtualbox without kernel modules
|
||||
./configure \
|
||||
--disable-kmods \
|
||||
--with-gcc=/usr/bin/gcc-4.3 \
|
||||
--with-g++=/usr/bin/g++-4.3 \
|
||||
--disable-java \
|
||||
--disable-docs \
|
||||
--nofatal
|
||||
#
|
||||
# VBOX_PATH_PACKAGE_DOCS set propper path for link to pdf in .desktop file
|
||||
# VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= just disable some functionality in gui
|
||||
/usr/bin/kmk \
|
||||
KBUILD_VERBOSE=2 \
|
||||
VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \
|
||||
TOOL_YASM_AS=yasm \
|
||||
VBOX_PATH_PACKAGE_DOCS=/usr/share/doc/packages/virtualbox \
|
||||
all
|
||||
#
|
||||
# build kernel modules for guest and host (check novel-kmp package as example)
|
||||
# host modules : vboxdrv,vboxnetflt,vboxnetadp
|
||||
# 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,sf,video}; do
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
|
||||
# go through the all flavors (desktop,default ...)
|
||||
for flavor in %flavors_to_build; do
|
||||
# delete old build dir for sure
|
||||
%__rm -rf modules_build_dir/${module_name}_${flavor}
|
||||
|
||||
# create build directory for specific flavor
|
||||
%__mkdir -p modules_build_dir/$flavor
|
||||
|
||||
# copy sources which will be used to build vbox module in last step
|
||||
%__cp -r $vbox_module/ modules_build_dir/$flavor/
|
||||
|
||||
# copy vboxdrv (for host) and vboxguest (for guest) module symbols:
|
||||
if [ "$module_name" = "vboxnetflt" -o \
|
||||
"$module_name" = "vboxnetadp" ]; then
|
||||
%__cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
fi
|
||||
|
||||
if [ "$modulename" = "vboxsf" ]; then
|
||||
%__cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
fi
|
||||
# build the module for the specific flavor
|
||||
%__make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
|
||||
M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
done
|
||||
done
|
||||
|
||||
%install
|
||||
#################################
|
||||
echo "create directory structure"
|
||||
#################################
|
||||
%__install -d -m 755 %{buildroot}%{_bindir}
|
||||
%__install -d -m 755 %{buildroot}%{_sbindir}
|
||||
%__install -d -m 755 %{buildroot}/sbin
|
||||
%__install -d -m 755 %{buildroot}%{_datadir}/virtualbox
|
||||
%__install -d -m 755 %{buildroot}%{_datadir}/virtualbox/nls
|
||||
%__install -d -m 755 %{buildroot}%{_datadir}/pixmaps
|
||||
%__install -d -m 755 %{buildroot}%{_datadir}/applications
|
||||
%if %suse_version >= 1130
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/
|
||||
%else
|
||||
#since 11.3 we don't use hal to detect vbox mouse
|
||||
%__install -d -m 755 %{buildroot}%{_datadir}/hal/fdi/policy/20thirdparty
|
||||
%endif
|
||||
%__install -d -m 755 %{buildroot}%{_vbox_instdir}
|
||||
%__install -d -m 755 %{buildroot}%{_vbox_instdir}/components
|
||||
%__install -d -m 755 %{buildroot}%{_libdir}/dri
|
||||
%__install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/drivers
|
||||
%__install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/input
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/default
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/init.d
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d
|
||||
%__install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d
|
||||
%__install -d -m 755 %{buildroot}%{python_sitelib}/virtualbox
|
||||
|
||||
####################################################################################
|
||||
echo "entering virtualbox-kmp-guest and virtualbox-kmp-host install section"
|
||||
####################################################################################
|
||||
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,sf,video}
|
||||
do
|
||||
#and trought the all flavors
|
||||
for flavor in %flavors_to_build; do
|
||||
#to install modules use Makefile from /usr/src/linux-obj/%_target_cpu/$flavor and builds from $PWD/modules_build_dir/$flavor/$module_name
|
||||
%__make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
done
|
||||
done
|
||||
|
||||
###########################################
|
||||
echo "entering guest-tools install section"
|
||||
###########################################
|
||||
%__install -m 755 out/linux.*/release/bin/additions/VBoxControl \
|
||||
%{buildroot}%{_bindir}/VBoxControl
|
||||
%__install -m 755 out/linux.*/release/bin/additions/VBoxService \
|
||||
%{buildroot}%{_bindir}/VBoxService
|
||||
%__install -m 755 out/linux.*/release/bin/additions/mount.vboxsf \
|
||||
%{buildroot}/sbin/mount.vboxsf
|
||||
%__install -m 744 src/VBox/Additions/linux/installer/vboxadd.sh \
|
||||
%{buildroot}%{_sysconfdir}/init.d/vboxadd
|
||||
# udev rule for guest (virtualbox-guest-tools)
|
||||
%__install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/udev/rules.d/60-vboxguest.rules
|
||||
#
|
||||
##############################################################
|
||||
echo "entering guest-x11 install section"
|
||||
##############################################################
|
||||
pushd out/linux.*/release/bin/additions/
|
||||
#VBoxClient daemon (support for clipboard,autoresize,seamless windows)
|
||||
%__install -m 755 VBoxClient %{buildroot}%{_bindir}
|
||||
# xorg drivers for mouse and videos check suse version to add propper driver
|
||||
%if %suse_version >= 1130
|
||||
%__install -m 755 vboxmouse_drv_18.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/input/vboxmouse_drv.so
|
||||
%__install -m 755 vboxvideo_drv_18.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
%else
|
||||
%if %suse_version == 1120
|
||||
%__install -m 755 vboxmouse_drv_16.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/input/vboxmouse_drv.so
|
||||
%__install -m 755 vboxvideo_drv_16.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
%else
|
||||
%__install -m 755 vboxmouse_drv_15.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/input/vboxmouse_drv.so
|
||||
%__install -m 755 vboxvideo_drv_15.so \
|
||||
%{buildroot}%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
%endif
|
||||
%endif
|
||||
popd
|
||||
# VBoxOGL* libs for guest-x11 subpackage
|
||||
%__install -m 644 out/linux.*/release/bin/additions/VBoxOGL*.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)
|
||||
%__install -m 755 src/VBox/Additions/x11/Installer/98vboxadd-xclient \
|
||||
%{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh
|
||||
%if %suse_version >= 1130
|
||||
# add xorg config snipet to vbox mouse integration recognize
|
||||
%__install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/60-vboxmouse.conf
|
||||
%else
|
||||
# hal policy file to autodetect the virtualbox mouse
|
||||
%__install -m 644 src/VBox/Additions/linux/installer/90-vboxguest.fdi \
|
||||
%{buildroot}%{_datadir}/hal/fdi/policy/20thirdparty/90-vboxguest.fdi
|
||||
%endif
|
||||
|
||||
##############################################
|
||||
echo "entering virtualbox(-qt) install section"
|
||||
##############################################
|
||||
# copy the main files to %{_vbox_instdir}
|
||||
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 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
|
||||
%__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 VBoxXPCOMIPCD %{buildroot}%{_vbox_instdir}
|
||||
%__install -m 755 VBoxTestOGL %{buildroot}%{_vbox_instdir}
|
||||
%__install -m 755 VBoxPermissionMessage \
|
||||
%{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 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 644 components/* %{buildroot}%{_vbox_instdir}/components/
|
||||
# install languages
|
||||
%__install -m 644 nls/* %{buildroot}%{_datadir}/virtualbox/nls/
|
||||
popd
|
||||
# install desktop file
|
||||
%__install -m 644 out/linux.*/release/bin/virtualbox.desktop \
|
||||
%{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
# create a menu entry
|
||||
%__install -m 644 out/linux.*/release/bin/VBox.png \
|
||||
%{buildroot}%{_datadir}/pixmaps/
|
||||
# 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
|
||||
# copy the init scripts
|
||||
%__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
|
||||
#install wrapper script
|
||||
%__install -m 644 %{S:9} %{buildroot}%{_bindir}/VirtualBox
|
||||
|
||||
# Init script to start virtual boxes during boot
|
||||
%__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
|
||||
|
||||
%suse_update_desktop_file -i %{name} System Emulator
|
||||
|
||||
######################################################
|
||||
echo "entrering python-virtualbox and virtualbox-devel install section"
|
||||
######################################################
|
||||
%__mv out/linux.*/release/bin/sdk/ \
|
||||
%{buildroot}%{_vbox_instdir}
|
||||
|
||||
######################################################
|
||||
# run fdupes
|
||||
######################################################
|
||||
#run fdupes because we lost link for virtualbox/components directory
|
||||
%fdupes %{buildroot}/%{_vbox_instdir}
|
||||
#also some translation files are duplicated
|
||||
%fdupes %{buildroot}/%{_datadir}/virtualbox/nls
|
||||
|
||||
%pre
|
||||
echo "creating group vboxusers..."
|
||||
groupadd -r vboxusers 2>/dev/null || :
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%fillup_and_insserv -f -y vboxdrv
|
||||
%fillup_only -an vboxes
|
||||
%run_permissions
|
||||
|
||||
%post qt
|
||||
%run_permissions
|
||||
|
||||
%post guest-tools
|
||||
%fillup_and_insserv -f -y vboxadd
|
||||
|
||||
%preun
|
||||
%stop_on_removal vboxdrv
|
||||
exit 0
|
||||
|
||||
%preun guest-tools
|
||||
%stop_on_removal vboxadd
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%restart_on_update vboxdrv
|
||||
%insserv_cleanup
|
||||
|
||||
%postun guest-tools
|
||||
%restart_on_update vboxadd
|
||||
%insserv_cleanup
|
||||
%verifyscript
|
||||
%if %suse_version > 1110
|
||||
%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
|
||||
|
||||
%clean
|
||||
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc UserManual.pdf
|
||||
%{_bindir}/VBoxManage
|
||||
%{_bindir}/VBoxHeadless
|
||||
%{_bindir}/VBoxSDL
|
||||
%{_bindir}/VBoxTunctl
|
||||
%dir %{_vbox_instdir}
|
||||
%{_vbox_instdir}/VBoxSysInfo.sh
|
||||
%{_vbox_instdir}/VBoxBFE.so
|
||||
%{_vbox_instdir}/VBoxDD2.so
|
||||
%{_vbox_instdir}/VBoxDD.so
|
||||
%{_vbox_instdir}/VBoxDDU.so
|
||||
%{_vbox_instdir}/VBoxGuestControlSvc.so
|
||||
%{_vbox_instdir}/VBoxGuestPropSvc.so
|
||||
%{_vbox_instdir}/VBoxHeadless.so
|
||||
%{_vbox_instdir}/VBoxKeyboard.so
|
||||
%{_vbox_instdir}/VBoxNetDHCP.so
|
||||
%{_vbox_instdir}/VBoxOGLhostcrutil.so
|
||||
%{_vbox_instdir}/VBoxOGLhosterrorspu.so
|
||||
%{_vbox_instdir}/VBoxOGLrenderspu.so
|
||||
%{_vbox_instdir}/VBoxREM*.so
|
||||
%{_vbox_instdir}/VBoxRT.so
|
||||
%{_vbox_instdir}/VBoxSDL.so
|
||||
%{_vbox_instdir}/VBoxSharedClipboard.so
|
||||
%{_vbox_instdir}/VBoxSharedCrOpenGL.so
|
||||
%{_vbox_instdir}/VBoxSharedFolders.so
|
||||
%{_vbox_instdir}/VBoxVMM.so
|
||||
%{_vbox_instdir}/VBoxXPCOMC.so
|
||||
%{_vbox_instdir}/VBoxXPCOM.so
|
||||
%{_vbox_instdir}/VBox*.gc
|
||||
%{_vbox_instdir}/VBox*.r0
|
||||
%{_vbox_instdir}/VMMGC.gc
|
||||
%{_vbox_instdir}/VMMR0.r0
|
||||
%{_vbox_instdir}/VBoxEFI*.fd
|
||||
%{_vbox_instdir}/VBoxManage
|
||||
%{_vbox_instdir}/VBoxSVC
|
||||
%{_vbox_instdir}/VBoxTunctl
|
||||
%{_vbox_instdir}/VBoxXPCOMIPCD
|
||||
#added for 4.0.0
|
||||
%{_vbox_instdir}/DBGCPlugInDiggers.so
|
||||
%{_vbox_instdir}/VBoxAuth.so
|
||||
%{_vbox_instdir}/VBoxAuthSimple.so
|
||||
%{_vbox_instdir}/VBoxDbg.so
|
||||
#
|
||||
%dir %{_vbox_instdir}/components
|
||||
%{_vbox_instdir}/components/*.so
|
||||
%{_vbox_instdir}/components/*.xpt
|
||||
%dir %{_datadir}/virtualbox
|
||||
%config %{_sysconfdir}/default/virtualbox
|
||||
%config %{_sysconfdir}/udev/rules.d/60-vboxdrv.rules
|
||||
%config %{_sysconfdir}/init.d/vboxdrv
|
||||
%{_sysconfdir}/init.d/vboxes
|
||||
%{_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
|
||||
#%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetDHCP
|
||||
%{_vbox_instdir}/VBoxNetDHCP
|
||||
#
|
||||
|
||||
%files qt
|
||||
%defattr(-, root, root)
|
||||
%{_vbox_instdir}/VBoxPermissionMessage
|
||||
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBox
|
||||
#wrapper script is in bindir
|
||||
%attr(0755,root,root) %{_bindir}/VirtualBox
|
||||
#ldd shows libQt* dependency
|
||||
%{_vbox_instdir}/VBoxTestOGL
|
||||
#qm's translations
|
||||
%{_datadir}/virtualbox/nls
|
||||
%{_vbox_instdir}/VirtualBox.so
|
||||
%{_datadir}/pixmaps/VBox.png
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
#
|
||||
|
||||
%files guest-x11
|
||||
%defattr(-, root, root)
|
||||
%dir %{_libdir}/xorg/modules/drivers
|
||||
%dir %{_libdir}/xorg/modules/input
|
||||
%dir %{_libdir}/dri/
|
||||
%{_bindir}/VBoxClient
|
||||
%{_libdir}/VBoxOGL*.so
|
||||
%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so
|
||||
%{_libdir}/xorg/modules/input/vboxmouse_drv.so
|
||||
%{_libdir}/dri/vboxvideo_dri.so
|
||||
%{_sysconfdir}/X11/xinit/xinitrc.d/vboxadd-xclient.sh
|
||||
%if %suse_version >= 1130
|
||||
%config %{_sysconfdir}/X11/xorg.conf.d/60-vboxmouse.conf
|
||||
%else
|
||||
%{_datadir}/hal/fdi/policy/20thirdparty/90-vboxguest.fdi
|
||||
%endif
|
||||
#
|
||||
|
||||
%files guest-tools
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/VBoxControl
|
||||
%{_bindir}/VBoxService
|
||||
/sbin/mount.vboxsf
|
||||
%config %{_sysconfdir}/udev/rules.d/60-vboxguest.rules
|
||||
%config %{_sysconfdir}/init.d/vboxadd
|
||||
#
|
||||
|
||||
%files -n python-%{name}
|
||||
%defattr(-,root, root)
|
||||
%dir %{_vbox_instdir}/sdk
|
||||
%dir %{_vbox_instdir}/sdk/bindings
|
||||
%dir %{_vbox_instdir}/sdk/bindings/xpcom
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/python
|
||||
%{_vbox_instdir}/VBoxPython.so
|
||||
%if 0%{?suse_version} > 1130
|
||||
%{_vbox_instdir}/VBoxPython2_7.so
|
||||
%else
|
||||
%{_vbox_instdir}/VBoxPython2_6.so
|
||||
%endif
|
||||
#path with vboxapi
|
||||
%{_vbox_instdir}/sdk/installer
|
||||
#
|
||||
|
||||
%files devel
|
||||
%defattr(-,root, root)
|
||||
%{_vbox_instdir}/sdk/bindings/VirtualBox.xidl
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/cbinding
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/idl
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/include
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/samples
|
||||
%{_vbox_instdir}/sdk/bindings/auth
|
||||
%{_vbox_instdir}/sdk/bindings/glue
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user