Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/virtualbox-guest-modules-grsec: Fix build for virtgrsec kernel.

From: Ben Allen <bensallen_at_me.com>
Date: Sat, 31 Dec 2016 06:02:25 +0000

Requires linux-virtgrsec-dev-4.4.39-r4 or newer to compile.
---
 testing/virtualbox-guest-modules-grsec/APKBUILD | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/testing/virtualbox-guest-modules-grsec/APKBUILD b/testing/virtualbox-guest-modules-grsec/APKBUILD
index df63a2742f..ab643a0cab 100644
--- a/testing/virtualbox-guest-modules-grsec/APKBUILD
+++ b/testing/virtualbox-guest-modules-grsec/APKBUILD
_at_@ -8,7 +8,7 @@ _kpkgrel=4
 
 # when chaning _ver we *must* bump _mypkgrel
 _ver=5.1.12
-_mypkgrel=1
+_mypkgrel=2
 _name=virtualbox-guest-modules
 
 # verify the kernel version before entering chroot
_at_@ -31,7 +31,7 @@ pkgdesc="VirtualBox Additions kernel modules for $_flavor "
 arch='x86 x86_64'
 url='http://virtualbox.org'
 license="GPL custom"
-makedepends="linux-grsec-dev=$_kpkgver sed coreutils"
+makedepends="linux-grsec-dev=$_kpkgver linux-virtgrsec-dev=$_kpkgver sed coreutils"
 subpackages="$_name-virtgrsec:_virtgrsec"
 source="http://download.virtualbox.org/virtualbox/$_ver/VirtualBox-$_ver.tar.bz2
 "
_at_@ -41,7 +41,6 @@ prepare() {
 	local i
 	cd "$builddir"
 	$builddir/src/VBox/Additions/linux/export_modules "$builddir/vbox-kmod.tar.gz"
-	tar -xf "$builddir/vbox-kmod.tar.gz"
 	for i in $_abi_release $_abi_release_virtgrsec; do
 		mkdir -p "$srcdir/$i"
 		tar -C "$srcdir/$i" -zxf "$builddir"/vbox-kmod.tar.gz
_at_@ -53,7 +52,7 @@ build() {
 	for i in $_abi_release $_abi_release_virtgrsec; do
 		cd "$srcdir/$i"
 		# Build Kernel Modules
-		make KERN_DIR=/lib/modules/${_abi_release}/build \
+		make KERN_DIR=/lib/modules/${i}/build \
 			|| return 1
 	done
 }
_at_@ -72,6 +71,8 @@ package() {
 _virtgrsec() {
 	pkgdesc="VirtualBox Additions kernel modules for virtgrsec"
 	mkdir -p "$subpkgdir"/lib/modules/
+	# vboxvideo.ko won't load with virtgrsec kernel as it doesn't have DRM
+	rm "$pkgdir"/lib/modules/$_abi_release_virtgrsec/misc/vboxvideo.ko
 	mv "$pkgdir"/lib/modules/$_abi_release_virtgrsec \
 		"$subpkgdir"/lib/modules/
 }
-- 
2.11.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Dec 31 2016 - 06:02:25 GMT