From 5d690724ef5a71960dc43582093c7d5360928aa7 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Jul 2009 18:12:54 +0200 Subject: [PATCH] added virtualbox-bin-3.0.2 and modules --- app-emulation/virtualbox-bin/Manifest | 11 ++ .../virtualbox-bin/files/vboxwebsrv-confd | 18 +++ .../virtualbox-bin/files/vboxwebsrv-initd | 24 +++ .../virtualbox-bin/files/virtualbox-bin-1-wrapper | 131 +++++++++++++++ .../virtualbox-bin/files/virtualbox-bin-2-wrapper | 104 ++++++++++++ .../virtualbox-bin/files/virtualbox-bin-config | 1 + .../virtualbox-bin/files/virtualbox-bin-interfaces | 4 + .../virtualbox-bin/files/virtualbox-bin.desktop | 8 + .../virtualbox-bin/virtualbox-bin-3.0.2.ebuild | 175 +++++++++++++++++++++ app-emulation/virtualbox-modules/Manifest | 4 + .../files/virtualbox-modules-1.6.6_2.6.27.patch | 79 ++++++++++ .../files/virtualbox-modules-2.6.29_rc.patch | 11 ++ .../virtualbox-modules-3.0.2.ebuild | 57 +++++++ 13 files changed, 627 insertions(+) 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/virtualbox-bin-3.0.2.ebuild create mode 100644 app-emulation/virtualbox-modules/Manifest create mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch create mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.29_rc.patch create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-3.0.2.ebuild diff --git a/app-emulation/virtualbox-bin/Manifest b/app-emulation/virtualbox-bin/Manifest new file mode 100644 index 0000000..11a0498 --- /dev/null +++ b/app-emulation/virtualbox-bin/Manifest @@ -0,0 +1,11 @@ +AUX vboxwebsrv-confd 620 RMD160 7a4ecbd895da0d5851f1a3afda54b3e2bb4012e1 SHA1 651f7b2588a16317f59d692e087b347aadd20aab SHA256 5ea07fcb6e5253cd013bb0277603cba17ca45d96044740172987c0b452f4324a +AUX vboxwebsrv-initd 748 RMD160 714ba5778727150d64f6bc70ec831be8a0fa72bc SHA1 ca1af9377bce8ce9cc1d4f309bbd188f10e5e5a2 SHA256 97332772dc1a308b0884d9a832805c0791f7c66b193624e52a0212fc8a1ef9af +AUX virtualbox-bin-1-wrapper 3777 RMD160 a10ee6e556aad8dfcc274924d010eed97fb6952f SHA1 70f772874eddfe08b03d3b4b040cbc6a3262c20f SHA256 60730674076edb6a863f52babb6ba716a36b9f50a12d6509b62c112e649e450c +AUX virtualbox-bin-2-wrapper 2817 RMD160 2ea61c910c7c7e9f0cc9216857caa218fd6a520e SHA1 ccc25be7aed293958b5fd9a2bed13292153eb91e SHA256 bf448005452b04bcc4aa8fe351a7a0f147bbbc8f379540cb5ec2b0991f418556 +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-3.0.2-49928-Linux_amd64.run 49827281 RMD160 b028ad506229dfa609ccaed141e9d4511e1c9211 SHA1 9ae4373f00962cc69802078d8b6efc7f69290fb0 SHA256 87b821028d2206fe5ed7e26c548aca49971df2ededba293a8e9dc27be241cc9d +DIST VirtualBox-3.0.2-49928-Linux_x86.run 49837517 RMD160 45994dc163de05c60de561974918357d60f6d8e4 SHA1 b8f6fefb7058ec93acf618939b9a8f2ad007ef25 SHA256 16178bb2be1735be7cef9e938aa1a8221ada6d1e2f6c76f7298b2a4da5bebfff +DIST VirtualBoxSDK-3.0.2-49928.zip 8132531 RMD160 4a09a3907e8164ab751c6e5cde133dfa24026af5 SHA1 7388da68cf64f6f074b58227d570d319a7ddc423 SHA256 a93adfbab6ff0120aed06b6b68ebe1a052ce00247f146efaa9aa34c26ec74118 +EBUILD virtualbox-bin-3.0.2.ebuild 4960 RMD160 139ef30820cb2605c854e1a9de57a2661654911e SHA1 1c356bd833503535e03fc6eac1091ff08ddda165 SHA256 6bc2b52dbe1a2750f519f52704556004b7923f1608391bd53978d839f8227269 diff --git a/app-emulation/virtualbox-bin/files/vboxwebsrv-confd b/app-emulation/virtualbox-bin/files/vboxwebsrv-confd new file mode 100644 index 0000000..5ca18d5 --- /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 0000000..b14da00 --- /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.4 2009/03/21 10:42:14 patrick 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 /opt/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 0000000..3dbfce6 --- /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 0000000..3888750 --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-2-wrapper @@ -0,0 +1,104 @@ +#!/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 +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 0000000..f69e73e --- /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 0000000..ce2606b --- /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 0000000..a9b7ee1 --- /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/virtualbox-bin-3.0.2.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-3.0.2.ebuild new file mode 100644 index 0000000..a509d1a --- /dev/null +++ b/app-emulation/virtualbox-bin/virtualbox-bin-3.0.2.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/virtualbox-bin-3.0.0.ebuild,v 1.1 2009/06/30 00:24:12 patrick Exp $ + +EAPI=2 + +inherit eutils fdo-mime pax-utils + +MY_PV=${PV}-49928 +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}.zip )" + +LICENSE="PUEL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+additions +chm headless sdk vboxwebsrv" +RESTRICT="strip" + +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 + x86? ( sys-libs/libstdc++-v3 )" + +S=${WORKDIR} + +QA_TEXTRELS_amd64="opt/VirtualBox/VBoxVMM.so" + +src_unpack() { + unpack_makeself ${MY_P}_${ARCH}.run + unpack ./VirtualBox.tar.bz2 + + if use sdk; then + unpack VirtualBoxSDK-${MY_PV}.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 + dodir /opt/bin + + 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 /opt/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,TestOGL}; 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 /opt/bin/VirtualBox + dosym /opt/VirtualBox/VBox.sh /opt/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 /opt/bin/VBoxManage + dosym /opt/VirtualBox/VBox.sh /opt/bin/VBoxVRDP + dosym /opt/VirtualBox/VBox.sh /opt/bin/VBoxHeadless + dosym /opt/VirtualBox/VBoxTunctl /opt/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 "" + elog "For advanced networking setups you should emerge:" + elog "net-misc/bridge-utils and sys-apps/usermode-utilities" +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} + diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest new file mode 100644 index 0000000..6e39f41 --- /dev/null +++ b/app-emulation/virtualbox-modules/Manifest @@ -0,0 +1,4 @@ +AUX virtualbox-modules-1.6.6_2.6.27.patch 2918 RMD160 a50f9aa5fbfe8570d446e8fb1e58d137cbce145f SHA1 ea4453a5716e205c171e3675ec2b53573fba5bb9 SHA256 ff18838027ec512a1381cb80379fda18fc43a0e8f4236e748e9b1de9140c83e6 +AUX virtualbox-modules-2.6.29_rc.patch 367 RMD160 984b9cf5d8f35cf77d2432a0c7df9fd220a5a0c7 SHA1 a4392716ce0ff0ee2e59450205d28f5af410dade SHA256 3039f51883044d36a622cb0d68f9be789a8c21e7f8fd0ddb7ebdd83522a2e9ad +DIST vbox-kernel-module-src-3.0.2.tar.bz2 730323 RMD160 9582d388e1c8d5009dfaf5af119aa699d6f7ca27 SHA1 f67152ad322be9f952ed05b7f98f7d5f56462596 SHA256 60ed30c01befec7bc4c45db48ec68f56bc9cf182f98cfa9d782242e47271ce79 +EBUILD virtualbox-modules-3.0.2.ebuild 1524 RMD160 88cc1a3207efdc86172c184bf18bfc52cb7cbaa7 SHA1 6b3283a318aab8a5f63dba576735264fc891cdf2 SHA256 a65ab5c2e1957406212e7ba9f282b3d894bdf7829d487e7b0044e4366e1f941a diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch new file mode 100644 index 0000000..2fa70a2 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-1.6.6_2.6.27.patch @@ -0,0 +1,79 @@ +--- a/linux/SUPDrv-linux.c ++++ b/linux/SUPDrv-linux.c +@@ -115,44 +115,6 @@ + # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time." + #endif + +-/* +- * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable? +- */ +-#if defined(RT_ARCH_AMD64) +-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC +-#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) +-#else +-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL +-#endif +- +-/* +- * The redhat hack section. +- * - The current hacks are for 2.4.21-15.EL only. +- */ +-#ifndef NO_REDHAT_HACKS +-/* accounting. */ +-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +-# ifdef VM_ACCOUNT +-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */ +-# endif +-# endif +- +-/* backported remap_page_range. */ +-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +-# include +-# ifdef tlb_vma /* probably not good enough... */ +-# define HAVE_26_STYLE_REMAP_PAGE_RANGE 1 +-# endif +-# endif +- +-#endif /* !NO_REDHAT_HACKS */ +- +- +-#ifndef MY_DO_MUNMAP +-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c) +-#endif +- + + /** @def ONE_MSEC_IN_JIFFIES + * The number of jiffies that make up 1 millisecond. Must be at least 1! */ +--- a/r0drv/linux/alloc-r0drv-linux.c ++++ b/r0drv/linux/alloc-r0drv-linux.c +@@ -131,11 +131,10 @@ PRTMEMHDR rtMemAlloc(size_t cb, uint32_t + } + else + # endif +- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC); ++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); + + #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, +- __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)); ++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); + #else + pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr)); + #endif +--- a/r0drv/linux/the-linux-kernel.h ++++ b/r0drv/linux/the-linux-kernel.h +@@ -174,7 +174,12 @@ DECLINLINE(unsigned long) msecs_to_jiffi + #if defined(RT_ARCH_AMD64) + # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC + #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) +-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) ++# ifdef __PAGE_KERNEL_EXEC ++ /* >= 2.6.27 */ ++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC) ++# else ++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) ++# endif + #else + # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL + #endif diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.29_rc.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.29_rc.patch new file mode 100644 index 0000000..0724b4d --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.29_rc.patch @@ -0,0 +1,11 @@ +--- vboxdrv/Makefile.orig 2009-02-25 01:22:57.626074529 +0100 ++++ vboxdrv/Makefile 2009-02-25 01:23:36.419076205 +0100 +@@ -67,7 +67,7 @@ + endif + + # use vm_insert_page() API (if available) to map kernel pages to userland - better debugging +-# VBOX_USE_INSERT_PAGE = 1 ++VBOX_USE_INSERT_PAGE = 1 + + # override is required by the Debian guys + override MODULE = vboxdrv diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-3.0.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-3.0.2.ebuild new file mode 100644 index 0000000..48a901d --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-3.0.2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-3.0.0.ebuild,v 1.0 2009/06/30 00:25:05 patrick Exp $ + +# XXX: the tarball here is just the kernel modules split out of the binary +# package that comes from virtualbox-bin + +EAPI=2 + +inherit eutils linux-mod + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="http://gentoo.zerodev.it/files/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="!=app-emulation/virtualbox-ose-9999" + +S=${WORKDIR} + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}" + enewgroup vboxusers +} + +src_install() { + linux-mod_src_install + + # udev rule for vboxdrv + dodir /etc/udev/rules.d + echo 'KERNEL=="vboxdrv", GROUP="vboxusers" MODE=660' >> "${D}/etc/udev/rules.d/60-virtualbox.rules" +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog "Starting with the 3.0 release a new kernel module was added," + elog "be sure to load all the needed modules." + elog "" + elog "Please add \"vboxdrv\" , \"vboxnetflt\" and \"vboxnetadp\" to:" + if has_version sys-apps/openrc; then + elog "/etc/conf.d/modules" + else + elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" + fi + elog "" +} + -- 2.11.4.GIT