Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 18:37:49 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r444773 - in head/emulators/open-vm-tools: . files
Message-ID:  <201706301837.v5UIbnP1054451@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Fri Jun 30 18:37:49 2017
New Revision: 444773
URL: https://svnweb.freebsd.org/changeset/ports/444773

Log:
  emulators/open-vm-tools: update to 10.1.5

Added:
  head/emulators/open-vm-tools/files/patch-configure.ac   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-modules_Makefile.am   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-scripts_Makefile.am   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-scripts_freebsd_network   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am   (contents, props changed)
  head/emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am   (contents, props changed)
Deleted:
  head/emulators/open-vm-tools/files/patch-configure
  head/emulators/open-vm-tools/files/patch-guestApp.c
  head/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c
  head/emulators/open-vm-tools/files/patch-modules-Makefile.in
  head/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c
  head/emulators/open-vm-tools/files/patch-scripts-Makefile
  head/emulators/open-vm-tools/files/patch-scripts-network
  head/emulators/open-vm-tools/files/patch-util_misc.c
  head/emulators/open-vm-tools/files/patch-vmblockmounter-Makefile.in
  head/emulators/open-vm-tools/files/patch-vmmemctl-os.c
  head/emulators/open-vm-tools/files/patch-vmtoolsd-Makefile.in
  head/emulators/open-vm-tools/files/patch-wrapper-Makefile.am
Modified:
  head/emulators/open-vm-tools/Makefile
  head/emulators/open-vm-tools/distinfo
  head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h
  head/emulators/open-vm-tools/pkg-plist

Modified: head/emulators/open-vm-tools/Makefile
==============================================================================
--- head/emulators/open-vm-tools/Makefile	Fri Jun 30 17:36:30 2017	(r444772)
+++ head/emulators/open-vm-tools/Makefile	Fri Jun 30 18:37:49 2017	(r444773)
@@ -3,10 +3,7 @@
 
 PORTNAME=		open-vm-tools
 PORTVERSION=		${RELEASE_VER}
-PORTREVISION=		2
 PORTEPOCH=		2
-MASTER_SITES=		https://github.com/vmware/open-vm-tools/files/590760/
-DISTNAME=		open-vm-tools-${RELEASE_VER}-${BUILD_VER}
 CATEGORIES=		emulators
 
 MAINTAINER=		swills@FreeBSD.org
@@ -15,57 +12,58 @@ COMMENT?=		Open VMware tools for FreeBSD VMware guests
 LICENSE=		LGPL21
 LICENSE_FILE=		${WRKSRC}/COPYING
 
-RELEASE_VER=		10.1.0
-BUILD_VER=		4449150
+LIB_DEPENDS=		libmspack.so:archivers/libmspack \
+			libxerces-c.so:textproc/xerces-c3 \
+			libxml-security-c.so:security/apache-xml-security-c
 
-OPTIONS_DEFINE=		X11 LIBNOTIFY UNITY FUSE DNET ICU
-OPTIONS_DEFAULT=	X11 LIBNOTIFY FUSE DNET ICU
+RELEASE_VER=		10.1.5
+BUILD_VER=		5055683
+
+OPTIONS_DEFINE=		DNET ICU LIBNOTIFY OPENSSL X11
+OPTIONS_DEFAULT=	DNET ICU LIBNOTIFY OPENSSL X11
+
 OPTIONS_SUB=
 
 DNET_DESC=		libdnet support
 LIBNOTIFY_DESC=		Desktop notification support
-UNITY_DESC=		liburiparser support
 
-# TODO add USE_GITHUB=yes after switching to USES=autoreconf
-
 X11_CONFIGURE_WITH=	x gtk2 gtkmm
-X11_USE=		xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst,xi \
-			gnome=gtk20,gtkmm24,gdkpixbuf2
+X11_USE=		xorg=ice,sm,x11,xext,xi,xinerama,xineramaproto,xrandr,xrender,xtst \
+			gnome=gdkpixbuf2,gtk20,gtkmm24
 X11_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 			libfreetype.so:print/freetype2
 LIBNOTIFY_LIB_DEPENDS=	libnotify.so:devel/libnotify
-UNITY_CONFIGURE_ENV=	CUSTOM_URIPARSER_CPPFLAGS="-I${LOCALBASE}/include/uriparser"
-UNITY_LIB_DEPENDS=	liburiparser.so:net/uriparser
-UNITY_CONFIGURE_ENABLE=	unity
 DNET_CONFIGURE_WITH=	dnet
 DNET_LIB_DEPENDS=	libdnet.so:net/libdnet
 ICU_CONFIGURE_WITH=	icu
 ICU_LIB_DEPENDS=	libicuuc.so:devel/icu
+OPENSSL_CONFIGURE_WITH=	ssl
 
-WRKSRC=			${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_VER}/open-vm-tools
+WRKSRC=			${WRKDIR}/${PORTNAME}-stable-${RELEASE_VER}/open-vm-tools/
+
 GNU_CONFIGURE=		yes
 USE_GNOME=		glib20
-# TODO add autoreconf when included files are compatible
-USES=			fuse gettext-runtime kmod libtool pathfix pkgconfig
+USES=			autoreconf:-iv fuse gettext-runtime kmod libtool localbase pathfix pkgconfig
 
-LIB_DEPENDS=		libmspack.so:archivers/libmspack \
-			libxerces-c.so.3:textproc/xerces-c3 \
-			libxml-security-c.so:security/apache-xml-security-c
+USE_GITHUB=		yes
+GH_ACCOUNT=		vmware
+GH_TAGNAME=		stable-${RELEASE_VER}
 
 USE_LDCONFIG=		yes
 CPPFLAGS+=		-Wno-deprecated-declarations
-LDFLAGS=		-L${LOCALBASE}/lib
 
 SSP_UNSAFE=		kernel module does not support ssp
 
-CONFIGURE_ARGS+=	--disable-grabbitmqproxy --disable-deploypkg \
+CONFIGURE_ARGS+=	--disable-grabbitmqproxy \
 			--disable-vgauth --without-procps \
-			--sysconfdir=${LOCALBASE}/etc
+			--sysconfdir=${PREFIX}/etc
 
 CONFLICTS+=		vmware-guestd[0-9]* vmware-tools[0-9]*
 
 USE_RC_SUBR=		vmware-guestd vmware-kmod
 
+INSTALL_TARGET=		install-strip
+
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MX11}
@@ -79,6 +77,10 @@ ONLY_FOR_ARCHS=		i386 amd64
 CONFIGURE_ENV+=		SYSDIR=${SRC_BASE}/sys
 
 .include <bsd.port.pre.mk>
+
+post-patch:
+	@${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@"\
+		${WRKSRC}/lib/guestApp/guestApp.c
 
 post-build:
 	cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}

Modified: head/emulators/open-vm-tools/distinfo
==============================================================================
--- head/emulators/open-vm-tools/distinfo	Fri Jun 30 17:36:30 2017	(r444772)
+++ head/emulators/open-vm-tools/distinfo	Fri Jun 30 18:37:49 2017	(r444773)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1484345963
-SHA256 (open-vm-tools-10.1.0-4449150.tar.gz) = d579474c9495b504a544dfc2635d291c27488e7e9303ec4fe6b393836dc3b017
-SIZE (open-vm-tools-10.1.0-4449150.tar.gz) = 5025787
+TIMESTAMP = 1493092065
+SHA256 (vmware-open-vm-tools-10.1.5-stable-10.1.5_GH0.tar.gz) = aba7bf570b8951b61784941460659c204359d98fcbfb164df3c30d468a19fb1c
+SIZE (vmware-open-vm-tools-10.1.5-stable-10.1.5_GH0.tar.gz) = 3540164

Added: head/emulators/open-vm-tools/files/patch-configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-configure.ac	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,20 @@
+--- configure.ac.orig	2017-02-24 22:15:37 UTC
++++ configure.ac
+@@ -1082,7 +1082,7 @@ AC_CHECK_HEADERS([sys/user.h],
+    ])
+ AC_CHECK_HEADERS([sys/vfs.h])
+ AC_CHECK_HEADERS([syslimits.h])
+-AC_CHECK_HEADERS([unwind.h])
++#AC_CHECK_HEADERS([unwind.h])
+ 
+ AC_CHECK_HEADER(
+    [wchar.h],
+@@ -1137,7 +1137,7 @@ AC_C_VOLATILE
+ 
+ ### General flags / actions
+ CFLAGS="$CFLAGS -Wall"
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS -Werror -Wno-unused-function -Wno-address-of-packed-member -Wno-unknown-warning-option"
+ 
+ # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
+ # in Xlib.h on OpenSolaris.

Added: head/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- libDeployPkg/processPosix.c.orig	2017-02-24 22:15:37 UTC
++++ libDeployPkg/processPosix.c
+@@ -28,6 +28,8 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/wait.h>
++#include <signal.h>
++#include <sys/types.h>
+ 
+ #include "util.h"
+ 

Added: head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- lib/guestApp/guestApp.c.orig	2017-02-24 22:15:37 UTC
++++ lib/guestApp/guestApp.c
+@@ -63,7 +63,7 @@
+ #elif defined __APPLE__
+ #   define GUESTAPP_TOOLS_INSTALL_PATH "/Library/Application Support/VMware Tools"
+ #else
+-#   define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
++#   define GUESTAPP_TOOLS_INSTALL_PATH "%%PREFIX%%/share/vmware-tools"
+ #endif
+ 
+ #if defined _WIN32

Modified: head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h
==============================================================================
--- head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h	Fri Jun 30 17:36:30 2017	(r444772)
+++ head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h	Fri Jun 30 18:37:49 2017	(r444773)
@@ -1,6 +1,6 @@
---- lib/include/vm_basic_defs.h.orig	2013-09-23 15:51:10 UTC
+--- lib/include/vm_basic_defs.h.orig	2017-02-24 22:15:37 UTC
 +++ lib/include/vm_basic_defs.h
-@@ -81,7 +81,11 @@
+@@ -76,7 +76,11 @@
  #include "vm_basic_types.h" // For INLINE.
  
  /* Checks for FreeBSD, filtering out VMKERNEL. */

Added: head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,10 @@
+--- lib/include/vm_basic_types.h.orig	2017-02-24 22:15:37 UTC
++++ lib/include/vm_basic_types.h
+@@ -415,6 +415,7 @@ typedef int64 VmTimeVirtualClock;  /* Vi
+       #endif
+    #elif defined(__linux__) || \
+         (defined(__FreeBSD__) && (__FreeBSD__ + 0))\
++      || (defined(__clang__)) \
+       || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
+       || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
+       || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L)

Added: head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- lib/misc/util_misc.c.orig	2017-02-24 22:15:37 UTC
++++ lib/misc/util_misc.c
+@@ -307,7 +307,7 @@ Util_CanonicalPathsIdentical(const char 
+    return (strcmp(path1, path2) == 0);
+ #elif defined(_WIN32)
+    return (_stricmp(path1, path2) == 0);
+-#elif defined(__APPLE__)
++#elif defined(__APPLE__) || defined(__FreeBSD__)
+    return (strcasecmp(path1, path2) == 0);
+ #else
+    NOT_IMPLEMENTED();

Added: head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,10 @@
+--- lib/vmCheck/vmcheck.c.orig	2017-02-24 22:15:37 UTC
++++ lib/vmCheck/vmcheck.c
+@@ -134,6 +134,7 @@ VmCheckSafe(SafeCheckFn checkFn)
+ #else
+    do {
+       int signals[] = {
++         SIGBUS,
+          SIGILL,
+          SIGSEGV,
+       };

Added: head/emulators/open-vm-tools/files/patch-modules_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-modules_Makefile.am	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,19 @@
+--- modules/Makefile.am.orig	2017-04-25 03:59:07 UTC
++++ modules/Makefile.am
+@@ -63,11 +63,11 @@ if SOLARIS
+ 	done
+ endif
+ if FREEBSD
+-	for MOD in $(MODULES); do                                              \
+-	   $(INSTALL) -d $(DESTDIR)$(MODULES_DIR);                             \
+-	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
+-	      $(DESTDIR)$(MODULES_DIR);                                        \
+-	done
++#	for MOD in $(MODULES); do                                              \
++#	   $(INSTALL) -d $(DESTDIR)$(MODULES_DIR);                             \
++#	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
++#	      $(DESTDIR)$(MODULES_DIR);                                        \
++#	done
+ endif
+ if LINUX
+ 	for MOD in $(MODULES); do                                              \

Added: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,26 @@
+--- modules/freebsd/vmblock/vfsops.c.orig	2017-02-24 22:15:37 UTC
++++ modules/freebsd/vmblock/vfsops.c
+@@ -124,6 +124,11 @@ VMBlockVFSMount(struct mount *mp,       
+    char *pathname;
+    int len, error = 0;
+ 
++#if __FreeBSD_version >= 800087
++   struct thread *td;
++   td = curthread;
++#endif
++
+    VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp);
+ 
+    /*
+@@ -277,6 +282,11 @@ VMBlockVFSUnmount(struct mount *mp,    /
+    int error;
+    int flags = 0, removed = 0;
+ 
++#if __FreeBSD_version >= 800087
++   struct thread *td;
++   td = curthread;
++#endif
++
+    VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp);
+ 
+    xmp = MNTTOVMBLOCKMNT(mp);

Added: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,129 @@
+--- modules/freebsd/vmmemctl/os.c.orig	2017-02-24 22:15:37 UTC
++++ modules/freebsd/vmmemctl/os.c
+@@ -37,9 +37,11 @@
+ #include <sys/param.h>
+ #include <sys/systm.h>
+ #include <sys/kernel.h>
++#include <sys/lock.h>
+ #include <sys/malloc.h>
+ #include <sys/module.h>
+ #include <sys/conf.h>
++#include <sys/rwlock.h>
+ #include <sys/sysctl.h>
+ 
+ #include <vm/vm.h>
+@@ -223,7 +225,11 @@ static __inline__ unsigned long os_ffz(u
+ unsigned long
+ OS_ReservedPageGetLimit(void)
+ {
++#if __FreeBSD_version < 1100015
+    return cnt.v_page_count;
++#else
++   return vm_cnt.v_page_count;
++#endif
+ }
+ 
+ 
+@@ -369,7 +375,11 @@ static void
+ os_pmap_alloc(os_pmap *p) // IN
+ {
+    /* number of pages (div. 8) */
++#if __FreeBSD_version < 1100015
+    p->size = (cnt.v_page_count + 7) / 8;
++#else
++   p->size = (vm_cnt.v_page_count + 7) / 8;
++#endif
+ 
+    /*
+     * expand to nearest word boundary
+@@ -392,6 +402,7 @@ os_pmap_free(os_pmap *p) // IN
+ #if __FreeBSD_version < 1000000
+    kmem_free(kernel_map, (vm_offset_t)p->bitmap, p->size);
+ #else
++//   kva_free((vm_offset_t)p->bitmap, p->size);
+    kmem_free(kernel_arena, (vm_offset_t)p->bitmap, p->size);
+ #endif
+    p->size = 0;
+@@ -466,12 +477,36 @@ os_kmem_free(vm_page_t page) // IN
+    os_state *state = &global_state;
+    os_pmap *pmap = &state->pmap;
+ 
+-   if ( !vm_page_lookup(state->vmobject, page->pindex) ) {
+-      return;
+-   }
++//   if ( !vm_page_lookup(state->vmobject, page->pindex) ) {
++//      return;
++//   }
+ 
+-   os_pmap_putindex(pmap, page->pindex);
+-   vm_page_free(page);
++//   os_pmap_putindex(pmap, page->pindex);
++//   vm_page_free(page);
++#if __FreeBSD_version > 1000029
++   VM_OBJECT_WLOCK(state->vmobject);
++#else
++   VM_OBJECT_LOCK(state->vmobject);
++#endif
++   if ( vm_page_lookup(state->vmobject, page->pindex) ) {
++       os_pmap_putindex(pmap, page->pindex);
++#if __FreeBSD_version >= 900000
++       vm_page_lock(page);
++#else
++       vm_page_lock_queues();
++#endif
++       vm_page_free(page);
++#if __FreeBSD_version >= 900000
++       vm_page_unlock(page);
++#else
++       vm_page_unlock_queues();
++#endif
++   }
++#if __FreeBSD_version > 1000029
++   VM_OBJECT_WUNLOCK(state->vmobject);
++#else
++   VM_OBJECT_UNLOCK(state->vmobject);
++#endif
+ }
+ 
+ 
+@@ -483,8 +518,19 @@ os_kmem_alloc(int alloc_normal_failed) /
+    os_state *state = &global_state;
+    os_pmap *pmap = &state->pmap;
+ 
++#if __FreeBSD_version > 1000029
++   VM_OBJECT_WLOCK(state->vmobject);
++#else
++   VM_OBJECT_LOCK(state->vmobject);
++#endif
++
+    pindex = os_pmap_getindex(pmap);
+    if (pindex == (vm_pindex_t)-1) {
++#if __FreeBSD_version > 1000029
++      VM_OBJECT_WUNLOCK(state->vmobject);
++#else
++      VM_OBJECT_UNLOCK(state->vmobject);
++#endif
+       return NULL;
+    }
+ 
+@@ -504,6 +550,11 @@ os_kmem_alloc(int alloc_normal_failed) /
+ 
+    if (!page) {
+       os_pmap_putindex(pmap, pindex);
++#if __FreeBSD_version > 1000029
++   VM_OBJECT_WUNLOCK(state->vmobject);
++#else
++   VM_OBJECT_UNLOCK(state->vmobject);
++#endif
+    }
+ 
+    return page;
+@@ -847,7 +898,7 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS)
+ static void
+ vmmemctl_init_sysctl(void)
+ {
+-   oid =  sysctl_add_oid(NULL, SYSCTL_STATIC_CHILDREN(_vm), OID_AUTO,
++   oid =  SYSCTL_ADD_OID(NULL, SYSCTL_STATIC_CHILDREN(_vm), OID_AUTO,
+                          BALLOON_NAME, CTLTYPE_STRING | CTLFLAG_RD,
+                          0, 0, vmmemctl_sysctl, "A",
+                          BALLOON_NAME_VERBOSE);

Added: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,80 @@
+--- modules/freebsd/vmxnet/if_vxn.c.orig	2017-02-24 22:15:37 UTC
++++ modules/freebsd/vmxnet/if_vxn.c
+@@ -76,6 +76,10 @@
+ #include <pci/pcivar.h>
+ #endif
+ 
++#if __FreeBSD_version >= 1100001
++#include <net/if_var.h>
++#endif
++
+ /* define INLINE the way gcc likes it */
+ #define INLINE __inline__
+ 
+@@ -936,14 +940,14 @@ vxn_encap(struct ifnet *ifp,
+    if (m != NULL) {
+       struct mbuf    *m_new = NULL;
+ 
+-      MGETHDR(m_new, M_DONTWAIT, MT_DATA);
++      MGETHDR(m_new, M_NOWAIT, MT_DATA);
+       if (m_new == NULL) {
+          printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp));
+          return 1;
+       }
+ 
+       if (m_head->m_pkthdr.len > MHLEN) {
+-         MCLGET(m_new, M_DONTWAIT);
++         MCLGET(m_new, M_NOWAIT);
+          if (!(m_new->m_flags & M_EXT)) {
+             m_freem(m_new);
+             printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp));
+@@ -1067,7 +1071,11 @@ vxn_startl(struct ifnet *ifp)
+       VMXNET_INC(dd->txDriverNext, dd->txRingLength);
+       dd->txNumDeferred++;
+       sc->vxn_tx_pending++;
+-      ifp->if_opackets++;
++#if __FreeBSD_version >= 1100036
++      if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
++#else
++     ifp->if_opackets++;
++#endif
+    }
+ 
+    /*
+@@ -1266,9 +1274,9 @@ vxn_rx(vxn_softc_t *sc)
+          /*
+ 	  * Allocate a new mbuf cluster to replace the current one
+           */
+-         MGETHDR(m_new, M_DONTWAIT, MT_DATA);
++         MGETHDR(m_new, M_NOWAIT, MT_DATA);
+          if (m_new != NULL) {
+-            MCLGET(m_new, M_DONTWAIT);
++            MCLGET(m_new, M_NOWAIT);
+             if (m_new->m_flags & M_EXT) {
+                m_adj(m_new, ETHER_ALIGN);
+             } else {
+@@ -1287,7 +1295,11 @@ vxn_rx(vxn_softc_t *sc)
+             sc->vxn_rx_buffptr[dd->rxDriverNext] = m_new;
+             rre->paddr = (uint32)vtophys(mtod(m_new, caddr_t));
+ 
++#if __FreeBSD_version >= 1100036
++            if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
++#else
+             ifp->if_ipackets++;
++#endif
+             m->m_pkthdr.rcvif = ifp;
+             m->m_pkthdr.len = m->m_len = pkt_len;
+ 
+@@ -1401,10 +1413,10 @@ vxn_init_rings(vxn_softc_t *sc)
+        * Allocate an mbuf and initialize it to contain a packet header and
+        * internal data.
+        */
+-      MGETHDR(m_new, M_DONTWAIT, MT_DATA);
++      MGETHDR(m_new, M_NOWAIT, MT_DATA);
+       if (m_new != NULL) {
+          /* Allocate and attach an mbuf cluster to mbuf. */
+-         MCLGET(m_new, M_DONTWAIT);
++         MCLGET(m_new, M_NOWAIT);
+          if (m_new->m_flags & M_EXT) {
+             m_adj(m_new, ETHER_ALIGN);
+             sc->vxn_rx_ring[i].paddr = (uint32)vtophys(mtod(m_new, caddr_t));

Added: head/emulators/open-vm-tools/files/patch-scripts_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-scripts_Makefile.am	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- scripts/Makefile.am.orig	2017-04-25 03:59:07 UTC
++++ scripts/Makefile.am
+@@ -3,7 +3,7 @@ defaultscripts += poweroff-vm-default
+ defaultscripts += suspend-vm-default
+ defaultscripts += resume-vm-default
+ 
+-confdir = /etc/vmware-tools
++confdir = ${prefix}/share/vmware-tools
+ 
+ conf_SCRIPTS = ./common/vm-support
+ conf_SCRIPTS += ./common/statechange.subr

Added: head/emulators/open-vm-tools/files/patch-scripts_freebsd_network
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-scripts_freebsd_network	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,10 @@
+--- scripts/freebsd/network.orig	2017-02-24 22:15:37 UTC
++++ scripts/freebsd/network
+@@ -59,6 +59,7 @@ ToggleNetwork() {
+ 
+       for intf in `list_net_interfaces dhcp`; do
+          /etc/rc.d/netif $1 $intf
++         /etc/rc.d/dhclient $1 $intf
+          ec=$?
+ 
+          # Failure to stop an interface should not interfere with suspend.

Added: head/emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- services/vmtoolsd/Makefile.am.orig	2017-04-25 03:59:07 UTC
++++ services/vmtoolsd/Makefile.am
+@@ -83,7 +83,7 @@ install-data-hook:
+ 	@INSTVMSG@ vmtoolsd $(srcdir)/l10n $(DESTDIR)$(datadir)
+ 
+ install-exec-hook:
+-	$(INSTALL) -d $(DESTDIR)/etc/vmware-tools
++#	$(INSTALL) -d $(DESTDIR)/etc/vmware-tools
+ 
+ uninstall-hook:
+ 	rm -rf $(DESTDIR)/etc/vmware-tools

Added: head/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,25 @@
+--- vmblockmounter/Makefile.am.orig	2017-04-25 03:59:07 UTC
++++ vmblockmounter/Makefile.am
+@@ -27,16 +27,16 @@ if FREEBSD
+ install-exec-hook:
+ 	mv $(DESTDIR)$(sbindir)/mount.vmblock \
+ 		$(DESTDIR)$(sbindir)/mount_vmblock
+-	-$(MKDIR_P) $(DESTDIR)/sbin
+-	-$(LN_S) $(DESTDIR)$(sbindir)/mount_vmblock \
+-		$(DESTDIR)/sbin/mount_vmblock &> /dev/null
++#	-$(MKDIR_P) $(DESTDIR)/sbin
++#	-$(LN_S) $(sbindir)/mount_vmblock \
++#		$(DESTDIR)/sbin/mount_vmblock &> /dev/null
+ uninstall-hook:
+ 	rm -f $(DESTDIR)$(sbindir)/mount_vmblock
+ else
+ install-exec-hook:
+-	-$(MKDIR_P) $(DESTDIR)/sbin
+-	-$(LN_S) $(DESTDIR)$(sbindir)/mount.vmblock \
+-		$(DESTDIR)/sbin/mount.vmblock &> /dev/null
++#	-$(MKDIR_P) $(DESTDIR)/sbin
++#	-$(LN_S) $(DESTDIR)/mount.vmblock \
++#		$(DESTDIR)/sbin/mount.vmblock &> /dev/null
+ uninstall-hook:
+ 	rm -f $(DESTDIR)/sbin/mount.vmblock
+ endif !FREEBSD

Added: head/emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am	Fri Jun 30 18:37:49 2017	(r444773)
@@ -0,0 +1,11 @@
+--- vmware-user-suid-wrapper/Makefile.am.orig	2017-04-25 03:59:07 UTC
++++ vmware-user-suid-wrapper/Makefile.am
+@@ -19,6 +19,8 @@ bin_PROGRAMS = vmware-user-suid-wrapper
+ 
+ AM_CPPFLAGS =
+ AM_CPPFLAGS += -DVMTOOLSD_PATH=\"$(bindir)/vmtoolsd\"
++# See post-install on Makefile of ports.
++AM_CPPFLAGS += -DVMWARE_KMOD_DIR=\"$(prefix)/lib/vmware-tools/modules/drivers\"
+ 
+ vmware_user_suid_wrapper_SOURCES =
+ vmware_user_suid_wrapper_SOURCES += main.c

Modified: head/emulators/open-vm-tools/pkg-plist
==============================================================================
--- head/emulators/open-vm-tools/pkg-plist	Fri Jun 30 17:36:30 2017	(r444772)
+++ head/emulators/open-vm-tools/pkg-plist	Fri Jun 30 18:37:49 2017	(r444773)
@@ -5,18 +5,30 @@ bin/vmware-hgfsclient
 bin/vmware-namespace-cmd
 bin/vmware-rpctool
 bin/vmware-toolbox-cmd
-bin/vmware-xferlogs
-%%X11%%%%FUSE%%bin/vmware-vmblock-fuse
-lib/open-vm-tools/plugins/vmsvc/libguestInfo.so
-lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
-lib/open-vm-tools/plugins/vmsvc/libtimeSync.so
-lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
-lib/open-vm-tools/plugins/common/libhgfsServer.so
-lib/open-vm-tools/plugins/common/libvix.so
-%%X11%%lib/open-vm-tools/plugins/vmusr/libresolutionSet.so
-%%X11%%lib/open-vm-tools/plugins/vmusr/libdesktopEvents.so
-%%X11%%lib/open-vm-tools/plugins/vmusr/libdndcp.so
+bin/vmware-vmblock-fuse
+%%X11%%bin/vmware-user-suid-wrapper
 %%X11%%etc/xdg/autostart/vmware-user.desktop
+bin/vmware-xferlogs
+include/libDeployPkg/guestcust-events.h
+include/libDeployPkg/imgcust-api.h
+include/libDeployPkg/includeCheck.h
+include/libDeployPkg/linuxDeployment.h
+include/libDeployPkg/log.h
+include/libDeployPkg/process.h
+include/libDeployPkg/rpcout.h
+include/libDeployPkg/vm_basic_types.h
+include/vmGuestLib/includeCheck.h
+include/vmGuestLib/vmGuestLib.h
+include/vmGuestLib/vmSessionId.h
+include/vmGuestLib/vm_basic_types.h
+lib/libDeployPkg.a
+lib/libDeployPkg.so
+lib/libDeployPkg.so.0
+lib/libDeployPkg.so.0.0.0
+lib/libguestlib.a
+lib/libguestlib.so
+lib/libguestlib.so.0
+lib/libguestlib.so.0.0.0
 lib/libhgfs.a
 lib/libhgfs.so
 lib/libhgfs.so.0
@@ -25,21 +37,23 @@ lib/libvmtools.a
 lib/libvmtools.so
 lib/libvmtools.so.0
 lib/libvmtools.so.0.0.0
-lib/libguestlib.a
-lib/libguestlib.so
-lib/libguestlib.so.0
-lib/libguestlib.so.0.0.0
-libdata/pkgconfig/vmguestlib.pc
+@dir lib/vmware-tools/modules/input
+lib/open-vm-tools/plugins/common/libhgfsServer.so
+lib/open-vm-tools/plugins/common/libvix.so
+lib/open-vm-tools/plugins/vmsvc/libdeployPkgPlugin.so
+lib/open-vm-tools/plugins/vmsvc/libguestInfo.so
+lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
+lib/open-vm-tools/plugins/vmsvc/libtimeSync.so
+lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
+%%X11%%lib/open-vm-tools/plugins/vmusr/libresolutionSet.so
+%%X11%%lib/open-vm-tools/plugins/vmusr/libdesktopEvents.so
+%%X11%%lib/open-vm-tools/plugins/vmusr/libdndcp.so
 lib/vmware-tools/modules/drivers/vmblock.ko
 lib/vmware-tools/modules/drivers/vmmemctl.ko
 lib/vmware-tools/modules/drivers/vmxnet.ko
-include/vmGuestLib/includeCheck.h
-include/vmGuestLib/vmGuestLib.h
-include/vmGuestLib/vmSessionId.h
-include/vmGuestLib/vm_basic_types.h
-@dir lib/vmware-tools/modules/input
+libdata/pkgconfig/libDeployPkg.pc
+libdata/pkgconfig/vmguestlib.pc
 sbin/mount_vmblock
-%%X11%%bin/vmware-user-suid-wrapper
 share/vmware-tools/poweroff-vm-default
 share/vmware-tools/poweron-vm-default
 share/vmware-tools/resume-vm-default
@@ -59,4 +73,5 @@ share/vmware-tools/vm-support
 etc/pam.d/vmtoolsd
 @dir %%DATADIR%%/scripts/vmware
 @dir %%DATADIR%%/tests
-@preunexec %%PREFIX%%/bin/vmware-rpctool 'tools.set.version 0' ; service vmware-guestd stop ; true
+@preunexec %%PREFIX%%/bin/vmware-rpctool 'tools.set.version 0' ; service vmware-guestd stop 2>/dev/null || /usr/bin/true
+@postexec service vmware-kmod restart && service vmware-guestd restart || /usr/bin/true



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706301837.v5UIbnP1054451>