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 697537 - don't require/compile bluetooth on non supported platforms
don't require/compile bluetooth on non supported platforms
Status: RESOLVED DUPLICATE of bug 601890
Product: gnome-user-share
Classification: Core
Component: bluetooth
3.8.x
Other OpenBSD
: Normal normal
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-08 08:54 UTC by Antoine Jacoutot
Modified: 2013-05-07 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
disable bluetooth on !linux (6.06 KB, patch)
2013-04-08 08:54 UTC, Antoine Jacoutot
needs-work Details | Review
disable bluetooth on !linux v2 (10.15 KB, patch)
2013-04-10 08:36 UTC, Antoine Jacoutot
none Details | Review
disable bluetooth on !linux v3 (13.27 KB, patch)
2013-04-11 10:13 UTC, Antoine Jacoutot
none Details | Review

Description Antoine Jacoutot 2013-04-08 08:54:30 UTC
Created attachment 240930 [details] [review]
disable bluetooth on !linux

Hi.

This patch allows to use gnome-user-share on platforms where gnome-bluetooth is not available (for proper functionality of the bluetooth, bluez is required which means udev).

I'm been using this successfully on OpenBSD to share Public folders for users using webdav.

Thoughts?
Comment 1 Bastien Nocera 2013-04-08 09:06:55 UTC
Review of attachment 240930 [details] [review]:

You'd also need to split the bluetooth configuration into its own schema. Bluetooth sharing configuration makes no sense if the program is built without Bluetooth support.

::: configure.ac
@@ +133,3 @@
+fi
+
+dnl ==========================================================================

You can remove that line.

::: src/user_share.c
@@ +72,3 @@
 obex_services_start (void)
 {
+#ifdef HAVE_BLUETOOTH

Make sure that only functions that reference gnome-bluetooth structures are ifdef'ed.

@@ +187,3 @@
 bluez_init (void)
 {
+#ifdef HAVE_BLUETOOTH

You'd need to return FALSE here so that other non-private functions in the file aren't even called.
Comment 2 Antoine Jacoutot 2013-04-08 09:34:05 UTC
(In reply to comment #1)
> Review of attachment 240930 [details] [review]:
> 
> You'd also need to split the bluetooth configuration into its own schema.
> Bluetooth sharing configuration makes no sense if the program is built without
> Bluetooth support.

Hi Bastien.

Thanks for all the feedback, I'll work on that.
As for the schema file, I didn't split it at first because I was following gnome-settings-daemon behavior which installs the wacom schema even when wacom is disabled.
Comment 3 Antoine Jacoutot 2013-04-08 10:10:04 UTC
Ok, couple of questions.

> You'd also need to split the bluetooth configuration into its own schema.
> Bluetooth sharing configuration makes no sense if the program is built without
> Bluetooth support.

If I split the schema, wouldn't id and path need to be modified as well? If so, that'd be bad I guess since previous configuration would not be taken into consideration.

> @@ +187,3 @@
>  bluez_init (void)
>  {
> +#ifdef HAVE_BLUETOOTH
> 
> You'd need to return FALSE here so that other non-private functions in the file
> aren't even called.

It's a void, am I really supposed to return something here. Or did I misunderstand what you meant?
Comment 4 Antoine Jacoutot 2013-04-10 08:36:03 UTC
Created attachment 241125 [details] [review]
disable bluetooth on !linux v2

Ok, new patch based on your feedback.

I didn't touch bluez_init(), I'd rather confirm with you whether
returning FALSE there makes sense or not.
Comment 5 Antoine Jacoutot 2013-04-10 17:14:30 UTC
Bah, needs more work...

(gnome-user-share:23755): GLib-GIO-ERROR **: Settings schema 'org.gnome.desktop.file-sharing' does not contain a key named 'bluetooth-enabled'
Comment 6 Antoine Jacoutot 2013-04-11 10:13:17 UTC
Created attachment 241233 [details] [review]
disable bluetooth on !linux v3

This patch does the trick for me. However, I am really not sure at all I'm doing the correct thing wrt gsettings splitting... I'll wait for your input before going further.
Thanks Bastien.
Comment 7 Emilio Pozuelo Monfort 2013-05-06 17:16:02 UTC
This is a duplicate of #601890 which also has an patch against git master (as of one month ago)
Comment 8 Emilio Pozuelo Monfort 2013-05-07 10:07:52 UTC

*** This bug has been marked as a duplicate of bug 601890 ***