diff options
author | Markus Ullmann <jokey@gentoo.org> | 2008-09-15 19:54:49 +0000 |
---|---|---|
committer | Markus Ullmann <jokey@gentoo.org> | 2008-09-15 19:54:49 +0000 |
commit | 77b66ae83437b121d56aed3483ac0830ae7caa62 (patch) | |
tree | e825fb9163c25ca68882e345909dc7754d3d87b9 /app-emulation/virtualbox-bin | |
parent | Marking openjpeg-1.2 ppc for bug 237032 (diff) | |
download | historical-77b66ae83437b121d56aed3483ac0830ae7caa62.tar.gz historical-77b66ae83437b121d56aed3483ac0830ae7caa62.tar.bz2 historical-77b66ae83437b121d56aed3483ac0830ae7caa62.zip |
(Proxy-Commit) Port from dev overlay
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686
Diffstat (limited to 'app-emulation/virtualbox-bin')
5 files changed, 359 insertions, 13 deletions
diff --git a/app-emulation/virtualbox-bin/ChangeLog b/app-emulation/virtualbox-bin/ChangeLog index 5bca375bf024..14ead571dd52 100644 --- a/app-emulation/virtualbox-bin/ChangeLog +++ b/app-emulation/virtualbox-bin/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for app-emulation/virtualbox-bin # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/ChangeLog,v 1.34 2008/09/06 07:16:40 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/ChangeLog,v 1.35 2008/09/15 19:52:56 jokey Exp $ + +*virtualbox-bin-2.0.2 (15 Sep 2008) + + 15 Sep 2008; Markus Ullmann <jokey@gentoo.org> + +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) <swapon@gmail.com> + 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) diff --git a/app-emulation/virtualbox-bin/files/virtualbox-bin-2.0.2-wrapper b/app-emulation/virtualbox-bin/files/virtualbox-bin-2.0.2-wrapper new file mode 100755 index 000000000000..3888750d717a --- /dev/null +++ b/app-emulation/virtualbox-bin/files/virtualbox-bin-2.0.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/virtualbox-bin-1.6.4.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-1.6.4.ebuild index 9012b0c2281d..8960797d942c 100644 --- a/app-emulation/virtualbox-bin/virtualbox-bin-1.6.4.ebuild +++ b/app-emulation/virtualbox-bin/virtualbox-bin-1.6.4.ebuild @@ -1,6 +1,6 @@ # 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/virtualbox-bin-1.6.4.ebuild,v 1.5 2008/09/06 07:16:40 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/virtualbox-bin-1.6.4.ebuild,v 1.6 2008/09/15 19:52:56 jokey Exp $ EAPI=1 @@ -10,8 +10,8 @@ MY_P=VirtualBox-${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 )" +SRC_URI="amd64? ( ${MY_P}_amd64.run ) + x86? ( ${MY_P}_x86.run )" LICENSE="PUEL" SLOT="0" @@ -52,7 +52,21 @@ RDEPEND="!app-emulation/virtualbox-ose S=${WORKDIR} -RESTRICT="primaryuri" +RESTRICT="fetch" + +pkg_nofetch() { + # Fetch restriction added due licensing and problems downloading with + # wget, see http://www.virtualbox.org/ticket/2148 + elog "Please download the package from:" + elog "" + if use amd64 ; then + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_amd64.run" + else + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_x86.run" + fi + elog "" + elog "and then put it in ${DISTDIR}" +} pkg_setup() { # The VBoxSDL frontend needs media-libs/libsdl compiled @@ -64,8 +78,6 @@ pkg_setup() { die "media-libs/libsdl should be compiled with the \"X\" USE flag." fi fi - - check_license } src_unpack() { @@ -100,6 +112,7 @@ src_install() { doins vboxwebsrv 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 diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-1.6.6.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-1.6.6.ebuild index 0ac0d51cf6a0..8133cd43cb38 100644 --- a/app-emulation/virtualbox-bin/virtualbox-bin-1.6.6.ebuild +++ b/app-emulation/virtualbox-bin/virtualbox-bin-1.6.6.ebuild @@ -1,6 +1,6 @@ # 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/virtualbox-bin-1.6.6.ebuild,v 1.1 2008/09/06 07:16:40 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-bin/virtualbox-bin-1.6.6.ebuild,v 1.2 2008/09/15 19:52:56 jokey Exp $ EAPI=1 @@ -10,8 +10,8 @@ MY_P=VirtualBox-${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 )" +SRC_URI="amd64? ( ${MY_P}_amd64.run ) + x86? ( ${MY_P}_x86.run )" LICENSE="PUEL" SLOT="0" @@ -52,7 +52,21 @@ RDEPEND="!app-emulation/virtualbox-ose S=${WORKDIR} -RESTRICT="primaryuri" +RESTRICT="fetch" + +pkg_nofetch() { + # Fetch restriction added due licensing and problems downloading with + # wget, see http://www.virtualbox.org/ticket/2148 + elog "Please download the package from:" + elog "" + if use amd64 ; then + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_amd64.run" + else + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_x86.run" + fi + elog "" + elog "and then put it in ${DISTDIR}" +} pkg_setup() { # The VBoxSDL frontend needs media-libs/libsdl compiled @@ -64,8 +78,6 @@ pkg_setup() { die "media-libs/libsdl should be compiled with the \"X\" USE flag." fi fi - - check_license } src_unpack() { @@ -100,6 +112,7 @@ src_install() { doins vboxwebsrv 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 diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-2.0.2.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-2.0.2.ebuild new file mode 100644 index 000000000000..daad6305eec4 --- /dev/null +++ b/app-emulation/virtualbox-bin/virtualbox-bin-2.0.2.ebuild @@ -0,0 +1,201 @@ +# 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/virtualbox-bin-2.0.2.ebuild,v 1.1 2008/09/15 19:52:56 jokey Exp $ + +EAPI=1 + +inherit eutils fdo-mime pax-utils + +MY_PV=${PV}-36488 +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? ( ${MY_P}_amd64.run ) + x86? ( ${MY_P}_x86.run ) + sdk? ( VirtualBoxSDK-${MY_PV}.zip )" + +LICENSE="PUEL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+additions 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 + x11-libs/libXrender + x11-libs/libXfixes + media-libs/libmng + media-libs/jpeg + media-libs/libpng + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXinerama + virtual/xft + x11-libs/libXft + media-libs/freetype + media-libs/fontconfig + x11-libs/libXext + dev-libs/glib ) + 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? ( =virtual/libstdc++-3.3 )" + +S=${WORKDIR} + +RESTRICT="fetch" + +pkg_nofetch() { + # Fetch restriction added due licensing and problems downloading with + # wget, see http://www.virtualbox.org/ticket/2148 + elog "Please download:" + elog "" + if use amd64 ; then + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_amd64.run" + else + elog "http://download.virtualbox.org/virtualbox/${PV}/${MY_P}_x86.run" + fi + if use sdk; then + elog "http://download.virtualbox.org/virtualbox/${PV}/VirtualBoxSDK-${MY_PV}.zip" + fi + elog "" + elog "and then put file(s) in ${DISTDIR}" +} + +pkg_setup() { + # The VBoxSDL frontend needs media-libs/libsdl compiled + # with USE flag X enabled (bug #177335) + if ! use headless ; then + if ! built_with_use media-libs/libsdl X ; then + eerror "media-libs/libsdl was compiled without the \"X\" USE flag enabled." + eerror "Please re-emerge media-libs/libsdl with USE=\"X\"." + die "media-libs/libsdl should be compiled with the \"X\" USE flag." + fi + fi +} + +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 + newins "${FILESDIR}/${PN}-interfaces" interfaces + + if ! use headless ; then + newicon VBox.png virtualbox.png + newmenu "${FILESDIR}"/${PN}.desktop virtualbox.desktop + fi + + insinto /opt/VirtualBox + + doins UserManual.pdf + + if use sdk ; then + doins -r sdk + fi + + if use additions; then + doins -r additions + fi + + if use vboxwebsrv; then + doins vboxwebsrv + 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 + + rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \ + vboxdrv.sh VBox.sh VBox.png vboxnet.sh kchmviewer additions VirtualBox.desktop \ + VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv webtest + + if use headless ; then + rm -rf VBoxSDL VirtualBox VBoxKeyboard.so VirtualBoxAPI.chm \ + VirtualBox.chm + 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 + + 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 4511 /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 4511 /opt/VirtualBox/VBoxHeadless + pax-mark -m "${D}"/opt/VirtualBox/VBoxHeadless + fi + + exeinto /opt/VirtualBox + newexe "${FILESDIR}/${P}-wrapper" "VBox.sh" || die + fowners root:vboxusers /opt/VirtualBox/VBox.sh + fperms 0750 /opt/VirtualBox/VBox.sh + fowners root:vboxusers /opt/VirtualBox/VBoxAddIF.sh + fperms 0750 /opt/VirtualBox/VBoxAddIF.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 + dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxAddIF + dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxDeleteIF +} + +pkg_postinst() { + fdo-mime_desktop_database_update + elog "" + if ! use headless ; then + elog "To launch VirtualBox just type: \"VirtualBox\"" + elog "" + elog "In order to use the online help, create a link" + elog "to your favourite chm viewer, for example:" + elog "ln -s /usr/bin/kchmviewer /opt/VirtualBox/kchmviewer" + elog "" + fi + elog "You must be in the vboxusers group to use VirtualBox." + elog "" +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} |