diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2000-03-25 20:24:32 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2000-03-25 20:24:32 +0000 |
commit | 9225c521c3e097ac831e541c438eceb958bb610f (patch) | |
tree | 061ddf8e675cbc875e32c1f4eb7b7bae904f292b /emulators/vmware2 | |
parent | 403c782e438e0a9cb3c9a3342a78ab4b5d3605f8 (diff) | |
download | ports-9225c521c3e097ac831e541c438eceb958bb610f.tar.gz ports-9225c521c3e097ac831e541c438eceb958bb610f.zip |
Notes
Diffstat (limited to 'emulators/vmware2')
-rw-r--r-- | emulators/vmware2/Makefile | 85 | ||||
-rw-r--r-- | emulators/vmware2/files/Makefile | 2 | ||||
-rw-r--r-- | emulators/vmware2/files/vmware.sh | 43 | ||||
-rw-r--r-- | emulators/vmware2/pkg-comment | 2 | ||||
-rw-r--r-- | emulators/vmware2/pkg-descr | 18 | ||||
-rw-r--r-- | emulators/vmware2/pkg-message | 13 | ||||
-rw-r--r-- | emulators/vmware2/pkg-plist | 4 | ||||
-rw-r--r-- | emulators/vmware2/scripts/configure | 105 | ||||
-rw-r--r-- | emulators/vmware2/scripts/pre-install | 19 |
9 files changed, 198 insertions, 93 deletions
diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile index aaecd7facef1..cd353f4c5cbf 100644 --- a/emulators/vmware2/Makefile +++ b/emulators/vmware2/Makefile @@ -1,14 +1,14 @@ -# ports collection makefile for: VMware For Linux -# Version required: 1.1.1 -# Date created: Fri 26 Nov 19:16:47 EST 1999 -# Whom: vns@delta.odessa.ua +# ports collection makefile for: VMware 1.1.2 for Linux +# Version required: 1.1.2 +# Date created: Fri 26 Nov 19:16:47 EST 1999 +# Whom: vns@delta.odessa.ua # -# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $ # $FreeBSD$ +# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $ # -DISTNAME= VMware-1.1.2-364 -PKGNAME= vmware-1.1.2 +DISTNAME= VMware-1.1.2-364 +PKGNAME= vmware-1.1.2.364 CATEGORIES= emulators linux MASTER_SITES= http://www4.vmware.com/software/ \ http://vmware-svca.www.conxion.com/software/ \ @@ -24,54 +24,54 @@ PATCH_SITES= http://www.mindspring.com/~vsilyaev/vmware/files/ \ PATCHFILES= vmmon-freebsd-0.94.tar.gz \ vmnet-freebsd-0.10.tar.gz -MAINTAINER= vns@delta.odessa.ua +MAINTAINER= freebsd-emulation@FreeBSD.org + +RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base -RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base +RESTRICTED= "Not sure if we can redistribute it" -IS_INTERACTIVE= yes # vmnet-freebsd-* querries user for network settings +LINUX_DIR= /compat/linux +VMDIR= ${PREFIX}/lib/vmware -ONLY_FOR_ARCHS= i386 +ONLY_FOR_ARCHS= i386 USE_XLIB= yes WRKSRC= ${WRKDIR}/vmware-distrib -LINUX_DIR= /compat/linux +GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract MAN1= vmware.1 .include <bsd.port.pre.mk> .if ${OSVERSION} < 400013 -BROKEN= YES +BROKEN= "Systems prior to 400013 is out of support" .endif -.if exists(${MASTERDIR}/Makefile.inc.net) -.include "${MASTERDIR}/Makefile.inc.net" +.if exists(/modules/linprocfs.ko) || exists(${PREFIX}/modules/linprocfs.ko) +HAVE_LINPROCFS= yes .endif -.if exists(${MASTERDIR}/Makefile.inc.linproc) -.include "${MASTERDIR}/Makefile.inc.linproc" +.if !defined(HAVE_LINPROCFS) +BROKEN= "You need Linux procfs to run this software" .endif -VMSUBDIR= lib/vmware -VMDIR= ${PREFIX}/${VMSUBDIR} -SCRIPTS_ENV+= LINUX_DIR=${LINUX_DIR} \ - VMNET_HOST_IP=${VMNET_HOST_IP} \ - VMNET_NETMASK=${VMNET_NETMASK} - -MAKE_ARGS= "KMODDIR=${VMDIR}/lib/modules" +.if exists(${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net) +.include "${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net" +.endif -# Small hack for alternate processing patchfiles -GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract +SCRIPTS_ENV+= LINUX_DIR="${LINUX_DIR}" \ + VMNET_HOST_IP="${VMNET_HOST_IP}" \ + VMNET_NETMASK="${VMNET_NETMASK}" +MAKE_ARGS= KMODDIR="${VMDIR}/lib/modules" post-patch: - @${CP} ${FILESDIR}/Makefile ${WRKSRC} + ${CP} ${FILESDIR}/Makefile ${WRKSRC} setoptions: - ${SED} -e 's;@@PREFIX@@;${PREFIX};' ${FILESDIR}/vmware > ${WRKDIR}/vmware - ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ + ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \ - ${FILESDIR}/config > ${WRKDIR}/config + ${FILESDIR}/config > ${WRKDIR}/config - ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ + ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ -e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \ @@ -87,7 +87,6 @@ pre-install: setoptions ${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d ${MKDIR} ${VMDIR}/bin - ${INSTALL_SCRIPT} ${FILESDIR}/fakeprocfs.sh ${VMDIR}/bin ${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin [ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/ ${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin @@ -95,15 +94,10 @@ pre-install: setoptions vmnet-bridge vmnet-dhcpd vmnet-sniffer \ vmware-loop vmware-ping vmware-wizard \ ; do \ - ${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \ + ${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \ done -.if defined(USE_LINPROC) ${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin ${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/ -.else - ${INSTALL_SCRIPT} ${WRKSRC}/bin/vmware ${VMDIR}/bin - ${INSTALL_SCRIPT} ${WRKDIR}/vmware ${PREFIX}/bin -.endif ${MKDIR} ${VMDIR}/lib ${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib ${MKDIR} ${VMDIR}/lib/help @@ -117,18 +111,7 @@ pre-install: setoptions .endif post-install: - @${LN} -s ${PREFIX}/etc/vmware /etc/vmware -.if !defined(BATCH) - @${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" - @${ECHO} "Before launch vmware, execute the next command" - @${ECHO} ${PREFIX}/etc/rc.d/vmware.sh start - @${ECHO} - @${ECHO} "to load required kernel modules" - @${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" -.endif - -pre-clean: - @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.linproc \ - ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.net + ${LN} -s ${PREFIX}/etc/vmware /etc/vmware + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/emulators/vmware2/files/Makefile b/emulators/vmware2/files/Makefile index 32991c325976..79759423aeb8 100644 --- a/emulators/vmware2/files/Makefile +++ b/emulators/vmware2/files/Makefile @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= vmmon-only vmnet-only/freebsd +SUBDIR= vmmon-only vmnet-only/freebsd .include <bsd.subdir.mk> diff --git a/emulators/vmware2/files/vmware.sh b/emulators/vmware2/files/vmware.sh index 6b426b64d654..6764ced056e2 100644 --- a/emulators/vmware2/files/vmware.sh +++ b/emulators/vmware2/files/vmware.sh @@ -3,7 +3,6 @@ # Start or stop vmware # # $FreeBSD$ -# vmware_dir=@@PREFIX@@/lib/vmware networking=@@NETWORKING@@ @@ -14,27 +13,27 @@ netmask=@@NETMASK@@ exec >/dev/null case $1 in - start) - kldload ${vmware_dir}/lib/modules/vmmon.ko - if [ $networking -eq 1 ]; then - kldload ${vmware_dir}/lib/modules/vmnet.ko - echo -n >/dev/vmnet1 - ifconfig vmnet1 $host_ip netmask $netmask - fi - echo -n " VMware" >/dev/tty - ;; +start) + kldload ${vmware_dir}/lib/modules/vmmon.ko + if [ $networking -eq 1 ]; then + kldload ${vmware_dir}/lib/modules/vmnet.ko + echo -n >/dev/vmnet1 + ifconfig vmnet1 $host_ip netmask $netmask + fi + echo -n " VMware" >/dev/tty + ;; - stop) - kldunload vmmon - if [ $networking -eq 1 ]; then - ifconfig vmnet1 down - ifconfig vmnet1 delete $host_ip - kldunload vmnet - fi - ;; +stop) + kldunload vmmon + if [ $networking -eq 1 ]; then + ifconfig vmnet1 down + ifconfig vmnet1 delete $host_ip + kldunload vmnet + fi + ;; - *) - echo "usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; +*) + echo "usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; esac diff --git a/emulators/vmware2/pkg-comment b/emulators/vmware2/pkg-comment index 3338b47dd9e0..3e6b90a9f6e7 100644 --- a/emulators/vmware2/pkg-comment +++ b/emulators/vmware2/pkg-comment @@ -1 +1 @@ -VMware virtual machine emulator +A virtual machine emulator - a full PC in a window diff --git a/emulators/vmware2/pkg-descr b/emulators/vmware2/pkg-descr index 0d5e28f6c9d7..400a2f031035 100644 --- a/emulators/vmware2/pkg-descr +++ b/emulators/vmware2/pkg-descr @@ -1,4 +1,14 @@ -This is the Linux version of the VMware virtual machine emulator made to -run on FreeBSD using the Linux compatibility mode. VMware can be used to -run IBM's OS/2, Microsoft Windows 95/98, Microsoft NT, Linux, or any other -operating system that runs on the i486. +This is the Linux version of the VMware virtual machine emulator made +to run on FreeBSD using the Linux compatibility mode. VMware can be +used to run Microsoft MS-DOS, Windows 95/98/NT/2000, Linux, FreeBSD, +or any other operating system that runs on the i486. + +Official VMware, Inc. web site: +WWW: http://www.vmware.com/ + + +We all are thankful to Vladimir N. Silyaev for porting vmmon/vmnet +modules to FreeBSD. Have a look at his page for the latest +information: + + http://www.mindspring.com/~vsilyaev/vmware/ diff --git a/emulators/vmware2/pkg-message b/emulators/vmware2/pkg-message new file mode 100644 index 000000000000..4e1840a66f9d --- /dev/null +++ b/emulators/vmware2/pkg-message @@ -0,0 +1,13 @@ +************************************************************ +Add the following entry to /etc/fstab: + + linproc /compat/linux/proc linprocfs rw 0 0 + +and you can play with VMware after the next boot. + +Or hit the following commands to play now. :) + + /sbin/mount_linprocfs linproc /compat/linux/proc + /usr/local/etc/rc.d/vmware.sh start + +************************************************************ diff --git a/emulators/vmware2/pkg-plist b/emulators/vmware2/pkg-plist index 4b5cbebd2b70..da8830d4a218 100644 --- a/emulators/vmware2/pkg-plist +++ b/emulators/vmware2/pkg-plist @@ -1,7 +1,7 @@ bin/vmware +etc/rc.d/vmware.sh etc/vmware/config lib/vmware/bin/df -lib/vmware/bin/fakeprocfs.sh lib/vmware/bin/vmware lib/vmware/bin/vmnet-bridge lib/vmware/bin/vmnet-dhcpd @@ -113,7 +113,7 @@ share/doc/vmware/README.FreeBSD @exec ln -s %D/etc/vmware /etc/vmware @exec mknod /dev/vmmon c 200 0 @exec mknod /dev/vmnet1 c 201 1 -@unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd? +@unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/bin/df /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd? @dirrm etc/vmware @dirrm lib/vmware/bin @dirrm lib/vmware/lib/help diff --git a/emulators/vmware2/scripts/configure b/emulators/vmware2/scripts/configure index cebd8aa37360..15ab00cbd9a7 100644 --- a/emulators/vmware2/scripts/configure +++ b/emulators/vmware2/scripts/configure @@ -1,5 +1,104 @@ #!/bin/sh -mkdir -p ${WRKDIRPREFIX}${CURDIR} -. `dirname $0`/configure.linproc -. `dirname $0`/configure.net +[ "_$VMNET_HOST_IP" = _ ] && VMNET_HOST_IP="192.168.254.1" +[ "_$VMNET_NETMASK" = _ ] && VMNET_NETMASK="255.255.255.0" + +host_ip=$VMNET_HOST_IP +netmask=$VMNET_NETMASK +title="VMware network options" + +get_network_settings() { + result=`/usr/bin/dialog --title "$title" --clear --inputbox \ +"\n"\ +"What will be the IP address of your host on your private network?:"\ + 10 40 $host_ip \ + 2>&1 >/dev/tty ` + + case $? in + 0) + if [ -z "$result" ]; then + return 1 + fi + host_ip=$result + ;; + 1) + return 1 + ;; + esac + + result=`/usr/bin/dialog --title "$title" --clear --inputbox \ +"\n"\ +"What will be the netmask of your private network?:"\ + 10 40 $netmask \ + 2>&1 >/dev/tty ` + + case $? in + 0) + if [ -z "$result" ]; then + return 1 + fi + netmask=$result + ;; + 1) + return 1 + ;; + esac + return 0; +} + +do_network() { + while true; do + get_network_settings + + /usr/bin/dialog --title "Confirmation" --clear --yesno \ +"\n"\ +"Are the following options correct?\n\n"\ +"IP address: $host_ip\n"\ +"Netmask: $netmask\n"\ + 10 40 + [ $? -eq 0 ] && return 0 + + /usr/bin/dialog --title "Confirmation" --clear --yesno \ +"\n"\ +"Do you want to edit network options again?\n"\ + 10 40 + [ $? -eq 0 ] && continue + + /usr/bin/dialog --title "Confirmation" --clear --yesno \ +"\n"\ +"Do you want to continue without networking?\n"\ + 10 50 + [ $? -eq 0 ] && return 1 + + host_ip=$VMNET_HOST_IP + netmask=$VMNET_NETMASK + + return 0; + done +} + +networking=0 +if [ _$BATCH = _ ]; then + do_network + + if [ $? -eq 0 ]; then + networking=1 + /usr/bin/dialog --title "$title" --infobox \ +"\n"\ +"The following options will be used.\n\n"\ +"IP address: $host_ip\n"\ +"Netmask: $netmask\n"\ + 10 40 + fi +else #BATCH + [ -f ${WRKDIR}/Makefile.inc.net ] && exit +fi #BATCH + +( +exec > ${WRKDIR}/Makefile.inc.net + +echo '#' `date` +echo VMNET_HOST_IP=$host_ip +echo VMNET_NETMASK=$netmask +[ $networking -ne 0 ] && echo VMNET_NETWORKING=1 +) diff --git a/emulators/vmware2/scripts/pre-install b/emulators/vmware2/scripts/pre-install index 7a97e40ba5b5..771445b0ac01 100644 --- a/emulators/vmware2/scripts/pre-install +++ b/emulators/vmware2/scripts/pre-install @@ -1,15 +1,16 @@ #!/bin/sh -echo Setup Linux compatible /dev directory + +echo Setup Linux compatible /dev directory linux_dev=${LINUX_DIR}/dev -if [ \! -d $linux_dev ]; then - echo Creating $linux_dev - mkdir $linux_dev - chown root:wheel $linux_dev - chmod 755 $linux_dev +if [ ! -d $linux_dev ]; then + echo Creating $linux_dev + mkdir $linux_dev + chown root:wheel $linux_dev + chmod 755 $linux_dev fi echo Creating $linux_dev/tty\? -for n in 0 1 2 3 4 5 6 7 8 9; do - ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`; +for n in 0 1 2 3 4 5 6 7 8 9; do + ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`; done ln -s /dev/ttyva ${linux_dev}/tty11 ln -s /dev/ttyvb ${linux_dev}/tty12 @@ -17,7 +18,7 @@ ln -s ${linux_dev}/tty1 ${linux_dev}/tty0 echo Creating $linux_dev/hd\? mknod ${linux_dev}/hda b 0 0x00010002 mknod ${linux_dev}/hdb b 0 0x0001000a -# Not enable wd2-3, because vmware-wizard locked, when +# Do not enable below, because vmware-wizard is locked when # doing something like access("/dev/hdc"...) #mknod ${linux_dev}/hdc b 0 0x00010012 #mknod ${linux_dev}/hdd b 0 0x0001001a |