Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=dex77testing.git;a=commitdiff;h=b230fe3fde68e37dfdf89b5541d34b23a87d057c

commit b230fe3fde68e37dfdf89b5541d34b23a87d057c
Author: James Buren <[email protected]>
Date:   Sat May 3 22:36:06 2014 -0500

open-vm-tools-2013.09.16_1328054-3-x86_64
* rebuild with kernel 3.14
* add all patches for rebuilding successfully
* fix a broken symlink

diff --git a/source/apps-extra/open-vm-tools/FrugalBuild 
b/source/apps-extra/open-vm-tools/FrugalBuild
index 39c0e4e..f3c269a 100644
--- a/source/apps-extra/open-vm-tools/FrugalBuild
+++ b/source/apps-extra/open-vm-tools/FrugalBuild
@@ -5,16 +5,20 @@

pkgname=open-vm-tools
pkgver="2013.09.16_1328054"
-pkgrel=2
+pkgrel=3
pkgdesc="Open source implementation of VMware Tools"
archs=('i686' 'x86_64')
groups=('apps-extra')
depends=('fuse')
makedepends=('doxygen')
Finclude sourceforge kernel-module
+source=(${source[@]} g_info_redefine.patch kernel-3.11.patch kernel-3.14.patch)
up2date="$up2date | sed 's/-/_/g'"
_F_archive_ver="${pkgver/_/-}"
-sha1sums=('1be0ff7b4d5c6c39373516b1f514e191ade10b0c')
+sha1sums=('1be0ff7b4d5c6c39373516b1f514e191ade10b0c' \
+          '5dcd1d80b2dc827eeb048b07d400994c31b032d5' \
+          '7b794bda5e8982d2f5c49ca85cd205cc3d25f24c' \
+          '940a6f4349e07b1fdf1ce51ab474d15bc7acc1c3')
Fconfopts="--without-dnet"
CFLAGS="-Wno-deprecated-declarations -Wno-unused-variable"
PATH="$PATH:/sbin"
@@ -39,6 +43,10 @@ build(){
Fbuild
Fbuild_kernelmod_scriptlet

+       # Fix symlinks
+       Frm /sbin/mount.vmhgfs
+       Fln /usr/sbin/mount.vmhgfs /sbin/mount.vmhgfs
+
Fsplit open-vm-kernel-modules lib/modules
Fsplit open-vm-vmusr usr/lib/open-vm-tools/plugins/vmusr
}
diff --git a/source/apps-extra/open-vm-tools/g_info_redefine.patch 
b/source/apps-extra/open-vm-tools/g_info_redefine.patch
new file mode 100644
index 0000000..9985e61
--- /dev/null
+++ b/source/apps-extra/open-vm-tools/g_info_redefine.patch
@@ -0,0 +1,14 @@
+diff -uNr open-vm-tools-9.4.0-1280544.orig/lib/include/vmware/tools/log.h 
open-vm-tools-9.4.0-1280544/lib/include/vmware/tools/log.h
+--- open-vm-tools-9.4.0-1280544.orig/lib/include/vmware/tools/log.h    
2013-09-23 19:51:10.000000000 +0400
++++ open-vm-tools-9.4.0-1280544/lib/include/vmware/tools/log.h 2014-02-18 
10:56:50.368604176 +0400
+@@ -134,7 +134,9 @@
+  
*******************************************************************************
+  */
+
+-#define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## 
__VA_ARGS__)
++#if !defined(g_info)
++#  define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## 
__VA_ARGS__)
++#endif
+
+
+ /*
diff --git a/source/apps-extra/open-vm-tools/kernel-3.11.patch 
b/source/apps-extra/open-vm-tools/kernel-3.11.patch
new file mode 100644
index 0000000..6b9b49e
--- /dev/null
+++ b/source/apps-extra/open-vm-tools/kernel-3.11.patch
@@ -0,0 +1,41 @@
+diff -ur a/modules/linux/vmhgfs/inode.c b/modules/linux/vmhgfs/inode.c
+--- a/modules/linux/vmhgfs/inode.c     2013-09-23 00:57:48.000000000 -0500
++++ b/modules/linux/vmhgfs/inode.c     2014-05-03 22:23:59.269809216 -0500
+@@ -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/source/apps-extra/open-vm-tools/kernel-3.14.patch 
b/source/apps-extra/open-vm-tools/kernel-3.14.patch
new file mode 100644
index 0000000..ff930f8
--- /dev/null
+++ b/source/apps-extra/open-vm-tools/kernel-3.14.patch
@@ -0,0 +1,149 @@
+diff -ur a/modules/linux/shared/compat_cred.h 
b/modules/linux/shared/compat_cred.h
+--- a/modules/linux/shared/compat_cred.h       2013-09-23 00:57:48.000000000 
-0500
++++ b/modules/linux/shared/compat_cred.h       2014-05-03 22:00:01.094862688 
-0500
+@@ -35,6 +35,22 @@
+ #define current_fsgid() (current->fsgid)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
++#define CURRENT_FSUID() (__kuid_val(current_fsuid()))
++#define CURRENT_FSGID() (__kgid_val(current_fsgid()))
++#define CURRENT_UID() (__kuid_val(current_uid()))
++#define CURRENT_GID() (__kgid_val(current_gid()))
++#define KUID2UID(kuid) (kuid.val)
++#define KGID2GID(kgid) (kgid.val)
++#else
++#define CURRENT_FSUID() (current_fsuid())
++#define CURRENT_FSGID() (current_fsgid())
++#define CURRENT_UID() (current_uid())
++#define CURRENT_GID() (current_gid())
++#define KUID2UID(kuid) (kuid)
++#define KGID2GID(kgid) (kgid)
++#endif
++
+ #if !defined(cap_set_full)
+ /* cap_set_full was removed in kernel version 3.0-rc4. */
+ #define cap_set_full(_c) do { (_c) = CAP_FULL_SET; } while (0)
+diff -ur a/modules/linux/vmhgfs/file.c b/modules/linux/vmhgfs/file.c
+--- a/modules/linux/vmhgfs/file.c      2013-09-23 00:57:48.000000000 -0500
++++ b/modules/linux/vmhgfs/file.c      2014-05-03 22:00:01.089862688 -0500
+@@ -573,7 +573,7 @@
+             iparent = dparent->d_inode;
+
+             HgfsSetUidGid(iparent, file->f_dentry,
+-                          current_fsuid(), current_fsgid());
++                          CURRENT_FSUID(), CURRENT_FSGID());
+
+             dput(dparent);
+          }
+diff -ur a/modules/linux/vmhgfs/filesystem.c 
b/modules/linux/vmhgfs/filesystem.c
+--- a/modules/linux/vmhgfs/filesystem.c        2013-09-23 00:57:48.000000000 
-0500
++++ b/modules/linux/vmhgfs/filesystem.c        2014-05-03 22:00:01.090862688 
-0500
+@@ -231,13 +231,13 @@
+    if (si->uidSet) {
+       si->uid = mountInfo->uid;
+    } else {
+-      si->uid = current_uid();
++      si->uid = CURRENT_UID();
+    }
+    si->gidSet = mountInfo->gidSet;
+    if (si->gidSet) {
+       si->gid = mountInfo->gid;
+    } else {
+-      si->gid = current_gid();
++      si->gid = CURRENT_GID();
+    }
+    si->fmask = mountInfo->fmask;
+    si->dmask = mountInfo->dmask;
+diff -ur a/modules/linux/vmhgfs/fsutil.c b/modules/linux/vmhgfs/fsutil.c
+--- a/modules/linux/vmhgfs/fsutil.c    2013-09-23 00:57:48.000000000 -0500
++++ b/modules/linux/vmhgfs/fsutil.c    2014-05-03 22:00:01.092862688 -0500
+@@ -31,6 +31,7 @@
+ /* Must come before compat_dcache. */
+ #include "compat_fs.h"
+
++#include "compat_cred.h"
+ #include "compat_dcache.h"
+ #include "compat_kernel.h"
+ #include "compat_sched.h"
+@@ -679,14 +680,14 @@
+     * the server didn't give us a uid or gid.
+     */
+    if (si->uidSet || (attr->mask & HGFS_ATTR_VALID_USERID) == 0) {
+-      inode->i_uid = si->uid;
++      KUID2UID(inode->i_uid) = si->uid;
+    } else {
+-      inode->i_uid = attr->userId;
++      KUID2UID(inode->i_uid) = attr->userId;
+    }
+    if (si->gidSet || (attr->mask & HGFS_ATTR_VALID_GROUPID) == 0) {
+-      inode->i_gid = si->gid;
++      KGID2GID(inode->i_gid) = si->gid;
+    } else {
+-      inode->i_gid = attr->groupId;
++      KGID2GID(inode->i_gid) = attr->groupId;
+    }
+
+    inode->i_rdev = 0;  /* Device nodes are not supported */
+@@ -1753,7 +1754,7 @@
+    struct iattr setUidGid;
+
+    setUidGid.ia_valid = ATTR_UID;
+-   setUidGid.ia_uid = uid;
++   KUID2UID(setUidGid.ia_uid) = uid;
+
+    /*
+     * Only set the gid if the host file system wouldn't have for us.  See the
+@@ -1761,7 +1762,7 @@
+     */
+    if (!parent || !(parent->i_mode & S_ISGID)) {
+       setUidGid.ia_valid |= ATTR_GID;
+-      setUidGid.ia_gid = gid;
++      KGID2GID(setUidGid.ia_gid) = gid;
+    }
+
+    /*
+diff -ur a/modules/linux/vmhgfs/inode.c b/modules/linux/vmhgfs/inode.c
+--- a/modules/linux/vmhgfs/inode.c     2013-09-23 00:57:48.000000000 -0500
++++ b/modules/linux/vmhgfs/inode.c     2014-05-03 22:00:01.093862688 -0500
+@@ -513,13 +513,13 @@
+
+       if (valid & ATTR_UID) {
+          attrV2->mask |= HGFS_ATTR_VALID_USERID;
+-         attrV2->userId = iattr->ia_uid;
++         attrV2->userId = KUID2UID(iattr->ia_uid);
+          *changed = TRUE;
+       }
+
+       if (valid & ATTR_GID) {
+          attrV2->mask |= HGFS_ATTR_VALID_GROUPID;
+-         attrV2->groupId = iattr->ia_gid;
++         attrV2->groupId = KGID2GID(iattr->ia_gid);
+          *changed = TRUE;
+       }
+
+@@ -616,13 +616,13 @@
+
+       if (valid & ATTR_UID) {
+          attrV2->mask |= HGFS_ATTR_VALID_USERID;
+-         attrV2->userId = iattr->ia_uid;
++         attrV2->userId = KUID2UID(iattr->ia_uid);
+          *changed = TRUE;
+       }
+
+       if (valid & ATTR_GID) {
+          attrV2->mask |= HGFS_ATTR_VALID_GROUPID;
+-         attrV2->groupId = iattr->ia_gid;
++         attrV2->groupId = KGID2GID(iattr->ia_gid);
+          *changed = TRUE;
+       }
+
+@@ -1215,7 +1215,7 @@
+              * a Linux machine and as root, but we might as well give it
+              * a go.
+              */
+-            HgfsSetUidGid(dir, dentry, current_fsuid(), current_fsgid());
++            HgfsSetUidGid(dir, dentry, CURRENT_FSUID(), CURRENT_FSGID());
+          }
+
+          /*
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to