From 287ab7dd09047fef562bce3e548dd548a3b3a3f7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 12 Oct 2015 11:29:11 +0200 Subject: [vmware] Bump version to player 12.0.0 --- .../includes/create_vmhome_preferences_file.inc | 19 +++- .../openslx/vmchooser/vmware/includes/logging.inc | 2 +- .../includes/set_vmware_include_variables.inc | 8 +- remote/modules/vmware/module.build | 30 +++-- remote/modules/vmware/module.conf | 2 +- .../patches/vmblock__3.11-9.9__1.0-100.0.patch | 123 --------------------- .../patches/vmblock__3.11-9.9__1.0-11.0.patch | 123 +++++++++++++++++++++ 7 files changed, 160 insertions(+), 147 deletions(-) delete mode 100644 remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-100.0.patch create mode 100644 remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-11.0.patch diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/create_vmhome_preferences_file.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/create_vmhome_preferences_file.inc index 9e156951..64d525a1 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/create_vmhome_preferences_file.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/create_vmhome_preferences_file.inc @@ -3,16 +3,20 @@ create_vmhome_preferences_file() { .encoding = "UTF-8" # This configuration file was generated by $0 - # updates/tips + # updates webUpdate.enabled = "FALSE" webUpdate.lastCheck.status = "done_updates" - webUpdate.checkPeriod = "manual" - pref.downloadPermission = "deny" - pref.vmplayer.downloadPermission = "deny" + webUpdate.checkPeriod = "never" + pref.downloadPermission = "DENY" + pref.vmplayer.downloadPermission = "DENY" pref.vmplayer.webUpdateOnStartup = "FALSE" + pref.autoSoftwareUpdatePermission = "DENY" + pref.lastUpdateCheckSec = "$(date +%s)" + # hints pref.tip.startup = "FALSE" hints.hideAll = "TRUE" hint.vmui.showAllUSBDevs = "FALSE" + hint.usb.disconnectHostdriver = "FALSE" # configs prefvmx.defaultVMPath = "$vmhome" @@ -39,16 +43,19 @@ create_vmhome_preferences_file() { pref.autoFitGuestToWindow = "TRUE" pref.vmplayer.exit.vmAction = "poweroff" pref.vmplayer.confirmOnExit = "TRUE" + pref.backgroundOnClose = "FALSE" + pref.trayicon.enabled = "FALSE" # shared folders pref.enableAllSharedFolders = "TRUE" # eula + pref.vmplayer.firstRunDismissedVersion = "$vmware_version" pref.eula.count = "2" pref.eula0.product = "VMware Player" - pref.eula0.build = "$vmbuild" + pref.eula0.build = "$vmware_build" pref.eula1.product = "VMware Workstation" - pref.eula1.build = "$vmbuild" + pref.eula1.build = "$vmware_build" HEREEND writelog "Vmware preferences file created in vmhome." } diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/logging.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/logging.inc index 62b1c691..9d113479 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/logging.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/logging.inc @@ -4,7 +4,7 @@ logging() { # log script information - writelog "# File created by $0 (VMversion ${vmversion})\n# on $(date)\n" + writelog "# File created by $0 (VMware version ${vmware_version})\n# on $(date)\n" ## Edited for persistent mode. writelog "Starting with ${diskmode} mode ...\n" ## diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/set_vmware_include_variables.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/set_vmware_include_variables.inc index 78f8c634..5a5d1132 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/set_vmware_include_variables.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/set_vmware_include_variables.inc @@ -17,10 +17,10 @@ set_vmware_include_variables() { fi # temporary disk space for logs, etc... - redodir=/tmp/virt/vmware/${USER}.$$ + redodir="/tmp/virt/vmware/${USER}.$$" # dir for configs and vmem file - confdir=/tmp/virt/vmware/${USER}.$$ + confdir="/tmp/virt/vmware/${USER}.$$" # configfile conffile="${confdir}/run-vmware.conf" @@ -29,13 +29,11 @@ set_vmware_include_variables() { diskfile="${vmpath}" # users vmware config folder - [ -z "${HOME}" ] && HOME=$(getent passwd "$(/usr/bin/whoami)" | awk -F ':' '{print $6}') + [ -z "${HOME}" ] && HOME=$(getent passwd "$(whoami)" | awk -F ':' '{print $6}') vmhome="${HOME}/.vmware" # get several version infos for vmware/player source /opt/openslx/vmchooser/vmware/vmware.conf - vmbuild=$buildversion - vmversion=$version # VMware start options # "-X": start in fullscreen diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build index e7c9a2e2..71df1432 100644 --- a/remote/modules/vmware/module.build +++ b/remote/modules/vmware/module.build @@ -21,8 +21,15 @@ fetch_source() { } build() { - local DELETE_FILES - DELETE_FILES=$(for LINE in $REQUIRED_VMWARE_DELETIONS;do echo rm -rf $LINE; done) + local DELETE_FILES=$(for LINE in $REQUIRED_VMWARE_DELETIONS;do echo "rm -rf -- $LINE"; done) + + local OFFICIAL_VERSION=$(echo "$VMWARE_BUNDLE_FILE" | cut -f 3 -d '-') + local BUILD_VERSION=$(echo "$VMWARE_BUNDLE_FILE" | cut -f 4 -d '-') + BUILD_VERSION=${BUILD_VERSION%%.*} + [ -z "$OFFICIAL_VERSION" ] && perror "Could not determine vmware version from downloaded file (expected eg. 12.0.0)" + if [ -z "$BUILD_VERSION" ] || [ "$BUILD_VERSION" -lt 10000 ]; then + perror "Could not determine vmware build number from downloaded file" + fi # prepare the build directory with the files needed during the chroot cp "${MODULE_DIR}/src/$VMWARE_BUNDLE_FILE" "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE" @@ -53,7 +60,12 @@ build() { pinfo "*NOT* applying $PATCH (min=$MIN_KERN max=$MAX_KERN cmp=$TARGET_KERNEL_SHORT)" continue # Not suitable for our kernel fi - pinfo "Applying $PATCH (min=$MIN_KERN max=$MAX_KERN cmp=$TARGET_KERNEL_SHORT)" + if version_lt "$OFFICIAL_VERSION" "$MIN_VMWARE" || version_gt "$OFFICIAL_VERSION" "$MAX_VMWARE"; then + pinfo "*NOT* applying $PATCH (min=$MIN_VMWARE max=$MAX_VMWARE cmp=$OFFICIAL_VERSION)" + continue # Not suitable for our kernel + fi + pinfo "Kernel: Applying $PATCH (min=$MIN_KERN max=$MAX_KERN cmp=$TARGET_KERNEL_SHORT)" + pinfo "VMware: Applying $PATCH (min=$MIN_VMWARE max=$MAX_VMWARE cmp=$OFFICIAL_VERSION)" [ ! -d "${SHORT}-only" ] && tar xf "$KMOD" [ ! -d "${SHORT}-only" ] && perror "untar of $KMOD failed." cd "${SHORT}-only" || perror "Where is ${SHORT}-only?" @@ -75,7 +87,7 @@ build() { # now build modules inside the chroot chroot_run "${MODULE_BUILD_DIR}" <<-EOF vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" vmnet $(which gcc) "${KERNEL_HEADERS_DIR}/include" vmplayer vmnet - vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" vmmon $(which gcc) "${KERNEL_HEADERS_DIR}/include" vmplayer vmmon + vmware-modconfig --console --build-mod -k "${TARGET_KERNEL_LONG}" vmmon $(which gcc) "${KERNEL_HEADERS_DIR}/include" vmplayer vmmon EOF # cleanup unneeded files @@ -88,9 +100,6 @@ build() { # This file was formerly stored in data/opt/openslx/vmchooser/vmware/vmware.conf. mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/vmchooser/vmware/" || perror "could not mkdir "${MODULE_BUILD_DIR}/opt/openslx/vmchooser/vmware/"." - - OFFICIALVERSION=$(echo "$VMWARE_BUNDLE_FILE" | cut -f 3 -d '-') - BUILD_VERSION=$(echo "$VMWARE_BUNDLE_FILE" | cut -f 4 -d '-') cat > "${MODULE_BUILD_DIR}/opt/openslx/vmchooser/vmware/vmware.conf" <<-EOF # configuration file written by vmware/module.build @@ -98,9 +107,9 @@ build() { vmnet1=192.168.101.1/24 vmnet1nat=true vmnet8=192.168.102.1/24 - version=$OFFICIALVERSION - buildversion=${BUILD_VERSION%%.*} - maxhardwareversion=${OFFICIALVERSION%%.*} + vmware_version=$OFFICIAL_VERSION + vmware_build=${BUILD_VERSION} + maxhardwareversion=${OFFICIAL_VERSION%%.*} EOF } @@ -129,7 +138,6 @@ parse_patch_name() { [[ "$MAX_KERN" == /* ]] && MAX_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)__[^_]+\.patch$/\1/g') [[ "$MIN_KERN" == /* ]] && MIN_KERN= [[ "$MAX_KERN" == /* ]] && MAX_KERN= - # TODO: Parse min and max vmplayer/workstation version # vmware restriction MIN_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__([0-9\.]+)-[^_]+\.patch$/\1/g') [[ "$MIN_VMWARE" == /* ]] && MIN_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__([0-9\.]+)\.patch$/\1/g') diff --git a/remote/modules/vmware/module.conf b/remote/modules/vmware/module.conf index f1398864..abbb9f3a 100644 --- a/remote/modules/vmware/module.conf +++ b/remote/modules/vmware/module.conf @@ -1,4 +1,4 @@ -REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.3/1895310/linux/core/" +REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.0.0/2985596/linux/core/" REQUIRED_TYPE="workstation" REQUIRED_MODULES="kernel" REQUIRED_DIRECTORIES=" diff --git a/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-100.0.patch b/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-100.0.patch deleted file mode 100644 index dedb2646..00000000 --- a/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-100.0.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- a/linux/control.c 2013-10-18 19:56:11.000000000 +0200 -+++ b/linux/control.c 2014-02-14 16:20:18.667236035 +0100 -@@ -208,17 +208,18 @@ - VMBlockSetProcEntryOwner(controlProcMountpoint); - - /* Create /proc/fs/vmblock/dev */ -- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, -+ /* controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, - VMBLOCK_CONTROL_MODE, -- controlProcDirEntry); -- if (!controlProcEntry) { -+ controlProcDirEntry);*/ -+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps); -+ if (controlProcEntry == NULL) { - Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n"); - remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry); - remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL); - return -EINVAL; - } - -- controlProcEntry->proc_fops = &ControlFileOps; -+ /*controlProcEntry->proc_fops = &ControlFileOps;*/ - return 0; - } - -@@ -293,7 +294,7 @@ - - retval = i < 0 ? -EINVAL : blockOp(name, blocker); - -- putname(name); -+ __putname(name); - - return retval; - } ---- a/linux/file.c 2013-10-18 19:56:11.000000000 +0200 -+++ b/linux/file.c 2014-02-14 16:20:21.455236098 +0100 -@@ -38,46 +38,6 @@ - typedef ino_t inode_num_t; - #endif - --/* Specifically for our filldir_t callback */ --typedef struct FilldirInfo { -- filldir_t filldir; -- void *dirent; --} FilldirInfo; -- -- --/* -- *---------------------------------------------------------------------------- -- * -- * Filldir -- -- * -- * Callback function for readdir that we use in place of the one provided. -- * This allows us to specify that each dentry is a symlink, but pass through -- * everything else to the original filldir function. -- * -- * Results: -- * Original filldir's return value. -- * -- * Side effects: -- * Directory information gets copied to user's buffer. -- * -- *---------------------------------------------------------------------------- -- */ -- --static int --Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir -- const char *name, // IN: Dirent name -- int namelen, // IN: len of dirent's name -- loff_t offset, // IN: Offset -- inode_num_t ino, // IN: Inode number of dirent -- unsigned int d_type) // IN: Type of file --{ -- FilldirInfo *info = buf; -- -- /* Specify DT_LNK regardless */ -- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK); --} -- -- - /* File operations */ - - /* -@@ -166,11 +126,10 @@ - - static int - FileOpReaddir(struct file *file, // IN -- void *dirent, // IN -- filldir_t filldir) // IN -+ struct dir_context *ctx) // IN - { - int ret; -- FilldirInfo info; -+ - struct file *actualFile; - - if (!file) { -@@ -184,12 +143,10 @@ - return -EINVAL; - } - -- info.filldir = filldir; -- info.dirent = dirent; -- -- actualFile->f_pos = file->f_pos; -- ret = vfs_readdir(actualFile, Filldir, &info); -- file->f_pos = actualFile->f_pos; -+ /* Ricky Wong Yung Fei: -+ * Manipulation of pos is now handled internally by iterate_dir(). -+ */ -+ ret = iterate_dir(actualFile, ctx); - - return ret; - } -@@ -237,7 +194,7 @@ - - - struct file_operations RootFileOps = { -- .readdir = FileOpReaddir, -+ .iterate = FileOpReaddir, - .open = FileOpOpen, - .release = FileOpRelease, - }; diff --git a/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-11.0.patch b/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-11.0.patch new file mode 100644 index 00000000..dedb2646 --- /dev/null +++ b/remote/modules/vmware/patches/vmblock__3.11-9.9__1.0-11.0.patch @@ -0,0 +1,123 @@ +--- a/linux/control.c 2013-10-18 19:56:11.000000000 +0200 ++++ b/linux/control.c 2014-02-14 16:20:18.667236035 +0100 +@@ -208,17 +208,18 @@ + VMBlockSetProcEntryOwner(controlProcMountpoint); + + /* Create /proc/fs/vmblock/dev */ +- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, ++ /* controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, + VMBLOCK_CONTROL_MODE, +- controlProcDirEntry); +- if (!controlProcEntry) { ++ controlProcDirEntry);*/ ++ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps); ++ if (controlProcEntry == NULL) { + Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n"); + remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry); + remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL); + return -EINVAL; + } + +- controlProcEntry->proc_fops = &ControlFileOps; ++ /*controlProcEntry->proc_fops = &ControlFileOps;*/ + return 0; + } + +@@ -293,7 +294,7 @@ + + retval = i < 0 ? -EINVAL : blockOp(name, blocker); + +- putname(name); ++ __putname(name); + + return retval; + } +--- a/linux/file.c 2013-10-18 19:56:11.000000000 +0200 ++++ b/linux/file.c 2014-02-14 16:20:21.455236098 +0100 +@@ -38,46 +38,6 @@ + typedef ino_t inode_num_t; + #endif + +-/* Specifically for our filldir_t callback */ +-typedef struct FilldirInfo { +- filldir_t filldir; +- void *dirent; +-} FilldirInfo; +- +- +-/* +- *---------------------------------------------------------------------------- +- * +- * Filldir -- +- * +- * Callback function for readdir that we use in place of the one provided. +- * This allows us to specify that each dentry is a symlink, but pass through +- * everything else to the original filldir function. +- * +- * Results: +- * Original filldir's return value. +- * +- * Side effects: +- * Directory information gets copied to user's buffer. +- * +- *---------------------------------------------------------------------------- +- */ +- +-static int +-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir +- const char *name, // IN: Dirent name +- int namelen, // IN: len of dirent's name +- loff_t offset, // IN: Offset +- inode_num_t ino, // IN: Inode number of dirent +- unsigned int d_type) // IN: Type of file +-{ +- FilldirInfo *info = buf; +- +- /* Specify DT_LNK regardless */ +- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK); +-} +- +- + /* File operations */ + + /* +@@ -166,11 +126,10 @@ + + static int + FileOpReaddir(struct file *file, // IN +- void *dirent, // IN +- filldir_t filldir) // IN ++ struct dir_context *ctx) // IN + { + int ret; +- FilldirInfo info; ++ + struct file *actualFile; + + if (!file) { +@@ -184,12 +143,10 @@ + return -EINVAL; + } + +- info.filldir = filldir; +- info.dirent = dirent; +- +- actualFile->f_pos = file->f_pos; +- ret = vfs_readdir(actualFile, Filldir, &info); +- file->f_pos = actualFile->f_pos; ++ /* Ricky Wong Yung Fei: ++ * Manipulation of pos is now handled internally by iterate_dir(). ++ */ ++ ret = iterate_dir(actualFile, ctx); + + return ret; + } +@@ -237,7 +194,7 @@ + + + struct file_operations RootFileOps = { +- .readdir = FileOpReaddir, ++ .iterate = FileOpReaddir, + .open = FileOpOpen, + .release = FileOpRelease, + }; -- cgit v1.2.3-55-g7522