Date: Tue, 29 Aug 2017 16:43:48 +0000 (UTC) From: Josh Paetzel <jpaetzel@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448929 - in head/emulators/open-vm-tools: . files Message-ID: <201708291643.v7TGhmfd027142@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jpaetzel Date: Tue Aug 29 16:43:48 2017 New Revision: 448929 URL: https://svnweb.freebsd.org/changeset/ports/448929 Log: Update to 10.1.10 Improvements include: - Improved OS detection and reporting for FreeBSD 11 and 12. - Improved networking resume for DHCP FreeBSD guests. - Check for Xen, VirtualPC etc., only if VMware not detected. - Improve timesync when the offset is large. Full changelog is available at: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/ChangeLog PR: 221194 Added: head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c (contents, props changed) head/emulators/open-vm-tools/files/patch-lib_include_guest__os.h (contents, props changed) head/emulators/open-vm-tools/files/patch-lib_misc_hostinfoPosix.c (contents, props changed) Deleted: head/emulators/open-vm-tools/files/patch-scripts_freebsd_network Modified: head/emulators/open-vm-tools/Makefile head/emulators/open-vm-tools/distinfo head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c Modified: head/emulators/open-vm-tools/Makefile ============================================================================== --- head/emulators/open-vm-tools/Makefile Tue Aug 29 16:32:19 2017 (r448928) +++ head/emulators/open-vm-tools/Makefile Tue Aug 29 16:43:48 2017 (r448929) @@ -5,7 +5,6 @@ PORTNAME= open-vm-tools PORTVERSION= ${RELEASE_VER} DISTVERSIONPREFIX= stable- PORTEPOCH= 2 -PORTREVISION= 1 CATEGORIES= emulators MAINTAINER= jpaetzel@FreeBSD.org @@ -14,12 +13,14 @@ COMMENT?= Open VMware tools for FreeBSD VMware guests LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/COPYING +ONLY_FOR_ARCHS= amd64 i386 + 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 +RELEASE_VER= 10.1.10 +BUILD_VER= 6082533 OPTIONS_DEFINE= DNET ICU LIBNOTIFY OPENSSL X11 OPTIONS_DEFAULT= DNET ICU LIBNOTIFY OPENSSL X11 @@ -44,8 +45,8 @@ OPENSSL_CONFIGURE_WITH= ssl WRKSRC_SUBDIR= open-vm-tools GNU_CONFIGURE= yes -USE_GNOME= glib20 USES= autoreconf:-iv fuse gettext-runtime kmod libtool localbase pathfix pkgconfig +USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= vmware @@ -72,8 +73,6 @@ CONFLICTS= open-vm-tools-nox11-[0-9]* .else CONFLICTS= open-vm-tools-[0-9]* .endif - -ONLY_FOR_ARCHS= i386 amd64 CONFIGURE_ENV+= SYSDIR=${SRC_BASE}/sys Modified: head/emulators/open-vm-tools/distinfo ============================================================================== --- head/emulators/open-vm-tools/distinfo Tue Aug 29 16:32:19 2017 (r448928) +++ head/emulators/open-vm-tools/distinfo Tue Aug 29 16:43:48 2017 (r448929) @@ -1,3 +1,3 @@ -TIMESTAMP = 1501156965 -SHA256 (vmware-open-vm-tools-stable-10.1.5_GH0.tar.gz) = aba7bf570b8951b61784941460659c204359d98fcbfb164df3c30d468a19fb1c -SIZE (vmware-open-vm-tools-stable-10.1.5_GH0.tar.gz) = 3540164 +TIMESTAMP = 1503010753 +SHA256 (vmware-open-vm-tools-stable-10.1.10_GH0.tar.gz) = ce03c8827389ea272a5c072366b6bff381b2eddad94750c6a9433a0dea61c762 +SIZE (vmware-open-vm-tools-stable-10.1.10_GH0.tar.gz) = 3543342 Added: head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/open-vm-tools/files/patch-lib_hgfsServer_hgfsServerLinux.c Tue Aug 29 16:43:48 2017 (r448929) @@ -0,0 +1,15 @@ +--- lib/hgfsServer/hgfsServerLinux.c.orig 2017-07-28 21:59:15 UTC ++++ lib/hgfsServer/hgfsServerLinux.c +@@ -178,6 +178,12 @@ getdents_linux(unsigned int fd, + # endif + } + # define getdents getdents_linux ++#elif defined(__FreeBSD__) && defined(__INO64) ++#define getdents(fd, dirp, count) \ ++({ \ ++ off_t basep; \ ++ getdirentries(fd, dirp, count, &basep); \ ++}) + #elif defined(__FreeBSD__) + #define getdents(fd, dirp, count) \ + ({ \ Added: head/emulators/open-vm-tools/files/patch-lib_include_guest__os.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/open-vm-tools/files/patch-lib_include_guest__os.h Tue Aug 29 16:43:48 2017 (r448929) @@ -0,0 +1,12 @@ +--- lib/include/guest_os.h.orig 2017-07-28 21:59:15 UTC ++++ lib/include/guest_os.h +@@ -493,7 +493,8 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); + #define STR_OS_WIN_64_BIT_EXTENSION ", 64-bit" + + /* FreeBSD */ +-#define STR_OS_FREEBSD "freeBSD" ++#define STR_OS_FREEBSD "freeBSD" ++#define STR_OS_FREEBSD11 "freeBSD11" + + /* Solaris */ + #define STR_OS_SOLARIS "solaris" Added: head/emulators/open-vm-tools/files/patch-lib_misc_hostinfoPosix.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/open-vm-tools/files/patch-lib_misc_hostinfoPosix.c Tue Aug 29 16:43:48 2017 (r448929) @@ -0,0 +1,53 @@ +--- lib/misc/hostinfoPosix.c.orig 2017-07-28 21:59:15 UTC ++++ lib/misc/hostinfoPosix.c +@@ -1,5 +1,5 @@ + /********************************************************* +- * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. ++ * Copyright (C) 1998-2017 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published +@@ -1080,28 +1080,32 @@ HostinfoOSData(void) + + Str_Strcpy(osName, distroShort, sizeof osName); + } else if (strstr(osNameFull, "FreeBSD")) { +- size_t nameLen = sizeof STR_OS_FREEBSD - 1; +- size_t releaseLen = 0; +- char *dashPtr; ++ char distroShort[DISTRO_BUF_SIZE]; ++ int majorVersion; + + /* +- * FreeBSD releases report their version as "x.y-RELEASE". We'll be +- * naive look for the first dash, and use everything before it as the +- * version number. ++ * FreeBSD releases report their version as "x.y-RELEASE". + */ + +- dashPtr = Str_Strchr(buf.release, '-'); +- if (dashPtr != NULL) { +- releaseLen = dashPtr - buf.release; ++ majorVersion = Hostinfo_OSVersion(0); ++ ++ /* ++ * FreeBSD 11 and later are identified using ++ * a different guestId. ++ */ ++ if (majorVersion >= 11) { ++ Str_Strcpy(distroShort, STR_OS_FREEBSD11, sizeof distroShort); ++ } else { ++ Str_Strcpy(distroShort, STR_OS_FREEBSD, sizeof distroShort); + } + +- if (nameLen + releaseLen + 1 > sizeof osName) { ++ if (strlen(distroShort) + 1 > sizeof osName) { + Warning("%s: Error: buffer too small\n", __FUNCTION__); + + return FALSE; + } + +- Str_Strcpy(osName, STR_OS_FREEBSD, sizeof osName); ++ Str_Strcpy(osName, distroShort, sizeof osName); + } else if (strstr(osNameFull, "SunOS")) { + size_t nameLen = sizeof STR_OS_SOLARIS - 1; + size_t releaseLen = 0; Modified: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c ============================================================================== --- head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c Tue Aug 29 16:32:19 2017 (r448928) +++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c Tue Aug 29 16:43:48 2017 (r448929) @@ -1,5 +1,5 @@ ---- modules/freebsd/vmmemctl/os.c.orig 2017-02-24 14:15:37.000000000 -0800 -+++ modules/freebsd/vmmemctl/os.c 2017-08-15 13:54:03.813152000 -0700 +--- modules/freebsd/vmmemctl/os.c.orig 2017-07-28 21:59:15 UTC ++++ modules/freebsd/vmmemctl/os.c @@ -37,9 +37,11 @@ #include <sys/param.h> #include <sys/systm.h> @@ -12,113 +12,96 @@ #include <sys/sysctl.h> #include <vm/vm.h> -@@ -223,7 +225,11 @@ static __inline__ unsigned long os_ffz(u - unsigned long - OS_ReservedPageGetLimit(void) - { +@@ -83,6 +85,30 @@ typedef struct { + MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl metadata"); + + /* ++ * FreeBSD version specific MACROS ++ */ ++#if __FreeBSD_version >= 900000 ++ #define VM_PAGE_LOCK(page) vm_page_lock(page); ++ #define VM_PAGE_UNLOCK(page) vm_page_unlock(page) ++#else ++ #define VM_PAGE_LOCK(page) vm_page_lock_queues() ++ #define VM_PAGE_UNLOCK(page) vm_page_unlock_queues() ++#endif ++ ++#if __FreeBSD_version > 1000029 ++ #define VM_OBJ_LOCK(object) VM_OBJECT_WLOCK(object) ++ #define VM_OBJ_UNLOCK(object) VM_OBJECT_WUNLOCK(object); ++#else ++ #define VM_OBJ_LOCK(object) VM_OBJECT_LOCK(object); ++ #define VM_OBJ_UNLOCK(object) VM_OBJECT_UNLOCK(object); ++#endif ++ +#if __FreeBSD_version < 1100015 - return cnt.v_page_count; ++ #define VM_SYS_PAGES cnt.v_page_count +#else -+ return vm_cnt.v_page_count; ++ #define VM_SYS_PAGES vm_cnt.v_page_count +#endif ++/* + * Globals + */ + +@@ -223,7 +249,7 @@ static __inline__ unsigned long os_ffz(unsigned long w + unsigned long + OS_ReservedPageGetLimit(void) + { +- return cnt.v_page_count; ++ return VM_SYS_PAGES; } -@@ -369,7 +375,11 @@ static void +@@ -369,7 +395,7 @@ 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 +- p->size = (cnt.v_page_count + 7) / 8; ++ p->size = (VM_SYS_PAGES + 7) / 8; /* * 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 +@@ -466,12 +492,14 @@ 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); -+#if __FreeBSD_version > 1000029 -+ VM_OBJECT_WLOCK(state->vmobject); -+#else -+ VM_OBJECT_LOCK(state->vmobject); -+#endif ++ VM_OBJ_LOCK(state->vmobject); + 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 ++ os_pmap_putindex(pmap, page->pindex); ++ VM_PAGE_LOCK(page); ++ vm_page_free(page); ++ VM_PAGE_UNLOCK(page); } - - os_pmap_putindex(pmap, page->pindex); - vm_page_free(page); -+#if __FreeBSD_version > 1000029 -+ VM_OBJECT_WUNLOCK(state->vmobject); -+#else -+ VM_OBJECT_UNLOCK(state->vmobject); -+#endif ++ VM_OBJ_UNLOCK(state->vmobject); } -@@ -483,8 +518,19 @@ os_kmem_alloc(int alloc_normal_failed) / +@@ -483,8 +511,11 @@ os_kmem_alloc(int alloc_normal_failed) // IN 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 ++ VM_OBJ_LOCK(state->vmobject); + 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 ++ VM_OBJ_UNLOCK(state->vmobject); return NULL; } -@@ -505,6 +551,11 @@ os_kmem_alloc(int alloc_normal_failed) / +@@ -505,6 +536,7 @@ os_kmem_alloc(int alloc_normal_failed) // IN if (!page) { os_pmap_putindex(pmap, pindex); } -+#if __FreeBSD_version > 1000029 -+ VM_OBJECT_WUNLOCK(state->vmobject); -+#else -+ VM_OBJECT_UNLOCK(state->vmobject); -+#endif ++ VM_OBJ_UNLOCK(state->vmobject); return page; } -@@ -847,7 +898,7 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS) +@@ -847,7 +879,7 @@ vmmemctl_sysctl(SYSCTL_HANDLER_ARGS) static void vmmemctl_init_sysctl(void) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708291643.v7TGhmfd027142>