gvfs claming that http is not supported - except under sudo.

Neil Williams codehelp at debian.org
Sat Mar 22 09:25:28 UTC 2008


On Sat, 2008-03-22 at 06:48 +0100, Sebastian Dröge wrote:
> Am Samstag, den 22.03.2008, 01:15 +0000 schrieb Neil Williams:
> > I'm trying to port deb-gview[0] to GIO and GVfs.
> > 
> > Local files all work fine (in deb-gview CVS [1]) but I cannot get any
> > form of http support to operate.
> > 
> > I've copied some code from the source for nautilus in experimental to
> > make sure I'm writing the tests right but all I get is:
> > 
> > $ ./src/deb-gview
> > http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1_i386.deb
> > ** Message: Using scheme:http
> > 
> > ** (deb-gview:31002): WARNING **: The specified location is not
> > supported
> 
> Does
> gvfs-cat
> http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
> 
> work for you?

$ ./programs/gvfs-cat
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
gvfs-cat:
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc: error opening file: The specified location is not supported

That's the version built from the Debian package but without gvfs-bin
actually installed.

After installing gvfs-bin:

gvfs-cat
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
gvfs-cat:
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc: error opening file: The specified location is not supported

> Or the same with gvfs-info?

$ gvfs-info
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
Error getting info: The specified location is not supported

$ gvfs-info http://www.google.com/
Error getting info: The specified location is not supported

> If it doesn't that would be interesting to know... if it works you
> should have a look at their sources.

Umm:

$ sudo gvfs-info http://www.google.com/
display name: /
edit name: /
type: unknown
size: 0
attributes:
  standard::display-name: /
  standard::edit-name: /
  standard::content-type: text/html
  id::filesystem:
type='http',uri='http://www.google.com/',mount_prefix='/'

Hmm.

$ sudo gvfs-info
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
display name: gpe-tetris_0.6.4-1.dsc
edit name: gpe-tetris_0.6.4-1.dsc
type: unknown
size: 654
attributes:
  standard::display-name: gpe-tetris_0.6.4-1.dsc
  standard::edit-name: gpe-tetris_0.6.4-1.dsc
  standard::content-type: text/plain
  standard::size: 654
  id::filesystem:
type='http',uri='http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc',mount_prefix='/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc'
  etag::value: "f8071-28e-479cf861"

$ sudo gvfs-cat
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc

works too.

$ sudo ./programs/gvfs-cat
http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc

continues to work after 'sudo dpkg -P gvfs-bin' from within the gvfs
source.

From my test code, it appears that only the root user can load the
modules - running my test program under sudo gives:
** Message: Using scheme:http
** Message: scheme=trash
** Message: scheme=cdda
** Message: scheme=localtest
** Message: scheme=http
** Message: scheme=sftp
** Message: scheme=ssh
** Message: scheme=archive
** Message: scheme=smb
** Message: scheme=ftp
** Message: scheme=dav
** Message: scheme=computer
** Message: scheme=dns-sd
** Message: scheme=gphoto2
** Message: scheme=network
** Message: scheme=burn
** Message: scheme=obex
** Message: failed to set mountable

i.e. 

supported_uri_schemes = g_vfs_get_supported_uri_schemes (vfs);
for (i = 0; supported_uri_schemes != NULL && supported_uri_schemes[i] != NULL; i++)
{
	gchar * y = g_strdup(supported_uri_schemes[i]);
	g_message ("scheme=%s", y);
	g_free (y);
}

only works if done under sudo.

Something tells me that this isn't the expected behaviour.
;-)

Do you want a bug report or is this sufficient information for a fix?

> I couldn't find anything obviously wrong in your code :/

That's nice to know! Thanks.
;-)

It's not nice debugging code that has to run as sudo.

I'm not sure if this helps you but I also tried this:
sudo dpkg -P gvfs gvfs-backends gvfs-bin
./configure --prefix=/opt/holly/gvfs
# /opt/ is where I build my own code and it is set up so that all 
# created files are chown neil.neil.
$ make clean
$ make
$ make install

neil at holly:gvfs-0.2.1$ /opt/holly/gvfs/bin/gvfs-cat http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
gvfs-cat: http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc: error opening file: Operation not supported

neil at holly:gvfs-0.2.1$ sudo /opt/holly/gvfs/bin/gvfs-cat http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc
gvfs-cat: http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1.dsc: error opening file: Operation not supported

Same for the files in ./programs

Only once gvfs is reinstalled (gvfs-backends isn't needed for this
test), do the local programs work but again, only under sudo.

I also tried:
./configure --build=x86_64-linux-gnu --prefix=/opt/holly/gvfs
--includedir="\${prefix}/include" --mandir="\${prefix}/share/man"
--infodir="\${prefix}/share/info" --sysconfdir=/opt/holly/gvfs/etc
--localstatedir=/opt/holly/gvfs/var --libexecdir="\${prefix}/lib/gvfs"
--disable-maintainer-mode --disable-dependency-tracking --srcdir=.

(A modified version of how the package calls configure)

Is this to do with calling dbus or similar?

I noticed in the ChangeLog for gio:
2008-01-28  Matthias Clasen  <mclasen at redhat.com>

        * tests/g-file.c: Disable some tests that are failing in
        the absence of a http backend.

Maybe if those tests are re-enabled and fixed?

I commonly build libraries and programs, install into /opt/ and then
link against them or run them directly - I would have expected the
source (with all dependencies installed normally) to be able to build
and test (even remote tests) without having it's own packages installed
in the main system. (libgio-2.0.so is still installed). autotools are
normally quite good at sorting out directory mapping to allow that to
work so I'm wondering about a hard-coded path somewhere to /etc/
or /var/ for a lock file maybe or else some call to an existing program
that should be in userspace but is not? 

(Installing gvfs-fuse doesn't help - sudo is still needed to get
anything to work.)

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20080322/43174ad0/attachment.pgp 


More information about the pkg-gnome-maintainers mailing list