diff -Nru open-vm-tools-11.3.0/debian/changelog open-vm-tools-11.3.0/debian/changelog --- open-vm-tools-11.3.0/debian/changelog 2021-08-31 10:05:31.000000000 +0000 +++ open-vm-tools-11.3.0/debian/changelog 2021-10-12 05:53:54.000000000 +0000 @@ -1,3 +1,12 @@ +open-vm-tools (2:11.3.0-2ubuntu0~ubuntu20.04.2) focal; urgency=medium + + * d/rules: provide a compat link for the old open-vm-tools + library/plugin paths (LP: #1944946) + - d/open-vm-tools.postinst: handle upgrades from <11.3.0-2 in regard + to the symlink + + -- Christian Ehrhardt Tue, 12 Oct 2021 07:53:54 +0200 + open-vm-tools (2:11.3.0-2ubuntu0~ubuntu20.04.1) focal; urgency=medium * Update to latest release v11.3.0 (LP: #1933143) diff -Nru open-vm-tools-11.3.0/debian/open-vm-tools.postinst open-vm-tools-11.3.0/debian/open-vm-tools.postinst --- open-vm-tools-11.3.0/debian/open-vm-tools.postinst 2021-07-12 05:49:25.000000000 +0000 +++ open-vm-tools-11.3.0/debian/open-vm-tools.postinst 2021-10-12 05:53:54.000000000 +0000 @@ -7,6 +7,30 @@ if which udevadm 1>/dev/null; then udevadm trigger || true fi + + # Transitions from directory (<11.3.0-2) to symlink can cause issues + # See this bug and links from there for prior examples + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626203 + # Upgrades "through" 11.3.0-2 are ok as it removed the dir and then + # deploys the symlink on the next upgrade. But directly from e.g. + # 2:11.0.5-4 in focal-release the upgrade would leave a dir behind. + if [ -n "$2" ] && dpkg --compare-versions -- "$2" lt "2:11.3.0-2~"; then + # upgrade from a version that had the directory + d_to_s_dir="/usr/lib/open-vm-tools" + if [ -d "$d_to_s_dir" ]; then + if [ "$(find "$d_to_s_dir" -maxdepth 0 -empty)" = "$d_to_s_dir" ]; then + # remove empty dir + rmdir "$d_to_s_dir" + else + # Backup non-empty dir + echo "Warning $d_to_s_dir not empty, create backup in $d_to_s_dir.bckp" + mv "$d_to_s_dir" "$d_to_s_dir.bckp" + fi + target_dir=$(dpkg -L open-vm-tools | grep '^/usr/lib/.*-linux-gnu/open-vm-tools$') + # Create symlink in place of the former directory + ln -s "$target_dir" "$d_to_s_dir" + fi + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff -Nru open-vm-tools-11.3.0/debian/rules open-vm-tools-11.3.0/debian/rules --- open-vm-tools-11.3.0/debian/rules 2021-08-31 10:05:31.000000000 +0000 +++ open-vm-tools-11.3.0/debian/rules 2021-10-12 05:53:46.000000000 +0000 @@ -85,6 +85,9 @@ mv debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/scripts/* debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/scripts/ rm -rf debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/ + # Compat link for LP: #1944946 due to software checking the old non multiarch .so paths + ln --relative --symbolic debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools debian/open-vm-tools/usr/lib/open-vm-tools + override_dh_gencontrol: if [ "${VENDOR}" = "UBUNTU" ]; \ then \