diff options
author | Heinz Wiesinger <pprkut@liwjatan.at> | 2010-05-11 22:55:36 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-11 22:55:36 +0200 |
commit | 280098ec662845272fbd833a2dacb512be18f560 (patch) | |
tree | 3767344fa28acd25a0b3804f4c3b9840a64b8f34 /system/virtualbox-ose | |
parent | 9ef4eb0911889d19a2495c0a9752bbc9bdc9f175 (diff) |
system/virtualbox-ose: Added to 12.1 repository
Diffstat (limited to 'system/virtualbox-ose')
-rw-r--r-- | system/virtualbox-ose/LocalConfig.kmk | 19 | ||||
-rw-r--r-- | system/virtualbox-ose/README | 48 | ||||
-rw-r--r-- | system/virtualbox-ose/VBox.diff | 12 | ||||
-rw-r--r-- | system/virtualbox-ose/VirtualBox3.desktop | 15 | ||||
-rw-r--r-- | system/virtualbox-ose/doinst.sh | 30 | ||||
-rw-r--r-- | system/virtualbox-ose/slack-desc | 19 | ||||
-rw-r--r-- | system/virtualbox-ose/vbox.cfg | 5 | ||||
-rw-r--r-- | system/virtualbox-ose/vboxdrv.sh.in.diff | 17 | ||||
-rw-r--r-- | system/virtualbox-ose/virtualbox-ose.SlackBuild | 210 | ||||
-rw-r--r-- | system/virtualbox-ose/virtualbox-ose.info | 8 |
10 files changed, 383 insertions, 0 deletions
diff --git a/system/virtualbox-ose/LocalConfig.kmk b/system/virtualbox-ose/LocalConfig.kmk new file mode 100644 index 000000000000..9c6c9774850c --- /dev/null +++ b/system/virtualbox-ose/LocalConfig.kmk @@ -0,0 +1,19 @@ +# Modify building of VirtualBox to get a cleaner system + +DEFS += RTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" + +# don't build testcases to save time, they are not needed for the package +VBOX_WITH_TESTCASES := +VBOX_WITH_TESTSUITE := + +# don't build guest-additions, they will come in a separate build +VBOX_WITHOUT_ADDITIONS := 1 + +KBUILD_MSG_STYLE := brief + +VBOX_WITH_ORIGIN := +VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox +VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) diff --git a/system/virtualbox-ose/README b/system/virtualbox-ose/README new file mode 100644 index 000000000000..1952e95230ac --- /dev/null +++ b/system/virtualbox-ose/README @@ -0,0 +1,48 @@ +VirtualBox Open Source Edition (OSE) is a general-purpose full +virtualizer for x86 hardware. + +You'll probably want to add the following lines to your rc.local: + + # Start vboxdrv + if [ -x /etc/rc.d/rc.vboxdrv ]; then + /etc/rc.d/rc.vboxdrv start + fi + + # Start vboxnet + if [ -x /etc/rc.d/rc.vboxnet ]; then + /etc/rc.d/rc.vboxnet start + fi + +This will load the support kernel module and will setup the network +configuration for VirtualBox. You should add similar "stop" lines to +your rc.local_shutdown. + +By default you have to create a vboxusers group, for example with + groupadd -g 215 vboxusers +and make your user a member of that group. +Alternatively, you can run the script with VBOXUSERS=no to allow all +users of your system to start virtual machines. + +By default VirtualBox will be compiled with hardening enabled. That +means all binaries will be run suid root, which is the default +behaviour of upstream packages. However, you are still able +to disable this by passing HARDENING=no to the script. +When hardening is enabled, VBOXUSERS is automatically set to yes. + +If the VirtualBox Additions ISO is available in the same directory +as the build script, it will be included in the package and placed +under /usr/share/virtualbox/. Same goes for the UserManual +They can be downloaded from: + http://download.virtualbox.org/virtualbox/2.0.6/VBoxGuestAdditions_2.0.6.iso + http://download.virtualbox.org/virtualbox/2.0.6/UserManual.pdf + +Since 2.0.0 there is a Qt4 GUI, which at this point of time is still a little +bit buggy and therefore disabled by default. To enable it pass QT4=yes +to the script. The Qt3 GUI is enabled by default, though that might +change with the next version as it is no longer maintained and likely +to be removed sometime soon. To disable it, pass QT3=no to the script. + +If you want pulseaudio support, you have to pass PULSE=yes to the +build script. Additionally VirtualBox requires acpica and dev86. The +virtualbox-kernel package is required at runtime. All dependencies +are available from SlackBuilds.org diff --git a/system/virtualbox-ose/VBox.diff b/system/virtualbox-ose/VBox.diff new file mode 100644 index 000000000000..8827eba94988 --- /dev/null +++ b/system/virtualbox-ose/VBox.diff @@ -0,0 +1,12 @@ +--- VBox.sh-orig 2008-08-28 08:33:10.000000000 +0200 ++++ VBox.sh 2008-09-04 20:41:23.653351415 +0200 +@@ -88,6 +88,9 @@ + VirtualBox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; ++ VirtualBox3) ++ exec "$INSTALL_DIR/VirtualBox3" "$@" ++ ;; + VBoxManage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; diff --git a/system/virtualbox-ose/VirtualBox3.desktop b/system/virtualbox-ose/VirtualBox3.desktop new file mode 100644 index 000000000000..49c045fd3930 --- /dev/null +++ b/system/virtualbox-ose/VirtualBox3.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Sun xVM VirtualBox (Qt3) +GenericName=Virtual Machine (Qt3) +Type=Application +Exec=VirtualBox3 +TryExec=VirtualBox3 +DocPath=file://$VBOX_DOC_PATH/UserManual.pdf +Icon=VBox +Categories=Emulator;System;X-MandrivaLinux-System; +Comment=Run several virtual systems on a single host computer +Comment[de]=Windows und andere Betriebssysteme unter Linux ausführen +Comment[sv]=Kör flera virtuella system på en enda värddator +Comment[ko]=가상 머신 diff --git a/system/virtualbox-ose/doinst.sh b/system/virtualbox-ose/doinst.sh new file mode 100644 index 000000000000..478e3d3460a3 --- /dev/null +++ b/system/virtualbox-ose/doinst.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1 +fi + +# Prepare the new configuration files +config etc/vbox/vbox.cfg.new +for file in etc/rc.d/rc.vboxdrv.new etc/rc.d/rc.vboxnet.new ; do + if [ -e $(dirname $file)/$(basename $file .new) -a -x $(dirname $file)/$(basename $file .new) ]; then + chmod 0755 $file + else + chmod 0644 $file + fi + config $file +done + diff --git a/system/virtualbox-ose/slack-desc b/system/virtualbox-ose/slack-desc new file mode 100644 index 000000000000..e664ddbc2ee4 --- /dev/null +++ b/system/virtualbox-ose/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler----------------------------------------------| +virtualbox-ose: virtualbox-ose (x86 Virtualizer) +virtualbox-ose: +virtualbox-ose: VirtualBox Open Source Edition (OSE) is a general-purpose +virtualbox-ose: full virtualizer for x86 hardware. +virtualbox-ose: +virtualbox-ose: Homepage: http://www.virtualbox.org +virtualbox-ose: +virtualbox-ose: +virtualbox-ose: +virtualbox-ose: +virtualbox-ose: diff --git a/system/virtualbox-ose/vbox.cfg b/system/virtualbox-ose/vbox.cfg new file mode 100644 index 000000000000..351a4f1fdf47 --- /dev/null +++ b/system/virtualbox-ose/vbox.cfg @@ -0,0 +1,5 @@ +# VirtualBox installation directory +INSTALL_DIR="/usr/lib/virtualbox" + +# vboxdrv source location +MODULE_SRC="/usr/src"
\ No newline at end of file diff --git a/system/virtualbox-ose/vboxdrv.sh.in.diff b/system/virtualbox-ose/vboxdrv.sh.in.diff new file mode 100644 index 000000000000..1869dc2fdae1 --- /dev/null +++ b/system/virtualbox-ose/vboxdrv.sh.in.diff @@ -0,0 +1,17 @@ +--- vboxdrv.sh.in.orig 2008-05-29 23:13:20.318184008 -0500 ++++ vboxdrv.sh.in 2008-05-29 23:14:03.623677969 -0500 +@@ -175,10 +175,10 @@ + fi + fi + # ensure permissions +- if ! chown :$GROUPNAME $DEVICE 2>/dev/null; then +- rmmod $MODNAME 2>/dev/null +- failure "Cannot change owner $GROUPNAME for device $DEVICE" +- fi ++ #if ! chown :$GROUPNAME $DEVICE 2>/dev/null; then ++ # rmmod $MODNAME 2>/dev/null ++ # failure "Cannot change owner $GROUPNAME for device $DEVICE" ++ #fi + succ_msg + } + diff --git a/system/virtualbox-ose/virtualbox-ose.SlackBuild b/system/virtualbox-ose/virtualbox-ose.SlackBuild new file mode 100644 index 000000000000..90b1faef359f --- /dev/null +++ b/system/virtualbox-ose/virtualbox-ose.SlackBuild @@ -0,0 +1,210 @@ +#!/bin/sh + +# Slackware build script for virtualbox-ose + +# Copyright 2008 Heinz Wiesinger <pprkut@liwjatan.at> +# Copyright 2008 Mauro Giachero <mauro.giachero@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=virtualbox-ose +SRCNAM=VirtualBox +VERSION=2.0.6 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# kmk doesn't support MAKEFLAGS, so we use JOBS here +JOBS=${JOBS:-3} + +# Define Variable Names +GUI="" +qtgui="" + +# Support for the pulseaudio-backend +if [ "${PULSE:-no}" = "no" ]; then + do_pulse="--disable-pulse" +else + do_pulse="" +fi + +# Using the vboxusers-group +VBOXUSERS=${VBOXUSERS:-yes} + +if [ "$VBOXUSERS" = "yes" ]; then + # Check for vboxusers group here + if ! grep ^vboxusers: /etc/group 2>&1 > /dev/null; then + echo " Must have a vboxusers group to run this script." + echo " # groupadd -g 215 vboxusers" + echo " Or something similar." + exit 1 + fi +fi + +# Enable Hardeing - Defaulting to yes as requested by upstream +if [ "${HARDENING:-yes}" = "yes" ]; then + harden="--enable-hardening" + VBOXUSERS="yes" +else + harden="--disable-hardening" +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-${VERSION}-OSE.tar.bz2 +cd $SRCNAM-$VERSION +patch -d src/VBox/Installer/linux -i $CWD/VBox.diff +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# The Innotek init script tries to set the device nodes' permissions. +# This is problematic with VBOXUSERS=no, but you probably still want +# this for security reasons when using the vboxusers-group +if [ "$VBOXUSERS" = "yes" ]; then + GROUP="vboxusers" + MODE="750" + mkdir -p $PKG/etc/udev/rules.d + echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"' \ + > $PKG/etc/udev/rules.d/60-vboxdrv.rules +else + patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh.in.diff + GROUP="root" + MODE="755" + mkdir -p $PKG/etc/udev/rules.d + echo 'KERNEL=="vboxdrv", NAME="vboxdrv", MODE="0666"' \ + > $PKG/etc/udev/rules.d/60-vboxdrv.rules +fi + +# Support for the qt3-frontend +if [ "${QT3:-yes}" = "yes" ]; then + qtgui+=" --with-qt-dir=/usr/lib/qt" + GUI+=" VirtualBox3" + mkdir -p $PKG/usr/share/applications + cp -f $CWD/VirtualBox3.desktop $PKG/usr/share/applications/ + sed -i "s|\$VBOX_DOC_PATH|/usr/share/virtualbox|" \ + $PKG/usr/share/applications/VirtualBox3.desktop +else + qtgui+=" --disable-qt3" +fi + +# Support for the qt4-frontend +if [ "${QT4:-no}" = "no" ]; then + qtgui+=" --disable-qt4" +else + GUI+=" VirtualBox" + mkdir -p $PKG/usr/share/applications + cp -f src/VBox/Installer/linux/VirtualBox.desktop $PKG/usr/share/applications/ + sed -i "s|\$VBOX_DOC_PATH|/usr/share/virtualbox|" \ + $PKG/usr/share/applications/VirtualBox.desktop +fi + +cd src/VBox/Frontends/VirtualBox + sed -i "s/VirtualBox3_QT_TRANSLATIONS/VirtualBox_QT_TRANSLATIONS/" \ + Makefile.kmk +cd - + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --ose \ + $harden \ + $qtgui \ + $do_pulse + +. env.sh + +kmk -j ${JOBS} LOCALCFG=$CWD/LocalConfig.kmk + +mkdir -p $PKG/usr/{lib,share}/virtualbox \ + $PKG/usr/{bin,src} \ + $PKG/usr/share/pixmaps \ + $PKG/etc/{rc.d,vbox} + +cp -f src/VBox/Installer/linux/vboxnet.sh.in $PKG/etc/rc.d/rc.vboxnet.new +cp -f src/VBox/Installer/linux/vboxdrv.sh.in $PKG/etc/rc.d/rc.vboxdrv.new +cp -f $CWD/vbox.cfg $PKG/etc/vbox/vbox.cfg.new +install -m $MODE -g $GROUP src/VBox/Installer/linux/VBoxAddIF.sh $PKG/usr/lib/virtualbox/VBoxTap + +cd out/linux.x86/release/bin/ + rm -f vboxdrv.ko + mv VBox.png $PKG/usr/share/pixmaps/ + mv src $PKG/usr/src/vboxdrv-$VERSION + mv sdk nls* *.tar.gz $PKG/usr/share/virtualbox/ + install -m $MODE -g $GROUP VBoxSysInfo.sh $PKG/usr/share/virtualbox/ + install -m $MODE -g $GROUP VBoxTunctl $PKG/usr/bin/ + rm -f VoxSysInfo.sh VBoxTunctl + mv * $PKG/usr/lib/virtualbox/ + chown -R root:$GROUP $PKG/usr/lib/virtualbox/ + chmod -R $MODE $PKG/usr/lib/virtualbox/ + mv $PKG/usr/lib/virtualbox/VBox.sh $PKG/usr/lib/virtualbox/VBox +cd - + +for i in $GUI VBoxManage VBoxSDL VBoxHeadless VBoxVRDP; do + ln -s /usr/lib/virtualbox/VBox $PKG/usr/bin/$i ; +done + +for i in VBoxAddIF VBoxDeleteIF; do + ln -s /usr/lib/virtualbox/VBoxTap $PKG/usr/bin/$i +done + +ln -s /usr/lib/virtualbox/vditool $PKG/usr/bin/vditool + +if [ "$harden" = "--enable-hardening" ]; then + for i in $GUI VBoxSDL VBoxHeadless; do + chmod 4${MODE} $PKG/usr/lib/virtualbox/$i + done +fi + +if [ -e "$CWD/VBoxGuestAdditions_$VERSION.iso" ]; then + cp -f $CWD/VBoxGuestAdditions_$VERSION.iso \ + $PKG/usr/share/virtualbox/VBoxGuestAdditions.iso +fi + +if [ -e "$CWD/UserManual.pdf" ]; then + cp -f $CWD/UserManual.pdf \ + $PKG/usr/share/virtualbox/UserManual.pdf +fi + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -f COPYING COPYING.CDDL $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/system/virtualbox-ose/virtualbox-ose.info b/system/virtualbox-ose/virtualbox-ose.info new file mode 100644 index 000000000000..b2cfe916b64e --- /dev/null +++ b/system/virtualbox-ose/virtualbox-ose.info @@ -0,0 +1,8 @@ +PRGNAM="virtualbox-ose" +VERSION="2.0.6" +HOMEPAGE="http://www.virtualbox.org" +DOWNLOAD="http://download.virtualbox.org/virtualbox/2.0.6/VirtualBox-2.0.6-OSE.tar.bz2" +MD5SUM="455253532b5128bb5c2ff4c76b9751a7" +MAINTAINER="ppr:kut" +EMAIL="pprkut@liwjatan.at" +APPROVED="dsomero" |