maintainer-feedback requested: [Bug 267270] devel/gvfs: Make gvfsd-trash optional

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 22 Oct 2022 15:17:26 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-gnome (Nobody)
<gnome@FreeBSD.org> for maintainer-feedback:
Bug 267270: devel/gvfs:  Make gvfsd-trash optional
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267270



--- Description ---
After discovering that gvfsd-trash had more than 10,000 file descriptors open -
visible in 'fstat -p' - I'd developed a workaround for disabling gvfsd-trash
locally. 

~~~~
mkdir -p /usr/local/etc/gvfs/mounts
for F in /usr/local/share/gvfs/mounts/*.mount; do
    install -l rs $F /usr/local/etc/gvfs/mounts/$(basename $F);
done
rm /usr/local/etc/gvfs/mounts/trash.mount
~~~~

then in /etc/profile
~~~~
if [ -e /usr/local/etc/gvfs/mounts ]; then
  export GVFS_MOUNTABLE_DIR=/usr/local/etc/gvfs/mounts
fi
~~~~

This workaround would not ensure that /usr/local/etc/gvfs/mounts would stay in
sync with /usr/local/share/gvfs/mounts/

The attached patch would provide a way to disable gvfsd-trash in the port
build. 

The patch will add an option to devel/gvfs for not installing gvfsd-trash.

This first patch is provided in assuming that nothing will break with
libexec/gvfsd-trash not installed. In the patched port, the main idea was to
make it optional to install ${DATADIR}/mounts/trash.mount. When the TRASH
option is not active, both of those files will be removed during post-install.

Considering the approximate number of concerns that users may have experienced
with gvfsd-trash at the desktop - e.g in relation to zfs unmount, in regards to
process utilization, and in regards to number of open file descriptors - the
option is disabled by default, in the patched port