Commit 8792a41a authored by philm's avatar philm

update virtualbox

parent 23b862b1
......@@ -7,46 +7,48 @@
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname="virtualbox_bin"
pkgver="3.2.8"
_build="64453"
pkgname=virtualbox
pkgver=3.2.10
_build=66523
pkgrel=1
pkgdesc="Powerful x86 virtualization (Personal Use Binaries Edition)."
arch=('i686' 'x86_64')
url="http://virtualbox.org"
license=('custom:PUEL')
depends=('libidl2' 'libxcursor' 'libxinerama' 'libxslt' 'curl' 'gcc' 'make' 'kernel26-headers')
optdepends=("qt: for VirtualBox GUI"
"sdl: for VBoxSDL and VirtualBox GUI"
"libgl: for shared OpenGL"
"libxt: for shared Clipboard"
optdepends=("qt: for GUI support"
"sdl: for VBoxSDL and GUI support"
"mesa: for OpenGL support"
"libgl: for shared OpenGL support"
"libxt: for shared clipboard support"
"alsa-lib: for ALSA support"
"pulseaudio: for PulseAudio support")
provides=("virtualbox=${pkgver}")
conflicts=('virtualbox-ose' 'virtualbox-modules')
conflicts=('virtualbox-ose' 'virtualbox-modules' 'virtualbox_bin')
replaces=('virtualbox_bin')
install='virtualbox.install'
_barch='x86'
[ "$CARCH" = "x86_64" ] && _barch='amd64'
source=("VirtualBox-${pkgver}-${_build}-Linux_${_barch}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_barch}.run"
_filearch='x86'
[ "$CARCH" = "x86_64" ] && _filearch='amd64'
source=("VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run"
'10-vboxdrv.rules'
'vboxdrv')
md5sums=('6bb3ab562162c3d6150f5183010ac5e2'
md5sums=('a72291e91d521f879338559954ac8b08'
'98859bfca9ef2ebf2ea43eb9123316fc'
'160fc08a43cd9a719d306b5f023dea42')
[ "$CARCH" = "x86_64" ] && md5sums[0]='9b85875277ef728527e421b7f69f5b55'
'8b3b5fb34d5e8594ee873d7947f3d09b')
[ "$CARCH" = "x86_64" ] && md5sums[0]='4f6303fe7680bd70f49bc96a770c2bf4'
build() {
# Check and unpack the run package via sh(1)
sh "VirtualBox-${pkgver}-${_build}-Linux_${_barch}.run" --check || return 1
echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_barch}.run" --target "$srcdir" \
--nox11 --noexec &> /dev/null || return 1
sh "VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run" --check
echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_filearch}.run" --target "$srcdir" \
--nox11 --noexec &> /dev/null
# Unpack bundled files
install -d "$pkgdir/opt/VirtualBox" || return 1
install -d "$pkgdir/opt/VirtualBox"
cd "$pkgdir/opt/VirtualBox"
tar -xjf "$srcdir/VirtualBox.tar.bz2" || return 1
tar -xjf "$srcdir/VirtualBox.tar.bz2"
install -d "$pkgdir/usr/"{bin,share/applications,share/pixmaps} || return 1
install -d "$pkgdir/usr/"{bin,share/applications,share/pixmaps}
# Hardened build: Mark binaries suid root, create symlinks for working around
# unsupported $ORIGIN/.. in VBoxC.so and make sure the
......@@ -70,13 +72,13 @@ build() {
# Install the SDK (disabled, since the extension expects an UCS4-compiled
# python, while Arch Linux has an UCS2-compiled python)
#cd "$pkgdir/opt/VirtualBox/sdk/installer"
#VBOX_INSTALL_PATH="/opt/VirtualBox" python vboxapisetup.py install --root "${pkgdir}" || return 1
#VBOX_INSTALL_PATH="/opt/VirtualBox" python vboxapisetup.py install --root "${pkgdir}"
#rm -Rf build
#cd "$pkgdir/opt/VirtualBox"
rm -Rf sdk vboxshell.py VBoxPython*
# Install rc.d script for module compilation
install -Dm0755 "${srcdir}/vboxdrv" "${pkgdir}/etc/rc.d/vboxdrv" || return 1
install -Dm0755 "$srcdir/vboxdrv" "$pkgdir/etc/rc.d/vboxdrv"
# Replace init script stuff
sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/etc/rc.d/vboxdrv setup,g' \
......@@ -85,7 +87,7 @@ build() {
"$pkgdir/opt/VirtualBox/VBox.sh"
# Install udev rules
install -Dm0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" || return 1
install -Dm0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules"
# Symlink the launchers
for _bin in VirtualBox VBox{Headless,Manage,SDL,SVC,Tunctl,NetAdpCtl} rdesktop-vrdp; do
......@@ -97,10 +99,10 @@ build() {
ln -s "/opt/VirtualBox/virtualbox.desktop" "$pkgdir/usr/share/applications/VirtualBox.desktop"
# Symlink the license
install -d "$pkgdir/usr/share/licenses/$pkgname" || return 1
install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/opt/VirtualBox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL"
# Setup configuration
install -d "$pkgdir/etc/vbox" || return 1
install -d "$pkgdir/etc/vbox"
echo 'INSTALL_DIR="/opt/VirtualBox"' > "$pkgdir/etc/vbox/vbox.cfg"
}
#!/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/vboxhost/vboxdrv/build_in_tmp"
BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxhost/vboxnetflt/build_in_tmp"
BUILDVBOXNETADP="$INSTALL_DIR/src/vboxhost/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
# $1: The new package version
post_install() {
# Unload modules (if any)
for _mod in vbox{drv,netadp,netflt}; do
modprobe -r $_mod &> /dev/null
done
# Build new module
/etc/rc.d/vboxdrv setup
# Add vboxusers group, GID 108 is reserved (http://wiki.archlinux.org/index.php/UID_and_GID_list),
# Add vboxusers group, GID 108 is reserved,
# but in some systems it may be being used - please replace if needed.
groupadd -f -g 108 vboxusers
......@@ -60,11 +55,6 @@ post_upgrade() {
_NEWVERSION=`echo $1 | cut -f-1 -d '-'`
_OLDVERSION=`echo $2 | cut -f-1 -d '-'`
# Unload modules (if any)
for _mod in vbox{drv,netadp,netflt}; do
modprobe -r $_mod &> /dev/null
done
# Remove any stuff (e.g. module compilation files) from an old installation - old versions used
# to use these directories.
if [ "$_NEWVERSION" != "$_OLDVERSION" ]; then
......
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/vbox/vbox.cfg
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)
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
;;
*)
echo "usage: $0 {setup}"
esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment