Pull genuinely-new upstream Redox fixes that apply cleanly onto the fork (the
poll-timeout crash fix was already present as RedBear's own tested impl):
- 72c0078d Fix ld.so PLT relocations by relocating lazily before is_me check
(relevant to RedBear's ld.so panic class)
- f8ef2864 Fix connect for Unix sockets outside the rootfs (UDS robustness)
- 8965d7fc Fix an unwind-safety issue in openat
The PipeWire audio stack needs more Redox porting (alloca via meson, MAP_LOCKED
and other Linux mmap/ioctl-isms across many files). Audio is not required for the
SDDM login or the desktop session, so defer both to reach the login milestone;
re-add once the audio port is complete. Baked patches + recipes stay in the tree.
pipewire uses alloca() in 41 source files without including <alloca.h> (glibc
declares it via stdlib.h; relibc does not), so cross-compiling hit -Werror=
implicit-function-declaration on conf.c:356. relibc provides <alloca.h> — add
-include alloca.h to CFLAGS so every TU gets the declaration.
These four recipes applied their local/patches/ at build time via
cookbook_apply_patches — a helper that is NOT defined in the cook environment
('command not found', aborting the build on pipewire). Per the full-fork vendored
model, bake each recipe's patches into its committed source/ (redox compat shims,
qnetwork impl, kf6 migration) and remove the broken call. The .patch files stay
tracked in local/patches/ for version-bump re-derivation.
Three fixes to build sddm on Redox (Wayland-only, Qt6):
- KeyboardModel.cpp: guard the XcbKeyboardBackend include + its runtime branch
with #ifndef __redox__ (platformName is never 'xcb' on Redox, but the dead
branch still pulled in <xcb/xkb.h> -> fatal error). Wayland backend kept.
- XAuth.h: declare ~XAuth() (the recipe's XAuth.cpp defines it, but the header
only declared the ctor -> 'definition of implicitly-declared destructor').
- wayland-patch.sh XAuth.cpp heredoc: add <QFileInfo> + <QRandomGenerator>
includes and replace Qt5 qrand() with QRandomGenerator (removed in Qt6).
Converting [source] git=/tar= to path="source" removed the URL cookbook parsed
the package version from, so non-Cargo recipes without an explicit
[package].version failed at packaging ('cannot guess version', hit on
ninja-build). Add version = "0.3.1" (the branch version, matching the vendored
convention e.g. brush) to the 3 affected recipes, and make vendor-recipe.sh add
it automatically on future conversions.
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.
Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.
Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
qt6-sensors provides Qt6::Sensors (needed by KWin) but its source/ (436 files)
was only present on disk, never git-tracked — not reproducible. Commit it as a
proper vendored tree for the full-fork build.
Root cause of the recurring line-duplication corruption (duplicate #include
<sys/ioctl.h>, nested #if QT_CONFIG(opengl), duplicate assert.h): several of the
recipe's in-place source-munging steps were NOT guarded, so on a committed
(vendored) source/ they re-applied every cook and accumulated. Guard the four
unguarded ones (qwaylandclientbufferintegration opengl-wrap, qnet_unix ioctl
include, corelib CMakeLists REDOX storageinfo block) with grep/marker checks so
re-running on an already-patched tree is a no-op. The rest were already guarded
or naturally idempotent (text.replace consuming its needle).
vendor-recipe.sh converts a transient recipe to the vendored full-fork model
(repo fetch -> strip .git -> [source] path=source with provenance comment ->
un-ignore -> stamp). Used to vendor 23 of the 26 transients. xwayland deferred
(corrupt redox.patch needs regeneration; X11-compat, not login-critical);
smallvil + seatd-redox not in the full set.
Convert the transient git-fetch sddm recipe to the vendored model: commit the
source/ tree (pristine sddm @63780fcd + the two Redox patches baked in), switch
[source] to path="source" so the build never reaches github at cook time, and
keep the .patch files tracked for re-application on a version bump. Also fixes
the malformed redox-helper-utmpx-stub.patch (wrong hunk line-counts -> 'malformed
patch at line 24') by regenerating it with correct headers. First of the 26
transient recipes being vendored for an offline, reproducible full-fork build.
Proves build-redbear.sh's vendored source/ staleness loop: seeds on first sight
(no spurious rebuild), stays quiet unchanged, and invalidates target/ on
committed/uncommitted/untracked source/ changes. Keeps the loop body in sync.
The staleness gap behind the qtshadertools failure: cookbook keys its build
cache on the source.tar hash, but the actual build input for a vendored recipe
is the git-committed source/ tree. A version bump that propagates into source/
without changing source.tar (Qt's source.tar was already 6.11.1 while source/
was a 6.11.0 muddle) leaves cookbook reusing a stale stage — the desktop then
builds the old version. New loop fingerprints each vendored source/ by its git
tree hash (+ dirty flag) and rm's target/ on change; first observation only
seeds the fingerprint so it never forces a spurious full rebuild.
The 6 Plasma modules (breeze/kdecoration/kf6-kwayland/kglobalacceld/kwin) and
konsole were 'no-marker(skip)' because src_version/the validator only knew KF's
KF_VERSION. Now both also read set(PROJECT_VERSION) (Plasma) and the split
RELEASE_SERVICE_VERSION_MAJOR/MINOR/MICRO (KDE Gear), so these vendored modules
are version-checked and rebasable. Test E23.
Redo of the earlier lossy rebase with the added-file-preserving engine. 38
modules rebased to their declared upstream (KF 6.28.0 / Plasma 6.7.2 / Gear /
plasma-wayland-protocols 1.21.0) with every RedBear-added file kept (verified:
kglobalacceld5-wrapper.sh, utmp_compat.h, notifications_interface.cpp, kpty
shims) and blake3/source.tar reconciled. Deletion audit vs the pre-rebase base
shows zero RedBear files lost. 7 modules remain at their tested version pending a
manual Redox-port rebase (kf6-kded6/kiconthemes/kio/kservice SHIM-REJECT,
kirigami PATCH-REJECT, kf6-kimageformats/plasma-desktop DL-FAIL) — flagged, not
silently shipped.
The engine silently no-op'd ('!! not found') when given full paths like
local/recipes/kde/kf6-kio/ — resolve only understood bare names or group/name
tokens. Now strips a trailing slash, an absolute ROOT prefix, and a
local/recipes/ prefix before matching. Test E22.
9th silent-failure bug: the version stamp was checked BEFORE the real code marker
(Qt .cmake.conf / KDE KF_VERSION). A code-only revert leaves the stamp stale, and
the stale stamp then reported the module 'consistent' -> the engine skipped a
needed rebase and the validator false-passed a divergent tree. Both now check the
authoritative code marker first and use the stamp only as a fallback for
marker-less trees. The validator also learned KDE's KF_VERSION marker. Test E21.
Data-loss bug: rsync --delete during a rebase dropped RedBear-added files that
carry no __redox__ token (a Redox Wayland-crash wrapper .sh, a utmp compat
header, a generated D-Bus interface) because the capture was grep-on-marker
only. The engine now, for EVERY vendored rebase, fetches pristine(Vold) and
carries forward every committed file absent from Vold (content-agnostic, matched
by path) — so RedBear additions survive. If Vold cannot be fetched it rejects
(manual) rather than produce a lossy tree. New tests E20 (non-marker added file
preserved) + Vold fixtures for the rebase cases. 41 tests green.
Auto-resolved by sync-recipe-source.sh once the shim-port bugs were fixed: the
baked Redox shims (kpty PTY/utmp guards, UDisks2 D-Bus/optical-disc branches)
apply cleanly to 6.28.0 and are content-verified present in the rebased tree.
Found by extending the edge-case suite to the baked-shim path (E17-E19) after a
sync reported 'ready' but silently dropped a module's Redox shim:
- git show used an ABSOLUTE recipe path ('HEAD:/mnt/.../source/f') which git
rejects (needs repo-relative) -> empty content -> garbage delta. Now uses
${dir#$ROOT/}.
- diff|patch under 'set -o pipefail': diff exits 1 whenever files differ (always
here), so the pipeline looked failed even when patch succeeded -> EVERY shim
false-rejected. Now captures the delta to a file and checks patch's own exit.
- a shim whose file was renamed/removed upstream, or unreadable from HEAD, was
silently skipped. Now: Redox-added files are carried in verbatim; a missing
target or unreadable HEAD file -> SHIM-REJECT (manual), never a silent drop.
Also: old-version URL derivation now rewrites the major.minor dir component too
(KDE mirrors nest tarballs under .../6.28/foo-6.28.0). CI branch glob widened to
[0-9]* so 0.4.0/0.5.0 release branches keep triggering.
Follow-up to the KDE rebase: the vendored bumps had left recipe blake3 stale
(URL bumped, hash not), so recipe.toml declared a hash that no longer matched its
own source.tar. sync-recipe-source.sh now sets recipe blake3 to the authoritative
source.tar hash, and bumps transient recipes' stale cached source.tar to the
declared version. Applied to the marker-readable + transient set.
Integration (answers 'does it run automatically'):
- redbear-ci.yml now runs test-versioning-machinery.sh (33 cases) and
verify-external-source-versions.sh on every push/PR; trigger widened to
0.3.* so a release-branch increment keeps CI (and these checks) firing.
- The validator already runs in build-preflight.sh Phase 1.0C (every build),
and bump-graphics-recipes.sh (invoked by bump-release.sh --with-external)
now calls the sync engine — so an external bump propagates + is validated.
Engine hardening (both regression-tested):
- reconcile_blake3: a vendored bump often left recipe blake3 stale (URL bumped,
hash not); the engine now sets recipe blake3 to the authoritative source.tar
hash (only when source.tar version matches the URL version; no-op under --check).
- transient recipes (no vendored source/) now get their stale cached source.tar
bumped to the declared version too, instead of being skipped.