keventd: serve org.finit.Device1 on /run/keventd/bus

The udev parity gaps that were blocked on IPC -- settle, trigger,
info, queue introspection, runtime rule reload -- become bus methods.
keventd serves its own socket the way Finit serves /run/finit/bus:
brokerless, libink, one socket per daemon, no forwarding between the
two.

  Settle(u) -> b      parked until the queue drains or the timeout
                      passes; true when settled
  Trigger(s, s)       replay events, action + subsystem glob
  Info(s) -> a{ss}    /run/udev/data properties for a devpath
  RulesReload() -> u  re-read rules dirs, returns rule count
  QueueEmpty (b), SeqnumProcessed (t) properties
  DeviceProcessed (ss) signal after each fully handled event

The queue state is the highest kernel seqnum keventd has handled,
baselined at startup, against /sys/kernel/uevent_seqnum.  keventd -S
now asks the running daemon first and falls back to seqnum polling.
In passive mode Trigger and RulesReload refuse.  Adds
link_call_connection() for the park bookkeeping.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-08-16 22:03:43 +02:00
1 parent 6e60b8183a
commit 292e87c0d1
10 files changed
+811 -23

No files matched your search

+7
View File
@@ -51,6 +51,13 @@ All relevant changes are documented in this file.
- New `org.finit.Cond1` interface at `/org/finit/cond`: `Get`, `Set`,
`Clear`, `List`, `Dump` for [user-defined conditions](conditions.md),
with a `ConditionChanged (ss)` signal
- keventd serves `org.finit.Device1` on its own bus at
`/run/keventd/bus`: `Settle`, `Trigger`, `Info`, `RulesReload`,
queue-state properties, and a `DeviceProcessed (ss)` signal. The
`udevadm` settle/trigger/info equivalents are thereby bus methods
and `keventd -S` asks the running daemon first. Finit also gained a
`Manager1.ConfigReloaded` signal, fired when `initctl reload`
completes, for external condition providers and monitoring
- Privileged D-Bus methods accept root and members of the
`--with-group` group; everyone else is refused. On the local bus
the caller's uid and groups come straight from the kernel