diff options
Diffstat (limited to 'community-testing/virtualbox')
-rw-r--r-- | community-testing/virtualbox/10-vboxdrv.rules | 5 | ||||
-rw-r--r-- | community-testing/virtualbox/60-vboxguest.rules | 2 | ||||
-rw-r--r-- | community-testing/virtualbox/LocalConfig.kmk | 17 | ||||
-rw-r--r-- | community-testing/virtualbox/PKGBUILD | 210 | ||||
-rw-r--r-- | community-testing/virtualbox/vboxdrv-reference.patch | 43 | ||||
-rwxr-xr-x | community-testing/virtualbox/vboxdrv.sh | 80 | ||||
-rw-r--r-- | community-testing/virtualbox/virtualbox-4-makeself-check.patch | 10 | ||||
-rw-r--r-- | community-testing/virtualbox/virtualbox-4-mkisofs-check.patch | 10 | ||||
-rw-r--r-- | community-testing/virtualbox/virtualbox-guest-modules.install | 24 | ||||
-rw-r--r-- | community-testing/virtualbox/virtualbox.install | 65 |
10 files changed, 466 insertions, 0 deletions
diff --git a/community-testing/virtualbox/10-vboxdrv.rules b/community-testing/virtualbox/10-vboxdrv.rules new file mode 100644 index 000000000..37403ae2f --- /dev/null +++ b/community-testing/virtualbox/10-vboxdrv.rules @@ -0,0 +1,5 @@ +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/community-testing/virtualbox/60-vboxguest.rules b/community-testing/virtualbox/60-vboxguest.rules new file mode 100644 index 000000000..6285f7249 --- /dev/null +++ b/community-testing/virtualbox/60-vboxguest.rules @@ -0,0 +1,2 @@ +ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600" +ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666" diff --git a/community-testing/virtualbox/LocalConfig.kmk b/community-testing/virtualbox/LocalConfig.kmk new file mode 100644 index 000000000..1a17127a0 --- /dev/null +++ b/community-testing/virtualbox/LocalConfig.kmk @@ -0,0 +1,17 @@ +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 = /opt/java diff --git a/community-testing/virtualbox/PKGBUILD b/community-testing/virtualbox/PKGBUILD new file mode 100644 index 000000000..6191165c1 --- /dev/null +++ b/community-testing/virtualbox/PKGBUILD @@ -0,0 +1,210 @@ +# $Id: PKGBUILD 42565 2011-03-17 13:26:20Z ibiru $ +#Maintainer: Ionut Biru <ibiru@archlinux.org> +pkgbase=virtualbox +pkgname=('virtualbox' 'virtualbox-guest-additions' 'virtualbox-guest-modules' 'virtualbox-sdk') +pkgver=4.0.4 +pkgrel=3 +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' 'kernel26-headers>=2.6.38' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'jdk' 'gsoap' 'vde2') +[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2 + http://download.virtualbox.org/virtualbox/${pkgver}/UserManual.pdf + virtualbox-4-makeself-check.patch virtualbox-4-mkisofs-check.patch + 10-vboxdrv.rules 60-vboxguest.rules vboxdrv-reference.patch LocalConfig.kmk vboxdrv.sh) +_kernver=2.6.38-ARCH + +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" + + 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' 'kernel26-headers' 'gcc' 'make') + optdepends=('libxt: for shared clipboard' + 'python2: for python support' + '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} + + #doc + install -m 0644 "$srcdir/UserManual.pdf" "$pkgdir/usr/share/virtualbox/UserManual.pdf" + + #Binaries and Wrapper with Launchers + install -m 0755 VBox.sh "$pkgdir/usr/bin/VBox" + ln -sf VBox "$pkgdir/usr/bin/VBoxHeadless" + ln -sf VBox "$pkgdir/usr/bin/vboxheadless" + ln -sf VBox "$pkgdir/usr/bin/VBoxManage" + ln -sf VBox "$pkgdir/usr/bin/vboxmanage" + ln -sf VBox "$pkgdir/usr/bin/VBoxSDL" + ln -sf VBox "$pkgdir/usr/bin/vboxsdl" + ln -sf VBox "$pkgdir/usr/bin/VirtualBox" + ln -sf VBox "$pkgdir/usr/bin/virtualbox" + ln -sf VBox "$pkgdir/usr/bin/vboxwebsrv" + + 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 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}/vboxdrv.sh" "${pkgdir}/etc/rc.d/vboxdrv" +} + +package_virtualbox-sdk() { + pkgdesc=" VirtualBox Software Developer Kit (SDK)" + + 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-guest-additions(){ + pkgdesc="VirtualBox user-space tools for Linux guests" + depends=("virtualbox-guest-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr') + replaces=('virtualbox-ose-additions') + conflicts=('virtualbox-ose-additions') + + 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" + install -d "$pkgdir/sbin" + install -m755 VBoxClient VBoxControl VBoxService "$pkgdir/usr/bin" + install -m755 mount.vboxsf "$pkgdir/sbin" + + install -m644 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \ + "$pkgdir"/etc/X11/xorg.conf.d/50-vboxmouse.conf + install -m644 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/linux/installer/70-xorg-vboxmouse.rules \ + "$pkgdir"/lib/udev/rules.d/70-xorg-vboxmouse.rules + 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 vboxmouse_drv_19.so \ + "$pkgdir/usr/lib/xorg/modules/input/vboxmouse.so" + install -D vboxvideo_drv_19.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" + +} +package_virtualbox-guest-modules(){ + pkgdesc="VirtualBox kernel modules for Linux guests" + license=('GPL') + install=virtualbox-guest-modules.install + depends=('kernel26>=2.6.38' 'kernel26<2.6.39') + replaces=('virtualbox-ose-additions-modules') + conflicts=('virtualbox-ose-additions-modules') + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" + + cd vboxguest + install -D -m644 vboxguest.ko \ + "$pkgdir/lib/modules/$_kernver/misc/vboxguest.ko" + + cd ../vboxsf + install -D -m644 vboxsf.ko \ + "$pkgdir/lib/modules/$_kernver/misc/vboxsf.ko" + + cd ../vboxvideo + 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-guest-modules.install" +} +md5sums=('b4770ca14d1a8cbad9b3eb0e0028ff4b' + 'bf8007eea0042f745b3c252bbe7586c2' + '44efb3c4be214daa453a317d527f1f30' + '32a232b43852b9a08cb11a7bcd64b347' + '5f85710e0b8606de967716ded7b2d351' + 'ed1341881437455d9735875ddf455fbe' + '94514e006e73cc2fa90259a4e0eec04b' + '0f3f273cdbc54db221f737ad4f761c11' + '47da2e88de582bb2bab14580a3aa47b1') diff --git a/community-testing/virtualbox/vboxdrv-reference.patch b/community-testing/virtualbox/vboxdrv-reference.patch new file mode 100644 index 000000000..ed5e7f377 --- /dev/null +++ b/community-testing/virtualbox/vboxdrv-reference.patch @@ -0,0 +1,43 @@ +--- VirtualBox-4.0.2_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp ++++ VirtualBox-4.0.2_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp +@@ -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>'/etc/rc.d/vboxdrv setup'</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>'/etc/rc.d/vboxdrv setup'</font><br/><br/>" + "may correct this. Make sure that you do not mix the " + "OSE version and the PUEL version of VirtualBox." + ); +--- VirtualBox-4.0.2_OSE/src/VBox/Installer/linux/VBox.sh ++++ VirtualBox-4.0.2_OSE/src/VBox/Installer/linux/VBox.sh +@@ -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 ++ /etc/rc.d/vboxdrv setup + + 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 ++ /etc/rc.d/vboxdrv restart + + and if that is not successful, try to re-install the package. +
\ No newline at end of file diff --git a/community-testing/virtualbox/vboxdrv.sh b/community-testing/virtualbox/vboxdrv.sh new file mode 100755 index 000000000..8de14b97f --- /dev/null +++ b/community-testing/virtualbox/vboxdrv.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/vbox/vbox.cfg + +MODLIST=() +LOG="/var/log/vbox-install.log" + +if [ -n "$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" +else + echo "missing vbox.cfg" + exit 0 +fi + +case "$1" in + setup) + stat_busy "Unloading VirtualBox kernel modules" + for module in vbox{netflt,netadp,drv}; do + if grep -q "^${module}" /proc/modules; then + MODLIST+=($module) + modprobe -r $module + fi + done + stat_done + for p in /lib/modules/*; do + if [ ! -d "$p/kernel" ]; then + if [ -e "$p/misc/vboxdrv.ko" ]; then + stat_busy "Removing old VirtualBox kernel modules from $p" + rm -f "$p/misc/vbox"{drv,netadp,netflt}.ko 2>/dev/null + rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null + stat_done + fi + fi + done + if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then + stat_busy "Removing old VirtualBox netadp kernel module" + find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then + stat_busy "Removing old VirtualBox netflt kernel module" + find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then + stat_busy "Removing old VirtualBox kernel module" + find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + stat_busy "Recompiling VirtualBox kernel modules" + if ! $BUILDVBOXDRV \ + --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" + fi + if ! $BUILDVBOXNETFLT \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + fi + if ! $BUILDVBOXNETADP \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + fi + stat_done + stat_busy "Reloading VirtualBox kernel modules" + for module in "${MODLIST[@]}"; do + modprobe $module + done + stat_done + ;; + *) + echo "usage: $0 {setup}" +esac diff --git a/community-testing/virtualbox/virtualbox-4-makeself-check.patch b/community-testing/virtualbox/virtualbox-4-makeself-check.patch new file mode 100644 index 000000000..e1fcb8c2f --- /dev/null +++ b/community-testing/virtualbox/virtualbox-4-makeself-check.patch @@ -0,0 +1,10 @@ +--- 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/community-testing/virtualbox/virtualbox-4-mkisofs-check.patch b/community-testing/virtualbox/virtualbox-4-mkisofs-check.patch new file mode 100644 index 000000000..8b0d59123 --- /dev/null +++ b/community-testing/virtualbox/virtualbox-4-mkisofs-check.patch @@ -0,0 +1,10 @@ +--- 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/community-testing/virtualbox/virtualbox-guest-modules.install b/community-testing/virtualbox/virtualbox-guest-modules.install new file mode 100644 index 000000000..3681c28e3 --- /dev/null +++ b/community-testing/virtualbox/virtualbox-guest-modules.install @@ -0,0 +1,24 @@ +KERNEL_VERSION='2.6.38-ARCH' + +post_install() { + cat << EOM + +===> virtualbox-guest-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/community-testing/virtualbox/virtualbox.install b/community-testing/virtualbox/virtualbox.install new file mode 100644 index 000000000..e70757685 --- /dev/null +++ b/community-testing/virtualbox/virtualbox.install @@ -0,0 +1,65 @@ +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 +===> +===> You must load vboxnetflt for Host Interface Networking: +===> # modprobe vboxnetflt +===> +===> You must load vboxnetadp for Host-Only networking: +===> # modprobe vboxnetadp +===> +===> To load it automatically, add vboxdrv module +===> to the MODULES array in /etc/rc.conf. + +*** To compile the modules do /etc/rc.d/vboxdrv setup *** + +EOF + utils +} + +post_upgrade() { + getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers + /bin/cat << EOF +===> You must reload vboxdrv module before starting VirtualBox: +===> # modprobe vboxdrv +===> +===> You must reload vboxnetflt for Host Interface Networking: +===> # modprobe vboxnetflt +===> +===> You must reload vboxnetadp for Host-Only networking: +===> # modprobe vboxnetadp +===> +===> To load it automatically, add vboxdrv module +===> to the MODULES array in /etc/rc.conf. + +*** To recompile the modules do /etc/rc.d/vboxdrv setup *** +EOF + utils +} + +post_remove() { + groupdel vboxusers >/dev/null 2>&1 || true + utils +} |