ports/92871: [UPDATE]: emulators/vmware3 - Various fixes and solution to crashes.

Travis Poppe tlp at liquidx.org
Mon Feb 6 01:40:18 UTC 2006


>Number:         92871
>Category:       ports
>Synopsis:       [UPDATE]: emulators/vmware3 - Various fixes and solution to crashes.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 06 01:40:04 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Travis Poppe
>Release:        
>Organization:
>Environment:
>Description:
I've discovered that the instant freezes when clicking 'Power On' can be fixed by disabling 
APIC support. ACPI support, on or off, didn't seem to solve anything. I'd like to know whether
or not disabling ACPI has actually helped anyone at all, as it could be removed from the 
pkg-message if not.

I've reflected this in a completely re-worked, step-by-step, more clear pkg-message file.
 I've also added a wrapper script for the vmware wizard, mentioned it in the pkg-message, 
and fixed various portlint complaints.

For some reason, the wizard cannot be launched from within VMware itself. I have no idea
as to what causes this.

>How-To-Repeat:
>Fix:
diff -ruN ./vmware3.orig/Makefile ./vmware3/Makefile
--- ./vmware3.orig/Makefile	Sun Nov 13 03:14:14 2005
+++ ./vmware3/Makefile	Sun Feb  5 17:43:07 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	vmware3
 PORTVERSION=	3.2.1.2242
-PORTREVISION=	12
+PORTREVISION=	13
 PORTEPOCH=	1
 CATEGORIES=	emulators linux
 MASTER_SITES=	http://download3.vmware.com/software/wkst/:vmware \
@@ -24,7 +24,7 @@
 
 RUN_DEPENDS=	/dev/rtc:${PORTSDIR}/emulators/rtc
 
-RESTRICTED=	"Not sure if we can redistribute it"
+RESTRICTED=	Not sure if we can redistribute it
 
 VMWARE_MIRROR_SITES=	\
 		http://vmware-svca.www.conxion.com/software/:vmware \
@@ -49,15 +49,15 @@
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 480102
-IGNORE=		"Systems prior to FreeBSD 480102 currently out of support"
+IGNORE=		systems prior to FreeBSD 480102 currently out of support
 .endif
 
 .if !defined(HAVE_LINPROCFS) && !exists(/modules/linprocfs.ko) && !exists(/boot/kernel/linprocfs.ko) && !exists(${PREFIX}/modules/linprocfs.ko) && !exists(/compat/linux/proc/version)
-IGNORE=		"linprocfs is required, please build the module and/or add it to your kernel"
+IGNORE=		linprocfs is required, please build the module and/or add it to your kernel
 .endif
 
 .if !exists(${SRC_BASE}/Makefile)
-IGNORE=		"Kernel source files required"
+IGNORE=		kernel source files required
 .endif
 
 .if ${OSVERSION} < 500023
@@ -152,6 +152,13 @@
 		-e 's;@@LINUXBASE@@;${LINUXBASE};' \
 		${FILESDIR}/vmware > ${WRKDIR}/vmware
 
+	 ${SED}  -e 's;@@PREFIX@@;${PREFIX};' \
+		 -e 's;@@LINUXBASE@@;${LINUXBASE};' \
+		${FILESDIR}/vmware-wizard > ${WRKDIR}/vmware-wizard
+
+	${SED}  -e 's;@@PREFIX@@;${PREFIX};' \
+		${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
+
 pre-install: setoptions
 	${INSTALL_MAN} ${WRKSRC}/man/man1/vmware.1 ${MANPREFIX}/man/man1
 	${MKDIR} ${VMDIR}/modules
@@ -197,6 +204,7 @@
 		${VMDIR}/licenses/user
 	${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin
 	${INSTALL_SCRIPT} ${WRKDIR}/vmware ${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKDIR}/vmware-wizard ${PREFIX}/bin
 	${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}
 	${MKDIR} ${VMDIR}/help
 	${INSTALL_DATA} ${WRKSRC}/lib/help/* ${VMDIR}/help
@@ -214,10 +222,10 @@
 	${MKDIR} ${VMDIR}/messages/jive
 	${INSTALL_DATA} ${WRKSRC}/lib/messages/jive/* ${VMDIR}/messages/jive
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${PREFIX}/share/doc/vmware
-	${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/vmware
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
 .for f in README.FreeBSD Hints.FreeBSD MultipleInstances.FreeBSD ChangeLog.FreeBSD
-	${INSTALL_DATA} ${FILESDIR}/${f} ${PREFIX}/share/doc/vmware
+	${INSTALL_DATA} ${FILESDIR}/${f} ${DOCSDIR}
 .endfor
 .endif
 
diff -ruN ./vmware3.orig/files/pkg-message.in ./vmware3/files/pkg-message.in
--- ./vmware3.orig/files/pkg-message.in	Wed Dec 31 17:00:00 1969
+++ ./vmware3/files/pkg-message.in	Sun Feb  5 18:21:17 2006
@@ -0,0 +1,42 @@
+************************************************************
+In order to use VMware, you must follow these steps:
+
+1) Mount linprocfs and add an entry for it in /etc/fstab.
+
+2) Make sure the Linux Compatibility module is loaded (use
+   'kldstat' to check) or built into the kernel.
+
+3) Run '@@PREFIX@@/etc/rc.d/001.vmware.sh start'
+   to avoid rebooting.
+
+4) Load the kernel module aio.ko or add it to the kernel 
+   with 'options VFS_AIO' -- otherwise expect problems.
+
+5) Run 'sysctl kern.ipc.shm_allow_removed=1' and add 
+   the variable to /etc/sysctl.conf -- otherwise you will
+   get "Failed to initialize SVGA device" errors.
+
+6) Start vmware with the 'vmware' command, or the wizard
+   with the 'vmware-wizard' command.
+
+                    * * * IMPORTANT * * *
+
+If you experience a freeze upon clicking 'Power On', try
+either:
+
+ 1 - Disabling ACPI support (use 'kldstat' to check) by
+     adding hint.acpi.0.disabled="1" to /boot/device.hints. 
+
+ 2 - Disabling APIC support by either removing it from the
+     kernel or by adding hint.apic.0.disabled="1" to 
+    /boot/device.hints.
+
+Consult the 'man' page or the installed documentation for
+more information.
+
+If you'd like to learn more on how to configure vmnet
+interfaces for multiple instances of VMware, please read:
+
+ @@PREFIX@@/share/doc/vmware/MultipleInstances.FreeBSD
+
+************************************************************
diff -ruN ./vmware3.orig/files/vmware-wizard ./vmware3/files/vmware-wizard
--- ./vmware3.orig/files/vmware-wizard	Wed Dec 31 17:00:00 1969
+++ ./vmware3/files/vmware-wizard	Sun Feb  5 16:18:29 2006
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Run vmware-wizard
+#
+# $FreeBSD$
+
+if [ ! -e @@LINUXBASE@@/proc/cpuinfo ]; then
+    echo "************************************************************"
+    echo "It seems Linux procfs is not mounted on @@LINUXBASE@@/proc."
+    echo "VMware does not work without Linux procfs mounted."
+    echo
+    echo "For details, see linprocfs(5) manpage."
+    echo "************************************************************"
+    exit 1
+fi
+
+LANG=C
+PATH=/bin:$PATH
+
+if [ _$TMPDIR = _ ]; then 
+    TMPDIR=/var/tmp
+    echo Setting TMPDIR="$TMPDIR".
+    export TMPDIR
+fi
+
+exec @@PREFIX@@/lib/vmware/bin/vmware-wizard "$@"
diff -ruN ./vmware3.orig/pkg-message ./vmware3/pkg-message
--- ./vmware3.orig/pkg-message	Thu Jul  8 02:26:34 2004
+++ ./vmware3/pkg-message	Wed Dec 31 17:00:00 1969
@@ -1,37 +0,0 @@
-************************************************************
-Get Linux procfs ready and initialize vmmon/vmnet as follows:
-
-	${PREFIX}/etc/rc.d/vmware.sh start
-
-then you'll be ready to start vmware.
-
-If you experience freezes on power on, be sure that the
-ACPI module is not loaded.
-
-Don't forget to load the kernel module aio.ko, or
-options VFS_AIO in the kernel.  Otherwise expect problems.
-
-If you have fairly recent 5.x system or running vmware3
-on FreeBSD 4.x, make sure that you have sysctl
-kern.ipc.shm_allow_removed set to 1, otherwise you will get
-
-Cannot attach shared memory segment: Invalid argument.
-Failed to initialize SVGA device.
-
-errors on "Power On".
-
-You can add the following to /etc/sysctl.conf:
---- cut here ---
-kern.ipc.shm_allow_removed=1
---- cut here ---
-
-Don't miss the documents installed:
-
-	vmware(1) ${PREFIX}/share/doc/vmware/*
-
-If you want to learn more on how to configure vmnet
-interfaces for multiple instances of VMware, please refer to
-
-  ${PREFIX}/share/doc/vmware/MultipleInstances.FreeBSD
-
-************************************************************
diff -ruN ./vmware3.orig/pkg-plist ./vmware3/pkg-plist
--- ./vmware3.orig/pkg-plist	Thu Jul  8 02:26:34 2004
+++ ./vmware3/pkg-plist	Sun Feb  5 17:02:30 2006
@@ -1,4 +1,5 @@
 bin/vmware
+bin/vmware-wizard
 etc/rc.d/001.vmware.sh
 lib/vmware/modules/vmmon_smp.ko
 %%FREEBSD5%%lib/vmware/modules/linker.hints
@@ -303,14 +304,14 @@
 lib/vmware/smb/codepages/codepage.936
 lib/vmware/smb/codepages/codepage.949
 lib/vmware/smb/codepages/codepage.950
-share/doc/vmware/ChangeLog.FreeBSD
-share/doc/vmware/MultipleInstances.FreeBSD
-share/doc/vmware/Hints.FreeBSD
-share/doc/vmware/README.FreeBSD
-share/doc/vmware/open_source_licenses.txt
-share/doc/vmware/EULA
-share/doc/vmware/INSTALL
-share/doc/vmware/README
+%%DOCSDIR%%/ChangeLog.FreeBSD
+%%DOCSDIR%%/MultipleInstances.FreeBSD
+%%DOCSDIR%%/Hints.FreeBSD
+%%DOCSDIR%%/README.FreeBSD
+%%DOCSDIR%%/open_source_licenses.txt
+%%DOCSDIR%%/EULA
+%%DOCSDIR%%/INSTALL
+%%DOCSDIR%%/README
 @exec mkdir -p %%LINUXBASE%%/dev;for n in 0 1 2 3 4 5 6 7 8 9; do ln -s /dev/ttyv$n %%LINUXBASE%%/dev/tty$n;done
 @exec ln -s /dev/ttyva %%LINUXBASE%%/dev/tty10
 @exec ln -s /dev/ttyvb %%LINUXBASE%%/dev/tty11
@@ -335,4 +336,4 @@
 @dirrm lib/vmware/smb/codepages
 @dirrm lib/vmware/smb
 @dirrm lib/vmware
- at dirrm share/doc/vmware
+ at dirrm %%DOCSDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list