On Thursday, September 26, 2019 9:59 PM, A. Maitland Bottoms <[email protected]> wrote: > 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. [snip] > >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
The differences is librtl is for a specific piece of hardware, the udev file is a collection of VIDs/PIDs for the various RTL clones out in the wild. https://github.com/steve-m/librtlsdr/blob/master/debian/librtlsdr0.udev libiio is a generic library, that isn't specific to any hardware, but works with lots of hardware, from many different vendors. It has built in auto discovery, and enumeration. It doesn't care what the hardware is. We (and others) use it with Rasberry Pi connected to an Inertial Measurement Unit, as much as for ADALM-PLUTO or ADALM2000. There was some discussions by the development team discussion things, and the desire not to put PID/VID in the generic library at: https://github.com/analogdevicesinc/libiio/issues/57 which is how we ended up with any iio device, and calling one of the utilities ( iio_info -s ) in the udev rule. >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.) Which makes sense, but then iio_info needs to be in the library package, since that is what the udev rule shells out to. -Robin

