From 6eed30f0726e16f505cf84f8071a240ddae0c280 Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 27 Jul 2026 20:31:56 +0900 Subject: [PATCH] round 12: Mesa ioccom stub removal + udev-shim eth0 fallback + netcfg summary + doc stale refs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round 12 audit cleanup. Five fixes across five files plus a zero-tolerance stub policy win: 1. local/patches/mesa/04-sys-ioccom-stub-header.patch — DELETED. The patch was a hand-rolled include/sys/ioccom.h with Linux IOC bitfield constants, living as a Mesa-side stub. Per local/AGENTS.md zero-tolerance policy: 'Any stub found in the tree is a bug to be fixed, not a precedent to follow.' relibc's new include/sys/ioccom.h (commit ca7a7edb on submodule/relibc, bumped in f145e9e768) provides the same constants natively, making the patch redundant. 2. local/recipes/libs/mesa/recipe.toml — removed the now-dead '04-sys-ioccom-stub-header.patch' entry from the patches list. Note added explaining the removal so a future maintainer does not re-add it. 3. local/recipes/system/udev-shim/source/src/naming.rs — predictable_net_name() used to return the hardcoded 'eth0' on parse failure of the PCI address. On multi-interface systems where multiple devices had unparseable PCI addresses, all collided on 'eth0'. Now returns 'net-malformed-' (unique per PCI string) so each device gets a distinct name. 4. local/sources/base/netstack/src/scheme/netcfg/mod.rs — the 'summary' branch hardcoded devices.borrow().get("eth0") which made the summary output invisible to non-eth0 interfaces. Now iterates the full devices map and prints each interface's state. (The deeper 'ifaces' routing tree still has 20+ eth0 references — restructuring that requires a schema change; deferred to a follow-up that adds a configurable default iface.) 5. local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md + 3D-DESKTOP-COMPREHENSIVE-PLAN.md — renamed 'redbear-kde-session' → 'redbear-session-launch' in the final stale reference; clarified 'redbear-wayland.desktop' (not yet wired). Deferred: acpi-rs AML interpreter bare panic() (34 sites across mod.rs) and netcfg ifaces routing tree (20+ eth0 references) require schema-level refactors beyond one-shot fixes; tracked for follow-up rounds. --- local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md | 4 ++-- local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md | 2 +- local/recipes/libs/mesa/recipe.toml | 3 ++- local/recipes/system/udev-shim/source/src/naming.rs | 8 +++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md b/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md index 53d7999906..84394bd66b 100644 --- a/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md +++ b/local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md @@ -257,8 +257,8 @@ stale; the seat works.) | VT subsystem | Stubbed | Real `inputd -A N` for switching | | utmpx | Stubbed | No-op | | D-Bus system bus | ✅ `dbus-daemon 1.16.x` | None | -| D-Bus session bus | ✅ `redbear-kde-session` launches via `dbus-launch --sh-syntax` | None | -| Wayland sessions | `kde-wayland.desktop`, `redbear-wayland.desktop` | None | +| D-Bus session bus | ✅ `redbear-session-launch` launches via `dbus-launch --sh-syntax` | None | +| Wayland sessions | `kde-wayland.desktop` (KDE upstream); custom `redbear-wayland.desktop` not yet wired | None | | Compositor | `redbear-compositor --drm` | **Qt6 Wayland null+8 crash** blocks QML greeter | | DRM device | `KWIN_DRM_DEVICES=/scheme/drm/card0` + `18_dri-symlinks.service` (`/dev/dri/renderD128`) | None | diff --git a/local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md b/local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md index 1199546c77..964272753f 100644 --- a/local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md +++ b/local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md @@ -326,7 +326,7 @@ and launching a QML window under redbear-compositor. Then KWin real build become | redbear-greeter | 🟢 Builds | greeterd + Qt6/QML UI + compositor wrapper (legacy path) | | redbear-sessiond | 🟢 Builds | `org.freedesktop.login1` D-Bus broker (zbus) | | Greeter QEMU proof | 🟢 Passes | GREETER_HELLO=ok, GREETER_VALID=ok | -| redbear-kde-session | 🟢 Builds | KDE session launcher | +| redbear-session-launch | 🟢 Builds | KDE session launcher | | **SDDM v0.21.0** | 🟢 **Wired, Wayland-only build** | `sddm = {}` in `redbear-full.toml`; `21_sddm.service` via `/etc/init.d/`; `/etc/sddm.conf` with `CompositorCommand=/usr/bin/redbear-compositor`; binaries `sddm`, `sddm-greeter-qt6`, `sddm-helper-start-wayland` all staged | | **pam-redbear** | 🟢 **Wired** | `pam-redbear = {}` in `redbear-full.toml`; provides `libpam.so.0` → `redbear-authd`; SDDM configured with `-DENABLE_PAM=ON` | diff --git a/local/recipes/libs/mesa/recipe.toml b/local/recipes/libs/mesa/recipe.toml index 47320013bf..1e9b8487d0 100644 --- a/local/recipes/libs/mesa/recipe.toml +++ b/local/recipes/libs/mesa/recipe.toml @@ -13,7 +13,8 @@ upstream = "https://gitlab.freedesktop.org/mesa/mesa" patches = [ "mesa/01-virgl-redox-disk-cache.patch", "mesa/02-gbm-dumb-prime-export.patch", - "mesa/04-sys-ioccom-stub-header.patch", + # 04-sys-ioccom-stub-header.patch removed — relibc now provides + # with the Linux IOC bitfield constants DRM expects. "mesa/05-vk-sync-wchar-include.patch", # Persist the Redox EGL/DRI gate: add 'redox' to meson's system_has_kms_drm # (enables with_dri → with_egl/gbm) and to the _GNU_SOURCE platform list. diff --git a/local/recipes/system/udev-shim/source/src/naming.rs b/local/recipes/system/udev-shim/source/src/naming.rs index ea1d36f15e..cf8c2fe404 100644 --- a/local/recipes/system/udev-shim/source/src/naming.rs +++ b/local/recipes/system/udev-shim/source/src/naming.rs @@ -13,18 +13,20 @@ SUBSYSTEM=="block", KERNEL=="sd*", SYMLINK+="disk/by-id/ata-$attr{model}_$attr{s /// Generate predictable network interface name from PCI location. /// -/// Format: `enp{bus}s{slot}` — for example `enp0s1`. +/// Format: `enp{bus}s{slot}`. Malformed addresses fall back to +/// `net-malformed-` (unique per PCI string) rather than +/// a fixed name that would collide on multi-interface systems. pub fn predictable_net_name(pci_addr: &str) -> String { let parts: Vec<&str> = pci_addr.split(&[':', '.'][..]).collect(); let (bus_part, slot_part) = match parts.as_slice() { [bus, slot, _func] => (*bus, *slot), [_segment, bus, slot, _func] => (*bus, *slot), - _ => return "eth0".to_string(), + _ => return format!("net-malformed-{}", sanitize_component(pci_addr)), }; match (parse_hex_byte(bus_part), parse_hex_byte(slot_part)) { (Some(bus), Some(slot)) => format!("enp{}s{}", bus, slot), - _ => "eth0".to_string(), + _ => format!("net-malformed-{}", sanitize_component(pci_addr)), } }