After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767172 - docs: Move GIO_USE_VFS to "okay for production" section
docs: Move GIO_USE_VFS to "okay for production" section
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-06-02 16:21 UTC by Colin Walters
Modified: 2016-06-03 01:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: Move GIO_USE_VFS to "okay for production" section (1.88 KB, patch)
2016-06-02 16:22 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2016-06-02 16:21:54 UTC
Lots of projects like NetworkManager, ostree, udisks, soon polkit,
etc.  do this or *should* do this.  And we need to support that
forever.
Comment 1 Colin Walters 2016-06-02 16:22:02 UTC
Created attachment 328981 [details] [review]
docs: Move GIO_USE_VFS to "okay for production" section
Comment 2 Ray Strode [halfline] 2016-06-02 16:31:36 UTC
note, as a weird coincidence, i just pushed this change to accountsservice yesterday:

https://cgit.freedesktop.org/accountsservice/commit/?id=87bf44fe091bdf446aa00e052dd10418a379a1a6
Comment 3 Matthias Clasen 2016-06-02 16:59:21 UTC
Review of attachment 328981 [details] [review]:

looks fine to me
Comment 4 Dan Winship 2016-06-02 17:38:54 UTC
Wouldn't it be better to make a real API for this?

Are the different apps even all disabling gvfs for the same reason? Are they all disabling it for reasons that are relevant to the current code, or are some of them disabling it to work around long-since-fixed glib/gvfs bugs?
Comment 5 Dan Winship 2016-06-02 17:42:31 UTC
> accountsservice doesn't need support for GVFS modules,
> and those modules lead to /root/.cache getting created
> at startup.
> 
> accountsservice runs as root, but shouldn't be touching /root.

Maybe gvfs just shouldn't create $HOME/.cache unless it needs it?

(And there's certainly no guarantee that some other glib API isn't going to start touching files in $HOME later anyway.)
Comment 6 Ray Strode [halfline] 2016-06-02 17:44:45 UTC
I agree a real api would be better than an environment variable hands down.

I can't come up with a plausible reason any of the programs listed in comment 0 or comment 1 would want gvfs though.  

AccountsService was done specifically because initializing gvfs when not run in a session has the side effect of creating /root/.cache and that generated AVC log entries.
Comment 7 Ray Strode [halfline] 2016-06-02 17:45:22 UTC
(midair collision)
Comment 8 Colin Walters 2016-06-02 18:11:11 UTC
Right, a lot of "desktop stuff" wants a "session" which implies a few things like a home directory, a session dbus.  Neither of those exist (normally) for system services.
Comment 9 Colin Walters 2016-06-02 18:11:33 UTC
Attachment 328981 [details] pushed as 424b3b9 - docs: Move GIO_USE_VFS to "okay for production" section
Comment 10 Dan Winship 2016-06-02 19:42:16 UTC
(In reply to Colin Walters from comment #8)
> Right, a lot of "desktop stuff" wants a "session" which implies a few things
> like a home directory, a session dbus.  Neither of those exist (normally)
> for system services.

So they all want GSETTINGS_BACKEND=memory too, right? (Otherwise if they open a TCP connection, they'll end up trying to spawn dconf-service because of GSocketClient -> GProxyResolver -> GSettings.)
Comment 11 Colin Walters 2016-06-02 21:34:53 UTC
(In reply to Dan Winship from comment #10)
> (In reply to Colin Walters from comment #8)
> > Right, a lot of "desktop stuff" wants a "session" which implies a few things
> > like a home directory, a session dbus.  Neither of those exist (normally)
> > for system services.
> 
> So they all want GSETTINGS_BACKEND=memory too, right? (Otherwise if they
> open a TCP connection, they'll end up trying to spawn dconf-service because
> of GSocketClient -> GProxyResolver -> GSettings.)

Yeah.  It's tempting to turn that on automatically if GIO_USE_VFS=local && getuid () == 0 or something.  Or alternatively, detect somehow we're under a systemd unit.
Comment 12 Dan Winship 2016-06-02 22:03:43 UTC
Well, that's what I was saying about having a real API. We should figure out exactly what behavior it is that these programs want ("don't run D-Bus-based extension points"? "don't ever try to connect to the D-Bus session bus"?), and make an API that gives them that (and will be extended to do the same with future extension points as well, etc).
Comment 13 Colin Walters 2016-06-03 01:24:19 UTC
No disagreement here, but it seems like a separate bug from fixing the documentation to reflect reality (this one).

https://bugzilla.gnome.org/show_bug.cgi?id=767183