aboutsummaryrefslogtreecommitdiff
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
parent9badcafb35e02b6d67fb39a9500424834d1589d9 (diff)
downloadalpine_aports-fa226c3ed1292d395332fa2af851fe2f7f9173cf.tar.bz2
alpine_aports-fa226c3ed1292d395332fa2af851fe2f7f9173cf.tar.xz
alpine_aports-fa226c3ed1292d395332fa2af851fe2f7f9173cf.zip
main/open-vm-tools-grsec: upgrade to 2011.09.23
patch vmci driver https://bugs.gentoo.org/show_bug.cgi?id=386721
-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 8f719ec345..70f84d0207 100644
--- a/main/open-vm-tools-grsec/APKBUILD
+++ b/main/open-vm-tools-grsec/APKBUILD
@@ -24,13 +24,14 @@ pkgrel=$(($_kpkgrel + $_mypkgrel))
24 24
25pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." 25pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
26url="http://open-vm-tools.sourceforge.net/" 26url="http://open-vm-tools.sourceforge.net/"
27arch="" 27arch="all"
28license="LGPL" 28license="LGPL"
29subpackages="" 29subpackages=""
30depends="linux-${_flavor}=${_kernelver}" 30depends="linux-${_flavor}=${_kernelver}"
31makedepends="glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}" 31makedepends="glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
32source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$_realver-$_realsubver.tar.gz 32source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$_realver-$_realsubver.tar.gz
33 vmware-modules.initd 33 vmware-modules.initd
34 vmci_driver_c.patch
34 " 35 "
35install_if="linux-${_flavor}=${_kernelver} open-vm-tools" 36install_if="linux-${_flavor}=${_kernelver} open-vm-tools"
36 37
@@ -38,6 +39,11 @@ _builddir="$srcdir/$_realname-$_realver-$_realsubver"
38 39
39prepare() { 40prepare() {
40 cd "$_builddir" 41 cd "$_builddir"
42 for i in $source; do
43 case $i in
44 *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
45 esac
46 done
41} 47}
42 48
43build() { 49build() {
@@ -48,7 +54,7 @@ build() {
48 --without-dnet \ 54 --without-dnet \
49 --without-icu \ 55 --without-icu \
50 --without-procps \ 56 --without-procps \
51 --with-kernel-release="$_abi_release" \ 57 --with-kernel-release="${_abi_release}" \
52 || return 1 58 || return 1
53 cd "$_builddir"/modules 59 cd "$_builddir"/modules
54 make -j1 modules || return 1 60 make -j1 modules || return 1
@@ -58,12 +64,13 @@ package() {
58 cd "$_builddir" 64 cd "$_builddir"
59 install -D -m755 "$srcdir"/vmware-modules.initd \ 65 install -D -m755 "$srcdir"/vmware-modules.initd \
60 "$pkgdir"/etc/init.d/vmware-modules-${_flavor} || return 1 66 "$pkgdir"/etc/init.d/vmware-modules-${_flavor} || return 1
61 mkdir -p $pkgdir/lib/modules/$_abi_release/misc/ 67 mkdir -p $pkgdir/lib/modules/${_abi_release}/misc/
62 cd "$_builddir"/modules 68 cd "$_builddir"/modules
63 for module in `find -type f -name '*.ko'`; do 69 for module in `find -type f -name '*.ko'`; do
64 install -D -m644 $module "$pkgdir/lib/modules/$_abi_release/misc/" 70 install -D -m644 $module "$pkgdir/lib/modules/${_abi_release}/misc/"
65 done 71 done
66} 72}
67 73
68md5sums="fd32f03ab6068c265597a74b916ca81e open-vm-tools-2011.08.21-471295.tar.gz 74md5sums="599342eee8d531b35ca1cc948b61868f open-vm-tools-2011.09.23-491607.tar.gz
69afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd" 75afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd
76993aac6dce319e41c1b922b9672c39bc 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 0000000000..67faea5513
--- /dev/null
+++ b/main/open-vm-tools-grsec/vmci_driver_c.patch
@@ -0,0 +1,56 @@
1diff -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
2--- open-vm-tools-2011.09.23-491607-before/modules/linux/vmci/linux/driver.c 2011-09-26 15:16:30.000000000 -0500
3+++ open-vm-tools-2011.09.23-491607-after/modules/linux/vmci/linux/driver.c 2011-10-13 15:13:19.266661488 -0500
4@@ -241,7 +241,24 @@
5 #define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
6 #endif
7
8-static struct file_operations vmuser_fops;
9+/*
10+ * Moved file operations initialize here because of incompatibilites
11+ * with Gentoo hardened profile/hardend Linux 3.
12+ */
13+static struct file_operations vmuser_fops = {
14+ .owner = THIS_MODULE,
15+ .poll = LinuxDriverPoll,
16+#ifdef HAVE_UNLOCKED_IOCTL
17+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
18+#else
19+ .ioctl = LinuxDriver_Ioctl,
20+#endif
21+#ifdef HAVE_COMPAT_IOCTL
22+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
23+#endif
24+ .open = LinuxDriver_Open,
25+ .release = LinuxDriver_Close
26+};
27
28
29 /*
30@@ -378,26 +395,6 @@
31 return -ENOMEM;
32 }
33
34- /*
35- * Initialize the file_operations structure. Because this code is always
36- * compiled as a module, this is fine to do it here and not in a static
37- * initializer.
38- */
39-
40- memset(&vmuser_fops, 0, sizeof vmuser_fops);
41- vmuser_fops.owner = THIS_MODULE;
42- vmuser_fops.poll = LinuxDriverPoll;
43-#ifdef HAVE_UNLOCKED_IOCTL
44- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
45-#else
46- vmuser_fops.ioctl = LinuxDriver_Ioctl;
47-#endif
48-#ifdef HAVE_COMPAT_IOCTL
49- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
50-#endif
51- vmuser_fops.open = LinuxDriver_Open;
52- vmuser_fops.release = LinuxDriver_Close;
53-
54 sprintf(linuxState.deviceName, "vmci");
55 linuxState.major = 10;
56 linuxState.misc.minor = MISC_DYNAMIC_MINOR;