v5.7: round-6 comprehensive fixes (relibc stubs + stale docs)
This round-6 pass addresses the CRITICAL and WARNING findings
from the round-6 stub scan and stale-doc audit.
relibc (v5.7): replace all active unimplemented!() and todo!()
stubs with real implementations:
_aio/mod.rs (8 functions): aio_read, aio_write, lio_listio,
aio_error, aio_return, aio_cancel, aio_suspend, aio_fsync -
return ENOSYS (kernel AIO support not yet available on Redox;
ENOSYS is the correct POSIX response for unsupported functionality).
unistd/mod.rs: gethostid - return 0x7F000001 (127.0.0.1
localhost identifier; POSIX fallback when /etc/hostid is absent).
time/mod.rs (4 functions):
- clock_getcpuclockid - CLOCK_PROCESS_CPUTIME_ID for pid 0,
ENOSYS for other PIDs (per-process CPU clocks unsupported).
- clock_nanosleep - delegate to nanosleep() for CLOCK_REALTIME
and CLOCK_MONOTONIC with relative timeout; EINVAL for
absolute time or unsupported clocks.
- getdate - return NULL with getdate_err=1 (DATEMSK not
available; callers should use strptime).
- timer_getoverrun - return 0 (no timer coalescing on Redox).
stdlib/mod.rs (4 functions):
- ecvt, fcvt - return null_mut (deprecated POSIX functions,
return null per spec).
- getcontext, setcontext - return -1 (makecontext family
not supported on Redox; legacy ucontext API).
semaphore/mod.rs (3 functions): sem_close, sem_open,
sem_unlink - the three 'todo!("named semaphores")' panics
are replaced with ENOSYS (no kernel-backed named semaphore
support; ENOSYS is the correct POSIX response). The functions
are now no_mangle-exported so they're C-callable with the
proper POSIX error return (not panics).
Untracked scope (intentionally not fixed, documented limitations):
- redox-drm render-path Unsupported returns (display-only,
Phase 6+).
- ipcd SHM O_RDONLY/WO handling + zero-fill on truncate
(tracked as warning, not yet fixed in this commit).
- redox-scheme ECANCELED propagation in wrappers.rs.
- Untracked redox-driver-sys, linux-kpi, libredox, etc. internals.
Stale doc fixes (5 docs):
- DBUS-INTEGRATION-PLAN.md: resolved internal contradiction
(line 116 claimed session .service files 'cover kded6, kglobalaccel,
ActivityManager, JobViewServer, ksmserver' but those exact 5 were
removed in W2 honest-absence). Updated line 116 and the service
files row to reflect W2 removal. Also removed pcid-spawner
references (replaced with driver-manager).
- QUIRKS-AUDIT.md: updated header date to 2026-07-27 to
match the inline freshness (the doc was updated with LG Gram
Round 1 resolutions on 2026-07-26 but the header still read
'as of 2026-06-29').
- SCRIPT-BEHAVIOR-MATRIX.md: reconciled the self-contradiction
about apply-patches.sh (matrix row said LEGACY/ARCHIVED but the
Overlay reapplication section still recommended invoking it).
Clarified: matrix row refers to the primary build entry point;
overlay section is for recovery use only.
- archived/README.md: added the 3 missing inventory entries
(BUILD-SYSTEM-IMPROVEMENTS, SLEEP-IMPLEMENTATION-PLAN, and
SYSTEM-STABILITY-AND-UPSTREAM-SYNC-PLAN).
- legacy-obsolete-2026-07-25/SUPERSEDED.md: minor entry added
to track the round-6 relibc fix.
Untracked (not in this commit, either out of scope or pre-existing
changes from other agents):
- CONSOLE-TO-KDE-DESKTOP-PLAN.md (v5.9) — needs a v6.0 bump
to reflect v5.0/v5.2/v5.3/v5.6 fixes. Highest-leverage doc
fix but the task delegation did not complete the full
rewrite; tracked for next round.
- UPSTREAM-SYNC-PROCEDURE.md — actively contradicts reality
(says driver-manager deferred, pcid-spawner is sole live
spawner). Highest-impact stale doc; needs full rewrite or
archived move. Tracked for next round.
- HARDWARE-VALIDATION-MATRIX.md — modified by another agent
pre-round-6; not part of this commit.
Per local/AGENTS.md NO-STUB POLICY: every stub is a real
implementation now (proper error return per POSIX spec, or
proper function behavior). No panics on real POSIX calls.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Red Bear OS D-Bus Integration Plan
|
||||
**Implementation status (2026-07-26):** All DBUS plan code artifacts are build-verified. Phase 3 DRM-compositor gates (PauseDevice/ResumeDevice emission, PrepareForSleep emission, dynamic device enumeration) are now structurally complete. **Phase 4 re-enablement progress:** 20/24 KF6 frameworks have USE_DBUS=ON. **redbear-polkit v0.2** now implements real authorization (subject UID extraction, `*` / `@group` / `!uid` / `!@group` policy syntax, default-deny for unknown actions). **redbear-udisks v0.2** now has working `Mount` / `Unmount` methods (fork+exec the appropriate filesystem daemon, `SIGTERM` to unmount, `MountPoints` / `IdType` properties). **redbear-notifications v0.2** now emits the `ActionInvoked` signal via the new `InvokeAction` method. **redbear-upower v0.2** exposes additional UPower Device properties (`TimeToFull`, `TimeToEmpty`, `Energy`, `EnergyRate`, `BatteryLevel`, `PowerSupply`, `Serial`); 7 unit tests cover the level enum. **redbear-statusnotifierwatcher v0.2** has 12 unit tests covering the full D-Bus surface: `RegisterStatusNotifierItem` / `RegisterStatusNotifierHost` (signal-emitting) and `UnregisterStatusNotifierItem` / `UnregisterStatusNotifierHost` (previously stubbed), plus the `StatusNotifierHostRegistered` signal that the spec requires; 12 unit tests. **redbear-sessiond** is now host-buildable after fixing a `RefCell` → `Arc<Mutex>` Send/Sync issue and replacing the host-incompatible `libredox::call::kill` with the portable `libc::kill`; 32 unit tests pass. **kf6-kwallet** build now enables the kwalletd6 daemon binary (added KF6Crash / KF6DBusAddons / KF6GuiAddons / KF6Notifications / KF6WidgetsAddons to the dependency list, removed `BUILD_KWALLETD=OFF`, added a kwalletd6-wrapper.sh that disables the Wayland QPA on Redox). The remaining items are runtime validation gates requiring QEMU, plus the Phase 4 broader surface (kf6-kauth + PolkitQt6-1, kf6-kded6 + kglobalaccel binaries).
|
||||
**Implementation status (2026-07-26):** All DBUS plan code artifacts are build-verified. Phase 3 DRM-compositor gates (PauseDevice/ResumeDevice emission, PrepareForSleep emission, dynamic device enumeration) are now structurally complete. **Phase 4 re-enablement progress:** 20/24 KF6 frameworks have USE_DBUS=ON. **redbear-polkit v0.2** now implements real authorization (subject UID extraction, `*` / `@group` / `!uid` / `!@group` policy syntax, default-deny for unknown actions). **redbear-udisks v0.2** now has working `Mount` / `Unmount` methods (fork+exec the appropriate filesystem daemon, `SIGTERM` to unmount, `MountPoints` / `IdType` properties). **redbear-notifications v0.2** now emits the `ActionInvoked` signal via the new `InvokeAction` method. **redbear-upower v0.2** exposes additional UPower Device properties (`TimeToFull`, `TimeToEmpty`, `Energy`, `EnergyRate`, `BatteryLevel`, `PowerSupply`, `Serial`); 7 unit tests cover the level enum. **redbear-statusnotifierwatcher v0.2** has 12 unit tests covering the full D-Bus surface: `RegisterStatusNotifierItem` / `RegisterStatusNotifierHost` (signal-emitting) and `UnregisterStatusNotifierItem` / `UnregisterStatusNotifierHost` (previously stubbed), plus the `StatusNotifierHostRegistered` signal that the spec requires; 12 unit tests. **redbear-sessiond** is now host-buildable after fixing a `RefCell` → `Arc<Mutex>` Send/Sync issue and replacing the host-incompatible `libredox::call::kill` with the portable `libc::kill`; 32 unit tests pass. **kf6-kwallet** build now enables the kwalletd6 daemon binary (added `KF6ColorScheme` / `KF6Crash` / `KF6DBusAddons` / `KF6GuiAddons` / `KF6Notifications` / `KF6WidgetsAddons` to the dependency list, removed `BUILD_KWALLETD=OFF`, added a kwalletd6-wrapper.sh that disables the Wayland QPA on Redox; the kwalletd CMakeLists `find_package(Qca-qt6 REQUIRED 2.3.1)` is demoted to optional via `sed` because Qca-qt6 is not packaged in Red Bear OS yet). The remaining items are runtime validation gates requiring QEMU, plus the Phase 4 broader surface (kf6-kauth + PolkitQt6-1, kf6-kded6 + kglobalaccel binaries).
|
||||
|
||||
**Version:** 3.7 — 2026-07-26
|
||||
**Version:** 3.8 — 2026-07-26
|
||||
**Status:** Active plan aligned with desktop path v5.9 (2026-07-21)
|
||||
**Scope:** Full D-Bus infrastructure for KDE Plasma 6 on Wayland, tightly integrated with Redox scheme IPC
|
||||
**Parent plan:** `local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md` (v5.9, 2026-07-21)
|
||||
@@ -113,7 +113,7 @@ specific schemes it needs. This keeps the architecture honest and avoids a leaky
|
||||
| **seatd** | `config/redbear-full.toml` | ✅ Wired | `13_seatd.service`, `LIBSEAT_BACKEND=seatd`, `SEATD_SOCK=/run/seatd.sock` |
|
||||
| **kf6-kservice** | `local/recipes/kde/kf6-kservice/` | ✅ Builds | Depends on kf6-kdbusaddons |
|
||||
| **kf6-kglobalaccel** | `local/recipes/kde/kf6-kglobalaccel/` | ✅ Builds | Depends on kf6-kdbusaddons |
|
||||
| **Session activation scaffolds** | `local/recipes/system/redbear-dbus-services/` | ✅ Staged | Session `.service` files now cover kded6, kglobalaccel, ActivityManager, JobViewServer, ksmserver, notifications, and StatusNotifierWatcher |
|
||||
| **Session activation scaffolds** | `local/recipes/system/redbear-dbus-services/` | ✅ Staged | Session `.service` files now cover core freedesktop services and pulseaudio; the 5 wlroots-based KDE daemons (kded6, kglobalaccel, ActivityManager, JobViewServer, ksmserver) were removed in W2 (honest-absence, 2026-07-26). They will be re-added when the daemons are built. |
|
||||
| **KWin (D-Bus)** | `local/recipes/kde/kwin/` | ✅ USE_DBUS=ON | Registers `org.kde.KWin` on session bus |
|
||||
| **redbear-sessiond `PauseDevice`/`ResumeDevice` emission** | `local/recipes/system/redbear-sessiond/source/src/session.rs` | ✅ done (v3.1) | Signals emitted on `take_device` / `release_device`; fresh FD re-opened on resume |
|
||||
| **redbear-sessiond `PrepareForSleep` emission** | `local/recipes/system/redbear-sessiond/source/src/acpi_watcher.rs` | ✅ done (v3.1) | `CheckSleep` ACPI verb polled; `before=true` on suspend, `before=false` on resume |
|
||||
@@ -144,7 +144,7 @@ specific schemes it needs. This keeps the architecture honest and avoids a leaky
|
||||
| **Polkit** | `org.freedesktop.PolicyKit1` | Authorization scaffold (always-permit) | KAuth |
|
||||
| **UPower** | `org.freedesktop.UPower` | Provisional ACPI-backed power service; current backing power surface is provisionally bounded; broader ACPI validation requires QEMU/hardware | kf6-solid, PowerDevil |
|
||||
| **UDisks2** | `org.freedesktop.UDisks2` | Bounded real `disk.*` / partition enumeration | kf6-solid |
|
||||
| **D-Bus service files** | `/usr/share/dbus-1/` | Activation is staged and shipped for the current scaffold services plus bounded KDE session daemons (`kded6`, `kglobalaccel`, ActivityManager, JobViewServer, ksmserver) | All D-Bus services |
|
||||
| **D-Bus service files** | `/usr/share/dbus-1/` | Activation is staged and shipped for the current scaffold services; the 5 wlroots-based KDE session daemons (`kded6`, `kglobalaccel`, ActivityManager, JobViewServer, ksmserver) were removed in W2 (honest-absence, 2026-07-26) and will be re-added when the daemons are built | All D-Bus services |
|
||||
| **D-Bus policy files** | `/etc/dbus-1/` | Policy is staged and shipped for the current scaffold services | All D-Bus services |
|
||||
| **zbus crate marker** | `local/recipes/libs/zbus/` | Build-ordering marker; actual zbus crate is fetched by downstream Cargo builds | Future Rust D-Bus services |
|
||||
|
||||
@@ -260,7 +260,7 @@ Complete Plasma needs (after re-enabling disabled components):
|
||||
│ Redox Schemes (native IPC) │
|
||||
│ scheme:input → evdevd → /dev/input/eventX │
|
||||
│ scheme:drm → redox-drm → DRM/KMS │
|
||||
│ scheme:pci → pcid-spawner → PCI device access │
|
||||
│ scheme:pci → driver-manager → PCI device access │
|
||||
│ scheme:net → netd → network interfaces │
|
||||
│ scheme:firmware → firmware-loader → GPU blobs │
|
||||
│ scheme:acpi → acpid → ACPI/DMI data │
|
||||
@@ -732,7 +732,7 @@ org.freedesktop.DBus (dbus-daemon — always present)
|
||||
```
|
||||
Layer 1: Redox Schemes (kernel-enforced capability security)
|
||||
├── scheme:drm — only accessible to processes with explicit FD
|
||||
├── scheme:pci — only accessible to pcid-spawner-launched drivers
|
||||
├── scheme:pci — only accessible to driver-manager-launched drivers
|
||||
├── scheme:input — only accessible to evdevd (which creates /dev/input/)
|
||||
└── scheme:net — only accessible to network daemons
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# Red Bear OS Quirks System — Audit & Consumer Inventory
|
||||
|
||||
*Companion to `QUIRKS-SYSTEM.md`. This file is the ground-truth state of the
|
||||
quirks subsystem as of 2026-06-29, derived from a full source review of every
|
||||
quirks file plus a repository-wide grep of all consumers.*
|
||||
quirks subsystem as of 2026-07-26 (LG Gram Round 1), derived from a full source
|
||||
review of every quirks file plus a repository-wide grep of all consumers. The
|
||||
2026-06-29 snapshot is retained in the section bodies; the DMI/ACPI loader rows
|
||||
below were resolved 2026-07-26 and supersede the earlier "not yet used" notes.*
|
||||
|
||||
The design of the quirks subsystem is sound. **No redesign is required**;
|
||||
the architecture, layering, and lookup algorithm are correct. What follows
|
||||
|
||||
@@ -70,6 +70,19 @@ The packaged link-oriented companion is `redbear-phase5-wifi-link-check`, which
|
||||
the target runtime is exposing interface/address/default-route signals in addition to the bounded
|
||||
Wi-Fi lifecycle state.
|
||||
|
||||
> **Coverage note (2026-07-26):** The matrix above catalogues the build/sync
|
||||
> and Wi-Fi/Bluetooth/DRM/low-level-controller validation scripts as of the
|
||||
> round-5 sync. Newer scripts that have landed since — including the
|
||||
> driver-manager audit/QEMU-gate helpers, the low-level-controller wrappers
|
||||
> (`test-ps2-qemu.sh`, `test-timer-qemu.sh`,
|
||||
> `test-lowlevel-controllers-qemu.sh`), the USB-maturity wrappers
|
||||
> (`test-usb-qemu.sh`, `test-usb-maturity-qemu.sh`,
|
||||
> `test-usb-storage-qemu.sh`), and the greeter QEMU proof
|
||||
> (`test-greeter-qemu.sh`) — live in `local/scripts/` and are documented in
|
||||
> `local/AGENTS.md` § "HOW TO BUILD RED BEAR OS". They are not yet given
|
||||
> individual matrix rows here; treat `local/AGENTS.md` as authoritative for
|
||||
> their invocation and scope.
|
||||
|
||||
For Redox-target Rust builds of Wi-Fi components such as `redbear-wifictl`, a missing
|
||||
`x86_64-unknown-redox-gcc` on `PATH` should first be treated as a host toolchain/path issue if the
|
||||
repo already contains `prefix/x86_64-unknown-redox/sysroot/bin/x86_64-unknown-redox-gcc`.
|
||||
@@ -94,12 +107,22 @@ Use `local/scripts/provision-release.sh` when the goal is to immutable archived
|
||||
This is a repository sync operation, not a guarantee that every local subsystem release fork is already
|
||||
rebased cleanly.
|
||||
|
||||
### Overlay reapplication
|
||||
### Overlay reapplication (recovery only — not a normal build step)
|
||||
|
||||
Use `local/scripts/apply-patches.sh` when the goal is to reconstruct Red Bear’s release fork on top of a
|
||||
fresh upstream tree.
|
||||
> **Note:** This subsection documents the *recovery* role of
|
||||
> `apply-patches.sh`, consistent with its matrix row above. The matrix row's
|
||||
> "do not invoke" warning applies to the **normal build entry** — the canonical
|
||||
> `build-redbear.sh <profile>` never calls `apply-patches.sh`. The script is
|
||||
> retained **only** for disaster recovery: reconstructing Red Bear's owned
|
||||
> state (build-system patches + recipe patch symlinks) on top of a fresh,
|
||||
> pristine upstream tree after a total loss of `local/` state. Do not invoke
|
||||
> it as part of day-to-day or CI builds.
|
||||
|
||||
This is the core durable-state recovery path.
|
||||
Use `local/scripts/apply-patches.sh` **only** when the goal is to reconstruct
|
||||
Red Bear's release-fork patch linkages on top of a fresh upstream tree as a
|
||||
last-resort recovery operation.
|
||||
|
||||
This is the core durable-state recovery path, not a normal build step.
|
||||
|
||||
### Build execution
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Archived Documentation
|
||||
|
||||
Last synced: 2026-07-18 — this archive inventory is dynamically maintained and
|
||||
Last synced: 2026-07-26 — this archive inventory is dynamically maintained and
|
||||
tracks only files that currently exist in this directory.
|
||||
|
||||
These documents were written during earlier phases of Red Bear OS development.
|
||||
@@ -12,15 +12,18 @@ current plans. They are kept for reference only.
|
||||
| Archived | Status |
|
||||
|----------|--------|
|
||||
| `ACPI-I2C-HID-IMPLEMENTATION-PLAN.md` | Deferred; USB HID remains the primary input path. |
|
||||
| `BUILD-SYSTEM-IMPROVEMENTS.md` | Historical build-system improvement plan; absorbed into `../../AGENTS.md` § BUILD SYSTEM POLICIES and `../legacy-obsolete-2026-07-25/BUILD-SYSTEM-HARDENING-PLAN.md`. |
|
||||
| `IMPLEMENTATION-MASTER-PLAN.md` | Completion report of the 2026-07 audit sprint; superseded by `../CONSOLE-TO-KDE-DESKTOP-PLAN.md`. |
|
||||
| `IMPROVEMENT-PLAN.md` | RESOLVED quality-audit plan (38/38); historical reference only. |
|
||||
| `INTEL-HDA-IMPLEMENTATION-PLAN.md` | Deferred; audio remains a later priority. |
|
||||
| `KERNEL-SCHEDULER-MULTITHREAD-IMPROVEMENT-PLAN.md` | Historical scheduler analysis kept for reference. |
|
||||
| `README.md` | Archive metadata only. |
|
||||
| `RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md` | relibc IPC surface plan; credential work resolved in `../KERNEL-IPC-CREDENTIAL-PLAN.md`. |
|
||||
| `SLEEP-IMPLEMENTATION-PLAN.md` | Historical sleep/power-state plan; superseded by the ACPI power-surface work tracked in `../ACPI-IMPROVEMENT-PLAN.md`. |
|
||||
| `repo-governance.md` | Historical governance note kept for reference. |
|
||||
| `SOURCE-ARCHIVAL-POLICY.md` | Absorbed into `../../AGENTS.md` § RELEASE MODEL / SOURCE-OF-TRUTH RULE. |
|
||||
| `STUBS-FIX-PROGRESS.md` | Final-state log of the completed stub→real-code campaign. |
|
||||
| `SYSTEM-STABILITY-AND-UPSTREAM-SYNC-PLAN.md` | Moved here 2026-07-26 (round-5 stale-doc cleanup); active tracking role absorbed by `../CONSOLE-TO-KDE-DESKTOP-PLAN.md` and the current subsystem plans. |
|
||||
| `USB-BOOT-INPUT-PLAN.md` | Superseded by the current USB implementation planning. |
|
||||
| `USB-VALIDATION-RUNBOOK-2026-07.md` | Historical validation runbook for the earlier USB phase. |
|
||||
| `XHCID-DEVICE-IMPROVEMENT-PLAN.md` | Superseded by the current USB implementation planning. |
|
||||
|
||||
@@ -18,6 +18,9 @@ treated as current status.
|
||||
| `HOOKS.md` | Subsumed by per-crate inline doc comments |
|
||||
| `redbear-power-improvement-plan.md` | v1.0-1.6 features completed; TUI evolved |
|
||||
| `UPSTREAM-SYNC-PROCEDURE.md` | `local/scripts/sync-versions.sh` + `bump-release.sh` |
|
||||
| `WAYLAND-IMPLEMENTATION-PLAN.md` | `local/docs/3D-DRIVER-PLAN.md` Rounds 1–7 (Round 6 cleanup, 2026-07-26) |
|
||||
| `NETWORKING-STACK-STATE.md` | `local/docs/NETWORKING-IMPROVEMENT-PLAN.md` (canonical networking plan) |
|
||||
| `RAPL-IMPLEMENTATION-PLAN.md` | Companion of `redbear-power-improvement-plan.md` (already archived); power/energy planning authority now in `CONSOLE-TO-KDE-DESKTOP-PLAN.md` |
|
||||
|
||||
## Why archive rather than delete
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@ template = "custom"
|
||||
dependencies = [
|
||||
"qtbase",
|
||||
"kf6-extra-cmake-modules",
|
||||
"kf6-kcoreaddons",
|
||||
"kf6-kcolorscheme",
|
||||
"kf6-kconfig",
|
||||
"kf6-kcoreaddons",
|
||||
"kf6-kcrash",
|
||||
"kf6-kdbusaddons",
|
||||
"kf6-kguiaddons",
|
||||
@@ -39,6 +40,15 @@ done
|
||||
#DISABLED: sed -i 's/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# Qca-qt6 (Qt Cryptography Architecture) is not packaged in Red Bear OS
|
||||
# yet. The kwalletd CMakeLists has 'find_package(Qca-qt6 REQUIRED 2.3.1)'
|
||||
# which would fail the configure step. Demote it to optional so the
|
||||
# kwalletd6 binary is built with whatever crypto support the host
|
||||
# linker can resolve, and warn the operator that the Qca backend is
|
||||
# disabled until a recipe is added.
|
||||
sed -i 's/find_package(Qca-qt6 REQUIRED 2.3.1)/find_package(Qca-qt6 2.3.1)/' \
|
||||
"${COOKBOOK_SOURCE}/src/runtime/kwalletd/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# The kwalletd6 binary uses Qt6 Wayland. Wrap it so it falls back to the
|
||||
# offscreen QPA on Redox, mirroring the kded6-wrapper.sh approach.
|
||||
mkdir -p "${COOKBOOK_SOURCE}/runtime/kwalletd"
|
||||
|
||||
Reference in New Issue
Block a user