From 627bfef943cc67c9bd6ecc548fbc52f654a8fa06 Mon Sep 17 00:00:00 2001 From: geos_one Date: Tue, 10 Mar 2009 20:03:45 +0000 Subject: [PATCH] add virtualbox git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@850 6952d904-891a-0410-993b-d76249ca496b --- app-emulation/virtualbox-bin/ChangeLog | 268 ++++++++++++++++++ app-emulation/virtualbox-bin/Manifest | 13 + .../virtualbox-bin/files/vboxwebsrv-confd | 18 ++ .../virtualbox-bin/files/vboxwebsrv-initd | 24 ++ .../files/virtualbox-bin-1-wrapper | 131 +++++++++ .../files/virtualbox-bin-2-wrapper | 103 +++++++ .../files/virtualbox-bin-config | 1 + .../files/virtualbox-bin-interfaces | 4 + .../files/virtualbox-bin.desktop | 8 + app-emulation/virtualbox-bin/metadata.xml | 20 ++ .../virtualbox-bin-2.1.4.ebuild | 171 +++++++++++ 11 files changed, 761 insertions(+) create mode 100644 app-emulation/virtualbox-bin/ChangeLog create mode 100644 app-emulation/virtualbox-bin/Manifest create mode 100644 app-emulation/virtualbox-bin/files/vboxwebsrv-confd create mode 100644 app-emulation/virtualbox-bin/files/vboxwebsrv-initd create mode 100644 app-emulation/virtualbox-bin/files/virtualbox-bin-1-wrapper create mode 100755 app-emulation/virtualbox-bin/files/virtualbox-bin-2-wrapper create mode 100644 app-emulation/virtualbox-bin/files/virtualbox-bin-config create mode 100644 app-emulation/virtualbox-bin/files/virtualbox-bin-interfaces create mode 100644 app-emulation/virtualbox-bin/files/virtualbox-bin.desktop create mode 100644 app-emulation/virtualbox-bin/metadata.xml create mode 100644 app-emulation/virtualbox-bin/virtualbox-bin-2.1.4.ebuild diff --git a/app-emulation/virtualbox-bin/ChangeLog b/app-emulation/virtualbox-bin/ChangeLog new file mode 100644 index 00000000..510afaef --- /dev/null +++ b/app-emulation/virtualbox-bin/ChangeLog @@ -0,0 +1,268 @@ +# ChangeLog for app-emulation/virtualbox-bin +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/ChangeLog,v 1.39 2008/12/18 12:26:04 flameeyes Exp $ + + 20 Feb 2009; Alessio Cassibba (X-Drum) + files/virtualbox-bin-2-wrapper, virtualbox-bin-2.1.2.ebuild, + virtualbox-bin-2.1.4.ebuild, +virtualbox-bin-2.1.4.ebuild: + Version bump; fix duplicated EOF in virtualbox-bin-2-wrapper + thanks to Torbjörn Svensson bug #259629; fix permissions on + some binaries bug #260326 + + 23 Jan 2009; Alessio Cassibba (X-Drum) + -virtualbox-bin-2.0.4.ebuild, -virtualbox-bin-2.0.6.ebuild, + virtualbox-bin-1.6.6.ebuild, +virtualbox-bin-2.1.2.ebuild: + Version bump; drop old VBoxAddIF,VBoxDeleteIF scripts; drop old + /etc/vbox/interfaces file; prettify pkg_nofetch, use + x11-libs/libXft instead of virtual/xft (old virtual now masked); + use sys-libs/libstdc++-v3 in place of virtual/libstdc++ bug #252154; + drop old releases; switch to EAPI=2 + + 04 Jan 2009; Ulrich Mueller virtualbox-bin-1.6.6.ebuild, + virtualbox-bin-2.0.2.ebuild, virtualbox-bin-2.0.4.ebuild, + virtualbox-bin-2.0.6.ebuild: + Change virtual/xft dependency to x11-libs/libXft, bug 253771. + + 18 Dec 2008; Diego E. Pettenò + files/vboxwebsrv-initd: + Commit initd fixes from Alessio. + + 25 Nov 2008; Alessio Cassibba (X-Drum) + -virtualbox-bin-2.0.2.ebuild, metadata.xml: + add chm USE flag to enable the online help (using the shipped + kchmviewer binary); drop version 2.0.2; + + 10 Nov 2008; Alessio Cassibba (X-Drum) + files/vboxwebsrv-initd, virtualbox-bin-1.6.6.ebuild, + virtualbox-bin-2.0.2.ebuild, virtualbox-bin-2.0.4.ebuild: + fix desktop icon, update vboxwebsrv initd + +*virtualbox-bin-2.0.6 (29 Nov 2008) + + 29 Nov 2008; Mike Frysinger + +virtualbox-bin-2.0.6.ebuild: + Version bump for Alessio Cassibba #248776 by Rodrigo Severo. + + 03 Nov 2008; Mike Frysinger + virtualbox-bin-1.6.6.ebuild: + Make sure 1.6.6 is marked stable. + +*virtualbox-bin-2.0.4 (27 Oct 2008) + + 27 Oct 2008; Markus Ullmann + +files/virtualbox-bin-1-wrapper, -files/virtualbox-bin-2.0.2-wrapper, + +files/virtualbox-bin-2-wrapper, files/virtualbox-bin.desktop, + -files/virtualbox-bin-wrapper, -virtualbox-bin-1.6.4.ebuild, + virtualbox-bin-1.6.6.ebuild, virtualbox-bin-2.0.2.ebuild, + +virtualbox-bin-2.0.4.ebuild: + (Proxy commit) Version bump + + 25 Oct 2008; Alessio Cassibba (X-Drum) + -virtualbox-bin-1.6.4.ebuild, virtualbox-bin-1.6.6.ebuild, + +files/virtualbox-bin-1-wrapper, virtualbox-bin-2.0.2.ebuild, + -files/virtualbox-bin-2.0.2-wrapper, +virtualbox-bin-2.0.4.ebuild, + +files/virtualbox-bin-2-wrapper, files/virtualbox-bin.desktop, + -files/virtualbox-bin-wrapper: + -m Version Bump; drop version 1.6.4 + +*virtualbox-bin-2.0.2 (15 Sep 2008) + + 15 Sep 2008; Markus Ullmann + +files/virtualbox-bin-2.0.2-wrapper, virtualbox-bin-1.6.4.ebuild, + virtualbox-bin-1.6.6.ebuild, +virtualbox-bin-2.0.2.ebuild: + (Proxy-Commit) Port from dev overlay + + 13 Sep 2008; Alessio Cassibba (X-Drum) + virtualbox-bin-1.6.4.ebuild, virtualbox-bin-1.6.6.ebuild, + +virtualbox-bin-2.0.2.ebuild, +virtualbox-bin-2.0.2-wrapper: + Version bump: add support for the new sdk, add new wrapper for 2.x release, + add dev-libs/glib to RDEPEND, drop qt3 from USE and RDEPEND, set starters + suid (VirtualBox,VBoxSDL,VBoxHeadless) due new hardening system, restrict + old versions downloads due: http://www.virtualbox.org/ticket/2148 + +*virtualbox-bin-1.6.6 (06 Sep 2008) + + 06 Sep 2008; Markus Ullmann + files/virtualbox-bin-wrapper, metadata.xml, -virtualbox-bin-1.5.6.ebuild, + virtualbox-bin-1.6.4.ebuild, +virtualbox-bin-1.6.6.ebuild: + Port from dev overlay + + 03 Sep 2008; Alessio Cassibba (X-Drum) + -virtualbox-bin-1.5.6.ebuild, virtualbox-bin-1.6.4.ebuild, + +virtualbox-bin-1.6.6.ebuild, files/virtualbox-bin-wrapper, + metadata.xml: + Version bump; remove USE flag chm in metadata.xml; disable logging via + wrapper in 1.6.4 only; fix SRC_URI and set RESTRICT to primaryuri (PUEL + downloads available again on virtualbox.org); readd check_license for PUEL; + drop old 1.5.x version + + 27 Aug 2008; Markus Ullmann + virtualbox-bin-1.6.4.ebuild: + Enable additions by default wrt bug #235889 + + 27 Aug 2008; Markus Ullmann + virtualbox-bin-1.6.4.ebuild: + Stable on x86 and amd64 + + 27 Aug 2008; Markus Ullmann + -virtualbox-bin-1.5.2-r1.ebuild, -virtualbox-bin-1.5.4.ebuild, + virtualbox-bin-1.5.6.ebuild, -virtualbox-bin-1.6.2.ebuild, + virtualbox-bin-1.6.4.ebuild: + Modify blockers for renaming + +*virtualbox-bin-1.6.4 (10 Aug 2008) + + 10 Aug 2008; Markus Ullmann files/vboxwebsrv-confd, + files/vboxwebsrv-initd, files/virtualbox-bin-wrapper, + +virtualbox-bin-1.6.4.ebuild: + Add version bump and some improvements from SpanKY wrt bug #233683 + + 29 Jul 2008; Mike Frysinger + virtualbox-bin-1.6.2.ebuild: + Use unpack_makeself instead of executing the script (and bundled static + binaries) and cleanup ebuild style. + + 28 Jul 2008; Doug Goldstein metadata.xml: + add GLEP 56 USE flag desc from use.local.desc + + 27 Jul 2008; Carsten Lohrke + virtualbox-bin-1.5.2-r1.ebuild, virtualbox-bin-1.5.4.ebuild, + virtualbox-bin-1.5.6.ebuild, virtualbox-bin-1.6.2.ebuild: + QA: Get rid of deprecated qt_min_version(). + +*virtualbox-bin-1.6.2 (13 Jun 2008) + + 13 Jun 2008; Doug Goldstein +files/vboxwebsrv-confd, + +files/vboxwebsrv-initd, files/virtualbox-bin.desktop, + files/virtualbox-bin-wrapper, +virtualbox-bin-1.6.2.ebuild: + copy changes from jokey's overlay to the tree as jokey requested + + 14 May 2008; Peter Volkov virtualbox-bin-1.5.4.ebuild, + virtualbox-bin-1.5.6.ebuild: + Updated deps: app-doc/kchmviewer moved to app-text/kchmviewer, bug + #220741. + + 02 May 2008; Tristan Heaven virtualbox-bin-1.5.6.ebuild: + Fix virtualbox-modules dependency so 1.5.7 can be installed, bug #218198 + + 06 Mar 2008; Christoph Mende + virtualbox-bin-1.5.4.ebuild: + Stable on amd64, bug #208905 + + 04 Mar 2008; Markus Ullmann + virtualbox-bin-1.5.4.ebuild: + Stable on x86 wrt bug #208905 + +*virtualbox-bin-1.5.6 (25 Feb 2008) + + 25 Feb 2008; Diego Pettenò + +virtualbox-bin-1.5.6.ebuild: + Version bump, as requested by the proxy-maintainer Alessio Cassibba. + +*virtualbox-bin-1.5.4 (05 Jan 2008) + + 05 Jan 2008; Markus Ullmann + +files/virtualbox-bin.desktop, +virtualbox-bin-1.5.4.ebuild: + Version bump wrt bug #203893 thanks to x-drum + + 03 Nov 2007; Markus Ullmann + files/virtualbox-bin-wrapper, -virtualbox-bin-1.4.0.ebuild, + -virtualbox-bin-1.5.2.ebuild, +virtualbox-bin-1.5.2-r1.ebuild: + Some minor cosmetics in the wrapper, fix desktop entry + + 29 Oct 2007; Markus Meier virtualbox-bin-1.5.2.ebuild: + x86 stable + + 22 Oct 2007; Markus Ullmann + +files/virtualbox-bin-config, +files/virtualbox-bin-interfaces, + files/virtualbox-bin-wrapper, -virtualbox-bin-1.4.0-r1.ebuild, + -virtualbox-bin-1.5.0-r1.ebuild: + Drop old and add new-style wrapper + +*virtualbox-bin-1.5.2 (22 Oct 2007) + + 22 Oct 2007; Markus Ullmann + +virtualbox-bin-1.5.2.ebuild: + Version bump wrt bug #196424 thanks to Alessio for the ebuilds + + 07 Oct 2007; Markus Ullmann + files/virtualbox-bin-wrapper, virtualbox-bin-1.5.0-r1.ebuild: + add blockers for virtualbox-additions bug #194183, thanks to Alessio + +*virtualbox-bin-1.5.0-r1 (17 Sep 2007) + + 17 Sep 2007; Markus Ullmann + -virtualbox-bin-1.5.0.ebuild, +virtualbox-bin-1.5.0-r1.ebuild: + Revbump to fix HAL mess, bug #191473 + +*virtualbox-bin-1.5.0 (04 Sep 2007) + + 04 Sep 2007; Markus Ullmann + -virtualbox-bin-1.3.8-r1.ebuild, +virtualbox-bin-1.5.0.ebuild: + Version bump wrt bug #191142 + + 23 Jun 2007; Charlie Shepherd + virtualbox-bin-1.3.8-r1.ebuild, virtualbox-bin-1.4.0.ebuild, + virtualbox-bin-1.4.0-r1.ebuild: + Fix headers, thanks to x-drum + +*virtualbox-bin-1.4.0-r1 (22 Jun 2007) + + 22 Jun 2007; Charlie Shepherd + virtualbox-bin-1.4.0.ebuild, +virtualbox-bin-1.4.0-r1.ebuild: + Port changes from jokey's overlay; thanks to x-drum: minor changes to + desktop entry; libstdc++-3.3 is only needed for x86 binaries, adjusted perms + for executables, removed unneeded files; fixed SRC_URI (bug 181161) + +*virtualbox-bin-1.4.0 (06 Jun 2007) + + 06 Jun 2007; Markus Ullmann + +virtualbox-bin-1.4.0.ebuild: + Version bump, thanks to Alessio + + 13 May 2007; Markus Ullmann + virtualbox-bin-1.3.8-r1.ebuild: + Fix for sdl useflag bug #177335 + + 21 Apr 2007; Raùl Porcel + virtualbox-bin-1.3.8-r1.ebuild: + x86 stable + +*virtualbox-bin-1.3.8-r1 (21 Apr 2007) + + 21 Apr 2007; Markus Ullmann + -virtualbox-bin-1.3.6.ebuild, -virtualbox-bin-1.3.8.ebuild, + +virtualbox-bin-1.3.8-r1.ebuild: + PaXify bins to make hardened people happy + +*virtualbox-bin-1.3.8 (16 Mar 2007) + + 16 Mar 2007; Markus Ullmann + -files/virtualbox-bin-1.3.6-wrapper, +files/virtualbox-bin-wrapper, + -virtualbox-bin-1.3.4.ebuild, virtualbox-bin-1.3.6.ebuild, + +virtualbox-bin-1.3.8.ebuild: + Version bump + + 03 Mar 2007; Markus Ullmann + files/digest-virtualbox-bin-1.3.6, Manifest: + Better checksums + +*virtualbox-bin-1.3.6 (28 Feb 2007) + + 28 Feb 2007; Markus Ullmann + +files/virtualbox-bin-1.3.6-wrapper, +virtualbox-bin-1.3.6.ebuild: + Version bump, thanks to x-drum for the hard work + + 25 Feb 2007; virtualbox-bin-1.3.4.ebuild: + use KV_DIR only after linux-mod_pkg_setup, bug 168051 + + 16 Feb 2007; Markus Ullmann + virtualbox-bin-1.3.4.ebuild: + Fix ROOT + +*virtualbox-bin-1.3.4 (15 Feb 2007) + + 15 Feb 2007; Markus Ullmann +metadata.xml, + +virtualbox-bin-1.3.4.ebuild: + Initial version, thanks to Alessio Cassibba + diff --git a/app-emulation/virtualbox-bin/Manifest b/app-emulation/virtualbox-bin/Manifest new file mode 100644 index 00000000..39455fbc --- /dev/null +++ b/app-emulation/virtualbox-bin/Manifest @@ -0,0 +1,13 @@ +AUX vboxwebsrv-confd 620 RMD160 7a4ecbd895da0d5851f1a3afda54b3e2bb4012e1 SHA1 651f7b2588a16317f59d692e087b347aadd20aab SHA256 5ea07fcb6e5253cd013bb0277603cba17ca45d96044740172987c0b452f4324a +AUX vboxwebsrv-initd 750 RMD160 99420847222c53d114cc0aceff1135d5b8a248fb SHA1 5af0a03611d2547f2e2134ebfc3490d514ef9685 SHA256 aa02b27c05225c7f7f9db74e039489ee637c1207d6a7af7d72cc3a010642b622 +AUX virtualbox-bin-1-wrapper 3777 RMD160 a10ee6e556aad8dfcc274924d010eed97fb6952f SHA1 70f772874eddfe08b03d3b4b040cbc6a3262c20f SHA256 60730674076edb6a863f52babb6ba716a36b9f50a12d6509b62c112e649e450c +AUX virtualbox-bin-2-wrapper 2813 RMD160 2d05512fa94abfb034f1f6eec6bb207af020df45 SHA1 c2dbe19e5ab603378d6b1c72dc4b02fe4368a3e1 SHA256 ad91be6fc1753dc686e9f9774fd91101e7fd15e064af5419d5fd0769f3434e8b +AUX virtualbox-bin-config 28 RMD160 c03986f0a6ecc77c2d15382d965952bb209ae534 SHA1 43b5fd213ae08bb390ec1962ee2776d4f7fe45fd SHA256 5326f7abdd1a7c8a8a44fd4ab269977ec115286059fc8a4c2fde6805c381236f +AUX virtualbox-bin-interfaces 218 RMD160 4639b9848cf44ac59cd12585a3c56ef53d72a6d9 SHA1 3268e5759286bdff1c5242598266e6c2a5b17e5d SHA256 50ddbfedce3afd41aad45163eb799fce0956d815948ad9da842f09163aaafd52 +AUX virtualbox-bin.desktop 202 RMD160 ca4dc96cac241a8bf255e01ce6acfea7b98c47ab SHA1 b566c0e4efbfcc0fb4a7887390d211ab282586b5 SHA256 6c5101e7091b51764c0130a8a878ce059c7725fdae6b5c42a7d5cbb31fd96a3e +DIST VirtualBox-2.1.4-43001-Linux_amd64.run 38900311 RMD160 c0422ab86a7489d176373960ab40a4aefd2ab08d SHA1 f6d12edbc408907af8115483ce50821119a34a34 SHA256 2c02abc3e17531689806588c17fe6e1b68134ff53c1f089784c4574d9dfc3b4b +DIST VirtualBox-2.1.4-43001-Linux_x86.run 38951506 RMD160 63cbaa4d0cf05ac114c004fa20333db52d9d6a26 SHA1 5c9cf8ee45f8f7cd0eb503666c0294c4ffdfd46a SHA256 a241515a7f0252701eb700c7b9168aa4b5148c55a79475e0dd8edecc8531e753 +DIST VirtualBoxSDK-2.1.4-42893.zip 7027346 RMD160 fb04aa01fb8f0bdc291bd3495c7e37c9e23a67b5 SHA1 63c7290e4efe1e5310f73f5b6872f10bdcb288a3 SHA256 10c7dd59b5e86e09b2b56d0872514fbe601d1d82e7e1fa847b8aa95657a1c64a +EBUILD virtualbox-bin-2.1.4.ebuild 4714 RMD160 45b471285163b368bbdd5a98238459001152c773 SHA1 f20668c0644400cc6fde1d3f416daecf4bd79839 SHA256 4690ce77e773e3edd476478838bce10a1993059304a72c6180e46fd450fffabd +MISC ChangeLog 10375 RMD160 554b3d35771009628b506fc876644dd38e95b34a SHA1 7e0a70fa154f8e636b7270d43adea82096e6b9c1 SHA256 0e0efbeaffaa0d194794cf09fc3aaa0f48aa1c70217f87363d33f4f72518484c +MISC metadata.xml 692 RMD160 bd100896b73d952e89bdeda736d25b152c3a73f3 SHA1 f4fb4965fed9ff2468a27a56fe73f0ec23b6a9a0 SHA256 ba708f6a2506cb9762fbabb0f4096bb41fe330e85e219949fe6fa84488a2090b diff --git a/app-emulation/virtualbox-bin/files/vboxwebsrv-confd b/app-emulation/virtualbox-bin/files/vboxwebsrv-confd new file mode 100644 index 00000000..5ca18d55 --- /dev/null +++ b/app-emulation/virtualbox-bin/files/vboxwebsrv-confd @@ -0,0 +1,18 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/files/vboxwebsrv-confd,v 1.2 2008/08/10 14:38:45 jokey Exp $ + +# The host to bind to (defaults to "localhost"). +VBOXWEBSRV_HOST="localhost" + +# Which port to on the host (defaults to 18083). +VBOXWEBSRV_PORT="18083" + +# Session timeout, in seconds. (defaults to 20). +VBOXWEBSRV_TIMEOUT=20 + +# The interval in which the webservice checks for +# timed-out clients, in seconds. Normally does not +# need to be changed (defaults to 5). +VBOXWEBSRV_INTERVAL=5 + diff --git a/app-emulation/virtualbox-bin/files/vboxwebsrv-initd b/app-emulation/virtualbox-bin/files/vboxwebsrv-initd new file mode 100644 index 00000000..00be7e4f --- /dev/null +++ b/app-emulation/virtualbox-bin/files/vboxwebsrv-initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/files/vboxwebsrv-initd,v 1.3 2008/12/18 12:26:04 flameeyes Exp $ + +depend() { + need net +} + +start() { + #checkconfig || return $? + + ebegin "Starting VirtualBox WebService" + start-stop-daemon --start --quiet --pidfile /var/run/vboxwebsrv.pid \ + --background --make-pidfile --exec /usr/bin/vboxwebsrv \ + -- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL} + eend $? +} + +stop() { + ebegin "Stopping VirtualBox WebService" + start-stop-daemon --stop --quiet --pidfile /var/run/vboxwebsrv.pid + eend $? +} diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin-1-wrapper b/app-emulation/virtualbox-bin/files/virtualbox-bin-1-wrapper new file mode 100644 index 00000000..3dbfce6a --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-1-wrapper @@ -0,0 +1,131 @@ +#!/bin/sh +# +# Sun xVM VirtualBox +# +# Copyright (C) 2006-2007 Sun Microsystems, Inc. +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa +# Clara, CA 95054 USA or visit http://www.sun.com if you need +# additional information or have any questions. +# + +PATH="/usr/bin:/bin:/usr/sbin:/sbin" +CONFIG="/etc/vbox/vbox.cfg" + +if [ ! -r "$CONFIG" ]; then + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 +fi + +. "$CONFIG" + +# Note: This script must not fail if the module was not successfully installed +# because the user might not want to run a VM but only change VM params! + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +elif [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then + cat << EOF +WARNING: There is no module available for the current kernel (`uname -r`). + Please recompile the kernel module and install it by: + + sudo emerge -1 app-emulation/virtualbox-modules + + You will not be able to start VMs until this problem is fixed. +EOF +elif ! lsmod|grep -q vboxdrv; then + cat << EOF +WARNING: The vboxdrv kernel module is not loaded. + Please load the kernel module by: + + sudo modprobe vboxdrv + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -c /dev/vboxdrv ]; then + cat << EOF +WARNING: The character device /dev/vboxdrv does not exist. + Please try to reload the kernel module by: + + sudo rmmod vboxdrv; sleep 2; sudo modprobe vboxdrv + + and if that is not successful, try to re-install the package by: + + sudo emerge -1 app-emulation/virtualbox-modules + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -w /dev/vboxdrv ]; then + if [ "`id | grep vboxusers`" = "" ]; then + cat << EOF +WARNING: You are not a member of the "vboxusers" group. + Please add yourself to this group before starting VirtualBox. + + You will not be able to start VMs until this problem is fixed. +EOF + else + cat << EOF +WARNING: /dev/vboxdrv not writable for some reason. + If you recently added the current user to the "vboxusers" group + then you have to logout and re-login to take the change effect. + + You will not be able to start VMs until this problem is fixed. +EOF + fi +fi + +export LD_LIBRARY_PATH="$INSTALL_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` +if [ -z "$SERVER_PID" ]; then + # Server not running yet/anymore, cleanup socket path. + # See IPC_GetDefaultSocketPath()! + if [ -n "$LOGNAME" ]; then + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 + else + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 + fi +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ -n "$SERVER_PID" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=`which $0` +APP=`basename $APP` +APP=${APP##/*/} +case "$APP" in + VirtualBox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VBoxManage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxHeadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + *) + echo "Unknown application - $APP" + ;; +esac diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin-2-wrapper b/app-emulation/virtualbox-bin/files/virtualbox-bin-2-wrapper new file mode 100755 index 00000000..edf4e257 --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-2-wrapper @@ -0,0 +1,103 @@ +#!/bin/sh +# +# Sun xVM VirtualBox +# +# Copyright (C) 2006-2007 Sun Microsystems, Inc. +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa +# Clara, CA 95054 USA or visit http://www.sun.com if you need +# additional information or have any questions. +# + +PATH="/usr/bin:/bin:/usr/sbin:/sbin" +CONFIG="/etc/vbox/vbox.cfg" + +if [ ! -r "$CONFIG" ]; then + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 +fi + +. "$CONFIG" + +# Note: This script must not fail if the module was not successfully installed +# because the user might not want to run a VM but only change VM params! + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +elif ! lsmod|grep -q vboxdrv; then + cat << EOF +WARNING: The vboxdrv kernel module is not loaded. + Please load the kernel module by: + + sudo modprobe vboxdrv + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -c /dev/vboxdrv ]; then + cat << EOF +WARNING: The character device /dev/vboxdrv does not exist. + Please try to reload the kernel module by: + + sudo rmmod vboxdrv; sleep 2; sudo modprobe vboxdrv + + and if that is not successful, try to re-install the package by: + + sudo emerge -1 app-emulation/virtualbox-modules + + You will not be able to start VMs until this problem is fixed. +EOF +fi + +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` +if [ -z "$SERVER_PID" ]; then + # Server not running yet/anymore, cleanup socket path. + # See IPC_GetDefaultSocketPath()! + if [ -n "$LOGNAME" ]; then + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 + else + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 + fi +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ -n "$SERVER_PID" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=`which $0` +APP=`basename $APP` +APP=${APP##/*/} +case "$APP" in + VirtualBox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VBoxManage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxHeadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + *) + echo "Unknown application - $APP" + ;; +esac diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin-config b/app-emulation/virtualbox-bin/files/virtualbox-bin-config new file mode 100644 index 00000000..f69e73e2 --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-config @@ -0,0 +1 @@ +INSTALL_DIR=/opt/VirtualBox diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin-interfaces b/app-emulation/virtualbox-bin/files/virtualbox-bin-interfaces new file mode 100644 index 00000000..ce2606b9 --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-interfaces @@ -0,0 +1,4 @@ +# This file is for registering VirtualBox permanent host networking interfaces +# and optionally adding them to network bridges on the host. +# Each line should be of the format []. + diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin.desktop b/app-emulation/virtualbox-bin/files/virtualbox-bin.desktop new file mode 100644 index 00000000..a9b7ee1c --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Sun xVM VirtualBox +Type=Application +Comment=Run several virtual systems on a single host computer +Exec=VirtualBox +TryExec=VirtualBox +Icon=virtualbox-bin +Categories=System;Emulator; diff --git a/app-emulation/virtualbox-bin/metadata.xml b/app-emulation/virtualbox-bin/metadata.xml new file mode 100644 index 00000000..7625a2d9 --- /dev/null +++ b/app-emulation/virtualbox-bin/metadata.xml @@ -0,0 +1,20 @@ + + + +no-herd + + jokey@gentoo.org + Markus Ullmann + + + swapon@gmail.com + Alessio Cassibba + + + Install Guest System Tools ISO + Install kchmviewer binary to enable online help (in MS CHM format) + Install without any graphic frontend + Enable building of SDK + Install the VirtualBox webservice + + diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-2.1.4.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-2.1.4.ebuild new file mode 100644 index 00000000..a607d44d --- /dev/null +++ b/app-emulation/virtualbox-bin/virtualbox-bin-2.1.4.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 + +inherit eutils fdo-mime pax-utils + +MY_PV=${PV}-43001 +MY_PV_SDK=${PV}-42893 +MY_P=VirtualBox-${MY_PV}-Linux + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise as well as home use" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="amd64? ( http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_amd64.run ) + x86? ( http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_x86.run ) + sdk? ( http://download.virtualbox.org/virtualbox/${PV}/VirtualBoxSDK-${MY_PV_SDK}.zip )" + +LICENSE="PUEL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+additions +chm headless sdk vboxwebsrv" + +RDEPEND="!!app-emulation/virtualbox-ose + !app-emulation/virtualbox-ose-additions + ~app-emulation/virtualbox-modules-${PV} + !headless? ( + x11-libs/libXcursor + media-libs/libsdl[X] + x11-libs/libXrender + x11-libs/libXfixes + media-libs/libmng + media-libs/jpeg + media-libs/libpng + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXinerama + x11-libs/libXft + media-libs/freetype + media-libs/fontconfig + x11-libs/libXext + dev-libs/glib + chm? ( dev-libs/expat ) + ) + x11-libs/libXt + dev-libs/libxml2 + x11-libs/libXau + x11-libs/libX11 + x11-libs/libSM + x11-libs/libICE + x11-libs/libXdmcp + sys-apps/usermode-utilities + net-misc/bridge-utils + x86? ( sys-libs/libstdc++-v3 )" + +S=${WORKDIR} + +src_unpack() { + unpack_makeself ${MY_P}_${ARCH}.run + unpack ./VirtualBox.tar.bz2 + + if use sdk; then + unpack VirtualBoxSDK-${MY_PV_SDK}.zip + fi +} + +src_install() { + # create virtualbox configurations files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-config" vbox.cfg + + if ! use headless ; then + newicon VBox.png ${PN}.png + newmenu "${FILESDIR}"/${PN}.desktop ${PN}.desktop + fi + + insinto /opt/VirtualBox + + doins UserManual.pdf + + if use sdk ; then + doins -r sdk || die + fi + + if use additions; then + doins -r additions || die + fi + + if use vboxwebsrv; then + doins vboxwebsrv || die + fowners root:vboxusers /opt/VirtualBox/vboxwebsrv + fperms 0750 /opt/VirtualBox/vboxwebsrv + dosym /opt/VirtualBox/VBox.sh /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi + + if ! use headless && use chm; then + doins kchmviewer VirtualBox.chm || die + fowners root:vboxusers /opt/VirtualBox/kchmviewer + fperms 0750 /opt/VirtualBox/kchmviewer + fi + + rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \ + vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \ + VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \ + webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \ + 90-vbox-usb.fdi + + if use headless ; then + rm -rf VBoxSDL VirtualBox VBoxKeyboard.so + fi + + doins -r * || die + + # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid) + dosym /opt/VirtualBox/VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so + dosym /opt/VirtualBox/VBoxREM.so /opt/VirtualBox/components/VBoxREM.so + dosym /opt/VirtualBox/VBoxRT.so /opt/VirtualBox/components/VBoxRT.so + dosym /opt/VirtualBox/VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so + dosym /opt/VirtualBox/VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so + + local each + for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl}; do + fowners root:vboxusers /opt/VirtualBox/${each} + fperms 0750 /opt/VirtualBox/${each} + pax-mark -m "${D}"/opt/VirtualBox/${each} + done + + if ! use headless ; then + # Hardened build: Mark selected binaries set-user-ID-on-execution + for each in VBox{SDL,Headless} VirtualBox; do + fowners root:vboxusers /opt/VirtualBox/${each} + fperms 4510 /opt/VirtualBox/${each} + pax-mark -m "${D}"/opt/VirtualBox/${each} + done + + dosym /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox + dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL + else + # Hardened build: Mark selected binaries set-user-ID-on-execution + fowners root:vboxusers /opt/VirtualBox/VBoxHeadless + fperms 4510 /opt/VirtualBox/VBoxHeadless + pax-mark -m "${D}"/opt/VirtualBox/VBoxHeadless + fi + + exeinto /opt/VirtualBox + newexe "${FILESDIR}/${PN}-2-wrapper" "VBox.sh" || die + fowners root:vboxusers /opt/VirtualBox/VBox.sh + fperms 0750 /opt/VirtualBox/VBox.sh + + dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage + dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxVRDP + dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless + dosym /opt/VirtualBox/VBoxTunctl /usr/bin/VBoxTunctl +} + +pkg_postinst() { + fdo-mime_desktop_database_update + elog "" + if ! use headless ; then + elog "To launch VirtualBox just type: \"VirtualBox\"" + elog "" + fi + elog "You must be in the vboxusers group to use VirtualBox." + elog "" +} + +pkg_postrm() { + fdo-mime_desktop_database_update +}