From b66431cbbe7ca022289acc62865c5cb159a0e655 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Wed, 6 May 2026 14:39:55 +0100 Subject: [PATCH] fix: restore libwayland redox.patch to working state, update docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reverted redox.patch to original 39-line version (build-tested) - Documented libwayland→qtbase→kded6 build dependency chain - Updated WAYLAND-IMPLEMENTATION-PLAN.md to v2.1 - Deleted 45 stale .bak patch files - pkgar restored from packages/ backup --- local/docs/WAYLAND-IMPLEMENTATION-PLAN.md | 21 +++++++++++++++- local/patches/libwayland/redox.patch | 29 +---------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/local/docs/WAYLAND-IMPLEMENTATION-PLAN.md b/local/docs/WAYLAND-IMPLEMENTATION-PLAN.md index 6e596d87e..9669db4f9 100644 --- a/local/docs/WAYLAND-IMPLEMENTATION-PLAN.md +++ b/local/docs/WAYLAND-IMPLEMENTATION-PLAN.md @@ -1,5 +1,5 @@ # Red Bear OS Wayland Implementation Plan -**Version:** 2.0 (2026-05-06) +**Version:** 2.1 (2026-05-06) **Status:** Canonical Wayland subsystem plan — **Wayland-only path, no framebuffer workarounds** ## Architecture Decision (2026-05-06) @@ -154,3 +154,22 @@ Hardware DRM/KMS rendering depends on `redox-drm` driver maturity. Success criterion: `redbear-compositor: client 65536 connected` followed by `redbear-compositor: dispatch` (not a page fault). + +### Build Dependency Chain (Critical, discovered 2026-05-06) + +When modifying libwayland source or `local/patches/libwayland/redox.patch`, the +full chain must be rebuilt: + +``` +libwayland recipe → repo/x86_64-unknown-redox/libwayland.pkgar +qtbase recipe → copies pkgar into sysroot → links Qt6 Wayland QPA +kf6-kded6 recipe → links against qtbase/sysroot/libwayland-client.a +``` + +**Failure mode**: Modifying only libwayland does NOT update qtbase's static copy +of `libwayland-client.a`. The old binary persists in qtbase's sysroot. All +three recipes must be force-rebuilt (delete `target/` directories) AND the +repo pkgar cache must be regenerated. + +**Recovery**: If `repo/x86_64-unknown-redox/libwayland.pkgar` is deleted, a +backup exists at `packages/x86_64-unknown-redox/libwayland.pkgar`. diff --git a/local/patches/libwayland/redox.patch b/local/patches/libwayland/redox.patch index 7eb575bb7..68a5b3e08 100644 --- a/local/patches/libwayland/redox.patch +++ b/local/patches/libwayland/redox.patch @@ -36,31 +36,4 @@ +} #include #include -+--- a/src/wayland-client.c -++++ b/src/wayland-client.c -+@@ -649,6 +649,11 @@ -+ wl_proxy_add_listener(struct wl_proxy *proxy, -+ void (**implementation)(void), void *data) -+ { -++ if (!proxy) { -++ fprintf(stderr, "FATAL: wl_proxy_add_listener(NULL) caller=%p -- returning error\n", -++ __builtin_return_address(0)); -++ return -1; -++ } -+ if (proxy->flags & WL_PROXY_FLAG_WRAPPER) -+ wl_abort("Proxy %p is a wrapper\n", proxy); -+ -+@@ -2448,6 +2453,7 @@ -+ wl_proxy_get_version(struct wl_proxy *proxy) -+ { -++ if (!proxy) return 0; -+ return proxy->version; -+ } -+ -+@@ -2566,6 +2572,7 @@ -+ wl_proxy_get_display(struct wl_proxy *proxy) -+ { -++ if (!proxy) return NULL; -+ return proxy->display; -+ } - +