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 586411 - port bluetooth obexftp backend to libgudev
port bluetooth obexftp backend to libgudev
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: [obsolete] obexftp backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Martin Pitt
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-06-19 17:15 UTC by Martin Pitt
Modified: 2010-01-19 23:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
conditionalize hal support in obexftp backend (3.15 KB, patch)
2009-07-03 08:47 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2009-06-19 17:15:09 UTC
With hal being deprecated, it would be nice to be able to build gvfs without
hal. obexftp is one of the modules which need to be ported over to gudev.
Comment 1 Martin Pitt 2009-07-03 08:15:25 UTC
Hm, this confuses me a little bit. The only real thing that the obex backend does with hal is

  obex_devices = libhal_find_device_by_capability (hal_ctx, "obex", &num_obex_devices, NULL);

in _get_usb_intfnum_and_properties(); that is only called if

  if (!g_str_has_prefix(device, "[usb:"))

Now, hal itself defines the "obex" capability, but doesn't implement it, and I don't see anything in bluez which does that either.

I stopped hal, and I'm still able to connect to my mobile over bluetooth and get a proper gvfs mount:

Mount(0): Pittis Kommunikator -> obex://[00:16:BC:04:C8:A1]/
  Type: GDaemonMount

Is there some hal addon by bluez or another project which adds this "obex" capability? If so, this needs to be ported to udev rules and an ID_OBEX="1" tag or something such, and then we can gudevify the gvfs backend accordingly.

For now, I'll just conditionalize the hal specific bits, so that it's finally possible to build gvfs without hal.
Comment 2 Martin Pitt 2009-07-03 08:47:08 UTC
Created attachment 137772 [details] [review]
conditionalize hal support in obexftp backend

This patch builds the hal querying only if libhal is available at build time.
Comment 3 Martin Pitt 2009-07-03 08:48:22 UTC
Oh, just for the record, this patch needs to go on top of the cdda porting one in bug 586409 (which has the fundamental configure.ac changes).
Comment 4 David Zeuthen (not reading bugmail) 2009-07-08 17:29:23 UTC
Makes sense to me, pushed this for now. Bastien, your thoughts?
Comment 5 Bastien Nocera 2009-08-04 10:57:40 UTC
Is that supposed to be a working patch? It clearly won't be.

You need to remove the whole USB Obex support when HAL isn't present.
Comment 6 Bastien Nocera 2009-08-04 10:58:25 UTC
See bug 511671 for explanations about the state of the USB Obex support.
Comment 7 Martin Pitt 2009-08-04 12:02:45 UTC
> You need to remove the whole USB Obex support when HAL isn't present.

Do you have some details why? It works perfectly well without hal, and I don't actually see any project which adds "obex" capability devices into hal. Please see comment 1 for details.
Comment 8 Bastien Nocera 2009-08-05 14:17:05 UTC
(In reply to comment #7)
> > You need to remove the whole USB Obex support when HAL isn't present.
> 
> Do you have some details why?

Loads of unused variables, display_name and icon_name not set.

> It works perfectly well without hal, and I don't
> actually see any project which adds "obex" capability devices into hal.

See http://bugs.freedesktop.org/show_bug.cgi?id=18184

This needs porting to gudev, so leaving this bug opened.
Comment 9 Martin Pitt 2009-08-05 22:35:29 UTC
> See http://bugs.freedesktop.org/show_bug.cgi?id=18184
> This needs porting to gudev, so leaving this bug opened.

Sorry for my ignorance, but I fail what that bug has to do with this one. You can already get the vendor/product ID of an USB device with nowadays udev/libgudev.

> Loads of unused variables, display_name and icon_name not set.

Sure, but I don't know of anything which would poke bluetooth devices (the "obex" capability) into hal, and thus the existing hal support in the gvfs obex module seems pretty much dead to me. Do you know such a thing?
Comment 10 Bastien Nocera 2009-08-06 09:02:29 UTC
You seem confused. The Bluetooth ObexFTP support obviously doesn't use HAL. The USB ObexFTP support uses HAL.
Comment 11 Martin Pitt 2009-08-07 14:26:12 UTC
So can you please tell me which software sets the "obex" capability in hal, and thus needs to be ported to use gudev (or, respectively, how gvfs needs to be changed to detect it itself)?

(FYI, I'll be on holidays the next two weeks, so my response will take a while)
Comment 12 Alexander Kanavin 2009-11-03 21:42:09 UTC
The patch to remove the hal dependency altogether is available in bug 511671. You can close this as a duplicate ;)
Comment 13 Martin Pitt 2010-01-19 23:14:19 UTC
Thanks Alexander. So I retitled this bug to be bluetooth specific, and we'll keep bug 511671 for the USB obexftp part, so that this one can be closed.