WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: open-vm-tools dependencies on 10.x  (Read 3866 times)

Offline blockhead

  • Newbie
  • *
  • Posts: 2
open-vm-tools dependencies on 10.x
« on: February 04, 2019, 12:06:36 PM »
Hi

open-vm-tools for 10.x x86 has many dependencies compared to the version packed for 8.x, including icu which is over 11MB.

10.x:

glib2.tcz
fuse.tcz
libdnet.tcz
procps-ng.tcz
icu.tcz
libtirpc.tcz
openssl.tcz

8.x:

fuse.tcz
libdnet.tcz
procps-ng.tcz
openssl.tcz

The build script for 8.x includes the --without-icu switch which removes the largest dependency.

Code: [Select]
./configure \
--prefix=/usr/local \
--localstatedir=/var \
--disable-static \
--without-icu \
--without-pam \
--without-xerces \
--disable-deploypkg \
--with-x \
|| exit

Does anyone know why the the version for 10.x has a dependency on icu when the 8.x version didn't need it?

Thanks

blockhead

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: open-vm-tools dependencies on 10.x
« Reply #1 on: February 04, 2019, 12:58:41 PM »
ICU is required in theory to support non-ASCII character sets, particularly in shared folders and copy/paste operations, but I haven't tried it without it to see if those operations would still work without ICU. I'll have to experiment to find out. The other dependencies are added because of updates to open-vm-tools source other libraries in TC.

Offline blockhead

  • Newbie
  • *
  • Posts: 2
Re: open-vm-tools dependencies on 10.x
« Reply #2 on: February 04, 2019, 01:58:56 PM »
Thanks, that makes sense. I'm only using it for graceful reboot / shutdown in ESXi so it's probably safe for me to build it with --without-icu.

Unrelated to this, are you open to suggestions / patches for the package? Currently, it will only poweroff when a reboot is initiated from vmware because the 99-shutdown script shuts the vm down before System_Shutdown is called. I can see why it's done that way because System_Shutdown tries to call /sbin/shutdown for shutdown and reboot which doesn't exist on TC. If systemLinux.c is patched to point to /sbin/poweroff and /sbin/reboot instead both operations should work without the need for the 99-shutdown script. The patch below works with the current build but it might be better to use sed to swap out the commands instead.

Code: [Select]
--- a/open-vm-tools/lib/system/systemLinux.c
+++ b/open-vm-tools/lib/system/systemLinux.c
@@ -312,7 +312,7 @@ System_Shutdown(Bool reboot)  // IN: "reboot or shutdown" flag
 #elif defined(USERWORLD)
       cmd = "/bin/reboot";
 #else
-      cmd = "/sbin/shutdown -r now";
+      cmd = "/sbin/reboot";
 #endif
    } else {
 #if __FreeBSD__
@@ -322,7 +322,7 @@ System_Shutdown(Bool reboot)  // IN: "reboot or shutdown" flag
 #elif defined(USERWORLD)
       cmd = "/bin/halt";
 #else
-      cmd = "/sbin/shutdown -h now";
+      cmd = "/sbin/poweroff";
 #endif
    }
    if (system(cmd) == -1) {

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: open-vm-tools dependencies on 10.x
« Reply #3 on: February 04, 2019, 07:45:03 PM »
I kinda mashed this together a few years ago and open-vm-tools has changed a lot over the years, but I haven't given the power scripts much attention. I will say that for shutdown or rebooting, now that you are pointing it out, the better TC way would be to use the /opt/shutdown.sh script instead in 99-shutdown. At least the /opt/shutdown.sh script gives you a chance to gracefully stop databases and other such applications, and a backup too. I'm not adverse to patching the code since I'm already doing that in a few spots, but I'm going to want to think it's the best solution. All feedback is welcome and appreciated. Thanks.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: open-vm-tools dependencies on 10.x
« Reply #4 on: February 06, 2019, 08:36:37 PM »
After a few tests I can't see that ICU makes any differences regarding copy/paste and hgfs shares:

Code: [Select]
tc@box:/mnt/hgfs-andy-home/test$ la
total 44
drwxr-xr-x 1 andy 100  4096 Feb  7 04:23 ./
drwxr-xr-x 1 andy 100 12288 Feb  6 22:33 ../
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 воскресенье/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 вторник/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 понедельник/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 пятница/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 среда/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 суббота/
drwxr-xr-x 1 andy 100  4096 Feb  7 04:09 четверг/
tc@box:/mnt/hgfs-andy-home/test$

I copied the days of the week in Russian from a web browser (because I don't have a Russian keyboard) into a test directory on my host and they list just fine, provided that you use rxvt, coreutils ls, and bash and have a unicode locale enabled. Then copied them back for this post. This using open-vm-tools and open-vm-tools-desktop compiled without icu. Regarding rebooting, the only power options that you can script for are poweron, poweroff, suspend, and resume. I'll patch up the source to use exitcheck.sh with an action, so it doesn't poweroff by default. If anyone has any other changes to open-vm-tools they would like to see let me know. Or if not using icu breaks Vsphere or anything else also let me know.