aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2017-07-01 02:37:49 +0800
committerswills <swills@FreeBSD.org>2017-07-01 02:37:49 +0800
commit28805656adcd63399c733cd9c939df2f05803dc8 (patch)
treeb1ef9271f0cc4a5e93aef1bd1b494c8979c0ed49 /emulators
parent85eb55a84ca6bd22b5f78c199b870bf015f8187c (diff)
downloadfreebsd-ports-gnome-28805656adcd63399c733cd9c939df2f05803dc8.tar.gz
freebsd-ports-gnome-28805656adcd63399c733cd9c939df2f05803dc8.tar.zst
freebsd-ports-gnome-28805656adcd63399c733cd9c939df2f05803dc8.zip
emulators/open-vm-tools: update to 10.1.5
Diffstat (limited to 'emulators')
-rw-r--r--emulators/open-vm-tools/Makefile50
-rw-r--r--emulators/open-vm-tools/distinfo6
-rw-r--r--emulators/open-vm-tools/files/patch-configure11
-rw-r--r--emulators/open-vm-tools/files/patch-configure.ac20
-rw-r--r--emulators/open-vm-tools/files/patch-guestApp.c11
-rw-r--r--emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c11
-rw-r--r--emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c10
-rw-r--r--emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c11
-rw-r--r--emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h4
-rw-r--r--emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h10
-rw-r--r--emulators/open-vm-tools/files/patch-lib_misc_util__misc.c (renamed from emulators/open-vm-tools/files/patch-util_misc.c)4
-rw-r--r--emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c10
-rw-r--r--emulators/open-vm-tools/files/patch-modules-Makefile.in14
-rw-r--r--emulators/open-vm-tools/files/patch-modules_Makefile.am19
-rw-r--r--emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c26
-rw-r--r--emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c (renamed from emulators/open-vm-tools/files/patch-vmmemctl-os.c)41
-rw-r--r--emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c (renamed from emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c)22
-rw-r--r--emulators/open-vm-tools/files/patch-scripts-Makefile11
-rw-r--r--emulators/open-vm-tools/files/patch-scripts_Makefile.am11
-rw-r--r--emulators/open-vm-tools/files/patch-scripts_freebsd_network (renamed from emulators/open-vm-tools/files/patch-scripts-network)6
-rw-r--r--emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am (renamed from emulators/open-vm-tools/files/patch-vmtoolsd-Makefile.in)6
-rw-r--r--emulators/open-vm-tools/files/patch-vmblockmounter-Makefile.in12
-rw-r--r--emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am25
-rw-r--r--emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am (renamed from emulators/open-vm-tools/files/patch-wrapper-Makefile.am)6
-rw-r--r--emulators/open-vm-tools/pkg-plist61
25 files changed, 261 insertions, 157 deletions
diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile
index 303ee5aedb4b..4531d38723db 100644
--- a/emulators/open-vm-tools/Makefile
+++ b/emulators/open-vm-tools/Makefile
@@ -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
+
+RELEASE_VER= 10.1.5
+BUILD_VER= 5055683
+
+OPTIONS_DEFINE= DNET ICU LIBNOTIFY OPENSSL X11
+OPTIONS_DEFAULT= DNET ICU LIBNOTIFY OPENSSL X11
-OPTIONS_DEFINE= X11 LIBNOTIFY UNITY FUSE DNET ICU
-OPTIONS_DEFAULT= X11 LIBNOTIFY FUSE DNET ICU
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}/${PORTNAME}-stable-${RELEASE_VER}/open-vm-tools/
-WRKSRC= ${WRKDIR}/open-vm-tools-${RELEASE_VER}-${BUILD_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}
@@ -80,6 +78,10 @@ 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}
diff --git a/emulators/open-vm-tools/distinfo b/emulators/open-vm-tools/distinfo
index 26132e9bfc02..9deee0d1c2f0 100644
--- a/emulators/open-vm-tools/distinfo
+++ b/emulators/open-vm-tools/distinfo
@@ -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
diff --git a/emulators/open-vm-tools/files/patch-configure b/emulators/open-vm-tools/files/patch-configure
deleted file mode 100644
index 6674d7b6cf72..000000000000
--- a/emulators/open-vm-tools/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2017-01-11 20:40:42.694207000 +0000
-+++ configure 2017-01-11 20:41:03.256056000 +0000
-@@ -34117,7 +34117,7 @@ CFLAGS="$CFLAGS -Werror"
- # warnings for now (-Wno-deprecated-declarations).
- for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \
- -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations \
-- -Wno-unused-const-variable; do
-+ -Wno-unused-const-variable -Wno-address-of-packed-member; do
- { echo "$as_me:$LINENO: checking for GCC flag $TEST_CFLAG" >&5
- echo $ECHO_N "checking for GCC flag $TEST_CFLAG... $ECHO_C" >&6; }
- ORIGINAL_CFLAGS="$CFLAGS"
diff --git a/emulators/open-vm-tools/files/patch-configure.ac b/emulators/open-vm-tools/files/patch-configure.ac
new file mode 100644
index 000000000000..36d1421ce7dc
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-configure.ac
@@ -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.
diff --git a/emulators/open-vm-tools/files/patch-guestApp.c b/emulators/open-vm-tools/files/patch-guestApp.c
deleted file mode 100644
index a30fa0bedf62..000000000000
--- a/emulators/open-vm-tools/files/patch-guestApp.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/guestApp/guestApp.c.orig 2008-05-29 10:42:37.000000000 +0300
-+++ lib/guestApp/guestApp.c 2008-05-29 10:43:09.000000000 +0300
-@@ -65,7 +65,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 "/usr/local/share/vmware-tools"
- #endif
-
- /*
diff --git a/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c b/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c
new file mode 100644
index 000000000000..bac958d6dfb8
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-libDeployPkg_processPosix.c
@@ -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"
+
diff --git a/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c b/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c
deleted file mode 100644
index 0450b28433ff..000000000000
--- a/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./lib/vmCheck/vmcheck.c.orig 2013-09-23 15:51:10.000000000 +0000
-+++ ./lib/vmCheck/vmcheck.c 2014-04-23 15:36:44.323843725 +0000
-@@ -134,6 +134,7 @@
- #else
- do {
- int signals[] = {
-+ SIGBUS,
- SIGILL,
- SIGSEGV,
- };
diff --git a/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c b/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c
new file mode 100644
index 000000000000..fa55c5014756
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c
@@ -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
diff --git a/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h b/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h
index 42e730c2fee7..24c4791f79f6 100644
--- a/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h
+++ b/emulators/open-vm-tools/files/patch-lib_include_vm__basic__defs.h
@@ -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. */
diff --git a/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h b/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h
new file mode 100644
index 000000000000..2ac99e76f388
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h
@@ -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)
diff --git a/emulators/open-vm-tools/files/patch-util_misc.c b/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c
index ab7caad51375..983173b39e81 100644
--- a/emulators/open-vm-tools/files/patch-util_misc.c
+++ b/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c
@@ -1,5 +1,5 @@
---- lib/misc/util_misc.c.orig 2017-01-12 00:14:04.989252000 -0500
-+++ lib/misc/util_misc.c 2017-01-12 00:14:12.099031000 -0500
+--- 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)
diff --git a/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c b/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c
new file mode 100644
index 000000000000..ecd5ae7f8155
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c
@@ -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,
+ };
diff --git a/emulators/open-vm-tools/files/patch-modules-Makefile.in b/emulators/open-vm-tools/files/patch-modules-Makefile.in
deleted file mode 100644
index e6f00622e87b..000000000000
--- a/emulators/open-vm-tools/files/patch-modules-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- modules/Makefile.in.orig 2017-01-11 21:40:55.849672000 -0500
-+++ modules/Makefile.in 2017-01-11 21:41:10.446157000 -0500
-@@ -543,11 +543,6 @@
- @SOLARIS_TRUE@ $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \
- @SOLARIS_TRUE@ -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1; \
- @SOLARIS_TRUE@ done
--@FREEBSD_TRUE@ for MOD in $(MODULES); do \
--@FREEBSD_TRUE@ $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \
--@FREEBSD_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \
--@FREEBSD_TRUE@ $(DESTDIR)$(MODULES_DIR); \
--@FREEBSD_TRUE@ done
- @LINUX_TRUE@ for MOD in $(MODULES); do \
- @LINUX_TRUE@ $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`; \
- @LINUX_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko \
diff --git a/emulators/open-vm-tools/files/patch-modules_Makefile.am b/emulators/open-vm-tools/files/patch-modules_Makefile.am
new file mode 100644
index 000000000000..ed9f3a986665
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-modules_Makefile.am
@@ -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 \
diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c
new file mode 100644
index 000000000000..c52b96dab88c
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c
@@ -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);
diff --git a/emulators/open-vm-tools/files/patch-vmmemctl-os.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c
index 97a7b6b6babc..2c404b7df813 100644
--- a/emulators/open-vm-tools/files/patch-vmmemctl-os.c
+++ b/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c
@@ -1,5 +1,5 @@
---- modules/freebsd/vmmemctl/os.c.orig 2016-09-29 06:07:23.000000000 -0400
-+++ modules/freebsd/vmmemctl/os.c 2017-02-22 12:15:23.708060000 -0500
+--- 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>
@@ -36,33 +36,46 @@
/*
* expand to nearest word boundary
-@@ -466,12 +476,31 @@ os_kmem_free(vm_page_t page) // IN
+@@ -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);
++ os_pmap_putindex(pmap, page->pindex);
+#if __FreeBSD_version >= 900000
-+ vm_page_lock(page);
++ vm_page_lock(page);
+#else
-+ vm_page_lock_queues();
++ vm_page_lock_queues();
+#endif
-+ vm_page_free(page);
++ vm_page_free(page);
+#if __FreeBSD_version >= 900000
-+ vm_page_unlock(page);
++ vm_page_unlock(page);
+#else
-+ vm_page_unlock_queues();
++ vm_page_unlock_queues();
+#endif
+ }
+#if __FreeBSD_version > 1000029
@@ -73,7 +86,7 @@
}
-@@ -483,8 +512,19 @@ os_kmem_alloc(int alloc_normal_failed) /
+@@ -483,8 +518,19 @@ os_kmem_alloc(int alloc_normal_failed) /
os_state *state = &global_state;
os_pmap *pmap = &state->pmap;
@@ -93,19 +106,19 @@
return NULL;
}
-@@ -505,6 +545,11 @@ os_kmem_alloc(int alloc_normal_failed) /
+@@ -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 +892,7 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS)
+@@ -847,7 +898,7 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS)
static void
vmmemctl_init_sysctl(void)
{
diff --git a/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c
index 0a0ac1e83306..df5ed216d6c8 100644
--- a/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c
+++ b/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_if__vxn.c
@@ -1,5 +1,5 @@
---- modules/freebsd/vmxnet/if_vxn.c.orig 2013-09-23 19:51:10.000000000 +0400
-+++ modules/freebsd/vmxnet/if_vxn.c 2014-10-02 22:13:31.000000000 +0400
+--- 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
@@ -11,7 +11,7 @@
/* define INLINE the way gcc likes it */
#define INLINE __inline__
-@@ -936,14 +940,14 @@
+@@ -936,14 +940,14 @@ vxn_encap(struct ifnet *ifp,
if (m != NULL) {
struct mbuf *m_new = NULL;
@@ -28,19 +28,20 @@
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 @@
+@@ -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++;
++ ifp->if_opackets++;
+#endif
}
/*
-@@ -1266,9 +1274,9 @@
+@@ -1266,9 +1274,9 @@ vxn_rx(vxn_softc_t *sc)
/*
* Allocate a new mbuf cluster to replace the current one
*/
@@ -52,20 +53,19 @@
if (m_new->m_flags & M_EXT) {
m_adj(m_new, ETHER_ALIGN);
} else {
-@@ -1286,8 +1294,11 @@
-
+@@ -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);
++ 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 +1412,10 @@
+@@ -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.
*/
diff --git a/emulators/open-vm-tools/files/patch-scripts-Makefile b/emulators/open-vm-tools/files/patch-scripts-Makefile
deleted file mode 100644
index 37a76c88ab7a..000000000000
--- a/emulators/open-vm-tools/files/patch-scripts-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- scripts/Makefile.in.orig 2017-01-11 20:52:28.004220000 -0500
-+++ scripts/Makefile.in 2017-01-11 20:52:42.153725000 -0500
-@@ -256,7 +256,7 @@
- top_srcdir = @top_srcdir@
- defaultscripts = poweron-vm-default poweroff-vm-default \
- suspend-vm-default resume-vm-default
--confdir = /etc/vmware-tools
-+confdir = ${prefix}/share/vmware-tools
- conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \
- $(am__append_1) $(defaultscripts)
- vmwsrcdir = $(confdir)/scripts/vmware
diff --git a/emulators/open-vm-tools/files/patch-scripts_Makefile.am b/emulators/open-vm-tools/files/patch-scripts_Makefile.am
new file mode 100644
index 000000000000..51383aa7723e
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-scripts_Makefile.am
@@ -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
diff --git a/emulators/open-vm-tools/files/patch-scripts-network b/emulators/open-vm-tools/files/patch-scripts_freebsd_network
index 2feb534b5ac4..4a86f951450a 100644
--- a/emulators/open-vm-tools/files/patch-scripts-network
+++ b/emulators/open-vm-tools/files/patch-scripts_freebsd_network
@@ -1,6 +1,6 @@
---- ./scripts/freebsd/network.orig 2010-04-28 03:17:28.000000000 +0900
-+++ ./scripts/freebsd/network 2010-11-11 22:18:23.000000000 +0900
-@@ -59,6 +59,7 @@
+--- 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
diff --git a/emulators/open-vm-tools/files/patch-vmtoolsd-Makefile.in b/emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am
index bdcf7232b688..0cb245c1784c 100644
--- a/emulators/open-vm-tools/files/patch-vmtoolsd-Makefile.in
+++ b/emulators/open-vm-tools/files/patch-services_vmtoolsd_Makefile.am
@@ -1,6 +1,6 @@
---- services/vmtoolsd/Makefile.in.orig 2017-01-11 21:00:01.938705000 -0500
-+++ services/vmtoolsd/Makefile.in 2017-01-11 21:00:22.495767000 -0500
-@@ -761,7 +761,7 @@
+--- 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:
diff --git a/emulators/open-vm-tools/files/patch-vmblockmounter-Makefile.in b/emulators/open-vm-tools/files/patch-vmblockmounter-Makefile.in
deleted file mode 100644
index f9d24d0689ab..000000000000
--- a/emulators/open-vm-tools/files/patch-vmblockmounter-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- vmblockmounter/Makefile.in.orig 2017-01-11 20:47:51.559298000 -0500
-+++ vmblockmounter/Makefile.in 2017-01-11 20:48:04.188633000 -0500
-@@ -578,9 +578,6 @@
- @FREEBSD_TRUE@install-exec-hook:
- @FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmblock \
- @FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmblock
--@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin
--@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmblock \
--@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmblock &> /dev/null
- @FREEBSD_TRUE@uninstall-hook:
- @FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmblock
- @FREEBSD_FALSE@install-exec-hook:
diff --git a/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am b/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am
new file mode 100644
index 000000000000..080823d0980a
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-vmblockmounter_Makefile.am
@@ -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
diff --git a/emulators/open-vm-tools/files/patch-wrapper-Makefile.am b/emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am
index 24bd6f31395b..7975c60be0ca 100644
--- a/emulators/open-vm-tools/files/patch-wrapper-Makefile.am
+++ b/emulators/open-vm-tools/files/patch-vmware-user-suid-wrapper_Makefile.am
@@ -1,6 +1,6 @@
---- vmware-user-suid-wrapper/Makefile.am.orig 2010-10-20 05:19:54.000000000 +0900
-+++ vmware-user-suid-wrapper/Makefile.am 2010-11-16 17:52:55.000000000 +0900
-@@ -19,6 +19,8 @@
+--- 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\"
diff --git a/emulators/open-vm-tools/pkg-plist b/emulators/open-vm-tools/pkg-plist
index 89090aa5b46c..eebf834b0219 100644
--- a/emulators/open-vm-tools/pkg-plist
+++ b/emulators/open-vm-tools/pkg-plist
@@ -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