aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-10-26 10:48:18 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-10-26 10:50:47 +0000
commitfa226c3ed1292d395332fa2af851fe2f7f9173cf (patch)
tree87b74ed60f037c1176dc92c66139d226c42b2aaa /main
parent9badcafb35e02b6d67fb39a9500424834d1589d9 (diff)
downloadaports-fa226c3ed1292d395332fa2af851fe2f7f9173cf.tar.bz2
aports-fa226c3ed1292d395332fa2af851fe2f7f9173cf.tar.xz
main/open-vm-tools-grsec: upgrade to 2011.09.23
patch vmci driver https://bugs.gentoo.org/show_bug.cgi?id=386721
Diffstat (limited to 'main')
-rw-r--r--main/open-vm-tools-grsec/APKBUILD19
-rw-r--r--main/open-vm-tools-grsec/vmci_driver_c.patch56
2 files changed, 69 insertions, 6 deletions
diff --git a/main/open-vm-tools-grsec/APKBUILD b/main/open-vm-tools-grsec/APKBUILD
index 8f719ec34..70f84d020 100644
--- a/main/open-vm-tools-grsec/APKBUILD
+++ b/main/open-vm-tools-grsec/APKBUILD
@@ -24,13 +24,14 @@ pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
-arch=""
+arch="all"
license="LGPL"
subpackages=""
depends="linux-${_flavor}=${_kernelver}"
makedepends="glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$_realver-$_realsubver.tar.gz
vmware-modules.initd
+ vmci_driver_c.patch
"
install_if="linux-${_flavor}=${_kernelver} open-vm-tools"
@@ -38,6 +39,11 @@ _builddir="$srcdir/$_realname-$_realver-$_realsubver"
prepare() {
cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -48,7 +54,7 @@ build() {
--without-dnet \
--without-icu \
--without-procps \
- --with-kernel-release="$_abi_release" \
+ --with-kernel-release="${_abi_release}" \
|| return 1
cd "$_builddir"/modules
make -j1 modules || return 1
@@ -58,12 +64,13 @@ package() {
cd "$_builddir"
install -D -m755 "$srcdir"/vmware-modules.initd \
"$pkgdir"/etc/init.d/vmware-modules-${_flavor} || return 1
- mkdir -p $pkgdir/lib/modules/$_abi_release/misc/
+ mkdir -p $pkgdir/lib/modules/${_abi_release}/misc/
cd "$_builddir"/modules
for module in `find -type f -name '*.ko'`; do
- install -D -m644 $module "$pkgdir/lib/modules/$_abi_release/misc/"
+ install -D -m644 $module "$pkgdir/lib/modules/${_abi_release}/misc/"
done
}
-md5sums="fd32f03ab6068c265597a74b916ca81e open-vm-tools-2011.08.21-471295.tar.gz
-afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd"
+md5sums="599342eee8d531b35ca1cc948b61868f open-vm-tools-2011.09.23-491607.tar.gz
+afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd
+993aac6dce319e41c1b922b9672c39bc vmci_driver_c.patch"
diff --git a/main/open-vm-tools-grsec/vmci_driver_c.patch b/main/open-vm-tools-grsec/vmci_driver_c.patch
new file mode 100644
index 000000000..67faea551
--- /dev/null
+++ b/main/open-vm-tools-grsec/vmci_driver_c.patch
@@ -0,0 +1,56 @@
+diff -Naur open-vm-tools-2011.09.23-491607-before/modules/linux/vmci/linux/driver.c open-vm-tools-2011.09.23-491607-after/modules/linux/vmci/linux/driver.c
+--- open-vm-tools-2011.09.23-491607-before/modules/linux/vmci/linux/driver.c 2011-09-26 15:16:30.000000000 -0500
++++ open-vm-tools-2011.09.23-491607-after/modules/linux/vmci/linux/driver.c 2011-10-13 15:13:19.266661488 -0500
+@@ -241,7 +241,24 @@
+ #define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
+ #endif
+
+-static struct file_operations vmuser_fops;
++/*
++ * Moved file operations initialize here because of incompatibilites
++ * with Gentoo hardened profile/hardend Linux 3.
++ */
++static struct file_operations vmuser_fops = {
++ .owner = THIS_MODULE,
++ .poll = LinuxDriverPoll,
++#ifdef HAVE_UNLOCKED_IOCTL
++ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
++#else
++ .ioctl = LinuxDriver_Ioctl,
++#endif
++#ifdef HAVE_COMPAT_IOCTL
++ .compat_ioctl = LinuxDriver_UnlockedIoctl,
++#endif
++ .open = LinuxDriver_Open,
++ .release = LinuxDriver_Close
++};
+
+
+ /*
+@@ -378,26 +395,6 @@
+ return -ENOMEM;
+ }
+
+- /*
+- * Initialize the file_operations structure. Because this code is always
+- * compiled as a module, this is fine to do it here and not in a static
+- * initializer.
+- */
+-
+- memset(&vmuser_fops, 0, sizeof vmuser_fops);
+- vmuser_fops.owner = THIS_MODULE;
+- vmuser_fops.poll = LinuxDriverPoll;
+-#ifdef HAVE_UNLOCKED_IOCTL
+- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
+-#else
+- vmuser_fops.ioctl = LinuxDriver_Ioctl;
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
+-#endif
+- vmuser_fops.open = LinuxDriver_Open;
+- vmuser_fops.release = LinuxDriver_Close;
+-
+ sprintf(linuxState.deviceName, "vmci");
+ linuxState.major = 10;
+ linuxState.misc.minor = MISC_DYNAMIC_MINOR;