summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmware
diff options
context:
space:
mode:
authorJonathan Bauer2014-03-25 15:24:04 +0100
committerJonathan Bauer2014-03-25 15:24:04 +0100
commit3d1235af060955e271be68240c0ca46bc6d81b03 (patch)
treeef02dcc4bb8476cfeef07e2df6a38b4c29d350df /remote/modules/vmware
parent[rootfs-stage32] /var/log/openslx in tmpfiles.d (diff)
downloadtm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.tar.gz
tm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.tar.xz
tm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.zip
[modules] new module naming convention
rename $MODULE.{conf,build} to module.{conf,build}
Diffstat (limited to 'remote/modules/vmware')
-rw-r--r--remote/modules/vmware/module.build65
-rw-r--r--remote/modules/vmware/module.conf24
-rw-r--r--remote/modules/vmware/module.conf.ubuntu136
3 files changed, 225 insertions, 0 deletions
diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build
new file mode 100644
index 00000000..98ee2b8d
--- /dev/null
+++ b/remote/modules/vmware/module.build
@@ -0,0 +1,65 @@
+fetch_source() {
+ [ -e "${MODULE_DIR}/src" -a -d "${MODULE_DIR}/src" ] && \
+ { rm -r "${MODULE_DIR}/src" || perror "Could not delete old src dir."; }
+ mkdir -p "${MODULE_DIR}/src" || perror "Could not mkdir src"
+ cd "${MODULE_DIR}/src" || perror "cd fail."
+
+ # Get directory listing
+ wget -O "index.html" "$REQUIRED_DOWNLOAD_BASE" || perror "Could not download vmware dir index"
+
+ VMWARE_BUNDLE_FILE=$(grep -E -o -i "href=\"VMware-$REQUIRED_TYPE-[^\"]+[\._\-]$ARCHREGEX[\._\-][^\"]+\"" "index.html" | head -n 1 | awk -F '"' '{printf $2}')
+ [ -z "$VMWARE_BUNDLE_FILE" ] && perror "Could not determine vmware $REQUIRED_TYPE bundle file for current arch from $MODULE_DIR/src/index.html"
+ # Download file
+ wget -O "$VMWARE_BUNDLE_FILE" "$REQUIRED_DOWNLOAD_BASE/$VMWARE_BUNDLE_FILE" || perror "Could not download $VMWARE_BUNDLE_FILE from $REQUIRED_DOWNLOAD_BASE"
+ if [[ "$VMWARE_BUNDLE_FILE" == *.tar ]]; then
+ tar -x "${VMWARE_BUNDLE_FILE%.tar}" -f "$VMWARE_BUNDLE_FILE" || perror "Could not untar downloaded $VMWARE_BUNDLE_FILE"
+ unlink "$VMWARE_BUNDLE_FILE"
+ VMWARE_BUNDLE_FILE="${VMWARE_BUNDLE_FILE%.tar}"
+ fi
+
+ cd - >/dev/null
+}
+
+build() {
+ local DELETE_FILES
+ DELETE_FILES=$(for LINE in $REQUIRED_VMWARE_DELETIONS;do echo rm -rf $LINE; done)
+
+ # prepare the build directory with the files needed during the chroot
+ cp "${MODULE_DIR}/src/$VMWARE_BUNDLE_FILE" "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
+ cp -r "${MODULE_DIR}/patches" "${MODULE_BUILD_DIR}"
+
+ # sanity check to see if KERNEL_HEADERS_PATH is set and exists
+ [ -z "${KERNEL_HEADERS_PATH}" -o ! -e "${KERNEL_HEADERS_PATH}" ] && perror "KERNEL_HEADERS_PATH ('"${KERNEL_HEADERS_PATH}"') not found. Was the kernel module built?"
+
+ pinfo "Installing vmware per chroot..."
+ chroot_run "${MODULE_BUILD_DIR}" <<-EOF
+ # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
+ $DELETE_FILES
+ yes | sh /"${VMWARE_BUNDLE_FILE}" --eulas-agreed --console --required
+ vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet
+ vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmmon
+ # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
+ EOF
+
+ # cleanup unneeded files
+ rm -rf -- "${MODULE_BUILD_DIR}/etc/vmware-installer"
+ rm -rf -- "${MODULE_BUILD_DIR}/usr/lib/vmware-installer"
+ rm -rf -- "${MODULE_BUILD_DIR}/usr/lib/vmware-ovftool"
+ unlink "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
+
+}
+
+post_copy() {
+ # FIXME: gconftool is copied without dependencies
+ tarcopy "$(find /usr/lib/ /usr/lib64 -name gconv -type d)" "$TARGET_BUILD_DIR"
+
+ # Update Icon cache for vmplayer
+ gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/hicolor/" || pwarning "update-icon-cache-3.0 failed."
+
+ # fix vmware-usbarbitrator bug
+ date +'%Y.%m.%d' >"${TARGET_BUILD_DIR}/etc/arch-release"
+
+ mkdir -p "$TARGET_BUILD_DIR/lib/modules/vmware/"
+ cp "${MODULE_BUILD_DIR}/lib/modules/$SYS_UTS_RELEASE/vmplayer/"* "$TARGET_BUILD_DIR/lib/modules/vmware/" || perror "Could not cp vmware modules to target!"
+}
+
diff --git a/remote/modules/vmware/module.conf b/remote/modules/vmware/module.conf
new file mode 100644
index 00000000..017d1d5b
--- /dev/null
+++ b/remote/modules/vmware/module.conf
@@ -0,0 +1,24 @@
+REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.1/1379776/linux/core/"
+REQUIRED_TYPE="workstation"
+REQUIRED_MODULES="kernel"
+REQUIRED_DIRECTORIES="
+ /etc/vmware
+ /usr/sbin
+ /usr/lib/vmware/bin
+ /usr/lib/vmware/hostd
+ /usr/lib/vmware/icu
+ /usr/lib/vmware/lib
+ /usr/lib/vmware/libconf
+ /usr/lib/vmware/licenses
+ /usr/lib/vmware/resources
+ /usr/lib/vmware/scripts
+ /usr/lib/vmware/share
+ /usr/lib/vmware/xkeymap
+"
+REQUIRED_FILES="
+ /usr/lib/vmware/config
+ /usr/bin/vmware-usbarbitrator
+"
+REQUIRED_BINARIES="
+ vmnet-netifup
+"
diff --git a/remote/modules/vmware/module.conf.ubuntu b/remote/modules/vmware/module.conf.ubuntu
new file mode 100644
index 00000000..c75ee906
--- /dev/null
+++ b/remote/modules/vmware/module.conf.ubuntu
@@ -0,0 +1,136 @@
+REQUIRED_VMWARE_DELETIONS="
+ /var/lib/vmware
+ /etc/vmware-vix
+ /etc/rc0.d/K08vmware
+ /etc/rc0.d/K06vmware-workstation-server
+ /etc/rc0.d/K06vmamqpd
+ /etc/pam.d/vmware-authd
+ /etc/rc3.d/S19vmware
+ /etc/rc3.d/S55vmware-workstation-server
+ /etc/rc3.d/S25vmamqpd
+ /etc/rc3.d/K08vmware-USBArbitrator
+ /etc/rc3.d/S50vmware-USBArbitrator
+ /etc/rc5.d/K08vmware-USBArbitrator
+ /etc/rc5.d/S50vmware-USBArbitrator
+ /etc/rc2.d/S19vmware
+ /etc/rc2.d/S55vmware-workstation-server
+ /etc/rc2.d/S25vmamqpd
+ /etc/rc2.d/K08vmware-USBArbitrator
+ /etc/rc2.d/S50vmware-USBArbitrator
+ /etc/xdg/menus/applications-merged
+ /etc/rc6.d/K08vmware
+ /etc/rc6.d/K06vmware-workstation-server
+ /etc/rc6.d/K06vmamqpd
+ /etc/rc4.d/S19vmware
+ /etc/rc4.d/S55vmware-workstation-server
+ /etc/rc4.d/S25vmamqpd
+ /etc/init.d/vmamqpd
+ /etc/init.d/vmware-USBArbitrator
+ /etc/init.d/vmware-workstation-server
+ /etc/init.d/vmware
+ /etc/thnuclnt
+ /etc/vmware-installer
+ /etc/cups/thnuclnt.convs
+ /etc/cups/thnuclnt.types
+ /etc/vmware/netmap.conf
+ /etc/vmware/icu
+ /etc/vmware/hostd
+ /etc/vmware/installer.sh
+ /etc/vmware/bootstrap
+ /etc/vmware/ssl
+ /etc/vmware/config
+ /etc/vmware/locations
+ /etc/modprobe.d/vmware-fuse.conf
+ /lib/modules/3.11.0-13-generic/misc/vmnet.ko
+ /lib/modules/3.11.0-13-generic/misc/vmmon.ko
+ /usr/share/mime/packages/vmware-player.xml
+ /usr/share/applications/vmware-workstation.desktop
+ /usr/share/applications/vmware-player.desktop
+ /usr/share/applications/vmware-netcfg.desktop
+ /usr/share/desktop-directories/vmware-ace-vms.directory
+ /usr/share/man/man1/vmware.1.gz
+ /usr/share/doc/vmware-vix
+ /usr/share/doc/vmware-workstation
+ /usr/share/doc/vmware-player
+ /usr/share/icons/hicolor/32x32/mimetypes/application-certificate.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/32x32/apps/vmware-player.png
+ /usr/share/icons/hicolor/32x32/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vmfoundry.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vmdisk.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-snapshot.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/48x48/apps/vmware-player.png
+ /usr/share/icons/hicolor/48x48/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-easter-egg.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-team.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm-clone.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-snapshot.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm-legacy.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vmfoundry.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-certificate.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm.svg
+ /usr/share/icons/hicolor/scalable/apps/vmware-workstation.svg
+ /usr/share/icons/hicolor/16x16/mimetypes/application-certificate.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-player.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-netcfg.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/24x24/mimetypes
+ /usr/share/icons/hicolor/24x24/apps/vmware-player.png
+ /usr/share/icons/hicolor/24x24/apps/vmware-netcfg.png
+ /usr/share/icons/hicolor/24x24/apps/vmware-workstation.png
+ /usr/bin/vmnet-dhcpd
+ /usr/bin/vmware-unity-helper
+ /usr/bin/ovftool
+ /usr/bin/vmrun
+ /usr/bin/vmware-vim-cmd
+ /usr/bin/vmware-wssc-adminTool
+ /usr/bin/vmnet-bridge
+ /usr/bin/vmplayer
+ /usr/bin/vmnet-sniffer
+ /usr/bin/vmss2core
+ /usr/bin/vmware-usbarbitrator
+ /usr/bin/vmware-netcfg
+ /usr/bin/vmware-modconfig
+ /usr/bin/vmware-tray
+ /usr/bin/vmware-mount
+ /usr/bin/vm-support
+ /usr/bin/vmware-vdiskmanager
+ /usr/bin/vmware-license-enter.sh
+ /usr/bin/vmware-license-check.sh
+ /usr/bin/vmnet-natd
+ /usr/bin/vmware-uninstall
+ /usr/bin/vmware-vprobe
+ /usr/bin/vmware-fuseUI
+ /usr/bin/vmware-installer
+ /usr/bin/vmware-ping
+ /usr/bin/vmware-gksu
+ /usr/bin/vmnet-netifup
+ /usr/bin/vmware-networks
+ /usr/bin/vmware
+ /usr/bin/vmware-hostd
+ /usr/include/vmware-vix
+ /usr/lib/vmware-vix
+ /usr/lib/vmware-ovftool
+ /usr/lib/vmware-installer
+ /usr/lib/libvixAllProducts.so
+ /usr/lib/cups/filter/thnucups
+ /usr/lib/diskLibWrapper.so
+ /usr/lib/vmware
+ /usr/local/share/applications
+ /usr/sbin/vmware-authdlauncher
+ /usr/sbin/vmware-authd
+"