diff -u open-vm-tools-2008.08.08-109361/debian/changelog open-vm-tools-2008.08.08-109361/debian/changelog --- open-vm-tools-2008.08.08-109361/debian/changelog +++ open-vm-tools-2008.08.08-109361/debian/changelog @@ -1,3 +1,17 @@ +open-vm-tools (2008.08.08-109361-1ubuntu2.2~andersk5) intrepid-proposed; urgency=low + + * Backport fixes from the Debian package (LP: #289921): + - Updating initscript to correctly handle vmxnet (Closes: #479090, + #488810). + - Correcting typo in dh_installinit call. + - Always prefering vmxnet over pcnet32 through modprobe and initramfs + configuration (Closes: #502365). + * Rewrite the incorrect patch ubuntu_toolchain_FTBFS.dpatch + (LP: #306835). + * Fix automatic starting of vmware-user (LP: #302226). + + -- Anders Kaseorg Fri, 20 Feb 2009 15:13:31 -0500 + open-vm-tools (2008.08.08-109361-1ubuntu2.1) intrepid-proposed; urgency=low * Upstream patch to make open-vm-source compatible with Intrepid's kernel (LP: #278711) diff -u open-vm-tools-2008.08.08-109361/debian/rules open-vm-tools-2008.08.08-109361/debian/rules --- open-vm-tools-2008.08.08-109361/debian/rules +++ open-vm-tools-2008.08.08-109361/debian/rules @@ -141,6 +141,9 @@ chmod 0644 debian/open-vm-tools/etc/pam.d/vmware-guestd + install -D -m 0644 debian/config/vmxnet.modprobe debian/open-vm-tools/etc/modprobe.d/vmxnet + install -D -m 0755 debian/config/vmxnet.hook debian/open-vm-tools/usr/share/initramfs-tools/hooks/vmxnet + # Moving open-vm-tools files mkdir -p debian/open-vm-tools/sbin mv debian/open-vm-tools/usr/sbin/mount.vmhgfs debian/open-vm-tools/sbin/mount.vmhgfs @@ -181,7 +184,7 @@ dh_installdocs dh_install dh_installman - dh_installinit --update-rcd-params='defaults 20' + dh_installinit --update-rcd-params='start 38 S . stop 38 0 6 .' dh_lintian dh_link dh_strip --dbg-package=open-vm-tools-dbg diff -u open-vm-tools-2008.08.08-109361/debian/open-vm-tools.init open-vm-tools-2008.08.08-109361/debian/open-vm-tools.init --- open-vm-tools-2008.08.08-109361/debian/open-vm-tools.init +++ open-vm-tools-2008.08.08-109361/debian/open-vm-tools.init @@ -2,9 +2,11 @@ ### BEGIN INIT INFO # Provides: open-vm-tools -# Required-Start: -# Required-Stop: $network -# Default-Start: 2 3 5 +# Required-Start: $local_fs +# Required-Stop: $local_fs +# X-Start-Before: $network +# X-Stop-After: $network +# Default-Start: S # Default-Stop: 0 6 # Description: Runs the open-vm-tools services # Short-Description: Runs the open-vm-tools services @@ -12,31 +14,6 @@ . /lib/lsb/init-functions -vmxnet_needed () -{ - HWVERSION="$(vmware-checkvm -h | head -1 | cut -f5 -d\ )" - - for DEVICE in /sys/bus/pci/devices/* - do - if grep -q 15ad ${DEVICE}/vendor && grep -q 0720 ${DEVICE}/device - then - return 0 - fi - - if [ "${HWVERSION}" -ge "4" ] && grep -q 1022 ${DEVICE}/vendor && grep -q 2000 ${DEVICE}/device - then - return 0 - fi - done - - if [ -n "$(find /lib/modules/$(uname -r)/ -name vmxnet.ko)" ] - then - return 0 - fi - - return 1 -} - exit_if_not_in_vm () { if [ ! -x /usr/bin/vmware-checkvm ] || ! /usr/bin/vmware-checkvm > /dev/null 2>&1 then @@ -56,12 +33,6 @@ log_progress_msg "vmsync"; modprobe vmsync log_end_msg 0 - if vmxnet_needed - then - modprobe -r pcnet32 - modprobe vmxnet - fi - log_daemon_msg "Starting open-vm guest daemon" "vmware-guestd" vmware-guestd --background /var/run/vmware-guestd.pid log_end_msg 0 @@ -80,12 +51,6 @@ log_end_msg 0 - if vmxnet_needed - then - modprobe -r vmxnet - modprobe pcnet32 - fi - log_daemon_msg "Removing open-vm-tools modules" log_progress_msg "vmhgfs"; modprobe -r vmhgfs log_progress_msg "vmmemctl"; modprobe -r vmmemctl diff -u open-vm-tools-2008.08.08-109361/debian/patches/00list open-vm-tools-2008.08.08-109361/debian/patches/00list --- open-vm-tools-2008.08.08-109361/debian/patches/00list +++ open-vm-tools-2008.08.08-109361/debian/patches/00list @@ -3,0 +4 @@ +ubuntu_vmware-user_autostart.dpatch diff -u open-vm-tools-2008.08.08-109361/debian/patches/ubuntu_toolchain_FTBFS.dpatch open-vm-tools-2008.08.08-109361/debian/patches/ubuntu_toolchain_FTBFS.dpatch --- open-vm-tools-2008.08.08-109361/debian/patches/ubuntu_toolchain_FTBFS.dpatch +++ open-vm-tools-2008.08.08-109361/debian/patches/ubuntu_toolchain_FTBFS.dpatch @@ -49,7 +49,7 @@ char ipAddress[NICINFO_MAX_IP_LEN]; - Str_Sprintf(macAddress, sizeof macAddress, -+ Str_Sprintf(macAddress, sizeof macAddress, "%s\n", ++ Str_Sprintf(macAddress, sizeof macAddress, "%s", addr_ntoa(&entry->intf_link_addr)); nic = GuestInfoAddNicEntry(nicInfo, macAddress); @@ -61,7 +61,7 @@ return -1; } - numChars = printf(outCurr); -+ numChars = printf(outCurr,"%s\n"); ++ numChars = printf("%s", outCurr); free(output); free(outCurr); @@ -73,7 +73,7 @@ break; case 1: - Log(buf); -+ Log(buf,"%s\n"); ++ Log("%s", buf); Log("Panic loop\n"); default: fprintf(stderr, "Panic loop\n"); @@ -82,7 +82,7 @@ */ - Log(buf); -+ Log(buf,"%s\n"); ++ Log("%s", buf); Util_Backtrace(0); Log_SetAlwaysKeep(TRUE); @@ -127,7 +127,7 @@ while ((readLen = fread(buf, 1, sizeof buf, fp)) > 0 ) { if (Base64_Encode(buf, readLen, base64Buf, sizeof base64B - 1, NULL)) { - RpcVMX_Log(base64B); -+ RpcVMX_Log(base64B,"%s\n"); ++ RpcVMX_Log("%s", base64B); } else { Warning("Error in Base64_Encode\n"); goto exit; @@ -136,7 +136,7 @@ return -1; } if (argc == 2) { - RpcVMX_Log(argv[1]); -+ RpcVMX_Log(argv[1],"%s\n"); ++ RpcVMX_Log("%s", argv[1]); return 0; } only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/open-vm-tools.postinst +++ open-vm-tools-2008.08.08-109361/debian/open-vm-tools.postinst @@ -0,0 +1,30 @@ +#!/bin/sh + +if ! ls /boot/vmlinu* > /dev/null 2>&1 +then + exit 0 +fi + +case "$(ls -l /boot/vmlinu* | wc -l)" in + 1) + # We only have one kernel installed, so we can use "-u" + # which will use dpkg-trigger inside update-initramfs + INITRAMFS_ARGS="-u" + ;; + + *) + INITRAMFS_ARGS="-u -k all" + ;; +esac + +if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \ + dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18" +then + # this activates the trigger, if triggers are working + /usr/sbin/update-initramfs ${INITRAMFS_ARGS} +else + # force it to actually happen + DPKG_MAINTSCRIPT_PACKAGE="" /usr/sbin/update-initramfs ${INITRAMFS_ARGS} +fi + +#DEBHELPER# only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/open-vm-tools.postrm +++ open-vm-tools-2008.08.08-109361/debian/open-vm-tools.postrm @@ -0,0 +1,30 @@ +#!/bin/sh + +if ! ls /boot/vmlinu* > /dev/null 2>&1 +then + exit 0 +fi + +case "$(ls -l /boot/vmlinu* | wc -l)" in + 1) + # We only have one kernel installed, so we can use "-u" + # which will use dpkg-trigger inside update-initramfs + INITRAMFS_ARGS="-u" + ;; + + *) + INITRAMFS_ARGS="-u -k all" + ;; +esac + +if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \ + dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18" +then + # this activates the trigger, if triggers are working + /usr/sbin/update-initramfs ${INITRAMFS_ARGS} +else + # force it to actually happen + DPKG_MAINTSCRIPT_PACKAGE="" /usr/sbin/update-initramfs ${INITRAMFS_ARGS} +fi + +#DEBHELPER# only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/open-vm-tools.triggers +++ open-vm-tools-2008.08.08-109361/debian/open-vm-tools.triggers @@ -0,0 +1 @@ +activate update-initramfs only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/config/vmxnet.hook +++ open-vm-tools-2008.08.08-109361/debian/config/vmxnet.hook @@ -0,0 +1,34 @@ +#!/bin/sh + +# initramfs hook for vmxnet (open-vm-tools) + +set -e + +# initramfs-tools header + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +# vmxnet hook + +# If pcnet32 is installed in the initrd, also install vmxnet. Together with the +# modprobe configuration, we can ensure that vmxnet is always preferred over +# pcnet32. + +if [ -e "${DESTDIR}"/lib/modules/*/kernel/drivers/net/pcnet32.ko ] +then + manual_add_modules vmxnet +fi only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/config/vmxnet.modprobe +++ open-vm-tools-2008.08.08-109361/debian/config/vmxnet.modprobe @@ -0,0 +1 @@ +install pcnet32 /sbin/modprobe -q --ignore-install vmxnet; /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS; /bin/true; only in patch2: unchanged: --- open-vm-tools-2008.08.08-109361.orig/debian/patches/ubuntu_vmware-user_autostart.dpatch +++ open-vm-tools-2008.08.08-109361/debian/patches/ubuntu_vmware-user_autostart.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ubuntu_vmware-user_autostart.dpatch by Anders Kaseorg +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix automatic starting of vmware-user. + +@DPATCH@ +diff --git a/scripts/common/vmware-user.desktop b/scripts/common/vmware-user.desktop +index 0dcbbe3..5ee465b 100644 +--- a/scripts/common/vmware-user.desktop ++++ b/scripts/common/vmware-user.desktop +@@ -1,4 +1,5 @@ + [Desktop Entry] ++Type=Application + Encoding=UTF-8 + Exec=vmware-user-suid-wrapper + Name=VMware User Agent