- Package:
- src:s390-dasd
- Source:
- s390-dasd
- Submitter:
- Michael Biebl
- Date:
- 2021-08-10 21:39:03 UTC
- Severity:
- important
Hello, Some years ago libsysfs (source package: sysfsutils) was written as an abstraction layer for accessing /sys/. However, this turned out to be a historical error and evolutionary dead end: It does not actually abstract anything (it's just as specific to the Linux kernel and a particular version thereof as /sys itself), and just adds unnecessary complexity, RAM overhead, and bugs. Thus its development has ceased years ago, in favor of programs just using /sys as it is. In fact, most applications probably don't want to access /sys at all, but use libudev [1] or gudev [2] instead. These provide a better API for device enumeration, properties, and callbacks for hardware changes. This package is one of the few which still use the old libsysfs. Can you please check with upstream to prepare a migration away from libsysfs to using plain /sys or libudev? I hope that we can drop the old libsysfs entirely for wheezy. Thank you for considering! [1] http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/ [2] http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/
Hi Michael, I can see how we ended up here, but it still does abstract something away: access to sysfs, avoiding bugs in accessing it from C in the process. Both this and s390-netdevice use libsysfs to iterate over devices on a specified bus, extracting and writing some attributes (stuff like "online" (r/w), "devtype" (r/o), "cutype" (r/o), setting the ccwgroup, layer2 and portno settings on Ethernet adapters). Is that something libudev would be suitable for? If so, it'd need to grow a udeb. Interestingly enough glib does have a udeb. Would that mean that gudev could be a potential option? Would that just require a udeb for udev and one for gudev (which has 40k on my system)? That might be more pleasant to work with. Unfortunately for this and s390-netdevice there's no upstream to work with. This link is broken. And so is this one. Kind regards Philipp Kern
Hi! Upstream development for sysfsutils is still going, they have f.ex. merged all patches Debian was carrying, plus several cleanup patch series I've sent, and have done new upstream releases. As the current maintainer in Debian I do not consider it obsolete, and would encourage anyone to use it, in preference of having to manually parse stuff from /sys. Indeed. So from my side, if you'd like to switch to something else, for whatever reason, that's fine, but if you'd rather keep using libsysfs, then that should also be fine. Thanks, Guillem