SOURCES: VMware-server-Makefile.patch (NEW), VMware-server-dhcpd.c...

malekith malekith at pld-linux.org
Wed Mar 1 22:52:52 CET 2006


Author: malekith                     Date: Wed Mar  1 21:52:52 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- mostly copied from VMware-workstation

---- Files affected:
SOURCES:
   VMware-server-Makefile.patch (NONE -> 1.1)  (NEW), VMware-server-dhcpd.conf (NONE -> 1.1)  (NEW), VMware-server-nat.conf (NONE -> 1.1)  (NEW), VMware-server-run_script.patch (NONE -> 1.1)  (NEW), VMware-server-vmnet.conf (NONE -> 1.1)  (NEW), VMware-server.desktop (NONE -> 1.1)  (NEW), VMware-server.png (NONE -> 1.1)  (NEW), VMware-server.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/VMware-server-Makefile.patch
diff -u /dev/null SOURCES/VMware-server-Makefile.patch:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server-Makefile.patch	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,134 @@
+diff -urN vmmon-only.org/Makefile vmmon-only/Makefile
+--- vmmon-only.org/Makefile	2004-05-12 16:49:05.732456176 +0200
++++ vmmon-only/Makefile	2004-05-12 16:57:25.454486880 +0200
+@@ -14,9 +14,9 @@
+ VM_UNAME = $(shell uname -r)
+ 
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = /usr/src/linux/include
+ 
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = .
+ 
+ DRIVER := vmmon
+ 
+@@ -55,9 +55,6 @@
+ 
+ VMCCVER := $(shell $(CC) -dumpversion)
+ 
+-# If there is no version defined, we are in toplevel pass, not yet in kernel makefiles...
+-ifeq ($(VERSION),)
+-
+ ifeq ($(VM_KBUILD), 24)
+ DRIVER_KO := $(DRIVER).o
+ else
+@@ -72,41 +69,14 @@
+ $(DRIVER): $(DRIVER_KO)
+ 	cp -f $< $@
+ 
+-# Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler
+-VM_CCVER := $(VMCCVER)
+-export VM_CCVER
+-VM_CC := $(CC)
+-export VM_CC
+-
+ MAKEOVERRIDES := $(filter-out CC=%,$(MAKEOVERRIDES))
+ 
+ $(DRIVER_KO):
+ 	make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) modules
+ 
+-else
+-
+-ifneq ($(VM_CCVER), $(VMCCVER))
+-$(warning *** Inappropriate build environment: you wanted to use gcc \
+- version $(VM_CCVER) while kernel attempts to use gcc version $(VMCCVER).)
+-$(error For proper build you'll have to replace $(CC) with symbolic \
+- link to $(VM_CC))
+-endif
+-
+-endif
+ 
+ include $(SRCROOT)/Makefile.kernel
+ 
+-ifdef TOPDIR
+-ifeq ($(VM_KBUILD), 24)
+-
+-O_TARGET := $(DRIVER).o
+-
+-obj-y := $($(DRIVER)-y)
+-
+-include $(TOPDIR)/Rules.make
+-endif
+-endif
+-
+ else
+ 
+ include $(SRCROOT)/Makefile.normal
+diff -urN vmnet-only.org/Makefile vmnet-only/Makefile
+--- vmnet-only.org/Makefile	2004-05-12 16:49:09.091945456 +0200
++++ vmnet-only/Makefile	2004-05-12 16:49:19.904301728 +0200
+@@ -14,9 +14,9 @@
+ VM_UNAME = $(shell uname -r)
+ 
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = /usr/src/linux/include
+ 
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = .
+ 
+ DRIVER := vmnet
+ 
+@@ -90,9 +67,6 @@
+ 
+ VMCCVER := $(shell $(CC) -dumpversion)
+ 
+-# If there is no version defined, we are in toplevel pass, not yet in kernel makefiles...
+-ifeq ($(VERSION),)
+-
+ ifeq ($(VM_KBUILD), 24)
+ DRIVER_KO := $(DRIVER).o
+ else
+@@ -102,41 +76,13 @@
+ auto-build: $(DRIVER_KO)
+ 	cp -f $< $(SRCROOT)/../$(DRIVER).o
+ 
+-# Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler
+-VM_CCVER := $(VMCCVER)
+-export VM_CCVER
+-VM_CC := $(CC)
+-export VM_CC
+-
+ MAKEOVERRIDES := $(filter-out CC=%,$(MAKEOVERRIDES))
+ 
+ $(DRIVER_KO):
+ 	make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) modules
+ 
+-else
+-
+-ifneq ($(VM_CCVER), $(VMCCVER))
+-$(warning *** Inappropriate build environment: you wanted to use gcc \
+- version $(VM_CCVER) while kernel attempts to use gcc version $(VMCCVER).)
+-$(error For proper build you'll have to replace $(CC) with symbolic \
+- link to $(VM_CC))
+-endif
+-
+-endif
+-
+ include $(SRCROOT)/Makefile.kernel
+ 
+-ifdef TOPDIR
+-ifeq ($(VM_KBUILD), 24)
+-
+-O_TARGET := $(DRIVER).o
+-
+-obj-y := $($(DRIVER)-y)
+-
+-include $(TOPDIR)/Rules.make
+-endif
+-endif
+-
+ else
+ 
+ include $(SRCROOT)/Makefile.normal

================================================================
Index: SOURCES/VMware-server-dhcpd.conf
diff -u /dev/null SOURCES/VMware-server-dhcpd.conf:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server-dhcpd.conf	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,11 @@
+allow unknown-clients;
+default-lease-time 1800;		# 30 minutes
+max-lease-time 7200;			# 2 hours
+
+subnet 192.168.76.0 netmask 255.255.255.0 {
+    range 192.168.76.128 192.168.76.254;
+    option broadcast-address 192.168.76.255;
+    option domain-name-servers 192.168.76.2;
+    option domain-name "localdomain";
+    option routers 192.168.76.2;
+}

================================================================
Index: SOURCES/VMware-server-nat.conf
diff -u /dev/null SOURCES/VMware-server-nat.conf:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server-nat.conf	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,46 @@
+# Linux NAT configuration file
+[host]
+# NAT gateway address
+ip = 192.168.76.2
+netmask = 255.255.255.0
+# or ip = 192.168.76.2/24
+
+# enable configuration; disabled by default for security reasons
+#configport = 33445
+
+# VMnet device if not specified on command line
+device = /dev/vmnet8
+
+# Allow PORT/EPRT FTP commands (they need incoming TCP stream...)
+activeFTP = 1
+
+# Allows the source to have any OUI.  Turn this one if you change the OUI
+# in the MAC address of your virtual machines.
+#allowAnyOUI = 1
+
+[udp]
+# Timeout in seconds, 0 = no timeout, default = 60; real value might
+# be up to 100% longer
+timeout = 60
+
+[incomingtcp]
+# Use these with care - anyone can enter into your VM through these...
+
+# FTP (both active and passive FTP is always enabled)
+#      ftp localhost 8887
+#8887 = 192.168.76.128:21
+
+# WEB (make sure that if you are using named webhosting, names point to
+#     your host, not to guest... And if you are forwarding port other
+#     than 80 make sure that your server copes with mismatched port 
+#     number in Host: header)
+#      lynx http://localhost:8888
+#8888 = 192.168.76.128:80
+
+# SSH
+#      ssh -p 8889 root at localhost
+#8889 = 192.168.76.128:22
+
+[incomingudp]
+# UDP port forwarding example
+#6000 = 192.168.76.128:6001

================================================================
Index: SOURCES/VMware-server-run_script.patch
diff -u /dev/null SOURCES/VMware-server-run_script.patch:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server-run_script.patch	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,349 @@
+--- vmware-distrib/bin/vmware	2005-03-23 05:54:18.000000000 -0600
++++ vmware-distrib.new/bin/vmware	2005-04-13 09:35:12.000000000 -0500
+@@ -8,162 +8,7 @@
+ # the VMware software is installed. --hpreg
+ #
+ 
+-# BEGINNING_OF_DB_DOT_SH
+-#!/bin/sh
+-
+-#
+-# Manage an installer database
+-#
+-
+-# Add an answer to a database in memory
+-db_answer_add() {
+-  local dbvar="$1" # IN/OUT
+-  local id="$2"    # IN
+-  local value="$3" # IN
+-  local answers
+-  local i
+-
+-  eval "$dbvar"'_answer_'"$id"'="$value"'
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" = "$id" ]; then
+-      return
+-    fi
+-  done
+-  answers="$answers"' '"$id"
+-  eval "$dbvar"'_answers="$answers"'
+-}
+-
+-# Remove an answer from a database in memory
+-db_answer_remove() {
+-  local dbvar="$1" # IN/OUT
+-  local id="$2"    # IN
+-  local new_answers
+-  local answers
+-  local i
+-
+-  eval 'unset '"$dbvar"'_answer_'"$id"
+-
+-  new_answers=''
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" != "$id" ]; then
+-      new_answers="$new_answers"' '"$i"
+-    fi
+-  done
+-  eval "$dbvar"'_answers="$new_answers"'
+-}
+-
+-# Load all answers from a database on stdin to memory (<dbvar>_answer_*
+-# variables)
+-db_load_from_stdin() {
+-  local dbvar="$1" # OUT
+-
+-  eval "$dbvar"'_answers=""'
+-
+-  # read doesn't support -r on FreeBSD 3.x. For this reason, the following line
+-  # is patched to remove the -r in case of FreeBSD tools build. So don't make
+-  # changes to it. -- Jeremy Bar
+-  while read -r action p1 p2; do
+-    if [ "$action" = 'answer' ]; then
+-      db_answer_add "$dbvar" "$p1" "$p2"
+-    elif [ "$action" = 'remove_answer' ]; then
+-      db_answer_remove "$dbvar" "$p1"
+-    fi
+-  done
+-}
+-
+-# Load all answers from a database on disk to memory (<dbvar>_answer_*
+-# variables)
+-db_load() {
+-  local dbvar="$1"  # OUT
+-  local dbfile="$2" # IN
+-
+-  db_load_from_stdin "$dbvar" < "$dbfile"
+-}
+-
+-# Iterate through all answers in a database in memory, calling <func> with
+-# id/value pairs and the remaining arguments to this function
+-db_iterate() {
+-  local dbvar="$1" # IN
+-  local func="$2"  # IN
+-  shift 2
+-  local answers
+-  local i
+-  local value
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    eval 'value="$'"$dbvar"'_answer_'"$i"'"'
+-    "$func" "$i" "$value" "$@"
+-  done
+-}
+-
+-# If it exists in memory, remove an answer from a database (disk and memory)
+-db_remove_answer() {
+-  local dbvar="$1"  # IN/OUT
+-  local dbfile="$2" # IN
+-  local id="$3"     # IN
+-  local answers
+-  local i
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" = "$id" ]; then
+-      echo 'remove_answer '"$id" >> "$dbfile"
+-      db_answer_remove "$dbvar" "$id"
+-      return
+-    fi
+-  done
+-}
+-
+-# Add an answer to a database (disk and memory)
+-db_add_answer() {
+-  local dbvar="$1"  # IN/OUT
+-  local dbfile="$2" # IN
+-  local id="$3"     # IN
+-  local value="$4"  # IN
+-
+-  db_remove_answer "$dbvar" "$dbfile" "$id"
+-  echo 'answer '"$id"' '"$value" >> "$dbfile"
+-  db_answer_add "$dbvar" "$id" "$value"
+-}
+-
+-# Add a file to a database on disk
+-# 'file' is the file to put in the database (it may not exist on the disk)
+-# 'tsfile' is the file to get the timestamp from, '' if no timestamp
+-db_add_file() {
+-  local dbfile="$1" # IN
+-  local file="$2"   # IN
+-  local tsfile="$3" # IN
+-  local date
+-
+-  if [ "$tsfile" = '' ]; then
+-    echo 'file '"$file" >> "$dbfile"
+-  else
+-    date=`date -r "$tsfile" '+%s' 2> /dev/null`
+-    if [ "$date" != '' ]; then
+-      date=' '"$date"
+-    fi
+-    echo 'file '"$file$date" >> "$dbfile"
+-  fi
+-}
+-
+-# Add a directory to a database on disk
+-db_add_dir() {
+-  local dbfile="$1" # IN
+-  local dir="$2"    # IN
+-
+-  echo 'directory '"$dir" >> "$dbfile"
+-}
+-# END_OF_DB_DOT_SH
+-
+-db_load 'vm_db' '/etc/vmware/locations'
++. /etc/vmware/locations
+ 
+ if [ "vmware" = "vmware-console" ]; then
+    vmware_config_name="vmware-config-console"
+--- vmware-distrib/vmware-console-distrib/bin/vmware-console~	2006-03-01 21:07:14.275705656 +0100
++++ vmware-distrib/vmware-console-distrib/bin/vmware-console	2006-03-01 21:08:49.076293776 +0100
+@@ -8,173 +8,18 @@
+ # the VMware software is installed. --hpreg
+ #
+ 
+-# BEGINNING_OF_DB_DOT_SH
+-#!/bin/sh
++. /etc/vmware-console/locations
+ 
+-#
+-# Manage an installer database
+-#
+-
+-# Add an answer to a database in memory
+-db_answer_add() {
+-  local dbvar="$1" # IN/OUT
+-  local id="$2"    # IN
+-  local value="$3" # IN
+-  local answers
+-  local i
+-
+-  eval "$dbvar"'_answer_'"$id"'="$value"'
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" = "$id" ]; then
+-      return
+-    fi
+-  done
+-  answers="$answers"' '"$id"
+-  eval "$dbvar"'_answers="$answers"'
+-}
+-
+-# Remove an answer from a database in memory
+-db_answer_remove() {
+-  local dbvar="$1" # IN/OUT
+-  local id="$2"    # IN
+-  local new_answers
+-  local answers
+-  local i
+-
+-  eval 'unset '"$dbvar"'_answer_'"$id"
+-
+-  new_answers=''
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" != "$id" ]; then
+-      new_answers="$new_answers"' '"$i"
+-    fi
+-  done
+-  eval "$dbvar"'_answers="$new_answers"'
+-}
+-
+-# Load all answers from a database on stdin to memory (<dbvar>_answer_*
+-# variables)
+-db_load_from_stdin() {
+-  local dbvar="$1" # OUT
+-
+-  eval "$dbvar"'_answers=""'
+-
+-  # read doesn't support -r on FreeBSD 3.x. For this reason, the following line
+-  # is patched to remove the -r in case of FreeBSD tools build. So don't make
+-  # changes to it. -- Jeremy Bar
+-  while read -r action p1 p2; do
+-    if [ "$action" = 'answer' ]; then
+-      db_answer_add "$dbvar" "$p1" "$p2"
+-    elif [ "$action" = 'remove_answer' ]; then
+-      db_answer_remove "$dbvar" "$p1"
+-    fi
+-  done
+-}
+-
+-# Load all answers from a database on disk to memory (<dbvar>_answer_*
+-# variables)
+-db_load() {
+-  local dbvar="$1"  # OUT
+-  local dbfile="$2" # IN
+-
+-  db_load_from_stdin "$dbvar" < "$dbfile"
+-}
+-
+-# Iterate through all answers in a database in memory, calling <func> with
+-# id/value pairs and the remaining arguments to this function
+-db_iterate() {
+-  local dbvar="$1" # IN
+-  local func="$2"  # IN
+-  shift 2
+-  local answers
+-  local i
+-  local value
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    eval 'value="$'"$dbvar"'_answer_'"$i"'"'
+-    "$func" "$i" "$value" "$@"
+-  done
+-}
+-
+-# If it exists in memory, remove an answer from a database (disk and memory)
+-db_remove_answer() {
+-  local dbvar="$1"  # IN/OUT
+-  local dbfile="$2" # IN
+-  local id="$3"     # IN
+-  local answers
+-  local i
+-
+-  eval 'answers="$'"$dbvar"'_answers"'
+-  # There is no double quote around $answers on purpose
+-  for i in $answers; do
+-    if [ "$i" = "$id" ]; then
+-      echo 'remove_answer '"$id" >> "$dbfile"
+-      db_answer_remove "$dbvar" "$id"
+-      return
+-    fi
+-  done
+-}
+-
+-# Add an answer to a database (disk and memory)
+-db_add_answer() {
+-  local dbvar="$1"  # IN/OUT
+-  local dbfile="$2" # IN
+-  local id="$3"     # IN
+-  local value="$4"  # IN
+-
+-  db_remove_answer "$dbvar" "$dbfile" "$id"
+-  echo 'answer '"$id"' '"$value" >> "$dbfile"
+-  db_answer_add "$dbvar" "$id" "$value"
+-}
+-
+-# Add a file to a database on disk
+-# 'file' is the file to put in the database (it may not exist on the disk)
+-# 'tsfile' is the file to get the timestamp from, '' if no timestamp
+-db_add_file() {
+-  local dbfile="$1" # IN
+-  local file="$2"   # IN
+-  local tsfile="$3" # IN
+-  local date
+-
+-  if [ "$tsfile" = '' ]; then
+-    echo 'file '"$file" >> "$dbfile"
+-  else
+-    date=`date -r "$tsfile" '+%s' 2> /dev/null`
+-    if [ "$date" != '' ]; then
+-      date=' '"$date"
+-    fi
+-    echo 'file '"$file$date" >> "$dbfile"
+-  fi
+-}
+-
+-# Add a directory to a database on disk
+-db_add_dir() {
+-  local dbfile="$1" # IN
+-  local dir="$2"    # IN
+-
+-  echo 'directory '"$dir" >> "$dbfile"
+-}
+-# END_OF_DB_DOT_SH
+-
+-db_load 'vm_db' '/etc/vmware-console/locations'
+-
+-if [ -e '/etc/vmware-console/not_configured' ]; then
++if [ -e '/etc/vmware-console/not_configured' ]; then
+    echo 'vmware-console is installed, but it has not been (correctly) configured'
+    echo 'for this system. To (re-)configure it, invoke the following command:'
+-   echo "$vm_db_answer_BINDIR"'/vmware-config-console.pl.'
++   echo "$VM_BINDIR"'/vmware-config-console.pl.'
+    echo
+ 
+    exit 1
+ fi
+                                                                        
+-exec "$vm_db_answer_LIBDIR"'/lib/wrapper-gtk24.sh' \
+-     "$vm_db_answer_LIBDIR"'/lib' \
+-     "$vm_db_answer_LIBDIR"'/bin/vmware-console' \
+-     "$vm_db_answer_LIBDIR"'/libconf' "$@"
++exec "$VM_LIBDIR"'/lib/wrapper-gtk24.sh' \
++     "$VM_LIBDIR"'/lib' \
++     "$VM_LIBDIR"'/bin/vmware-console' \
++     "$VM_LIBDIR"'/libconf' "$@"

================================================================
Index: SOURCES/VMware-server-vmnet.conf
diff -u /dev/null SOURCES/VMware-server-vmnet.conf:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server-vmnet.conf	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,18 @@
+#
+# Configuration file for VMware Workstation networking 
+#
+
+# Wanna VMware Workstation networking?
+VM_NETWORKING=yes
+
+# Bridged networking on /dev/vmnet0 - sufficient in most cases
+VNET_0_INTERFACE=eth0
+
+# Host-only networking on /dev/vmnet1 - samba subpackage needed
+#VNET_1_HOSTONLY_HOSTADDR=192.168.23.1
+#VNET_1_HOSTONLY_NETMASK=255.255.255.0
+
+# NAT networking on /dev/vmnet8
+#VNET_8_NAT=yes
+#VNET_8_HOSTONLY_NETMASK=255.255.255.0
+#VNET_8_HOSTONLY_HOSTADDR=192.168.76.2

================================================================
Index: SOURCES/VMware-server.desktop
diff -u /dev/null SOURCES/VMware-server.desktop:1.1
--- /dev/null	Wed Mar  1 22:52:52 2006
+++ SOURCES/VMware-server.desktop	Wed Mar  1 22:52:47 2006
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=VMware Workstation
+Type=Application
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list