diff options
author | Roel Brook | 2016-07-13 00:24:55 +0200 |
---|---|---|
committer | Roel Brook | 2016-07-13 00:24:55 +0200 |
commit | bcbd234acc0b28e24de4ef2325fa479ea3d7fb97 (patch) | |
tree | 7cbe33a2293f662320fb62ae868036ac8d7f0ec4 | |
parent | 85ddebabc734ea29182a910d4ac1a2476770bc69 (diff) | |
download | aur-bcbd234acc0b28e24de4ef2325fa479ea3d7fb97.tar.gz |
Update to 5.1.0.
Aligned PKGBUILD actions to mirror Oracle installation script
Provided manual DKMS configuration. Oracle has stopped using DKMS from 5.1.0 onwards, but don't provide instructions on how to build them except for the installation script. DKMS will provide automatic rebuilding etc on upgrades, so it seemed the best solution here.
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | dkms.conf | 35 | ||||
-rw-r--r-- | do_dkms | 67 |
4 files changed, 133 insertions, 23 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Tue Jun 28 22:22:58 UTC 2016 +# Tue Jul 12 22:24:45 UTC 2016 pkgbase = virtualbox-bin pkgdesc = Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version) - pkgver = 5.0.24 + pkgver = 5.1.0 pkgrel = 1 url = http://virtualbox.org/ install = install @@ -21,7 +21,7 @@ pkgbase = virtualbox-bin depends = python2 depends = sdl optdepends = virtualbox-ext-oracle: for Oracle extensions - provides = virtualbox=5.0.24 + provides = virtualbox=5.1.0 conflicts = virtualbox conflicts = virtualbox-ose conflicts = virtualbox-modules @@ -31,16 +31,20 @@ pkgbase = virtualbox-bin options = !strip backup = etc/vbox/vbox.cfg backup = etc/conf.d/vboxweb - source = VirtualBox-5.0.24-108355-Linux_amd64.run::http://download.virtualbox.org/virtualbox/5.0.24/VirtualBox-5.0.24-108355-Linux_amd64.run + source = VirtualBox-5.1.0-108711-Linux_amd64.run::http://download.virtualbox.org/virtualbox/5.1.0/VirtualBox-5.1.0-108711-Linux_amd64.run source = VBoxFixUSB source = 10-vboxdrv.rules source = vboxweb.rc source = vboxweb.conf - md5sums = 1de2b51bec7741a5ea7f721f5a32d3ec + source = do_dkms + source = dkms.conf + md5sums = 0e674d323c616636334eb9c7653727d0 md5sums = 2d04c2e2d8c71558c910a51ec773731a md5sums = fe60f9510502bea67383d9198ae8c13c md5sums = c159d683ba1947290fc2ad2c64194150 md5sums = 3ac185709bfe688bb753c46e170d0546 + md5sums = 31144fa409c0d7c6b464d44b2140b521 + md5sums = 05175249e1206c491b2b36670e8db9ec pkgname = virtualbox-bin @@ -2,8 +2,8 @@ # Original script by: M0Rf30 pkgname=virtualbox-bin -pkgver=5.0.24 -_build=108355 +pkgver=5.1.0 +_build=108711 pkgrel=1 pkgdesc='Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version)' arch=('i686' 'x86_64') @@ -37,36 +37,39 @@ source=( '10-vboxdrv.rules' 'vboxweb.rc' 'vboxweb.conf' + 'do_dkms' + 'dkms.conf' ) -md5sums=('1de2b51bec7741a5ea7f721f5a32d3ec' +md5sums=('0e674d323c616636334eb9c7653727d0' '2d04c2e2d8c71558c910a51ec773731a' 'fe60f9510502bea67383d9198ae8c13c' 'c159d683ba1947290fc2ad2c64194150' - '3ac185709bfe688bb753c46e170d0546') + '3ac185709bfe688bb753c46e170d0546' + '31144fa409c0d7c6b464d44b2140b521' + '05175249e1206c491b2b36670e8db9ec') _installdir='/opt/VirtualBox' package() { # Check and unpack the run package via sh(1) - sh "VirtualBox-$pkgver-$_build-Linux_$_arch.run" --check echo yes | sh "VirtualBox-$pkgver-$_build-Linux_$_arch.run" --target "$srcdir" \ --nox11 --noexec &> /dev/null # Unpack bundled files install -d "$pkgdir/$_installdir" - cd "$pkgdir/$_installdir" - tar -xjf "$srcdir/VirtualBox.tar.bz2" + tar -jxf "$srcdir/VirtualBox.tar.bz2" -C "$pkgdir/$_installdir" # Hardened build: Mark binaries suid root, create symlinks for working around # unsupported $ORIGIN/.. in VBoxC.so and make sure the # directory is only writable by the user (paranoid). - chmod 4511 VirtualBox VBox{SDL,Headless,NetDHCP,NetAdpCtl} - for _lib in VBox{VMM,REM,RT,DDU,XPCOM}.so; do + cd "$pkgdir/$_installdir" + chmod 4511 VirtualBox VBox{SDL,Headless,NetDHCP,NetNAT,NetAdpCtl,VolInfo} + for _lib in VBox{VMM,RT}.so; do ln -sf "$_installdir/$_lib" "components/$_lib" done - chmod go-w . + chmod go-w "$pkgdir/$_installdir" # Install the SDK pushd 'sdk/installer' @@ -76,10 +79,10 @@ package() { # Install udev rules install -D -m 0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/usr/lib/udev/rules.d/10-vboxdrv.rules" - # we need to move and not symlink VBoxCreateUSBNode.sh in /usr/lib/udev to avoid udevd + # we need to copy and not symlink VBoxCreateUSBNode.sh in /usr/lib/udev to avoid udevd # to look /opt when /opt is not mounted. This can be done until VBoxCreateUSBNode.sh doesn't # need more stuff from /opt - mv VBoxCreateUSBNode.sh "$pkgdir/usr/lib/udev/" + cp VBoxCreateUSBNode.sh "$pkgdir/usr/lib/udev/" # Install Fixusb script install -D -m 0755 "$srcdir/VBoxFixUSB" VBoxFixUSB @@ -87,12 +90,6 @@ package() { # Patch "vboxshell.py" to use Python 2.x instead of Python 3 sed -i 's#/usr/bin/python#\02#' vboxshell.py - # Update Arch initscripts way of life in VBox.sh - sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/etc/rc.d/dkms start,g' \ - "$pkgdir/$_installdir/VBox.sh" - sed -i -e 's,sudo /etc/init.d/vboxdrv restart,/etc/rc.d/dkms start,g' \ - "$pkgdir/$_installdir/VBox.sh" - # Install vboxweb initscript install -D -m 0755 "$srcdir/vboxweb.rc" "$pkgdir/etc/rc.d/vboxweb" install -D -m 0644 "$srcdir/vboxweb.conf" "$pkgdir/etc/conf.d/vboxweb" @@ -134,6 +131,13 @@ package() { done popd + # With the relase of VBox 5.1.0, Oracle dropped DKMS from their package + # We will restore DKMS with the use of these config files + install -m 0755 "${srcdir}/do_dkms" "${pkgdir}/${_installdir}/src/vboxhost/do_dkms" + # Update module version + sed -i "s/PACKAGE_VERSION=/PACKAGE_VERSION=${pkgver}/" "${srcdir}/dkms.conf" + install -m 0644 "${srcdir}/dkms.conf" "${pkgdir}/${_installdir}/src/vboxhost/dkms.conf" + # module sources in /usr/src install -d -m 0755 "${pkgdir}/usr/src" mv "${pkgdir}/${_installdir}/src/vboxhost" "${pkgdir}/usr/src/vboxhost-${pkgver}" diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 000000000000..1b0a07b95d82 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,35 @@ +## @file +# Linux DKMS config script for the VirtualBox guest kernel modules +# + +# +# Copyright (C) 2006-2015 Oracle Corporation +# +# 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. +# + +PACKAGE_NAME="vboxhost" +PACKAGE_VERSION= +AUTOINSTALL=yes + +BUILT_MODULE_NAME[0]="vboxdrv" +BUILT_MODULE_LOCATION[0]="vboxdrv" +DEST_MODULE_LOCATION[0]="/kernel/misc" + +BUILT_MODULE_NAME[1]="vboxnetflt" +BUILT_MODULE_LOCATION[1]="vboxnetflt" +DEST_MODULE_LOCATION[1]="/kernel/misc" + +BUILT_MODULE_NAME[2]="vboxnetadp" +BUILT_MODULE_LOCATION[2]="vboxnetadp" +DEST_MODULE_LOCATION[2]="/kernel/misc" + +BUILT_MODULE_NAME[3]="vboxpci" +BUILT_MODULE_LOCATION[3]="vboxpci" +DEST_MODULE_LOCATION[3]="/kernel/misc" diff --git a/do_dkms b/do_dkms new file mode 100644 index 000000000000..cc9c7d676051 --- /dev/null +++ b/do_dkms @@ -0,0 +1,67 @@ +#!/bin/sh + +# +# Script to register/build/unregister a kernel module with DKMS. +# +# Copyright (C) 2010-2015 Oracle Corporation +# +# 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. +# + +ACTION= +if [ "$1" = "install" ]; then + ACTION="install" + MODULE="$2" + VERSION="$3" +elif [ "$1" = "uninstall" ]; then + shift + ACTION="uninstall" + OLDMODULES="$*" + break +fi + +DKMS=`which dkms 2>/dev/null` +if [ -n "$DKMS" ] +then + if [ "$ACTION" = "uninstall" ]; then + + echo "Uninstalling modules from DKMS" + for m in $OLDMODULES + do + $DKMS status -m $m | while read line + # first, remove _any_ old module + do + if echo "$line" | grep -q added > /dev/null || + echo "$line" | grep -q built > /dev/null || + echo "$line" | grep -q installed > /dev/null; then + # either 'vboxvideo, <version>: added' + # or 'vboxvideo, <version>, ...: installed' + version=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"` + echo " removing old DKMS module $m version $version" + $DKMS remove -m $m -v $version --all + fi + done + done + exit 0 + + elif [ "$ACTION" = "install" ]; then + + echo "Attempting to install using DKMS" + if $DKMS add -m $MODULE -v $VERSION && + $DKMS build -m $MODULE -v $VERSION && + $DKMS install -m $MODULE -v $VERSION --force + then + exit 0 + fi + echo "Failed to install using DKMS, attempting to install without" + + fi +fi + +exit 1 |