aboutsummaryrefslogtreecommitdiffstats
path: root/community/virtualbox-guest-modules-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-02-14 18:27:49 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-02-14 18:50:10 +0000
commit24733a94a24b056f175e65c0f4cb4903ee53e85c (patch)
treeb641bd34870ec3cacd35d55f863af3bc0259998d /community/virtualbox-guest-modules-grsec
parent3731e1ad3be31be7e8f5b70a9a023b0faaa265f1 (diff)
downloadaports-24733a94a24b056f175e65c0f4cb4903ee53e85c.tar.bz2
aports-24733a94a24b056f175e65c0f4cb4903ee53e85c.tar.xz
community/virtualbox-guest-modules-grsec: upgrade to 5.1.14 and kernel 4.9.9
Diffstat (limited to 'community/virtualbox-guest-modules-grsec')
-rw-r--r--community/virtualbox-guest-modules-grsec/APKBUILD45
-rw-r--r--community/virtualbox-guest-modules-grsec/const-struct-kernel_param.patch76
-rw-r--r--community/virtualbox-guest-modules-grsec/vboxguest-log-use-c99.patch13
3 files changed, 118 insertions, 16 deletions
diff --git a/community/virtualbox-guest-modules-grsec/APKBUILD b/community/virtualbox-guest-modules-grsec/APKBUILD
index 29175d5cd8..815bb951c7 100644
--- a/community/virtualbox-guest-modules-grsec/APKBUILD
+++ b/community/virtualbox-guest-modules-grsec/APKBUILD
@@ -7,19 +7,10 @@ _kver=4.9.9
_kpkgrel=0
# when chaning _ver we *must* bump _mypkgrel
-_ver=5.1.12
+_ver=5.1.14
_mypkgrel=0
_name=virtualbox-guest-modules
-# verify the kernel version before entering chroot
-_kapkbuild=../../linux-${_flavor}/APKBUILD
-if [ -f $_kapkbuild ]; then
- . $_kapkbuild
- pkgname=$_name-$_flavor
- [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
- [ "$_kpkgrel" != "$pkgrel" ] && die "please update _kpkgrel to $pkgrel"
-fi
-
_kpkgver="$_kver-r$_kpkgrel"
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
_abi_release_virtgrsec=${_kver}-${_kpkgrel}-virtgrsec
@@ -28,23 +19,43 @@ pkgname=${_name}-${_flavor}
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="VirtualBox Additions kernel modules for $_flavor "
-#arch='x86 x86_64'
-arch=''
+arch='x86 x86_64'
url='http://virtualbox.org'
license="GPL custom"
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
-"
+ vboxguest-log-use-c99.patch
+ const-struct-kernel_param.patch
+ "
builddir="$srcdir"/VirtualBox-$_ver
prepare() {
local i
+
+ (
+ # verify the kernel version before entering chroot
+ _kapkbuild="$startdir"/../../main/linux-${_flavor}/APKBUILD
+ if [ -f $_kapkbuild ]; then
+ . $_kapkbuild
+ pkgname=$_name-$_flavor
+ if [ "$_kver" != "$pkgver" ]; then
+ die "please update _kver to $pkgver"
+ fi
+ if [ "$_kpkgrel" != "$pkgrel" ]; then
+ die "please update _kpkgrel to $pkgrel"
+ fi
+ fi
+ ) || return 1
+
cd "$builddir"
- $builddir/src/VBox/Additions/linux/export_modules "$builddir/vbox-kmod.tar.gz"
+ default_prepare || return 1
+ "$builddir"/src/VBox/Additions/linux/export_modules \
+ "$srcdir/vbox-kmod-$_ver.tar.gz" || return 1
+
for i in $_abi_release $_abi_release_virtgrsec; do
mkdir -p "$srcdir/$i"
- tar -C "$srcdir/$i" -zxf "$builddir"/vbox-kmod.tar.gz
+ tar -C "$srcdir/$i" -zxf "$srcdir"/vbox-kmod-$_ver.tar.gz
done
}
@@ -78,4 +89,6 @@ _virtgrsec() {
"$subpkgdir"/lib/modules/
}
-sha512sums="0e63f778595aada4389a0d4f390aaa56fc1fb0ed0c4ce999f060787ce6d29462329d6543f34572111d2538cf49a54b799263fe04ebd115c2426506c28c809516 VirtualBox-5.1.12.tar.bz2"
+sha512sums="ab0646c587fa1b573a9332ca0f1959660adc02f2ecf63ac808f4a7e3ceb9b2c58adab8e309aec4630ff7fa447f47d7487e7e8d0a1f718a42d39ce71e96067fae VirtualBox-5.1.14.tar.bz2
+bd934e9ed3d2324ef66e2539d2f3f6fab35a8858d670bba817b9cabfe66e85fe13a8594b35f4a8e639841f72fb0b8d12af38518ba25638da5ef338b259ab600b vboxguest-log-use-c99.patch
+d069876f93e431833800c1d26ea77ae1dec40c840bb549cf519ceea93ee1ca89bcb262a13b00001503d19e596965d74a71a7f49be232ea892a82114d3ea4337c const-struct-kernel_param.patch"
diff --git a/community/virtualbox-guest-modules-grsec/const-struct-kernel_param.patch b/community/virtualbox-guest-modules-grsec/const-struct-kernel_param.patch
new file mode 100644
index 0000000000..d73ae16133
--- /dev/null
+++ b/community/virtualbox-guest-modules-grsec/const-struct-kernel_param.patch
@@ -0,0 +1,76 @@
+diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
+index bd81000..aa9d6b0 100644
+--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
++++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
+@@ -958,7 +958,7 @@ EXPORT_SYMBOL(VBoxGuestIDCCall);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+
+ /** log and dbg_log parameter setter. */
+-static int vgdrvLinuxParamLogGrpSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogGrpSet(const char *pszValue, const struct kernel_param *pParam)
+ {
+ if (g_fLoggerCreated)
+ {
+@@ -973,7 +973,7 @@ static int vgdrvLinuxParamLogGrpSet(const char *pszValue, struct kernel_param *p
+ }
+
+ /** log and dbg_log parameter getter. */
+-static int vgdrvLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogGrpGet(char *pszBuf, const struct kernel_param *pParam)
+ {
+ PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+ *pszBuf = '\0';
+@@ -984,7 +984,7 @@ static int vgdrvLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam)
+
+
+ /** log and dbg_log_flags parameter setter. */
+-static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, const struct kernel_param *pParam)
+ {
+ if (g_fLoggerCreated)
+ {
+@@ -998,7 +998,7 @@ static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, struct kernel_param
+ }
+
+ /** log and dbg_log_flags parameter getter. */
+-static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, const struct kernel_param *pParam)
+ {
+ PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+ *pszBuf = '\0';
+@@ -1009,7 +1009,7 @@ static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam)
+
+
+ /** log and dbg_log_dest parameter setter. */
+-static int vgdrvLinuxParamLogDstSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogDstSet(const char *pszValue, const struct kernel_param *pParam)
+ {
+ if (g_fLoggerCreated)
+ {
+@@ -1023,7 +1023,7 @@ static int vgdrvLinuxParamLogDstSet(const char *pszValue, struct kernel_param *p
+ }
+
+ /** log and dbg_log_dest parameter getter. */
+-static int vgdrvLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamLogDstGet(char *pszBuf, const struct kernel_param *pParam)
+ {
+ PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
+ *pszBuf = '\0';
+@@ -1034,7 +1034,7 @@ static int vgdrvLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam)
+
+
+ /** r3_log_to_host parameter setter. */
+-static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_param *pParam)
++static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, const struct kernel_param *pParam)
+ {
+ if ( pszValue == NULL
+ || *pszValue == '\0'
+@@ -1052,7 +1052,7 @@ static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_par
+ }
+
+ /** r3_log_to_host parameter getter. */
+-static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, struct kernel_param *pParam)
++static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, const struct kernel_param *pParam)
+ {
+ strcpy(pszBuf, g_DevExt.fLoggingEnabled ? "enabled" : "disabled");
+ return strlen(pszBuf);
diff --git a/community/virtualbox-guest-modules-grsec/vboxguest-log-use-c99.patch b/community/virtualbox-guest-modules-grsec/vboxguest-log-use-c99.patch
new file mode 100644
index 0000000000..d8af408b8a
--- /dev/null
+++ b/community/virtualbox-guest-modules-grsec/vboxguest-log-use-c99.patch
@@ -0,0 +1,13 @@
+diff --git a/src/VBox/Additions/common/VBoxGuest/linux/Makefile b/src/VBox/Additions/common/VBoxGuest/linux/Makefile
+index b403647..cd58fcb 100644
+--- a/src/VBox/Additions/common/VBoxGuest/linux/Makefile
++++ b/src/VBox/Additions/common/VBoxGuest/linux/Makefile
+@@ -108,7 +108,7 @@ endif
+
+ MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
+ -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
+- -DVBOX_WITH_HGCM
++ -DVBOX_WITH_HGCM -DLOG_USE_C99
+ ifeq ($(BUILD_TARGET_ARCH),amd64)
+ MOD_DEFS += -DRT_ARCH_AMD64
+ else