Skip to contentSkip to conversation

Reorganizing the BlueZ source tree

RFC Gustavo Padovan 7 participants 18 messages May 24, 2012 – Jun 8, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi Everyone,

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools

attrib
doc
plugins
scripts
src
test
tools
unit

In the end we will have 10 folders instead of 28 in the current configuration. Folders like 'tools' can also be reorganized.

Gustavo

#1 lore raw

Hi Gustavo,

Quoted 30 lines · Gustavo Padovan

Hi Everyone,

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0) alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools

Quoted 8 lines

attrib
doc
plugins
scripts
src
test
tools
unit

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

Signature · 1 line
Luiz Augusto von Dentz
maintainer
#2 lore raw

Hi Luiz,

Quoted 37 lines
Quoted 28 lines

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools
Quoted 8 lines

attrib
doc
plugins
scripts
src
test
tools
unit

Quoted 3 lines

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

btio, gdbus, gobex and similar stay top-level. We are not going to change that.

Regards

Marcel

#3 lore raw

On Thu, May 24, 2012 at 5:34 AM, Marcel Holtmann <[email protected]> wrot= e:

Quoted 3 lines

Hi Luiz,

Quoted 1 line
Quoted 1 line

The last profiles addition to BlueZ increased a lot the number of fold=

ers we

Quoted 1 line
Quoted 1 line
Quoted 1 line

have in the root dir of the project and it looks like more profiles (a=

nd more

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tr=

ee and

Quoted 1 line
Quoted 1 line
Quoted 1 line

the following proposal where 2 new folders are created, 'profiles' and=

'libs'

Quoted 31 lines
Quoted 31 lines
Quoted 30 lines

and things are moved to them.

compat =A0 =A0 =A0 =A0 =A0-> /dev/null (will be removed on 5.0) alert =A0 =A0 =A0 =A0 =A0 -> profiles
audio =A0 =A0 =A0 =A0 =A0 -> profiles
cups =A0 =A0 =A0 =A0 =A0 =A0-> profiles
deviceinfo =A0 =A0 =A0-> profiles
health =A0 =A0 =A0 =A0 =A0-> profiles
input =A0 =A0 =A0 =A0 =A0 -> profiles
lib =A0 =A0 =A0 =A0 =A0 =A0 -> profiles
network =A0 =A0 =A0 =A0 -> profiles
proximity =A0 =A0 =A0 -> profiles
sap =A0 =A0 =A0 =A0 =A0 =A0 -> profiles
serial =A0 =A0 =A0 =A0 =A0-> profiles
thermometer =A0 =A0 -> profiles
time =A0 =A0 =A0 =A0 =A0 =A0-> profiles
btio =A0 =A0 =A0 =A0 =A0 =A0-> libs
gdbus =A0 =A0 =A0 =A0 =A0 -> libs
sbc =A0 =A0 =A0 =A0 =A0 =A0 -> libs
emulator =A0 =A0 =A0 =A0-> tools
mgmt =A0 =A0 =A0 =A0 =A0 =A0-> tools
monitor =A0 =A0 =A0 =A0 -> tools
attrib
doc
plugins
scripts
src
test
tools
unit

Quoted 6 lines
Quoted 3 lines

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

btio, gdbus, gobex and similar stay top-level. We are not going to change that.

If you are concerned about sharing gdbus patches, git am could do the work for you: "git am --directory=3Dlibs/"

But I'm not convinced about the "libs" directory... maybe move only profile= s?

Lucas De Marchi

#4 lore raw
In reply to Luiz Augusto von Dentz
Quoted 42 lines · Luiz Augusto von Dentz

Hi Gustavo,

Quoted 30 lines · Gustavo Padovan

Hi Everyone,

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools
Quoted 8 lines

attrib
doc
plugins
scripts
src
test
tools
unit

Quoted 3 lines

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

While you're at it, change gdbus' name to something that doesn't clash with the GIO GDBus.

maintainer
#5 lore raw

Hi Bastien,

Quoted 37 lines
Quoted 37 lines
Quoted 36 lines

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools

attrib
doc
plugins
scripts
src
test
tools
unit

Quoted 6 lines
Quoted 3 lines

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

While you're at it, change gdbus' name to something that doesn't clash with the GIO GDBus.

why would we? This code predates GIO GDBus.

Regards

Marcel

#6 lore raw
Quoted 39 lines · Marcel Holtmann

Hi Bastien,

Quoted 37 lines
Quoted 37 lines
Quoted 36 lines

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools

attrib
doc
plugins
scripts
src
test
tools
unit

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

While you're at it, change gdbus' name to something that doesn't clash with the GIO GDBus.

why would we? This code predates GIO GDBus.

Because people told you that your naming would clash once glib had an implementation of D-Bus, which you just laughed away.

maintainer
#7 lore raw

Hi Bastien,

Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
Quoted 28 lines

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0)
alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles
time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools
Quoted 8 lines

attrib
doc
plugins
scripts
src
test
tools
unit

Sounds good, the only problem are gdbus and btio, if we merge obexd into BlueZ btio will no longer be shared but for gdbus we would have to align with other projects as well.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

While you're at it, change gdbus' name to something that doesn't clash with the GIO GDBus.

why would we? This code predates GIO GDBus.

Because people told you that your naming would clash once glib had an implementation of D-Bus, which you just laughed away.

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not jumping through any hoops, because David wouldn't respect prior art.

Regards

Marcel

#8 lore raw
Quoted 6 lines · Marcel Holtmann

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

#9 lore raw

Hi Bastien

Quoted 9 lines · Bastien Nocera
Quoted 6 lines · Marcel Holtmann

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

Signature · 1 line
Luiz Augusto von Dentz
#10 lore raw
Quoted 7 lines · Luiz Augusto von Dentz

Hi Bastien

Quoted 4 lines · Bastien Nocera
Quoted 3 lines · Marcel Holtmann

and I still have all the rights to do so.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

GLib lives in a single tarball. It's only Marcel's hate for GObject and the apparent need to be able to replace glib that spawned this thin wrapper on top of libdbus you're using now.

GLib's APIs don't differentiate which shared library they come from.

maintainer
#11 lore raw

Hi Bastien,

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

How exactly would would have called a D-Bus implementation in GLib?

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

GLib lives in a single tarball. It's only Marcel's hate for GObject and the apparent need to be able to replace glib that spawned this thin wrapper on top of libdbus you're using now.

plain fact is that our gdbus code was there first.

If you wanna turn this into a GObject discussion now, then please find a mailing list that cares. It is clearly not this one.

Regards

Marcel

#12 lore raw
Quoted 10 lines · Marcel Holtmann

Hi Bastien,

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

GLib lives in a single tarball. It's only Marcel's hate for GObject and the apparent need to be able to replace glib that spawned this thin wrapper on top of libdbus you're using now.

plain fact is that our gdbus code was there first.

Nice comeback.

Quoted 1 line

If you wanna turn this into a GObject discussion now,

I don't. I'm merely pointing out that a file layout change might be a good time to fix potential symbol clashes.

Quoted 2 lines

then please find a
mailing list that cares. It is clearly not this one.

I think you've made this abundantly clear. I don't think this attitude is helping BlueZ thrive, when it's far less friction to fix problems higher up in the stack.

maintainer
#13 lore raw

Hi Bastien,

Quoted 24 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

GLib lives in a single tarball. It's only Marcel's hate for GObject and the apparent need to be able to replace glib that spawned this thin wrapper on top of libdbus you're using now.

plain fact is that our gdbus code was there first.

Nice comeback.

Quoted 1 line

If you wanna turn this into a GObject discussion now,

I don't. I'm merely pointing out that a file layout change might be a good time to fix potential symbol clashes.

Quoted 6 lines
Quoted 2 lines

then please find a
mailing list that cares. It is clearly not this one.

I think you've made this abundantly clear. I don't think this attitude is helping BlueZ thrive, when it's far less friction to fix problems higher up in the stack.

we will move away from GLib and libdbus (and also libnl) altogether at some point soon anyway. Then this discussion becomes mood.

Our problems are the memory footprint and the abstractions done purely for making this run on Windows. With the embedded consumer electronics devices that we target this is creating more and more issues these days.

Regards

Marcel

#14 lore raw
Quoted 29 lines · Marcel Holtmann

Hi Bastien,

Quoted 27 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

and I still have all the rights to do so.

As long as we are still based on GLib, this will stay as it is. I am not
jumping through any hoops, because David wouldn't respect prior art.

How exactly would would have called a D-Bus implementation in GLib?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Well you could have called godbus as that is more a gobject binding than a pure glib/GMainLoop one.

GLib lives in a single tarball. It's only Marcel's hate for GObject and the apparent need to be able to replace glib that spawned this thin wrapper on top of libdbus you're using now.

plain fact is that our gdbus code was there first.

Nice comeback.

Quoted 1 line

If you wanna turn this into a GObject discussion now,

I don't. I'm merely pointing out that a file layout change might be a good time to fix potential symbol clashes.

Quoted 2 lines

then please find a
mailing list that cares. It is clearly not this one.

Quoted 6 lines
Quoted 3 lines

I think you've made this abundantly clear. I don't think this attitude is helping BlueZ thrive, when it's far less friction to fix problems higher up in the stack.

we will move away from GLib and libdbus (and also libnl) altogether at some point soon anyway. Then this discussion becomes mood.

Will you be implementing your own D-Bus library, or do you have plans to switch to something completely different?

Quoted 2 lines

Our problems are the memory footprint and the abstractions done purely for making this run on Windows.

The abstraction aren't there for Windows, they're there to allow for better APIs, avoiding functional changes in the underlying system[1] and making developer's lives easier.

Quoted 2 lines

With the embedded consumer electronics
devices that we target this is creating more and more issues these days.

When consumer electronics are faster and faster, and with more and more RAM, I doubt that GLib or GObject's memory footprint is a huge issue. I'm not saying it's not an issue at all, but I doubt it's what causes problems (versus missing features for example) when vendors select a Linux Bluetooth stack.

[1]: the application developer shouldn't have to choose whether inotify, fanotify or FAM is better suited for their file monitoring support for example, or which one is going to work with which version of the kernel, or which storage. Being able to use GIO for that purpose would have made the adaptername plugin much simpler for example.

#15 lore raw
In reply to Gustavo Padovan

Hi Gustavo,

Quoted 1 line · Gustavo Padovan

lib -> profiles

Was this a typo? I'd have suggested to rename the existing "lib" to the new "libs" and after that start moving the other "lib" subdirectories there. The existing content of lib might also be reorganized, e.g. move SDP code into libs/sdp/

Johan

#16 lore raw

Hi Johan,

Quoted 9 lines · Johan Hedberg

Hi Gustavo,

Quoted 1 line · Gustavo Padovan

lib -> profiles

Was this a typo? I'd have suggested to rename the existing "lib" to the new "libs" and after that start moving the other "lib" subdirectories there. The existing content of lib might also be reorganized, e.g. move SDP code into libs/sdp/

Yes, it is a typo. lib -> libs was the right assignment here.

Gustavo

#17 lore raw
In reply to Gustavo Padovan
Quoted 23 lines · Gustavo Padovan

Hi Everyone,

The last profiles addition to BlueZ increased a lot the number of folders we have in the root dir of the project and it looks like more profiles (and more folders) are expected to come.

I talked a bit with Johan about changing the hierarchy of the BlueZ tree and the following proposal where 2 new folders are created, 'profiles' and 'libs' and things are moved to them.

compat          -> /dev/null (will be removed on 5.0) alert           -> profiles
audio           -> profiles
cups            -> profiles
deviceinfo      -> profiles
health          -> profiles
input           -> profiles
lib             -> profiles
network         -> profiles
proximity       -> profiles
sap             -> profiles
serial          -> profiles
thermometer     -> profiles

Quoted 8 lines

time            -> profiles
btio            -> libs
gdbus           -> libs
sbc             -> libs
emulator        -> tools
mgmt            -> tools
monitor         -> tools
attrib

attrib needs a bit of reorganization as well. tl;dr: we need to figure how to do it.

gatttool should be moved from attrib to tools, and we're not completely sure where to put the rest of it. The code there implements the generic attribute API, which register a D-Bus interface but is not a profile plugin, since there is nothing to trigger its probe. Additionally, this API is concurrent with some of the profiles we have now implemented, so I think there should be a way to enable/disable it based on user configuration (then it would work pretty much as a profile, what could be an argument to move it to 'profiles', but is not a profile from the spec point of view, which is an argument against it).

Quoted 6 lines

doc
plugins
scripts
src
test
tools

What is the differentiation between test and tools? It seems at least part of tests (simple-agent for example) looks more like a tool than like a simple test script.

Quoted 1 line

unit

Why not move unit tests to tests as well?

Quoted 5 lines

In the end we will have 10 folders instead of 28 in the current configuration. Folders like 'tools' can also be reorganized.

I'm really supportive of this idea.

Signature · 2 lines
João Paulo Rechi Vita
Openbossa Labs - INdT