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 750706 - Wish: Make FTP backend optional
Wish: Make FTP backend optional
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: ftp backend
1.25.x
Other Linux
: Normal enhancement
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-10 13:14 UTC by flo.xfce
Modified: 2015-06-17 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Make GCR optional (2.74 KB, patch)
2015-06-11 22:08 UTC, Ross Lagerwall
none Details | Review
build: Make GCR optional (2.75 KB, patch)
2015-06-16 05:55 UTC, Ross Lagerwall
committed Details | Review

Description flo.xfce 2015-06-10 13:14:19 UTC
A lot of backends are optional in gvfs, FTP is not. Commit 7cf5d5ff55fcbdebe0fb7b60e52ecb0c95ca63ee introduced a dependency on gcr, which is nearly as big as the gvfs package itself. I only need gvfs for Evince annotations and Thunar trash support and would like to maintain a slim system.
Please add a compile option like --disable-ftp for those users who do not use this backend.
Comment 1 Ross Lagerwall 2015-06-11 22:08:01 UTC
Created attachment 305101 [details] [review]
build: Make GCR optional

Make using GCR optional by compiling with --disable-gcr. This disables
certificate checking with ftps, so don't silently disable it if the
library is not found, only disable it if --disable-gcr is given.
Comment 2 Ross Lagerwall 2015-06-11 22:09:10 UTC
(In reply to flo.xfce from comment #0)
> A lot of backends are optional in gvfs, FTP is not. Commit
> 7cf5d5ff55fcbdebe0fb7b60e52ecb0c95ca63ee introduced a dependency on gcr,
> which is nearly as big as the gvfs package itself. I only need gvfs for
> Evince annotations and Thunar trash support and would like to maintain a
> slim system.
> Please add a compile option like --disable-ftp for those users who do not
> use this backend.

gvfs only requires libgcr-base.so.1.0, which is 624k on my system, not really much :-)

But anyway, here is a patch.
Comment 3 flo.xfce 2015-06-13 08:40:39 UTC
Ok, this has to do with packaging, libgcr-base is not packed separatly on my system. Anyway - thanks for the patch. I compiled it and it works fine as far as I can tell. Will this patch also be applied upstream?
Comment 4 Ross Lagerwall 2015-06-15 06:35:10 UTC
(In reply to flo.xfce from comment #3)
> Ok, this has to do with packaging, libgcr-base is not packed separatly on my
> system. Anyway - thanks for the patch. I compiled it and it works fine as
> far as I can tell. Will this patch also be applied upstream?

Well it might be useful if whoever packages gcr splits it up appropriately. But yes, I do intend to apply the patch as soon as it's reviewed.
Comment 5 Ondrej Holy 2015-06-15 07:15:59 UTC
Review of attachment 305101 [details] [review]:

(In reply to flo.xfce from comment #3)
> Will this patch also be applied upstream?

Hmm, why not, but...

::: configure.ac
@@ +74,3 @@
 giomodulesdir=$libdir/gio/modules
 AC_SUBST(giomodulesdir)
 

dnl *********************
dnl *** Check for gcr ***
dnl *********************

::: daemon/gvfsdaemonutils.c
@@ +362,3 @@
+                         GTlsCertificateFlags errors)
+{
+  return TRUE;

Shouldn't be FALSE returned by default, i.e. be ssl strict?
Comment 6 Ross Lagerwall 2015-06-16 05:55:40 UTC
Created attachment 305359 [details] [review]
build: Make GCR optional

Make using GCR optional by compiling with --disable-gcr. This makes
gvfs strict when checking SSL certificates, so don't silently disable it
if the library is not found, only disable it if --disable-gcr is given.
Comment 7 Ross Lagerwall 2015-06-16 05:56:07 UTC
(In reply to Ondrej Holy from comment #5)
> Review of attachment 305101 [details] [review] [review]:
> 
> (In reply to flo.xfce from comment #3)
> > Will this patch also be applied upstream?
> 
> Hmm, why not, but...
> 
> ::: configure.ac
> @@ +74,3 @@
>  giomodulesdir=$libdir/gio/modules
>  AC_SUBST(giomodulesdir)
>  
> 
> dnl *********************
> dnl *** Check for gcr ***
> dnl *********************
> 
> ::: daemon/gvfsdaemonutils.c
> @@ +362,3 @@
> +                         GTlsCertificateFlags errors)
> +{
> +  return TRUE;
> 
> Shouldn't be FALSE returned by default, i.e. be ssl strict?

I suppose, yeah.
Comment 8 Ondrej Holy 2015-06-16 06:31:59 UTC
Review of attachment 305359 [details] [review]:

Looks good, just you overlooked my first note probably:

::: configure.ac
@@ +74,3 @@
 giomodulesdir=$libdir/gio/modules
 AC_SUBST(giomodulesdir)
 

Please add following header as is used in other cases...

dnl *********************
dnl *** Check for gcr ***
dnl *********************
Comment 9 Ross Lagerwall 2015-06-17 21:37:47 UTC
(In reply to Ondrej Holy from comment #8)
> Review of attachment 305359 [details] [review] [review]:
> 
> Looks good, just you overlooked my first note probably:
> 
> ::: configure.ac
> @@ +74,3 @@
>  giomodulesdir=$libdir/gio/modules
>  AC_SUBST(giomodulesdir)
>  
> 
> Please add following header as is used in other cases...
> 
> dnl *********************
> dnl *** Check for gcr ***
> dnl *********************

Pushed to master as 600558ec7927d75ea045f3093a7db0a4778c76fe with the extra change. Thanks for the reviews!