app-emulation/vmware-server: depend on my kernel modules

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/vmware@1736 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2009-12-24 15:39:51 +00:00
parent 1bf82d3090
commit 4955024c9d
32 changed files with 1429 additions and 45 deletions

View File

@@ -0,0 +1,32 @@
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 2007-12-02 11:40:41.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2007-12-02 11:43:29.000000000 +0000
@@ -10162,7 +10162,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");
}
@@ -10212,8 +10212,8 @@
if (isDesktopProduct()) {
build_vmblock();
- createMimePackageFile();
- configureDesktopFiles();
+ # createMimePackageFile();
+ # configureDesktopFiles();
if (vmware_binary() ne "vmplayer") {
configure_eclipse_plugin();
}
@@ -10283,7 +10283,7 @@
db_save();
# Then start VMware's services
if (!$gOption{'skip-stop-start'}) {
- 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 -uNr vmware-server-distrib.orig/bin/vmware-config.pl vmware-server-distrib/bin/vmware-config.pl
--- vmware-server-distrib.orig/bin/vmware-config.pl 2007-12-02 11:16:42.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2007-12-02 11:25:36.000000000 +0000
@@ -9097,7 +9097,10 @@
error('Unable to write configuration file "' . $name . '".' . "\n\n");
}
db_add_file($name, $cFlagTimestamp | $cFlagConfig);
- 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,26 @@
diff --git a/bin/vmware-config.pl b/bin/vmware-config.pl
index 363f9cb..7ffc212 100755
--- a/bin/vmware-config.pl
+++ b/bin/vmware-config.pl
@@ -10404,16 +10404,16 @@ sub main {
}
if (vmware_product() ne 'server') {
- configure_mon();
- configure_vmci();
- configure_vsock();
- configure_pp();
+ #configure_mon();
+ #configure_vmci();
+ #configure_vsock();
+ #configure_pp();
if (vmware_product() eq 'wgs') {
configure_net();
}
- build_vmnet();
+ #build_vmnet();
}
if (isDesktopProduct()) {

View File

@@ -0,0 +1,13 @@
diff --git a/installer/services.sh b/installer/services.sh
index 402ad79..2fb53ab 100755
--- a/installer/services.sh
+++ b/installer/services.sh
@@ -755,7 +755,7 @@ vmware_run_vimsh_cmd() {
}
vmware_load_module() {
- /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
+ /sbin/modprobe -s "$1" || exit 1
return 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 2007-12-02 12:08:09.000000000 +0000
+++ vmware-server-distrib/installer/services.sh 2007-12-02 12:12:08.000000000 +0000
@@ -823,8 +823,13 @@
check_configured() {
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,13 @@
diff --git a/bin/vmware-config.pl b/bin/vmware-config.pl
index bb9d04f..458a14b 100755
--- a/bin/vmware-config.pl
+++ b/bin/vmware-config.pl
@@ -10315,7 +10315,7 @@ sub main {
if ($gOption{'tools-switch'} == 0) {
my @modules = non_vmware_modules_installed();
- if (scalar(@modules) > 0) {
+ if (scalar(@modules) < 0) {
my $osVersion = direct_command(shell_string($gHelper{'uname'}) . ' -r');
chomp($osVersion);
error("The following VMware kernel modules have been found on your " .

View File

@@ -0,0 +1,25 @@
--- bin.old/vmware-config.pl 2009-07-02 17:56:08.873568674 -0400
+++ bin/vmware-config.pl 2009-07-02 17:56:59.000000000 -0400
@@ -1341,6 +1341,14 @@
}
}
+ # Try using Genoot's rc-config
+ if ($gHelper{'rc-config'} ne '') {
+ if(0 == system(shell_string($gHelper{'rc-config'}) . ' add '
+ . $service . ' default')) {
+ return;
+ }
+ }
+
# Set up vmware to start/stop at run levels 2, 3 and 5
link_runlevel(2, $service, $S_level, $K_level);
link_runlevel(3, $service, $S_level, $K_level);
@@ -2552,6 +2560,7 @@
}
$gHelper{'insserv'} = internal_which('insserv');
$gHelper{'chkconfig'} = internal_which('/sbin/chkconfig');
+ $gHelper{'rc-config'} = internal_which('/usr/bin/rc-config');
if (vmware_product() eq 'server' &&
$gHelper{'chkconfig'} eq '') {
error('No initscript installer found.' . "\n\n");

View File

@@ -0,0 +1,32 @@
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 2007-12-02 11:40:41.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2007-12-02 11:43:29.000000000 +0000
@@ -10162,7 +10162,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");
}
@@ -10212,8 +10212,8 @@
if (isDesktopProduct()) {
build_vmblock();
- createMimePackageFile();
- configureDesktopFiles();
+ # createMimePackageFile();
+ # configureDesktopFiles();
if (vmware_binary() ne "vmplayer") {
configure_eclipse_plugin();
}
@@ -10283,7 +10283,7 @@
db_save();
# Then start VMware's services
if (!$gOption{'skip-stop-start'}) {
- 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 -uNr vmware-server-distrib.orig/bin/vmware-config.pl vmware-server-distrib/bin/vmware-config.pl
--- vmware-server-distrib.orig/bin/vmware-config.pl 2007-12-02 11:16:42.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2007-12-02 11:25:36.000000000 +0000
@@ -9097,7 +9097,10 @@
error('Unable to write configuration file "' . $name . '".' . "\n\n");
}
db_add_file($name, $cFlagTimestamp | $cFlagConfig);
- 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,26 @@
diff --git a/bin/vmware-config.pl b/bin/vmware-config.pl
index 363f9cb..7ffc212 100755
--- a/bin/vmware-config.pl
+++ b/bin/vmware-config.pl
@@ -10404,16 +10404,16 @@ sub main {
}
if (vmware_product() ne 'server') {
- configure_mon();
- configure_vmci();
- configure_vsock();
- configure_pp();
+ #configure_mon();
+ #configure_vmci();
+ #configure_vsock();
+ #configure_pp();
if (vmware_product() eq 'wgs') {
configure_net();
}
- build_vmnet();
+ #build_vmnet();
}
if (isDesktopProduct()) {

View File

@@ -0,0 +1,13 @@
diff --git a/installer/services.sh b/installer/services.sh
index 402ad79..2fb53ab 100755
--- a/installer/services.sh
+++ b/installer/services.sh
@@ -755,7 +755,7 @@ vmware_run_vimsh_cmd() {
}
vmware_load_module() {
- /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
+ /sbin/modprobe -s "$1" || exit 1
return 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 2007-12-02 12:08:09.000000000 +0000
+++ vmware-server-distrib/installer/services.sh 2007-12-02 12:12:08.000000000 +0000
@@ -823,8 +823,13 @@
check_configured() {
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,13 @@
diff --git a/bin/vmware-config.pl b/bin/vmware-config.pl
index bb9d04f..458a14b 100755
--- a/bin/vmware-config.pl
+++ b/bin/vmware-config.pl
@@ -10315,7 +10315,7 @@ sub main {
if ($gOption{'tools-switch'} == 0) {
my @modules = non_vmware_modules_installed();
- if (scalar(@modules) > 0) {
+ if (scalar(@modules) < 0) {
my $osVersion = direct_command(shell_string($gHelper{'uname'}) . ' -r');
chomp($osVersion);
error("The following VMware kernel modules have been found on your " .

View File

@@ -0,0 +1,25 @@
--- bin.old/vmware-config.pl 2009-07-02 17:56:08.873568674 -0400
+++ bin/vmware-config.pl 2009-07-02 17:56:59.000000000 -0400
@@ -1341,6 +1341,14 @@
}
}
+ # Try using Genoot's rc-config
+ if ($gHelper{'rc-config'} ne '') {
+ if(0 == system(shell_string($gHelper{'rc-config'}) . ' add '
+ . $service . ' default')) {
+ return;
+ }
+ }
+
# Set up vmware to start/stop at run levels 2, 3 and 5
link_runlevel(2, $service, $S_level, $K_level);
link_runlevel(3, $service, $S_level, $K_level);
@@ -2552,6 +2560,7 @@
}
$gHelper{'insserv'} = internal_which('insserv');
$gHelper{'chkconfig'} = internal_which('/sbin/chkconfig');
+ $gHelper{'rc-config'} = internal_which('/usr/bin/rc-config');
if (vmware_product() eq 'server' &&
$gHelper{'chkconfig'} eq '') {
error('No initscript installer found.' . "\n\n");

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,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,44 @@
--- vmware-server-distrib/bin/vmware-config.pl 2006-03-17 21:13:22.000000000 +0100
+++ vmware-server-distrib/bin/vmware-config.pl 2006-03-17 22:37:00.000000000 +0100
@@ -6278,10 +6278,30 @@
my $authd_conf_file = "$conf_dir/vmware-authd";
my $authd = db_get_answer('SBINDIR') . "/vmware-authd";
+ # Never overwrite an existing conf file unless it has the exact modification
+ # date as in the database in which case we can be pretty sure that it is the
+ # one that we wrote and it should be safe to assume that we can overwrite it.
+ if( -f $authd_conf_file ) {
+ my @statbuf = stat( $authd_conf_file );
+ if( ! defined( $statbuf[9] ) ) {
+ error(
+ 'Unable to get the last modification timestamp of file "'
+ . $authd_conf_file . "\".\n\n"
+ );
+ }
+ if(
+ ! db_file_in( $authd_conf_file )
+ || db_file_ts( $authd_conf_file ) != $statbuf[9]
+ ) {
+ if (get_answer('The file "' . $authd_conf_file . '" already exists and seems to have'
+ . ' been modified manually. Overwrite?', 'yesno', 'no') eq 'no')
+ { return; }
+ }
+ }
+
# Create the new vmware-authd file
- # XXX This file should be registered with the installer's database. --hpreg
if (not open(CONF, '>' . $authd_conf_file)) {
- query('Unable to create the "' . $authd_conf_file . '"file. '
+ query('Unable to create the "' . $authd_conf_file . '" file. '
. 'Consequently, this program cannot add a "' . $authd . '" entry '
. 'in the file. You will have to do it by hand before running '
. vmware_product_name() . '.' . "\n\n" . 'Hit enter to continue.',
@@ -6304,6 +6324,8 @@
END
close CONF;
+ db_add_file( $authd_conf_file, 0x1 );
+
# Make sure the IP service is registered, as RH 9.0's xinetd is picky about
# that (was bug 26864). --hpreg
if (check_port_not_registered($port) == 1) {

View File

@@ -0,0 +1,28 @@
--- vmware-server-distrib/bin/vmware-config.pl 2006-03-20 20:04:45.000000000 +0000
+++ vmware-server-distrib/bin/vmware-config.pl 2006-03-20 20:08:01.000000000 +0000
@@ -6255,17 +6255,17 @@
#Restart xinetd
sub restart_xinetd {
my $xinetd_restart = db_get_answer('INITSCRIPTSDIR') . '/xinetd';
+ if (!system(shell_string($gHelper{'killall'}) . ' -USR2 xinetd')) {
+ return;
+ }
if (-e $xinetd_restart) {
- if (!system(shell_string($xinetd_restart) . ' restart')) {
- return;
+ if (system(shell_string($xinetd_restart) . ' restart')) {
+ query('Unable to make the Internet super-server (xinetd) re-read its '
+ . 'configuration file. Please restart xinetd by hand:' . "\n"
+ . ' killall -v -USR2 xinetd' . "\n\n"
+ . 'Hit enter to continue.', '', 0);
}
}
- if (system(shell_string($gHelper{'killall'}) . ' -USR2 xinetd')) {
- query('Unable to make the Internet super-server (xinetd) re-read its '
- . 'configuration file. Please restart xinetd by hand:' . "\n"
- . ' killall -v -USR2 xinetd' . "\n\n"
- . 'Hit enter to continue.', '', 0);
- }
}
# Update the Internet super-server's configuration file, and make the

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,13 @@
--- 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
@@ -5448,8 +5448,8 @@
my $network;
my $netmask;
- if (-r '/etc/dhcpd.conf') {
- $conf = '/etc/dhcpd.conf';
+ if (-r '/etc/dhcp/dhcpd.conf') {
+ $conf = '/etc/dhcp/dhcpd.conf';
} else {
return;
}

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

@@ -1,7 +1,7 @@
#!/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-server/files/vmware-server.rc,v 1.6 2007/09/20 17:13:13 ikelos Exp $
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-server/files/vmware-server-2.rc,v 1.1 2009/05/09 21:55:17 ikelos Exp $
depend() {
need localmount hald