Re: [libosinfo PATCH 0/7] Drop GVFS dependency in favour of libsoup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 2, 2019 at 1:51 AM Cole Robinson <crobinso@xxxxxxxxxx> wrote:
>
> On 6/27/19 8:56 AM, Fabiano Fidêncio wrote:
> > Let's rely on libsoup in order to to http://, https://, and ftp://
> > requests.
> >
> > By doing this, GVFS (more specifically, gvfs-http) won't be dragged as
> > a dependency, which caused errors for apps running as root (as GVFS
> > relies on being run in the user's session).
> >
> > https://gitlab.com/libosinfo/libosinfo/issues/30
> >
> > Fabiano Fidêncio (7):
> >   media: Fix indentation in create_from_location_asunc_data_free()
> >   tree: Remove not used Tree from _CreateFromLocationAsyncData struct
> >   media: Improve on_location_read error message readability
> >   media: Use GInpuStream directly in on_location_read()
> >   media: Use libsoup for http://, https://, and ftp:// requests
> >   tree: Use libsoup for http://, https://, and ftp:// requests
> >   spec: Drop gvfs dependency
> >
> >  configure.ac          |   5 +-
> >  libosinfo.spec.in     |   2 +-
> >  osinfo/Makefile.am    |   5 +-
> >  osinfo/libosinfo.syms |   2 +
> >  osinfo/osinfo_media.c |  86 ++++++++++++++++++++++++---------
> >  osinfo/osinfo_tree.c  | 108 +++++++++++++++++++++++++++++-------------
> >  osinfo/osinfo_tree.h  |  11 +++++
> >  7 files changed, 159 insertions(+), 60 deletions(-)
> >
>
> Does libsoup actually handle FTP?

Theoretically, yes:
https://gitlab.gnome.org/GNOME/libsoup/blob/master/libsoup/soup-uri.h#L35

> Googling doesn't turn up any obvious
> hits. That said I don't know if GVFS handles it either.

It also should, through gvfs-ftp, which seems to just use GSocket
under the hood.

> With the
> virt-manager test suite and libosinfo git master, I see:
>
> $ ./setup.py test_urls --debug --force-libosinfo --only fedora-ftp
> ...
> DEBUG    Error creating libosinfo tree object for
> location=ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/releases/30/Server/x86_64/os/
> : g-io-error-quark: Failed to load .treeinfo|treeinfo file: The
> specified location is not mounted (16)
> ...
>
> So it doesn't seem to work anyway. But with your patch series it hangs
> until it hits a two minute socket timeout. Which makes me wonder if
> libsoup is trying to talk http to an ftp URL.

May be the case and may be a bug in libsoup.

>
> FWIW I don't think that should be an argument for keeping a gvfs
> dependency. It's getting hard to even find public ftp mirrors these days

Indeed.
I'm wondering about the check to do. Hardcoding "https://";, "http://";
seems quite bad. Maybe I should just create the file and then check
for g_file_is_native() as done in osinfo-db-tools?
I'm also proposing a patch for libsoup in order to get from them which
are the supported schemas.

>
> - Cole

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux