diff options
| author | Simon Rettberg | 2013-05-08 19:51:17 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2013-05-08 19:51:17 +0200 |
| commit | 16469322a4636dbd7042b1410e132aba6edde629 (patch) | |
| tree | 95468ef8e4ee23b92b1db6d1574ceb260967f476 | |
| parent | Merge branch 'master' of simonslx:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-16469322a4636dbd7042b1410e132aba6edde629.tar.gz tm-scripts-16469322a4636dbd7042b1410e132aba6edde629.tar.xz tm-scripts-16469322a4636dbd7042b1410e132aba6edde629.zip | |
Add vmplayer module that extracts from bundle
15 files changed, 242 insertions, 10 deletions
diff --git a/remote/modules/vmplayer/data/etc/vmware/bootstrap b/remote/modules/vmplayer/data/etc/vmware/bootstrap new file mode 100644 index 00000000..9417c7fe --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/bootstrap @@ -0,0 +1,11 @@ +PREFIX="/usr" +BINDIR="/usr/bin" +SBINDIR="/usr/sbin" +LIBDIR="/usr/lib" +DATADIR="/usr/share" +SYSCONFDIR="/etc" +DOCDIR="/usr/share/doc" +MANDIR="/usr/share/man" +INCLUDEDIR="/usr/include" +INITDIR="/etc/init.d" +INITSCRIPTDIR="/etc/init.d" diff --git a/remote/modules/vmplayer/data/etc/vmware/config b/remote/modules/vmplayer/data/etc/vmware/config new file mode 100644 index 00000000..5a62a179 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/config @@ -0,0 +1,19 @@ +.encoding = "UTF-8" +NETWORKING = "yes" +VMBLOCK_CONFED = "no" +gksu.rootMethod = "su" +libdir = "/usr/lib/vmware" +VMCI_CONFED = "no" +VSOCK_CONFED = "no" +initscriptdir = "/etc/init.d" +authd.fullpath = "/usr/sbin/vmware-authd" +bindir = "/usr/bin" +installerDefaults.componentDownloadEnabled = "yes" +installerDefaults.autoSoftwareUpdateEnabled.epoch = "4837526839" +vix.config.version = "1" +player.product.version = "5.0.2" +installerDefaults.dataCollectionEnabled.epoch = "9979927113" +installerDefaults.dataCollectionEnabled = "no" +installerDefaults.transferVersion = "1" +installerDefaults.autoSoftwareUpdateEnabled = "no" +product.buildNumber = "1031769" diff --git a/remote/modules/vmplayer/data/etc/vmware/icu b/remote/modules/vmplayer/data/etc/vmware/icu new file mode 120000 index 00000000..d1ebea7d --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/icu @@ -0,0 +1 @@ +/usr/lib/vmware/icu
\ No newline at end of file diff --git a/remote/modules/vmplayer/data/etc/vmware/installer.sh b/remote/modules/vmplayer/data/etc/vmware/installer.sh new file mode 120000 index 00000000..f178b8cc --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/installer.sh @@ -0,0 +1 @@ +/usr/lib/vmware-installer/2.1.0/vmware-uninstall-downgrade
\ No newline at end of file diff --git a/remote/modules/vmplayer/data/etc/vmware/networking b/remote/modules/vmplayer/data/etc/vmware/networking new file mode 100644 index 00000000..d2ea7361 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/networking @@ -0,0 +1,12 @@ +VERSION=1,0 +answer VNET_1_DHCP yes +answer VNET_1_DHCP_CFG_HASH ABD785E9C7BA236946CF10ED6B15A580E522B13D +answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 +answer VNET_1_HOSTONLY_SUBNET 172.16.110.0 +answer VNET_1_VIRTUAL_ADAPTER yes +answer VNET_8_DHCP yes +answer VNET_8_DHCP_CFG_HASH 5E30544D23705A65173565BC8D6C51008A0F9AF2 +answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 +answer VNET_8_HOSTONLY_SUBNET 192.168.167.0 +answer VNET_8_NAT yes +answer VNET_8_VIRTUAL_ADAPTER yes diff --git a/remote/modules/vmplayer/data/etc/vmware/usbarb.rules b/remote/modules/vmplayer/data/etc/vmware/usbarb.rules new file mode 100644 index 00000000..c3198bb4 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/usbarb.rules @@ -0,0 +1,4 @@ +{ + "version": 1, + "rules": [] +}
\ No newline at end of file diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.conf b/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.conf new file mode 100644 index 00000000..6aeb3f1e --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.conf @@ -0,0 +1,40 @@ +# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet1. +# +# This file was automatically generated by the VMware configuration program. +# See Instructions below if you want to modify it. +# +# We set domain-name-servers to make some DHCP clients happy +# (dhclient as configured in SuSE, TurboLinux, etc.). +# We also supply a domain name to make pump (Red Hat 6.x) happy. +# + + +###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" ##### +# Modification Instructions: This section of the configuration file contains +# information generated by the configuration program. Do not modify this +# section. +# You are free to modify everything else. Also, this section must start +# on a new line +# This file will get backed up with a different name in the same directory +# if this section is edited and you try to configure DHCP again. + +# Written at: 05/06/2013 17:43:41 +allow unknown-clients; +default-lease-time 1800; # default is 30 minutes +max-lease-time 7200; # default is 2 hours + +subnet 172.16.110.0 netmask 255.255.255.0 { + range 172.16.110.128 172.16.110.254; + option broadcast-address 172.16.110.255; + option domain-name-servers 172.16.110.1; + option domain-name localdomain; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours +} +host vmnet1 { + hardware ethernet 00:50:56:C0:00:01; + fixed-address 172.16.110.1; + option domain-name-servers 0.0.0.0; + option domain-name ""; +} +####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.leases b/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.leases new file mode 100644 index 00000000..512c0de2 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet1/dhcpd/dhcpd.leases @@ -0,0 +1,7 @@ +# All times in this file are in UTC (GMT), not your local timezone. This is +# not a bug, so please don't ask about it. There is no portable way to +# store leases in the local timezone, so please don't request this as a +# feature. If this is inconvenient or confusing to you, we sincerely +# apologize. Seriously, though - don't ask. +# The format of this file is documented in the dhcpd.leases(5) manual page. + diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.conf b/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.conf new file mode 100644 index 00000000..9f27b6f0 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.conf @@ -0,0 +1,43 @@ +# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8. +# +# This file was automatically generated by the VMware configuration program. +# See Instructions below if you want to modify it. +# +# We set domain-name-servers to make some DHCP clients happy +# (dhclient as configured in SuSE, TurboLinux, etc.). +# We also supply a domain name to make pump (Red Hat 6.x) happy. +# + + +###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" ##### +# Modification Instructions: This section of the configuration file contains +# information generated by the configuration program. Do not modify this +# section. +# You are free to modify everything else. Also, this section must start +# on a new line +# This file will get backed up with a different name in the same directory +# if this section is edited and you try to configure DHCP again. + +# Written at: 05/06/2013 17:43:41 +allow unknown-clients; +default-lease-time 1800; # default is 30 minutes +max-lease-time 7200; # default is 2 hours + +subnet 192.168.167.0 netmask 255.255.255.0 { + range 192.168.167.128 192.168.167.254; + option broadcast-address 192.168.167.255; + option domain-name-servers 192.168.167.2; + option domain-name localdomain; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours + option netbios-name-servers 192.168.167.2; + option routers 192.168.167.2; +} +host vmnet8 { + hardware ethernet 00:50:56:C0:00:08; + fixed-address 192.168.167.1; + option domain-name-servers 0.0.0.0; + option domain-name ""; + option routers 0.0.0.0; +} +####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.leases b/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.leases new file mode 100644 index 00000000..512c0de2 --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet8/dhcpd/dhcpd.leases @@ -0,0 +1,7 @@ +# All times in this file are in UTC (GMT), not your local timezone. This is +# not a bug, so please don't ask about it. There is no portable way to +# store leases in the local timezone, so please don't request this as a +# feature. If this is inconvenient or confusing to you, we sincerely +# apologize. Seriously, though - don't ask. +# The format of this file is documented in the dhcpd.leases(5) manual page. + diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat.mac b/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat.mac new file mode 100644 index 00000000..337d094a --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat.mac @@ -0,0 +1 @@ +00:50:56:E9:43:27 diff --git a/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat/nat.conf b/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat/nat.conf new file mode 100644 index 00000000..791f9a7e --- /dev/null +++ b/remote/modules/vmplayer/data/etc/vmware/vmnet8/nat/nat.conf @@ -0,0 +1,60 @@ +# VMware NAT configuration file + +[host] + +# NAT gateway address +ip = 192.168.167.2 +netmask = 255.255.255.0 + +# 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 on if you change the OUI +# in the MAC address of your virtual machines. +allowAnyOUI = 1 + +# Controls if (TCP) connections should be reset when the adapter they are +# bound to goes down +resetConnectionOnLinkDown = 1 + +# Controls if (TCP) connection should be reset when guest packet's destination +# is NAT's IP address +resetConnectionOnDestLocalHost = 1 + +[tcp] + +# Value of timeout in TCP TIME_WAIT state, in seconds +timeWaitTimeout = 30 + +[udp] + +# Timeout in seconds. Dynamically-created UDP mappings will purged if +# idle for this duration of time 0 = no timeout, default = 60; real +# value might be up to 100% longer +timeout = 60 + +[netbios] +# Timeout for NBNS queries. +nbnsTimeout = 2 + +# Number of retries for each NBNS query. +nbnsRetries = 3 + +# Timeout for NBDS queries. +nbdsTimeout = 3 + +[incomingtcp] + +# Use these with care - anyone can enter into your VM through these... +# The format and example are as follows: +#<external port number> = <VM's IP address>:<VM's port number> +#8080 = 172.16.3.128:80 + +[incomingudp] + +# UDP port forwarding example +#6000 = 172.16.3.0:6001 + diff --git a/remote/modules/vmplayer/vmplayer.build b/remote/modules/vmplayer/vmplayer.build index f2400380..eb6fc8e5 100644 --- a/remote/modules/vmplayer/vmplayer.build +++ b/remote/modules/vmplayer/vmplayer.build @@ -1,22 +1,48 @@ fetch_source() { - : + ARCH=$(uname -m) + [ "$ARCH" = "i686" ] && ARCH=i386 + local BUNDLE="$(find /mnt/store/vmware -type f -name "VMware-Player*.${ARCH}.bundle" | head -1)" + [ -z "$BUNDLE" ] && perror "Could not find vmplayer at /mnt/store for ARCH = $ARCH" + [ -e "./src" ] && { rm -r ./src || perror "Could not delete old src dir."; } + pinfo "Extracting bundle" + $BUNDLE -x ./src/ || perror "Extracting the vmplayer bundle failed." + pinfo "done" } build() { - mkdir -p "$MODULE_BUILD_DIR/lib/modules/vmware" - mkdir -p "$MODULE_BUILD_DIR/bin" - cp "/usr/lib/vmware/bin/vmplayer" "$MODULE_BUILD_DIR/bin/vmplayer-bin" || perror "Could not copy vmplayer binary from /usr/lib/vmware/bin/vmplayer to build dir." - cd "/usr/lib/vmware/modules/source" || perror "vmplayer modules source not found. install vmplayer." + [ ! -d "./src/vmware-player" ] && perror "Extracted vmplayer bundle not found in ./src - please clean vmplayer module." + local TARGET="$MODULE_BUILD_DIR/usr/lib/vmware/" + mkdir -p "$TARGET"{lib,share,bin} + pinfo "Copying data to build dir" + cp -r ./src/vmware-installer/lib/lib* "$TARGET" || perror "Could not copy libs from vmware-installer" + cp -r ./src/vmware-network-editor/lib "$MODULE_BUILD_DIR/usr/" || perror "Could not copy libs from vmware-network-config" + cp -r ./src/vmware-player/lib/share "$TARGET" || perror "Could not copy lib/share from vmware-player" + cp -r ./src/vmware-player/share "$MODULE_BUILD_DIR/usr/" || perror "C0oudld not copy share from vmware-player" + cp -r ./src/vmware-player-app/etc "$MODULE_BUILD_DIR/" || perror "Could not copy bin and etc from vmware-player-app." + cp -r ./src/vmware-player-app/lib/* "$TARGET" || perror "Could not copy lib subtree from vmware-player-app." + cp -r ./src/vmware-player-app/{bin,share} "$MODULE_BUILD_DIR/usr/" || perror "could not copy share from vmware-player-app." + cp -r ./src/vmware-usbarbitrator/bin "$MODULE_BUILD_DIR/usr/" || perror "Could not copy bin from vmware-usbarbitrator." + cp -r ./src/vmware-vmx/{bin,etc,sbin} "$MODULE_BUILD_DIR/usr/" || perror "could not copy bin,etc,sbin to usr for vmare-vmx." + cp -r ./src/vmware-vmx/lib/{bin,icu,lib,libconf,scripts} "$TARGET" || perror "Could not copy many things from vmware-vmx." + ln -s /usr/lib/vmware/bin/appLoader "$TARGET/bin/vmplayer" || perror "Could not link vmplayer to appLoader." + chmod +x "$TARGET"/bin/* + chmod +x "$MODULE_BUILD_DIR"/bin/* + chmod +x "$MODULE_BUILD_DIR"/sbin/* + # Compile kernel modules + return 0 # TODO: Fix kompalieren + pinfo "Compiling required kernel modules." + cd "./src/vmware-vmx/lib/modules/source" || perror "vmplayer modules source not found." local tarball for tarball in *.tar; do pinfo "Building $tarball...." tar xf "$tarball" || perror "Could not untar $tarball" cd "${tarball/.tar}-only" || perror "Could not cd to extracted $tarball (tried ${tarball/.tar}-only)" - make LINUXINCLUDE="$MODULE_DIR/../kernel/ksrc/usr/include" || perror "Could not build kernel module $tarball" + make LINUXINCLUDE="${TARGET_DIR}/kernel/build/headers/include" || perror "Could not build kernel module $tarball" cp "${tarball/.tar}.ko" "$MODULE_BUILD_DIR/lib/modules/vmware/" || perror "Could not copy ${tarball/.tar}.ko to $MODULE_BUILD_DIR/lib/modules/vmware/" cd - done cd - + tarcopy "/usr/lib/gconv $(which gconftool-2)" "$MODULE_BUILD_DIR" } post_copy() { diff --git a/remote/modules/vmplayer/vmplayer.conf b/remote/modules/vmplayer/vmplayer.conf index b7582397..65fda83d 100644 --- a/remote/modules/vmplayer/vmplayer.conf +++ b/remote/modules/vmplayer/vmplayer.conf @@ -1,3 +1,3 @@ -REQUIRED_BINARIES="vmplayer-bin" +REQUIRED_BINARIES="" REQUIRED_SYSTEM_FILES="" -REQUIRED_DIRECTORIES="/lib" +REQUIRED_DIRECTORIES="/bin /etc /lib /usr" diff --git a/remote/setup_target b/remote/setup_target index 924450fd..f5e5f9e7 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -213,11 +213,11 @@ process_module() { install_dependencies pinfo "## Fetching source" [ -e "${MODULE_DIR}/.fetched_source" ] || { fetch_source && touch "${MODULE_DIR}/.fetched_source"; } - if [ -e "${MODULE_DIR}/.built" -a -d "${MODULE_DIR}/build" ]; then + if [ -e "${MODULE_DIR}/.built" -a -d "${MODULE_BUILD_DIR}" ]; then pinfo "# built-flag is set, skipping build..." else pinfo "## Building" - mkdir -p "${MODULE_DIR}/build" || perror "Could not create build dir" + mkdir -p "${MODULE_BUILD_DIR}" || perror "Could not create build dir" build # calls perror if something fails, no need to do that here touch "${MODULE_DIR}/.built" || pwarning "Error setting built-flag" fi |
