Re: udev rules for usb devices?
On 26 Sep 2019, at 03:05, Aaron M. Ucko <ucko@debian.org> wrote:
>
> "Getz, Robin" <Robin.Getz@analog.com> writes:
>
>> which that means when someone installs the base library (libiio), they
>> can't actually use any USB devices (as a non-root user), since the
>> udev rule isn't installed, and the udev rule is dependent on the
>> libiio-utils package.
>
> I'd suggest putting the udev rule in the -utils package and having the
> runtime library package (libiio0) recommend that package. (A hard
> dependency would create a cycle, but downgrading the relationship is
> sufficient to stay out of trouble.) This approach has three big things
> going for it:
>
> * The rule will be in the same binary package as the tool it needs.
>
> * APT will then automatically encourage users of the library to install
> the -utils package, complete with the rule and the tool.
>
> * If and when the shared library's SONAME advances, old and new versions
> will still be coinstallable as needed to allow for smooth transitions.
>
> I suppose you could consider splitting iio_info and the rule out into
> their own binary package and having the runtime package recommend just
> that package, but the whole -utils package is small enough that I
> wouldn't bother.
Personally I'd do this, especially since it sounds like the library isn't
much use without any devices. In particular, I would make libiio0 have a
hard dependency on libiio-common.
James
Reply to: