summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-emulation/open-vm-tools-kmod
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-emulation/open-vm-tools-kmod')
-rw-r--r--app-emulation/open-vm-tools-kmod/Manifest3
-rw-r--r--app-emulation/open-vm-tools-kmod/files/1098359-vmblock-3.10.0.patch24
-rw-r--r--app-emulation/open-vm-tools-kmod/files/60-vmware.rules1
-rw-r--r--app-emulation/open-vm-tools-kmod/files/9.10.0-0001-Fix-vmxnet-module-on-kernels-3.16.patch74
-rw-r--r--app-emulation/open-vm-tools-kmod/files/9.10.0-0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch34
-rw-r--r--app-emulation/open-vm-tools-kmod/files/9.10.0-0003-Fix-f_dentry-msghdr-kernel-3.19.patch429
-rw-r--r--app-emulation/open-vm-tools-kmod/files/frozen.patch28
-rw-r--r--app-emulation/open-vm-tools-kmod/files/putname.patch13
-rw-r--r--app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch42
-rw-r--r--app-emulation/open-vm-tools-kmod/metadata.xml22
-rw-r--r--app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2013.09.16.1328054.ebuild67
-rw-r--r--app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.10.0_p2476743.ebuild68
-rw-r--r--app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.4.0.1280544.ebuild66
13 files changed, 871 insertions, 0 deletions
diff --git a/app-emulation/open-vm-tools-kmod/Manifest b/app-emulation/open-vm-tools-kmod/Manifest
new file mode 100644
index 000000000000..d7ae156cd4e7
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/Manifest
@@ -0,0 +1,3 @@
+DIST open-vm-tools-2013.09.16-1328054.tar.gz 3793719 SHA256 470a6ea3ce14c2c5ea6b7bc59745eccbacc8d88a3f343e712312786435975d13 SHA512 7ae62d5411b4bdefd0e8db5f0a81bb357bfd4a624af06bf9a5a74f49ede0b7051b41dfe548c758fd7e73cded34af983c8aa0c412e65343092e05ae9b997895cb WHIRLPOOL 688fb4e494fb7aab7d0eb09189afff95ec8727bcc1893a4ec632bb8198661a1a55d58a813d2d56a3ac330fd7a55afc1fa7dc11f1d60c06c91ecf6a0bf866b249
+DIST open-vm-tools-9.10.0-2476743.tar.gz 4093306 SHA256 e146ad53d744d7793ee72c5271fc49a916613534c14827c227fdaef4b3579c96 SHA512 8c8e4a559c0374e020c8261d4c8f6855efbe3f509745ee02ec03ab9ebce7e1327ec1e5e18f674cb464630ace9dc33b4262ffd119fc237c286ee44327e4590385 WHIRLPOOL 162aba889e249ac229e003a57753ff78b86f612a0753ae83f9de52eb1d0ae0a11aee0279c192eb073dabc76d718747c614d4122395abfc8c8d0f9d80a903189a
+DIST open-vm-tools-9.4.0-1280544.tar.gz 3659504 SHA256 5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399 SHA512 07b36f49713140606f74864b59c2e01c9ed83a960dd3f5d172b84fc75e760f7370065774a0e26897924af60454c86b682ca0fd32276b0e9fb17b268247f8cbdf WHIRLPOOL 88533768cf718de3b5f64e688597209fa2029d02cdf350d7fd05ec8dd8ca0f0c125a8d1445c1ec9287bc486076d5c335f3cc615c3f0b9aa7bac84e921da4c9e6
diff --git a/app-emulation/open-vm-tools-kmod/files/1098359-vmblock-3.10.0.patch b/app-emulation/open-vm-tools-kmod/files/1098359-vmblock-3.10.0.patch
new file mode 100644
index 000000000000..040d5145e9e2
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/1098359-vmblock-3.10.0.patch
@@ -0,0 +1,24 @@
+--- a/modules/linux/vmblock/linux/control.c
++++ b/modules/linux/vmblock/linux/control.c
+@@ -208,9 +208,10 @@
+ VMBlockSetProcEntryOwner(controlProcMountpoint);
+
+ /* Create /proc/fs/vmblock/dev */
+- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
+- VMBLOCK_CONTROL_MODE,
+- controlProcDirEntry);
++ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
++ VMBLOCK_CONTROL_MODE,
++ controlProcDirEntry,
++ &ControlFileOps);
+ if (!controlProcEntry) {
+ Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
+ remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
+@@ -218,7 +219,6 @@
+ return -EINVAL;
+ }
+
+- controlProcEntry->proc_fops = &ControlFileOps;
+ return 0;
+ }
+
diff --git a/app-emulation/open-vm-tools-kmod/files/60-vmware.rules b/app-emulation/open-vm-tools-kmod/files/60-vmware.rules
new file mode 100644
index 000000000000..3c83e4606afc
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/60-vmware.rules
@@ -0,0 +1 @@
+KERNEL=="vsock", GROUP="vmware", MODE=660
diff --git a/app-emulation/open-vm-tools-kmod/files/9.10.0-0001-Fix-vmxnet-module-on-kernels-3.16.patch b/app-emulation/open-vm-tools-kmod/files/9.10.0-0001-Fix-vmxnet-module-on-kernels-3.16.patch
new file mode 100644
index 000000000000..b7145d11b95c
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/9.10.0-0001-Fix-vmxnet-module-on-kernels-3.16.patch
@@ -0,0 +1,74 @@
+From 08836a47c56b47b658025e41a20027c5d915f836 Mon Sep 17 00:00:00 2001
+From: "Scott M. Kroll" <skroll@gmail.com>
+Date: Fri, 15 Aug 2014 10:40:38 -0400
+Subject: [PATCH 1/3] Fix vmxnet module on kernels >= 3.16
+
+* Add compat check for ethtool_ops in net_device struct.
+* SET_ETHTOOL_OPS is no longer defined, but can be manually.
+---
+ open-vm-tools/modules/linux/shared/compat_netdevice.h | 4 ++++
+ open-vm-tools/modules/linux/vmxnet/vmxnet.c | 13 ++++++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/open-vm-tools/modules/linux/shared/compat_netdevice.h b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+index 3aec25b..a65d59b 100644
+--- a/open-vm-tools/modules/linux/shared/compat_netdevice.h
++++ b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+@@ -337,4 +337,8 @@ typedef netdev_features_t compat_netdev_features_t;
+ typedef u32 compat_netdev_features_t;
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(SET_ETHTOOL_OPS)
++#define VMW_HAVE_ETHTOOL_OPS 1
++#endif
++
+ #endif /* __COMPAT_NETDEVICE_H__ */
+diff --git a/open-vm-tools/modules/linux/vmxnet/vmxnet.c b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
+index 33afb9b..40abde5 100644
+--- a/open-vm-tools/modules/linux/vmxnet/vmxnet.c
++++ b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
+@@ -279,8 +279,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
+
+ #endif
+
+-
+-#ifdef SET_ETHTOOL_OPS
++#ifdef VMW_HAVE_ETHTOOL_OPS
+ /*
+ *----------------------------------------------------------------------------
+ *
+@@ -526,7 +525,7 @@ vmxnet_ethtool_ops = {
+ };
+
+
+-#else /* !defined(SET_ETHTOOL_OPS) */
++#else /* !defined(VMW_HAVE_ETHTOOL_OPS) */
+
+
+ /*
+@@ -739,7 +738,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ }
+ return -EOPNOTSUPP;
+ }
+-#endif /* SET_ETHTOOL_OPS */
++#endif /* !defined(VMW_HAVE_ETHTOOL_OPS) */
+
+
+ /*
+@@ -1142,8 +1141,12 @@ vmxnet_probe_device(struct pci_dev *pdev, // IN: vmxnet PCI device
+ dev->watchdog_timeo = VMXNET_WATCHDOG_TIMEOUT;
+ #endif
+
+-#ifdef SET_ETHTOOL_OPS
++#ifdef VMW_HAVE_ETHTOOL_OPS
++# ifdef SET_ETHTOOL_OPS
+ SET_ETHTOOL_OPS(dev, &vmxnet_ethtool_ops);
++# else
++ dev->ethtool_ops = &vmxnet_ethtool_ops;
++# endif
+ #else
+ dev->do_ioctl = vmxnet_ioctl;
+ #endif
+--
+2.3.4
+
diff --git a/app-emulation/open-vm-tools-kmod/files/9.10.0-0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch b/app-emulation/open-vm-tools-kmod/files/9.10.0-0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
new file mode 100644
index 000000000000..8d8f25daf53c
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/9.10.0-0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
@@ -0,0 +1,34 @@
+From 8df98f3c779fa43d073a42e82bd18cf28c2bd4af Mon Sep 17 00:00:00 2001
+From: Wendell Smith <wendellwsmith@gmail.com>
+Date: Sat, 7 Feb 2015 15:42:13 -0500
+Subject: [PATCH 2/3] Fix d_alias to d_u.d_alias for kernel 3.18
+
+---
+ open-vm-tools/modules/linux/vmhgfs/inode.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/open-vm-tools/modules/linux/vmhgfs/inode.c b/open-vm-tools/modules/linux/vmhgfs/inode.c
+index 77b1669..2d289e3 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/inode.c
++++ b/open-vm-tools/modules/linux/vmhgfs/inode.c
+@@ -1917,7 +1917,7 @@ HgfsPermission(struct inode *inode,
+ p,
+ #endif
+ &inode->i_dentry,
+- d_alias) {
++ d_u.d_alias) {
+ int dcount = hgfs_d_count(dentry);
+ if (dcount) {
+ LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
+@@ -1970,7 +1970,7 @@ HgfsPermission(struct inode *inode,
+ /* Find a dentry with valid d_count. Refer bug 587879. */
+ list_for_each(pos, &inode->i_dentry) {
+ int dcount;
+- struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
++ struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
+ dcount = hgfs_d_count(dentry);
+ if (dcount) {
+ LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
+--
+2.3.4
+
diff --git a/app-emulation/open-vm-tools-kmod/files/9.10.0-0003-Fix-f_dentry-msghdr-kernel-3.19.patch b/app-emulation/open-vm-tools-kmod/files/9.10.0-0003-Fix-f_dentry-msghdr-kernel-3.19.patch
new file mode 100644
index 000000000000..851b9d33d86b
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/9.10.0-0003-Fix-f_dentry-msghdr-kernel-3.19.patch
@@ -0,0 +1,429 @@
+From 61751db8cd4679fc76034a5d1f99df6c64c48de6 Mon Sep 17 00:00:00 2001
+From: lotan <lotan@gmx.de>
+Date: Mon, 30 Mar 2015 08:58:56 +0200
+Subject: [PATCH 3/3] Make vmhgfs work on kernel 3.19.
+
+---
+ open-vm-tools/modules/linux/vmhgfs/dir.c | 35 ++++++------
+ open-vm-tools/modules/linux/vmhgfs/file.c | 65 +++++++++++-----------
+ open-vm-tools/modules/linux/vmhgfs/fsutil.c | 3 +-
+ .../modules/linux/vmhgfs/shared/compat_dentry.h | 10 ++++
+ 4 files changed, 63 insertions(+), 50 deletions(-)
+ create mode 100644 open-vm-tools/modules/linux/vmhgfs/shared/compat_dentry.h
+
+diff --git a/open-vm-tools/modules/linux/vmhgfs/dir.c b/open-vm-tools/modules/linux/vmhgfs/dir.c
+index 809611a..c6a87bd 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/dir.c
++++ b/open-vm-tools/modules/linux/vmhgfs/dir.c
+@@ -31,6 +31,7 @@
+ #include "compat_kernel.h"
+ #include "compat_slab.h"
+ #include "compat_mutex.h"
++#include "compat_dentry.h"
+
+ #include "cpName.h"
+ #include "hgfsEscape.h"
+@@ -414,7 +415,7 @@ HgfsPackDirOpenRequest(struct file *file, // IN: File pointer for this open
+
+ /* Build full name to send to server. */
+ if (HgfsBuildPath(name, req->bufferSize - (requestSize - 1),
+- file->f_dentry) < 0) {
++ DENTRY(file)) < 0) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackDirOpenRequest: build path failed\n"));
+ return -EINVAL;
+ }
+@@ -560,8 +561,8 @@ HgfsPrivateDirRelease(struct file *file, // IN: File for the dir getting relea
+ int result = 0;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
+- ASSERT(file->f_dentry->d_sb);
++ ASSERT(DENTRY(file));
++ ASSERT(DENTRY(file)->d_sb);
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: HgfsPrivateDirRelease: close fh %u\n", handle));
+
+@@ -704,7 +705,7 @@ HgfsDirLlseek(struct file *file,
+ loff_t offset,
+ int origin)
+ {
+- struct dentry *dentry = file->f_dentry;
++ struct dentry *dentry = DENTRY(file);
+ struct inode *inode = dentry->d_inode;
+ compat_mutex_t *mtx;
+
+@@ -853,7 +854,7 @@ HgfsReaddirRefreshEntries(struct file *file) // IN: File pointer for this ope
+ }
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s: error: stale handle (%s) return %d)\n",
+- __func__, file->f_dentry->d_name.name, result));
++ __func__, DENTRY(file)->d_name.name, result));
+ return result;
+ }
+
+@@ -988,9 +989,9 @@ HgfsReaddirNextEntry(struct file *file, // IN: file
+ char *fileName = NULL;
+ int result;
+
+- ASSERT(file->f_dentry->d_inode->i_sb);
++ ASSERT(DENTRY(file)->d_inode->i_sb);
+
+- si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb);
++ si = HGFS_SB_TO_COMMON(DENTRY(file)->d_inode->i_sb);
+ *entryIgnore = FALSE;
+
+ /*
+@@ -1079,18 +1080,18 @@ HgfsReaddirNextEntry(struct file *file, // IN: file
+ */
+ if (!strncmp(entryName, ".", sizeof ".")) {
+ if (!dotAndDotDotIgnore) {
+- *entryIno = file->f_dentry->d_inode->i_ino;
++ *entryIno = DENTRY(file)->d_inode->i_ino;
+ } else {
+ *entryIgnore = TRUE;
+ }
+ } else if (!strncmp(entryName, "..", sizeof "..")) {
+ if (!dotAndDotDotIgnore) {
+- *entryIno = compat_parent_ino(file->f_dentry);
++ *entryIno = compat_parent_ino(DENTRY(file));
+ } else {
+ *entryIgnore = TRUE;
+ }
+ } else {
+- *entryIno = HgfsGetFileInode(&entryAttrs, file->f_dentry->d_inode->i_sb);
++ *entryIno = HgfsGetFileInode(&entryAttrs, DENTRY(file)->d_inode->i_sb);
+ }
+
+ if (*entryIgnore) {
+@@ -1170,16 +1171,16 @@ HgfsDoReaddir(struct file *file, // IN:
+ ASSERT(filldirCtx);
+
+ if (!file ||
+- !(file->f_dentry) ||
+- !(file->f_dentry->d_inode)) {
++ !(DENTRY(file)) ||
++ !(DENTRY(file)->d_inode)) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsReaddir: null input\n"));
+ return -EFAULT;
+ }
+
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s, inum %lu, pos %Lu)\n",
+ __func__,
+- file->f_dentry->d_name.name,
+- file->f_dentry->d_inode->i_ino,
++ DENTRY(file)->d_name.name,
++ DENTRY(file)->d_inode->i_ino,
+ *currentPos));
+
+ /*
+@@ -1294,7 +1295,7 @@ HgfsReaddir(struct file *file, // IN:
+ /* If either dot and dotdot are filled in for us we can exit. */
+ if (!dir_emit_dots(file, ctx)) {
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s: dir_emit_dots(%s, @ %Lu)\n",
+- __func__, file->f_dentry->d_name.name, ctx->pos));
++ __func__, DENTRY(file)->d_name.name, ctx->pos));
+ return 0;
+ }
+
+@@ -1464,8 +1465,8 @@ HgfsDirRelease(struct inode *inode, // IN: Inode that the file* points to
+
+ ASSERT(inode);
+ ASSERT(file);
+- ASSERT(file->f_dentry);
+- ASSERT(file->f_dentry->d_sb);
++ ASSERT(DENTRY(file));
++ ASSERT(DENTRY(file)->d_sb);
+
+ handle = FILE_GET_FI_P(file)->handle;
+
+diff --git a/open-vm-tools/modules/linux/vmhgfs/file.c b/open-vm-tools/modules/linux/vmhgfs/file.c
+index bbde3f4..39502d0 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/file.c
++++ b/open-vm-tools/modules/linux/vmhgfs/file.c
+@@ -32,6 +32,7 @@
+ #include "compat_fs.h"
+ #include "compat_kernel.h"
+ #include "compat_slab.h"
++#include "compat_dentry.h"
+
+ /* Must be after compat_fs.h */
+ #if defined VMW_USE_AIO
+@@ -384,7 +385,7 @@ HgfsPackOpenRequest(struct inode *inode, // IN: Inode of the file to open
+ /* Build full name to send to server. */
+ if (HgfsBuildPath(name,
+ req->bufferSize - (requestSize - 1),
+- file->f_dentry) < 0) {
++ DENTRY(file)) < 0) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackOpenRequest: build path "
+ "failed\n"));
+ return -EINVAL;
+@@ -523,8 +524,8 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open
+ ASSERT(inode);
+ ASSERT(inode->i_sb);
+ ASSERT(file);
+- ASSERT(file->f_dentry);
+- ASSERT(file->f_dentry->d_inode);
++ ASSERT(DENTRY(file));
++ ASSERT(DENTRY(file)->d_inode);
+
+ iinfo = INODE_GET_II_P(inode);
+
+@@ -605,7 +606,7 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open
+ * This is not the root of our file system so there should always
+ * be a parent.
+ */
+- ASSERT(file->f_dentry->d_parent);
++ ASSERT(DENTRY(file)->d_parent);
+
+ /*
+ * Here we obtain a reference on the parent to make sure it doesn't
+@@ -620,10 +621,10 @@ HgfsOpen(struct inode *inode, // IN: Inode of the file to open
+ * We could do this if we were willing to give up support for
+ * O_EXCL on 2.4 kernels.
+ */
+- dparent = dget(file->f_dentry->d_parent);
++ dparent = dget(DENTRY(file)->d_parent);
+ iparent = dparent->d_inode;
+
+- HgfsSetUidGid(iparent, file->f_dentry,
++ HgfsSetUidGid(iparent, DENTRY(file),
+ current_fsuid(), current_fsgid());
+
+ dput(dparent);
+@@ -683,7 +684,7 @@ out:
+ * forcing a revalidate on one will not force it on any others.
+ */
+ if (result != 0 && iinfo->createdAndUnopened == TRUE) {
+- HgfsDentryAgeForce(file->f_dentry);
++ HgfsDentryAgeForce(DENTRY(file));
+ }
+ return result;
+ }
+@@ -772,13 +773,13 @@ HgfsFileRead(struct kiocb *iocb, // IN: I/O control block
+
+ ASSERT(iocb);
+ ASSERT(iocb->ki_filp);
+- ASSERT(iocb->ki_filp->f_dentry);
++ ASSERT(DENTRY(iocb->ki_filp));
+ ASSERT(iov);
+
+ pos = HGFS_IOCB_TO_POS(iocb, offset);
+ iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs);
+
+- readDentry = iocb->ki_filp->f_dentry;
++ readDentry = DENTRY(iocb->ki_filp);
+
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
+ __func__, readDentry->d_parent->d_name.name,
+@@ -882,13 +883,13 @@ HgfsFileWrite(struct kiocb *iocb, // IN: I/O control block
+
+ ASSERT(iocb);
+ ASSERT(iocb->ki_filp);
+- ASSERT(iocb->ki_filp->f_dentry);
++ ASSERT(DENTRY(iocb->ki_filp));
+ ASSERT(iov);
+
+ pos = HGFS_IOCB_TO_POS(iocb, offset);
+ iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs);
+
+- writeDentry = iocb->ki_filp->f_dentry;
++ writeDentry = DENTRY(iocb->ki_filp);
+
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
+ __func__, writeDentry->d_parent->d_name.name,
+@@ -951,7 +952,7 @@ HgfsRead(struct file *file, // IN: File to read from
+ int result;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
++ ASSERT(DENTRY(file));
+ ASSERT(buf);
+ ASSERT(offset);
+
+@@ -959,7 +960,7 @@ HgfsRead(struct file *file, // IN: File to read from
+ __func__, file->f_dentry->d_parent->d_name.name,
+ file->f_dentry->d_name.name, count, (long long) *offset));
+
+- result = HgfsRevalidate(file->f_dentry);
++ result = HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRead: invalid dentry\n"));
+ goto out;
+@@ -1002,8 +1003,8 @@ HgfsWrite(struct file *file, // IN: File to write to
+ int result;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
+- ASSERT(file->f_dentry->d_inode);
++ ASSERT(DENTRY(file));
++ ASSERT(DENTRY(file)->d_inode);
+ ASSERT(buf);
+ ASSERT(offset);
+
+@@ -1011,7 +1012,7 @@ HgfsWrite(struct file *file, // IN: File to write to
+ __func__, file->f_dentry->d_parent->d_name.name,
+ file->f_dentry->d_name.name, count, (long long) *offset));
+
+- result = HgfsRevalidate(file->f_dentry);
++ result = HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsWrite: invalid dentry\n"));
+ goto out;
+@@ -1051,7 +1052,7 @@ HgfsSeek(struct file *file, // IN: File to seek
+ loff_t result = -1;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
++ ASSERT(DENTRY(file));
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u, %lld, %d)\n",
+ __func__,
+@@ -1059,7 +1060,7 @@ HgfsSeek(struct file *file, // IN: File to seek
+ file->f_dentry->d_name.name,
+ FILE_GET_FI_P(file)->handle, offset, origin));
+
+- result = (loff_t) HgfsRevalidate(file->f_dentry);
++ result = (loff_t) HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
+ goto out;
+@@ -1143,8 +1144,8 @@ HgfsFlush(struct file *file // IN: file to flush
+ int ret = 0;
+
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
+- __func__, file->f_dentry->d_parent->d_name.name,
+- file->f_dentry->d_name.name));
++ __func__, DENTRY(file)->d_parent->d_name.name,
++ DENTRY(file)->d_name.name));
+
+ if ((file->f_mode & FMODE_WRITE) == 0) {
+ goto exit;
+@@ -1157,7 +1158,7 @@ HgfsFlush(struct file *file // IN: file to flush
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
+ ret = vfs_fsync(file, 0);
+ #else
+- ret = HgfsDoFsync(file->f_dentry->d_inode);
++ ret = HgfsDoFsync(DENTRY(file)->d_inode);
+ #endif
+
+ exit:
+@@ -1215,13 +1216,13 @@ HgfsFsync(struct file *file, // IN: File we operate on
+
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lld, %lld, %d)\n",
+ __func__,
+- file->f_dentry->d_parent->d_name.name,
+- file->f_dentry->d_name.name,
++ DENTRY(file)->d_parent->d_name.name,
++ DENTRY(file)->d_name.name,
+ startRange, endRange,
+ datasync));
+
+ /* Flush writes to the server and return any errors */
+- inode = file->f_dentry->d_inode;
++ inode = DENTRY(file)->d_inode;
+ #if defined VMW_FSYNC_31
+ ret = filemap_write_and_wait_range(inode->i_mapping, startRange, endRange);
+ #else
+@@ -1261,14 +1262,14 @@ HgfsMmap(struct file *file, // IN: File we operate on
+
+ ASSERT(file);
+ ASSERT(vma);
+- ASSERT(file->f_dentry);
++ ASSERT(DENTRY(file));
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
+ __func__,
+ file->f_dentry->d_parent->d_name.name,
+ file->f_dentry->d_name.name));
+
+- result = HgfsRevalidate(file->f_dentry);
++ result = HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
+ goto out;
+@@ -1309,8 +1310,8 @@ HgfsRelease(struct inode *inode, // IN: Inode that this file points to
+
+ ASSERT(inode);
+ ASSERT(file);
+- ASSERT(file->f_dentry);
+- ASSERT(file->f_dentry->d_sb);
++ ASSERT(DENTRY(file));
++ ASSERT(DENTRY(file)->d_sb);
+
+ handle = FILE_GET_FI_P(file)->handle;
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u)\n",
+@@ -1443,14 +1444,14 @@ HgfsSendfile(struct file *file, // IN: File to read from
+ ssize_t result;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
++ ASSERT(DENTRY(file));
+ ASSERT(target);
+ ASSERT(offset);
+ ASSERT(actor);
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: HgfsSendfile: was called\n"));
+
+- result = HgfsRevalidate(file->f_dentry);
++ result = HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSendfile: invalid dentry\n"));
+ goto out;
+@@ -1497,7 +1498,7 @@ HgfsSpliceRead(struct file *file, // IN: File to read from
+ ssize_t result;
+
+ ASSERT(file);
+- ASSERT(file->f_dentry);
++ ASSERT(DENTRY(file));
+
+ LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lu@%Lu)\n",
+ __func__,
+@@ -1505,7 +1506,7 @@ HgfsSpliceRead(struct file *file, // IN: File to read from
+ file->f_dentry->d_name.name,
+ (unsigned long) len, (unsigned long long) *offset));
+
+- result = HgfsRevalidate(file->f_dentry);
++ result = HgfsRevalidate(DENTRY(file));
+ if (result) {
+ LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
+ goto out;
+diff --git a/open-vm-tools/modules/linux/vmhgfs/fsutil.c b/open-vm-tools/modules/linux/vmhgfs/fsutil.c
+index 5023324..a2e794c 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/fsutil.c
++++ b/open-vm-tools/modules/linux/vmhgfs/fsutil.c
+@@ -36,6 +36,7 @@
+ #include "compat_sched.h"
+ #include "compat_slab.h"
+ #include "compat_spinlock.h"
++#include "compat_dentry.h"
+
+ #include "vm_assert.h"
+ #include "cpName.h"
+@@ -1924,7 +1925,7 @@ HgfsCreateFileInfo(struct file *file, // IN: File pointer to attach to
+
+ ASSERT(file);
+
+- inodeInfo = INODE_GET_II_P(file->f_dentry->d_inode);
++ inodeInfo = INODE_GET_II_P(DENTRY(file)->d_inode);
+ ASSERT(inodeInfo);
+
+ /* Get the mode of the opened file. */
+diff --git a/open-vm-tools/modules/linux/vmhgfs/shared/compat_dentry.h b/open-vm-tools/modules/linux/vmhgfs/shared/compat_dentry.h
+new file mode 100644
+index 0000000..dd53760
+--- /dev/null
++++ b/open-vm-tools/modules/linux/shared/compat_dentry.h
+@@ -0,0 +1,10 @@
++#ifndef __COMPAT_DENTRY_H__
++# define __COMPAT_DENTRY_H__
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
++# define DENTRY(file) (file->f_path.dentry)
++#else
++# define DENTRY(file) (file->f_dentry)
++#endif
++
++#endif /* __COMPAT_DENTRY_H__ */
+--
+2.3.4
+
diff --git a/app-emulation/open-vm-tools-kmod/files/frozen.patch b/app-emulation/open-vm-tools-kmod/files/frozen.patch
new file mode 100644
index 000000000000..8b3fd7f37910
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/frozen.patch
@@ -0,0 +1,28 @@
+diff -urpN a/modules/linux/vmsync/sync.c b/modules/linux/vmsync/sync.c
+--- a/modules/linux/vmsync/sync.c 2012-08-01 19:02:59.000000000 -0700
++++ b/modules/linux/vmsync/sync.c 2012-10-14 07:38:18.000000000 -0700
+@@ -162,7 +162,11 @@ VmSyncThawDevices(void *_state) // IN
+ cancel_delayed_work(&state->thawTask);
+ list_for_each_safe(cur, tmp, &state->devices) {
+ dev = list_entry(cur, VmSyncBlockDevice, list);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) {
++#else
+ if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
++#endif
+ thaw_bdev(dev->bdev, dev->sb);
+ atomic_dec(&gFreezeCount);
+ }
+@@ -237,7 +241,11 @@ VmSyncAddPath(const VmSyncState *state,
+ * the superblock is already frozen.
+ */
+ if (inode->i_sb->s_bdev == NULL ||
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ inode->i_sb->s_writers.frozen != SB_UNFROZEN) {
++#else
+ inode->i_sb->s_frozen != SB_UNFROZEN) {
++#endif
+ result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
+ compat_path_release(&nd);
+ goto exit;
+
diff --git a/app-emulation/open-vm-tools-kmod/files/putname.patch b/app-emulation/open-vm-tools-kmod/files/putname.patch
new file mode 100644
index 000000000000..b605e12fa07f
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/putname.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/linux/vmblock/linux/control.c b/modules/linux/vmblock/linux/control.c
+index 79716bd..2dd83fe 100644
+--- a/modules/linux/vmblock/linux/control.c
++++ b/modules/linux/vmblock/linux/control.c
+@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
+
+ retval = i < 0 ? -EINVAL : blockOp(name, blocker);
+
+- putname(name);
++ __putname(name);
+
+ return retval;
+ }
diff --git a/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch b/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch
new file mode 100644
index 000000000000..3918162a7057
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/files/vmhgfs-linux-3.11.patch
@@ -0,0 +1,42 @@
+Source: https://github.com/rasa/vmware-tools-patches/
+
+--- a/modules/linux/vmhgfs/inode.c
++++ b/modules/linux/vmhgfs/inode.c
+@@ -31,6 +31,9 @@
+ #include <linux/namei.h>
+ #endif
+ #include <linux/highmem.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
++#include <linux/dcache.h>
++#endif
+
+ #include "compat_cred.h"
+ #include "compat_fs.h"
+@@ -1890,7 +1893,11 @@
+ #endif
+ &inode->i_dentry,
+ d_alias) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
++ int dcount = d_count(dentry);
++#else
+ int dcount = dentry->d_count;
++#endif
+ if (dcount) {
+ LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
+ return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC));
+@@ -1943,10 +1950,12 @@
+ list_for_each(pos, &inode->i_dentry) {
+ int dcount;
+ struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
+- dcount = atomic_read(&dentry->d_count);
+-#else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
++ dcount = d_count(dentry);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
+ dcount = dentry->d_count;
++#else
++ dcount = atomic_read(&dentry->d_count);
+ #endif
+ if (dcount) {
+ LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
diff --git a/app-emulation/open-vm-tools-kmod/metadata.xml b/app-emulation/open-vm-tools-kmod/metadata.xml
new file mode 100644
index 000000000000..2560d635322b
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>vmware</herd>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <longdescription>
+ The Open Virtual Machine Tools (open-vm-tools) are the open source
+ implementation of VMware Tools. They are a set of guest operating system
+ virtualization components that enhance performance and user experience
+ of virtual machines.
+ </longdescription>
+ <use>
+ <flag name="vmhgfs">Build the vmhgfs module for file sharing support with the host</flag>
+ <flag name="vmxnet">Build the vmxnet module (older virtual NIC)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">open-vm-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2013.09.16.1328054.ebuild b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2013.09.16.1328054.ebuild
new file mode 100644
index 000000000000..385b63bf209a
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-2013.09.16.1328054.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-mod versionator udev
+
+MY_PN="${PN/-kmod}"
+MY_PV="$(replace_version_separator 3 '-')"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Opensourced tools for VMware guests"
+HOMEPAGE="http://open-vm-tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="vmhgfs"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~DRM_VMWGFX ~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3
+ !UIDGID_STRICT_TYPE_CHECKS"
+
+ # See logic in configure.ac.
+ local MODULES="vmxnet"
+
+ use vmhgfs && MODULES+=" vmhgfs"
+
+ if kernel_is -lt 3 9; then
+ MODULES+=" vmci vsock"
+ else
+ CONFIG_CHECK+=" VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS"
+ fi
+
+ if kernel_is -lt 3; then
+ MODULES+=" vmblock vmsync"
+ else
+ CONFIG_CHECK+=" ~FUSE_FS"
+ fi
+
+ local mod
+ for mod in ${MODULES}; do
+ MODULE_NAMES+=" ${mod}(ovt:modules/linux/${mod})"
+ done
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/vmhgfs-linux-3.11.patch"
+ epatch_user
+}
+
+src_configure() {
+ BUILD_TARGETS="auto-build"
+ export OVT_SOURCE_DIR="${S}"
+ export LINUXINCLUDE="${KV_OUT_DIR}/include"
+}
+
+src_install() {
+ linux-mod_src_install
+ udev_dorules "${FILESDIR}/60-vmware.rules"
+}
diff --git a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.10.0_p2476743.ebuild b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.10.0_p2476743.ebuild
new file mode 100644
index 000000000000..e1294bb000c0
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.10.0_p2476743.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-mod versionator udev
+
+MY_PN=${PN%-kmod}
+MY_P=${MY_PN}-${PV/_p/-}
+
+DESCRIPTION="Opensourced tools for VMware guests"
+HOMEPAGE="http://open-vm-tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+vmhgfs +vmxnet"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~DRM_VMWGFX ~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3"
+
+ # See logic in configure.ac.
+ local MODULES=
+
+ use vmhgfs && MODULES+=" vmhgfs"
+ use vmxnet && MODULES+=" vmxnet"
+
+ if kernel_is -lt 3 9; then
+ MODULES+=" vmci vsock"
+ else
+ CONFIG_CHECK+=" VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS"
+ fi
+
+ if kernel_is -lt 3; then
+ MODULES+=" vmblock vmsync"
+ else
+ CONFIG_CHECK+=" ~FUSE_FS"
+ fi
+
+ local mod
+ for mod in ${MODULES}; do
+ MODULE_NAMES+=" ${mod}(ovt:modules/linux/${mod})"
+ done
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/9.10.0-0001-Fix-vmxnet-module-on-kernels-3.16.patch
+ epatch "${FILESDIR}"/9.10.0-0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
+ epatch "${FILESDIR}"/9.10.0-0003-Fix-f_dentry-msghdr-kernel-3.19.patch
+ epatch_user
+}
+
+src_configure() {
+ BUILD_TARGETS="auto-build"
+ export OVT_SOURCE_DIR="${S}"
+ export LINUXINCLUDE="${KV_OUT_DIR}/include"
+}
+
+src_install() {
+ linux-mod_src_install
+ udev_dorules "${FILESDIR}/60-vmware.rules"
+}
diff --git a/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.4.0.1280544.ebuild b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.4.0.1280544.ebuild
new file mode 100644
index 000000000000..d5951a5605ce
--- /dev/null
+++ b/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-9.4.0.1280544.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-mod versionator udev
+
+MY_PN="${PN/-kmod}"
+MY_PV="$(replace_version_separator 3 '-')"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Opensourced tools for VMware guests"
+HOMEPAGE="http://open-vm-tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~DRM_VMWGFX ~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3
+ !UIDGID_STRICT_TYPE_CHECKS"
+
+ # See logic in configure.ac.
+ local MODULES="vmxnet vmhgfs"
+
+ if kernel_is -lt 3 9; then
+ MODULES+=" vmci vsock"
+ else
+ CONFIG_CHECK+=" ~VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS"
+ fi
+
+ if kernel_is -lt 3; then
+ MODULES+=" vmblock vmsync"
+ else
+ CONFIG_CHECK+=" ~FUSE_FS"
+ fi
+
+ local mod
+ for mod in ${MODULES}; do
+ MODULE_NAMES+=" ${mod}(ovt:modules/linux/${mod})"
+ done
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/frozen.patch"
+ epatch "${FILESDIR}/putname.patch"
+ epatch_user
+}
+
+src_configure() {
+ BUILD_TARGETS="auto-build"
+ export OVT_SOURCE_DIR="${S}"
+ export LINUXINCLUDE="${KV_OUT_DIR}/include"
+}
+
+src_install() {
+ linux-mod_src_install
+ udev_dorules "${FILESDIR}/60-vmware.rules"
+}