diff options
author | root <root@rshg047.dnsready.net> | 2011-07-20 23:12:48 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-07-20 23:12:48 +0000 |
commit | 34b339c5913a55cb5bac8a502696fcd3f54aac0f (patch) | |
tree | 9713cc16d431b99b598b3d019281b713ab07420a /community/virtualbox | |
parent | 3da6b13f1eb136d0899bd2e8dd217048bb4d9030 (diff) |
Wed Jul 20 23:12:48 UTC 2011
Diffstat (limited to 'community/virtualbox')
-rw-r--r-- | community/virtualbox/PKGBUILD | 67 | ||||
-rw-r--r-- | community/virtualbox/change_default_driver_dir.patch | 10 | ||||
-rw-r--r-- | community/virtualbox/vboxdrv-reference.patch | 20 | ||||
-rwxr-xr-x | community/virtualbox/vboxdrv.sh | 14 | ||||
-rw-r--r-- | community/virtualbox/virtualbox-archlinux-modules.install | 24 | ||||
-rw-r--r-- | community/virtualbox/virtualbox.install | 22 |
6 files changed, 83 insertions, 74 deletions
diff --git a/community/virtualbox/PKGBUILD b/community/virtualbox/PKGBUILD index 4d2916ec1..589b5b720 100644 --- a/community/virtualbox/PKGBUILD +++ b/community/virtualbox/PKGBUILD @@ -1,21 +1,20 @@ -# $Id: PKGBUILD 51807 2011-07-15 20:01:05Z ibiru $ +# $Id: PKGBUILD 52077 2011-07-19 22:16:29Z ibiru $ #Maintainer: Ionut Biru <ibiru@archlinux.org> pkgbase=virtualbox -pkgname=('virtualbox' 'virtualbox-guest-additions' 'virtualbox-guest-modules' 'virtualbox-sdk') -pkgver=4.0.12 -pkgrel=1 +pkgname=('virtualbox' 'virtualbox-archlinux-additions' 'virtualbox-archlinux-modules' 'virtualbox-sdk') +pkgver=4.1.0 +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' 'kernel26-headers>=2.6.38' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'jdk' 'gsoap' 'vde2' +'xalan-c' 'sdl' 'libxmu' 'curl' 'python2' 'kernel26-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'jdk' 'gsoap' 'vde2' 'xorg-server-devel' 'xf86driproto' 'libxcomposite') [[ $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 - 18-system-xorg.patch change_default_driver_dir.patch) _kernver=2.6.39-ARCH @@ -25,7 +24,6 @@ build() { 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/18-system-xorg.patch" patch -Np1 -i "$srcdir/change_default_driver_dir.patch" cp "$srcdir/LocalConfig.kmk" . @@ -64,18 +62,10 @@ package_virtualbox() { #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" - ln -sf VBox "$pkgdir/usr/bin/VBoxBalloonCtrl" - ln -sf VBox "$pkgdir/usr/bin/vboxballoonctrl" + 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 @@ -143,18 +133,18 @@ package_virtualbox-sdk() { 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') + +package_virtualbox-archlinux-additions(){ + pkgdesc="Additions only for Arch Linux guests (userspace tools)" + depends=("virtualbox-archlinux-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr') + replaces=('virtualbox-guest-additions') + conflicts=('virtualbox-guest-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 -d "$pkgdir"/{usr/bin,sbin} install -m755 VBoxClient VBoxControl VBoxService "$pkgdir/usr/bin" install -m755 mount.vboxsf "$pkgdir/sbin" @@ -176,43 +166,40 @@ package_virtualbox-guest-additions(){ install -m755 -D pam_vbox.so "$pkgdir/lib/security/pam_vbox.so" } -package_virtualbox-guest-modules(){ - pkgdesc="VirtualBox kernel modules for Linux guests" + +package_virtualbox-archlinux-modules(){ + pkgdesc="Additions only for Arch Linux guests (kernel modules)" license=('GPL') - install=virtualbox-guest-modules.install + install=virtualbox-archlinux-modules.install depends=('kernel26>=2.6.39' 'kernel26<2.6.40') - replaces=('virtualbox-ose-additions-modules') - conflicts=('virtualbox-ose-additions-modules') + replaces=('virtualbox-guest-modules') + conflicts=('virtualbox-guest-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" + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/virtualbox-archlinux-modules.install" } -md5sums=('5b39b99c2a36c96a062913e8ac67c60f' - '34cfb9a430a231a274aba3550c3d0e00' +md5sums=('02556a6b4877cfdfbaa3ce0a0c0dcf31' + '24056c13ddbe2c9b5d135e8c96a53a11' '44efb3c4be214daa453a317d527f1f30' '32a232b43852b9a08cb11a7bcd64b347' '5f85710e0b8606de967716ded7b2d351' 'ed1341881437455d9735875ddf455fbe' - '9bde5b7dfba5abcd49768052c5409800' + '4cf75d9c091199a47a7a1bc2f4e347d9' 'c1a07f044c476a190af8486fe78bee0f' - '47da2e88de582bb2bab14580a3aa47b1' - '8a22b33c9dfaf8fb79bb2d26304e650b' - 'ac43f7cf44b934d8dbdbc3bb6f7879ad') + '838c4c4ebe11b34ae2168df5cd06f694' + '97e193f050574dd272a38e5ee5ebe62b') diff --git a/community/virtualbox/change_default_driver_dir.patch b/community/virtualbox/change_default_driver_dir.patch index 71930f062..d8531499d 100644 --- a/community/virtualbox/change_default_driver_dir.patch +++ b/community/virtualbox/change_default_driver_dir.patch @@ -1,16 +1,16 @@ -diff -Nur VirtualBox-4.0.8_OSE.orig//src/VBox/Additions/common/crOpenGL/fakedri_drv.c VirtualBox-4.0.8_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c ---- VirtualBox-4.0.8_OSE.orig//src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-05-18 04:28:14.545495222 -0700 -+++ VirtualBox-4.0.8_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-05-18 04:29:57.945499707 -0700 +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" +-# 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" +-# 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 diff --git a/community/virtualbox/vboxdrv-reference.patch b/community/virtualbox/vboxdrv-reference.patch index e7a9179a9..05d840f05 100644 --- a/community/virtualbox/vboxdrv-reference.patch +++ b/community/virtualbox/vboxdrv-reference.patch @@ -1,6 +1,6 @@ -diff -Nur VirtualBox-4.0.6_OSE.orig//src/VBox/Frontends/VirtualBox/src/main.cpp VirtualBox-4.0.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp ---- VirtualBox-4.0.6_OSE.orig//src/VBox/Frontends/VirtualBox/src/main.cpp 2011-04-21 03:31:05.000000000 -0700 -+++ VirtualBox-4.0.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-04-21 11:10:00.503832646 -0700 +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 " @@ -8,7 +8,7 @@ diff -Nur VirtualBox-4.0.6_OSE.orig//src/VBox/Frontends/VirtualBox/src/main.cpp - " <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/>" ++ " <font color=blue>'rc.d setup vboxdrv'</font><br/><br/>" + "as root. This package keeps track of Linux kernel changes and" "recompiles the vboxdrv kernel module if necessary." ); @@ -18,19 +18,19 @@ diff -Nur VirtualBox-4.0.6_OSE.orig//src/VBox/Frontends/VirtualBox/src/main.cpp "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/>" ++ " <font color=blue>'rc.d setup vboxdrv'</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.0.6_OSE.orig//src/VBox/Installer/linux/VBox.sh VirtualBox-4.0.6_OSE/src/VBox/Installer/linux/VBox.sh ---- VirtualBox-4.0.6_OSE.orig//src/VBox/Installer/linux/VBox.sh 2011-04-21 03:31:18.000000000 -0700 -+++ VirtualBox-4.0.6_OSE/src/VBox/Installer/linux/VBox.sh 2011-04-21 11:10:00.503832646 -0700 +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 -+ /etc/rc.d/vboxdrv setup ++ sudo rc.d setup vboxdrv You will not be able to start VMs until this problem is fixed. EOF @@ -39,7 +39,7 @@ diff -Nur VirtualBox-4.0.6_OSE.orig//src/VBox/Installer/linux/VBox.sh VirtualBox WARNING: The character device /dev/vboxdrv does not exist. Try - sudo /etc/init.d/vboxdrv restart -+ /etc/rc.d/vboxdrv restart ++ sudo rc.d restart vboxdrv and if that is not successful, try to re-install the package. diff --git a/community/virtualbox/vboxdrv.sh b/community/virtualbox/vboxdrv.sh index 8de14b97f..5eb7ecb89 100755 --- a/community/virtualbox/vboxdrv.sh +++ b/community/virtualbox/vboxdrv.sh @@ -12,6 +12,7 @@ if [ -n "$INSTALL_DIR" ]; then 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 "missing vbox.cfg" exit 0 @@ -31,7 +32,7 @@ case "$1" in 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 + rm -f "$p/misc/vbox"{drv,netadp,netflt,pci}.ko 2>/dev/null rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null stat_done fi @@ -52,6 +53,12 @@ case "$1" in find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null stat_done fi + if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then + stat_busy "Removing old VirtualBox pci kernel module" + find /lib/modules/`uname -r` -name "vboxpci\.*" 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 \ @@ -68,6 +75,11 @@ case "$1" in --no-print-directory install >> $LOG 2>&1; then echo "Look at $LOG to find out what went wrong" fi + if ! $BUILDVBOXPCI \ + --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 diff --git a/community/virtualbox/virtualbox-archlinux-modules.install b/community/virtualbox/virtualbox-archlinux-modules.install new file mode 100644 index 000000000..8faef400e --- /dev/null +++ b/community/virtualbox/virtualbox-archlinux-modules.install @@ -0,0 +1,24 @@ +KERNEL_VERSION='2.6.39-ARCH' + +post_install() { + cat << EOM + +===> virtualbox-archlinux-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/virtualbox/virtualbox.install b/community/virtualbox/virtualbox.install index e70757685..97a1b52f9 100644 --- a/community/virtualbox/virtualbox.install +++ b/community/virtualbox/virtualbox.install @@ -24,16 +24,14 @@ post_install() { ===> You must load vboxdrv module before starting VirtualBox: ===> # modprobe vboxdrv ===> -===> You must load vboxnetflt for Host Interface Networking: -===> # modprobe vboxnetflt +===> For networking you must load vboxnetflt or vboxnetadp. ===> -===> You must load vboxnetadp for Host-Only networking: -===> # modprobe 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 /etc/rc.d/vboxdrv setup *** +*** To compile the modules do rc.d setup vboxdrv *** EOF utils @@ -42,19 +40,7 @@ EOF 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 *** +*** To recompile the modules do rc.d setup vboxdrv *** EOF utils } |