goodev/goodev: udev rule execution engine - Codeberg.org
This website requires JavaScript.
goodev/goodev
Watch
Star
Fork
Code
Issues
Pull requests
Activity
udev rule execution engine
631 commits
1 branch
1 tag
1.1 MiB
Scheme
90.2%
Tree-sitter Query
8.5%
Makefile
0.7%
M4
0.3%
Shell
0.3%
main
Find a file
HTTPS
Download ZIP<br>Download TAR.GZ<br>Download BUNDLE
Open with VS Code
Open with VSCodium
Open with Intellij IDEA
Repository files (latest commit first)
Filename<br>Latest commit message<br>Latest commit date
Marius Bakke
16a32bfd6a
daemon: Clarify --monitor option.
...<br>* goodev/daemon/options.scm (display-help-and-exit): Be more explicit<br>about what --monitor does.
2026-07-27 13:25:35 +02:00
build-aux
Remove test hwdb files from repository.
2025-12-17 10:10:25 +01:00
doc
doc: Tweak hacking section.
2026-07-27 12:37:11 +02:00
goodev
daemon: Clarify --monitor option.
2026-07-27 13:25:35 +02:00
hwdb
Move the help and version options to the end of the help text.
2026-07-27 13:08:36 +02:00
scripts
Remove leftover script.
2026-01-16 20:03:46 +01:00
tests
builtin: blkid: Fix the device node file name passed to blkid(8).
2026-07-25 20:10:05 +02:00
.dir-locals.el
Add .dir-locals.el.
2026-07-24 17:52:23 +02:00
.gitignore
Add support for embedding version information.
2026-07-27 13:00:03 +02:00
configure.ac
Add support for embedding version information.
2026-07-27 13:00:03 +02:00
COPYING
Add GPL3
2024-07-11 22:43:42 +02:00
COPYING-LGPL
Add LGPL.
2026-07-09 04:44:40 +02:00
guix.scm
Update guix.scm.
2026-07-25 00:52:24 +02:00
Makefile.am
Add support for embedding version information.
2026-07-27 13:00:03 +02:00
README.md
Update README.
2026-07-24 22:26:22 +02:00
TODO
Update TODO.
2026-07-24 22:54:25 +02:00
README.md
Goodev -- runtime device management
What is Goodev?
Goodev is a compiler and runtime for the udev rules commonly found on GNU/Linux<br>systems. It also includes an implementation of the hardware database that such<br>rules rely on.
What does it mean?
It means Goodev can execute udev rules and do the requested actions when hardware<br>devices are added or removed from the system.
So, just like udev?
Yes. However, Goodev does not currently provide libudev. Nor is it<br>inherently tied to Linux.
Wait, not tied to Linux?
The code that hooks into Linux is fairly trivial and can easily hook into other<br>operating system interfaces. Support for other operating systems is planned.
How does it work?
goodev-daemon starts by reading the rule files and compiling them to an internal<br>representation. Then it loads the hardware database, and waits for kernel device<br>notifications. When a change in state is detected (e.g. USB disconnect), all rules<br>are "run" against the event properties.
Why should I use it?
If you are a happy udev user, you probably shouldn't. Goodev has not been tested<br>on gazillions of hardware combinations like udev has.
But if you are not afraid to tinker with your system and care about the<br>"code surface" of critical system components you might want to give it a try.
How do I use it?
Probably you should find a way to disable udev on your system. Then have<br>goodev-daemon start in its lieu[*]. However, there are some important<br>differences:
Some "esoteric" hardware are currently unsupported by the goodev builtins<br>(joysticks, storage arrays, etc).
IMPORT{program} without absolute file names are looked up in<br>$GOODEV_LIBEXEC_DIRS instead of /lib/udev. That means you should set<br>GOODEV_LIBEXEC_DIRS=/lib/udev to benefit from existing udev helper programs.<br>Longer term, goodev aims to provide replacements for all such utilities.
Limited OPTIONS support.
Goodev does not include any udev rules, nor hardware database files.
Thus, you most likely still need the rules and executables provided by (e)udev.
[*] Udev rules are generally idempotent, so you don't have to disable udev.<br>For testing, Goodev includes a dry-run mode that only prints what changes would<br>be done on your system. No root privileges necessary.
To try it, run:
./pre-inst-env goodev-daemon --dry-run<br>...from a compiled checkout of this repository. You may want to run<br>./pre-inst-env goodev-hwdb update first so rules querying hwdb will work.
How do I install it?
Dependencies
GNU Guile 3.0 or later.
Guile-Netlink for kernel event<br>monitoring and network interface renaming.
modprobe (optional; used by the "kmod" builtin).
blkid (optional; used by the "blkid" builtin).
ethtool (optional; used by the "net_driver" builtin).
setfacl (optional; used by the "uaccess" builtin).
If you have GNU Guix installed, you can enter a transient environment with<br>these dependencies available by running guix shell inside this repository.
Building
Once the prerequisites are available, you can build and install using the<br>GNU build system:
autoreconf -vif<br>./configure<br>make<br>make check<br>sudo make install<br>Alternatively, with GNU Guix:
guix package -f guix.scm<br>Then you can use goodev-daemon,...