diff options
author | FadeMind | 2015-08-05 09:04:24 +0200 |
---|---|---|
committer | FadeMind | 2015-08-05 09:04:24 +0200 |
commit | 1764f43e5c392cda8aaa9cb1649efbec4ca2ebc2 (patch) | |
tree | 84dad12e7006432d4e6a61b89ee8875328a18f47 | |
parent | ef932ba19321f98f47c282634b0011d05eeec045 (diff) | |
download | aur-1764f43e5c392cda8aaa9cb1649efbec4ca2ebc2.tar.gz |
5.0.0-2
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | kernel-4.2.patch | 47 |
3 files changed, 65 insertions, 5 deletions
@@ -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 @@ -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 + }; + |