udisks library use with a replacement daemon: library-only knob?

Vojtěch Trefný vtrefny at redhat.com
Fri Sep 6 07:52:56 UTC 2019



On 9/6/19 4:56 AM, Pau Amma wrote:
> On Fri, September 6, 2019 1:23 am, David Lehman wrote:
>> On Fri, 2019-09-06 at 01:07 +0000, Pau Amma wrote:
>>> I'm considering using just the library from udisks with a replacement
>>> daemon, for use on FreeBSD systems. However, some of the dependencies
>>> stand in my way, like the blockdev library, which as far as I can
>>> tell is
>>> only needed for the daemon (so not really relevant to my purpose).
>>> Before
>>> I start removing everything concerning the daemon and its
>>> dependencies
>>> from the configure script, the makefiles, and all other needed
>>> places, I
>>> thought I'd ask: do you provide a library-only configuration and
>>> compilation knob I missed? If not, would you consider adding one
>>> (maybe
>>> with my help) to a future version?
>>
>> Unfortunately, udisks is a bit upside-down in this regard. I'm sure
>> someone will correct me if I'm wrong, but I believe libudisks is
>> actually a wrapper around the daemon (as crazy as that is/sounds).
> 
> I believe that you're correct, but that (unless I'm missing something)
> libudisks and the daemon communicate using the Dbus message API. 

Yes, so libraries like libblockdev shouldn't be needed for libudisks,
only for the daemon.

> So it
> should be possible to use the library with a FreeBSD-specific daemon (that
> already exists) providing the same messaging interface.

There might be some other issues with this, libudisks code is generated
from the UDisks code using GDBus codegen so there might be some
dependencies to the daemon. As far as I know, nobody tried to do
something like this, but it should be possible.

> 
>> If what you want is a library that can manage various kinds of local
>> storage you probably want libblockdev. It is what udisks uses to
>> interact with the various types of storage.
> 
> I'm mostly interested in a library that will let me know whether/when
> removable storage devices (like USB memory sticks) or media (like CDs or
> DVDs) become available for mounting. Am I looking in the wrong place with
> libudisks?

If there is a FreeBSD daemon that provides UDisks functionality it might
be easier to build a new library using it directly instead of trying to
use libudisks for that.
But I'm definitely not against using libudisks this way and patches/PRs
are always welcome :-)

> 
> _______________________________________________
> devkit-devel mailing list
> devkit-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/devkit-devel
> 


More information about the devkit-devel mailing list