Bug 228307 - Make dependency of devel/gvfs optional for a several different ports
Summary: Make dependency of devel/gvfs optional for a several different ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-desktop (Team)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2018-05-16 23:15 UTC by VVD
Modified: 2020-09-13 21:50 UTC (History)
2 users (show)

See Also:
tcberner: maintainer-feedback-
tcberner: exp-run-


Attachments
x11-toolkits/libgnomeui: removed unused dependency from gvfs (443 bytes, patch)
2020-08-08 12:32 UTC, VVD
vvd: maintainer-approval?
Details | Diff
Mk/Uses/gnome.mk: removed nested dependancy from gvfs in nautilus3 uses (350 bytes, patch)
2020-08-08 13:30 UTC, VVD
vvd: maintainer-approval?
Details | Diff
x11-fm/nautilus: make gvfs as option for nautilus (289 bytes, patch)
2020-08-08 17:19 UTC, VVD
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2018-05-16 23:15:54 UTC
gvfs is so annoying - always eat CPU from 1-2 to 20-30% from one core. But I don't use it.

I have installed ports with mandatory dependency from devel/gvfs:
x11-fm/nautilus
x11-toolkits/libgnomeui
graphics/evince
sysutils/brasero

But a simple hack remove the dependency:
diff -ur ports.orig/Mk/Uses/gnome.mk ports/Mk/Uses/gnome.mk
--- ports.orig/Mk/Uses/gnome.mk
+++ ports/Mk/Uses/gnome.mk
@@ -296,7 +296,7 @@
 librsvg2_USE_GNOME_IMPL=libgsf gdkpixbuf2 pango
 
 nautilus3_LIB_DEPENDS= libnautilus-extension.so:x11-fm/nautilus
-nautilus3_USE_GNOME_IMPL=gnomedesktop3 gvfs libxml2
+nautilus3_USE_GNOME_IMPL=gnomedesktop3 libxml2
 
 metacity_LIB_DEPENDS=  libmetacity-private.so:x11-wm/metacity
 
diff -ur ports.orig/x11-fm/nautilus/Makefile ports/x11-fm/nautilus/Makefile
--- ports.orig/x11-fm/nautilus/Makefile
+++ ports/x11-fm/nautilus/Makefile
@@ -20,7 +20,7 @@
 
 USES=          desktop-file-utils gettext gmake gnome libtool pathfix \
                pkgconfig tar:xz
-USE_GNOME=     intlhack gnomedesktop3 libxml2 gvfs introspection:build
+USE_GNOME=     intlhack gnomedesktop3 libxml2 introspection:build
 USE_LDCONFIG=  yes
 GNU_CONFIGURE= yes
 CPPFLAGS+=     -I${LOCALBASE}/include
diff -ur ports.orig/x11-toolkits/libgnomeui/Makefile ports/x11-toolkits/libgnomeui/Makefile
--- ports.orig/x11-toolkits/libgnomeui/Makefile
+++ ports/x11-toolkits/libgnomeui/Makefile
@@ -21,7 +21,7 @@
 RUN_DEPENDS=   ${LOCALBASE}/share/icons/gnome/index.theme:misc/gnome-icon-theme
 
 USES+=         bison gettext gmake localbase libtool:keepla pathfix pkgconfig
-USE_GNOME=     gnomeprefix intltool libbonoboui referencehack gvfs
+USE_GNOME=     gnomeprefix intltool libbonoboui referencehack
 USE_XORG=      sm
 USE_LDCONFIG=  yes
 GNU_CONFIGURE= yes
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-05-18 05:45:19 UTC
If gvfs is indeed optional (even with some functionality loss) for these ports, this change likely needs to take the form of creating a GVFS option and leaving it as a default enabled option (in OPTIONS_DEFAULT) as a couple of ports [1] already do, and adding in any explicit --enable/disable configure (or other build) options for the gvfs functionality.

sysutils/gigolo also unconditionazlly uses gvfs, but is potentially an OPTION'alisation candidate.

[1] graphics/gimp-app, audio/xmms2

Note: gnome@ is the maintainer for all ports referenced in this comment 0
Comment 2 VVD 2020-08-08 12:32:52 UTC
Created attachment 217093 [details]
x11-toolkits/libgnomeui: removed unused dependency from gvfs

Build with and without gvfs installed does not affect anything.
Comment 3 VVD 2020-08-08 12:42:15 UTC
x11-fm/nautilus self doesn't depends on gvfs, but Mk/Uses/gnome.mk have list of nested dependencies for nautilus (if other port compiled with nautilus support on): nautilus3_USE_GNOME_IMPL=gnomedesktop3 gvfs libxml2.
Why we have gvfs here?
Ports graphics/evince and sysutils/brasero are affected by this.
Comment 4 VVD 2020-08-08 13:30:12 UTC
Created attachment 217095 [details]
Mk/Uses/gnome.mk: removed nested dependancy from gvfs in nautilus3 uses

This patch need exp-run.

Affected ports:

* Tested:
graphics/evince
sysutils/brasero

* Not tested:
archivers/file-roller
deskutils/gnome-tweaks
deskutils/nautilus-actions
multimedia/totem
www/gnome-user-share
x11/gnome-terminal
x11-fm/nautilus-python
Comment 5 Ting-Wei Lan 2020-08-08 13:58:31 UTC
(In reply to VVD from comment #2)
gvfs is not designed to be needed during the build. gvfs provides GLib modules and a FUSE service. Most applications use gvfs via GLib API, so compiling them  successfully without gvfs does not mean they don't need gvfs at runtime.

(In reply to VVD from comment #3)
gvfs is needed for GLib to mount network shares, such as FTP, SFTP, SMB, WebDAV. I think it is correct for nautilus to depend on gvfs by default because accessing network shares is an important feature of nautilus.
Comment 6 VVD 2020-08-08 15:37:13 UTC
(In reply to Ting-Wei Lan from comment #5)
1. They work fine without gvfs installed, but with lack of some functionality only. It's optional dependency anyway.

2. nautilus doesn't need it for work too. But I said about nested dependencies, not about nautilus' dependencies.

Probably better make GVFS option for x11/gnome3 or something else, but not mandatory for a lot of ports.
Comment 7 Ting-Wei Lan 2020-08-08 16:36:32 UTC
(In reply to VVD from comment #6)
It is an optional dependency, and most applications probably don't care whether gvfs is installed. For applications which don't provide special features for remote files, I think it is fine to remove the dependency on gvfs.

However, nautilus should be treated specially. There is a page describing how to access network shares in its documentation, assuming the feature is always available. Instead of dropping the dependency, I think it should be better to move the dependency to x11-fm/nautilus port itself, so it can be controlled by a GVFS option which is enabled by default.

I don't think x11/gnome3 will need a GVFS option. If you use GNOME desktop, you should have gvfs installed. Neither JHBuild modulesets nor gnome-build-meta considers gvfs to be optional in a GNOME desktop environment.
Comment 8 VVD 2020-08-08 17:19:37 UTC
Created attachment 217098 [details]
x11-fm/nautilus: make gvfs as option for nautilus

Done. If I correct understood your suggestion.
Comment 9 Ting-Wei Lan 2020-08-12 16:24:04 UTC
(In reply to VVD from comment #8)
These 3 patches are OK to me, but I can't approve them for you because I am not the maintainer. The last patch will be better if it clearly states that disabling gvfs is an unsupported configuration.
Comment 10 Tobias C. Berner freebsd_committer 2020-08-16 12:37:41 UTC
Maintainer Timout.
Comment 11 VVD 2020-09-13 07:27:32 UTC
Are we waiting for something?
All patches are attached.
Comment 12 Tobias C. Berner freebsd_committer 2020-09-13 07:41:43 UTC
(In reply to VVD from comment #11)
Sorry, this fell from my todo list :)
Comment 13 commit-hook freebsd_committer 2020-09-13 15:59:06 UTC
A commit references this bug:

Author: tcberner
Date: Sun Sep 13 15:58:47 UTC 2020
New revision: 548483
URL: https://svnweb.freebsd.org/changeset/ports/548483

Log:
  Make dependency of devel/gvfs optional for a several different ports

  - this makes it possible for users to not install gvfs by making it an optional dependeny
  - and moving it to nautilus directly instead of very high up the gnome stack in libngomeui
  - it is on by default in nautilus, so no change for users of that

  PR:		228307
  Submitted by:	VVD <vvd@unislabs.com>

Changes:
  head/Mk/Uses/gnome.mk
  head/x11-fm/nautilus/Makefile
  head/x11-toolkits/libgnomeui/Makefile
Comment 14 Tobias C. Berner freebsd_committer 2020-09-13 16:00:06 UTC
Committed. Thanks for the patch!
Comment 15 VVD 2020-09-13 21:50:56 UTC
(In reply to Tobias C. Berner from comment #14)
2 years and 4 months left and it's done now! :-D

Thanks!