summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest1
-rw-r--r--app-emulation/virtualbox-guest-additions/files/vboxclient.desktop7
-rw-r--r--app-emulation/virtualbox-guest-additions/files/vboxguest-4.1.0-log-use-c99.patch13
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig30
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3.19.patch76
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd26
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions.service16
-rw-r--r--app-emulation/virtualbox-guest-additions/files/xorg.conf.vbox13
-rw-r--r--app-emulation/virtualbox-guest-additions/metadata.xml12
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.20.ebuild214
10 files changed, 408 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
new file mode 100644
index 00000000..a540c67b
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -0,0 +1 @@
+DIST VirtualBox-4.3.20.tar.bz2 100184338 SHA256 1484f8e9993ec4fe3892c5165db84d238713d2506e147ed8236541ece642e965 SHA512 5398bcd03eb8987978682dfe84512bfa2935e7d50164e22abf3f8f424fc24a29d4aea486399da01d9895eca4ad07a1f15ca6f5880aff3a255700519fe0f19dc5 WHIRLPOOL 9e7419d4958bb307ca7232c7e8d3935ed43687bec1e1b881a22fe44987cd0bc66e927922a0e8ac78457567b22300ecc76ca0f40e71bcbcf0b75b07c1e86c0cfd
diff --git a/app-emulation/virtualbox-guest-additions/files/vboxclient.desktop b/app-emulation/virtualbox-guest-additions/files/vboxclient.desktop
new file mode 100644
index 00000000..316eb9f6
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/vboxclient.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=VirtualBox Client Service
+Exec=VBoxClient-all
+Terminal=false
+X-KDE-StartupNotify=false
+StartupNotify=false
diff --git a/app-emulation/virtualbox-guest-additions/files/vboxguest-4.1.0-log-use-c99.patch b/app-emulation/virtualbox-guest-additions/files/vboxguest-4.1.0-log-use-c99.patch
new file mode 100644
index 00000000..f3a738fa
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/vboxguest-4.1.0-log-use-c99.patch
@@ -0,0 +1,13 @@
+# https://bugs.gentoo.org/298988
+
+--- vboxguest/Makefile
++++ vboxguest/Makefile
+@@ -104,7 +104,7 @@
+
+ MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
+ -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
+- -DVBOX_WITH_HGCM
++ -DVBOX_WITH_HGCM -DLOG_USE_C99
+ ifeq ($(BUILD_TARGET_ARCH),amd64)
+ MOD_DEFS += -DRT_ARCH_AMD64
+ else
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig
new file mode 100644
index 00000000..aeea54d6
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig
@@ -0,0 +1,30 @@
+# -*- Makefile -*-
+#
+# Overwrite some default kBuild settings
+#
+
+#
+# Copyright (C) 2006-2008 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 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.
+#
+
+# don't build testcases to save time, they are not needed for the package
+VBOX_WITH_TESTCASES :=
+VBOX_WITH_TESTSUITE :=
+
+KBUILD_MSG_STYLE := brief
+
+## paths, origin, hardening
+VBOX_WITH_HARDENING := 2
+VBOX_WITH_ORIGIN :=
+VBOX_ONLY_ADDITIONS := 1
+
+## don't build with -Werror
+VBOX_WITH_WARNINGS_AS_ERRORS :=
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3.19.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3.19.patch
new file mode 100644
index 00000000..d0eea45d
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3.19.patch
@@ -0,0 +1,76 @@
+--- a/vboxsf/dirops.c
++++ b/vboxsf/dirops.c
+@@ -127,13 +127,11 @@
+ TRACE();
+
+- sf_g = GET_GLOB_INFO(dir->f_dentry->d_inode->i_sb);
++ inode = GET_F_DENTRY(dir)->d_inode;
++ sf_i = GET_INODE_INFO(inode);
++ sf_g = GET_GLOB_INFO(inode->i_sb);
+ sf_d = dir->private_data;
+
+ BUG_ON(!sf_g);
+ BUG_ON(!sf_d);
+-
+- inode = dir->f_dentry->d_inode;
+- sf_i = GET_INODE_INFO(inode);
+-
+ BUG_ON(!sf_i);
+
+--- a/vboxsf/regops.c
++++ b/vboxsf/regops.c
+@@ -109,5 +109,5 @@
+ size_t left = size;
+ ssize_t total_bytes_read = 0;
+- struct inode *inode = file->f_dentry->d_inode;
++ struct inode *inode = GET_F_DENTRY(file)->d_inode;
+ struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
+ struct sf_reg_info *sf_r = file->private_data;
+@@ -184,5 +184,5 @@
+ size_t left = size;
+ ssize_t total_bytes_written = 0;
+- struct inode *inode = file->f_dentry->d_inode;
++ struct inode *inode = GET_F_DENTRY(file)->d_inode;
+ struct sf_inode_info *sf_i = GET_INODE_INFO(inode);
+ struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
+@@ -455,5 +455,5 @@
+ static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type)
+ # define SET_TYPE(t) *type = (t)
+-#else /* LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0) */
++#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) */
+ static struct page *sf_reg_nopage(struct vm_area_struct *vma, unsigned long vaddr, int unused)
+ # define SET_TYPE(t)
+@@ -466,5 +466,5 @@
+ int err;
+ struct file *file = vma->vm_file;
+- struct inode *inode = file->f_dentry->d_inode;
++ struct inode *inode = GET_F_DENTRY(file)->d_inode;
+ struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
+ struct sf_reg_info *sf_r = file->private_data;
+@@ -606,5 +606,5 @@
+ static int sf_readpage(struct file *file, struct page *page)
+ {
+- struct inode *inode = file->f_dentry->d_inode;
++ struct inode *inode = GET_F_DENTRY(file)->d_inode;
+ struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
+ struct sf_reg_info *sf_r = file->private_data;
+--- a/vboxsf/vfsmod.h
++++ b/vboxsf/vfsmod.h
+@@ -146,5 +146,5 @@
+ #endif
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 19) || defined(KERNEL_FC6)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) || defined(KERNEL_FC6)
+ /* FC6 kernel 2.6.18, vanilla kernel 2.6.19+ */
+ # define GET_INODE_INFO(i) ((struct sf_inode_info *) (i)->i_private)
+@@ -156,4 +156,10 @@
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++# define GET_F_DENTRY(f) (f->f_path.dentry)
++#else
++# define GET_F_DENTRY(f) (f->f_dentry)
+ #endif
+
++#endif
++
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd
new file mode 100644
index 00000000..9de2ee07
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd,v 1.2 2013/02/11 22:13:47 polynomial-c Exp $
+
+pidfile="/var/run/vboxguest-service.pid"
+command="/usr/sbin/vboxguest-service"
+command_args="--foreground"
+start_stop_daemon_args="--make-pidfile --pidfile ${pidfile} --background"
+
+depend() {
+ need dbus localmount
+ before xdm
+}
+
+start_pre() {
+ einfo "Loading kernel modules"
+ /sbin/modprobe vboxguest 2>&1
+ /sbin/modprobe vboxsf 2>&1
+}
+
+stop_post() {
+ einfo "Removing kernel modules"
+ /sbin/modprobe -r vboxsf 2>&1
+ /sbin/modprobe -r vboxguest 2>&1
+}
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions.service b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions.service
new file mode 100644
index 00000000..35f9ce24
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=VirtualBox Guest Additions
+ConditionVirtualization=oracle
+Before=display-manager.service
+
+[Service]
+Type=simple
+ExecStartPre=/sbin/modprobe vboxguest
+ExecStartPre=/sbin/modprobe vboxsf
+ExecStart=/usr/sbin/vboxguest-service --foreground
+ExecStopPost=/sbin/modprobe -r vboxsf
+ExecStopPost=/sbin/modprobe -r vboxguest
+PIDFile=/var/run/vboxguest-service.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-emulation/virtualbox-guest-additions/files/xorg.conf.vbox b/app-emulation/virtualbox-guest-additions/files/xorg.conf.vbox
new file mode 100644
index 00000000..a8624694
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/xorg.conf.vbox
@@ -0,0 +1,13 @@
+Section "Device"
+ Identifier "Device-vboxvideo"
+ Driver "vboxvideo"
+EndSection
+Section "Screen"
+ Identifier "Screen-vboxvideo"
+ Device "Device-vboxvideo"
+EndSection
+
+Section "ServerLayout"
+ Identifier "Default Layout"
+ Screen "Screen-vboxvideo"
+EndSection
diff --git a/app-emulation/virtualbox-guest-additions/metadata.xml b/app-emulation/virtualbox-guest-additions/metadata.xml
new file mode 100644
index 00000000..e71fc2f6
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.20.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.20.ebuild
new file mode 100644
index 00000000..7713edc5
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.20.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.20.ebuild,v 1.1 2014/11/23 14:22:45 polynomial-c Exp $
+
+EAPI=5
+
+inherit eutils linux-mod systemd user
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-proto/glproto )
+ sys-apps/dbus
+ !!x11-drivers/xf86-input-virtualbox"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.9998_pre20131130
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ X? ( x11-proto/renderproto )
+ !X? ( x11-proto/xproto )"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+ enewgroup vboxguest
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+ enewgroup vboxsf
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+}
+
+src_prepare() {
+ # PaX fixes (see bug #298988)
+ pushd "${WORKDIR}" &>/dev/null || die
+ epatch "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
+ epatch "${FILESDIR}/${PN}-3.19.patch"
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-3-localconfig" LocalConfig.kmk || die
+
+ # stupid new header references...
+ for vboxheader in {product,revision}-generated.h ; do
+ for mdir in vbox{guest,sf} ; do
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+ "${WORKDIR}/${mdir}/${vboxheader}"
+ done
+ done
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ ./configure --nofatal \
+ --disable-xpcom \
+ --disable-sdl-ttf \
+ --disable-pulse \
+ --disable-alsa \
+ --build-headless || die "configure failed"
+}
+
+src_compile() {
+ source ./env.sh
+
+ for each in /src/VBox/{Runtime,Additions/common} \
+ /src/VBox/Additions/linux/sharedfolders ; do
+ cd "${S}"${each} || die
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild" \
+ KBUILD_VERBOSE=2
+ done
+
+ if use X; then
+ cd "${S}"/src/VBox/Additions/x11/VBoxClient || die
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild"
+ fi
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ insinto /usr/share/doc/${PF}
+ doins "${FILESDIR}"/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! use X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "Also make sure you use the Mesa library for OpenGL:"
+ elog " eselect opengl set xorg-x11"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}