summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFadeMind2015-08-05 09:04:24 +0200
committerFadeMind2015-08-05 09:04:24 +0200
commit1764f43e5c392cda8aaa9cb1649efbec4ca2ebc2 (patch)
tree84dad12e7006432d4e6a61b89ee8875328a18f47
parentef932ba19321f98f47c282634b0011d05eeec045 (diff)
downloadaur-1764f43e5c392cda8aaa9cb1649efbec4ca2ebc2.tar.gz
5.0.0-2
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD19
-rw-r--r--kernel-4.2.patch47
3 files changed, 65 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 570cb3d14218..65597e5f129a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = virtualbox-modules-mainline
pkgver = 5.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://virtualbox.org
arch = i686
arch = x86_64
@@ -12,6 +12,8 @@ pkgbase = virtualbox-modules-mainline
makedepends = virtualbox-guest-dkms>=5.0.0
depends = linux-mainline>=4.2rc1
depends = linux-mainline<4.3rc1
+ source = kernel-4.2.patch
+ sha256sums = c217050dcc52b7cadfb9db86aae9fcf2c90ac86b1cc498b91d3fdfb0a1eca80d
pkgname = virtualbox-host-modules-mainline
pkgdesc = Host kernel modules for VirtualBox running under linux-mainline
diff --git a/PKGBUILD b/PKGBUILD
index 286c948f7ef8..894df6bdf4ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgbase=virtualbox-modules-mainline
pkgname=('virtualbox-host-modules-mainline' 'virtualbox-guest-modules-mainline')
pkgver=5.0.0
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
@@ -13,16 +13,27 @@ depends=('linux-mainline>=4.2rc1' 'linux-mainline<4.3rc1')
makedepends=('dkms' 'linux-mainline-headers>=4.2rc1' 'linux-mainline-headers<4.3rc1' "virtualbox-host-dkms>=$pkgver" "virtualbox-guest-dkms>=$pkgver")
# remember to also adjust the .install files and the package deps below
_extramodules=extramodules-4.2-mainline
+source=('kernel-4.2.patch')
+sha256sums=('c217050dcc52b7cadfb9db86aae9fcf2c90ac86b1cc498b91d3fdfb0a1eca80d')
-build() {
- _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
+prepare() {
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
+
+ # workaround to patch for linux 4.2
+ # credits: Philip Müller <philm@manjaro.org>
+ rm -r $srcdir/dkms/vboxguest/$pkgver/source
+ cp -r /usr/src/vboxguest-$pkgver $srcdir/dkms/vboxguest/$pkgver/source
+ cd dkms/vboxguest/$pkgver/source
+ patch -Np1 -i $srcdir/kernel-4.2.patch
+}
+
+build() {
# build host modules
msg2 'Host modules'
dkms --dkmsframework dkms.conf build "vboxhost/$pkgver" -k "$_kernver"
- # build guest modules
+ # build guest modules
msg2 'Guest modules'
dkms --dkmsframework dkms.conf build "vboxguest/$pkgver" -k "$_kernver"
}
diff --git a/kernel-4.2.patch b/kernel-4.2.patch
new file mode 100644
index 000000000000..bedac9934b9f
--- /dev/null
+++ b/kernel-4.2.patch
@@ -0,0 +1,47 @@
+#Index: trunk/src/VBox/Additions/linux/sharedfolders/lnkops.c
+#===================================================================
+# https://raw.githubusercontent.com/manjaro/packages-extra/master/linux42-extramodules/virtualbox-modules/kernel-4.2.patch
+diff --git a/vboxsf/lnkops.c b/vboxsf/lnkops.c
+
+--- a/vboxsf/lnkops.c
++++ b/vboxsf/lnkops.c
+@@ -21,5 +21,9 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++static const char *sf_follow_link(struct dentry *dentry, void **cookie)
++# else
+ static void *sf_follow_link(struct dentry *dentry, struct nameidata *nd)
++# endif
+ {
+ struct inode *inode = dentry->d_inode;
+@@ -41,8 +45,13 @@
+ }
+ }
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++ return error ? ERR_PTR(error) : (*cookie = path);
++# else
+ nd_set_link(nd, error ? ERR_PTR(error) : path);
+ return NULL;
++# endif
+ }
+
++# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
+ static void sf_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
+ {
+@@ -51,4 +60,5 @@
+ free_page((unsigned long)page);
+ }
++#endif
+
+ struct inode_operations sf_lnk_iops =
+@@ -56,5 +66,9 @@
+ .readlink = generic_readlink,
+ .follow_link = sf_follow_link,
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++ .put_link = free_page_put_link,
++# else
+ .put_link = sf_put_link
++# endif
+ };
+