open-vm-tools: update to 11.1.15
authorRosen Penev <redacted>
Fri, 9 Oct 2020 01:48:55 +0000 (18:48 -0700)
committerRosen Penev <redacted>
Fri, 9 Oct 2020 10:51:42 +0000 (03:51 -0700)
Refreshed patches. Reworked several of them as musl has changed.
Removed several upstreamed ones.

Added musl 1.2.0 patch which uses 64-bit time_t.

Removed -Werror as there's a redefinition warning caused by nls.mk.

Replaced glib2/host dependency with rpcsvc-proto.

Fixed compilation with full NLS.

Fixed compilation with musl 1.2.0

Signed-off-by: Rosen Penev <redacted>
16 files changed:
utils/open-vm-tools/Makefile
utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch [deleted file]
utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch [deleted file]
utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch
utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch
utils/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch
utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch
utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch [deleted file]
utils/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch
utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch
utils/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch
utils/open-vm-tools/patches/010-musl-120.patch [new file with mode: 0644]
utils/open-vm-tools/patches/020-no-werror.patch [new file with mode: 0644]

index 8d36e3e614f3e238769b718b69b683f014a51e07..80d8eab9175ea8980ca1e66dcfca87ac6a06da51 100644 (file)
@@ -8,22 +8,24 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=open-vm-tools
-PKG_VERSION:=11.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=11.1.5
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-16036546.tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-16724464.tar.gz
 PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
-PKG_HASH:=cb029af04357f19a899995f9e1ecfe55222b76158ab6d64fe8b56df0ccf87308
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-16036546
-PKG_INSTALL:=1
-
-PKG_BUILD_DEPENDS:=glib2/host
+PKG_HASH:=cb33171b22872d66632b4151feafd4da480aee0c6bd5dcc188651984c1e9c511
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-16724464
 
-PKG_FIXUP:=autoreconf
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=LICENSE
 
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=glib2/host
+
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/open-vm-tools/Default
   SECTION:=utils
@@ -76,6 +78,8 @@ CONFIGURE_ARGS+= \
        --without-xerces \
        --enable-resolutionkms=no
 
+TARGET_LDFLAGS += -liconv
+
 define Package/open-vm-tools/install
        $(INSTALL_DIR) $(1)/etc/init.d/
        $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd
diff --git a/utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch b/utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch
deleted file mode 100644 (file)
index 5f4c0e2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -949,7 +949,7 @@
-       AC_VMW_CHECK_LIB([dnet],
-                        [DNET],
-                        [],
--                       [dnet-config],
-+                       [],
-                        [],
-                        [dnet.h],
-                        [intf_open],
diff --git a/utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch b/utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch
deleted file mode 100644 (file)
index 8413162..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN a/lib/wiper/wiperPosix.c b/lib/wiper/wiperPosix.c
---- a/lib/wiper/wiperPosix.c
-+++ b/lib/wiper/wiperPosix.c
-@@ -43,6 +43,9 @@
- #  include <libgen.h>
- # endif /* __FreeBSD_version >= 500000 */
- #endif
-+#if defined(__linux__)
-+#include <sys/sysmacros.h>
-+#endif
- #include <unistd.h>
- #include "vmware.h"
index d3f271906e167970a5817c60429a47c91202971f..959fa6f4c09e8edd58c0eee7048f8d2f5f8d2ec1 100644 (file)
@@ -1,7 +1,6 @@
-diff -urN a/configure.ac b/configure.ac
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1208,6 +1208,7 @@
+@@ -1184,6 +1184,7 @@
  AC_TYPE_PID_T
  AC_TYPE_SIZE_T
  AC_CHECK_MEMBERS([struct stat.st_rdev])
@@ -9,7 +8,6 @@ diff -urN a/configure.ac b/configure.ac
  AC_HEADER_TIME
  AC_STRUCT_TM
  AC_C_VOLATILE
-diff -urN a/lib/include/hgfsUtil.h b/lib/include/hgfsUtil.h
 --- a/lib/include/hgfsUtil.h
 +++ b/lib/include/hgfsUtil.h
 @@ -53,13 +53,7 @@
index b007042cbc82ffbb20994f0fd23dbce5054939f0..472d3433499c865aae7abbb7052b0cdde1c44434 100644 (file)
@@ -1,4 +1,3 @@
-diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
 --- a/lib/hgfsServer/hgfsServerLinux.c
 +++ b/lib/hgfsServer/hgfsServerLinux.c
 @@ -105,11 +105,13 @@
@@ -18,10 +17,9 @@ diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
  #   define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
  #endif
  
-diff -urN a/services/plugins/dndcp/dnd/dndLinux.c b/services/plugins/dndcp/dnd/dndLinux.c
 --- a/services/plugins/dndcp/dnd/dndLinux.c
 +++ b/services/plugins/dndcp/dnd/dndLinux.c
-@@ -52,7 +52,7 @@
+@@ -53,7 +53,7 @@
  
  #define DND_ROOTDIR_PERMS     (S_IRWXU | S_IRWXG | S_IRWXO)
  #define DND_STAGINGDIR_PERMS  (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
@@ -30,11 +28,5 @@ diff -urN a/services/plugins/dndcp/dnd/dndLinux.c b/services/plugins/dndcp/dnd/d
  #define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
  #endif
  #ifdef __ANDROID__
-@@ -61,7 +61,6 @@
-  */
- #define NO_SETMNTENT
- #define NO_ENDMNTENT
--#define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
- #endif
  
  
index b9c1d0849e39b5d524b2d01178ad468cb9edd0cf..36a9018b4b12fa6d389528ab57fb3623f83b9142 100644 (file)
@@ -1,7 +1,6 @@
-diff -urN a/configure.ac b/configure.ac
 --- a/configure.ac
 +++ b/configure.ac
-@@ -897,6 +897,7 @@
+@@ -912,6 +912,7 @@
  
  AC_CHECK_FUNCS([ecvt])
  AC_CHECK_FUNCS([fcvt])
@@ -9,7 +8,7 @@ diff -urN a/configure.ac b/configure.ac
  
  AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
  
-@@ -1145,10 +1146,13 @@
+@@ -1121,10 +1122,13 @@
  ###
  
  AC_CHECK_HEADERS([crypt.h])
@@ -23,7 +22,6 @@ diff -urN a/configure.ac b/configure.ac
  AC_CHECK_HEADERS([sys/inttypes.h])
  AC_CHECK_HEADERS([sys/io.h])
  AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD
-diff -urN a/lib/misc/idLinux.c b/lib/misc/idLinux.c
 --- a/lib/misc/idLinux.c
 +++ b/lib/misc/idLinux.c
 @@ -27,12 +27,9 @@
@@ -40,7 +38,7 @@ diff -urN a/lib/misc/idLinux.c b/lib/misc/idLinux.c
  #ifdef __APPLE__
  #include <sys/socket.h>
  #include <TargetConditionals.h>
-@@ -997,31 +994,32 @@
+@@ -1025,31 +1022,32 @@
  static Bool
  IdIsSetUGid(void)
  {
@@ -85,7 +83,6 @@ diff -urN a/lib/misc/idLinux.c b/lib/misc/idLinux.c
  #endif
  }
  #endif
-diff -urN a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
 --- a/lib/nicInfo/nicInfoPosix.c
 +++ b/lib/nicInfo/nicInfoPosix.c
 @@ -35,9 +35,13 @@
index be27ef30b2d82acbfab5ced2e956299adca3fecd..9383f4acd1cf5b200389ee933a08f49ca6296287 100644 (file)
@@ -1,4 +1,3 @@
-diff -urN a/services/plugins/vix/vixTools.c b/services/plugins/vix/vixTools.c
 --- a/services/plugins/vix/vixTools.c
 +++ b/services/plugins/vix/vixTools.c
 @@ -66,7 +66,7 @@
index 7433d230e1d4187fb1a97ccb1468f6db9ce451ce..1bd1e56a7a124ad2d759a3f9b74c801f884b1e7d 100644 (file)
@@ -1,4 +1,3 @@
-diff -urN a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
 --- a/lib/asyncsocket/asyncsocket.c
 +++ b/lib/asyncsocket/asyncsocket.c
 @@ -69,8 +69,8 @@
index 5102189a5a731e01cf6e58605986aee8fbe889c6..861b0e93dc86e7485518633bb696f11139f0ab59 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
-index 07a5d04b..01181a95 100644
 --- a/lib/asyncsocket/asyncsocket.c
 +++ b/lib/asyncsocket/asyncsocket.c
 @@ -86,7 +86,7 @@
@@ -11,24 +9,20 @@ index 07a5d04b..01181a95 100644
  #include "log.h"
  #include "err.h"
  #include "hostinfo.h"
-diff --git a/lib/hgfsServer/hgfsServer.c b/lib/hgfsServer/hgfsServer.c
-index 46224551..fc691286 100644
 --- a/lib/hgfsServer/hgfsServer.c
 +++ b/lib/hgfsServer/hgfsServer.c
-@@ -48,7 +48,7 @@
- #include "hgfsServerOplock.h"
+@@ -49,7 +49,7 @@
  #include "hgfsDirNotify.h"
+ #include "hgfsThreadpool.h"
  #include "userlock.h"
 -#include "poll.h"
 +#include "vm_poll.h"
  #include "mutexRankLib.h"
  #include "vm_basic_asm.h"
  #include "unicodeOperations.h"
-diff --git a/lib/include/asyncsocket.h b/lib/include/asyncsocket.h
-index 95a5e464..a4b4e5aa 100644
 --- a/lib/include/asyncsocket.h
 +++ b/lib/include/asyncsocket.h
-@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket;
+@@ -169,7 +169,7 @@ typedef struct AsyncSocket AsyncSocket;
   * Or the client can specify its favorite poll class and locking behavior.
   * Use of IVmdbPoll is only supported for regular sockets and for Attach.
   */
@@ -37,8 +31,6 @@ index 95a5e464..a4b4e5aa 100644
  struct IVmdbPoll;
  typedef struct AsyncSocketPollParams {
     int flags;               /* Default 0, only POLL_FLAG_NO_BULL is valid */
-diff --git a/lib/include/pollImpl.h b/lib/include/pollImpl.h
-index 46442e55..8bc66997 100644
 --- a/lib/include/pollImpl.h
 +++ b/lib/include/pollImpl.h
 @@ -44,7 +44,7 @@
@@ -51,11 +43,9 @@ index 46442e55..8bc66997 100644
  
  #if defined(__cplusplus)
 diff --git a/lib/include/poll.h b/lib/include/vm_poll.h
-similarity index 100%
 rename from lib/include/poll.h
 rename to lib/include/vm_poll.h
 diff --git a/lib/rpcIn/rpcin.c b/lib/rpcIn/rpcin.c
-index 47a3380e..660382c6 100644
 --- a/lib/rpcIn/rpcin.c
 +++ b/lib/rpcIn/rpcin.c
 @@ -57,7 +57,7 @@
index 7ad9b03fb7e313e3defb420209d443fd856647ec..996708ad41b659fbe16b6d665f49213d00e80cb5 100644 (file)
@@ -1,28 +1,17 @@
-diff -urN a/lib/err/errPosix.c b/lib/err/errPosix.c
 --- a/lib/err/errPosix.c
 +++ b/lib/err/errPosix.c
-@@ -31,6 +31,7 @@
- #include <errno.h>
- #include <string.h>
- #include <locale.h>
-+#include <stdio.h>
- #include "vmware.h"
- #include "errInt.h"
-@@ -63,11 +64,13 @@
+@@ -61,13 +61,7 @@ ErrErrno2String(Err_Number errorNumber, // IN
+                 char *buf,            // OUT: return buffer
+               size_t bufSize)         // IN: size of buffer
  {
-    char *p;
+-   char *p;
+-
 -#if defined(__linux__) && !defined(__ANDROID__)
-+#if defined(__GLIBC__) && !defined(__ANDROID__)
-    p = strerror_r(errorNumber, buf, bufSize);
- #else
+-   p = strerror_r(errorNumber, buf, bufSize);
+-#else
 -   p = strerror(errorNumber);
 -#endif
-+   if (strerror_r(errorNumber, buf, bufSize) != 0)
-+      snprintf(buf, bufSize, "unknown error %i", errorNumber);
-+   p = buf;
-+#endif /* defined __GLIBC__ */
++   char *p = strerror(errorNumber);
     ASSERT(p != NULL);
     return p;
  }
diff --git a/utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch b/utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch
deleted file mode 100644 (file)
index 6d50012..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
---- a/lib/hgfsServer/hgfsServerLinux.c
-+++ b/lib/hgfsServer/hgfsServerLinux.c
-@@ -5295,8 +5295,8 @@
-       goto exit;
-    }
--   LOG(6, "%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
--       __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max);
-+   LOG(6, "%s: File Size limits: 0x%jx 0x%jx\n",
-+       __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max);
-    /*
-     * Check the offset is within the file size range.
index 857c6730a9d234f3874ff7d0ab2637794c65497f..93ba4400db566a885791a5c5d063095f02485d27 100644 (file)
@@ -1,16 +1,11 @@
-diff -urN a/lib/file/fileIOPosix.c b/lib/file/fileIOPosix.c
 --- a/lib/file/fileIOPosix.c
 +++ b/lib/file/fileIOPosix.c
-@@ -206,10 +206,10 @@
-        * the symbols (and anyone building XOPEN<700 gets nothing).
-        */
-       extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt,
--                          __off64_t offset) __attribute__ ((weak));
-+                          off64_t offset) __attribute__ ((weak));
+@@ -198,7 +198,7 @@ static AlignedPool alignedPool;
+  * are not available in any header file.
+  */
  
-       extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt,
--                          __off64_t offset) __attribute__ ((weak));
-+                          off64_t offset) __attribute__ ((weak));
-    #else
-       #error "Large file support unavailable. Aborting."
-    #endif
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if 0
+    #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+       /*
+        * We want preadv/pwritev. But due to FOB=64, the symbols are -64.
index e8b8be84034be852af1bc8c72dd574b1ecf20f48..b933e051ef0a39031024dc52e66fa94392afed44 100644 (file)
@@ -1,12 +1,12 @@
 --- a/vmhgfs-fuse/fsutil.h
 +++ b/vmhgfs-fuse/fsutil.h
-@@ -32,9 +32,7 @@
+@@ -29,6 +29,9 @@
+ #include "request.h"
+ #include "vm_basic_types.h"
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
  #include "hgfsProto.h"
  #include <fuse.h>
  
--#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
- typedef long long loff_t;
--#endif
- /*
-  * Struct used to pass around attributes.
index 51159726f9e017ed13c7c02c71c6fc13a66c40a6..d2407ad7d4aed359fb59f9faf0b67ca45a233cb8 100644 (file)
@@ -1,4 +1,3 @@
-diff -urNp a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
 --- a/lib/nicInfo/nicInfoPosix.c
 +++ b/lib/nicInfo/nicInfoPosix.c
 @@ -65,6 +65,9 @@
@@ -11,7 +10,6 @@ diff -urNp a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
  
  #ifdef __linux__
  #   include <net/if.h>
-diff -urNp a/lib/nicInfo/resolv_compat.h b/lib/nicInfo/resolv_compat.h
 --- a/lib/nicInfo/resolv_compat.h
 +++ b/lib/nicInfo/resolv_compat.h
 @@ -0,0 +1,29 @@
diff --git a/utils/open-vm-tools/patches/010-musl-120.patch b/utils/open-vm-tools/patches/010-musl-120.patch
new file mode 100644 (file)
index 0000000..f6ca485
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/lib/hgfs/hgfsUtil.c
++++ b/lib/hgfs/hgfsUtil.c
+@@ -109,7 +109,7 @@ int
+ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
+                         uint64 ntTime) // IN: Time in Windows NT format
+ {
+-#ifdef __i386__
++#if defined(__i386__) && !__USE_TIME_BITS64
+    uint32 sec;
+    uint32 nsec;
+@@ -134,7 +134,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
+       return -1;
+    }
+-#ifdef __i386__
++#if defined(__i386__) && !__USE_TIME_BITS64
+    Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
+    unixTime->tv_sec = sec;
+    unixTime->tv_nsec = nsec * 100;
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -2569,7 +2569,11 @@ HgfsStatToFileAttr(struct stat *stats,       // IN: stat information
+ #      define FMTTIMET "l"
+ #   endif
+ #else
++#ifdef __USE_TIME_BITS64
++#   define FMTTIMET __PRI64
++#else
+ #   define FMTTIMET "l"
++#endif
+ #endif
+    LOG(4, "access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
+        "attr: %"FMTTIMET"d/%"FMT64"u\n",
diff --git a/utils/open-vm-tools/patches/020-no-werror.patch b/utils/open-vm-tools/patches/020-no-werror.patch
new file mode 100644 (file)
index 0000000..1f0cfe7
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1199,7 +1199,6 @@ AC_C_VOLATILE
+ ### General flags / actions
+ CFLAGS="$CFLAGS -Wall"
+-CFLAGS="$CFLAGS -Werror"
+ # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
+ # in Xlib.h on OpenSolaris.
git clone https://git.99rst.org/PROJECT