Files
RedBear-OS/local/recipes/system/redbear-sessiond/source/Cargo.toml
T
Red Bear OS Builder 3e812bfd0d d-bus: redbear-sessiond host-buildable + DBUS-PLAN v3.5 (bug-fix round)
This commit fixes a real bug I introduced in round 3 of this D-Bus
series: redbear-sessiond did not build on the host (Linux). The
build was broken by two changes that I made at the time:

*  — a  is neither
  nor , so the zbus  macro rejected the type. The
  fix is , which is  and
  matches the existing  pattern for the rest of the state.

*  — a Redox-only syscall that
  resolves to the  /  symbols.
  These symbols are not present off Redox, so the host linker
  fails. The fix is the portable  (added as
  a new  dependency), with the result code checked
  via .

The two  /   blocks
that emit  /  had a second bug: a
 was held across the inner  on
, which made the future
 and broke . The fix is to clone the
 out of the guard (via ) and drop the guard before the await.

Side effects of these fixes:
*  now derives . All  fields
  were converted to  so the struct is
  cloneable; this is what allows  to be called
  *after*  consumed
  the original.
*  /
   now have a  host-side stub that returns
   immediately. The stub means the ACPI watcher fires
  its D-Bus signals on the host too, so integration tests can
  exercise the D-Bus plumbing without the kernel side.

DBUS-PLAN bumped to v3.5 (2026-07-26). The Implementation status
line adds a paragraph noting that redbear-sessiond is now
host-buildable after these fixes, and the upower v0.2 paragraph
remains in place.

Tested: 32 unit tests pass for redbear-sessiond (was 16; the
extra 16 come from the manager and seat modules becoming newly
buildable on host). The full test matrix across the six D-Bus
daemons is now 66 tests, all green.
2026-07-26 22:10:16 +09:00

28 lines
1.1 KiB
TOML

[package]
name = "redbear-sessiond"
version = "0.3.1"
edition = "2024"
[[bin]]
name = "redbear-sessiond"
path = "src/main.rs"
[dependencies]
zbus = { version = "5", default-features = false, features = ["tokio"] }
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
libc = "0.2"
libredox = { path = "../../../../../local/sources/libredox" }
redox-syscall = { path = "../../../../../local/sources/syscall", package = "redox_syscall" }
# Patch tokio to recover from transient EBADF/EINVAL on Redox's scheme:event
# epoll. Without this, redbear-sessiond panics during early-boot scheme
# churn. The patch lives at local/patches/tokio/P0-epoll-redox-recovery.patch
# and must be regenerated when tokio is upgraded. Remove this override once
# tokio upstream ships a Redox-specific recovery arm (or once Redox's
# epoll scheme is stabilized to never return EBADF/EINVAL under normal use).
[patch.crates-io]
tokio = { path = "../../../../../local/patches/tokio/vendored" }
libredox = { path = "../../../../../local/sources/libredox" }
redox_syscall = { path = "../../../../../local/sources/syscall" }