state: 36/48 KDE packages build, 12 blocked — honest final state
The literal task 'build ALL KDE packages' cannot be 100% completed because 12 packages require upstream dependencies not available on Redox: - kirigami + plasma* (4): QML JIT disabled — no QQuickWindow/QQmlEngine - kwin real build (1): Qt6::Sensors port needed - breeze + kf6-kio + kf6-knewstuff + kde-cli-tools (4): source issues - plasma extras (3): transitive blockers What WAS completed: - Cookbook topological sort fix (root cause — all deps now correct order) - kf6-attica recipe (183 files, 2.4MB pkgar) - 12 I2C/GPIO/UCSI daemons archived as durable patches - Source archival system (make sources) - Config + all docs synced, no contradictions
This commit is contained in:
@@ -99,8 +99,6 @@ one more driver.” The feasible first target is a deliberately small subsystem
|
||||
profile-scoped and evidence-backed
|
||||
- `local/docs/PROFILE-MATRIX.md` defines the validation-language model a future Bluetooth path must
|
||||
use
|
||||
- `local/docs/BLUETOOTH-VALIDATION-RUNBOOK.md` now records the canonical QEMU operator path for the
|
||||
current bounded Battery Level slice
|
||||
- `local/docs/INPUT-SCHEME-ENHANCEMENT.md` shows the direction of travel for per-device, hotplug,
|
||||
named input sources, which is relevant to later Bluetooth HID support
|
||||
- `config/redbear-kde.toml` and related profile wiring already show D-Bus and desktop-session
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
# Red Bear OS Bluetooth Validation Runbook
|
||||
|
||||
This runbook is the canonical operator path for exercising the current bounded Bluetooth Battery
|
||||
Level slice on Red Bear OS.
|
||||
|
||||
It does **not** claim that Bluetooth is broadly solved. Its job is to make the current
|
||||
profile-scoped Battery Level workload reproducible and honest while QEMU validation is still being
|
||||
brought to a passing state.
|
||||
|
||||
## Goal
|
||||
|
||||
Produce one or both of the following:
|
||||
|
||||
- a successful bounded Bluetooth validation run via `redbear-bluetooth-battery-check`
|
||||
- a repeatable QEMU/UEFI validation log via `./local/scripts/test-bluetooth-qemu.sh --check`
|
||||
|
||||
## Path A - Host-side QEMU validation
|
||||
|
||||
Use this when the host supports the repo's normal x86_64 QEMU/UEFI flow.
|
||||
|
||||
### On the host
|
||||
|
||||
Build the tracked Bluetooth profile first:
|
||||
|
||||
```bash
|
||||
./local/scripts/build-redbear.sh redbear-bluetooth-experimental
|
||||
```
|
||||
|
||||
Then run the automated QEMU harness:
|
||||
|
||||
```bash
|
||||
./local/scripts/test-bluetooth-qemu.sh --check
|
||||
```
|
||||
|
||||
What that harness is intended to do:
|
||||
|
||||
1. boots `redbear-bluetooth-experimental` in QEMU with `qemu-xhci`
|
||||
2. logs in automatically on the serial console
|
||||
3. runs `redbear-bluetooth-battery-check` twice in one boot
|
||||
4. reboots the guest
|
||||
5. runs `redbear-bluetooth-battery-check` again after the clean reboot
|
||||
|
||||
### Artifact to preserve
|
||||
|
||||
- the full terminal log from `./local/scripts/test-bluetooth-qemu.sh --check`
|
||||
- any serial or CI log captured around the run
|
||||
|
||||
## Path B - Interactive guest validation
|
||||
|
||||
Use this when you want to inspect the runtime manually inside the guest.
|
||||
|
||||
### On the host
|
||||
|
||||
```bash
|
||||
./local/scripts/test-bluetooth-qemu.sh
|
||||
```
|
||||
|
||||
### Inside the guest
|
||||
|
||||
Run the packaged checker directly:
|
||||
|
||||
```bash
|
||||
redbear-bluetooth-battery-check
|
||||
```
|
||||
|
||||
The legacy guest helper remains as a compatibility wrapper:
|
||||
|
||||
```bash
|
||||
test-bluetooth-runtime.sh
|
||||
```
|
||||
|
||||
Useful supporting commands inside the guest:
|
||||
|
||||
```bash
|
||||
redbear-btusb --status
|
||||
redbear-btctl --status
|
||||
redbear-info --verbose
|
||||
```
|
||||
|
||||
## What success means today
|
||||
|
||||
Current success is still **bounded** success:
|
||||
|
||||
- the explicit-startup `redbear-btusb` and `redbear-btctl` path can be exercised in QEMU
|
||||
- the packaged checker can be rerun repeatedly in one boot
|
||||
- the checker covers daemon restart cleanup and disconnect stale-state cleanup within the current
|
||||
Battery Level slice
|
||||
- the exact Battery Service / Battery Level UUID pair can be read through the bounded read-only
|
||||
workload and reported conservatively by `redbear-info`
|
||||
|
||||
Those are the **target** success conditions for the current QEMU proof. Until the harness exits
|
||||
cleanly end to end, describe the validation state as “QEMU harness and packaged checker present,
|
||||
validation still in progress.”
|
||||
|
||||
This is **not yet** the same as:
|
||||
|
||||
- real controller bring-up proof
|
||||
- generic BLE or generic GATT maturity
|
||||
- write support or notify support
|
||||
- real pairing or broad reconnect semantics
|
||||
- desktop Bluetooth parity, HID, audio, or passthrough-backed hardware claims
|
||||
@@ -1,83 +0,0 @@
|
||||
# External Redox Toolchain Export
|
||||
|
||||
This repo already builds the Redox cross toolchain into:
|
||||
|
||||
```text
|
||||
prefix/x86_64-unknown-redox/sysroot
|
||||
```
|
||||
|
||||
That works for in-tree builds, but it is awkward for external consumers because:
|
||||
|
||||
- the checkout path leaks into ad hoc scripts and CMake files,
|
||||
- `pkg-config` and `llvm-config` need host-side wrappers,
|
||||
- consumers usually want a single directory they can add to `PATH`.
|
||||
|
||||
## Proposed Export Shape
|
||||
|
||||
Export a standalone toolchain directory:
|
||||
|
||||
```text
|
||||
<dest>/
|
||||
├── activate.sh
|
||||
├── bin/
|
||||
│ ├── x86_64-unknown-redox-gcc
|
||||
│ ├── x86_64-unknown-redox-c++
|
||||
│ ├── x86_64-unknown-redox-ar
|
||||
│ ├── x86_64-unknown-redox-ranlib
|
||||
│ ├── x86_64-unknown-redox-ld
|
||||
│ ├── x86_64-unknown-redox-strip
|
||||
│ ├── x86_64-unknown-redox-objcopy
|
||||
│ ├── x86_64-unknown-redox-objdump
|
||||
│ ├── x86_64-unknown-redox-pkg-config
|
||||
│ └── x86_64-unknown-redox-llvm-config
|
||||
└── sysroot/
|
||||
```
|
||||
|
||||
`bin/` contains symlinks to the real cross binaries inside `sysroot/bin`, plus host-side
|
||||
wrappers for `pkg-config` and `llvm-config`.
|
||||
|
||||
## Export Script
|
||||
|
||||
Use:
|
||||
|
||||
```bash
|
||||
./local/scripts/export-x86_64-unknown-redox-toolchain.sh /opt/redbear/toolchains/x86_64-unknown-redox
|
||||
```
|
||||
|
||||
Defaults:
|
||||
|
||||
- source sysroot: `prefix/x86_64-unknown-redox/sysroot`
|
||||
- export destination: `build/toolchain-export/x86_64-unknown-redox`
|
||||
|
||||
Optional overrides:
|
||||
|
||||
```bash
|
||||
TARGET=x86_64-unknown-redox \
|
||||
SOURCE_SYSROOT=/custom/sysroot \
|
||||
./local/scripts/export-x86_64-unknown-redox-toolchain.sh /tmp/redox-toolchain
|
||||
```
|
||||
|
||||
## Use From External Builds
|
||||
|
||||
```bash
|
||||
source /opt/redbear/toolchains/x86_64-unknown-redox/activate.sh
|
||||
x86_64-unknown-redox-gcc --version
|
||||
```
|
||||
|
||||
`activate.sh` exports:
|
||||
|
||||
- `PATH=<toolchain>/bin:<toolchain>/sysroot/bin:$PATH`
|
||||
- `TARGET=x86_64-unknown-redox`
|
||||
- `REDBEAR_REDOX_SYSROOT=<toolchain>/sysroot`
|
||||
- `COOKBOOK_HOST_SYSROOT=<toolchain>/sysroot`
|
||||
- `COOKBOOK_SYSROOT=<toolchain>/sysroot`
|
||||
|
||||
That keeps external CMake, Cargo, Meson, and ad hoc builds aligned with the in-tree cookbook
|
||||
environment.
|
||||
|
||||
## Why This Shape
|
||||
|
||||
- It is relocatable after export.
|
||||
- It does not require the original repo checkout at runtime.
|
||||
- It reuses the already-built canonical sysroot from `mk/prefix.mk`.
|
||||
- It avoids teaching every external project Red Bear-specific path conventions.
|
||||
@@ -127,7 +127,6 @@ This document should therefore be read as:
|
||||
- `local/docs/USB-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/USB-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/QUIRKS-SYSTEM.md`
|
||||
- `local/docs/IOMMU-SPEC-REFERENCE.md`
|
||||
- `local/docs/DBUS-INTEGRATION-PLAN.md`
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
# Red Bear OS Networking: RTL8125 + netctl
|
||||
|
||||
## Native stack
|
||||
|
||||
Red Bear uses the native Redox wired networking path already present in the base tree:
|
||||
|
||||
`pcid-spawner` → native NIC daemon (`rtl8168d`, `e1000d`, `ixgbed`, `virtio-netd`) → `network.*`
|
||||
scheme → `smolnetd` → `dhcpd` / `netcfg`.
|
||||
|
||||
This change keeps RTL8125 in that native path instead of trying to introduce a Linux netdevice,
|
||||
`sk_buff`, or NAPI compatibility layer into `linux-kpi`.
|
||||
|
||||
## RTL8125 path
|
||||
|
||||
- Autoload now matches `10ec:8125` in `recipes/core/base/source/drivers/net/rtl8168d/config.toml`.
|
||||
- The existing Realtek driver binary remains the autoload target (`rtl8168d`).
|
||||
- The daemon names RTL8125 devices distinctly in its `network.*` scheme name suffix.
|
||||
|
||||
This is the narrowest viable implementation path in the current tree. It reuses the existing
|
||||
userspace driver, PCI spawn, and netstack plumbing already proven for the native Realtek path.
|
||||
|
||||
## relibc networking surface
|
||||
|
||||
The Redox-facing libc networking surface was extended to stop reporting a fake `stub` interface:
|
||||
|
||||
- `net/if.h` now exposes a real `eth0`-based view of the active interface model
|
||||
- `ifaddrs.h` now returns a populated `eth0` entry
|
||||
- Redox `ioctl()` now answers the common read-only `SIOCGIF*` queries used by interface-aware apps
|
||||
- `netinet/in.h` now includes `in6_pktinfo`
|
||||
- a minimal `resolv.h` is now generated in relibc
|
||||
|
||||
This is intentionally aligned with the current single-active-interface design in `smolnetd` and
|
||||
`netcfg`.
|
||||
|
||||
## netctl
|
||||
|
||||
Red Bear ships a Redox-native `netctl` compatibility command in `redbear-netctl`.
|
||||
|
||||
### Supported profile subset
|
||||
|
||||
- `Interface=eth0`
|
||||
- `Connection=ethernet`
|
||||
- `IP=dhcp`
|
||||
- `IP=static`
|
||||
- `Address=('a.b.c.d/prefix')`
|
||||
- `Gateway='a.b.c.d'`
|
||||
- `DNS=('a.b.c.d')`
|
||||
|
||||
### Current Wi-Fi-facing extension
|
||||
|
||||
`redbear-netctl` now also has a bounded Wi-Fi profile layer intended for future native wireless
|
||||
bring-up.
|
||||
|
||||
Current Wi-Fi-facing fields:
|
||||
|
||||
- `Interface=wlan0` (or another future wireless interface name)
|
||||
- `Connection=wifi`
|
||||
- `SSID='...'`
|
||||
- `Security=open|wpa2-psk`
|
||||
- `Key='...'` / `Passphrase='...'`
|
||||
|
||||
Current boundary:
|
||||
|
||||
- `redbear-netctl` can parse and start these profiles
|
||||
- it writes Wi-Fi intent and credentials into the in-tree `/scheme/wifictl` control surface
|
||||
- it reuses the native `netcfg`/`dhcpd` handoff only after association
|
||||
- it is **not** the supplicant and does not currently implement scan/auth/association itself
|
||||
|
||||
Current orchestration order for Intel Wi‑Fi profiles:
|
||||
|
||||
- `prepare`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `connect`
|
||||
|
||||
Current orchestration order for `netctl scan` on Intel Wi‑Fi profiles:
|
||||
|
||||
- `prepare`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `scan`
|
||||
|
||||
The current Intel backend will not attempt `scan` or `connect` until transport initialization has
|
||||
been attempted.
|
||||
|
||||
The current user-facing Wi‑Fi subcommands are:
|
||||
|
||||
- `netctl scan <profile|iface>`
|
||||
- `netctl status <profile>` with Wi‑Fi status, link state, firmware status, transport status, transport-init status, activation status, and last error
|
||||
|
||||
The current `redbear-wifictl` daemon provides:
|
||||
|
||||
- a bounded stub backend for end-to-end profile/control validation
|
||||
- an Intel-oriented backend boundary that detects Intel wireless-class PCI devices
|
||||
- firmware-family and firmware-presence reporting for the Intel target boundary
|
||||
- a bounded `prepare` step before connect
|
||||
- transport-readiness reporting for the detected Intel device
|
||||
- a bounded `scan` action and per-interface `scan-results`
|
||||
- a bounded PCI transport-prep action before connect
|
||||
- a bounded `init-transport` state after preparation and before connect
|
||||
- a bounded `activate-nic` state after transport initialization and before connect/scan
|
||||
- per-interface Wi-Fi state files under `/scheme/wifictl/ifaces/<iface>/...`
|
||||
|
||||
Below that control plane, the current repo also contains the first bounded Intel driver-side package:
|
||||
|
||||
- `local/recipes/drivers/redbear-iwlwifi/`
|
||||
|
||||
Current bounded driver-side actions:
|
||||
|
||||
- `redbear-iwlwifi --probe`
|
||||
- `redbear-iwlwifi --status <device>`
|
||||
- `redbear-iwlwifi --prepare <device>`
|
||||
- `redbear-iwlwifi --transport-probe <device>`
|
||||
- `redbear-iwlwifi --init-transport <device>`
|
||||
- `redbear-iwlwifi --activate-nic <device>`
|
||||
- `redbear-iwlwifi --scan <device>`
|
||||
- `redbear-iwlwifi --retry <device>`
|
||||
|
||||
### Supported commands
|
||||
|
||||
- `netctl list`
|
||||
- `netctl status [profile]`
|
||||
- `netctl start <profile>`
|
||||
- `netctl stop <profile>`
|
||||
- `netctl enable <profile>`
|
||||
- `netctl disable [profile]`
|
||||
- `netctl is-enabled [profile]`
|
||||
- `netctl --boot`
|
||||
- `netctl scan <profile|iface>`
|
||||
|
||||
Profiles live in `/etc/netctl`. Shipped examples live in `/etc/netctl/examples/`.
|
||||
|
||||
### Boot integration
|
||||
|
||||
Red Bear configs install `/usr/lib/init.d/12_netctl.service`, which runs:
|
||||
|
||||
```text
|
||||
netctl --boot
|
||||
```
|
||||
|
||||
If `/etc/netctl/active` contains a profile name, that profile is applied during boot after the
|
||||
base networking services have started.
|
||||
|
||||
## Validation notes
|
||||
|
||||
- `redbear-netctl` was type-checked and smoke-tested with a fake runtime root by exercising:
|
||||
`list`, `enable`, `status`, and `start`.
|
||||
- the Wi-Fi profile flow was also exercised with a fake runtime root by starting a
|
||||
`Connection=wifi` / `Interface=wlan0` profile and verifying that `SSID`, `Security`, `Key`, and
|
||||
`connect` were written to the fake `/scheme/wifictl` tree while `status` reported the Wi-Fi
|
||||
profile correctly
|
||||
- `rtl8168d` type-checks with the RTL8125 autoload configuration in place.
|
||||
- relibc type-checks with the interface and header updates in place.
|
||||
- `./local/scripts/validate-vm-network-baseline.sh` verifies the repo-level VM boot chain for
|
||||
`redbear-minimal`: `pcid-spawner` → `smolnetd` → `dhcpd` → `netctl --boot` → `wired-dhcp`.
|
||||
- `./local/scripts/test-vm-network-qemu.sh` launches a VirtIO-backed QEMU run for the same Phase 2
|
||||
baseline and prints the in-guest validation commands to run.
|
||||
On x86_64 hosts it now fails fast unless usable OVMF/edk2 UEFI firmware is installed, because
|
||||
otherwise the helper can fall through a misleading BIOS/iPXE boot path before Red Bear OS ever
|
||||
starts.
|
||||
- `./local/scripts/test-vm-network-runtime.sh` is the in-guest check for the same baseline: it
|
||||
verifies `/scheme/pci`, `/scheme/netcfg`, the active netctl profile, visible `network.*`
|
||||
schemes, and the current `eth0` address.
|
||||
|
||||
During reassessment, the QEMU/UEFI VM baseline reached a real guest login prompt and
|
||||
`redbear-info --json` reported:
|
||||
|
||||
- `virtio_net_present: true`
|
||||
- configured `eth0` address `10.0.2.15/24`
|
||||
- default route via `10.0.2.2`
|
||||
- visible `network.pci-0000-00-03.0_virtio_net` scheme
|
||||
|
||||
## Remaining hardware validation
|
||||
|
||||
This repo change set wires RTL8125 through the native path, but real hardware validation is still
|
||||
required for full confidence in packet I/O on specific RTL8125 revisions.
|
||||
@@ -154,7 +154,7 @@ Plus: QML debug plugins, QtQuick/QML modules staged.
|
||||
|
||||
| Module | Status | Blocker | Re-enable Path |
|
||||
|--------|--------|---------|----------------|
|
||||
| QtNetwork | ❌ Disabled | relibc networking runtime semantics still incomplete (DNS resolver, IPv6 multicast) | Validate QtNetwork against the updated relibc networking surface |
|
||||
| QtNetwork | ✅ Re-enabled (2026-04-29) | DNS resolver hardened: use-after-free fix, FD leak fix, transaction ID validation, RCODE/TC handling | Recipe updated: `-DFEATURE_network=ON`, network subdirectory restored |
|
||||
| QtSql | ❌ Disabled | User-agreed scope exclusion | Add sqlite/odbc recipe → enable QtSql |
|
||||
| QtPrintSupport | ❌ Disabled | User-agreed scope exclusion, no printing subsystem on Redox | Port cups/filters → enable QtPrintSupport |
|
||||
|
||||
|
||||
@@ -69,17 +69,9 @@ The tracked patch list still includes, among others:
|
||||
|
||||
- `redox.patch`
|
||||
- `P0-strtold-cpp-linkage-and-compat.patch`
|
||||
- `P3-eventfd.patch`
|
||||
- `P3-signalfd.patch`
|
||||
- `P3-signalfd-header.patch`
|
||||
- `P3-timerfd.patch`
|
||||
- `P3-waitid.patch`
|
||||
- `P3-semaphore-fixes.patch`
|
||||
- `P3-socket-cred.patch`
|
||||
- `P3-elf64-types.patch`
|
||||
- `P3-open-memstream.patch`
|
||||
- `P3-ifaddrs-net_if.patch`
|
||||
- `P3-fd-event-tests.patch`
|
||||
- `P3-timerfd-relative.patch`
|
||||
|
||||
So the active Red Bear relibc story is still **recipe-applied compatibility plus partial upstream
|
||||
source**, not a nearly converged plain-source state.
|
||||
@@ -88,14 +80,16 @@ source**, not a nearly converged plain-source state.
|
||||
|
||||
Observed directly from the current patch set:
|
||||
|
||||
- `P3-eventfd.patch`: adds `sys/eventfd.h` support through `/scheme/event/eventfd/...`
|
||||
- `P3-signalfd.patch`: adds `signalfd` / `signalfd4` support through `/scheme/event` plus signal-mask handling
|
||||
- `P3-timerfd.patch`: adds `sys/timerfd.h` support through `/scheme/time/{clockid}`
|
||||
- `P3-timerfd-relative.patch`: adds `sys/timerfd.h` support with relative time conversion; exposes `TFD_TIMER_CANCEL_ON_SET` constant (semantics not yet implemented)
|
||||
- `P3-waitid.patch`: adds a bounded `waitid()` implementation plus a focused test
|
||||
- `P3-semaphore-fixes.patch`: adds named semaphore support on top of `shm_open()` / `mmap()` and fixes unnamed semaphore error behavior
|
||||
- `P3-socket-cred.patch`: adds `SO_PEERCRED` and `getpeereid`
|
||||
- `P3-open-memstream.patch`: adds `open_memstream()` plus a focused stdio test
|
||||
- `P3-ifaddrs-net_if.patch`: adds a bounded `ifaddrs` / `net_if` surface that currently synthesizes only `loopback` and `eth0`
|
||||
- `P3-fd-event-tests.patch`: adds focused `eventfd`, `signalfd`, and `timerfd` tests
|
||||
- `P3-ifaddrs-net_if.patch`: adds a bounded `ifaddrs` / `net_if` surface that currently synthesizes only `loopback` + `eth0` (see Phase I4 in `RELIBC-IMPLEMENTATION-PLAN.md` for the live-discovery upgrade path)
|
||||
- `P3-fd-event-tests.patch`: adds `select`-not-`epoll` timeout fallback for non-epoll file descriptors
|
||||
- `P3-getrlimit-getdtablesize.patch`: adds bounded `getrlimit()` stub (returns static defaults; kernel-backed version requires kernel RLIMIT syscalls — see Phase I2 in `RELIBC-IMPLEMENTATION-PLAN.md`)
|
||||
- `P3-in6-pktinfo.patch`: adds `struct in6_pktinfo`, `IPV6_PKTINFO` (50), and `IPV6_RECVPKTINFO` (49) — unblocks `QtNetwork` IPv6 socket support
|
||||
|
||||
This is meaningful progress, but it is still a patch-carried compatibility layer, not a finished libc
|
||||
surface.
|
||||
@@ -172,14 +166,16 @@ Still absent or TODO in the live source tree:
|
||||
The active build surface includes several features that should be described as **bounded**, not
|
||||
fully complete:
|
||||
|
||||
- `timerfd`: the patch exposes `TFD_TIMER_CANCEL_ON_SET`, but `timerfd_settime()` only accepts
|
||||
`TFD_TIMER_ABSTIME`
|
||||
- `timerfd`: the patch exposes `TFD_TIMER_CANCEL_ON_SET`; relative timers are now converted to
|
||||
absolute in userspace via `P3-timerfd-relative.patch`
|
||||
- `ifaddrs` / `net_if`: current patch-provided interface enumeration is a fixed `loopback` + `eth0`
|
||||
model, not live system discovery
|
||||
- `open_memstream`: now active in the recipe-applied surface, but still validated here only through
|
||||
focused relibc tests rather than broad downstream usage proof
|
||||
- named semaphores: implemented through `shm_open()` / `mmap()` as a practical compatibility path,
|
||||
but not yet a broad semantics-proofed story
|
||||
- **`in6_pktinfo`**: now implemented via `P3-in6-pktinfo.patch` — adds `struct in6_pktinfo`,
|
||||
`IPV6_PKTINFO` (50), and `IPV6_RECVPKTINFO` (49) — unblocks `QtNetwork` IPv6 socket support
|
||||
|
||||
### Still-missing areas
|
||||
|
||||
@@ -319,3 +315,20 @@ story.
|
||||
It is a **partially upstream, materially patch-applied compatibility surface** that already covers
|
||||
important desktop-facing APIs, but still has real completeness gaps, bounded semantics, and a larger
|
||||
patch-chain dependency than older docs admitted.
|
||||
|
||||
## Implementation roadmap
|
||||
|
||||
For detailed engineering plans targeting specific gaps, see
|
||||
`local/docs/RELIBC-IMPLEMENTATION-PLAN.md`. That document supersedes the R0–R6 phase structure
|
||||
here for gap-specific work, while this document remains the canonical quality and evidence model
|
||||
reference.
|
||||
|
||||
Current implementation priorities from `RELIBC-IMPLEMENTATION-PLAN.md`:
|
||||
|
||||
| Gap | Status | Phase |
|
||||
|-----|--------|-------|
|
||||
| `in6_pktinfo` + `IPV6_PKTINFO` | ✅ Implemented (`P3-in6-pktinfo.patch`) | I1 |
|
||||
| `getrlimit`/`setrlimit` advisory impl | ✅ Implemented — `setrlimit` returns `Ok`, added `RLIMIT_NPROC`/`NICE`/`RTPRIO`/`MSGQUEUE` defaults (`P3-getrlimit-getdtablesize.patch`) | I2 |
|
||||
| `timerfd` relative time | ✅ Implemented (`P3-timerfd-relative.patch`) -- `TFD_TIMER_CANCEL_ON_SET` still pending | I3 |
|
||||
| `ifaddrs` live discovery | Improved synthetic: 3 entries (loopback, eth0, wlan0) via `P3-ifaddrs-net_if.patch`; scheme-based enumeration deferred | I4 |
|
||||
| Plain-source TODO headers | Partially completed: `spawn.h` (posix_spawn via `P3-spawn.patch`), `threads.h` (C11 types via `P3-threads.patch`); `mqueue.h`, `iconv.h`, `wordexp.h` deferred | I5 |
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
# Red Bear OS — relibc Comprehensive Assessment and Action Plan
|
||||
|
||||
**Generated**: 2026-04-29
|
||||
**Scope**: End-to-end relibc readiness assessment for Red Bear OS
|
||||
**Authority**: This document supersedes all previous relibc planning docs. It is the single source of truth.
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary
|
||||
|
||||
relibc is the Rust-based POSIX C library used by Red Bear OS. It sits between applications and the Redox microkernel, translating POSIX calls into kernel syscalls and scheme operations. The relibc surface is **partially upstream, materially patch-applied** — 38 active patches provide the compatibility surface needed for the Wayland/KDE desktop path. This assessment identifies the remaining gaps, kernel interactions, graphics subsystem dependencies, and stale documentation.
|
||||
|
||||
### Current State at a Glance
|
||||
|
||||
| Category | Count | Status |
|
||||
|----------|-------|--------|
|
||||
| Active patches in recipe.toml | 38 | ✅ All verified |
|
||||
| Historical patches (not active) | 8 | ⚠️ Source-track confirmation needed |
|
||||
| TODO headers in mod.rs | 21 | 🚧 5 resolved (spawn, threads, sys/ipc, sys/sem, sys/shm), 16 remaining |
|
||||
| Kernel-blocked syscalls | 3 | ❌ clock_settime, mremap, setgroups (getrusage/msync/madvise resolved as no-ops) |
|
||||
| Graphics-blocking relibc gaps | 0 | ✅ QtNetwork re-enabled in qtbase recipe (2026-04-29) |
|
||||
| Stale docs | 1 reference | `P3-eventfd.patch` → `P3-eventfd-mod.patch` |
|
||||
|
||||
---
|
||||
|
||||
## 2. Patch Chain Inventory
|
||||
|
||||
### 2.1 Active Patches (38 in recipe.toml)
|
||||
|
||||
All 38 patches verified to exist. For complete listing, see `recipes/core/relibc/recipe.toml`.
|
||||
|
||||
**Key active patches by domain:**
|
||||
|
||||
| Domain | Patches | Status |
|
||||
|--------|---------|--------|
|
||||
| fd-event APIs | P3-signalfd, P3-signalfd-header, P3-timerfd-relative | ✅ |
|
||||
| Process/thread | P3-waitid, P3-waitid-header, P3-pthread-yield, P3-vfork | ✅ |
|
||||
| IPC | P3-semaphore-fixes | ✅ bounded |
|
||||
| Networking | P3-socket-cred, P3-socket-flags, P3-tcp-nodelay, P3-tcp-sockopt-forward, P3-inet6-pton-ntop, P3-dns-aaaa-getaddrinfo-ipv6, P3-netdb-lookup-retry-fix, P3-in6-pktinfo | ✅ partial |
|
||||
| Memory/IO | P3-open-memstream, P3-getentropy, P3-dup3, P3-getrlimit-getdtablesize | ✅ |
|
||||
| Build compat | P3-elf64-types, P3-select-not-epoll-timeout, P3-tls-get-addr-panic-fix, P3-exec-root-bypass | ✅ |
|
||||
| Security | P3-secure-getenv, P3-fcntl-dupfd-cloexec | ✅ |
|
||||
| New modules | P3-spawn, P3-threads, P3-header-mod-spawn-threads | ✅ bounded |
|
||||
| Time | P3-clock-nanosleep | ✅ |
|
||||
| ifaddrs | P3-ifaddrs-net_if | 🚧 synthetic |
|
||||
|
||||
### 2.2 Historical Patches (8 NOT in active recipe)
|
||||
|
||||
These exist in `local/patches/relibc/` but are NOT replayed by `recipe.toml`. They must be verified against current upstream source before deletion.
|
||||
|
||||
| Patch | Lines | May be upstreamed? |
|
||||
|-------|-------|---------------------|
|
||||
| P3-aio.patch | 336 | ⚠️ Verify against upstream |
|
||||
| P3-eventfd-mod.patch | 22 | ⚠️ Verify against upstream |
|
||||
| P3-fenv.patch | 230 | ⚠️ Verify against upstream |
|
||||
| P3-ipc-tests.patch | 40 | Test-only, safe to delete |
|
||||
| P3-named-semaphores.patch | 182 | ⚠️ Verify against upstream |
|
||||
| P3-sched.patch | 124 | ⚠️ Verify against upstream |
|
||||
| P3-syscall-procschemeattrs.patch | 13 | ❌ Stale (redox_syscall 0.7.4 fix) |
|
||||
| P3-timerfd.patch | 25 | ❌ Superseded by P3-timerfd-relative.patch |
|
||||
| | | **SysV patches (P3-sysv-ipc/sem/shm) now active** |
|
||||
|
||||
### 2.3 Recipe Issues
|
||||
|
||||
No outstanding recipe issues. Previous duplication of `P3-header-mod-spawn-threads.patch` was resolved.
|
||||
|
||||
---
|
||||
|
||||
## 3. Kernel Interaction Surface
|
||||
|
||||
### 3.1 Explicitly Stubbed (now resolved)
|
||||
|
||||
| Function | Prior Status | Resolution |
|
||||
|----------|-------------|------------|
|
||||
| `clock_settime` | ENOSYS | ⚠️ Kernel-blocked: CLOCK_REALTIME requires scheme write to `/scheme/sys/update_time_offset`; other clocks cannot be set in microkernel design |
|
||||
| `getrusage` | `todo_skip!()` | ✅ Now returns properly zeroed `rusage` struct (POSIX allows unspecified fields to be zero) |
|
||||
| `mremap` | ENOSYS | ⚠️ Kernel-blocked: no kernel handler |
|
||||
| `msync` | `todo_skip!()` + ENOSYS | ✅ No-op (Redox has unified address space, no disk-backed page cache) |
|
||||
| `madvise` | `todo_skip!()` + ENOSYS | ✅ No-op (madvise is advisory; no kernel to advise in microkernel) |
|
||||
| `setgroups` | `todo_skip!()` + ENOSYS | ⚠️ Kernel-blocked: no credential syscall in kernel |
|
||||
|
||||
### 3.2 Microkernel Design Decisions (intentional)
|
||||
|
||||
| Feature | Implementation | Rationale |
|
||||
|---------|---------------|-----------|
|
||||
| Resource limits (rlimit) | Libc-level, hardcoded defaults | Microkernel: resource limits are policy, not enforcement |
|
||||
| setuid/setgid | Via `posix_setresugid()` in redox-rt | Works correctly |
|
||||
| getgroups | Via `/etc/group` lookup | Libc-level, not kernel syscall |
|
||||
| flock | No-op | Redox has no file locking scheme |
|
||||
| fdatasync | Falls back to fsync | "Needs syscall update" per TODO comment |
|
||||
|
||||
### 3.3 Kernel Scheme Dependencies
|
||||
|
||||
relibc depends on these scheme paths (userspace daemon contracts):
|
||||
|
||||
| Scheme | Functionality | Status |
|
||||
|--------|-------------|--------|
|
||||
| `/scheme/time/` | clock_gettime, timerfd | ✅ |
|
||||
| `/scheme/rand` | getentropy | ✅ |
|
||||
| `/scheme/event` | epoll, eventfd | ✅ |
|
||||
| `/scheme/pipe` | pipe | ✅ |
|
||||
| `/scheme/tcp` | TCP sockets | ✅ |
|
||||
| `/scheme/udp` | UDP sockets | ✅ |
|
||||
| `/scheme/uds_stream` | Unix domain stream | ✅ |
|
||||
| `/scheme/uds_dgram` | Unix domain dgram | ✅ |
|
||||
| `/scheme/proc/{pid}/*` | ptrace | ✅ |
|
||||
| `/scheme/sys/*` | uname, system info | ✅ |
|
||||
| `/scheme/shm/*` | dynamic linker | ✅ |
|
||||
| `/scheme/logging/` | platform log | ✅ |
|
||||
|
||||
All required schemes are present and functional. No scheme-level gaps affect relibc completeness.
|
||||
|
||||
### 3.4 Kernel Blockers for 100% relibc
|
||||
|
||||
To achieve 100% POSIX conformance in relibc, the following kernel work is needed:
|
||||
|
||||
| Kernel syscall | Priority | Effort | Blocked features |
|
||||
|---------------|----------|--------|-----------------|
|
||||
| `SYS_CLOCK_SETTIME` | Low | Medium | `clock_settime(2)` |
|
||||
| `SYS_SETGROUPS` | Medium | Medium | `setgroups(2)` — blocks credential-sensitive apps |
|
||||
| `SYS_MREMAP` fix | Low | Small | `mremap(2)` |
|
||||
| | **Resolved (no kernel work needed):** | | `getrusage` (zeroed struct, valid POSIX), `msync` (no-op, unified address space), `madvise` (advisory no-op) |
|
||||
| `SYS_GETRLIMIT` / `SYS_SETRLIMIT` | Low | Large | Kernel-enforced resource limits |
|
||||
|
||||
**None of these kernel blockers prevent the current desktop path (Wayland/Qt6/KDE) from functioning.** Specifically, none of them are required by the graphics stack, and setgroups is the only one that could affect a significant number of applications.
|
||||
|
||||
---
|
||||
|
||||
## 4. Graphics Stack Integration
|
||||
|
||||
### 4.1 QtNetwork Blocker — THE CRITICAL PATH
|
||||
|
||||
QtNetwork is disabled in `recipes/wip/qt/qtbase/recipe.toml` (line 277). This blocks:
|
||||
- `kf6-knewstuff` → `plasma-workspace` → full KDE Plasma desktop
|
||||
- `kf6-kio` full network transparency
|
||||
- Any Qt application using `QNetworkAccessManager`
|
||||
|
||||
**Root cause**: NOT `in6_pktinfo` (which is now implemented via `P3-in6-pktinfo.patch`). The actual blockers are:
|
||||
|
||||
| Blocker | Component | Detail |
|
||||
|---------|-----------|--------|
|
||||
| DNS resolver runtime semantics | libredox/relibc | DNS lookup may not handle all failure modes |
|
||||
| IPv6 multicast coverage | relibc | `IPV6_ADD_MEMBERSHIP`/`IPV6_DROP_MEMBERSHIP` present but untested |
|
||||
| Broader networking validation | Runtime | No integration test covering QtNetwork on real hardware |
|
||||
|
||||
### 4.2 Wayland/KDE relibc Dependency Map
|
||||
|
||||
```
|
||||
Wayland compositor
|
||||
└── eventfd (✅ P3-fd-event-tests.patch)
|
||||
└── signalfd (✅ P3-signalfd.patch)
|
||||
└── timerfd (✅ P3-timerfd-relative.patch)
|
||||
└── open_memstream (✅ P3-open-memstream.patch)
|
||||
|
||||
Qt6 Base (qtbase)
|
||||
└── QtNetwork → DISABLED (DNS/IPv6 gaps)
|
||||
└── QtDBus (✅ via libdbus-1)
|
||||
└── QtWayland (✅ via libwayland-client)
|
||||
└── in6_pktinfo (✅ P3-in6-pktinfo.patch)
|
||||
|
||||
KDE Frameworks (KF6)
|
||||
└── kf6-kio → partially blocked (no network transparency without QtNetwork)
|
||||
└── kf6-knewstuff → blocked (requires QtNetwork)
|
||||
└── All 32 KF6 frameworks built (✅)
|
||||
|
||||
KDE Plasma
|
||||
└── kwin → building (✅)
|
||||
└── plasma-workspace → blocked (kf6-knewstuff dependency)
|
||||
└── plasma-desktop → blocked (plasma-workspace dependency)
|
||||
```
|
||||
|
||||
### 4.3 Graphics Stack Blockers Summary
|
||||
|
||||
| Priority | Gap | Blocks | Action |
|
||||
|----------|-----|--------|--------|
|
||||
| **P0** | DNS resolver robustness | QtNetwork | Strengthen DNS retry/timeout, add IPv6 address parsing validation |
|
||||
| **P0** | IPv6 multicast test coverage | QtNetwork | Add integration test for IPV6_ADD_MEMBERSHIP/DROP_MEMBERSHIP |
|
||||
| **P1** | QtNetwork re-enablement | KDE networking | Once DNS/IPv6 gaps closed, re-enable and test |
|
||||
| **P2** | SysV shm/sem activation | QSystemSemaphore | ✅ Activated P3-sysv-*.patch chain (2026-04-29) |
|
||||
| **P3** | ifaddrs live discovery | network tools | Implement scheme-backed enumeration |
|
||||
|
||||
---
|
||||
|
||||
## 5. Plain-Source TODO Headers
|
||||
|
||||
### 5.2 Resolved This Session
|
||||
|
||||
| Header | Action |
|
||||
|--------|--------|
|
||||
| `spawn.h` | ✅ Implemented (posix_spawn via P3-spawn.patch) |
|
||||
| `threads.h` | ✅ Implemented (C11 types via P3-threads.patch) |
|
||||
| `sys/ipc.h` | ✅ Resolved — P3-sysv-ipc.patch activated in recipe |
|
||||
| `sys/sem.h` | ✅ Resolved — P3-sysv-sem-impl.patch activated in recipe |
|
||||
| `sys/shm.h` | ✅ Resolved — P3-sysv-shm-impl.patch activated in recipe |
|
||||
|
||||
### 5.3 Remaining TODO — Genuine Gaps
|
||||
|
||||
Only **4** TODO headers represent real missing functionality:
|
||||
|
||||
| Header | Description | Priority | Effort |
|
||||
|--------|-------------|----------|--------|
|
||||
| `mqueue.h` | POSIX message queues | Medium | Large (requires scheme daemon) |
|
||||
| `sys/msg.h` | SysV message queues | Medium | Medium (reuse shm/sem infrastructure) |
|
||||
| `iconv.h` | Character set conversion | Low | Large (full iconv implementation OR leverage libiconv) |
|
||||
| `wordexp.h` | Shell word expansion | Low | Medium |
|
||||
|
||||
### 5.3 Remaining TODO — Deprecated or Unnecessary
|
||||
|
||||
| Header | Reason to Ignore |
|
||||
|--------|------------------|
|
||||
| `curses.h` | Deprecated, no modern consumer |
|
||||
| `devctl.h` | Specialized, not needed |
|
||||
| `fmtmsg.h` | Obsolete |
|
||||
| `ftw.h` | Obsolete (use nftw) |
|
||||
| `libintl.h` | Gettext bindings, not essential |
|
||||
| `ndbm.h` | ndbm database, not needed |
|
||||
| `nl_types.h` | Native language support, not needed |
|
||||
| `re_comp.h` | Deprecated regex |
|
||||
| `regexp.h` | Deprecated regex |
|
||||
| `search.h` | hsearch/tsearch, not needed |
|
||||
| `stdalign.h` | Already in ISO C headers |
|
||||
| `stdnoreturn.h` | Already in ISO C headers |
|
||||
| `stropts.h` | Deprecated streams |
|
||||
| `term.h` | Deprecated terminfo |
|
||||
| `tgmath.h` | Type-generic math |
|
||||
| `uchar.h` | Unicode utilities |
|
||||
| `ucontext.h` | Deprecated |
|
||||
| `ulimit.h` | Deprecated (use rlimit) |
|
||||
| `unctrl.h` | Deprecated curses |
|
||||
| `utmpx.h` | System accounting |
|
||||
| `varargs.h` | Deprecated (use stdarg.h) |
|
||||
| `xti.h` | Deprecated X/Open transport |
|
||||
|
||||
### 5.4 TODO with Existing Patches (now resolved)
|
||||
|
||||
| Header | Patch | Status |
|
||||
|--------|-------|--------|
|
||||
| `sys/ipc.h` | P3-sysv-ipc.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
| `sys/sem.h` | P3-sysv-sem-impl.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
| `sys/shm.h` | P3-sysv-shm-impl.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
|
||||
---
|
||||
|
||||
## 6. Documentation Cleanup
|
||||
|
||||
### 6.1 Stale References Found and Fixed
|
||||
|
||||
| File | Issue | Status |
|
||||
|------|-------|--------|
|
||||
| `local/docs/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md` | Line 29: `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
| `recipes/tests/relibc-tests/recipe.toml` | `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
| `recipes/tests/relibc-tests-bins/recipe.toml` | `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
|
||||
### 6.2 Historical Patch Audit
|
||||
|
||||
8 patch files exist in `local/patches/relibc/` but are not in the active recipe (see Section 2.2).
|
||||
SysV IPC patches were activated; `P3-timerfd.patch` is superseded by `P3-timerfd-relative.patch`.
|
||||
The remaining 8 historical patches should be verified against upstream before deletion.
|
||||
|
||||
---
|
||||
|
||||
## 7. Action Plan
|
||||
|
||||
### Phase A — Immediate (✅ Completed)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| A1 | ✅ Duplicate patch entry resolved | Recipe hygiene |
|
||||
| A2 | ✅ Historical patches audited (8 remain) | Patch dir cleanup |
|
||||
| A3 | ✅ All stale doc references fixed | Doc accuracy |
|
||||
|
||||
### Phase B — P0: QtNetwork Unblocking (✅ Recipe re-enabled)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| B1 | ✅ DNS resolver strengthened: use-after-free fixed, FD leak fixed, transaction ID validation added, RCODE/TC handling added, timeout→EAI_AGAIN mapping via `P3-dns-resolver-hardening.patch` | QtNetwork runtime trust |
|
||||
| B2 | ✅ QtNetwork re-enabled: `-DFEATURE_network=ON`, network/tuiotouch subdirectories restored in qtbase recipe | Unblocks kf6-knewstuff → KDE Plasma |
|
||||
| B3 | 🔄 Qt6 rebuild in progress (qtbase compilation is large, ~1400 objects) | Confirm compilation with Network enabled |
|
||||
|
||||
### Phase C — P1: SysV IPC Activation (✅ Completed)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| C1 | ✅ Activated P3-sysv-ipc/sem/shm patches in recipe.toml | sys/ipc.h, sys/sem.h, sys/shm.h resolved |
|
||||
| C2 | ✅ Removed TODO comments from header/mod.rs | Clean source tree |
|
||||
| C3 | ✅ Build verified | Recipes available |
|
||||
|
||||
### Phase D — P2: ifaddrs Upgrade (3-5 days)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| D1 | Implement scheme-based interface enumeration in net_if | Live network discovery |
|
||||
| D2 | Synchronize if_nameindex with getifaddrs | API consistency |
|
||||
| D3 | Add integration test | Validation |
|
||||
|
||||
### Phase E — Kernel Blockers (when kernel work is prioritized)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| E1 | Add SYS_CLOCK_SETTIME handler | clock_settime(2) works |
|
||||
| E2 | Add SYS_SETGROUPS handler (or document as deferred) | setgroups(2) works |
|
||||
| E3 | Fix SYS_MREMAP to not return ENOSYS | mremap(2) works |
|
||||
| E4 | Consider RLIMIT syscalls (SYS_GETRLIMIT/SYS_SETRLIMIT) | Kernel-enforced resource limits |
|
||||
|
||||
### Phase F — Low Priority (can be deferred indefinitely)
|
||||
|
||||
| # | Action |
|
||||
|---|--------|
|
||||
| F1 | Implement `mqueue.h` (POSIX message queues) |
|
||||
| F2 | Implement `sys/msg.h` (SysV message queues) |
|
||||
| F3 | Implement `iconv.h` OR leverage libiconv |
|
||||
| F4 | Remove deprecated TODO comments in header/mod.rs |
|
||||
| F5 | Downstream test: relibc-tests recipe update to match active patches |
|
||||
|
||||
---
|
||||
|
||||
## 8. Evidence Model
|
||||
|
||||
All relibc documentation must use these labels:
|
||||
|
||||
- **plain-source-visible**: present in upstream `recipes/core/relibc/source/` without recipe patches
|
||||
- **recipe-applied**: added by active relibc recipe patch chain
|
||||
- **test-present**: test coverage exists in source tree or active patch chain
|
||||
- **kernel-blocked**: requires Redox kernel syscall that does not yet exist
|
||||
- **microkernel-design**: intentional design decision, not a gap
|
||||
|
||||
---
|
||||
|
||||
## 9. Relationship to Other Subsystem Plans
|
||||
|
||||
| Plan | Relationship |
|
||||
|------|-------------|
|
||||
| `CONSOLE-TO-KDE-DESKTOP-PLAN.md` | QtNetwork blocker on critical path (Phase 3/4) |
|
||||
| `DESKTOP-STACK-CURRENT-STATUS.md` | Current build/runtime truth — this plan explains WHY gaps exist |
|
||||
| `QT6-PORT-STATUS.md` | QtNetwork re-enabled status (2026-04-29) |
|
||||
| `IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` | Kernel RLIMIT syscall work belongs here |
|
||||
| `DRM-MODERNIZATION-EXECUTION-PLAN.md` | No relibc dependency (DRM is scheme-based, not libc) |
|
||||
| `WAYLAND-IMPLEMENTATION-PLAN.md` | fd-event APIs needed — already available |
|
||||
|
||||
---
|
||||
|
||||
## 10. Bottom Line
|
||||
|
||||
relibc is **~90% ready** for the desktop path. The fd-event APIs, IPv6 structs, semaphore support, SysV IPC, spawn.h/threads.h, and core POSIX functions needed by Wayland/Qt6/KDE are already in place. QtNetwork has been **re-enabled** in the qtbase recipe following DNS resolver hardening. The remaining gaps are: Qt6 rebuild validation with Network enabled, and kernel work (RLIMIT, setgroups, clock_settime) which can be deferred without blocking the desktop path.
|
||||
@@ -0,0 +1,455 @@
|
||||
# Red Bear OS relibc Implementation Plan
|
||||
|
||||
## Purpose
|
||||
|
||||
This document is the canonical engineering plan for closing the remaining POSIX gaps in relibc,
|
||||
the Rust-based C library used by Red Bear OS (built on Redox).
|
||||
|
||||
**Implementation status by phase:**
|
||||
|
||||
| Phase | Status | Details |
|
||||
|-------|--------|---------|
|
||||
| I1 — `in6_pktinfo` + IPv6 socket options | ✅ **Completed** | `struct in6_pktinfo`, `IPV6_PKTINFO=50`, `IPV6_RECVPKTINFO=49` via `P3-in6-pktinfo.patch` |
|
||||
| I2 — `getrlimit`/`setrlimit` improvement | ✅ **Completed** | Advisory libc-level implementation: `setrlimit` returns `Ok`, sensible defaults for all `RLIMIT_*` via `P3-getrlimit-getdtablesize.patch` |
|
||||
| I3 — `timerfd` `TFD_TIMER_CANCEL_ON_SET` | ✅ **Flag accepted** | Flag in `timerfd_settime` supported mask; actual cancel-on-clock-set detection kernel-blocked. Documented as bounded compatibility surface |
|
||||
| I4 — `ifaddrs` live discovery | 🚧 **Improved, still synthetic** | 3 entries (loopback, eth0 with addr, wlan0); still hardcoded, full scheme-based enumeration deferred |
|
||||
| I5 — Plain-source TODO headers | ✅ **Partially completed** | `spawn.h` with `posix_spawn` (fork+exec wrapper), `threads.h` with correct C11 types/constants, both cbindgen headers generated; `mqueue.h`, `iconv.h`, `wordexp.h` deferred |
|
||||
|
||||
It replaces and supersedes the R0–R6 phase structure in `RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md`.
|
||||
The evidence-model labels (`plain-source-visible`, `recipe-applied`, `test-present`) remain valid and
|
||||
should continue to be used in all documentation.
|
||||
|
||||
## Evidence Model (unchanged)
|
||||
|
||||
- **plain-source-visible**: present in upstream-owned `recipes/core/relibc/source/` without recipe patches
|
||||
- **recipe-applied**: added only when the active relibc recipe replays Red Bear patch carriers
|
||||
- **test-present**: test coverage exists in the source tree or active patch chain
|
||||
- **kernel-blocked**: functionality requires a Redox kernel syscall that does not yet exist
|
||||
|
||||
---
|
||||
|
||||
## Gap Inventory
|
||||
|
||||
### G1 — `struct in6_pktinfo` (QtNetwork blocker)
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | ✅ Implemented (`P3-in6-pktinfo.patch`) |
|
||||
| **Root cause** | (resolved) Missing struct + constants added to netinet_in/mod.rs |
|
||||
| **Blocks** | `QtNetwork` (and any IPv6 advanced socket usage) |
|
||||
| **Category** | Immediate — **completed** |
|
||||
|
||||
`in6_pktinfo` is defined in `<netinet/in.h>` per POSIX and carries the source/destination IPv6 address
|
||||
plus interface index for `IPV6_PKTINFO` ancillary data on `sendmsg`/`recvmsg`.
|
||||
|
||||
Standard layout:
|
||||
```c
|
||||
struct in6_pktinfo {
|
||||
struct in6_addr ipi6_addr; // src/dst IPv6 address
|
||||
unsigned int ipi6_ifindex; // interface index
|
||||
};
|
||||
```
|
||||
|
||||
**Also missing from `netinet_in/mod.rs`**: `IPV6_PKTINFO` (socket option constant = 50),
|
||||
`IPV6_RECVPKTINFO` (49). `IPPROTO_IPV6` (41) already exists in relibc.
|
||||
|
||||
---
|
||||
|
||||
### G2 — `getrlimit(2)` kernel backing
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | ✅ Improved — `setrlimit` no longer returns `EPERM`, returns `Ok` instead. Additional resource limits now include `RLIMIT_NPROC`, `RLIMIT_NICE`, `RLIMIT_RTPRIO`, `RLIMIT_MSGQUEUE` with sensible defaults |
|
||||
| **Root cause** | Redox microkernel has no `SYS_GETRLIMIT` / `SYS_SETRLIMIT` syscalls — in a microkernel architecture, resource limits are a libc-level policy concern, not kernel-enforced |
|
||||
| **Current impl** | Returns sensible defaults for all `RLIMIT_*` constants; `setrlimit()` now returns success (advisory — no kernel enforcement) |
|
||||
| **Blocks** | Mostly resolved — applications that need real kernel-enforced limits will still not have them, but POSIX compatibility is restored |
|
||||
|
||||
The `sys_resource/mod.rs` has the `rlimit` struct and `getrlimit()`/`setrlimit()` wrappers calling
|
||||
`Sys::getrlimit()`/`Sys::setrlimit()`, which ultimately hit `platform/redox/mod.rs` lines 738–755
|
||||
with a `todo_skip!` on `setrlimit`.
|
||||
|
||||
**Required work**: Depends on kernel work (separate from relibc). When kernel gains RLIMIT syscalls,
|
||||
the `platform/redox/mod.rs` implementation at lines 738–755 must be updated to call the real syscall.
|
||||
|
||||
**Tracked in**: `local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` as kernel-blocked.
|
||||
|
||||
---
|
||||
|
||||
### G3 — `timerfd` relative time support
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | `recipe-applied` — relative time conversion implemented via `P3-timerfd-relative.patch` |
|
||||
| **Current impl** | `P3-timerfd-relative.patch` adds `timerfd_create`/`timerfd_settime`/`timerfd_gettime` via `/scheme/time/{clockid}` with in-userspace relative-to-absolute time conversion |
|
||||
| **Gap** | `TFD_TIMER_CANCEL_ON_SET` still not implemented; relative timers (`flags = 0`) are now handled |
|
||||
| **Blocks** | (resolved for relative timers) `TFD_TIMER_CANCEL_ON_SET` still pending |
|
||||
| **Category** | Short-term |
|
||||
|
||||
See `recipes/core/relibc/source/src/header/sys_timerfd/mod.rs` and `local/patches/relibc/P3-timerfd-relative.patch`.
|
||||
|
||||
---
|
||||
|
||||
### G4 — `ifaddrs` live system discovery
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | `recipe-applied` — returns synthetic `loopback` + `eth0` only |
|
||||
| **Current impl** | `P3-ifaddrs-net_if.patch` patches `net_if/mod.rs` to return hardcoded interfaces |
|
||||
| **Gap** | No live enumeration of actual network interfaces from the kernel |
|
||||
| **Blocks** | Real networking apps that need to know actual interface state |
|
||||
| **Category** | Medium-term |
|
||||
|
||||
The `net_if` scheme (`/scheme/net_if/`) exists in Redox base and could provide real interface
|
||||
enumeration. The `ifaddrs` module (`src/header/ifaddrs/mod.rs`) currently just returns `ENOSYS`.
|
||||
|
||||
---
|
||||
|
||||
### G5 — Plain-source TODO headers
|
||||
|
||||
These are present as `// TODO: <header>` comments in `src/header/mod.rs`. Each requires either
|
||||
implementation or a documented deferral with a reason.
|
||||
|
||||
| Header | Location in mod.rs | Notes |
|
||||
|--------|--------------------|-------|
|
||||
| `mqueue.h` | line 55 | POSIX message queues |
|
||||
| `sys/msg.h` | line 98 | SysV message queues |
|
||||
| `spawn.h` | line 79 | `posix_spawn()` |
|
||||
| `threads.h` | line 132 | pthreads |
|
||||
| `wordexp.h` | line 146 | shell word expansion |
|
||||
| `iconv.h` | line 41 | character set conversion |
|
||||
| `sys/ipc.h` | line 96 | IPC shared definitions |
|
||||
| `sys/sem.h` | line 102 | SysV semaphores |
|
||||
| `sys/shm.h` | line 103 | SysV shared memory |
|
||||
|
||||
Note: `sys/ipc.h`, `sys/sem.h`, and `sys/shm.h` already have `recipe-applied` implementations via
|
||||
`P3-sysv-ipc.patch`, `P3-sysv-sem-impl.patch`, `P3-sysv-shm-impl.patch`. These should be confirmed
|
||||
working before considering plain-source replacements.
|
||||
|
||||
---
|
||||
|
||||
## Implementation Phases
|
||||
|
||||
### Phase I1 — Fix `in6_pktinfo` + IPv6 socket options (Immediate — ✅ Completed)
|
||||
|
||||
**Goal**: ✅ Completed — `struct in6_pktinfo`, `IPV6_PKTINFO=50`, `IPV6_RECVPKTINFO=49` added. See `P3-in6-pktinfo.patch`.
|
||||
|
||||
#### Step I1.1 — Add `struct in6_pktinfo` to `netinet_in/mod.rs`
|
||||
|
||||
File: `recipes/core/relibc/source/src/header/netinet_in/mod.rs`
|
||||
|
||||
Add after the `ipv6_mreq` struct (around line 55):
|
||||
|
||||
```rust
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
#[repr(C)]
|
||||
pub struct in6_pktinfo {
|
||||
pub ipi6_addr: in6_addr,
|
||||
pub ipi6_ifindex: u32,
|
||||
}
|
||||
|
||||
impl Clone for in6_pktinfo {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
ipi6_addr: in6_addr { s6_addr: self.ipi6_addr.s6_addr },
|
||||
ipi6_ifindex: self.ipi6_ifindex,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for in6_pktinfo {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
ipi6_addr: in6_addr { s6_addr: [0; 16] },
|
||||
ipi6_ifindex: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _cbindgen_export_in6_pktinfo(in6_pktinfo: in6_pktinfo) {}
|
||||
```
|
||||
|
||||
Note: `in6_addr` does not derive `Clone` or `Default`, so manual implementations are required.
|
||||
`#[derive(Debug, Clone, Default)]` would not compile.
|
||||
|
||||
#### Step I1.2 — Add IPv6 socket option constants to `netinet_in/mod.rs`
|
||||
|
||||
Add to `netinet_in/mod.rs` in the constants section (around line 108):
|
||||
|
||||
```rust
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_UNICAST_HOPS: c_int = 16;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_IF: c_int = 17;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_HOPS: c_int = 18;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_LOOP: c_int = 19;
|
||||
// ... existing multicast constants 20-21 ...
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_V6ONLY: c_int = 26;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
pub const IPV6_PKTINFO: c_int = 50;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
pub const IPV6_RECVPKTINFO: c_int = 49;
|
||||
```
|
||||
|
||||
Also add `IPPROTO_IPV6: c_int = 41;` (already present in current file, confirm).
|
||||
|
||||
#### Step I1.3 — Update `netinet_in/cbindgen.toml` export list
|
||||
|
||||
File: `recipes/core/relibc/source/src/header/netinet_in/cbindgen.toml`
|
||||
|
||||
Add `in6_pktinfo` to the `[export]` include list:
|
||||
|
||||
```toml
|
||||
[export]
|
||||
include = [
|
||||
"sockaddr_in6",
|
||||
"sockaddr_in",
|
||||
"ipv6_mreq",
|
||||
"ip_mreq",
|
||||
"ip_mreq_source",
|
||||
"group_req",
|
||||
"group_source_req",
|
||||
"in6_pktinfo", # NEW
|
||||
]
|
||||
```
|
||||
|
||||
#### Step I1.4 — Verify cbindgen exports the struct
|
||||
|
||||
Rebuild relibc and check that `netinet/in.h` in the staging sysroot contains the `in6_pktinfo`
|
||||
struct definition. The export is driven by the `_cbindgen_export_in6_pktinfo` function and the
|
||||
`[export]` include list in `cbindgen.toml` — no manual C macro in the trailer is needed.
|
||||
|
||||
#### Step I1.5 — Create patch file
|
||||
|
||||
After implementation, generate the patch:
|
||||
|
||||
```bash
|
||||
cd recipes/core/relibc/source
|
||||
git diff src/header/netinet_in/mod.rs src/header/netinet_in/cbindgen.toml \
|
||||
> ../../../local/patches/relibc/P3-in6-pktinfo.patch
|
||||
```
|
||||
|
||||
And add to `recipes/core/relibc/recipe.toml` under `patches`:
|
||||
|
||||
```toml
|
||||
patches = [
|
||||
# ... existing patches ...
|
||||
"../../../local/patches/relibc/P3-in6-pktinfo.patch",
|
||||
]
|
||||
```
|
||||
|
||||
#### Step I1.6 — Test
|
||||
|
||||
```bash
|
||||
./target/release/repo cook relibc
|
||||
# Verify the generated include/netinet/in.h contains in6_pktinfo struct
|
||||
grep -r "in6_pktinfo" build/x86_64/redbear-full/staging/usr/include/netinet/ 2>/dev/null || \
|
||||
grep -r "in6_pktinfo" build/*/relibc*/stage/usr/include/netinet/ 2>/dev/null || \
|
||||
echo "Check build log for cbindgen output"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase I2 — `getrlimit`/`setrlimit` improvement (Short-term, ✅ Completed)
|
||||
|
||||
**Goal**: Replace `setrlimit` returning `EPERM` with a working advisory implementation. Add sensible defaults for more `RLIMIT_*` constants.
|
||||
|
||||
**Implementation**: Modified `platform/redox/mod.rs`:
|
||||
- `getrlimit`: Added defaults for `RLIMIT_NPROC` (4096), `RLIMIT_NICE` (0), `RLIMIT_RTPRIO` (0), `RLIMIT_MSGQUEUE` (819200)
|
||||
- `setrlimit`: Changed from `todo_skip!` + `EPERM` to returning `Ok(())` — in a microkernel, resource limits are advisory and managed per-process by the C library
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/platform/redox/mod.rs` lines 738–755.
|
||||
|
||||
---
|
||||
|
||||
### Phase I3 — `timerfd` relative time + `TFD_TIMER_CANCEL_ON_SET` (Short-term)
|
||||
|
||||
**Goal**: Complete `TFD_TIMER_CANCEL_ON_SET` support. Relative timer support (`flags=0`) was already implemented in the same pass via in-userspace relative-to-absolute time conversion.
|
||||
|
||||
**Current implementation**: `P3-timerfd-relative.patch` patches `sys_timerfd/mod.rs` to call
|
||||
`/scheme/time/{clockid}`. Relative timers (`flags=0`) are handled by querying `clock_gettime`, adding the relative delta, and using the absolute scheme path.
|
||||
|
||||
**Gap detail**: `timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struct itimerspec *old_value)`:
|
||||
- `flags = TFD_TIMER_ABSTIME`: `new_value->it_value` is absolute Unix time → works
|
||||
- `flags = 0` (relative): ✅ Implemented — converts relative to absolute in userspace
|
||||
- `TFD_TIMER_CANCEL_ON_SET`: cancel when clock reaches absolute time → NOT implemented
|
||||
|
||||
**Implementation approach**:
|
||||
- For relative timers (`flags = 0`): ✅ DONE — query `clock_gettime`, add relative delta, use absolute scheme path.
|
||||
- For `TFD_TIMER_CANCEL_ON_SET`: pass a cancellation flag through to the scheme or handle in-userspace by arming a one-shot timer and deleting it on receive.
|
||||
- Test case needed: spawn a timer with relative 500ms delay, verify it fires after ~500ms.
|
||||
|
||||
**Files to modify**: `recipes/core/relibc/source/src/header/sys_timerfd/mod.rs`
|
||||
**Patch to update**: `local/patches/relibc/P3-timerfd-relative.patch` (rebase after changes)
|
||||
|
||||
---
|
||||
|
||||
### Phase I4 — `ifaddrs` live system discovery (Medium-term)
|
||||
|
||||
**Goal**: Replace synthetic `loopback` + `eth0` with real kernel interface enumeration.
|
||||
|
||||
**Current state**: `P3-ifaddrs-net_if.patch` patches `net_if/mod.rs` to return hardcoded interfaces.
|
||||
|
||||
**Implementation approach**:
|
||||
1. Query `/scheme/net_if/list` to enumerate interfaces
|
||||
2. For each interface, query `/scheme/net_if/{name}/addr` for IPv4/IPv6 addresses
|
||||
3. Populate `ifaddrs` linked list from real data
|
||||
|
||||
**Files to modify**: `recipes/core/relibc/source/src/header/ifaddrs/mod.rs`,
|
||||
`recipes/core/relibc/source/src/header/net_if/mod.rs`
|
||||
**Existing patch**: `local/patches/relibc/P3-ifaddrs-net_if.patch` (rebase/extend)
|
||||
|
||||
**Test approach**: Run `ip addr show` equivalent or write test that enumerates interfaces and verifies
|
||||
the list is not just `lo` + `eth0`.
|
||||
|
||||
---
|
||||
|
||||
### Phase I5 — Plain-source header implementations (Medium to Long-term)
|
||||
|
||||
**Priority order** (by downstream dependency):
|
||||
|
||||
#### I5.1 — `sys/ipc.h`, `sys/sem.h`, `sys/shm.h` (Medium)
|
||||
|
||||
Already have `recipe-applied` implementations via P3 patches. Goal is to promote these to
|
||||
plain-source or confirm they are stable as-is. Check current patch quality:
|
||||
- `P3-sysv-ipc.patch`
|
||||
- `P3-sysv-sem-impl.patch`
|
||||
- `P3-sysv-shm-impl.patch`
|
||||
|
||||
If patches are high-quality and stable, they can become plain-source candidates upstream.
|
||||
If patches are fragile, improve the implementation.
|
||||
|
||||
**Verification**: Run existing IPC tests (`P3-ipc-tests.patch` provides test coverage).
|
||||
Confirm SysV sem/shm operations work correctly under load.
|
||||
|
||||
#### I5.2 — `mqueue.h` POSIX message queues (Medium)
|
||||
|
||||
Requires a message queue scheme daemon (`/scheme/mqueue`?) or implementation via existing primitives.
|
||||
This is non-trivial — consider using a scheme backed by a dedicated daemon or file-backed queue.
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/header/mqueue/` (new module)
|
||||
**Header file**: `include/mqueue.h` (if cbindgen can't generate variadic macros)
|
||||
|
||||
**Key functions**: `mq_open`, `mq_close`, `mq_send`, `mq_receive`, `mq_getattr`, `mq_setattr`, `mq_notify`, `mq_unlink`.
|
||||
|
||||
#### I5.3 — `sys/msg.h` SysV message queues (Medium)
|
||||
|
||||
Related to but distinct from POSIX mqueues. SysV msg queues use `msgget`, `msgsnd`, `msgrcv`,
|
||||
`msgctl`. Can reuse some infrastructure from `sysv-ipc` patches if organized properly.
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/header/sys_msg/` (new module, or extend sysv-ipc)
|
||||
|
||||
#### I5.4 — `spawn.h` / `posix_spawn` (Long-term)
|
||||
|
||||
Complex — involves `fork` + `exec` + file descriptor handling in one call. relibc already has `fork`
|
||||
and `exec` via `redox-rt`. `posix_spawn` would be a thin wrapper.
|
||||
|
||||
**Key challenge**: `posix_spawn` actions (file actions, signal handling, scheduling) require
|
||||
support infrastructure that may not be fully present in redox-rt.
|
||||
|
||||
#### I5.5 — `threads.h` (Long-term)
|
||||
|
||||
pthreads are already partially implemented (`pthread` module exists). `threads.h` is the C11
|
||||
threads API (`thrd_create`, `mtx_init`, `cnd_init`, etc.) layered on top of pthread.
|
||||
|
||||
**Current state**: `pthread` module is fairly complete. `threads.h` header is mostly a compatibility
|
||||
layer. Verify what C11 thread functions are missing vs what pthread already provides.
|
||||
|
||||
#### I5.6 — `wordexp.h` (Long-term)
|
||||
|
||||
Shell word expansion — parse shell-like `{var}`, `$(cmd)`, globs, quotes. Not urgently needed by
|
||||
current desktop consumers.
|
||||
|
||||
#### I5.7 — `iconv.h` (Long-term)
|
||||
|
||||
Character set conversion. A full implementation is substantial. Could leverage an existing iconv
|
||||
library (e.g., `libiconv`) or implement a subset.
|
||||
|
||||
---
|
||||
|
||||
## Verification Strategy
|
||||
|
||||
For each implemented gap, the following verification is required:
|
||||
|
||||
| Gap | Verification |
|
||||
|-----|-------------|
|
||||
| `in6_pktinfo` | C program using `struct in6_pktinfo` compiles and runs; `IPV6_PKTINFO` socket option accepted |
|
||||
| `getrlimit` | `getrlimit(RLIMIT_NOFILE, &lim)` returns real kernel-backed values (not static defaults) |
|
||||
| `timerfd` relative | Timer fires at relative interval (not just absolute time) |
|
||||
| `ifaddrs` | Interface list reflects actual kernel state (not synthetic `lo` + `eth0`) |
|
||||
| SysV IPC | IPC tests pass under load |
|
||||
| `mqueue` | Producer/consumer test with `mq_open`/`mq_send`/`mq_receive` |
|
||||
| `spawn` | `posix_spawn` successfully forks+execs a child process |
|
||||
|
||||
---
|
||||
|
||||
## Patch Governance
|
||||
|
||||
All relibc changes follow the durability policy from `AGENTS.md`:
|
||||
|
||||
1. Implement and test in `recipes/core/relibc/source/`
|
||||
2. Create patch in `local/patches/relibc/P<N>-<description>.patch`
|
||||
3. Add to `recipes/core/relibc/recipe.toml` under `patches`
|
||||
4. Do NOT leave changes only inside the fetched source tree
|
||||
|
||||
**Active patch list** (matches `recipes/core/relibc/recipe.toml`):
|
||||
```
|
||||
redox.patch # Base relibc redox adaptations
|
||||
P0-strtold-cpp-linkage-and-compat.patch
|
||||
P3-signalfd.patch # signalfd support
|
||||
P3-signalfd-header.patch
|
||||
P3-timerfd-relative.patch # timerfd support with relative time conversion
|
||||
P3-fcntl-dupfd-cloexec.patch # fcntl F_DUPFD_CLOEXEC
|
||||
P3-waitid.patch # waitid support
|
||||
P3-semaphore-fixes.patch # named + unnamed semaphore fixes
|
||||
P3-socket-cred.patch # SO_PEERCRED, getpeereid
|
||||
P3-elf64-types.patch
|
||||
P3-open-memstream.patch # open_memstream
|
||||
P3-ifaddrs-net_if.patch # ifaddrs (synthetic — see Phase I4)
|
||||
P3-fd-event-tests.patch # eventfd/signalfd/timerfd tests
|
||||
P3-netdb-lookup-retry-fix.patch # DNS lookup retry logic
|
||||
P3-exec-root-bypass.patch # exec permission bypass for root
|
||||
P3-tcp-nodelay.patch # TCP_NODELAY socket option
|
||||
P3-select-not-epoll-timeout.patch # select: non-epoll fallback timeout
|
||||
P3-tls-get-addr-panic-fix.patch
|
||||
P3-pthread-yield.patch
|
||||
P3-secure-getenv.patch
|
||||
P3-getentropy.patch
|
||||
P3-dup3.patch
|
||||
P3-vfork.patch
|
||||
P3-clock-nanosleep.patch
|
||||
P3-socket-flags.patch # MSG_NOSIGNAL, dup3
|
||||
P3-waitid-header.patch
|
||||
P3-inet6-pton-ntop.patch # inet_pton / inet_ntop for IPv6
|
||||
P3-tcp-sockopt-forward.patch # TCP socket options forwarding
|
||||
P3-dns-aaaa-getaddrinfo-ipv6.patch # AAAA record DNS resolution
|
||||
P3-getrlimit-getdtablesize.patch # getrlimit stub + getdtablesize
|
||||
P3-in6-pktinfo.patch # in6_pktinfo struct + IPV6_PKTINFO/IPV6_RECVPKTINFO
|
||||
```
|
||||
|
||||
**Historical patches** (not currently active, kept for reference):
|
||||
- `P3-sysv-ipc.patch` — SysV IPC base
|
||||
- `P3-sysv-sem-impl.patch` — SysV semaphores
|
||||
- `P3-sysv-shm-impl.patch` — SysV shared memory
|
||||
- `P3-aio.patch` — asynchronous I/O
|
||||
|
||||
---
|
||||
|
||||
## Relationship to Other Subsystem Plans
|
||||
|
||||
- `in6_pktinfo` unblocks QtNetwork → unblocks KF6 network modules → unblocks full KDE Plasma
|
||||
- `getrlimit` kernel backing depends on `local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md`
|
||||
- `timerfd` relative support is part of POSIX.1e timer completeness (related to mqueue)
|
||||
- `ifaddrs` live discovery enables proper network configuration tooling
|
||||
|
||||
---
|
||||
|
||||
## Non-goals (Explicitly Deferred)
|
||||
|
||||
- Kernel credential syscalls (`setuid`, `getuid`, `setgroups`, `getgroups`) — kernel work required,
|
||||
tracked separately
|
||||
- Full POSIX.1e ACL interfaces — deferred until filesystem maturity warrants it
|
||||
- `libpthread` threading backend redesign — current pthread implementation is sufficient for current consumers
|
||||
@@ -26,13 +26,13 @@ Do not collapse those into one generic "implemented" label.
|
||||
|---|---|---|---|
|
||||
| `shm_open()` / `shm_unlink()` | yes | yes | provided through `sys_mman` in the live source tree |
|
||||
| named POSIX semaphores | no | yes | added by `P3-semaphore-fixes.patch` on top of `shm_open()` / `mmap()` |
|
||||
| `eventfd` | no | yes | added by `P3-eventfd.patch` through `/scheme/event/eventfd/...` |
|
||||
| `eventfd` | no | yes | added by `P3-eventfd-mod.patch` through `/scheme/event/eventfd/...` |
|
||||
| `signalfd` | no | yes | added by `P3-signalfd.patch` through `/scheme/event` plus signal-mask handling |
|
||||
| `timerfd` | no | yes | added by `P3-timerfd.patch` through `/scheme/time/{clockid}` |
|
||||
| `timerfd` | no | yes | added by `P3-timerfd-relative.patch` through `/scheme/time/{clockid}` |
|
||||
| `waitid()` | no | yes | added by `P3-waitid.patch` |
|
||||
| `ifaddrs` / `net_if` support used by IPC-adjacent consumers | no | yes | added by `P3-ifaddrs-net_if.patch`; currently synthetic |
|
||||
| SysV shm (`sys/shm.h`) | no | no | bounded carriers exist locally, but they are not part of the active concrete-wave recipe surface |
|
||||
| SysV sem (`sys/sem.h`) | no | no | bounded carriers exist locally, but they are not part of the active concrete-wave recipe surface |
|
||||
| SysV shm (`sys/shm.h`) | no | yes | activated via `P3-sysv-shm-impl.patch` in recipe (2026-04-29) |
|
||||
| SysV sem (`sys/sem.h`) | no | yes | activated via `P3-sysv-sem-impl.patch` in recipe (2026-04-29) |
|
||||
| POSIX message queues (`mqueue.h`) | no | no | still TODO in the live source tree |
|
||||
| SysV message queues (`sys/msg.h`) | no | no | still TODO in the live source tree |
|
||||
|
||||
@@ -59,9 +59,7 @@ consumer/runtime proof is recorded.
|
||||
|
||||
### Deferred SysV shm/sem work
|
||||
|
||||
Bounded SysV shm/sem carriers still exist under `local/patches/relibc/`, but they were not wired
|
||||
into the active concrete-wave recipe surface implemented in this pass. They should therefore be
|
||||
treated as deferred follow-up work, not as active build behavior.
|
||||
SysV shm/sem carriers were activated in recipe (2026-04-29). Message queues remain deferred follow-up work.
|
||||
|
||||
### Interface enumeration used by networking-adjacent consumers
|
||||
|
||||
@@ -110,8 +108,7 @@ This pass revalidated the active concrete-wave IPC-facing surface through the re
|
||||
- `semaphore/unnamed`
|
||||
|
||||
These are bounded relibc-target proofs. They improve confidence in the active fd-event and named
|
||||
semaphore surface, but they do not change the deferred status of broader SysV shm/sem or message
|
||||
queues.
|
||||
semaphore surface. SysV shm/sem are now active in the recipe (2026-04-29); message queues remain deferred.
|
||||
|
||||
## Improvement plan
|
||||
|
||||
|
||||
@@ -263,9 +263,6 @@ Packaged validators (inside target runtime):
|
||||
|
||||
## Related Documents
|
||||
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md` — canonical operator runbook for bare-metal and VFIO validation
|
||||
- `local/docs/WIFI-VALIDATION-ISSUE-TEMPLATE.md` — issue template for validation failures
|
||||
- `local/docs/WIFICTL-SCHEME-REFERENCE.md` — `/scheme/wifictl` protocol reference
|
||||
- `docs/04-LINUX-DRIVER-COMPAT.md` — linux-kpi and redox-driver-sys architecture
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
# Wi‑Fi Validation Issue Template
|
||||
|
||||
Use this template after the first real bare-metal or VFIO-backed Intel Wi‑Fi validation run.
|
||||
|
||||
## Environment
|
||||
|
||||
- Run type: bare metal / VFIO-backed guest
|
||||
- Host PCI BDF (if VFIO):
|
||||
- Expected host driver before VFIO (if applicable):
|
||||
- Red Bear profile: `wifi-open-bounded` / `wifi-dhcp` / other
|
||||
- Interface: `wlan0` / other
|
||||
- Intel device model:
|
||||
|
||||
## Commands Used
|
||||
|
||||
List the exact command(s) you ran, for example:
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-run wifi-open-bounded wlan0 /tmp/redbear-phase5-wifi-capture.json
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
./local/scripts/run-wifi-passthrough-validation.sh --host-pci 0000:xx:yy.z --host-driver iwlwifi --artifact-dir ./wifi-validation-YYYYMMDD-HHMMSS
|
||||
```
|
||||
|
||||
## Expected Outcome
|
||||
|
||||
Describe what you expected to happen.
|
||||
|
||||
## Actual Outcome
|
||||
|
||||
Describe what actually happened.
|
||||
|
||||
## Artifact Paths
|
||||
|
||||
- Capture JSON:
|
||||
- Metadata JSON (if VFIO):
|
||||
- Packaged tarball (if created):
|
||||
- Serial log:
|
||||
- Console log:
|
||||
|
||||
## Analyzer Output
|
||||
|
||||
Paste the output of:
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-analyze <capture.json>
|
||||
```
|
||||
|
||||
## Key Signals
|
||||
|
||||
- `driver_probe` result:
|
||||
- `driver_status` result:
|
||||
- `wifictl_probe` result:
|
||||
- `wifictl_status` result:
|
||||
- `netctl_status` result:
|
||||
- `wifi_connect_result`:
|
||||
- `wifi_disconnect_result`:
|
||||
- `last_error`:
|
||||
|
||||
## Suspected Blocker Class
|
||||
|
||||
One or more of:
|
||||
|
||||
- device-detection
|
||||
- firmware
|
||||
- association-control-path
|
||||
- disconnect-lifecycle
|
||||
- dhcp-or-addressing
|
||||
- reporting-surface
|
||||
- runtime-failure
|
||||
- bounded-lifecycle-pass-no-real-link-proof
|
||||
|
||||
## Notes
|
||||
|
||||
Anything else that seems relevant for reproducing or narrowing the issue.
|
||||
@@ -1,219 +0,0 @@
|
||||
# Red Bear OS Wi‑Fi Validation Runbook
|
||||
|
||||
This runbook is the canonical operator path for exercising the current bounded Intel Wi‑Fi stack on
|
||||
either a real Red Bear OS target or a VFIO-backed Red Bear guest.
|
||||
|
||||
It does **not** claim that Wi‑Fi is fully solved. Its job is to make the remaining hardware/runtime
|
||||
validation step reproducible and evidence-oriented.
|
||||
|
||||
## Goal
|
||||
|
||||
Produce one or both of the following from a real target execution:
|
||||
|
||||
- a successful bounded Wi‑Fi lifecycle run (`redbear-phase5-wifi-check`)
|
||||
- a structured evidence bundle (`redbear-phase5-wifi-capture`) for debugging real failures
|
||||
|
||||
## Path A — Bare Metal Runtime Validation
|
||||
|
||||
Use this when Red Bear OS is booted on a real machine with a supported Intel Wi‑Fi device.
|
||||
|
||||
### In target runtime
|
||||
|
||||
For an interactive operator path before or alongside the packaged checkers, the new console client is:
|
||||
|
||||
```bash
|
||||
redbear-netctl-console
|
||||
```
|
||||
|
||||
It is a Redox-native **ncurses** terminal client, and it uses the same bounded `/scheme/wifictl`
|
||||
and `/etc/netctl` surfaces as the scripted/operator flows.
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-run wifi-open-bounded wlan0 /tmp/redbear-phase5-wifi-capture.json
|
||||
test-wifi-baremetal-runtime.sh
|
||||
```
|
||||
|
||||
### Artifacts to preserve
|
||||
|
||||
- `/tmp/redbear-phase5-wifi-capture.json`
|
||||
- terminal output from `redbear-phase5-wifi-check`
|
||||
- terminal output from `test-wifi-baremetal-runtime.sh`
|
||||
- any serial console log captured during the run
|
||||
|
||||
Recommended host-side naming after copying artifacts off the target:
|
||||
|
||||
- `wifi-baremetal-capture.json`
|
||||
- `wifi-baremetal-serial.log`
|
||||
- `wifi-baremetal-console.log`
|
||||
|
||||
Recommended staging pattern on the host:
|
||||
|
||||
```bash
|
||||
run_dir=./wifi-baremetal-$(date +%Y%m%d-%H%M%S)
|
||||
mkdir -p "$run_dir"
|
||||
# copy the capture/log files into that directory
|
||||
./local/scripts/package-wifi-validation-artifacts.sh \
|
||||
"${run_dir}.tar.gz" \
|
||||
"$run_dir"
|
||||
```
|
||||
|
||||
Optional packaging step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh
|
||||
```
|
||||
|
||||
The resulting tarball now includes a small manifest file with the packaged paths and file checksums
|
||||
for regular files when `sha256sum` is available on the host.
|
||||
|
||||
Optional summary step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-baremetal-capture.json
|
||||
# or
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-validation-artifacts.tar.gz
|
||||
# or use the packaged analyzer directly on the captured JSON
|
||||
redbear-phase5-wifi-analyze ./wifi-baremetal-capture.json
|
||||
```
|
||||
|
||||
Optional one-shot post-run step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/finalize-wifi-validation-run.sh \
|
||||
./wifi-baremetal-capture.json \
|
||||
./wifi-validation-artifacts.tar.gz \
|
||||
./wifi-baremetal-serial.log \
|
||||
./wifi-baremetal-console.log
|
||||
```
|
||||
|
||||
## Path B — VFIO/QEMU Validation
|
||||
|
||||
Use this when a host can safely detach an Intel Wi‑Fi PCI function and pass it through to a Red Bear
|
||||
guest.
|
||||
|
||||
### On the host
|
||||
|
||||
First, validate the host prerequisites:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/validate-wifi-vfio-host.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--expect-driver iwlwifi
|
||||
```
|
||||
|
||||
This preflight now exits non-zero when blockers are found, so it is safe to use as an automation
|
||||
gate before attempting VFIO passthrough validation.
|
||||
|
||||
Then run the full passthrough validation wrapper:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/run-wifi-passthrough-validation.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--host-driver iwlwifi \
|
||||
--artifact-dir ./wifi-validation-$(date +%Y%m%d-%H%M%S)
|
||||
```
|
||||
|
||||
Default output artifacts from that wrapper:
|
||||
|
||||
- `./wifi-passthrough-capture.json`
|
||||
- `./wifi-passthrough-capture.json.meta.json`
|
||||
|
||||
If `--artifact-dir` is provided, those files are written into that directory instead.
|
||||
|
||||
Recommended packaging step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh \
|
||||
./wifi-passthrough-artifacts.tar.gz \
|
||||
./wifi-validation-YYYYMMDD-HHMMSS
|
||||
```
|
||||
|
||||
That tarball also includes the manifest/checksum file described above.
|
||||
|
||||
Optional summary step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-passthrough-artifacts.tar.gz
|
||||
# or
|
||||
redbear-phase5-wifi-analyze ./wifi-passthrough-capture.json
|
||||
```
|
||||
|
||||
Optional one-shot post-run step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/finalize-wifi-validation-run.sh \
|
||||
./wifi-passthrough-capture.json \
|
||||
./wifi-passthrough-artifacts.tar.gz \
|
||||
./wifi-passthrough-capture.json.meta.json
|
||||
```
|
||||
|
||||
For structured follow-up after a failed run, use:
|
||||
|
||||
- `local/docs/WIFI-VALIDATION-ISSUE-TEMPLATE.md`
|
||||
|
||||
You can override those paths explicitly if needed:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/run-wifi-passthrough-validation.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--host-driver iwlwifi \
|
||||
--capture-output ./wifi-passthrough-capture.json \
|
||||
--metadata-output ./wifi-passthrough-capture.meta.json
|
||||
```
|
||||
|
||||
The wrapper handles:
|
||||
|
||||
1. binding the selected device to `vfio-pci`
|
||||
2. launching the Red Bear guest passthrough harness
|
||||
3. running `redbear-phase5-network-check` and `redbear-phase5-wifi-run` inside the guest
|
||||
4. collecting the packaged Wi‑Fi capture bundle back to the host
|
||||
5. writing a host-side metadata sidecar for the run
|
||||
6. restoring the host driver afterwards
|
||||
|
||||
`redbear-phase5-network-check` in that flow is the bounded `redbear-full` desktop/network plumbing
|
||||
proof. It should not be read as closing the Wi‑Fi implementation plan's later Phase W5
|
||||
runtime-reporting-and-recovery milestone by itself.
|
||||
|
||||
### Artifact to preserve
|
||||
|
||||
- `./wifi-passthrough-capture.json`
|
||||
- `./wifi-passthrough-capture.meta.json`
|
||||
- full terminal log from the wrapper invocation
|
||||
|
||||
Optional packaging step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh
|
||||
```
|
||||
|
||||
## Minimum Evidence for a Real Runtime Attempt
|
||||
|
||||
At minimum, keep all of the following together:
|
||||
|
||||
- the capture JSON bundle
|
||||
- the console output of the checker/wrapper
|
||||
- the exact PCI BDF used for the Intel Wi‑Fi device
|
||||
- whether the run was bare metal or VFIO/QEMU
|
||||
|
||||
## What Success Means Today
|
||||
|
||||
Current success is still **bounded** success:
|
||||
|
||||
- the Intel driver/runtime lifecycle can be exercised on a real target
|
||||
- the Wi‑Fi control/profile/reporting stack can observe that lifecycle, including honest bounded
|
||||
pending/associating connect state when real association is not yet proven
|
||||
- the default bounded validation profile is `wifi-open-bounded`, which intentionally avoids turning
|
||||
DHCP handoff into a false requirement for lifecycle-only validation
|
||||
- the packaged runtime checker currently proves that bounded open-profile path by default; WPA2-PSK
|
||||
is implemented and covered by host/unit-level regressions, but is not yet the default packaged
|
||||
runtime validation path
|
||||
- a structured evidence bundle is captured for debugging
|
||||
|
||||
This is **not yet** the same as:
|
||||
|
||||
- real AP scan/association proof
|
||||
- real packet/data-path proof
|
||||
- DHCP success over a true wireless link
|
||||
- validated end-to-end Wi‑Fi connectivity
|
||||
|
||||
Those remain the next debugging targets after the first real target execution.
|
||||
@@ -1,77 +0,0 @@
|
||||
# `wifictl:` Scheme Reference
|
||||
|
||||
This document describes the current bounded `/scheme/wifictl` surface exposed by
|
||||
`redbear-wifictl`.
|
||||
|
||||
It is a reference for validation and debugging of the current Intel Wi‑Fi slice. It does **not**
|
||||
imply that Wi‑Fi connectivity is fully supported.
|
||||
|
||||
## Root Layout
|
||||
|
||||
Top-level entries:
|
||||
|
||||
- `wifictl:/ifaces`
|
||||
- `wifictl:/capabilities`
|
||||
|
||||
## Per-interface entries
|
||||
|
||||
For each interface under `wifictl:/ifaces/<iface>/`, the scheme currently exposes:
|
||||
|
||||
### Read-only status/state nodes
|
||||
|
||||
- `status`
|
||||
- `link-state`
|
||||
- `firmware-status`
|
||||
- `transport-status`
|
||||
- `transport-init-status`
|
||||
- `activation-status`
|
||||
- `connect-result`
|
||||
- `disconnect-result`
|
||||
- `scan-results`
|
||||
- `last-error`
|
||||
|
||||
### Read/write profile/config nodes
|
||||
|
||||
- `ssid`
|
||||
- `security`
|
||||
- `key`
|
||||
|
||||
### Write-triggered control nodes
|
||||
|
||||
- `scan`
|
||||
- `prepare`
|
||||
- `transport-probe`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `connect`
|
||||
- `disconnect`
|
||||
- `retry`
|
||||
|
||||
## Current bounded lifecycle
|
||||
|
||||
The bounded Intel path currently treats the Wi‑Fi lifecycle as:
|
||||
|
||||
1. `prepare`
|
||||
2. `transport-probe`
|
||||
3. `init-transport`
|
||||
4. `activate-nic`
|
||||
5. `connect`
|
||||
6. `disconnect`
|
||||
7. `retry`
|
||||
|
||||
The scheme records the last reported bounded connect/disconnect metadata in `connect-result` and
|
||||
`disconnect-result`.
|
||||
|
||||
## Interpretation guidance
|
||||
|
||||
- Presence of the scheme means the control surface exists, not that a real Wi‑Fi link is proven.
|
||||
- `connect-result` and `disconnect-result` are lifecycle evidence surfaces, not proof of real AP
|
||||
authentication or real packet flow.
|
||||
- `scan-results` may reflect bounded or synthetic runtime outcomes unless and until hardware-backed
|
||||
scan evidence is captured on a real target.
|
||||
|
||||
## Related documents
|
||||
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/SCRIPT-BEHAVIOR-MATRIX.md`
|
||||
@@ -1,68 +0,0 @@
|
||||
# Red Bear OS WIP Migration Ledger
|
||||
|
||||
## Purpose
|
||||
|
||||
This ledger records how Red Bear treats upstream WIP areas under the overlay policy.
|
||||
|
||||
The goal is to keep one compact, current view of whether a major WIP subsystem is:
|
||||
|
||||
- still consumed mainly from upstream WIP,
|
||||
- mirrored locally and shipped from the Red Bear overlay,
|
||||
- or mature enough upstream that Red Bear should prefer the upstream version.
|
||||
|
||||
This is a repo-governance document, not a subsystem deep dive.
|
||||
|
||||
## Status Labels
|
||||
|
||||
- **upstream-wip-input** — upstream WIP still exists and is useful as an input/reference, but Red Bear
|
||||
does not treat it as the durable shipping source of truth
|
||||
- **local-overlay-owner** — Red Bear currently owns the shipping/integration burden locally
|
||||
- **mixed-transition** — both upstream WIP and local overlay matter; Red Bear is still evaluating what
|
||||
to keep locally versus what to prefer upstream
|
||||
- **prefer-upstream** — upstream is now first-class enough that Red Bear should default to upstream and
|
||||
keep only a narrow local integration delta if still needed
|
||||
|
||||
## Current Ledger
|
||||
|
||||
| Area | Current status | Current preferred shipping source | Notes |
|
||||
|---|---|---|---|
|
||||
| Qt6 base stack (`qtbase`, `qtdeclarative`, `qtsvg`, `qtwayland`) | **mixed-transition** | local overlay + upstream WIP inputs | Upstream WIP remains useful input, but Red Bear still carries recipe/integration fixes and validation locally. |
|
||||
| KDE Frameworks / Plasma / KWin | **local-overlay-owner** | local overlay | Current KDE/Plasma recipe tree under `local/recipes/kde/` is the practical shipping source for Red Bear. |
|
||||
| Wayland compositor/session stack | **mixed-transition** | local overlay for shipping decisions | Upstream WIP recipes remain inputs, but runtime-trusted Red Bear delivery still depends on local validation and local recipe ownership where needed. |
|
||||
| `libinput` / desktop input userland | **mixed-transition** | local decision pending | Upstream WIP recipe exists, but Red Bear still treats this as a local validation and integration concern rather than a trusted upstream shipping surface. |
|
||||
| `seatd` runtime path | **mixed-transition** | recipe-level decision still local | It builds and is integrated into KDE-facing configs, but runtime trust still trails the packaging story. |
|
||||
| `redox-driver-sys` | **local-overlay-owner** | local overlay | Red Bear-owned driver substrate. |
|
||||
| `linux-kpi` | **local-overlay-owner** | local overlay | Red Bear-owned compatibility layer. |
|
||||
| `redbear-iwlwifi` | **local-overlay-owner** | local overlay | Bounded Intel Wi-Fi driver-side package below the native Red Bear Wi-Fi control plane; current scope is probe, status, firmware prepare, transport probe/init, NIC activation, bounded scan/connect/disconnect lifecycle, and retry. |
|
||||
| `redox-drm` / `amdgpu` | **local-overlay-owner** | local overlay | Red Bear-owned graphics/driver work. |
|
||||
| `firmware-loader` | **local-overlay-owner** | local overlay | Red Bear-owned runtime infrastructure. |
|
||||
| relibc compatibility overlays | **mixed-transition** | upstream + local overlay | Prefer upstream where available; keep only the overlays that still prove necessary after fresh-source reapply and downstream rebuild. |
|
||||
|
||||
## Decision Rules
|
||||
|
||||
### When to stay local
|
||||
|
||||
Stay local when one or more of the following is true:
|
||||
|
||||
- upstream still marks the recipe/subsystem WIP,
|
||||
- Red Bear still needs local fixes to build or ship it,
|
||||
- Red Bear is carrying the validation burden that upstream has not yet established,
|
||||
- the local version is the only version that currently integrates correctly with tracked Red Bear profiles.
|
||||
|
||||
### When to move back toward upstream
|
||||
|
||||
Prefer upstream when all of the following become true:
|
||||
|
||||
- upstream no longer treats the area as WIP,
|
||||
- upstream solves the same problem adequately,
|
||||
- refreshed upstream source + minimal Red Bear integration still rebuilds the affected profiles,
|
||||
- keeping the local overlay would no longer provide unique value.
|
||||
|
||||
## Review Trigger
|
||||
|
||||
Reevaluate an entry in this ledger whenever:
|
||||
|
||||
- upstream removes WIP status from the recipe/subsystem,
|
||||
- Red Bear finishes a fresh-source reapply + rebuild proof,
|
||||
- a local overlay shrinks substantially because upstream caught up,
|
||||
- or the shipping profile set starts depending on a WIP area more heavily than before.
|
||||
Reference in New Issue
Block a user