add new libs

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/vmware@2787 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2010-12-26 12:31:35 +00:00
parent e88576bf85
commit 91fc009f40
71 changed files with 3237 additions and 282 deletions

View File

@@ -0,0 +1,31 @@
--- vmware-distrib/bin/vmware-config.pl.ori 2005-11-09 01:45:08.000000000 +0000
+++ vmware-distrib/bin/vmware-config.pl 2005-11-09 01:48:21.000000000 +0000
@@ -8433,7 +8433,7 @@
error('Please shut down any running VMs and run this script again.' .
"\n\n");
} else {
- if (system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware')
+ if (system(shell_string('/etc/init.d' . '/vmware')
. ' stop')) {
error('Unable to stop services for ' . vmware_product_name() .
"\n\n");
@@ -8463,8 +8463,8 @@
}
if (vmware_product() ne 'server') {
configure_gtk2();
- createMimePackageFile();
- configureDesktopFiles();
+# createMimePackageFile();
+# configureDesktopFiles();
configure_mon();
configure_pp();
configure_net();
@@ -8532,7 +8532,7 @@
db_save();
# Then start VMware's services
if (!$gOption{'skipstopstart'}) {
- system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware') . ' start');
+ system(shell_string('/etc/init.d' . '/vmware') . ' start');
print "\n";
}

View File

@@ -0,0 +1,15 @@
diff -urN vmware-distrib.orig/bin/vmware-config.pl vmware-distrib/bin/vmware-config.pl
--- vmware-distrib.orig/bin/vmware-config.pl 2005-12-16 00:51:03.000000000 -0500
+++ vmware-distrib/bin/vmware-config.pl 2005-12-21 14:34:03.000000000 -0500
@@ -7327,7 +7327,10 @@
error('Unable to write configuration file "' . $name . '".' . "\n\n");
}
db_add_file($name, 0x1);
- safe_chmod(0644, $name);
+ safe_chmod(0664, $name);
+ my $gid = (getgrnam('vmware'))[2];
+ my $uid = (stat($name))[4];
+ safe_chown($uid,$gid,$name);
# Append the promotional configuration if it exists
$promoconfig = $libdir . '/configurator/PROMOCONFIG';

View File

@@ -0,0 +1,15 @@
diff -ur vmware-distrib.orig/bin/vmware-config.pl vmware-distrib/bin/vmware-config.pl
--- vmware-distrib.orig/bin/vmware-config.pl 2006-03-24 23:13:05.000000000 +0100
+++ vmware-distrib/bin/vmware-config.pl 2006-03-24 23:26:40.000000000 +0100
@@ -2015,9 +2015,9 @@
. shell_string($pattern));
chomp($header_page_offset);
# Ignore PAGE_OFFSET if we cannot parse it.
- if ($header_page_offset =~ /^$pattern \(?0x([0-9a-fA-F]{8,})/) {
+ if ($header_page_offset =~ /^$pattern \(?(\([^)]*\))?\)?0x([0-9a-fA-F]{8,}).*$/) {
# We found a valid page offset
- $header_page_offset = $1;
+ $header_page_offset = $2;
if (defined($gSystem{'page_offset'}) and
not (lc($header_page_offset) eq lc($gSystem{'page_offset'}))) {
if ($source eq 'user') {

View File

@@ -0,0 +1,17 @@
diff -uNr vmware-server-distrib.orig/bin/vmware-config.pl vmware-server-distrib/bin/vmware-config.pl
--- vmware-server-distrib.orig/bin/vmware-config.pl 2006-02-18 18:12:26.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2006-02-18 18:14:17.000000000 +0000
@@ -8571,10 +8571,10 @@
configure_gtk2();
# createMimePackageFile();
# configureDesktopFiles();
- configure_mon();
- configure_pp();
+# configure_mon();
+# configure_pp();
configure_net();
- build_vmnet();
+# build_vmnet();
}
# Create the directory for the UNIX domain sockets

View File

@@ -0,0 +1,12 @@
diff -uNr vmware-server-distrib/installer/services.sh vmware-server-distrib.new/installer/services.sh
--- vmware-server-distrib/installer/services.sh 2006-02-05 00:21:25.000000000 +0000
+++ vmware-server-distrib.new/installer/services.sh 2006-02-20 23:48:07.000000000 +0000
@@ -538,7 +538,7 @@
}
vmware_load_module() {
- /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
+ /sbin/modprobe -s "$1" || exit 1
exit 0
}

View File

@@ -0,0 +1,19 @@
diff -uNr vmware-server-distrib.orig/installer/services.sh vmware-server-distrib/installer/services.sh
--- vmware-server-distrib.orig/installer/services.sh 2006-07-01 03:14:16.000000000 +0000
+++ vmware-server-distrib/installer/services.sh 2006-07-14 11:59:28.000000000 +0000
@@ -606,8 +606,13 @@
start)
if [ -e "$vmware_etc_dir"/not_configured ]; then
echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
- echo 'for the running kernel. To (re-)configure it, invoke the'
- echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
+ echo 'for the running kernel.'
+ echo
+ echo 'Please ensure that the modules have been compiled for this kernel:'
+ echo ' emerge --oneshot vmware-modules'
+ echo
+ echo 'Also ensure '"`vmware_product_name`"' has been configured:'
+ echo ' '"$vmdb_answer_BINDIR"'/vmware-config.pl'
echo
exit 1

View File

@@ -0,0 +1,14 @@
diff --git a/vmware-player-extras.py b/vmware-player-extras.py
index 21595b1..e8adf08 100644
--- a/vmware-player-extras.py
+++ b/vmware-player-extras.py
@@ -6,7 +6,8 @@ VMware Player Extras component installer.
DEST = LIBDIR/'vmware'
SETTINGS = { 'vmware.fullpath': BINDIR/'vmware', }
-CONF = DEST/'setup/vmware-config'
+import os
+CONF = path(os.environ['WORKDIR'])/'vmware-config.sh'
class PlayerExtras(Installer):

View File

@@ -0,0 +1,64 @@
diff --git a/vmware-player.py b/vmware-player.py
index bee22df..d06cca9 100644
--- a/vmware-player.py
+++ b/vmware-player.py
@@ -6,7 +6,8 @@ VMware Player component installer.
GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
DEST = LIBDIR/'vmware'
-CONFIG = DEST/'setup/vmware-config'
+import os
+CONFIG = path(os.environ['WORKDIR'])/'vmware-config.sh'
CUPSLIBDIR = LIBDIR/'cups'
# XXX: LIBDIR should be properly calculated, to make this cleaner
if (PREFIX/'lib64/cups').exists():
@@ -84,12 +85,12 @@ class Player(Installer):
ret, kvers = output('uname', '-r')
kvers = kvers.strip()
modules = ('vmmon', 'vmnet', 'vmblock', 'vmci', 'vsock')
- base = path('/lib/modules/%s/misc' % kvers)
+ base = path('/this/path/doesnt/exist/lib/modules/%s/misc' % kvers)
for module in modules:
for ext in ('o', 'ko'):
mod = '%s.%s' % (module, ext)
- (base/mod).remove(ignore_errors=True)
+ # (base/mod).remove(ignore_errors=True)
def PreUninstall(self, old, new, upgrade):
script = INITSCRIPTDIR/'vmware'
@@ -156,8 +157,8 @@ class Player(Installer):
def PostTransactionInstall(self, old, new, upgrade):
if ENV.get('VMWARE_SKIP_MODULES'):
log.info('Skipping kernel module installation')
- elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
- log.info('Successfully installed kernel modules')
+ # elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
+ # log.info('Successfully installed kernel modules')
else:
log.info('Unable to install kernel modules')
@@ -189,8 +190,8 @@ class Player(Installer):
for handler in ('vm', 'vms'):
for gconfType, key, value in settings:
key = key % handler
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--type', gconfType, '--set', key, value)
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--type', gconfType, '--set', key, value)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')
@@ -200,9 +201,9 @@ class Player(Installer):
def _deconfigureVMStreamingHandlers(self):
""" Deconfigures the handlers for vm:// and vms:// used for VM streaming"""
def deconfigureGConf():
- for handler in ('vm', 'vms'):
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
+ # for handler in ('vm', 'vms'):
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')

View File

@@ -0,0 +1,70 @@
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
Date: 2009-12-25
Initial Package Version: 2.5.3
Origin: gentoo
Upstream Status: never accepted
Description: patch in the modified install sources
diff -Naur 3.0.0.orig/vmware-player-app.py 3.0.0/vmware-player-app.py
--- 3.0.0.orig/vmware-player-app.py 2009-12-25 10:31:40.605560643 +0000
+++ 3.0.0/vmware-player-app.py 2009-12-25 10:39:48.550559786 +0000
@@ -6,7 +6,8 @@
GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
DEST = LIBDIR/'vmware'
-CONFIG = DEST/'setup/vmware-config'
+import os
+CONFIG = path(os.environ['WORKDIR'])/'vmware-config.sh'
CUPSLIBDIR = LIBDIR/'cups'
SETTINGS = \
{ 'libdir': DEST,
@@ -166,12 +167,12 @@
ret, kvers, _ = self.RunCommand('uname', '-r')
kvers = kvers.strip()
modules = ('vmmon', 'vmnet', 'vmblock', 'vmci', 'vsock')
- base = path('/lib/modules/%s/misc' % kvers)
+ base = path('/this/path/doesnt/exist/lib/modules/%s/misc' % kvers)
for module in modules:
for ext in ('o', 'ko'):
mod = '%s.%s' % (module, ext)
- (base/mod).remove(ignore_errors=True)
+ # (base/mod).remove(ignore_errors=True)
# Make sure we kill all processes that should not be running!
self._killVMwareProcesses()
@@ -329,8 +330,8 @@
def PostTransactionInstall(self, old, new, upgrade):
if ENV.get('VMWARE_SKIP_MODULES'):
log.Info('Skipping kernel module installation')
- elif self.RunCommand(BINDIR/'vmware-modconfig', '--console', '--install-all').retCode == 0:
- log.Info('Successfully installed kernel modules')
+ # elif self.RunCommand(BINDIR/'vmware-modconfig', '--console', '--install-all').retCode == 0:
+ # log.Info('Successfully installed kernel modules')
else:
log.Info('Unable to install kernel modules')
@@ -359,8 +360,8 @@
for handler in ('vm', 'vms'):
for gconfType, key, value in settings:
key = key % handler
- self.RunCommand('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--type', gconfType, '--set', key, value)
+ # self.RunCommand('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--type', gconfType, '--set', key, value)
# Instruct all gconfd daemons to reload.
self.RunCommand('killall', '-HUP', 'gconfd-2')
@@ -370,9 +371,9 @@
def _deconfigureVMStreamingHandlers(self):
""" Deconfigures the handlers for vm:// and vms:// used for VM streaming"""
def deconfigureGConf():
- for handler in ('vm', 'vms'):
- self.RunCommand('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
+ # for handler in ('vm', 'vms'):
+ # self.RunCommand('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
# Instruct all gconfd daemons to reload.
self.RunCommand('killall', '-HUP', 'gconfd-2')

View File

@@ -0,0 +1,8 @@
#!/bin/bash
MY_BASE=$(basename $1)
if [ -f ${FILESDIR}/${PV}/${MY_BASE}.patch ];
then
echo -n "Module Patcher: "
patch -f -p1 ${1} < ${FILESDIR}/${PV}/${MY_BASE}.patch
fi

View File

@@ -0,0 +1,91 @@
#!/bin/bash
ORIGFILE="$1"
is_relative() {
local path="$1"
shift
[ "${path:0:1}" != "/" ]
return
}
set_offsets() {
# This won't work with non-GNU stat.
FILE_SIZE=`stat -L --format "%s" "$1"`
local offset=$(($FILE_SIZE - 4))
MAGIC_OFFSET=$offset
offset=$(($offset - 4))
CHECKSUM_OFFSET=$offset
offset=$(($offset - 4))
VERSION_OFFSET=$offset
offset=$(($offset - 4))
PREPAYLOAD_OFFSET=$offset
offset=$(($offset - 4))
PREPAYLOAD_SIZE_OFFSET=$offset
offset=$(($offset - 4))
LAUNCHER_SIZE_OFFSET=$offset
offset=$(($offset - 4))
PAYLOAD_OFFSET=$offset
offset=$(($offset - 4))
PAYLOAD_SIZE_OFFSET=$offset
offset=$(($offset - 4))
}
set_lengths() {
local file="$1"
if [ ! -s "$file" ]; then
echo "$file does not exist"
exit 1
fi
# XXX: put extraction in its own function
MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' '`
if [ "$MAGIC_NUMBER" != "907380241" ]; then
echo "magic number does not match"
exit 1
fi
LAUNCHER_SIZE=`od -An -t u4 -N 4 -j $LAUNCHER_SIZE_OFFSET "$file" | tr -d ' '`
PAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
PREPAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PREPAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
SKIP_BYTES=$(($PREPAYLOAD_SIZE + $LAUNCHER_SIZE))
return 0
}
if is_relative "${ORIGFILE}"; then
ORIGFILE="`pwd`/${ORIGFILE}"
fi
set_offsets ${ORIGFILE}
set_lengths ${ORIGFILE}
echo "Unbundling" ${ORIGFILE}
PREPAYLOAD="prepayload"
PAYLOAD="payload"
# Unpack the pre-payload file
mkdir ${PREPAYLOAD}
cd ${PREPAYLOAD}
dd if="${ORIGFILE}" ibs=$LAUNCHER_SIZE obs=1024 skip=1 | tar -xzf - 2> /dev/null
cd ..
# Unpack the main file
mkdir ${PAYLOAD}
cd ${PAYLOAD}
dd if="${ORIGFILE}" ibs=$SKIP_BYTES obs=1024 skip=1 | tar -xzf - 2> /dev/null
cd ..

View File

@@ -0,0 +1,29 @@
#!/bin/bash
CONFIG_FILE="${D}/etc/vmware/config"
remove_key() {
local key=${1}
grep -v "^${key} =" ${CONFIG_FILE}
grep -v "^${key} =" ${CONFIG_FILE} > ${CONFIG_FILE}.tmp
mv ${CONFIG_FILE}.tmp ${CONFIG_FILE}
}
add_key() {
local key=${1}
local value=${2}
echo "${1} = \"${2}\"" >> ${CONFIG_FILE}
}
mkdir -p $(dirname ${CONFIG_FILE})
touch ${CONFIG_FILE}
if [ "${1}" == "-s" ]; then
remove_key ${2}
add_key ${2} ${3/${D}/}
fi
if [ "${1}" == "-d" ]; then
remove_key ${2}
fi

View File

@@ -0,0 +1,64 @@
diff --git a/payload/install/vmware-installer/vmis/__init__.py b/payload/install/vmware-installer/vmis/__init__.py
index 7a46312..e1dbff1 100644
--- a/payload/install/vmware-installer/vmis/__init__.py
+++ b/payload/install/vmware-installer/vmis/__init__.py
@@ -12,5 +12,5 @@ VERSION_INFO = (1,0)
VERSION = '.'.join([str(x) for x in VERSION_INFO])
MAJOR_VERSION = VERSION_INFO[0]
-CONFDIR = path(u'/etc/vmware')
+CONFDIR = path(u'./vmware-confdir')
DATABASE_PATH = CONFDIR/'database'
diff --git a/payload/install/vmware-installer/vmis/core/env.py b/payload/install/vmware-installer/vmis/core/env.py
index e7abc2e..81c4a2b 100644
--- a/payload/install/vmware-installer/vmis/core/env.py
+++ b/payload/install/vmware-installer/vmis/core/env.py
@@ -66,6 +66,8 @@ def LoadInstaller(component, loadPath):
# Python will interrept as being a module separator
moduleName = component.name.replace('.', '')
fileObj, pathName, description = imp.find_module(moduleName, [loadPath])
+ print output(os.path.join(env['ENV'].get('WORKDIR', './'), 'module_patcher.sh'), pathName)[1],
+ fileObj = file(pathName)
try:
# XXX: db.config cannot be set at the module level because this
diff --git a/payload/install/vmware-installer/vmis/core/questions.py b/payload/install/vmware-installer/vmis/core/questions.py
index 2be10de..f92ecff 100644
--- a/payload/install/vmware-installer/vmis/core/questions.py
+++ b/payload/install/vmware-installer/vmis/core/questions.py
@@ -139,6 +139,9 @@ class InitDir(Directory):
"""
super(InitDir, self).Validate(answer)
+ ### GENTOO PATCH ### Finish early
+ return True
+
rcdirs = ('rc0.d', 'rc1.d', 'rc2.d', 'rc3.d', 'rc4.d', 'rc5.d', 'rc6.d')
answer = path(answer)
diff --git a/payload/install/vmware-installer/vmis/ui/console.py b/payload/install/vmware-installer/vmis/ui/console.py
index 525df75..abb81b3 100644
--- a/payload/install/vmware-installer/vmis/ui/console.py
+++ b/payload/install/vmware-installer/vmis/ui/console.py
@@ -148,7 +148,7 @@ class Wizard(object):
wrapper = TextWrapper()
wrapper.width = 79
wrapper.replace_whitespace = False # Needed to preserve paragraph spacing.
- Popen('more', stdin=PIPE).communicate(input=wrapper.fill(text))
+ Popen('less', stdin=PIPE).communicate(input=wrapper.fill(text))
except IOError: # RHEL4 appears to close stdin while we still expect it to be open
pass
diff --git a/payload/install/vmware-installer/vmis/util/log.py b/payload/install/vmware-installer/vmis/util/log.py
index 4f609c4..b07b89d 100644
--- a/payload/install/vmware-installer/vmis/util/log.py
+++ b/payload/install/vmware-installer/vmis/util/log.py
@@ -22,6 +22,8 @@ else:
# running a build)
LOG_FILE = '/tmp/vmware-installer.log'
+LOG_FILE = './vmware-installer.log'
+
if level <= logging.DEBUG:
MAX_BYTES = 0
BACKUP_COUNT = 0

View File

@@ -0,0 +1,74 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/files/vmware-player-2.5.rc,v 1.1 2008/11/09 20:23:55 ikelos Exp $
depend() {
need localmount
use logger net hald
after samba
}
vmware_prettify() {
# Yea, the code is ugly but the output is pretty
state=$1
waserror=0
msgtype=0
while read line
do
[ "${line}" = "" ] && continue
if [ ${msgtype} -le 0 ]
then
if [ ${msgtype} -eq -1 ]
then
ewarn ${line}
continue
fi
case ${line} in
*:*)
einfon ${line}
echo
eend 0
msgtype=1;;
*)
ewarn ${line}
msgtype=-1
waserror=1;;
esac
continue
fi
# Strip out anything after the <esc> code
message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
einfon " ${message}"
echo
echo ${line} | grep -q done
status=$?
eend ${status}
if [ ${status} -eq 0 ]
then
logger -p local0.err -t vmware-${state} "${line}"
waserror=${status}
fi
done
if [ "${msgtype}" = "-1" ]
then
eend 1 "VMware is not properly configured! See above."
fi
return ${waserror}
}
start() {
test -x /etc/vmware/init.d/vmware || \
eend 1 "vmware init script not found. Aborting" || return 1
/etc/vmware/init.d/vmware start | vmware_prettify start
return $?
}
stop() {
/etc/vmware/init.d/vmware stop | vmware_prettify stop
return $?
}

View File

@@ -0,0 +1,61 @@
diff -uNr a/payload/install/vmware-installer/vmis/core/env.py b/payload/install/vmware-installer/vmis/core/env.py
--- a/payload/install/vmware-installer/vmis/core/env.py 2009-12-24 20:55:30.507661355 +0100
+++ b/payload/install/vmware-installer/vmis/core/env.py 2009-12-24 20:58:15.135415801 +0100
@@ -305,6 +305,8 @@
# Python will interpret as being a module separator
moduleName = component.name.replace('.', '')
fileObj, pathName, description = imp.find_module(moduleName, [loadPath])
+ print output(os.path.join(env['ENV'].get('WORKDIR', './'), 'module_patcher.sh'), pathName)[1],
+ fileObj = file(pathName)
componentCoreVersion = component.coreVersion
if component.name == 'vmware-installer': # XXX: HARDCODE - Fix this.
diff -uNr a/payload/install/vmware-installer/vmis/core/questions.py b/payload/install/vmware-installer/vmis/core/questions.py
--- a/payload/install/vmware-installer/vmis/core/questions.py 2009-12-24 20:55:30.507661355 +0100
+++ b/payload/install/vmware-installer/vmis/core/questions.py 2009-12-24 20:58:15.135415801 +0100
@@ -199,6 +199,9 @@
"""
super(InitDir, self).Validate(answer)
+ ### GENTOO PATCH ### Finish early
+ return True
+
rcdirs = ('rc0.d', 'rc1.d', 'rc2.d', 'rc3.d', 'rc4.d', 'rc5.d', 'rc6.d')
answer = path(answer)
diff -uNr a/payload/install/vmware-installer/vmis/__init__.py b/payload/install/vmware-installer/vmis/__init__.py
--- a/payload/install/vmware-installer/vmis/__init__.py 2009-12-24 20:55:30.506662004 +0100
+++ b/payload/install/vmware-installer/vmis/__init__.py 2009-12-24 20:59:50.810416210 +0100
@@ -20,7 +20,7 @@
MAJOR_VERSION = VERSION_INFO[0]
VMISPYVERSION = os.environ.get('VMISPYVERSION')
-CONFDIR = path(u'/etc/vmware-installer')
+CONFDIR = path(u'./vmware-confdir')
DATABASE_PATH = CONFDIR/'database'
# Database setting for use by the installer and its component.
diff -uNr a/payload/install/vmware-installer/vmis/ui/console.py b/payload/install/vmware-installer/vmis/ui/console.py
--- a/payload/install/vmware-installer/vmis/ui/console.py 2009-12-24 20:55:30.509662503 +0100
+++ b/payload/install/vmware-installer/vmis/ui/console.py 2009-12-24 21:01:53.076664336 +0100
@@ -202,7 +202,7 @@
# If no pager is found, or cannot be found in
# the path, default to 'more'.
if not pager:
- pager = 'more'
+ pager = 'less'
# Append -E to less so it quits after the last line of
# the EULA is displayed.
diff -uNr a/payload/install/vmware-installer/vmis/util/log.py b/payload/install/vmware-installer/vmis/util/log.py
--- a/payload/install/vmware-installer/vmis/util/log.py 2009-12-24 20:55:30.509662503 +0100
+++ b/payload/install/vmware-installer/vmis/util/log.py 2009-12-24 20:58:15.136416130 +0100
@@ -31,6 +31,8 @@
# It's okay if it already exists
pass
+LOG_FILE = './vmware-installer.log'
+
if level <= logging.DEBUG:
MAX_BYTES = 0
BACKUP_COUNT = 0

View File

@@ -0,0 +1,81 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/vmware-player-1.0.9.126128.ebuild,v 1.3 2009/01/12 21:45:03 maekke Exp $
inherit eutils vmware versionator
S=${WORKDIR}/vmware-player-distrib
MY_P="VMware-player-$(get_version_component_range 1-3)-$(get_version_component_range 4)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/player/"
SRC_URI="mirror://vmware/software/vmplayer/${MY_P}.tar.gz
http://platan.vc.cvut.cz/ftp/pub/vmware/${ANY_ANY}.tar.gz
http://platan.vc.cvut.cz/ftp/pub/vmware/obsolete/${ANY_ANY}.tar.gz
http://ftp.cvut.cz/vmware/${ANY_ANY}.tar.gz
http://ftp.cvut.cz/vmware/obsolete/${ANY_ANY}.tar.gz
http://knihovny.cvut.cz/ftp/pub/vmware/${ANY_ANY}.tar.gz
http://knihovny.cvut.cz/ftp/pub/vmware/obsolete/${ANY_ANY}.tar.gz"
LICENSE="vmware"
IUSE=""
SLOT="0"
KEYWORDS="-* amd64 x86"
RESTRICT="strip"
DEPEND="${RDEPEND} virtual/os-headers
!app-emulation/vmware-workstation"
# vmware-player should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="sys-libs/glibc
amd64? (
app-emulation/emul-linux-x86-gtklibs )
x86? (
x11-libs/libXrandr
x11-libs/libXcursor
x11-libs/libXinerama
x11-libs/libXi
x11-libs/libXft )
>=dev-lang/perl-5
!app-emulation/vmware-workstation
!app-emulation/vmware-server
~app-emulation/vmware-modules-138.9
!<app-emulation/vmware-modules-138.9
!>app-emulation/vmware-modules-138.9
sys-apps/pciutils"
RUN_UPDATE="no"
dir=/opt/vmware/player
Ddir=${D}/${dir}
QA_TEXTRELS_x86="${dir:1}/lib/lib/libgdk-x11-2.0.so.0/libgdk-x11-2.0.so.0"
QA_EXECSTACK_x86="${dir:1}/bin/vmnet-bridge
${dir:1}/bin/vmnet-dhcpd
${dir:1}/bin/vmnet-natd
${dir:1}/bin/vmnet-netifup
${dir:1}/bin/vmnet-sniffer
${dir:1}/bin/vmware-ping
${dir:1}/lib/bin/vmware-vmx
${dir:1}/lib/bin/vmrun
${dir:1}/lib/bin/vmplayer
${dir:1}/lib/bin-debug/vmware-vmx
${dir:1}/lib/lib/libpixops.so.2.0.1/libpixops.so.2.0.1"
QA_TEXTRELS_amd64="${dir:1}/lib/lib/libgdk-x11-2.0.so.0/libgdk-x11-2.0.so.0"
QA_EXECSTACK_amd64="${dir:1}/bin/vmnet-bridge
${dir:1}/bin/vmnet-dhcpd
${dir:1}/bin/vmnet-natd
${dir:1}/bin/vmnet-netifup
${dir:1}/bin/vmnet-sniffer
${dir:1}/bin/vmware-ping
${dir:1}/lib/bin/vmware-vmx
${dir:1}/lib/bin/vmrun
${dir:1}/lib/bin/vmplayer
${dir:1}/lib/bin-debug/vmware-vmx
${dir:1}/lib/lib/libpixops.so.2.0.1/libpixops.so.2.0.1"
src_install() {
vmware_src_install
make_desktop_entry vmplayer "VMware Player" ${PN}.png System
}

View File

@@ -0,0 +1,170 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/vmware-player-2.5.3.185404.ebuild,v 1.4 2009/09/25 10:37:05 maekke Exp $
EAPI="2"
inherit eutils versionator fdo-mime gnome2-utils
MY_PN="VMware-Player-$(replace_version_separator 3 - $PV)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
SRC_URI="
x86? ( mirror://vmware/software/vmplayer/${MY_PN}.i386.bundle )
amd64? ( mirror://vmware/software/vmplayer/${MY_PN}.x86_64.bundle )
"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="strip binchecks"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
DEPEND=">=dev-lang/python-2.5[sqlite,ncurses]
dev-python/lxml"
RDEPEND="
~app-emulation/vmware-modules-209.3
!>app-emulation/vmware-modules-209.3
!<app-emulation/vmware-modules-209.3
dev-cpp/cairomm
dev-cpp/libgnomecanvasmm
dev-cpp/libsexymm
sys-libs/glibc
sys-apps/pciutils
>=x11-libs/libview-0.6.2
x11-libs/libXcursor
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
!app-emulation/vmware-server
!app-emulation/vmware-workstation
"
S=${WORKDIR}/vmware-distrib
VM_INSTALL_DIR="/opt/vmware/player"
pkg_setup() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
if [ "$(python -c "import curses; curses.setupterm(); print curses.tigetstr('hpa')")" == "None" ]; then
die "Please emerge this package using a different terminal (e.g. not within screen)."
fi
}
pkg_nofetch() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
einfo "Please download the ${MY_P}.bundle from ${HOMEPAGE}"
}
src_unpack() {
# Unbundle the bundle
cp "${FILESDIR}"/helpers/* "${WORKDIR}"
chmod a+x "${WORKDIR}"/*.sh
"${WORKDIR}"/unbundler.sh "${DISTDIR}/${MY_P}".bundle
}
src_prepare() {
# Patch up the installer
epatch "${FILESDIR}/${P}-installer.patch"
mkdir "${WORKDIR}/vmware-confdir"
}
src_install() {
dodir /etc/init.d
#Run the installer
local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
local PYOPTS="-W ignore::DeprecationWarning"
export VMWARE_SKIP_NETWORKING="true"
python ${PYOPTS} "${INSTALLER}/vmware-installer.py" \
--set-setting vmware-installer.libconf "${INSTALLER}/lib/libconf" \
--set-setting initdir "${T}" \
--set-setting initscriptdir "${D}/etc/init.d" \
--set-setting prefix "${D}${VM_INSTALL_DIR}" \
--set-setting sysconfdir "${D}/etc" \
--install-component "${INSTALLER}" \
--install-bundle "${DISTDIR}/${MY_P}.bundle" \
--console --required
rm -fr "${D}${VM_INSTALL_DIR}/lib/vmware/modules/binary"
if [ ! -e "${WORKDIR}"/vmware-confdir/bootstrap ]; then
eerror "VMware installation seems to have rolled back."
eerror "Please include the contents of ${WORKDIR}/vmware-installer.log"
eerror "in any bug reports you file."
die "VMware installation rolled back."
fi
# Redirect all the ${D} paths to / paths"
sed -i -e "s:${D}::" "${WORKDIR}"/vmware-confdir/bootstrap
# Fix up icons/mime/desktop handlers
dodir /usr/share/
mv "${D}${VM_INSTALL_DIR}"/share/applications "${D}"/usr/share/
rm -f "${D}${VM_INSTALL_DIR}"/share/icons/hicolor/{icon-theme.cache,index.theme}
mv "${D}${VM_INSTALL_DIR}"/share/icons "${D}"/usr/share/
dodir /usr/share/mime
mv "${D}${VM_INSTALL_DIR}"/share/mime/packages "${D}"/usr/share/mime
sed -i -e "s:${D}::" "${D}"/usr/share/applications/*.desktop
# Copy across the temporary /etc/vmware directory
dodir /etc/vmware/init.d
cp -r "${WORKDIR}"/vmware-confdir/* "${D}/etc/vmware"
mv "${D}"/etc/init.d/* "${D}/etc/vmware/init.d"
sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${D}"/etc/vmware/init.d/vmware
newinitd "${FILESDIR}/${PN}"-2.5.rc vmware
touch "${D}"/etc/vmware/networking
# Setup the path environment
insinto /etc/env.d
doins "${FILESDIR}/90${PN}"
# Fix some paths to allow included gtk to work
for i in "/etc/pango/pangorc" \
"/etc/pango/pango.modules" \
"/etc/gtk-2.0/gtk.immodules" \
"/etc/gtk-2.0/gdk-pixbuf.loaders" ; do
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf${i} ;
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/installer/lib/libconf${i} ;
done
}
pkg_config() {
${VM_INSTALL_DIR}/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "Before you can use vmware-player, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${product_name} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

View File

@@ -0,0 +1,174 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/vmware-player-2.5.3.185404.ebuild,v 1.4 2009/09/25 10:37:05 maekke Exp $
EAPI="2"
inherit eutils versionator fdo-mime gnome2-utils
MY_PN="VMware-Player-$(replace_version_separator 3 - $PV)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
SRC_URI="
x86? ( mirror://vmware/software/vmplayer/${MY_PN}.i386.bundle )
amd64? ( mirror://vmware/software/vmplayer/${MY_PN}.x86_64.bundle )
"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="strip binchecks"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
DEPEND=">=dev-lang/python-2.5[sqlite,ncurses]
dev-python/lxml"
RDEPEND="
~app-emulation/vmware-modules-209.3
!>app-emulation/vmware-modules-209.3
!<app-emulation/vmware-modules-209.3
dev-cpp/cairomm
dev-cpp/libgnomecanvasmm
dev-cpp/libsexymm
sys-libs/glibc
sys-apps/pciutils
>=x11-libs/libview-0.6.2
x11-libs/libXcursor
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
!app-emulation/vmware-server
!app-emulation/vmware-workstation
"
S=${WORKDIR}/vmware-distrib
VM_INSTALL_DIR="/opt/vmware/player"
pkg_setup() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
if [ "$(python -c "import curses; curses.setupterm(); print curses.tigetstr('hpa')")" == "None" ]; then
die "Please emerge this package using a different terminal (e.g. not within screen)."
fi
}
pkg_nofetch() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
einfo "Please download the ${MY_P}.bundle from ${HOMEPAGE}"
}
src_unpack() {
# Unbundle the bundle
cp "${FILESDIR}"/helpers/* "${WORKDIR}"
chmod a+x "${WORKDIR}"/*.sh
"${WORKDIR}"/unbundler.sh "${DISTDIR}/${MY_P}".bundle
}
src_prepare() {
# Patch up the installer
epatch "${FILESDIR}/${P}-installer.patch"
local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
cp ${INSTALLER}/bootstrap ${WORKDIR}/bootstrap
sed -i -e "s,@@VMWARE_INSTALLER@@,${INSTALLER},g" ${WORKDIR}/bootstrap
mkdir "${WORKDIR}/vmware-confdir"
}
src_install() {
dodir /etc/init.d
#Run the installer
local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
local PYOPTS="-W ignore::DeprecationWarning"
export VMWARE_SKIP_NETWORKING="true"
export VMWARE_BOOTSTRAP="${WORKDIR}/bootstrap"
"${INSTALLER}/vmware-installer" \
--set-setting vmware-installer libconf "${INSTALLER}/lib/libconf" \
--set-setting initdir "${T}" \
--set-setting initscriptdir "${D}/etc/init.d" \
--set-setting prefix "${D}${VM_INSTALL_DIR}" \
--set-setting sysconfdir "${D}/etc" \
--install-component "${INSTALLER}" \
--install-bundle "${DISTDIR}/${MY_P}.bundle" \
--console --required
rm -fr "${D}${VM_INSTALL_DIR}/lib/vmware/modules/binary"
if [ ! -e "${WORKDIR}"/vmware-confdir/bootstrap ]; then
eerror "VMware installation seems to have rolled back."
eerror "Please include the contents of ${WORKDIR}/vmware-installer.log"
eerror "in any bug reports you file."
die "VMware installation rolled back."
fi
# Redirect all the ${D} paths to / paths"
sed -i -e "s:${D}::" "${WORKDIR}"/vmware-confdir/bootstrap
# Fix up icons/mime/desktop handlers
dodir /usr/share/
mv "${D}${VM_INSTALL_DIR}"/share/applications "${D}"/usr/share/
rm -f "${D}${VM_INSTALL_DIR}"/share/icons/hicolor/{icon-theme.cache,index.theme}
mv "${D}${VM_INSTALL_DIR}"/share/icons "${D}"/usr/share/
dodir /usr/share/mime
mv "${D}${VM_INSTALL_DIR}"/share/mime/packages "${D}"/usr/share/mime
sed -i -e "s:${D}::" "${D}"/usr/share/applications/*.desktop
# Copy across the temporary /etc/vmware directory
dodir /etc/vmware/init.d
cp -r "${WORKDIR}"/vmware-confdir/* "${D}/etc/vmware"
mv "${D}"/etc/init.d/* "${D}/etc/vmware/init.d"
sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${D}"/etc/vmware/init.d/vmware
newinitd "${FILESDIR}/${PN}"-2.5.rc vmware
touch "${D}"/etc/vmware/networking
# Setup the path environment
insinto /etc/env.d
doins "${FILESDIR}/90${PN}"
# Fix some paths to allow included gtk to work
for i in "/etc/pango/pangorc" \
"/etc/pango/pango.modules" \
"/etc/gtk-2.0/gtk.immodules" \
"/etc/gtk-2.0/gdk-pixbuf.loaders" ; do
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf${i} ;
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/installer/lib/libconf${i} ;
done
}
pkg_config() {
${VM_INSTALL_DIR}/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "Before you can use vmware-player, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${product_name} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

View File

@@ -0,0 +1,26 @@
# ChangeLog for app-emulation/vmware-vix
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-vix/ChangeLog,v 1.4 2009/08/26 14:59:25 vadimk Exp $
*vmware-vix-1.6.2.156745-r2 (26 Aug 2009)
26 Aug 2009; Vadim Kuznetsov vadimk@gentoo.org
-vmware-vix-1.6.2.156745-r1.ebuild, +vmware-vix-1.6.2.156745-r2.ebuild:
Removed unnecessary dependencies
*vmware-vix-1.6.2.156745-r1 (08 Jul 2009)
08 Jul 2009; Vadim Kuznetsov vadimk@gentoo.org
-vmware-vix-1.6.2.156745.ebuild, +vmware-vix-1.6.2.156745-r1.ebuild:
Fixing vix.libdir
06 Jul 2009; Vadim Kuznetsov vadimk@gentoo.org
vmware-vix-1.6.2.156745.ebuild:
Fix minor syntax
*vmware-vix-1.6.2.156745 (06 Jul 2009)
06 Jul 2009; Vadim Kuznetsov vadimk@gentoo.org
+vmware-vix-1.6.2.156745.ebuild, +metadata.xml:
Initial ebuild. Fixes bug 263560.

View File

@@ -0,0 +1,5 @@
DIST VMware-vix-1.6.2-156745.i386.tar.gz 18413447 RMD160 36d7e4c3740e109c515de5150ec7ed969db421b1 SHA1 01ef532e329f56c6839a5be9531673623b7ddcd4 SHA256 5e230879d5c24dffda36c9b0fc69637dcdd9fffd3b306f86a5ebd9ba231a6f5b
DIST VMware-vix-1.6.2-156745.x86_64.tar.gz 22657119 RMD160 1841373c363a71645a5f8ab2b4e3790bf00d21e9 SHA1 034a7f75d58b73bc31d02c8f2503f7fdd1f1fe31 SHA256 c37b58d1cfa3686138178cc60af92c48e81ccca6f039c966ebb43928fc95adb7
EBUILD vmware-vix-1.6.2.156745-r2.ebuild 5884 RMD160 2dca3f8c81aa2c4eade2d5b55f988e8f5db13ca3 SHA1 69906ba0750d7161ebf38651b1e2428321edc4af SHA256 31fe7690bb8d49474e501160110a1120616ba9590b8804ff28344ea216a810df
MISC ChangeLog 886 RMD160 eca9e97721be28f904bd35853881f0ad896c445c SHA1 7ebbc01932d1f226c032e9ece0e949866395cd0b SHA256 78cc382725b8a0fbdfb08a03da3ef14dc6e4b87fa857f5f2defbf0dbb77f4d03
MISC metadata.xml 736 RMD160 9e0b6138a82c1ca34b847bc71bc072e44c60d95a SHA1 4365d9dc523f50c84cb02caf44fadf05ee996b3c SHA256 3882e8981caee5b279a4a1990df6b404e920ab088d6a4cd1d789cbb29e301f74

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>vmware</herd>
<maintainer>
<email>vadimk@gentoo.org</email>
</maintainer>
<longdescription>
The VIX API allows you to write programs and scripts that automate
virtual machine operations, as well as the guests within virtual
machines. This API is high-level, easy to use, and practical for both
script writers and application programmers. It runs on both Windows and
Linux and supports management of VMware Server, Workstation, and Virtual
Infrastructure (both ESX and vCenter). Bindings are provided for C,
Perl, and COM (Visual Basic, VBscript, C#).
</longdescription>
</pkgmetadata>

View File

@@ -0,0 +1,205 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-vix/vmware-vix-1.6.2.156745-r2.ebuild,v 1.2 2009/08/26 17:31:46 mr_bones_ Exp $
# Unlike many other binary packages the user doesn't need to agree to a licence
# to download VMWare. The agreeing to a licence is part of the configure step
# which the user must run manually.
EAPI="2"
inherit eutils versionator
MY_PV=$(replace_version_separator 3 '-' )
MY_PN="VMware-vix-${MY_PV}"
DESCRIPTION="VMware VIX for Linux"
HOMEPAGE="http://www.vmware.com/"
SRC_URI=" x86? ( mirror://vmware/software/vmserver/${MY_PN}.i386.tar.gz )
amd64? ( mirror://vmware/software/vmserver/${MY_PN}.x86_64.tar.gz ) "
LICENSE="vmware"
IUSE=""
SLOT="0"
KEYWORDS="-* ~x86 ~amd64"
RESTRICT="strip"
# vmware-server should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
DEPEND="
>=dev-lang/perl-5
sys-apps/pciutils
sys-apps/findutils
>=sys-libs/glibc-2.3.5
x11-misc/shared-mime-info
virtual/os-headers"
RDEPEND="${DEPEND}
dev-libs/glib
dev-libs/libxml2
dev-libs/openssl
net-misc/curl
sys-libs/zlib
!app-emulation/vmware-workstation
"
S=${WORKDIR}/vmware-vix-distrib
pkg_setup() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
}
src_prepare() {
VMWARE_GROUP=${VMWARE_GROUP:-vmware}
VMWARE_INSTALL_DIR=/opt/${PN//-//}
shortname="vix"
product="vmware-vix"
config_dir="/etc/vmware-vix"
product_name="VMware VIX API"
enewgroup ${VMWARE_GROUP}
# EPATCH_SOURCE="${FILESDIR}"/${PV} EPATCH_SUFFIX="patch" epatch
sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${S}"/installer/services.sh || die "sed of services"
# We won't want any perl scripts from VMware
rm -f *.pl bin/*.pl
rm -f etc/installer.sh
}
src_install() {
# We loop through our directories and copy everything to our system.
for x in api bin lib include
do
if [[ -e "${S}/vmware-vix/${x}" ]]
then
dodir "${VMWARE_INSTALL_DIR}"/${x}
cp -pPR "${S}"/vmware-vix/${x}/* "${D}""${VMWARE_INSTALL_DIR}"/${x} \
|| die "copying ${x}"
fi
done
# If we have an /etc directory, we copy it.
#if [[ -e "${S}/etc" ]]
#then
dodir "${config_dir}"
# cp -pPR "${S}"/etc/* "${D}""${config_dir}"
# fowners root:${VMWARE_GROUP} "${config_dir}"
# fperms 770 "${config_dir}"
#fi
# If we have any helper files, we install them. First, we check for an
# init script.
if [[ -e "${FILESDIR}/${PN}.rc" ]]
then
newinitd "${FILESDIR}"/${PN}.rc ${product} || die "newinitd"
fi
local ENVD="${T}/90${PN}"
echo "PATH=${VMWARE_INSTALL_DIR}/bin" > "${ENVD}"
echo "ROOTPATH=${VMWARE_INSTALL_DIR}/bin" >> "${ENVD}"
doenvd "${ENVD}" || die "doenvd"
# Last, we check for any mime files.
if [[ -e "${FILESDIR}/${PN}.xml" ]]
then
insinto /usr/share/mime/packages
doins "${FILESDIR}"/${PN}.xml || die "mimetypes"
fi
# Blame bug #91191 for this one.
if [[ -e doc/EULA ]]
then
insinto "${VMWARE_INSTALL_DIR}"/doc
doins doc/EULA || die "copying EULA"
fi
# Now, we copy in our services.sh file
#exeinto "${config_dir}"/init.d
#newexe installer/services.sh ${product} || die "services.sh"
dohtml -r doc/VMwareVix/*
# Finally, we run the "questions"
# Questions:
einfo "Adding answers to ${config_dir}/locations"
locations="${D}${config_dir}/locations"
echo "answer BINDIR ${VMWARE_INSTALL_DIR}/bin" >> ${locations}
echo "answer VIXLIBDIR ${VMWARE_INSTALL_DIR}/lib" >> ${locations}
echo "answer LIBDIR ${VMWARE_INSTALL_DIR}/lib" >> ${locations}
#echo "answer MANDIR ${VMWARE_INSTALL_DIR}/man" >> ${locations}
echo "answer DOCDIR /usr/share/doc/${P}" >> ${locations}
local VMWARECONFIG="${T}"/config
if [[ -e ${ROOT}/etc/vmware/config ]]
then
cp -a "${ROOT}"/etc/vmware/config "${VMWARECONFIG}"
sed -i -e "/vix.libdir/d" "${VMWARECONFIG}"
fi
echo "vix.libdir = \"${VMWARE_INSTALL_DIR}/lib\"" >> "${VMWARECONFIG}"
insinto /etc/vmware/
doins "${VMWARECONFIG}"
}
pkg_preinst() {
# This must be done after the install to get the mtimes on each file
# right.
#Note: it's a bit weird to use ${D} in a preinst script but it should work
#(drobbins, 1 Feb 2002)
einfo "Generating ${config_dir}/locations file."
d=`echo ${D} | wc -c`
for x in `find ${D}${VMWARE_INSTALL_DIR} ${D}${config_dir}` ; do
x="`echo ${x} | cut -c ${d}-`"
if [ -d "${D}/${x}" ] ; then
echo "directory ${x}" >> "${D}${config_dir}"/locations
else
echo -n "file ${x}" >> "${D}${config_dir}"/locations
if [ "${x}" == "${config_dir}/locations" ] ; then
echo "" >> "${D}${config_dir}"/locations
elif [ "${x}" == "${config_dir}/not_configured" ] ; then
echo "" >> "${D}${config_dir}"/locations
else
echo -n " " >> "${D}${config_dir}"/locations
find "${D}${x}" -printf %T@ >> "${D}${config_dir}"/locations
echo "" >> "${D}${config_dir}"/locations
fi
fi
done
}
pkg_postinst() {
update-mime-database /usr/share/mime
[[ -d "${config_dir}" ]] && chown -R root:${VMWARE_GROUP} ${config_dir}
# 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 ${config_dir}/locations"
for x in "${config_dir}"/._cfg????_locations ; do
if [ -f $x ] ; then
cat $x >> "${config_dir}"/locations
rm $x
fi
done
ewarn "In order to run ${product_name}, you have to"
ewarn "be in the '${VMWARE_GROUP}' group."
}
pkg_prerm() {
sed -i -e "/vix.libdir/d" "${ROOT}"/etc/vmware/config
}
pkg_postrm() {
if ! has_version app-emulation/${PN}; then
ewarn "To remove all traces of ${producti_name} you will need to remove the files"
ewarn "in ${config_dir} and /etc/init.d/${product}."
ewarn "If the vmware-modules package is installed, you may no longer need it."
fi
}

View File

@@ -0,0 +1,31 @@
--- vmware-distrib/bin/vmware-config.pl.ori 2005-11-09 01:45:08.000000000 +0000
+++ vmware-distrib/bin/vmware-config.pl 2005-11-09 01:48:21.000000000 +0000
@@ -8433,7 +8433,7 @@
error('Please shut down any running VMs and run this script again.' .
"\n\n");
} else {
- if (system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware')
+ if (system(shell_string('/etc/init.d' . '/vmware')
. ' stop')) {
error('Unable to stop services for ' . vmware_product_name() .
"\n\n");
@@ -8463,8 +8463,8 @@
}
if (vmware_product() ne 'server') {
configure_gtk2();
- createMimePackageFile();
- configureDesktopFiles();
+# createMimePackageFile();
+# configureDesktopFiles();
configure_mon();
configure_pp();
configure_net();
@@ -8532,7 +8532,7 @@
db_save();
# Then start VMware's services
if (!$gOption{'skipstopstart'}) {
- system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware') . ' start');
+ system(shell_string('/etc/init.d' . '/vmware') . ' start');
print "\n";
}

View File

@@ -0,0 +1,15 @@
diff -urN vmware-distrib.orig/bin/vmware-config.pl vmware-distrib/bin/vmware-config.pl
--- vmware-distrib.orig/bin/vmware-config.pl 2005-12-16 00:51:03.000000000 -0500
+++ vmware-distrib/bin/vmware-config.pl 2005-12-21 14:34:03.000000000 -0500
@@ -7327,7 +7327,10 @@
error('Unable to write configuration file "' . $name . '".' . "\n\n");
}
db_add_file($name, 0x1);
- safe_chmod(0644, $name);
+ safe_chmod(0664, $name);
+ my $gid = (getgrnam('vmware'))[2];
+ my $uid = (stat($name))[4];
+ safe_chown($uid,$gid,$name);
# Append the promotional configuration if it exists
$promoconfig = $libdir . '/configurator/PROMOCONFIG';

View File

@@ -0,0 +1,15 @@
diff -ur vmware-distrib.orig/bin/vmware-config.pl vmware-distrib/bin/vmware-config.pl
--- vmware-distrib.orig/bin/vmware-config.pl 2006-03-24 23:13:05.000000000 +0100
+++ vmware-distrib/bin/vmware-config.pl 2006-03-24 23:26:40.000000000 +0100
@@ -2015,9 +2015,9 @@
. shell_string($pattern));
chomp($header_page_offset);
# Ignore PAGE_OFFSET if we cannot parse it.
- if ($header_page_offset =~ /^$pattern \(?0x([0-9a-fA-F]{8,})/) {
+ if ($header_page_offset =~ /^$pattern \(?(\([^)]*\))?\)?0x([0-9a-fA-F]{8,}).*$/) {
# We found a valid page offset
- $header_page_offset = $1;
+ $header_page_offset = $2;
if (defined($gSystem{'page_offset'}) and
not (lc($header_page_offset) eq lc($gSystem{'page_offset'}))) {
if ($source eq 'user') {

View File

@@ -0,0 +1,17 @@
diff -uNr vmware-server-distrib.orig/bin/vmware-config.pl vmware-server-distrib/bin/vmware-config.pl
--- vmware-server-distrib.orig/bin/vmware-config.pl 2006-02-18 18:12:26.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2006-02-18 18:14:17.000000000 +0000
@@ -8571,10 +8571,10 @@
configure_gtk2();
# createMimePackageFile();
# configureDesktopFiles();
- configure_mon();
- configure_pp();
+# configure_mon();
+# configure_pp();
configure_net();
- build_vmnet();
+# build_vmnet();
}
# Create the directory for the UNIX domain sockets

View File

@@ -0,0 +1,12 @@
diff -uNr vmware-server-distrib/installer/services.sh vmware-server-distrib.new/installer/services.sh
--- vmware-server-distrib/installer/services.sh 2006-02-05 00:21:25.000000000 +0000
+++ vmware-server-distrib.new/installer/services.sh 2006-02-20 23:48:07.000000000 +0000
@@ -538,7 +538,7 @@
}
vmware_load_module() {
- /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
+ /sbin/modprobe -s "$1" || exit 1
exit 0
}

View File

@@ -0,0 +1,19 @@
diff -uNr vmware-server-distrib.orig/installer/services.sh vmware-server-distrib/installer/services.sh
--- vmware-server-distrib.orig/installer/services.sh 2006-07-01 03:14:16.000000000 +0000
+++ vmware-server-distrib/installer/services.sh 2006-07-14 11:59:28.000000000 +0000
@@ -606,8 +606,13 @@
start)
if [ -e "$vmware_etc_dir"/not_configured ]; then
echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
- echo 'for the running kernel. To (re-)configure it, invoke the'
- echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
+ echo 'for the running kernel.'
+ echo
+ echo 'Please ensure that the modules have been compiled for this kernel:'
+ echo ' emerge --oneshot vmware-modules'
+ echo
+ echo 'Also ensure '"`vmware_product_name`"' has been configured:'
+ echo ' '"$vmdb_answer_BINDIR"'/vmware-config.pl'
echo
exit 1

View File

@@ -0,0 +1,14 @@
diff --git a/vmware-player-extras.py b/vmware-player-extras.py
index 21595b1..e8adf08 100644
--- a/vmware-player-extras.py
+++ b/vmware-player-extras.py
@@ -6,7 +6,8 @@ VMware Player Extras component installer.
DEST = LIBDIR/'vmware'
SETTINGS = { 'vmware.fullpath': BINDIR/'vmware', }
-CONF = DEST/'setup/vmware-config'
+import os
+CONF = path(os.environ['WORKDIR'])/'vmware-config.sh'
class PlayerExtras(Installer):

View File

@@ -0,0 +1,64 @@
diff --git a/vmware-player.py b/vmware-player.py
index bee22df..d06cca9 100644
--- a/vmware-player.py
+++ b/vmware-player.py
@@ -6,7 +6,8 @@ VMware Player component installer.
GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
DEST = LIBDIR/'vmware'
-CONFIG = DEST/'setup/vmware-config'
+import os
+CONFIG = path(os.environ['WORKDIR'])/'vmware-config.sh'
CUPSLIBDIR = LIBDIR/'cups'
# XXX: LIBDIR should be properly calculated, to make this cleaner
if (PREFIX/'lib64/cups').exists():
@@ -84,12 +85,12 @@ class Player(Installer):
ret, kvers = output('uname', '-r')
kvers = kvers.strip()
modules = ('vmmon', 'vmnet', 'vmblock', 'vmci', 'vsock')
- base = path('/lib/modules/%s/misc' % kvers)
+ base = path('/this/path/doesnt/exist/lib/modules/%s/misc' % kvers)
for module in modules:
for ext in ('o', 'ko'):
mod = '%s.%s' % (module, ext)
- (base/mod).remove(ignore_errors=True)
+ # (base/mod).remove(ignore_errors=True)
def PreUninstall(self, old, new, upgrade):
script = INITSCRIPTDIR/'vmware'
@@ -156,8 +157,8 @@ class Player(Installer):
def PostTransactionInstall(self, old, new, upgrade):
if ENV.get('VMWARE_SKIP_MODULES'):
log.info('Skipping kernel module installation')
- elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
- log.info('Successfully installed kernel modules')
+ # elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
+ # log.info('Successfully installed kernel modules')
else:
log.info('Unable to install kernel modules')
@@ -189,8 +190,8 @@ class Player(Installer):
for handler in ('vm', 'vms'):
for gconfType, key, value in settings:
key = key % handler
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--type', gconfType, '--set', key, value)
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--type', gconfType, '--set', key, value)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')
@@ -200,9 +201,9 @@ class Player(Installer):
def _deconfigureVMStreamingHandlers(self):
""" Deconfigures the handlers for vm:// and vms:// used for VM streaming"""
def deconfigureGConf():
- for handler in ('vm', 'vms'):
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
+ # for handler in ('vm', 'vms'):
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')

View File

@@ -0,0 +1,14 @@
diff --git a/vmware-vix.py b/vmware-vix.py
index ac64dc5..8fdc2b2 100644
--- a/vmware-vix.py
+++ b/vmware-vix.py
@@ -4,7 +4,8 @@ Copyright 2007 VMware, Inc. All rights reserved. -- VMware Confidential
VIX component installer.
"""
DEST = LIBDIR/'vmware-vix'
-conf = DEST/'setup/vmware-config'
+import os
+conf = path(os.environ['WORKDIR'])/'vmware-config.sh'
class VIX(Installer):
def InitializeInstall(self, old, new, upgrade):

View File

@@ -0,0 +1,23 @@
diff --git a/vmware-workstation.py b/vmware-workstation.py
index 55476d9..8dd4c0a 100644
--- a/vmware-workstation.py
+++ b/vmware-workstation.py
@@ -4,7 +4,8 @@ Copyright 2008 VMware, Inc. All rights reserved. -- VMware Confidential
VMware Workstation component installer.
"""
DEST = LIBDIR/'vmware'
-conf = DEST/'setup/vmware-config'
+import os
+conf = path(os.environ['WORKDIR'])/'vmware-config.sh'
class Workstation(Installer):
def PreTransactionInstall(self, old, new, upgrade):
@@ -40,7 +41,7 @@ class Workstation(Installer):
self.AddPermission(DEST/'bin/*', BINARY)
eclipse = config.Get('vmware-workstation.eclipse')
- eclipse and self.AddTarget(Link, DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
+ False and self.AddTarget(Link, DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
Destination(eclipse)/'plugins/com.vmware.bfg_1.0.0')
def _vmwareMountRunnable(self, vmwareMount):

View File

@@ -0,0 +1,14 @@
diff --git a/vmware-player-extras.py b/vmware-player-extras.py
index 21595b1..e8adf08 100644
--- a/vmware-player-extras.py
+++ b/vmware-player-extras.py
@@ -6,7 +6,8 @@ VMware Player Extras component installer.
DEST = LIBDIR/'vmware'
SETTINGS = { 'vmware.fullpath': BINDIR/'vmware', }
-CONF = DEST/'setup/vmware-config'
+import os
+CONF = path(os.environ['WORKDIR'])/'vmware-config.sh'
class PlayerExtras(Installer):

View File

@@ -0,0 +1,64 @@
diff --git a/vmware-player.py b/vmware-player.py
index bee22df..d06cca9 100644
--- a/vmware-player.py
+++ b/vmware-player.py
@@ -6,7 +6,8 @@ VMware Player component installer.
GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
DEST = LIBDIR/'vmware'
-CONFIG = DEST/'setup/vmware-config'
+import os
+CONFIG = path(os.environ['WORKDIR'])/'vmware-config.sh'
CUPSLIBDIR = LIBDIR/'cups'
# XXX: LIBDIR should be properly calculated, to make this cleaner
if (PREFIX/'lib64/cups').exists():
@@ -84,12 +85,12 @@ class Player(Installer):
ret, kvers = output('uname', '-r')
kvers = kvers.strip()
modules = ('vmmon', 'vmnet', 'vmblock', 'vmci', 'vsock')
- base = path('/lib/modules/%s/misc' % kvers)
+ base = path('/this/path/doesnt/exist/lib/modules/%s/misc' % kvers)
for module in modules:
for ext in ('o', 'ko'):
mod = '%s.%s' % (module, ext)
- (base/mod).remove(ignore_errors=True)
+ # (base/mod).remove(ignore_errors=True)
def PreUninstall(self, old, new, upgrade):
script = INITSCRIPTDIR/'vmware'
@@ -156,8 +157,8 @@ class Player(Installer):
def PostTransactionInstall(self, old, new, upgrade):
if ENV.get('VMWARE_SKIP_MODULES'):
log.info('Skipping kernel module installation')
- elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
- log.info('Successfully installed kernel modules')
+ # elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
+ # log.info('Successfully installed kernel modules')
else:
log.info('Unable to install kernel modules')
@@ -189,8 +190,8 @@ class Player(Installer):
for handler in ('vm', 'vms'):
for gconfType, key, value in settings:
key = key % handler
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--type', gconfType, '--set', key, value)
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--type', gconfType, '--set', key, value)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')
@@ -200,9 +201,9 @@ class Player(Installer):
def _deconfigureVMStreamingHandlers(self):
""" Deconfigures the handlers for vm:// and vms:// used for VM streaming"""
def deconfigureGConf():
- for handler in ('vm', 'vms'):
- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
- '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
+ # for handler in ('vm', 'vms'):
+ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+ # '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
# Instruct all gconfd daemons to reload.
run('killall', '-HUP', 'gconfd-2')

View File

@@ -0,0 +1,14 @@
diff --git a/vmware-vix.py b/vmware-vix.py
index ac64dc5..8fdc2b2 100644
--- a/vmware-vix.py
+++ b/vmware-vix.py
@@ -4,7 +4,8 @@ Copyright 2007 VMware, Inc. All rights reserved. -- VMware Confidential
VIX component installer.
"""
DEST = LIBDIR/'vmware-vix'
-conf = DEST/'setup/vmware-config'
+import os
+conf = path(os.environ['WORKDIR'])/'vmware-config.sh'
class VIX(Installer):
def InitializeInstall(self, old, new, upgrade):

View File

@@ -0,0 +1,23 @@
diff --git a/vmware-workstation.py b/vmware-workstation.py
index 55476d9..8dd4c0a 100644
--- a/vmware-workstation.py
+++ b/vmware-workstation.py
@@ -4,7 +4,8 @@ Copyright 2008 VMware, Inc. All rights reserved. -- VMware Confidential
VMware Workstation component installer.
"""
DEST = LIBDIR/'vmware'
-conf = DEST/'setup/vmware-config'
+import os
+conf = path(os.environ['WORKDIR'])/'vmware-config.sh'
class Workstation(Installer):
def PreTransactionInstall(self, old, new, upgrade):
@@ -40,7 +41,7 @@ class Workstation(Installer):
self.AddPermission(DEST/'bin/*', BINARY)
eclipse = config.Get('vmware-workstation.eclipse')
- eclipse and self.AddTarget(Link, DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
+ False and self.AddTarget(Link, DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
Destination(eclipse)/'plugins/com.vmware.bfg_1.0.0')
def _vmwareMountRunnable(self, vmwareMount):

View File

@@ -0,0 +1,8 @@
#!/bin/bash
MY_BASE=$(basename $1)
if [ -f ${FILESDIR}/${PV}/${MY_BASE}.patch ];
then
echo -n "Module Patcher: "
patch -f -p1 ${1} < ${FILESDIR}/${PV}/${MY_BASE}.patch
fi

View File

@@ -0,0 +1,91 @@
#!/bin/bash
ORIGFILE="$1"
is_relative() {
local path="$1"
shift
[ "${path:0:1}" != "/" ]
return
}
set_offsets() {
# This won't work with non-GNU stat.
FILE_SIZE=`stat -L --format "%s" "$1"`
local offset=$(($FILE_SIZE - 4))
MAGIC_OFFSET=$offset
offset=$(($offset - 4))
CHECKSUM_OFFSET=$offset
offset=$(($offset - 4))
VERSION_OFFSET=$offset
offset=$(($offset - 4))
PREPAYLOAD_OFFSET=$offset
offset=$(($offset - 4))
PREPAYLOAD_SIZE_OFFSET=$offset
offset=$(($offset - 4))
LAUNCHER_SIZE_OFFSET=$offset
offset=$(($offset - 4))
PAYLOAD_OFFSET=$offset
offset=$(($offset - 4))
PAYLOAD_SIZE_OFFSET=$offset
offset=$(($offset - 4))
}
set_lengths() {
local file="$1"
if [ ! -s "$file" ]; then
echo "$file does not exist"
exit 1
fi
# XXX: put extraction in its own function
MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' '`
if [ "$MAGIC_NUMBER" != "907380241" ]; then
echo "magic number does not match"
exit 1
fi
LAUNCHER_SIZE=`od -An -t u4 -N 4 -j $LAUNCHER_SIZE_OFFSET "$file" | tr -d ' '`
PAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
PREPAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PREPAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
SKIP_BYTES=$(($PREPAYLOAD_SIZE + $LAUNCHER_SIZE))
return 0
}
if is_relative "${ORIGFILE}"; then
ORIGFILE="`pwd`/${ORIGFILE}"
fi
set_offsets ${ORIGFILE}
set_lengths ${ORIGFILE}
echo "Unbundling" ${ORIGFILE}
PREPAYLOAD="prepayload"
PAYLOAD="payload"
# Unpack the pre-payload file
mkdir ${PREPAYLOAD}
cd ${PREPAYLOAD}
dd if="${ORIGFILE}" ibs=$LAUNCHER_SIZE obs=1024 skip=1 | tar -xzf - 2> /dev/null
cd ..
# Unpack the main file
mkdir ${PAYLOAD}
cd ${PAYLOAD}
dd if="${ORIGFILE}" ibs=$SKIP_BYTES obs=1024 skip=1 | tar -xzf - 2> /dev/null
cd ..

View File

@@ -0,0 +1,29 @@
#!/bin/bash
CONFIG_FILE="${D}/etc/vmware/config"
remove_key() {
local key=${1}
grep -v "^${key} =" ${CONFIG_FILE}
grep -v "^${key} =" ${CONFIG_FILE} > ${CONFIG_FILE}.tmp
mv ${CONFIG_FILE}.tmp ${CONFIG_FILE}
}
add_key() {
local key=${1}
local value=${2}
echo "${1} = \"${2}\"" >> ${CONFIG_FILE}
}
mkdir -p $(dirname ${CONFIG_FILE})
touch ${CONFIG_FILE}
if [ "${1}" == "-s" ]; then
remove_key ${2}
add_key ${2} ${3/${D}/}
fi
if [ "${1}" == "-d" ]; then
remove_key ${2}
fi

View File

@@ -0,0 +1,64 @@
diff --git a/payload/install/vmware-installer/vmis/__init__.py b/payload/install/vmware-installer/vmis/__init__.py
index 7a46312..e1dbff1 100644
--- a/payload/install/vmware-installer/vmis/__init__.py
+++ b/payload/install/vmware-installer/vmis/__init__.py
@@ -12,5 +12,5 @@ VERSION_INFO = (1,0)
VERSION = '.'.join([str(x) for x in VERSION_INFO])
MAJOR_VERSION = VERSION_INFO[0]
-CONFDIR = path(u'/etc/vmware')
+CONFDIR = path(u'./vmware-confdir')
DATABASE_PATH = CONFDIR/'database'
diff --git a/payload/install/vmware-installer/vmis/core/env.py b/payload/install/vmware-installer/vmis/core/env.py
index e7abc2e..81c4a2b 100644
--- a/payload/install/vmware-installer/vmis/core/env.py
+++ b/payload/install/vmware-installer/vmis/core/env.py
@@ -66,6 +66,8 @@ def LoadInstaller(component, loadPath):
# Python will interrept as being a module separator
moduleName = component.name.replace('.', '')
fileObj, pathName, description = imp.find_module(moduleName, [loadPath])
+ print output(os.path.join(env['ENV'].get('WORKDIR', './'), 'module_patcher.sh'), pathName)[1],
+ fileObj = file(pathName)
try:
# XXX: db.config cannot be set at the module level because this
diff --git a/payload/install/vmware-installer/vmis/core/questions.py b/payload/install/vmware-installer/vmis/core/questions.py
index 2be10de..f92ecff 100644
--- a/payload/install/vmware-installer/vmis/core/questions.py
+++ b/payload/install/vmware-installer/vmis/core/questions.py
@@ -139,6 +139,9 @@ class InitDir(Directory):
"""
super(InitDir, self).Validate(answer)
+ ### GENTOO PATCH ### Finish early
+ return True
+
rcdirs = ('rc0.d', 'rc1.d', 'rc2.d', 'rc3.d', 'rc4.d', 'rc5.d', 'rc6.d')
answer = path(answer)
diff --git a/payload/install/vmware-installer/vmis/ui/console.py b/payload/install/vmware-installer/vmis/ui/console.py
index 525df75..abb81b3 100644
--- a/payload/install/vmware-installer/vmis/ui/console.py
+++ b/payload/install/vmware-installer/vmis/ui/console.py
@@ -148,7 +148,7 @@ class Wizard(object):
wrapper = TextWrapper()
wrapper.width = 79
wrapper.replace_whitespace = False # Needed to preserve paragraph spacing.
- Popen('more', stdin=PIPE).communicate(input=wrapper.fill(text))
+ Popen('less', stdin=PIPE).communicate(input=wrapper.fill(text))
except IOError: # RHEL4 appears to close stdin while we still expect it to be open
pass
diff --git a/payload/install/vmware-installer/vmis/util/log.py b/payload/install/vmware-installer/vmis/util/log.py
index 4f609c4..b07b89d 100644
--- a/payload/install/vmware-installer/vmis/util/log.py
+++ b/payload/install/vmware-installer/vmis/util/log.py
@@ -22,6 +22,8 @@ else:
# running a build)
LOG_FILE = '/tmp/vmware-installer.log'
+LOG_FILE = './vmware-installer.log'
+
if level <= logging.DEBUG:
MAX_BYTES = 0
BACKUP_COUNT = 0

View File

@@ -0,0 +1,74 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-workstation-6.5.rc,v 1.1 2008/11/09 20:56:55 ikelos Exp $
depend() {
need localmount
use logger net hald
after samba
}
vmware_prettify() {
# Yea, the code is ugly but the output is pretty
state=$1
waserror=0
msgtype=0
while read line
do
[ "${line}" = "" ] && continue
if [ ${msgtype} -le 0 ]
then
if [ ${msgtype} -eq -1 ]
then
ewarn ${line}
continue
fi
case ${line} in
*:*)
einfon ${line}
echo
eend 0
msgtype=1;;
*)
ewarn ${line}
msgtype=-1
waserror=1;;
esac
continue
fi
# Strip out anything after the <esc> code
message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
einfon " ${message}"
echo
echo ${line} | grep -q done
status=$?
eend ${status}
if [ ${status} -eq 0 ]
then
logger -p local0.err -t vmware-${state} "${line}"
waserror=${status}
fi
done
if [ "${msgtype}" = "-1" ]
then
eend 1 "VMware is not properly configured! See above."
fi
return ${waserror}
}
start() {
test -x /etc/vmware/init.d/vmware || \
eend 1 "vmware init script not found. Aborting" || return 1
/etc/vmware/init.d/vmware start | vmware_prettify start
return $?
}
stop() {
/etc/vmware/init.d/vmware stop | vmware_prettify stop
return $?
}

View File

@@ -0,0 +1,61 @@
diff -uNr a/payload/install/vmware-installer/vmis/core/env.py b/payload/install/vmware-installer/vmis/core/env.py
--- a/payload/install/vmware-installer/vmis/core/env.py 2009-12-24 20:55:30.507661355 +0100
+++ b/payload/install/vmware-installer/vmis/core/env.py 2009-12-24 20:58:15.135415801 +0100
@@ -305,6 +305,8 @@
# Python will interpret as being a module separator
moduleName = component.name.replace('.', '')
fileObj, pathName, description = imp.find_module(moduleName, [loadPath])
+ print output(os.path.join(env['ENV'].get('WORKDIR', './'), 'module_patcher.sh'), pathName)[1],
+ fileObj = file(pathName)
componentCoreVersion = component.coreVersion
if component.name == 'vmware-installer': # XXX: HARDCODE - Fix this.
diff -uNr a/payload/install/vmware-installer/vmis/core/questions.py b/payload/install/vmware-installer/vmis/core/questions.py
--- a/payload/install/vmware-installer/vmis/core/questions.py 2009-12-24 20:55:30.507661355 +0100
+++ b/payload/install/vmware-installer/vmis/core/questions.py 2009-12-24 20:58:15.135415801 +0100
@@ -199,6 +199,9 @@
"""
super(InitDir, self).Validate(answer)
+ ### GENTOO PATCH ### Finish early
+ return True
+
rcdirs = ('rc0.d', 'rc1.d', 'rc2.d', 'rc3.d', 'rc4.d', 'rc5.d', 'rc6.d')
answer = path(answer)
diff -uNr a/payload/install/vmware-installer/vmis/__init__.py b/payload/install/vmware-installer/vmis/__init__.py
--- a/payload/install/vmware-installer/vmis/__init__.py 2009-12-24 20:55:30.506662004 +0100
+++ b/payload/install/vmware-installer/vmis/__init__.py 2009-12-24 20:59:50.810416210 +0100
@@ -20,7 +20,7 @@
MAJOR_VERSION = VERSION_INFO[0]
VMISPYVERSION = os.environ.get('VMISPYVERSION')
-CONFDIR = path(u'/etc/vmware-installer')
+CONFDIR = path(u'./vmware-confdir')
DATABASE_PATH = CONFDIR/'database'
# Database setting for use by the installer and its component.
diff -uNr a/payload/install/vmware-installer/vmis/ui/console.py b/payload/install/vmware-installer/vmis/ui/console.py
--- a/payload/install/vmware-installer/vmis/ui/console.py 2009-12-24 20:55:30.509662503 +0100
+++ b/payload/install/vmware-installer/vmis/ui/console.py 2009-12-24 21:01:53.076664336 +0100
@@ -202,7 +202,7 @@
# If no pager is found, or cannot be found in
# the path, default to 'more'.
if not pager:
- pager = 'more'
+ pager = 'less'
# Append -E to less so it quits after the last line of
# the EULA is displayed.
diff -uNr a/payload/install/vmware-installer/vmis/util/log.py b/payload/install/vmware-installer/vmis/util/log.py
--- a/payload/install/vmware-installer/vmis/util/log.py 2009-12-24 20:55:30.509662503 +0100
+++ b/payload/install/vmware-installer/vmis/util/log.py 2009-12-24 20:58:15.136416130 +0100
@@ -31,6 +31,8 @@
# It's okay if it already exists
pass
+LOG_FILE = './vmware-installer.log'
+
if level <= logging.DEBUG:
MAX_BYTES = 0
BACKUP_COUNT = 0

View File

@@ -0,0 +1,100 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/vmware-workstation-5.5.9.126128.ebuild,v 1.3 2009/01/12 21:46:40 maekke Exp $
inherit vmware eutils versionator
MY_P="VMware-workstation-$(replace_version_separator 3 - $PV)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/download/ws/ws5.html"
SRC_URI="mirror://vmware/software/wkst/${MY_P}.tar.gz
http://download.softpedia.ro/linux/${MY_P}.tar.gz
mirror://gentoo/${ANY_ANY}.tar.gz
http://platan.vc.cvut.cz/ftp/pub/vmware/${ANY_ANY}.tar.gz
http://platan.vc.cvut.cz/ftp/pub/vmware/obsolete/${ANY_ANY}.tar.gz
http://ftp.cvut.cz/vmware/${ANY_ANY}.tar.gz
http://ftp.cvut.cz/vmware/obsolete/${ANY_ANY}.tar.gz
http://knihovny.cvut.cz/ftp/pub/vmware/${ANY_ANY}.tar.gz
http://knihovny.cvut.cz/ftp/pub/vmware/obsolete/${ANY_ANY}.tar.gz"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="fetch strip"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="sys-libs/glibc
amd64? (
app-emulation/emul-linux-x86-gtklibs )
x86? (
x11-libs/libXrandr
x11-libs/libXcursor
x11-libs/libXinerama
x11-libs/libXi
x11-libs/libXft )
!app-emulation/vmware-player
!app-emulation/vmware-server
~app-emulation/vmware-modules-1.0.0.15
!<app-emulation/vmware-modules-1.0.0.15
!>=app-emulation/vmware-modules-1.0.0.16
>=dev-lang/perl-5
sys-apps/pciutils"
S=${WORKDIR}/vmware-distrib
RUN_UPDATE="no"
dir=/opt/vmware/workstation
Ddir=${D}/${dir}
QA_TEXTRELS_x86="${dir:1}/lib/lib/libgdk-x11-2.0.so.0/libgdk-x11-2.0.so.0"
QA_EXECSTACK_x86="${dir:1}/bin/vmnet-bridge
${dir:1}/bin/vmnet-dhcpd
${dir:1}/bin/vmnet-natd
${dir:1}/bin/vmnet-netifup
${dir:1}/bin/vmnet-sniffer
${dir:1}/bin/vmware-loop
${dir:1}/bin/vmware-ping
${dir:1}/bin/vmware-vdiskmanager
${dir:1}/lib/bin/vmware
${dir:1}/lib/bin/vmware-vmx
${dir:1}/lib/bin/vmrun
${dir:1}/lib/bin/vmplayer
${dir:1}/lib/bin-debug/vmware-vmx
${dir:1}/lib/lib/libpixops.so.2.0.1/libpixops.so.2.0.1"
QA_TEXTRELS_amd64="${dir:1}/lib/lib/libgdk-x11-2.0.so.0/libgdk-x11-2.0.so.0"
QA_EXECSTACK_amd64="${dir:1}/bin/vmnet-bridge
${dir:1}/bin/vmnet-dhcpd
${dir:1}/bin/vmnet-natd
${dir:1}/bin/vmnet-netifup
${dir:1}/bin/vmnet-sniffer
${dir:1}/bin/vmware-loop
${dir:1}/bin/vmware-ping
${dir:1}/bin/vmware-vdiskmanager
${dir:1}/lib/bin/vmware
${dir:1}/lib/bin/vmware-vmx
${dir:1}/lib/bin/vmrun
${dir:1}/lib/bin/vmplayer
${dir:1}/lib/bin-debug/vmware-vmx
${dir:1}/lib/lib/libpixops.so.2.0.1/libpixops.so.2.0.1"
src_install() {
vmware_src_install
doicon lib/share/pixmaps/vmware-player.png
# Fix an ugly GCC error on start
rm -f "${Ddir}lib/lib/libgcc_s.so.1/libgcc_s.so.1"
make_desktop_entry vmware "VMWare Workstation" ${PN}.png System
make_desktop_entry vmplayer "VMWare Player" vmware-player.png System
}
pkg_postinst() {
vmware_pkg_postinst
ewarn "Vmware Workstation has issues on systems with hal installed but"
ewarn "not running. If you experience trouble with VMware loading, try"
ewarn "starting the hal daemon."
}

View File

@@ -0,0 +1,178 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/vmware-workstation-6.5.3.185404.ebuild,v 1.4 2009/09/25 10:38:14 maekke Exp $
EAPI="2"
inherit eutils versionator fdo-mime gnome2-utils
MY_PN="VMware-Workstation-$(replace_version_separator 3 - $PV)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
DOWNLOAD_URL="http://www.vmware.com/download/ws/"
SRC_URI="
x86? (
mirror://vmware/software/wkst/${MY_PN}.i386.bundle
http://download.softpedia.ro/linux/${MY_PN}.i386.bundle )
amd64? (
mirror://vmware/software/wkst/${MY_PN}.x86_64.bundle
http://download.softpedia.ro/linux/${MY_PN}.x86_64.bundle )
"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="strip fetch binchecks"
PROPERTIES="interactive"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
DEPEND=">=dev-lang/python-2.5[sqlite,ncurses]
dev-python/lxml"
RDEPEND="
~app-emulation/vmware-modules-1.0.0.25
dev-cpp/cairomm
dev-cpp/libgnomecanvasmm
dev-cpp/libsexymm
sys-apps/pciutils
sys-fs/fuse
sys-libs/glibc
>=x11-libs/libview-0.6.2
x11-libs/libgksu
x11-libs/libXcursor
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
!!app-emulation/vmware-player
!!app-emulation/vmware-server
"
S=${WORKDIR}/vmware-distrib
VM_INSTALL_DIR="/opt/vmware/workstation"
pkg_setup() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
if [ "$(python -c "import curses; curses.setupterm(); print curses.tigetstr('hpa')")" == "None" ]; then
die "Please emerge this package using a different terminal (e.g. not within screen)."
fi
}
pkg_nofetch() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
einfo "Please download the ${MY_P}.bundle from"
einfo "${DOWNLOAD_URL}"
einfo "and place it in ${DISTDIR}"
}
src_unpack() {
# Unbundle the bundle
cp "${FILESDIR}"/helpers/* "${WORKDIR}"
chmod a+x "${WORKDIR}"/*.sh
"${WORKDIR}"/unbundler.sh "${DISTDIR}/${MY_P}".bundle
}
src_prepare() {
# Patch up the installer
epatch "${FILESDIR}/${P}-installer.patch"
mkdir "${WORKDIR}/vmware-confdir"
}
src_install() {
dodir /etc/init.d
#Run the installer
local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
local PYOPTS="-W ignore::DeprecationWarning"
export VMWARE_SKIP_NETWORKING="true"
python ${PYOPTS} "${INSTALLER}/vmware-installer.py" \
--set-setting vmware-installer.libconf "${INSTALLER}/lib/libconf" \
--set-setting initdir "${T}" \
--set-setting initscriptdir "${D}/etc/init.d" \
--set-setting prefix "${D}${VM_INSTALL_DIR}" \
--set-setting sysconfdir "${D}/etc" \
--install-component "${INSTALLER}" \
--install-bundle "${DISTDIR}/${MY_P}.bundle" \
--console --required
rm -fr "${D}${VM_INSTALL_DIR}/lib/vmware/modules/binary"
if [ ! -e "${WORKDIR}"/vmware-confdir/bootstrap ]; then
eerror "VMware installation seems to have rolled back."
eerror "Please include the contents of ${WORKDIR}/vmware-installer.log"
eerror "in any bug reports you file."
die "VMware installation rolled back."
fi
# Redirect all the ${D} paths to / paths"
sed -i -e "s:${D}::" "${WORKDIR}"/vmware-confdir/bootstrap
# Fix up icons/mime/desktop handlers
dodir /usr/share/
mv "${D}${VM_INSTALL_DIR}"/share/applications "${D}"/usr/share/
rm -f "${D}${VM_INSTALL_DIR}"/share/icons/hicolor/{icon-theme.cache,index.theme}
mv "${D}${VM_INSTALL_DIR}"/share/icons "${D}"/usr/share/
dodir /usr/share/mime
mv "${D}${VM_INSTALL_DIR}"/share/mime/packages "${D}"/usr/share/mime
sed -i -e "s:${D}::" "${D}"/usr/share/applications/*.desktop
# Copy across the temporary /etc/vmware directory
dodir /etc/vmware/init.d
cp -r "${WORKDIR}"/vmware-confdir/* "${D}/etc/vmware"
mv "${D}"/etc/init.d/* "${D}/etc/vmware/init.d"
sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${D}"/etc/vmware/init.d/vmware
newinitd "${FILESDIR}/${PN}"-6.5.rc vmware
touch "${D}"/etc/vmware/networking
# Setup the path environment
insinto /etc/env.d
doins "${FILESDIR}/90${PN}"
# Fix some paths to allow included gtk to work
for i in "/etc/pango/pangorc" \
"/etc/pango/pango.modules" \
"/etc/gtk-2.0/gtk.immodules" \
"/etc/gtk-2.0/gdk-pixbuf.loaders" ; do
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf${i} ;
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/installer/lib/libconf${i} ;
done
}
pkg_config() {
${VM_INSTALL_DIR}/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "Before you can use vmware-workstation, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${product_name} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

View File

@@ -0,0 +1,178 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/vmware-workstation-6.5.3.185404.ebuild,v 1.4 2009/09/25 10:38:14 maekke Exp $
EAPI="2"
inherit eutils versionator fdo-mime gnome2-utils
MY_PN="VMware-Workstation-Full-$(replace_version_separator 3 - $PV)"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
DOWNLOAD_URL="http://www.vmware.com/download/ws/"
SRC_URI="
x86? (
mirror://vmware/software/wkst/${MY_PN}.i386.bundle
http://download.softpedia.ro/linux/${MY_PN}.i386.bundle )
amd64? (
mirror://vmware/software/wkst/${MY_PN}.x86_64.bundle
http://download.softpedia.ro/linux/${MY_PN}.x86_64.bundle )
"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="strip fetch binchecks"
PROPERTIES="interactive"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
DEPEND=">=dev-lang/python-2.5[sqlite,ncurses]
dev-python/lxml"
RDEPEND="
~app-emulation/vmware-modules-1.0.0.25
dev-cpp/cairomm
dev-cpp/libgnomecanvasmm
dev-cpp/libsexymm
sys-apps/pciutils
sys-fs/fuse
sys-libs/glibc
>=x11-libs/libview-0.6.2
x11-libs/libgksu
x11-libs/libXcursor
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
!!app-emulation/vmware-player
!!app-emulation/vmware-server
"
S=${WORKDIR}/vmware-distrib
VM_INSTALL_DIR="/opt/vmware/workstation"
pkg_setup() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
if [ "$(python -c "import curses; curses.setupterm(); print curses.tigetstr('hpa')")" == "None" ]; then
die "Please emerge this package using a different terminal (e.g. not within screen)."
fi
}
pkg_nofetch() {
if use x86; then
MY_P="${MY_PN}.i386"
elif use amd64; then
MY_P="${MY_PN}.x86_64"
fi
einfo "Please download the ${MY_P}.bundle from"
einfo "${DOWNLOAD_URL}"
einfo "and place it in ${DISTDIR}"
}
src_unpack() {
# Unbundle the bundle
cp "${FILESDIR}"/helpers/* "${WORKDIR}"
chmod a+x "${WORKDIR}"/*.sh
"${WORKDIR}"/unbundler.sh "${DISTDIR}/${MY_P}".bundle
}
src_prepare() {
# Patch up the installer
epatch "${FILESDIR}/${P}-installer.patch"
mkdir "${WORKDIR}/vmware-confdir"
}
src_install() {
dodir /etc/init.d
#Run the installer
local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
local PYOPTS="-W ignore::DeprecationWarning"
export VMWARE_SKIP_NETWORKING="true"
python ${PYOPTS} "${INSTALLER}/vmware-installer.py" \
--set-setting vmware-installer.libconf "${INSTALLER}/lib/libconf" \
--set-setting initdir "${T}" \
--set-setting initscriptdir "${D}/etc/init.d" \
--set-setting prefix "${D}${VM_INSTALL_DIR}" \
--set-setting sysconfdir "${D}/etc" \
--install-component "${INSTALLER}" \
--install-bundle "${DISTDIR}/${MY_P}.bundle" \
--console --required
rm -fr "${D}${VM_INSTALL_DIR}/lib/vmware/modules/binary"
if [ ! -e "${WORKDIR}"/vmware-confdir/bootstrap ]; then
eerror "VMware installation seems to have rolled back."
eerror "Please include the contents of ${WORKDIR}/vmware-installer.log"
eerror "in any bug reports you file."
die "VMware installation rolled back."
fi
# Redirect all the ${D} paths to / paths"
sed -i -e "s:${D}::" "${WORKDIR}"/vmware-confdir/bootstrap
# Fix up icons/mime/desktop handlers
dodir /usr/share/
mv "${D}${VM_INSTALL_DIR}"/share/applications "${D}"/usr/share/
rm -f "${D}${VM_INSTALL_DIR}"/share/icons/hicolor/{icon-theme.cache,index.theme}
mv "${D}${VM_INSTALL_DIR}"/share/icons "${D}"/usr/share/
dodir /usr/share/mime
mv "${D}${VM_INSTALL_DIR}"/share/mime/packages "${D}"/usr/share/mime
sed -i -e "s:${D}::" "${D}"/usr/share/applications/*.desktop
# Copy across the temporary /etc/vmware directory
dodir /etc/vmware/init.d
cp -r "${WORKDIR}"/vmware-confdir/* "${D}/etc/vmware"
mv "${D}"/etc/init.d/* "${D}/etc/vmware/init.d"
sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${D}"/etc/vmware/init.d/vmware
newinitd "${FILESDIR}/${PN}"-6.5.rc vmware
touch "${D}"/etc/vmware/networking
# Setup the path environment
insinto /etc/env.d
doins "${FILESDIR}/90${PN}"
# Fix some paths to allow included gtk to work
for i in "/etc/pango/pangorc" \
"/etc/pango/pango.modules" \
"/etc/gtk-2.0/gtk.immodules" \
"/etc/gtk-2.0/gdk-pixbuf.loaders" ; do
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf${i} ;
sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/installer/lib/libconf${i} ;
done
}
pkg_config() {
${VM_INSTALL_DIR}/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "Before you can use vmware-workstation, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${product_name} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}