- recipes/dev/python312/recipe.toml: use COOKBOOK_TOOLCHAIN for
--with-build-python instead of /tmp/python312, which the build system
never stages. Add [ -x ] guard for clear failure on missing dev-dep.
- recipes/core/userutils/recipe.toml: switch from upstream git URL to
local fork (local/sources/userutils/) per the local fork model. The
upstream source opens /scheme/pty/ptmx which the ptyd scheme does not
recognize; the local fork opens /scheme/pty correctly and avoids the
getty PTY panic.
- local/scripts/build-preflight.sh: warn when a recipe build script
references /tmp/<known-package>/, since the cookbook does not stage
host dev-deps under /tmp/<name>. Points authors at COOKBOOK_TOOLCHAIN.
- local/scripts/build-redbear.sh: replace 'tail -1 || true' on pre-cook
failures with proper error capture, last-50-lines tail on failure, and
exit-1. Verify the pkgar exists after a successful cook.
Add local/scripts/cleanup-build.sh - a git-aware cleanup script that
uses 'git ls-files' to whitelist tracked files before deletion.
Prevents the class of cleanup disasters that deleted local recipe
sources and local fork sources.
Update AGENTS.md with the new safe cleanup procedure.
Update CONSOLE-TO-KDE-DESKTOP-PLAN.md to v5.8 with the qtdeclarative
qfeatures.h fix and the new safe cleanup script.
- Add --address=unix:path=/run/dbus/system_bus_socket to dbus-daemon args
- Add before = ["13_redbear-sessiond.service"] for strict ordering
- Fixes redbear-sessiond "failed to read from socket" errors
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
TLC (Twilight Commander) was missing from both ISO configs. Added
tlc = {} to [packages] in redbear-mini.toml and redbear-full.toml.
Created missing symlink: recipes/tui/tlc -> ../../local/recipes/tui/tlc.
The build-redbear.sh script was applying patches from local/patches/ to
recipes/core/{kernel,base,relibc,installer}/source/ via apply_patch_dir().
For path= (local fork) components, recipes/core/<comp>/source is a SYMLINK
to local/sources/<comp>. The patches went through the symlink and modified
the fork directly — re-adding old code like SchedPolicy that was already
removed from the fork.
This was the root cause of the kernel source reversion bug that caused
intermittent build failures (V157, V159): old patches re-applying stale
code to the synced fork through symlinks.
Fix:
- Remove apply_patch_dir calls for kernel, base, relibc, installer
(all use path= local fork model — changes are committed to the fork)
- Keep apply_patch_dir for bootloader (still uses git= + patches)
- Remove stash_nested_repo_if_dirty for relibc (no patches to stash)
- Update verify-overlay-integrity.sh expected patch symlinks
- Update apply-patches.sh to not create kernel/base patch symlinks
- Fix 005-qtbase signature marker (wrong path: libs → wip/qt)
- Remove 78 old patch symlinks from recipes/core/kernel/ (cleanup)
The preflight validate-source-trees.py was blocking development builds
with 'To restore: ./local/scripts/restore-sources.sh --release=<release>'
because the source/ trees for 17 core recipes (base, kernel, etc.) are
gitignored and only auto-fetched on demand by `repo cook`.
This worked correctly for release mode (REDBEAR_RELEASE=...) where
sources are immutable and pre-extracted, but blocked every dev build.
Now:
- RELEASE mode: full strict validation, sources must be pre-extracted
- Development mode: validation skipped, repo cook auto-fetches sources
This is the documented Red Bear OS policy (see AGENTS.md:
Build flow: 'make all CONFIG_NAME=redbear-full' calls repo cook which
fetches sources from git/tar URLs)
The build was failing at verify-overlay-integrity.sh with:
ERROR: dangling patch symlink: recipes/core/base/redox.patch -> .../local/patches/base/redox.patch
ERROR: missing critical patch: local/patches/base/redox.patch
The mega-patch (100MB+) was gitignored and got lost, while the
dangling symlink at recipes/core/base/ is leftover infrastructure.
The base recipe (recipes/core/base/recipe.toml) does NOT reference
redox.patch - it uses individual P*.patch files (P0-P9). The mega-patch
was abandoned 2026-04-30 in favor of ~100 individual patches.
Changes:
- Remove dangling recipes/core/base/redox.patch symlink
- Update verify-overlay-integrity.sh to drop obsolete references
(redox.patch in base) and consolidate redbear-live-full into the
current critical configs list
- Remove 'local/patches/base/redox.patch' from .gitignore (it is gone
for good; never resurrect the mega-patch approach)
- Document NEVER-GITIGNORE-CRITICAL-INFRASTRUCTURE policy in AGENTS.md
(replaces the obsolete 'Large Patch Files' section that described
the now-removed chunks/reassembly approach)
- Add Linux reference tree migration note (2.1GB tree should eventually
be tracked via sparse submodule or gitea mirror)
check-unwired-patches.sh: scans local/patches/ for .patch files not
referenced in any recipe.toml patches = [...] array. Detects 262
unwired patches (most intentionally kept for reference/rebase).
P2-rebrand-start-message.patch: minimal 39-line patch changing
'Redox OS starting' to 'RedBear OS starting' in x86_64, aarch64,
and riscv64 arch start files. Wired into kernel recipe after
P8-msi.patch. Verified: make r.kernel builds with all 3 patches.
Build system issues surfaced by the detector:
- 250+ kernel individual patches kept for reference (absorbed/)
- ~50 base individual patches — many intentionally unwired
- ~30 relibc patches — may need wiring into relibc recipe
- build-system patches applied by scripts, not recipes
Add redbear-usb-storage-check in-guest binary that validates USB mass
storage read and write I/O: discovers /scheme/disk/ devices, writes a
test pattern to sector 2048, reads it back, verifies match, restores
original content. Updates test-usb-storage-qemu.sh with write-proof
verification step.
Includes all accumulated Red Bear OS work: kernel patches, relibc
patches, driver infrastructure, DRM/GPU, KDE recipes, firmware,
validation tooling, build system hardening, and documentation.
Finalize all non-artifact changes accumulated from other sessions:
- config updates, recipe changes, source edits, patches
- pkgar/cache artifacts intentionally excluded (build outputs)
This is the maximum achievable scope for this session.
Hardware-accelerated KDE blocked by: QML gate, KWin/Plasma builds,
hardware GPU validation — all require build system + physical GPU.
Add guard-recipes.sh with four modes:
- --verify: check all local/recipes have correct symlinks into recipes/
- --fix: repair broken symlinks (run before builds)
- --save-all: snapshot all recipe.toml into local/recipes/
- --restore: recreate all symlinks from local/recipes/ (run after sync-upstream)
Wired into apply-patches.sh (post-patch) and sync-upstream.sh (post-sync).
This prevents the build system from deleting recipe files during
cargo cook, make distclean, or upstream source refresh.
Regex now matches KDE-style URLs (/archive/v6.10.0/pkg-v6.10.0.tar.gz).
42 KDE archives all use proper version numbers:
KF6: v6.10.0, Plasma: v6.3.4, kwin: v6.3.4, attica: v6.10.0
- archive-sources.sh: exports fully-patched source archives as
category-pkgname-vVERSION-patched.tar.gz with recipe.toml
- Integrated into build-redbear.sh (runs after every successful build)
- Versions extracted from: explicit rev=, tar URL, or git HEAD
- integrate-redbear.sh: added all missing local recipe symlinks
(breeze, kde-cli-tools, kdecoration, kirigami, plasma-*, wayland/*,
redbear-compositor, redbear-passwd, redox-drm, amdgpu, tests/*)
- 210 archives generated, 171 packages in manifest
- All 12 I2C/GPIO/UCSI drivers verified in base archive
- Add P0-bootstrap-workspace-fix.patch and P2-i2c-gpio-ucsi-drivers.patch
symlinks to integrate-redbear.sh (auto-created on every build)
- Update PATCH-GOVERNANCE.md with Apr 30 recovery: rebased P2 patch,
fixed PCI API (try_mem→map_bar, try_map_bar→map_bar), 12 drivers
- All daemon patches now durable: survive source refresh, make clean,
make distclean via recipe patches list + integrate script
Verified x86_64-unknown-redox cross-compilation:
redbear-hwutils, redbear-info, redbear-compositor all build and publish.
Host cargo check zero warnings. Target make r.* successful.
12 total commits. 7 master plan workstreams advanced.
test-posix-runtime.sh: unified POSIX runtime harness running all 6
relibc-phase1-tests C programs in guest/QEMU modes, exit-code-based
redbear-usb-check.rs: recreated after cancelled task cleanup —
full Phase-pattern checker with JSON output, xHCI/USB/HID/storage probes
Zero warnings, all scripts syntax-clean.
redbear-usb-check: rewritten from 99-line minimal checker to full
Phase-pattern validation (CheckResult/Report, JSON output, proper
cfg-gating). Checks xHCI controllers, USB device enumeration,
HID class detection, storage class detection.
test-usb-runtime.sh: guest + QEMU harness following Phase 1-5 pattern.
Zero warnings.
test-wifi-runtime.sh: runs redbear-phase5-wifi-check + wifi-link-check
in guest/QEMU modes, exit-code-based, following Phase 1-5 pattern
test-bt-runtime.sh: runs redbear-bluetooth-battery-check in
guest/QEMU modes, following same pattern
Hardware validation requires real BT controller + USB passthrough.
Packages/ is the canonical binary package repository for Red Bear OS.
Contains stage.pkgar copies of all built packages (91 files).
New scripts:
- local/scripts/sync-packages.sh: syncs built pkgar → Packages/
- make packages-sync: run sync
- make packages-list: list package count
Future: cache-auto will auto-sync to Packages/ after each build.
Red Bear is a fork/overlay on top of Redox. The upstream build
system wasn't designed for forks — it loses all cached stages on
make clean with no recovery path.
This commit adds a git-tracked build cache:
- local/cache/pkgar/{pkg}/stage.pkgar — per-package cache files
- cache-sync.sh: sync built packages → git-tracked cache
- cache-sync.sh --restore: restore cache → recipe targets
- cache-sync.sh --commit: sync + git commit
- Auto-restore before build, auto-sync after build
Cache survives: make clean, make distclean, git clone, upstream rebase.
Recovery from clean: seconds (restore from git) vs hours (full rebuild).
Adds comprehensive build cache snapshot and restore for overlay OS.
Problem: Upstream Redox build system is single-stream — make clean
destroys cached stage.pkgar files permanently. Build can't recover
without full from-scratch rebuild (2-4 hours).
Solution: Red Bear cache system provides:
- snapshot-cache.sh: Save all stage.pkgar to local/cache/
- restore-cache.sh: Restore from snapshot after make clean
- Auto-restore: Makefile auto-restores cache before build
- Essential cache: Pre-built caches for boot packages tracked in git
- Cookbook fixes: Missing deps trigger rebuild instead of crash
With cache restore, make clean recovery is measured in seconds,
not hours.
Gaps fixed in cookbook:
- modified_all_btree: missing dep → UNIX_EPOCH (rebuild trigger)
- sysroot install: missing dep → skip + rebuild
- apply-patches.sh: add signature-marker checks for build-system patches
to handle cases where reverse-check fails but patch is already applied
- test-baremetal.sh: auto-disable TUI when stdout is not a terminal;
pass CI=1 to make
- test-live-iso-qemu.sh: pass CI=1 via env to prevent repo cook panic
- scripts/run.sh: auto-disable TUI when stdout is not a terminal;
pass CI=1 to qemu launch
- repo.rs: improve TUI initialization error messages (raw mode + alternate
screen) and rustfmt cleanups
- config.rs: auto-detect TTY presence for TUI enablement; use is_terminal()
instead of relying solely on CI env var
Consolidate compile target naming (redbear-live, redbear-grub-live-full,
etc.), add config/redbear-grub-live-full.toml, make redbear-live-full-grub
a legacy alias, update build-iso.sh to support all GRUB live targets, and
sync AGENTS.md/README.md build command documentation.
fetch.rs: use full commit hash for deterministic checkout. recipe.rs:
refactor recipe handling for cleaner patch application. sync-upstream:
add dry-run mode and improve rebase error recovery.