Bug 224595 - [emulators/open-vm-tools] tools.conf removed with upgrade
Summary: [emulators/open-vm-tools] tools.conf removed with upgrade
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-26 10:26 UTC by Mikhail Golub
Modified: 2017-12-28 22:46 UTC (History)
1 user (show)

See Also:


Attachments
vmware-guestd.in.patch (757 bytes, patch)
2017-12-26 10:26 UTC, Mikhail Golub
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Golub 2017-12-26 10:26:31 UTC
Created attachment 189109 [details]
vmware-guestd.in.patch

Config file /usr/local/share/vmware-tools/tools.conf replaced after port update.

"/usr/local/bin/vmtoolsd -c /usr/local/share/vmware-tools/tools.conf -p /usr/local/lib/open-vm-tools/plugins/vmsvc"

Patch for add custom config in /usr/local/etc dir.
After apply patch in /etc/rc.conf set:
vmware_guestd_config="/usr/local/etc/vmware-tools/tools.conf"
Comment 1 Eugene Grosbein freebsd_committer 2017-12-26 10:41:06 UTC
Josh, please take a look. It seems this port violates directions of the Porter's Handbook on configuration file handling: https://www.freebsd.org/doc/en/books/porters-handbook/plist-config.html
Comment 2 Josh Paetzel freebsd_committer 2017-12-27 18:18:04 UTC
I think a better solution is to use the sample mechanism.
Comment 3 Josh Paetzel freebsd_committer 2017-12-27 18:45:37 UTC
Or not.  This port doesn't actually install a tools.conf or provide a sample config file.  However if you create a tools.conf it will happily use it.

The downside of just removing tools.conf from the pkg-plist is that it will block directory removal if you delete the port but I guess that's a small price to pay.
Comment 4 Eugene Grosbein freebsd_committer 2017-12-28 21:12:20 UTC
(In reply to Josh Paetzel from comment #3)

If the port does not install a file, it must not remove it.
Comment 5 commit-hook freebsd_committer 2017-12-28 22:46:47 UTC
A commit references this bug:

Author: jpaetzel
Date: Thu Dec 28 22:45:58 UTC 2017
New revision: 457485
URL: https://svnweb.freebsd.org/changeset/ports/457485

Log:
  Don't remove a config file the port doesn't install.

  PR:	224595
  Reported by:	Mikhail Golub <gmn@gmn.org.ua>
  Reviewed by:	John Wolfe <jwolfe@vmware.com>

Changes:
  head/emulators/open-vm-tools/Makefile
  head/emulators/open-vm-tools/pkg-plist