Upgrade open-vm-tools to build 210370 (PR 142112)

Fix complile on FreeBSD 9
Add missing pkg-plist files

PR:		ports/142112 (partly)
Submitted by:	Steve Wills <steve@mouf.net>
This commit is contained in:
Martin Blapp 2010-01-02 16:29:44 +00:00
parent 70b09580a8
commit 5fc5a0bb73
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247004
18 changed files with 77 additions and 221 deletions

View file

@ -15,9 +15,10 @@ DISTNAME= open-vm-tools-${RELEASE_DATE}-${BUILD_VER}
MAINTAINER= mbr@freebsd.org
COMMENT?= Open VMware tools for FreeBSD VMware guests
RELEASE_DATE= 2009.05.22
BUILD_VER= 167859
RELEASE_DATE= 2009.11.16
BUILD_VER= 210370
WRKSRC= ${WRKDIR}/open-vm-tools-2009.11.17-210370
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
@ -77,8 +78,6 @@ USE_RC_SUBR= vmware-guestd.sh vmware-kmod.sh
.if ${OSVERSION} < 700000
BROKEN= does not compile on 6.X
.elif ${OSVERSION} >= 900000
BROKEN= does not build
.endif
.if ${ARCH} == "sparc64"

View file

@ -1,3 +1,3 @@
MD5 (open-vm-tools-2009.05.22-167859.tar.gz) = cc1c139d2d927952be93397d928f9d6c
SHA256 (open-vm-tools-2009.05.22-167859.tar.gz) = 99f3726f86e53abac4efcf70a871e2003d2f245fd83b663ae8ad756322c48a2b
SIZE (open-vm-tools-2009.05.22-167859.tar.gz) = 3417843
MD5 (open-vm-tools-2009.11.16-210370.tar.gz) = 93d28b6e57b8d1ad0d322dd881e11903
SHA256 (open-vm-tools-2009.11.16-210370.tar.gz) = d0eb942bc913350526c734e71661c7824085292f7d21f1b00a5b9dc44152b495
SIZE (open-vm-tools-2009.11.16-210370.tar.gz) = 3514530

View file

@ -1,11 +0,0 @@
--- lib/include/appUtil.h.orig 2009-03-24 19:24:50.000000000 +0900
+++ lib/include/appUtil.h 2009-03-24 19:24:20.000000000 +0900
@@ -69,7 +69,7 @@
#endif //_WIN32
-#if defined(linux)
+#if defined(linux) || defined(__FreeBSD__)
#include <glib.h>
void AppUtil_Init(void);

View file

@ -1,6 +1,6 @@
--- configure.orig 2008-03-28 10:36:13.000000000 +0100
+++ configure 2008-03-28 10:36:45.000000000 +0100
@@ -2167,6 +2167,9 @@
@@ -2259,6 +2259,9 @@
x86_64)
userSpaceBitness="64"
;;

View file

@ -12,49 +12,9 @@
HgfsAccessMode accessMode = 0;
Bool isDir = vp->v_type == VDIR;
if (mode & VREAD) {
--- modules/freebsd/vmblock/vnops.c.orig 2009-03-18 03:03:21.000000000 -0400
+++ modules/freebsd/vmblock/vnops.c 2009-04-04 20:33:28.000000000 -0400
@@ -726,7 +726,11 @@
* NB: Allowing only the superuser to open this directory breaks
* readdir() of the filesystem root for non-privileged users.
*/
- if ((retval = suser(ap->a_td)) == 0) {
+ #if __FreeBSD_version >= 800001
+ if ((retval = priv_check(ap->a_td, PRIV_VFS_GETFH)) == 0) {
+ #else
+ if ((retval = suser(ap->a_td)) == 0) {
+ #endif
#if __FreeBSD_version >= 700055
fp = ap->a_fp;
#else
@@ -1010,7 +1014,11 @@
*/
{
struct vnode *vp = ap->a_vp;
+#if __FreeBSD_version >= 800001
+ mode_t mode = ap->a_accmode;
+#else
mode_t mode = ap->a_mode;
+#endif
/*
* Disallow write attempts on read-only layers; unless the file is a
--- modules/freebsd/vmblock/vfsops.c.orig 2009-03-18 03:03:21.000000000 -0400
+++ modules/freebsd/vmblock/vfsops.c 2009-05-23 02:25:50.892549675 -0400
@@ -113,8 +113,12 @@
*/
static int
+#if __FreeBSD_version >= 800087
+VMBlockVFSMount(struct mount *mp)
+#else
VMBlockVFSMount(struct mount *mp, // IN: mount(2) parameters
struct thread *td) // IN: caller's kernel thread context
+#endif
{
struct VMBlockMount *xmp;
struct nameidata nd, *ndp = &nd;
@@ -122,6 +126,11 @@
@@ -126,6 +126,11 @@
char *target;
int len, error = 0;
@ -66,22 +26,7 @@
VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp);
/*
@@ -253,9 +262,14 @@
*/
static int
+#if __FreeBSD_version >= 800087
+VMBlockVFSUnmount(struct mount *mp,
+ int mntflags)
+#else
VMBlockVFSUnmount(struct mount *mp, // IN: filesystem to unmount
int mntflags, // IN: unmount(2) flags (ex: MNT_FORCE)
struct thread *td) // IN: caller's kernel thread context
+#endif
{
struct VMBlockMount *xmp;
struct vnode *vp;
@@ -263,6 +277,11 @@
@@ -273,6 +278,11 @@
int error;
int flags = 0, removed = 0;
@ -93,69 +38,10 @@
VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp);
xmp = MNTTOVMBLOCKMNT(mp);
@@ -336,13 +355,24 @@
*/
static int
+#if __FreeBSD_version >= 800087
+VMBlockVFSRoot(struct mount *mp,
+ int flags,
+ struct vnode **vpp)
+#else
VMBlockVFSRoot(struct mount *mp, // IN: vmblock file system
int flags, // IN: lockmgr(9) flags
struct vnode **vpp, // OUT: root vnode
struct thread *td) // IN: caller's thread context
+#endif
{
struct vnode *vp;
+#if __FreeBSD_version >= 800087
+ struct thread *td;
+ td = curthread;
+#endif
+
/*
* Return locked reference to root.
*/
@@ -373,12 +403,21 @@
*/
static int
+#if __FreeBSD_version >= 800087
+VMBlockVFSStatFS(struct mount *mp,
+ struct statfs *sbp)
+#else
VMBlockVFSStatFS(struct mount *mp, // IN: vmblock file system
struct statfs *sbp, // OUT: statfs(2) arg container
struct thread *td) // IN: caller's thread context
+#endif
{
int error;
struct statfs mstat;
+#if __FreeBSD_version >= 800087
+ struct thread *td;
+ td = curthread;
+#endif
VMBLOCKDEBUG("VMBlockVFSStatFS(mp = %p, vp = %p->%p)\n", (void *)mp,
(void *)MNTTOVMBLOCKMNT(mp)->rootVnode,
@@ -386,7 +425,11 @@
bzero(&mstat, sizeof mstat);
+#if __FreeBSD_version >= 800087
+ error = VFS_STATFS(MNTTOVMBLOCKMNT(mp)->mountVFS, &mstat);
+#else
error = VFS_STATFS(MNTTOVMBLOCKMNT(mp)->mountVFS, &mstat, td);
+#endif
if (error) {
return error;
}
@@ -423,9 +466,14 @@
*/
static int
@@ -448,10 +458,15 @@
VMBlockVFSSync(struct mount *mp, // Ignored
int waitfor) // Ignored
#else
+#if __FreeBSD_version >= 800087
+VMBlockVFSSync(struct mount *mp,
+ int waitfor)
@ -163,6 +49,7 @@
VMBlockVFSSync(struct mount *mp, // Ignored
int waitfor, // Ignored
struct thread *td) // Ignored
#endif
+#endif
{
return 0;

View file

@ -0,0 +1,38 @@
--- modules/freebsd/vmxnet/if_vxn.c.orig 2009-12-31 09:34:42.000000000 +0100
+++ modules/freebsd/vmxnet/if_vxn.c 2009-12-31 09:36:56.000000000 +0100
@@ -134,7 +134,9 @@
static void vxn_init(void *);
static void vxn_start(struct ifnet *);
static int vxn_ioctl(struct ifnet *, u_long, caddr_t);
+#if __FreeBSD_version >= 900000
static void vxn_watchdog(struct ifnet *);
+#endif
static void vxn_intr (void *);
static void vxn_rx(vxn_softc_t *sc);
@@ -383,7 +385,9 @@
ifp->if_ioctl = vxn_ioctl;
ifp->if_output = ether_output;
ifp->if_start = vxn_start;
+#if __FreeBSD_version >= 900000
ifp->if_watchdog = vxn_watchdog;
+#endif
ifp->if_init = vxn_init;
ifp->if_baudrate = 1000000000;
ifp->if_snd.ifq_maxlen = sc->vxn_num_tx_bufs;
@@ -1018,6 +1022,7 @@
return error;
}
+#if __FreeBSD_version >= 800087
/*
*-----------------------------------------------------------------------------
* vxn_watchdog --
@@ -1035,6 +1040,7 @@
{
printf("vxn%d: watchdog\n", VXN_IF_UNIT(ifp));
}
+#endif
/*
*-----------------------------------------------------------------------------

View file

@ -1,12 +0,0 @@
--- lib/ghIntegration/ghIntegrationX11.c.orig 2009-02-18 17:02:42.000000000 +0900
+++ lib/ghIntegration/ghIntegrationX11.c 2009-03-24 19:18:47.000000000 +0900
@@ -62,7 +62,9 @@
#include "imageUtil.h"
#include "strutil.h"
#include <paths.h>
+#if defined(linux)
#include <mntent.h>
+#endif
#include "vm_atomic.h"
#include "ghIntegration.h"
#include "ghIntegrationInt.h"

View file

@ -1,6 +1,6 @@
--- 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
@@ -77,7 +77,7 @@
@@ -73,7 +73,7 @@
#elif defined(_WIN32)
#define GUESTAPP_TOOLS_INSTALL_PATH ""
#else

View file

@ -1,6 +1,6 @@
--- hgfsmounter/Makefile.in.orig 2009-04-06 17:24:30.000000000 -0400
+++ hgfsmounter/Makefile.in 2009-04-06 17:26:09.000000000 -0400
@@ -558,9 +558,9 @@
@@ -569,9 +569,9 @@
@FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmhgfs \
@FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmhgfs
@FREEBSD_TRUE@@WITH_ROOT_PRIVILEGES_TRUE@ chmod u+s $(DESTDIR)$(sbindir)/mount_vmhgfs

View file

@ -1,6 +1,6 @@
--- modules/Makefile.in.orig 2009-04-06 18:44:58.000000000 -0400
+++ modules/Makefile.in 2009-04-06 18:45:57.000000000 -0400
@@ -435,11 +435,11 @@
@@ -528,11 +528,11 @@
@SOLARIS_TRUE@ $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \
@SOLARIS_TRUE@ -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1; \
@SOLARIS_TRUE@ done

View file

@ -8,7 +8,7 @@
conf_SCRIPTS += $(MODULES_OS)/poweron-vm-default
--- scripts/Makefile.in.orig 2008-07-22 01:13:57.000000000 +0200
+++ scripts/Makefile.in 2008-07-22 01:18:30.000000000 +0200
@@ -186,7 +186,7 @@
@@ -236,7 +236,7 @@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

View file

@ -11,7 +11,7 @@
--- services/Makefile.in.orig 2009-02-28 20:48:52.000000000 +0100
+++ services/Makefile.in 2009-02-28 20:49:46.000000000 +0100
@@ -564,8 +564,8 @@
@@ -576,8 +576,8 @@
install-exec-local:

View file

@ -1,26 +0,0 @@
--- scripts/freebsd/suspend-vm-default.orig 2009-02-28 23:36:59.000000000 +0100
+++ scripts/freebsd/suspend-vm-default 2009-02-28 23:38:56.000000000 +0100
@@ -34,16 +34,16 @@
# Release the IP if DHCP is used.
case "`uname -r`" in
-6.*) # 'PID dhclient: em0' => 'em0'
- for intf in `pgrep -fl dhclient | cut -d" " -f3 | sort | uniq`; do
- ifconfig "$intf" down
- ifconfig "$intf" delete
- done
- ;;
-*) # Have dhclient running => release lease
+[45].*) # Have dhclient running => release lease
ps auxw | grep -q dhclient
if [ "$?" -eq 0 ]; then
dhclient -r
fi
;;
+*) # 'PID dhclient: em0' => 'em0'
+ for intf in `pgrep -fl dhclient | cut -d" " -f3 | sort | uniq`; do
+ ifconfig "$intf" down
+ ifconfig "$intf" delete
+ done
+ ;;
esac

View file

@ -1,6 +1,6 @@
--- lib/misc/util_misc.c.orig 2009-04-14 02:38:09.000000000 +0200
+++ lib/misc/util_misc.c 2009-04-14 02:39:00.000000000 +0200
@@ -289,7 +289,7 @@
@@ -292,7 +292,7 @@
return (strcmp(path1, path2) == 0);
#elif defined(_WIN32)
return (_stricmp(path1, path2) == 0);
@ -9,7 +9,7 @@
return (strcasecmp(path1, path2) == 0);
#else
NOT_IMPLEMENTED();
@@ -316,7 +316,7 @@
@@ -319,7 +319,7 @@
Bool
Util_IsAbsolutePath(const char *path) // IN: path to check
{

View file

@ -1,29 +0,0 @@
--- modules/freebsd/vmblock/subr.c.orig 2009-02-28 23:04:14.000000000 +0100
+++ modules/freebsd/vmblock/subr.c 2009-02-28 23:05:38.000000000 +0100
@@ -334,7 +334,12 @@
vp->v_vnlock = &vp->v_lock;
FREE(xp, M_VMBLOCKFSNODE);
vp->v_op = &dead_vnodeops;
+
+#if __FreeBSD_version >= 800011
+ (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+#else
(void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread);
+#endif
vgone(vp);
vput(vp);
}
@@ -405,6 +410,13 @@
return error;
}
+#if __FreeBSD_version >= 700034
+ if ((error = insmntque(vp, mp)) != 0) {
+ free(xp, M_VMBLOCKFSNODE);
+ return error;
+ }
+#endif
+
xp->backVnode = vp;
xp->lowerVnode = lowervp;
vp->v_type = lowervp->v_type;

View file

@ -1,6 +1,6 @@
--- modules/freebsd/vmmemctl/os.c.orig 2009-04-09 15:18:08.000000000 -0400
+++ modules/freebsd/vmmemctl/os.c 2009-04-09 15:34:06.000000000 -0400
@@ -260,12 +260,14 @@
@@ -413,12 +413,14 @@
os_state *state = &global_state;
os_pmap *pmap = &state->pmap;
@ -20,7 +20,7 @@
}
static vm_page_t os_kmem_alloc(int alloc_normal_failed)
@@ -275,8 +277,11 @@
@@ -430,8 +432,11 @@
os_state *state = &global_state;
os_pmap *pmap = &state->pmap;
@ -32,7 +32,7 @@
return NULL;
}
@@ -297,6 +302,7 @@
@@ -452,6 +457,7 @@
if (!page) {
os_pmap_putindex(pmap, pindex);
}

View file

@ -1,6 +1,6 @@
--- services/vmtoolsd/Makefile.in.orig 2009-04-06 18:40:27.000000000 -0400
+++ services/vmtoolsd/Makefile.in 2009-04-06 18:41:16.000000000 -0400
@@ -707,7 +707,7 @@
@@ -722,7 +722,7 @@
$@ || (rm -f $@ && exit 1)
install-exec-hook:

View file

@ -6,14 +6,16 @@ bin/vmtoolsd
bin/vmware-toolbox-cmd
%%FUSE%%bin/vmware-vmblock-fuse
lib/open-vm-tools/plugins/vmsvc/libguestInfo.so
lib/open-vm-tools/plugins/vmsvc/libhgfsServer.so
lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
lib/open-vm-tools/plugins/vmsvc/libtimeSync.so
lib/open-vm-tools/plugins/vmsvc/libvix.so
lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libhgfsServer.so
lib/open-vm-tools/plugins/vmsvc/libhgfsServer.so
lib/open-vm-tools/plugins/vmsvc/libvix.so
lib/open-vm-tools/plugins/common/libhgfsServer.so
lib/open-vm-tools/plugins/common/libhgfsServer.la
lib/open-vm-tools/plugins/common/libvix.so
lib/open-vm-tools/plugins/common/libvix.la
%%X11%%lib/open-vm-tools/plugins/vmusr/libresolutionSet.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libvix.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libvixUser.so
lib/libvmtools.a
lib/libvmtools.la
@ -23,6 +25,7 @@ lib/libguestlib.a
lib/libguestlib.la
lib/libguestlib.so
lib/libguestlib.so.0
lib/pkgconfig/vmguestlib.pc
lib/vmware-tools/modules/drivers/linker.hints
lib/vmware-tools/modules/drivers/vmblock.ko
lib/vmware-tools/modules/drivers/vmhgfs.ko
@ -30,6 +33,10 @@ lib/vmware-tools/modules/drivers/vmmemctl.ko
lib/vmware-tools/modules/drivers/vmxnet.ko
share/open-vm-tools/tests/libtestDebug.so
share/open-vm-tools/tests/libtestPlugin.so
include/vmGuestLib/includeCheck.h
include/vmGuestLib/vmGuestLib.h
include/vmGuestLib/vmSessionId.h
include/vmGuestLib/vm_basic_types.h
@exec mkdir -p %D/lib/vmware-tools/modules/input
sbin/mount_vmhgfs
%%X11%%bin/vmware-toolbox
@ -53,8 +60,11 @@ share/vmware-tools/vm-support
@dirrmtry share/open-vm-tools/tests
@dirrmtry share/open-vm-tools
@dirrmtry share/vmware-tools
@dirrmtry lib/pkgconfig
%%X11%%@dirrmtry share/applications
@dirrm lib/open-vm-tools/plugins/common
@dirrm lib/open-vm-tools/plugins/vmsvc
%%X11%%@dirrm lib/open-vm-tools/plugins/vmusr
@dirrm lib/open-vm-tools/plugins
@dirrm lib/open-vm-tools
@dirrm include/vmGuestLib