pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/open-vm-tools Workaround for an issue regardi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8dfa72c9de55
branches:  trunk
changeset: 372768:8dfa72c9de55
user:      pho <pho%pkgsrc.org@localhost>
date:      Sun Jan 30 16:22:19 2022 +0000

description:
Workaround for an issue regarding write operations on vmhgfs

diffstat:

 sysutils/open-vm-tools/Makefile                         |   4 +-
 sysutils/open-vm-tools/distinfo                         |   3 +-
 sysutils/open-vm-tools/patches/patch-vmhgfs-fuse_main.c |  33 +++++++++++++++++
 3 files changed, 37 insertions(+), 3 deletions(-)

diffs (66 lines):

diff -r dbbe6b8027e3 -r 8dfa72c9de55 sysutils/open-vm-tools/Makefile
--- a/sysutils/open-vm-tools/Makefile   Sun Jan 30 15:44:20 2022 +0000
+++ b/sysutils/open-vm-tools/Makefile   Sun Jan 30 16:22:19 2022 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.103 2021/12/08 16:06:34 adam Exp $
+# $NetBSD: Makefile,v 1.104 2022/01/30 16:22:19 pho Exp $
 
 OVTVER=                11.3.5
 DISTNAME=      open-vm-tools-${OVTVER}-18557794
 PKGNAME=       open-vm-tools-${OVTVER}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=vmware/}
 GITHUB_RELEASE=        stable-${OVTVER}
diff -r dbbe6b8027e3 -r 8dfa72c9de55 sysutils/open-vm-tools/distinfo
--- a/sysutils/open-vm-tools/distinfo   Sun Jan 30 15:44:20 2022 +0000
+++ b/sysutils/open-vm-tools/distinfo   Sun Jan 30 16:22:19 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.33 2022/01/22 18:52:44 pho Exp $
+$NetBSD: distinfo,v 1.34 2022/01/30 16:22:19 pho Exp $
 
 BLAKE2s (open-vm-tools-11.3.5-18557794.tar.gz) = 6093fe8c71a826684fdc8eed50c3367450097b0fd94e39a0a23e45f44a97a635
 SHA512 (open-vm-tools-11.3.5-18557794.tar.gz) = fa31f5615c9c90865ba9122f7fcd0831068d48defee30a5f5c620e744b76ccd5b7cc2de20cea4e37b596f99619ffb7bb47774de04e7c4bea666c7c0b6fa1560e
@@ -55,3 +55,4 @@
 SHA1 (patch-vmblockmounter_vmblockmounter.c) = 4287303b188f4df7a2785fe72bbab820e33d6a07
 SHA1 (patch-vmhgfs-fuse_config.c) = 0518ca08d9b5d268960e1a820899eaefd1d18361
 SHA1 (patch-vmhgfs-fuse_fsutil.h) = 9233e5612a1f22ab4b43b04cfca5f0f7d120bc21
+SHA1 (patch-vmhgfs-fuse_main.c) = 471d892312cc5680f5265599048f1b8bde251b1b
diff -r dbbe6b8027e3 -r 8dfa72c9de55 sysutils/open-vm-tools/patches/patch-vmhgfs-fuse_main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/open-vm-tools/patches/patch-vmhgfs-fuse_main.c   Sun Jan 30 16:22:19 2022 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-vmhgfs-fuse_main.c,v 1.1 2022/01/30 16:22:20 pho Exp $
+
+Workaround for an issue regarding write operations on vmhgfs. See:
+https://github.com/vmware/open-vm-tools/issues/437
+
+Ideally this should be worked around by setting fuse_conn_info.max_write to
+65457, but it doesn't work on NetBSD because neither PUFFS nor ReFUSE
+support it at the moment.
+
+--- vmhgfs-fuse/main.c.orig    2022-01-30 16:00:53.301468031 +0000
++++ vmhgfs-fuse/main.c
+@@ -1138,7 +1138,20 @@ hgfs_write(const char *path,          //
+       }
+    }
+ 
+-   res = HgfsWrite(fi, buf, size, offset);
++   for (res = 0; res < size; ) {
++       int remaining = size - res;
++       int chunkLen  = remaining > 65457 ? 65457 : remaining;
++       int nWrote    = HgfsWrite(fi, buf + res, chunkLen, offset + res);
++
++       if (nWrote < 0) {
++           res = nWrote; /* An error occured. */
++           break;
++       }
++       else {
++           res += nWrote;
++       }
++   }
++
+    if (res >= 0) {
+       /*
+        * Positive result indicates the number of bytes written.



Home | Main Index | Thread Index | Old Index