The prior commit switched the recipe to `[source] path = "source"`, but
.gitignore:77 still listed `local/recipes/shells/brush/source` (a leftover from
when brush was a transient upstream git fetch), so the vendored tree was not
tracked — a fresh clone would have no brush source and the build would fail.
Drop that ignore line and commit the vendored working tree (reubeno/brush @
897b373e, with the Redox port patches pre-applied). brush is now a durable
local fork like the other path=source recipes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The brush recipe used an UNPINNED `git = "https://github.com/reubeno/brush"`
source, so cookbook's fetch silently re-synced it to the latest upstream `main`
on every build. It drifted onto reubeno/brush e985399 (PR #1249, which rewrote
`read_input_line`), which made the Redox port patches reject; the patch-dirtied
clone then failed cookbook's `git checkout` in the fetch step ("local changes
would be overwritten") — surfacing as "brush does not compile".
Vendor the working tree in-repo (RedBear convention: `[source] path = "source"`,
as amdgpu/redox-drm/ext4d use) at reubeno/brush @ 897b373e — the commit right
before #1249, where all four Redox patches (nix-0.31, libc-0.2, brush umask,
brush runtime/input) apply cleanly. The shell is now a local fork under our
control and can never auto-drift again. The brush-source patches are pre-applied
in the vendored tree; the recipe keeps them (apply_patch idempotently skips an
already-applied patch, so the source is never re-dirtied) as reviewable records
of the Redox changes, and still applies the nix/libc patches to the fetched
registry crates.
Verified: `cook brush - successful` in a mini build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two changes to the Redox minimal input backend patch:
1. read_input_line accumulated into a *fresh* String each retry. On the
Redox console pty, a `read_line` can return WouldBlock (or Ok(0))
after only a partial line — the characters just typed — and those
bytes, left in the read_line buffer, were discarded on every retry.
Only a fully-queued line (e.g. a leftover newline) ever came through,
so the shell echoed keystrokes but never executed the command.
Fix: accumulate partial reads into a thread-local buffer that
persists across retries and only yield a line once a newline arrives.
2. Removed all BRUSH-DBG / rb_dbg startup and read tracing (the "debug
mode" output on the console). The functional Redox changes stay:
tokio current-thread runtime and the minimal input backend selection.
Verified: brush-interactive + brush-shell compile. Runtime verification
of the interactive shell still pending a boot test.
Writing startup diagnostics to stderr interleaves with the interactive
console on the live image; /scheme/debug reaches the serial log without
disturbing the shell's tty.
- sync-versions.sh: 11 brush workspace crates 0.x -> 0.3.1 (Cat 1
in-house version policy).
- test-usb-hub-qemu.sh: boot the live ISO (canonical build-redbear.sh
artifact) instead of harddrive.img, which is only produced by older
make-all flows and goes stale — a stale Jul-17 image with a
pre-version-sync bootloader (+rb0.3.0) masked the current build and
crashed the first proof attempt. Falls back to harddrive.img only
when no ISO exists.
- Track base submodule pointer for output_level Warn console-quiet change.
- Capture brush entry.rs redox edits (tokio current-thread runtime, default
minimal input backend) as patches/brush-redox-runtime-and-input.patch and
apply it in the recipe, so a clean source re-fetch keeps the Redox port.
Port the brush shell (reubeno/brush) to Redox and adopt the recipe as a
Red Bear local recipe under local/recipes/shells/brush, with the standard
recipes/shells/brush -> ../../local/recipes/shells/brush overlay symlink so
it takes priority over any upstream WIP copy (per local/AGENTS.md "Local
recipe priority vs upstream WIP"). Removes the old recipes/wip/shells/brush.
The dependency tree did not build for Redox: nix 0.31 only partially
cfg-enables Redox and the libc crate's Redox module omits POSIX symbols that
relibc provides. Fixes are reviewable unified diffs under
local/recipes/shells/brush/patches/:
nix-0.31-redox.patch cfg-enable resource/Id/waitid/from_siginfo, rlimit
import + repr(i32), SaFlags width casts, pty.
libc-0.2-redox.patch add idtype_t, P_*/CLD_*, rusage, getrusage/waitid/
forkpty externs, siginfo child accessors.
brush-umask-redox.patch mode_t is signed on Redox; cast, not u32::from.
The recipe runs `cargo fetch` to materialise registry sources before
patching (they are only unpacked during the build), resolves the right
crate version from Cargo.lock (brush pulls both nix 0.26 and 0.31), and
applies each patch idempotently, failing loudly on version drift. The
binary target is named `brush` (not `brush-shell`), so install it
explicitly. Verified: cooks from a pristine cargo cache using only the
patch files. brush is shipped in redbear-mini as a package for in-image
validation; the login shell stays zsh until brush is runtime-proven.