Re: udev rules for usb devices?
This has been a nice discussion.
My motivation comes from this requirement:
> > * If and when the shared library's SONAME advances, old and new
> >> versions will still be coinstallable as needed to allow for
> >> smooth transitions.
Doing a survey of packages that install rules files
to /lib/udev/rules.d/ (wow - so many are mine!)
https://packages.debian.org/search?searchon=contents&keywords=rules&mode=path&suite=unstable&arch=any
From reading `man udev`:
Upstream source releases should probably suggest that users who build
from source place udev rules files in /etc/udev/rules.d/
Packages should install to /lib/udev/rules.d/
Some packages, like libsigrok, install via debian/rules. Others, like
libopenni-sensor-pointclouds0, use a debian/[packagename].udev file.
And people who are not me tend to keep udev rules in the library package.
But wait, there's more... Appstream
https://www.freedesktop.org/software/appstream/docs/
http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html
I think I finally got it right in rtl-sdr.
The library package librtlsdr0
installs /lib/udev/rules.d/60-librtlsdr0.rules as well
as /usr/share/metainfo/librtlsdr0.metainfo.xml
All paths change when the library package name changes on soname bumps, so libraries remain coinstallable.
(With maybe a bit of udev rule duplication when multiple library versions are installed.)
At this time I am thinking that adding udev rules and appstream metadata to the
libiio0 library package is the best way forward. (Keeping the string "libiio0" in all paths.)
-Maitland
Reply to: