summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-07-26 00:48:13 +0000
committerMike Frysinger <vapier@gentoo.org>2003-07-26 00:48:13 +0000
commit6ad7e7717a2888b933675680795483b16c9f0c5f (patch)
treec22315663d47fb10a7c749c114e8cb8e02109de4 /app-emulation/vmware-workstation
parentglibc 2.3.x fix #16444 (diff)
downloadgentoo-2-6ad7e7717a2888b933675680795483b16c9f0c5f.tar.gz
gentoo-2-6ad7e7717a2888b933675680795483b16c9f0c5f.tar.bz2
gentoo-2-6ad7e7717a2888b933675680795483b16c9f0c5f.zip
glibc 2.3.x fix #16444
Diffstat (limited to 'app-emulation/vmware-workstation')
-rw-r--r--app-emulation/vmware-workstation/ChangeLog6
-rw-r--r--app-emulation/vmware-workstation/Manifest7
-rw-r--r--app-emulation/vmware-workstation/files/3.2.1.2237/vmware-glibc-2.3.2-compat.c32
-rw-r--r--app-emulation/vmware-workstation/files/digest-vmware-workstation-3.2.1.2237-r12
-rw-r--r--app-emulation/vmware-workstation/files/digest-vmware-workstation-4.0.4460-r11
-rw-r--r--app-emulation/vmware-workstation/vmware-workstation-3.2.1.2237-r1.ebuild204
6 files changed, 246 insertions, 6 deletions
diff --git a/app-emulation/vmware-workstation/ChangeLog b/app-emulation/vmware-workstation/ChangeLog
index a67b746c6ce5..e28f75201cf7 100644
--- a/app-emulation/vmware-workstation/ChangeLog
+++ b/app-emulation/vmware-workstation/ChangeLog
@@ -1,6 +1,6 @@
# ChangeLog for app-emulation/vmware-workstation
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/ChangeLog,v 1.17 2003/07/26 00:46:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/ChangeLog,v 1.18 2003/07/26 00:48:09 vapier Exp $
*vmware-workstation-4.0.4460-r1 (25 Jul 2003)
@@ -12,7 +12,6 @@
10 Apr 2003; Preston A. Elder <prez@gentoo.org>
vmware-workstation-4.0.4460.ebuild, files/digest-vmware-workstation-4.0.4460,
files/4.0.4460/* :
-
Version bump. This is the release version.
*vmware-workstation-4.0.4320 (22 Mar 2003)
@@ -20,7 +19,6 @@
22 Mar 2003; Philip Walls <malverian@gentoo.org>
vmware-workstation-4.0.4320.ebuild, files/digest-vmware-workstation-4.0.4320,
files/4.0.4320/* :
-
Version bump. Added symlinks to /usr/bin, made vmware-vmx SUID,
Added init scripts and desktop icons for this version (non-existant in
4121). Added pciutils to DEPEND as required to run vmware-config.pl
@@ -34,7 +32,7 @@
*vmware-workstation-3.2.1.2237-r1 (25 Jul 2003)
25 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
- Version bump to try to add glibc-2.3.2 support #16444.
+ Version bump to try to add glibc-2.3.2 support #16444 + 2.5/2.6 kern support.
*vmware-workstation-3.2.1.2237 (17 Jul 2003)
diff --git a/app-emulation/vmware-workstation/Manifest b/app-emulation/vmware-workstation/Manifest
index dd85c058762c..9c2e844f4fd9 100644
--- a/app-emulation/vmware-workstation/Manifest
+++ b/app-emulation/vmware-workstation/Manifest
@@ -2,13 +2,16 @@ MD5 48c1667773503fee21a1068da07440b9 files/4.0.4460-r1/90vmware 70
MD5 677d3f162d6bcd8a95494c925c0050fe files/4.0.4460-r1/VMwareWorkstation.desktop 241
MD5 33977e918fd74d96327c67de490ccd7c files/4.0.4460-r1/vmware 1437
MD5 7ca1ec14670b51d8cf824a58bc8d6621 files/4.0.4460-r1/vmware.png 470
+MD5 27a9f7cb52f9231cf58c18b7bcd86fb3 files/digest-vmware-workstation-3.2.1.2237-r1 158
MD5 6355bce57bbb7997ac6c14f7cb2f785d files/digest-vmware-workstation-3.2.1.2237 83
MD5 48c1667773503fee21a1068da07440b9 files/3.2.1.2237/90vmware 70
MD5 677d3f162d6bcd8a95494c925c0050fe files/3.2.1.2237/VMwareWorkstation.desktop 241
MD5 e5ee01e20886aab0ebc2681fa7b26645 files/3.2.1.2237/vmware 1437
MD5 3bfb39f5e96f60db67c7246f74c21501 files/3.2.1.2237/vmware-config.pl-gcc-generalized.patch 2948
MD5 7ca1ec14670b51d8cf824a58bc8d6621 files/3.2.1.2237/vmware.png 470
-MD5 ad15bdcd944986bdfb2f349b63431127 files/digest-vmware-workstation-4.0.4460-r1 83
-MD5 351a6e88e62b296d37c7fd6e1edf1623 ChangeLog 5384
+MD5 b95a250f31a6d2005176b27b8d48c182 files/3.2.1.2237/vmware-glibc-2.3.2-compat.c 1039
+MD5 89b17c422f51ea8f65d1e03fc03d7640 files/digest-vmware-workstation-4.0.4460-r1 158
+MD5 18836b39073dafa47b09c9ad6b1bfdac vmware-workstation-3.2.1.2237-r1.ebuild 6560
+MD5 f965a778d50945a1639caf9658b285b6 ChangeLog 5557
MD5 36ecd310052a6f90dafa6f4b15635a6d vmware-workstation-3.2.1.2237.ebuild 5563
MD5 2b8d89053d695a71bd9bddae4ad9a2cc vmware-workstation-4.0.4460-r1.ebuild 6310
diff --git a/app-emulation/vmware-workstation/files/3.2.1.2237/vmware-glibc-2.3.2-compat.c b/app-emulation/vmware-workstation/files/3.2.1.2237/vmware-glibc-2.3.2-compat.c
new file mode 100644
index 000000000000..3499be2e5972
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/3.2.1.2237/vmware-glibc-2.3.2-compat.c
@@ -0,0 +1,32 @@
+/*
+ * Build with: gcc -W -Wall -shared -o q.so q.c
+ */
+
+#include <dlfcn.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+void go(void) __attribute__((constructor));
+
+void go(void) {
+ void* qh;
+ unsigned char *__real_errno_location, *__vm_errno_location;
+
+ qh = dlopen("libc.so.6", RTLD_GLOBAL);
+ __real_errno_location = dlsym(qh, "__errno_location");
+ __vm_errno_location = dlsym(NULL, "__errno_location");
+ printf("Got eroloc %p & %p\n", __vm_errno_location, __real_errno_location);
+ if (__real_errno_location && __vm_errno_location && __real_errno_location != __vm_errno_location) {
+ unsigned int errnobase = (int)__vm_errno_location;
+ unsigned int mpbase = errnobase & ~0xFFF;
+ unsigned int mplen = 4096;
+ if (errnobase + 5 > mpbase + mplen) {
+ mplen = mplen + 4096;
+ }
+ mprotect((void*)mpbase, mplen, PROT_READ|PROT_WRITE|PROT_EXEC);
+ *__vm_errno_location = 0xE9;
+ *(int*)(__vm_errno_location + 1) = __real_errno_location - __vm_errno_location - 5;
+ mprotect((void*)mpbase, mplen, PROT_READ|PROT_EXEC);
+ }
+}
diff --git a/app-emulation/vmware-workstation/files/digest-vmware-workstation-3.2.1.2237-r1 b/app-emulation/vmware-workstation/files/digest-vmware-workstation-3.2.1.2237-r1
new file mode 100644
index 000000000000..4cb816074653
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/digest-vmware-workstation-3.2.1.2237-r1
@@ -0,0 +1,2 @@
+MD5 c1cb12c183152c7ca1b3838860bbcc03 VMware-workstation-3.2.1-2237.tar.gz 12577022
+MD5 0f03027dafdc6d6edf1ebc8075fcf6de vmware-any-any-update37.tar.gz 174663
diff --git a/app-emulation/vmware-workstation/files/digest-vmware-workstation-4.0.4460-r1 b/app-emulation/vmware-workstation/files/digest-vmware-workstation-4.0.4460-r1
index 3b8d1bf98c77..3d268cf301bb 100644
--- a/app-emulation/vmware-workstation/files/digest-vmware-workstation-4.0.4460-r1
+++ b/app-emulation/vmware-workstation/files/digest-vmware-workstation-4.0.4460-r1
@@ -1 +1,2 @@
MD5 e4829416ee7465c4626e0aebc1d71428 VMware-workstation-4.0.0-4460.tar.gz 21551745
+MD5 0f03027dafdc6d6edf1ebc8075fcf6de vmware-any-any-update37.tar.gz 174663
diff --git a/app-emulation/vmware-workstation/vmware-workstation-3.2.1.2237-r1.ebuild b/app-emulation/vmware-workstation/vmware-workstation-3.2.1.2237-r1.ebuild
new file mode 100644
index 000000000000..f40c780e9ac4
--- /dev/null
+++ b/app-emulation/vmware-workstation/vmware-workstation-3.2.1.2237-r1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/vmware-workstation-3.2.1.2237-r1.ebuild,v 1.1 2003/07/26 00:46:11 vapier Exp $
+
+# Unlike many other binary packages the user doesn't need to agree to a licence
+# to download VM Ware. The agreeing to a licence is part of the configure step
+# which the user must run manually.
+
+inherit gcc
+
+S=${WORKDIR}/vmware-distrib
+N26KernSupport=vmware-any-any-update37
+NP="VMware-workstation-3.2.1-2237"
+DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
+SRC_URI="http://vmware-svca.www.conxion.com/software/${NP}.tar.gz
+ http://www.vmware.com/download1/software/${NP}.tar.gz
+ ftp://download1.vmware.com/pub/software/${NP}.tar.gz
+ http://vmware-chil.www.conxion.com/software/${NP}.tar.gz
+ http://vmware-heva.www.conxion.com/software/${NP}.tar.gz
+ http://vmware.wespe.de/software/${NP}.tar.gz
+ ftp://vmware.wespe.de/pub/software/${NP}.tar.gz
+ http://ftp.cvut.cz/vmware/${N26KernSupport}.tar.gz
+ http://knihovny.cvut.cz/ftp/pub/vmware/${N26KernSupport}.tar.gz"
+HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
+
+LICENSE="vmware"
+SLOT="0"
+KEYWORDS="-* ~x86"
+IUSE="kde"
+
+DEPEND="virtual/glibc
+ virtual/x11
+ sys-kernel/linux-headers
+ >=dev-lang/perl-5
+ >=dev-lang/tcl-8.3.3"
+
+RESTRICT="nostrip"
+
+has_version \<sys-libs/glibc-2.3.2 \
+ && GLIBC_232=0 \
+ || GLIBC_232=1
+
+src_unpack() {
+ check_KV
+ unpack ${NP}.tar.gz
+ if [ "${KV:0:3}" == "2.6" ] || [ "${KV:0:3}" == "2.5" ] ; then
+ unpack ${N26KernSupport}.tar.gz
+ mv ${N26KernSupport}/*.tar ${S}/lib/modules/source/
+ fi
+}
+
+src_compile() {
+ if [ ${GLIBC_232} -eq 1 ] ; then
+ $(gcc-getCC) -W -Wall -shared -o vmware-glibc-2.3.2-compat.so \
+ ${FILESDIR}/${PVR}/vmware-glibc-2.3.2-compat.c \
+ || die "could not make module"
+ else
+ return 0
+ fi
+}
+
+src_install() {
+ # lets make gcc happy regardless of what version we're using
+ epatch ${FILESDIR}/${PVR}/vmware-config.pl-gcc-generalized.patch
+
+ dodir /opt/vmware/bin
+ cp -a bin/* ${D}/opt/vmware/bin/
+ # vmware and vmware-ping needs to be suid root.
+ chmod u+s ${D}/opt/vmware/bin/vmware
+ chmod u+s ${D}/opt/vmware/bin/vmware-ping
+
+ dodir /opt/vmware/lib
+ cp -a lib/* ${D}/opt/vmware/lib/
+ # Since with Gentoo we compile everthing it doesn't make sense to keep
+ # the precompiled modules arround. Saves about 4 megs of disk space too.
+ rm -rf ${D}/opt/vmware/lib/modules/binary
+
+ dodir /opt/vmware/doc
+ cp -a doc/* ${D}/opt/vmware/doc/
+
+ dodir /opt/vmware/man/
+ cp -a man/* ${D}/opt/vmware/man/
+
+ # vmware service loader
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/${PVR}/vmware vmware
+
+ # vmware enviroment
+ insinto /etc/env.d
+ doins ${FILESDIR}/${PVR}/90vmware
+
+ dodir /etc/vmware/
+ cp -a etc/* ${D}/etc/vmware/
+
+ dodir /etc/vmware/init.d
+ dodir /etc/vmware/init.d/rc0.d
+ dodir /etc/vmware/init.d/rc1.d
+ dodir /etc/vmware/init.d/rc2.d
+ dodir /etc/vmware/init.d/rc3.d
+ dodir /etc/vmware/init.d/rc4.d
+ dodir /etc/vmware/init.d/rc5.d
+ dodir /etc/vmware/init.d/rc6.d
+ cp -a installer/services.sh ${D}/etc/vmware/init.d/vmware
+
+ # This is to fix a problem where if someone merges vmware and then
+ # before configuring vmware they upgrade or re-merge the vmware
+ # package which would rmdir the /etc/vmware/init.d/rc?.d directories.
+ keepdir /etc/vmware/init.d/rc{0,1,2,3,4,5,6}.d
+
+ # A simple icon I made
+ dodir /opt/vmware/lib/icon
+ insinto /opt/vmware/lib/icon
+ doins ${FILESDIR}/${PVR}/vmware.png
+
+ if [ "`use kde`" ] ; then
+ dodir /usr/share/applnk/Applications
+ insinto /usr/share/applnk/Applications
+ doins "${FILESDIR}/${PVR}/VMwareWorkstation.desktop"
+ fi
+
+ # Questions:
+ einfo "Adding answers to /etc/vmware/locations"
+ locations="${D}/etc/vmware/locations"
+ echo "answer BINDIR /opt/vmware/bin" >> ${locations}
+ echo "answer LIBDIR /opt/vmware/lib" >> ${locations}
+ echo "answer MANDIR /opt/vmware/man" >> ${locations}
+ echo "answer DOCDIR /opt/vmware/doc" >> ${locations}
+ echo "answer RUN_CONFIGURATOR no" >> ${locations}
+ echo "answer INITDIR /etc/vmware/init.d" >> ${locations}
+ echo "answer INITSCRIPTSDIR /etc/vmware/init.d" >> ${locations}
+
+ if [ ${GLIBC_232} -eq 1 ] ; then
+ dolib.so vmware-glibc-2.3.2-compat.so
+ cd ${D}/opt/vmware/lib/bin
+ mv vmware-ui{,.bin}
+ mv vmware-mks{,.bin}
+ echo '#!/bin/sh' > vmware-ui
+ echo 'LD_PRELOAD=vmware-glibc-2.3.2-compat.so exec "$0.bin" "$@"' >> vmware-ui
+ chmod a+x vmware-ui
+ cp vmware-{ui,mks}
+ else
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ # This must be done after the install to get the mtimes on each file
+ # right. This perl snippet gets the /etc/vmware/locations file code:
+ # perl -e "@a = stat('bin/vmware'); print \$a[9]"
+ # The above perl line and the find line below output the same thing.
+ # I would think the find line is faster to execute.
+ # find /opt/vmware/bin/vmware -printf %T@
+
+ #Note: it's a bit weird to use ${D} in a preinst script but it should work
+ #(drobbins, 1 Feb 2002)
+
+ einfo "Generating /etc/vmware/locations file."
+ d=`echo ${D} | wc -c`
+ for x in `find ${D}/opt/vmware ${D}/etc/vmware` ; do
+ x="`echo ${x} | cut -c ${d}-`"
+ if [ -d ${D}/${x} ] ; then
+ echo "directory ${x}" >> ${D}/etc/vmware/locations
+ else
+ echo -n "file ${x}" >> ${D}/etc/vmware/locations
+ if [ "${x}" == "/etc/vmware/locations" ] ; then
+ echo "" >> ${D}/etc/vmware/locations
+ elif [ "${x}" == "/etc/vmware/not_configured" ] ; then
+ echo "" >> ${D}/etc/vmware/locations
+ else
+ echo -n " " >> ${D}/etc/vmware/locations
+ #perl -e "@a = stat('${D}${x}'); print \$a[9]" >> ${D}/etc/vmware/locations
+ find ${D}${x} -printf %T@ >> ${D}/etc/vmware/locations
+ echo "" >> ${D}/etc/vmware/locations
+ fi
+ fi
+ done
+}
+
+pkg_postinst () {
+ # This is to fix the problem where the not_configured file doesn't get
+ # removed when the configuration is run. This doesn't remove the file
+ # It just tells the vmware-config.pl script it can delete it.
+ einfo "Updating /etc/vmware/locations"
+ for x in /etc/vmware/._cfg????_locations ; do
+ if [ -f $x ] ; then
+ cat $x >> /etc/vmware/locations
+ rm $x
+ fi
+ done
+
+ einfo
+ einfo "You need to run /opt/vmware/bin/vmware-config.pl to complete the install."
+ einfo
+ einfo "For VMware Add-Ons just visit"
+ einfo "http://www.vmware.com/download/downloadaddons.html"
+}
+
+pkg_postrm() {
+ einfo
+ einfo "To remove all traces of vmware you will need to remove the files"
+ einfo "in /etc/vmware/, /etc/init.d/vmware, /lib/modules/*/misc/vm*.o,"
+ einfo "and .vmware/ in each users home directory."
+ einfo
+}