summaryrefslogtreecommitdiff
path: root/community/virtualbox
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-09 23:14:53 +0000
committerroot <root@rshg054.dnsready.net>2011-11-09 23:14:53 +0000
commit7b0cdd65ac7bcd3c7597b528a10de58e4e0a430f (patch)
tree94f5e5e8ba53712358886d7a29554a7c5d624563 /community/virtualbox
parentddba9670c1518d9b420db6a6dca01a4a4a4136c7 (diff)
Wed Nov 9 23:14:53 UTC 2011
Diffstat (limited to 'community/virtualbox')
-rw-r--r--community/virtualbox/PKGBUILD89
-rwxr-xr-xcommunity/virtualbox/vbox-service.rc4
-rwxr-xr-xcommunity/virtualbox/vboxbuild2
-rw-r--r--community/virtualbox/vboxdrv-reference.patch56
-rw-r--r--community/virtualbox/virtualbox-source.install12
-rw-r--r--community/virtualbox/virtualbox.install31
6 files changed, 92 insertions, 102 deletions
diff --git a/community/virtualbox/PKGBUILD b/community/virtualbox/PKGBUILD
index 7b0ef8200..543c856f4 100644
--- a/community/virtualbox/PKGBUILD
+++ b/community/virtualbox/PKGBUILD
@@ -1,28 +1,27 @@
-# $Id: PKGBUILD 56770 2011-10-12 05:24:02Z ibiru $
+# $Id: PKGBUILD 58218 2011-11-08 22:41:47Z ibiru $
#Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgbase=virtualbox
-pkgname=('virtualbox' 'virtualbox-archlinux-additions' 'virtualbox-archlinux-modules' 'virtualbox-sdk')
-pkgver=4.1.4
+pkgname=('virtualbox' 'virtualbox-archlinux-additions' 'virtualbox-sdk' 'virtualbox-source')
+pkgver=4.1.6
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-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'openjdk6' 'gsoap' 'vde2'
-'xorg-server-devel' 'xf86driproto' 'libxcomposite')
+makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor' 'qt=4.7.4-3' 'libidl2' 'sdl_ttf' 'alsa-lib' 'libpulse' 'libxtst'
+'xalan-c' 'sdl' 'libxmu' 'curl' 'python2' 'linux-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'openjdk6' '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
UserManual-$pkgver.pdf::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 vboxbuild
+ 10-vboxdrv.rules vboxdrv-reference.patch LocalConfig.kmk vboxbuild
change_default_driver_dir.patch vbox-service.conf vbox-service.rc)
-_kernver=3.0-ARCH
+
+_extramodules=extramodules-3.1-ARCH
+_kernver="$(cat /lib/modules/${_extramodules}/version || true)"
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"
@@ -31,23 +30,23 @@ build() {
./configure --disable-docs \
--enable-webservice \
--enable-vde \
+ --enable-vnc \
+ --nofatal \
--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-headers' 'gcc' 'make')
+ depends=('virtualbox-modules' 'libxml2' 'libxcursor' 'libidl2' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng')
optdepends=('qt: for VirtualBox GUI'
'vde2: Virtual Distributed Ethernet support'
- 'virtualbox-sdk: developer kit')
+ 'virtualbox-sdk: developer kit'
+ 'virtualbox-source: host kernel source modules for non-stock kernels')
+ backup=('etc/vbox/vbox.cfg')
replaces=('virtualbox-ose')
conflicts=('virtualbox-ose')
install=virtualbox.install
@@ -109,6 +108,20 @@ package_virtualbox() {
"$pkgdir/usr/share/licenses/virtualbox/LICENSE"
install -D -m 0644 "$srcdir/10-vboxdrv.rules" \
"$pkgdir/lib/udev/rules.d/10-vboxdrv.rules"
+}
+
+package_virtualbox-source() {
+ pkgdesc="VirtualBox kernel modules source"
+ depends=(gcc make)
+ provides=(virtualbox-modules)
+ optdepends=('linux-headers'
+ 'kernel26-lts-headers')
+ install=virtualbox-source.install
+
+ source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh"
+ mkdir -p $pkgdir/usr/lib/virtualbox
+
+ cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
#sources for modules
cp -r src ${pkgdir}/usr/lib/virtualbox
@@ -117,7 +130,7 @@ package_virtualbox() {
}
package_virtualbox-sdk() {
- pkgdesc=" VirtualBox Software Developer Kit (SDK)"
+ pkgdesc="VirtualBox Software Developer Kit (SDK)"
depends=('python2')
mkdir -p "$pkgdir/usr/lib/virtualbox"
@@ -165,42 +178,12 @@ package_virtualbox-archlinux-additions(){
# install sample config
install -D -m644 "${srcdir}/vbox-service.conf" "${pkgdir}/etc/conf.d/vbox-service"
}
-
-package_virtualbox-archlinux-modules(){
- pkgdesc="Additions only for Arch Linux guests (kernel modules)"
- license=('GPL')
- install=virtualbox-archlinux-modules.install
- depends=('linux>=3.0' 'linux<3.1')
- 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"
-
- 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-archlinux-modules.install"
-}
-md5sums=('dc6e6801b3823332b6ca2e9915221aae'
- 'bc048d1e58d84ece4a186199ee48d4c8'
- '44efb3c4be214daa453a317d527f1f30'
- '32a232b43852b9a08cb11a7bcd64b347'
+md5sums=('89b979d1b817242c7cdcb489898f166a'
+ 'af534f713993eb077df26ff9a44fb080'
'5f85710e0b8606de967716ded7b2d351'
- 'ed1341881437455d9735875ddf455fbe'
- 'cc3f278bc273011aa95277500a76f677'
+ '6ab2455c391d8cc005e2f4461ae26a3b'
'78ffa67ff131680f1d2b6f06d4325c5b'
- 'dda3811f7d94ac55f12b4de707a7c2c2'
+ 'a82d698e7868315cdf876cfb02fd2268'
'97e193f050574dd272a38e5ee5ebe62b'
'3c08ad30b89add47d3f45121200a5360'
- '778d865e56e31cc592fbfa257fdcfce7')
+ 'e7416331d0bc331f3b5aae3e5d104642')
diff --git a/community/virtualbox/vbox-service.rc b/community/virtualbox/vbox-service.rc
index c1af2134d..6f1b8d892 100755
--- a/community/virtualbox/vbox-service.rc
+++ b/community/virtualbox/vbox-service.rc
@@ -11,13 +11,13 @@ case "$1" in
start)
stat_busy "Starting $name service"
[[ -z "$PID" ]] && ${name} $VBOX_SERVICE_OPTION &>/dev/null \
- && { add_daemon $name; stat_done; } \
+ && { add_daemon vbox-service; stat_done; } \
|| { stat_fail; exit 1; }
;;
stop)
stat_busy "Stopping $name service"
[[ -n "$PID" ]] && kill $PID &>/dev/null \
- && { rm_daemon $name; stat_done; } \
+ && { rm_daemon vbox-service; stat_done; } \
|| { stat_fail; exit 1; }
;;
restart)
diff --git a/community/virtualbox/vboxbuild b/community/virtualbox/vboxbuild
index 1058744c5..cfc3c0a66 100755
--- a/community/virtualbox/vboxbuild
+++ b/community/virtualbox/vboxbuild
@@ -29,7 +29,7 @@ if (( ${#MODLIST[*]} )); then
modprobe -ar "${MODLIST[@]}" && stat_done || stat_fail
fi
-for kdir in /lib/modules/*; do
+for kdir in /lib/modules/[2-3]*; do
if [[ ! -d $kdir/kernel ]]; then
# found a stale kernel
mods=("$kdir/misc/vbox"{drv,netadp,netflt,pci}.ko*)
diff --git a/community/virtualbox/vboxdrv-reference.patch b/community/virtualbox/vboxdrv-reference.patch
index c310dbc8d..710e2e511 100644
--- a/community/virtualbox/vboxdrv-reference.patch
+++ b/community/virtualbox/vboxdrv-reference.patch
@@ -1,45 +1,57 @@
-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 @@
+diff -Nur VirtualBox-4.1.6_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp VirtualBox-4.1.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp
+--- VirtualBox-4.1.6_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-11-04 17:22:13.636083176 +0000
++++ VirtualBox-4.1.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-11-04 17:48:58.915541368 +0000
+@@ -75,10 +75,9 @@
"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."
+- "as root. If it is available in your distribution, you should install the "
+- "DKMS package first. This package keeps track of Linux kernel changes and "
+- "recompiles the vboxdrv kernel module if necessary."
++ " <font color=blue>'pacman -S virtualbox-modules'</font><br/><br/>"
++ "as root. If you don't use our stock kernel, install virtualbox-source and"
++ "execute /usr/bin/vboxbuild ."
);
-@@ -92,7 +91,7 @@
+ QString g_QStrHintOtherWrongDriverVersion = QApplication::tr(
+@@ -90,11 +89,8 @@
+
+ QString g_QStrHintLinuxWrongDriverVersion = QApplication::tr(
"The VirtualBox kernel modules do not match this version of "
- "VirtualBox. The installation of VirtualBox was apparently not "
- "successful. Executing<br/><br/>"
+- "VirtualBox. The installation of VirtualBox was apparently not "
+- "successful. Executing<br/><br/>"
- " <font color=blue>'/etc/init.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. Reload the modules or if you don't use our stock kernel execute<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 @@
+
+ QString g_QStrHintOtherNoDriver = QApplication::tr(
+diff -Nur VirtualBox-4.1.6_OSE.orig/src/VBox/Installer/linux/VBox.sh VirtualBox-4.1.6_OSE/src/VBox/Installer/linux/VBox.sh
+--- VirtualBox-4.1.6_OSE.orig/src/VBox/Installer/linux/VBox.sh 2011-11-04 17:22:13.549415814 +0000
++++ VirtualBox-4.1.6_OSE/src/VBox/Installer/linux/VBox.sh 2011-11-04 17:56:50.735874087 +0000
+@@ -32,17 +32,18 @@
+ cat << EOF
+ WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (`uname -r`) or it failed to
- load. Please recompile the kernel module and install it by
+- load. Please recompile the kernel module and install it by
++ load. Please reinstall the kernel module virtualbox-modules or
++ if you don't use our stock kernel compile the modules with
- 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 @@
+ elif [ ! -c /dev/vboxdrv ]; then
cat << EOF
- WARNING: The character device /dev/vboxdrv does not exist. Try
+-WARNING: The character device /dev/vboxdrv does not exist. Try
++WARNING: The character device /dev/vboxdrv does not exist. Try to load the module
- sudo /etc/init.d/vboxdrv restart
-+ sudo /usr/bin/vboxbuild
++ sudo modprobe vboxdrv
and if that is not successful, try to re-install the package.
diff --git a/community/virtualbox/virtualbox-source.install b/community/virtualbox/virtualbox-source.install
new file mode 100644
index 000000000..24d90b1c2
--- /dev/null
+++ b/community/virtualbox/virtualbox-source.install
@@ -0,0 +1,12 @@
+post_install() {
+/bin/cat << EOF
+===> To compile the modules do /usr/bin/vboxbuild
+EOF
+
+}
+
+post_upgrade() {
+/bin/cat << EOF
+===> To recompile the modules do /usr/bin/vboxbuild
+EOF
+}
diff --git a/community/virtualbox/virtualbox.install b/community/virtualbox/virtualbox.install
index 0eac014f2..c794b857d 100644
--- a/community/virtualbox/virtualbox.install
+++ b/community/virtualbox/virtualbox.install
@@ -14,35 +14,18 @@ utils() {
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
+ 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 ***
+ utils
+ if [ "$(vercmp $2 4.1.6-1)" -lt 0 ]; then
+/bin/cat << EOF
+===> Starting with virtualbox version 4.1.6-1, kernel modules handling is done by virtualbox-modules.
+===> Use virtualbox-source package if you don't use our stock linux package.
EOF
- utils
+ fi
}
post_remove() {