diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-10-18 13:44:11 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-10-18 13:44:11 -0300 |
commit | 1b50774a989848d3992927b0d0b2b539edb6b198 (patch) | |
tree | 59035fe072af4c14b27f2fd99def6c6ab1a38e10 /libre/virtualbox | |
parent | 5b7a5a65a83bad0f88ae3b7384af3a5f79e4fc21 (diff) |
libre/virtualbox-4.1.4-2
Diffstat (limited to 'libre/virtualbox')
-rw-r--r-- | libre/virtualbox/10-vboxdrv.rules | 6 | ||||
-rw-r--r-- | libre/virtualbox/18-system-xorg.patch | 278 | ||||
-rw-r--r-- | libre/virtualbox/60-vboxguest.rules | 3 | ||||
-rw-r--r-- | libre/virtualbox/LocalConfig.kmk | 20 | ||||
-rw-r--r-- | libre/virtualbox/PKGBUILD | 212 | ||||
-rw-r--r-- | libre/virtualbox/change_default_driver_dir.patch | 19 | ||||
-rw-r--r-- | libre/virtualbox/vbox-service.conf | 3 | ||||
-rw-r--r-- | libre/virtualbox/vbox-service.rc | 40 | ||||
-rw-r--r-- | libre/virtualbox/vboxbuild | 79 | ||||
-rw-r--r-- | libre/virtualbox/vboxdrv-reference.patch | 46 | ||||
-rw-r--r-- | libre/virtualbox/virtualbox-4-makeself-check.patch | 11 | ||||
-rw-r--r-- | libre/virtualbox/virtualbox-4-mkisofs-check.patch | 11 | ||||
-rw-r--r-- | libre/virtualbox/virtualbox-parabola-modules.install | 25 | ||||
-rw-r--r-- | libre/virtualbox/virtualbox.install | 52 |
14 files changed, 805 insertions, 0 deletions
diff --git a/libre/virtualbox/10-vboxdrv.rules b/libre/virtualbox/10-vboxdrv.rules new file mode 100644 index 000000000..a6cfe0a05 --- /dev/null +++ b/libre/virtualbox/10-vboxdrv.rules @@ -0,0 +1,6 @@ +KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" ENV{ACL_MANAGE}="1" +SUBSYSTEM=="usb_device", ACTION=="add", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" +SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" + diff --git a/libre/virtualbox/18-system-xorg.patch b/libre/virtualbox/18-system-xorg.patch new file mode 100644 index 000000000..baca4bc5b --- /dev/null +++ b/libre/virtualbox/18-system-xorg.patch @@ -0,0 +1,278 @@ +Description: Build the X.Org driver only for the selected system X Server version. +Author: Michael Meskes <meskes@debian.org>, Felix Geyer <debfx-pkg@fobos.de> + +diff --git a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk +--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk ++++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk +@@ -40,8 +40,8 @@ LIBRARIES += \ + VBoxGuestR3LibShared + ifndef VBOX_ONLY_TESTSUITE + if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd) +- LIBRARIES += \ +- VBoxGuestR3LibXFree86 ++# LIBRARIES += \ ++# VBoxGuestR3LibXFree86 + endif + endif + LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86 +diff --git a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk +--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk ++++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk +@@ -63,16 +63,12 @@ VBoxOGL_TEMPLATE = VBOXCROGLR3GUESTDLL + VBoxOGL_INCS = . + if1of ($(KBUILD_TARGET), linux solaris freebsd) + VBoxOGL_INCS += \ +- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \ +- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \ +- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \ +- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \ +- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \ +- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \ +- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \ +- $(VBOX_PATH_X11_ROOT)/1.3/xorg \ ++ /usr/include/x11 \ ++ /usr/include/xorg \ ++ /usr/include/pixman-1 \ + $(VBOX_MESA_INCS) \ +- $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13 ++ /usr/include/drm \ ++ /usr/include/libdrm + VBoxOGL_DEFS += VBOX_NO_NATIVEGL + endif + +diff --git a/src/VBox/Additions/x11/Makefile.kmk b/src/VBox/Additions/x11/Makefile.kmk +--- a/src/VBox/Additions/x11/Makefile.kmk ++++ b/src/VBox/Additions/x11/Makefile.kmk +@@ -17,6 +17,10 @@ + SUB_DEPTH = ../../../.. + include $(KBUILD_PATH)/subheader.kmk + ++ifn1of ($(XSERVER_VERSION), 13 14 15 16 17 18 19 110) ++ XSERVER_VERSION := 17 ++endif ++ + # Include sub-makefiles. + if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) + include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk +diff --git a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk +--- a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk ++++ b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk +@@ -23,7 +23,6 @@ include $(KBUILD_PATH)/subheader.kmk + # vboxmouse_drv + # + if1of ($(KBUILD_TARGET), linux) +- SYSMODS += vboxmouse_drv + vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD + vboxmouse_drv_DEFS.linux = linux + vboxmouse_drv_DEFS.x86 += __i386__ +@@ -59,7 +58,6 @@ endif + # + # vboxmouse_drv_70 + # +-DLLS += vboxmouse_drv_70 + vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_70_DEFS = \ + XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE +@@ -80,7 +78,6 @@ vboxmouse_drv_70_SOURCES = \ + # + # vboxmouse_drv_71 + # +-DLLS += vboxmouse_drv_71 + vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) + vboxmouse_drv_71_INCS := \ +@@ -97,7 +94,6 @@ vboxmouse_drv_71_SOURCES = \ + # + # vboxmouse_drv_13 + # +-DLLS += vboxmouse_drv_13 + vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_13_INCS := \ +@@ -112,7 +108,6 @@ vboxmouse_drv_13_SOURCES = \ + # + # vboxmouse_drv_14 + # +-DLLS += vboxmouse_drv_14 + vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_14_INCS := \ +@@ -126,7 +121,6 @@ endif + # + # vboxmouse_drv_15 + # +-DLLS += vboxmouse_drv_15 + vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_15_INCS := \ +@@ -141,7 +135,6 @@ vboxmouse_drv_15_SOURCES = \ + # + # vboxmouse_drv_16 + # +-DLLS += vboxmouse_drv_16 + vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_16_INCS := \ +@@ -157,7 +150,6 @@ vboxmouse_drv_16_SOURCES = \ + # + # vboxmouse_drv_17 + # +-DLLS += vboxmouse_drv_17 + vboxmouse_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_17_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local +@@ -177,7 +169,6 @@ vboxmouse_drv_17_SOURCES = \ + # + # vboxmouse_drv_18 + # +-DLLS += vboxmouse_drv_18 + vboxmouse_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_18_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local +@@ -197,7 +188,6 @@ vboxmouse_drv_18_SOURCES = \ + # + # vboxmouse_drv_19 + # +-DLLS += vboxmouse_drv_19 + vboxmouse_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_19_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local +@@ -217,7 +207,6 @@ vboxmouse_drv_19_SOURCES = \ + # + # vboxmouse_drv_110 + # +-DLLS += vboxmouse_drv_110 + vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local +@@ -234,6 +224,14 @@ vboxmouse_drv_110_SOURCES = \ + vboxmouse_15.c + + ++vboxmouse_drv_$(XSERVER_VERSION)_NAME := vboxmouse_drv ++vboxmouse_drv_$(XSERVER_VERSION)_INCS := \ ++ /usr/include/x11 \ ++ /usr/include/xorg \ ++ /usr/include/pixman-1 ++DLLS += vboxmouse_drv_$(XSERVER_VERSION) ++ ++ + # Check the undefined symbols in the X.Org modules against lists of allowed + # symbols. Not very elegant, but it will catch problems early. + ifdef VBOX_WITH_TESTCASES +diff --git a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk +--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk ++++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk +@@ -22,7 +22,6 @@ include $(KBUILD_PATH)/subheader.kmk + # vboxvideo_drv + # + if1of ($(KBUILD_TARGET), linux) +- SYSMODS += vboxvideo_drv + endif # target linux + vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD + vboxvideo_drv_DEFS.linux = linux +@@ -89,7 +88,6 @@ endif # target linux + # base keywords instead of using .solaris or .linux. + # Also it is *important* to use := and not = when deriving a property. + # +-DLLS += vboxvideo_drv_70 + vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD + if1of ($(KBUILD_TARGET), linux) + vboxvideo_drv_70_CFLAGS += \ +@@ -112,7 +110,6 @@ vboxvideo_drv_70_SOURCES = $(vboxvideo_drv_SOURCES) + # + # vboxvideo_drv_71 + # +-DLLS += vboxvideo_drv_71 + vboxvideo_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_71_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_71_DEFS := $(vboxvideo_drv_70_DEFS) +@@ -127,7 +124,6 @@ vboxvideo_drv_71_SOURCES = $(vboxvideo_drv_SOURCES) + # + # vboxvideo_drv_13 + # +-DLLS += vboxvideo_drv_13 + vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_13_DEFS := $(vboxvideo_drv_70_DEFS) VBOXVIDEO_13 +@@ -146,7 +142,6 @@ vboxvideo_drv_13_SOURCES = \ + # + # vboxvideo_drv_14 + # +-DLLS += vboxvideo_drv_14 + vboxvideo_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_14_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_14_DEFS := $(vboxvideo_drv_13_DEFS) +@@ -165,7 +160,6 @@ vboxvideo_drv_14_SOURCES = $(vboxvideo_drv_13_SOURCES) + # + # vboxvideo_drv_15 + # +-DLLS += vboxvideo_drv_15 + vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_15_DEFS := $(vboxvideo_drv_13_DEFS) NO_ANSIC PCIACCESS \ +@@ -192,7 +186,6 @@ endif + # + # vboxvideo_drv_16 + # +-DLLS += vboxvideo_drv_16 + vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_16_DEFS := $(vboxvideo_drv_15_DEFS) +@@ -212,7 +205,6 @@ vboxvideo_drv_16_SOURCES := $(vboxvideo_drv_15_SOURCES) + # + # vboxvideo_drv_17 + # +-DLLS += vboxvideo_drv_17 + vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_17_DEFS := $(vboxvideo_drv_15_DEFS) +@@ -239,7 +231,6 @@ vboxvideo_drv_17_SOURCES := $(vboxvideo_drv_15_SOURCES) + # + # vboxvideo_drv_18 + # +-DLLS += vboxvideo_drv_18 + vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_18_DEFS := $(vboxvideo_drv_15_DEFS) +@@ -266,7 +257,6 @@ vboxvideo_drv_18_SOURCES := $(vboxvideo_drv_15_SOURCES) + # + # vboxvideo_drv_19 + # +-DLLS += vboxvideo_drv_19 + vboxvideo_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_19_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_19_DEFS := $(vboxvideo_drv_15_DEFS) +@@ -293,7 +282,6 @@ vboxvideo_drv_19_SOURCES := $(vboxvideo_drv_15_SOURCES) + # + # vboxvideo_drv_110 + # +-DLLS += vboxvideo_drv_110 + vboxvideo_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD + vboxvideo_drv_110_CFLAGS := $(vboxvideo_drv_70_CFLAGS) + vboxvideo_drv_110_DEFS := $(vboxvideo_drv_15_DEFS) +@@ -317,6 +306,23 @@ vboxvideo_drv_110_INCS = \ + vboxvideo_drv_110_SOURCES := $(vboxvideo_drv_15_SOURCES) + + ++vboxvideo_drv_$(XSERVER_VERSION)_NAME := vboxvideo_drv ++vboxvideo_drv_$(XSERVER_VERSION)_INCS := \ ++ /usr/include/xorg \ ++ /usr/include/x11 \ ++ /usr/include/pixman-1 \ ++ /usr/include/X11/dri \ ++ /usr/include/drm \ ++ /usr/include/libdrm ++vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(PATH_ROOT)/src/VBox/Runtime/include ++DLLS += vboxvideo_drv_$(XSERVER_VERSION) ++ ++# required for lenny backports ++ifeq ($(XSERVER_VERSION),14) ++ vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(VBOX_PATH_X11_XORG_1_4)/xorg ++endif ++ ++ + # Check the undefined symbols in the X.Org modules against lists of allowed + # symbols. Not very elegant, but it will catch problems early. + ifdef VBOX_WITH_TESTCASES + diff --git a/libre/virtualbox/60-vboxguest.rules b/libre/virtualbox/60-vboxguest.rules new file mode 100644 index 000000000..d64575709 --- /dev/null +++ b/libre/virtualbox/60-vboxguest.rules @@ -0,0 +1,3 @@ +ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600" +ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666" + diff --git a/libre/virtualbox/LocalConfig.kmk b/libre/virtualbox/LocalConfig.kmk new file mode 100644 index 000000000..97123a296 --- /dev/null +++ b/libre/virtualbox/LocalConfig.kmk @@ -0,0 +1,20 @@ +VBOX_WITH_ADDITION_DRIVERS = +VBOX_WITH_INSTALLER = 1 +VBOX_WITH_LINUX_ADDITIONS = 1 +VBOX_WITH_X11_ADDITIONS = 1 +VBOX_WITH_TESTCASES = +VBOX_WITH_TESTSUITE = +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 := /usr/share/virtualbox +VBOX_WITH_REGISTRATION_REQUEST = +VBOX_WITH_UPDATE_REQUEST = +VBOX_WITH_VNC := 1 +VBOX_BLD_PYTHON = python2 +VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk +VBOX_GCC_WERR = +VBOX_GCC_WARN = + diff --git a/libre/virtualbox/PKGBUILD b/libre/virtualbox/PKGBUILD new file mode 100644 index 000000000..bfd784c0d --- /dev/null +++ b/libre/virtualbox/PKGBUILD @@ -0,0 +1,212 @@ +# $Id: PKGBUILD 56698 2011-10-10 18:23:45Z ibiru $ +# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> +# Changes: +# * Adapt to linux-libre +# * virtualbox-{archlinux,parabola}-* +# * Removed unfree user manual +# * Package with --pkg "virtualbox-parabola-additions virtualbox-parabola-modules" +# Based on +#Maintainer: Ionut Biru <ibiru@archlinux.org> +pkgbase=virtualbox +pkgname=('virtualbox' 'virtualbox-parabola-additions' 'virtualbox-parabola-modules' 'virtualbox-sdk') +pkgver=4.1.4 +pkgrel=2 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL' 'custom') +makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor' 'qt' 'libidl2' 'sdl_ttf' 'alsa-lib' 'libpulse' 'libxtst' +'xalan-c' 'sdl' 'libxmu' 'curl' 'python2' 'linux-libre-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'openjdk6' 'gsoap' 'vde2' +'xorg-server-devel' 'xf86driproto' 'libxcomposite' 'pkgconfig') +[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2 + virtualbox-4-makeself-check.patch virtualbox-4-mkisofs-check.patch + 10-vboxdrv.rules 60-vboxguest.rules vboxdrv-reference.patch LocalConfig.kmk vboxbuild + change_default_driver_dir.patch vbox-service.conf vbox-service.rc) +_kernver=3.0-LIBRE +options=(!distcc) + +build() { + cd "$srcdir/VirtualBox-${pkgver}_OSE" + + patch -Np1 -i "$srcdir/virtualbox-4-makeself-check.patch" + patch -Np1 -i "$srcdir/virtualbox-4-mkisofs-check.patch" + patch -Np1 -i "$srcdir/vboxdrv-reference.patch" + patch -Np1 -i "$srcdir/change_default_driver_dir.patch" + + cp "$srcdir/LocalConfig.kmk" . + + ./configure --disable-docs \ + --enable-webservice \ + --enable-vde \ + --with-linux=/usr/src/linux-${_kernver} + source ./env.sh + kmk all + + export KERN_DIR=/usr/src/linux-${_kernver} + make -C "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" + make -C "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo" + sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "out/linux.$BUILD_PLATFORM_ARCH/release/bin/vboxshell.py" +} + +package_virtualbox() { + pkgdesc="Powerful x86 virtualization for enterprise as well as home use" + depends=('libxml2' 'libxcursor' 'libidl2' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng' 'linux-libre-headers' 'gcc' 'make') + optdepends=('qt: for VirtualBox GUI' + 'vde2: Virtual Distributed Ethernet support' + 'virtualbox-sdk: developer kit') + + replaces=('virtualbox-ose') + conflicts=('virtualbox-ose') + install=virtualbox.install + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + mkdir -p "$pkgdir"/usr/{bin,lib/virtualbox/components,lib/virtualbox/ExtensionPacks,share/virtualbox/nls} + + #Binaries and Wrapper with Launchers + install -m 0755 VBox.sh "$pkgdir/usr/bin/VBox" + + for i in VBoxHeadless vboxheadless VBoxManage vboxmanage VBoxSDL vboxsdl VirtualBox virtualbox vboxwebsrv VBoxBalloonCtrl vboxballoonctrl; do + ln -sf VBox "$pkgdir/usr/bin/$i" + done + install -m 0755 VBoxTunctl "$pkgdir/usr/bin" + + #components + install -m 0755 components/* -t "$pkgdir/usr/lib/virtualbox/components" + + #lib + install -m 0755 *.so "$pkgdir/usr/lib/virtualbox" + install -m 0644 *.gc *.r0 VBoxEFI*.fd "$pkgdir/usr/lib/virtualbox" + + #setuid root binaries + install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl -t "$pkgdir/usr/lib/virtualbox" + #other binaries + install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox" + + #language + install -m 0755 nls/*.qm -t "$pkgdir/usr/share/virtualbox/nls" + + #useless scripts + install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t "$pkgdir/usr/share/virtualbox" + + #icons + install -D -m 0644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png" + + pushd icons + for i in *; do + install -d "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + cp $i/* "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + done + popd + + #desktop + install -D -m 0644 virtualbox.desktop "$pkgdir/usr/share/applications/virtualbox.desktop" + install -D -m 0644 virtualbox.xml "$pkgdir/usr/share/mime/packages/virtualbox.xml" + + #install configuration + mkdir -p "$pkgdir/etc/vbox" + echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg" + + #udev and licence + install -D -m 0644 "$srcdir/VirtualBox-${pkgver}_OSE/COPYING" \ + "$pkgdir/usr/share/licenses/virtualbox/LICENSE" + install -D -m 0644 "$srcdir/10-vboxdrv.rules" \ + "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" + + #sources for modules + cp -r src ${pkgdir}/usr/lib/virtualbox + #install compilation script + install -D -m 755 "${srcdir}/vboxbuild" "${pkgdir}/usr/bin/vboxbuild" +} + +package_virtualbox-sdk() { + pkgdesc=" VirtualBox Software Developer Kit (SDK)" + depends=('python2') + + mkdir -p "$pkgdir/usr/lib/virtualbox" + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + + install -D -m 0755 vboxshell.py "$pkgdir/usr/lib/virtualbox/vboxshell.py" + #python sdk + pushd sdk/installer + VBOX_INSTALL_PATH="/usr/lib/virtualbox" python2 vboxapisetup.py install --root "${pkgdir}" + popd + rm -rf sdk/installer + mv sdk "$pkgdir/usr/lib/virtualbox" +} + +package_virtualbox-parabola-additions(){ + pkgdesc="Additions only for Parabola guests (userspace tools)" + depends=("virtualbox-parabola-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr') + replaces=('virtualbox-guest-additions' 'virtualbox-archlinux-additions') + conflicts=('virtualbox-guest-additions' 'virtualbox-archlinux-additions') + provides=("virtualbox-archlinux-additions=${pkgver}") + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" + + install -d "$pkgdir"/{usr/bin,sbin} + install -m755 VBoxClient VBoxControl VBoxService "$pkgdir/usr/bin" + install -m755 mount.vboxsf "$pkgdir/sbin" + + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ + "$pkgdir"/usr/bin/VBoxClient-all + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/vboxclient.desktop \ + "$pkgdir"/etc/xdg/autostart/vboxclient.desktop + install -D vboxvideo_drv_111.so \ + "$pkgdir/usr/lib/xorg/modules/drivers/vboxvideo.so" + install -d "$pkgdir/usr/lib/xorg/modules/dri" + install -m755 VBoxOGL*.so "$pkgdir/usr/lib" + ln -s /usr/lib/VBoxOGL.so "$pkgdir/usr/lib/xorg/modules/dri/vboxvideo_dri.so" + install -m755 -D pam_vbox.so "$pkgdir/lib/security/pam_vbox.so" + + # install rc.d script + install -D -m755 "${srcdir}/vbox-service.rc" "${pkgdir}/etc/rc.d/vbox-service" + + # install sample config + install -D -m644 "${srcdir}/vbox-service.conf" "${pkgdir}/etc/conf.d/vbox-service" +} + +package_virtualbox-parabola-modules(){ + pkgdesc="Additions only for Parabola guests (kernel modules)" + license=('GPL') + install=virtualbox-parabola-modules.install + depends=('linux-libre>=3.0' 'linux-libre<3.1') + replaces=('virtualbox-guest-modules' 'virtualbox-archlinux-modules') + conflicts=('virtualbox-guest-modules' 'virtualbox-archlinux-modules') + provides=("virtualbox-archlinux-modules=${pkgver}") + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" + + install -D -m644 vboxguest.ko \ + "$pkgdir/lib/modules/$_kernver/misc/vboxguest.ko" + + install -D -m644 vboxsf.ko \ + "$pkgdir/lib/modules/$_kernver/misc/vboxsf.ko" + + install -D -m644 vboxvideo.ko \ + "$pkgdir/lib/modules/$_kernver/misc/vboxvideo.ko" + + install -D -m 0644 "$srcdir/60-vboxguest.rules" \ + "$pkgdir/lib/udev/rules.d/60-vboxguest.rules" + + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/virtualbox-parabola-modules.install" +} + +md5sums=('dc6e6801b3823332b6ca2e9915221aae' + 'a9f22ccaacb207e0e1c5450fede82d06' + 'b7cbcf89a30c712fed4435dea28d1703' + 'cee0c968c923760181ae060eab1c2e58' + '13ff08388a54fd48cc04523380f26af6' + '47349d711ecb5fbc105a18f9f936953b' + '0d91f80ce6a4985db8d2f8f65a61458e' + '47d6ee4f673bf31babbb7b4edb61e547' + '6df8eb5173c4f84faedb4962c4d5f0ef' + 'b978dfdbff377e00ddecb24cb3218ed2' + '2460dedb8bdce85f9d7e075742e94d24') diff --git a/libre/virtualbox/change_default_driver_dir.patch b/libre/virtualbox/change_default_driver_dir.patch new file mode 100644 index 000000000..f6dc7e1a0 --- /dev/null +++ b/libre/virtualbox/change_default_driver_dir.patch @@ -0,0 +1,19 @@ +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:11:37.903456612 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:12:41.024021274 +0000 +@@ -36,13 +36,8 @@ + //#define DEBUG_DRI_CALLS + + //@todo this could be different... +-#ifdef RT_ARCH_AMD64 +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri" ++# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri" + # define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/" +-#else +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri" +-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/" +-#endif + + #ifdef DEBUG_DRI_CALLS + #define SWDRI_SHOWNAME(pext, func) \ + diff --git a/libre/virtualbox/vbox-service.conf b/libre/virtualbox/vbox-service.conf new file mode 100644 index 000000000..31262af37 --- /dev/null +++ b/libre/virtualbox/vbox-service.conf @@ -0,0 +1,3 @@ +# VBoxService -h +VBOX_SERVICE_OPTION="" + diff --git a/libre/virtualbox/vbox-service.rc b/libre/virtualbox/vbox-service.rc new file mode 100644 index 000000000..381e3d751 --- /dev/null +++ b/libre/virtualbox/vbox-service.rc @@ -0,0 +1,40 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/vbox-service + +name=VBoxService +PID=$(pidof -o %PPID $name) + +case "$1" in + start) + stat_busy "Starting $name service" + [[ -z "$PID" ]] && ${name} $VBOX_SERVICE_OPTION &>/dev/null \ + && { add_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; + stop) + stat_busy "Stopping $name service" + [[ -n "$PID" ]] && kill $PID &>/dev/null \ + && { rm_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + status) + stat_busy "Checking $name status"; + ck_status $name + ;; + *) + echo "usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit 0 + +# vim:set ts=2 sw=2 ft=sh et: + diff --git a/libre/virtualbox/vboxbuild b/libre/virtualbox/vboxbuild new file mode 100644 index 000000000..66f5812ab --- /dev/null +++ b/libre/virtualbox/vboxbuild @@ -0,0 +1,79 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/vbox/vbox.cfg + +MODLIST=() +LOG="/var/log/vbox-install.log" +>| "$LOG" + +if [[ $INSTALL_DIR ]]; then + VBOXMANAGE=$INSTALL_DIR/VBoxManage + BUILDVBOXDRV=$INSTALL_DIR/src/vboxdrv/build_in_tmp + BUILDVBOXNETFLT=$INSTALL_DIR/src/vboxnetflt/build_in_tmp + BUILDVBOXNETADP=$INSTALL_DIR/src/vboxnetadp/build_in_tmp + BUILDVBOXPCI=$INSTALL_DIR/src/vboxpci/build_in_tmp +else + echo "error: missing vbox.cfg" + exit 1 +fi + +if [[ -f /proc/modules ]]; then + IFS=$'\n' read -r -d '' -a MODLIST < \ + <(grep -oE '^vbox(pci|netflt|netadp|drv)' /proc/modules) +fi + +if (( ${#MODLIST[*]} )); then + stat_busy "Unloading VirtualBox kernel modules" + modprobe -ar "${MODLIST[@]}" && stat_done || stat_fail +fi + +for kdir in /lib/modules/*; do + if [[ ! -d $kdir/kernel ]]; then + # found a stale kernel + mods=("$kdir/misc/vbox"{drv,netadp,netflt,pci}.ko*) + if (( ${#mods[@]} )); then + stat_busy "Removing all old VirtualBox kernel modules" + if rm -f "${mods[@]}" && + rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null; then + stat_done + else + stat_fail + fi + fi + fi +done + +# default to the currently running kernel +if (( ! $# )); then + set -- $(uname -r) +fi + +for kernver; do + export KERN_DIR=/lib/modules/$kernver/build + if [[ ! -d $KERN_DIR ]]; then + printf "error: \`%s' does not appear to be a valid kernel build directory.\n" \ + "$KERN_DIR" + continue + fi + + stat_busy "Recompiling VirtualBox kernel modules ($kernver)" + for build in BUILDVBOX{DRV,NETFLT,NETADP,PCI}; do + if ! ${!build} \ + --save-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + stat_fail + continue + fi + done + stat_done +done + +if (( ${#MODLIST[*]} )); then + stat_busy "Reloading VirtualBox kernel modules" + modprobe -a "${MODLIST[@]}" && stat_done || stat_fail +fi + + diff --git a/libre/virtualbox/vboxdrv-reference.patch b/libre/virtualbox/vboxdrv-reference.patch new file mode 100644 index 000000000..14e26d114 --- /dev/null +++ b/libre/virtualbox/vboxdrv-reference.patch @@ -0,0 +1,46 @@ +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp VirtualBox-4.1.0_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-07-19 15:11:37.730121727 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-07-19 19:02:15.658471139 +0000 +@@ -75,9 +75,8 @@ + "The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or " + "there is a permission problem with /dev/vboxdrv. Please reinstall the kernel " + "module by executing<br/><br/>" +- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>" +- "as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS " +- "package first. This package keeps track of Linux kernel changes and " ++ " <font color=blue>'/usr/bin/vboxbuild'</font><br/><br/>" ++ "as root. This package keeps track of Linux kernel changes and" + "recompiles the vboxdrv kernel module if necessary." + ); + +@@ -92,7 +91,7 @@ + "The VirtualBox kernel modules do not match this version of " + "VirtualBox. The installation of VirtualBox was apparently not " + "successful. Executing<br/><br/>" +- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>" ++ " <font color=blue>'/usr/bin/vboxbuild'</font><br/><br/>" + "may correct this. Make sure that you do not mix the " + "OSE version and the PUEL version of VirtualBox." + ); +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Installer/linux/VBox.sh VirtualBox-4.1.0_OSE/src/VBox/Installer/linux/VBox.sh +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Installer/linux/VBox.sh 2011-07-19 15:11:37.603453927 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Installer/linux/VBox.sh 2011-07-19 19:02:15.658471139 +0000 +@@ -34,7 +34,7 @@ + available for the current kernel (`uname -r`) or it failed to + load. Please recompile the kernel module and install it by + +- sudo /etc/init.d/vboxdrv setup ++ sudo /usr/bin/vboxbuild + + You will not be able to start VMs until this problem is fixed. + EOF +@@ -42,7 +42,7 @@ + cat << EOF + WARNING: The character device /dev/vboxdrv does not exist. Try + +- sudo /etc/init.d/vboxdrv restart ++ sudo /usr/bin/vboxbuild + + and if that is not successful, try to re-install the package. + + diff --git a/libre/virtualbox/virtualbox-4-makeself-check.patch b/libre/virtualbox/virtualbox-4-makeself-check.patch new file mode 100644 index 000000000..57862b41e --- /dev/null +++ b/libre/virtualbox/virtualbox-4-makeself-check.patch @@ -0,0 +1,11 @@ +--- VirtualBox-4.0.0_OSE/configure ++++ VirtualBox-4.0.0_OSE/configure +@@ -2527,7 +2527,6 @@ + check_compiler_h + [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit + # tools/common/makeself* +- [ $OSE -ge 1 ] && check_makeself + fi + + [ -n "$SETUP_WINE" ] && setup_wine + diff --git a/libre/virtualbox/virtualbox-4-mkisofs-check.patch b/libre/virtualbox/virtualbox-4-mkisofs-check.patch new file mode 100644 index 000000000..d43962148 --- /dev/null +++ b/libre/virtualbox/virtualbox-4-mkisofs-check.patch @@ -0,0 +1,11 @@ +--- VirtualBox-4.0.0_OSE/configure ++++ VirtualBox-4.0.0_OSE/configure +@@ -2499,7 +2499,6 @@ + # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs + # [ "$OS" != "darwin" ] && check_yasm + [ "$OS" != "darwin" ] && check_xsltproc +-[ "$OS" != "darwin" ] && check_mkisofs + + # the libraries + [ "$OS" != "darwin" ] && check_pthread + diff --git a/libre/virtualbox/virtualbox-parabola-modules.install b/libre/virtualbox/virtualbox-parabola-modules.install new file mode 100644 index 000000000..75d28784a --- /dev/null +++ b/libre/virtualbox/virtualbox-parabola-modules.install @@ -0,0 +1,25 @@ +KERNEL_VERSION='3.0-LIBRE' + +post_install() { + cat << EOM + +===> virtualbox-parabola-modules post-install message: +===> +===> You may want to load vboxguest, vboxsf and vboxvideo +===> +===> To load them automatically, add them +===> to the MODULES array in /etc/rc.conf. + +EOM + + depmod -v $KERNEL_VERSION >/dev/null 2>&1 +} + +post_remove() { + depmod -v $KERNEL_VERSION >/dev/null 2>&1 +} + +post_upgrade() { + depmod -v $KERNEL_VERSION >/dev/null 2>&1 +} + diff --git a/libre/virtualbox/virtualbox.install b/libre/virtualbox/virtualbox.install new file mode 100644 index 000000000..238b0561f --- /dev/null +++ b/libre/virtualbox/virtualbox.install @@ -0,0 +1,52 @@ +utils() { + if [ -x usr/bin/update-mime-database ]; then + update-mime-database usr/share/mime > /dev/null 2>&1 + fi + + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor > /dev/null 2>&1 + fi + + if [ -x usr/bin/update-desktop-database ]; then + usr/bin/update-desktop-database -q + fi +} + +post_install() { + getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers + /bin/cat << EOF + +===> In order to run VirtualBox, you have to be in the 'vboxusers' group. +===> +===> If you want to be able to install guest additions, you have to install +===> 'virtualbox-additions' package. +===> +===> You must load vboxdrv module before starting VirtualBox: +===> # modprobe vboxdrv +===> +===> For networking you must load vboxnetflt or vboxnetadp. +===> +===> For PCI passthrough support load vboxpci module. +===> +===> To load it automatically, add vboxdrv module +===> to the MODULES array in /etc/rc.conf. + +*** To compile the modules do /usr/bin/vboxbuild *** + +EOF + utils +} + +post_upgrade() { + getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers + /bin/cat << EOF +*** To recompile the modules do /usr/bin/vboxbuild *** +EOF + utils +} + +post_remove() { + groupdel vboxusers >/dev/null 2>&1 || true + utils +} + |