libudev-zero ============ Drop-in replacement for libudev enables you to use any device manager you like without worrying about udev dependency at all! Why ? Because udev sucks, bloated and overengineered. udev is just like systemd, lock you into using non-portable crap that you can't avoid because many software depends on it. Look, even FreeBSD was forced to rewrite[1] this crappy library because libinput has mandatory udev dependency. Without libinput you can't use wayland and some other cool stuff. Michael Forney (cproc, samurai, Oasis Linux, ... author) decided to fork[2] libinput and remove udev mandatority. This is solution ? Yes. This is long term solution ? No. Patching upstream changes eventually will become absolutely nightmare. Also this fork has a lot of disadvantages like requiring static configuration which means you can't rely on automatic input devices discovering. Thanks god udev has stable API and hopefully no changes will be made in future. On this basis i decided to create this clean-room implementation of libudev which can be used with any or without device manager. [1] https://github.com/FreeBSDDesktop/libudev-devd [2] https://github.com/oasislinux/libinput What Works ---------- * [x] xorg-server * [ ] dosfstools - need implement udev_enumerate_add_match_parent() * [x] libinput * [x] usbutils * [x] wlroots * [x] weston * [x] libusb * [x] kwin - [fix](https://github.com/dilyn-corner/KISS-kde/commit/0cc72748e46f859a0fced55b0c3fcc1dd9586a38) * [ ] ??? Dependencies ------------ * C99 compiler (build time) * POSIX make (build time) * POSIX & XSI libc * epoll & inotify * Linux >= 2.6.39 Installation ------------ ```sh make make PREFIX=/usr install # will overwrite existing udev libraries if any # rebuild all packages which depends on udev # here we go ! ``` Hotplugging ----------- Note that hotplugging support is fully optional! You can skip this step if you don't have anything to hotplug. There is no complicated or overengineered way to use hotplugging. Everything is portable as much as possible. To use hotplugging the only thing you need is uevent's receiver (device manager, busybox `uevent`, CONFIG_UEVENT_HELPER, ...). I will describe only mdev and CONFIG_UEVENT_HELPER because their usage is very basic. For busybox `uevent` you need to write your own parser which is kinda ... complex. UDEV_MONITOR_DIR is arbitrary directory where uevent files stored. Default is `/tmp/.libudev-zero`. You can change it at build time by appending `-DUDEV_MONITOR_DIR=