TUI rewrite (the visible half of the change):
- 8 views instead of 6: Home, Search, Info, Install, Build,
Query, Remove, Updates — central VIEW_ORDER const in
tui/views/mod.rs and cycle_view() / parent_view() helpers
mean adding a 9th view is one line.
- Help overlay is now view-scoped: shows a Global section and
an In this view section that only lists keybindings the
current view actually honors.
- Esc goes back one view (parent_view map); q still quits.
- New ConfirmAction enum and full-screen confirm_banner
widget: pressing i / b / r / U now sets pending_confirm
and shows a banner; y confirms, n cancels.
- TUI build routed through the canonical fetch_aur_to_store
+ validate_git_target instead of an inline git clone. The
6 swallowed errors are now surfaced in build_log and
status_message.
- panic-catching wrapper around spawn_action so a panic in
the worker thread becomes a visible ActionUpdate instead
of a frozen spinner.
- TUI cancel architecture: Arc<Mutex<Option<Child>>> shared
between parent and worker drainer, Arc<AtomicBool> cancel
flag, c keypress in Install/Build views calls child.kill().
- Terminal too-small guard: < 14 rows or < 40 cols renders
a Terminal too small overlay instead of broken layout.
- Sticky error coloring in the status bar: success uses
theme.success, failure uses theme.error, neutral uses
status_style.
- PgUp / PgDn global scroll bindings for Install/Build log
views; scroll position tracked in install_log_scroll /
build_log_scroll u16 fields; install_log_joined /
build_log_joined pre-joined strings avoid repeated
Vec<String>::join calls during render.
- CubApp::new() returns Result<Self, CubError>; HOME missing
or store.init() failure is now a fatal error overlay
instead of a silent /tmp/.cub fallback.
AUR hardening:
- AUR client (reqwest::blocking::Client) gets 5s connect +
15s request timeouts.
- fetch_aur_to_store writes the recipe atomically: stage in
store.tmp_dir()/recipe-staging-<name>-<nanos>, then
fs::rename. TmpGuard drop cleans up the clone directory.
- validate_git_target rejects names with .., ://, leading -,
empty, or NUL bytes (was previously only catching leading -).
- redox-pkg dependency pinned to rev
52f7930f8e6dfbe85efd115b3848ea802e1a56f0 to match the
resolved Cargo.lock.
God-module split (main.rs 2063 -> 1723 lines):
- constants.rs: 10 path / URL constants.
- bur_helpers.rs: search_cached_bur, ensure_bur_package_dir,
sync_bur_repo, default_bur_repo_url, bur_repo_dir,
aur_repo_url, BurMatch struct.
- fs_helpers.rs: find_stage_dir, directory_has_entries,
copy_dir_recursive, remove_dir_if_exists,
current_unix_timestamp, join_strings, join_package_names,
empty_if_blank, yes_no.
- paths.rs: cub_temp_dir, validate_git_target.
Tests:
- 19 unit tests in main-side modules (was 5); 121 in the
lib (unchanged). Total 140/140 pass.
- New CubError variant tests, validate_git_target
happy-path + 4 attack vectors, cub_temp_dir unique-name
under concurrent calls, bur_repo_dir / aur_repo_url
composition, fs_helpers round-trips with tempfile
scratch dirs.
Policy:
- local/AGENTS.md gains a TUI CONVENTION section: single
binary, -i flag, no separate -tui crate, ratatui 0.30
+ termion 4.0.6, anti-pattern list. cub, redbear-info,
and redbear-netctl-console are listed as already
compliant.
- cubl (the cub lib-only consumer) recipe path updated
from -p cub-cli to -p cub.
Verified: cargo build --workspace and --no-default-features
and --features full and --features tui all clean; cargo
test --workspace 140/140 pass; cub --version cub 0.2.3;
cub --help 21 subcommands.
Pick up the ninja-build fork's 0.2.3 branch HEAD (26f6155), which
adds an extern "C" declaration of getloadavg(double[], int)
guarded by __redox__ to util.cc. Redox's <cstdlib> wrapper pulls
in a stale toolchain stdlib.h that lacks getloadavg, so util.cc
fails to compile on Redox with an implicit-function-declaration
error even though relibc provides the implementation. Other
platforms are untouched.
Extract protocol-agnostic FenceTimeline from Intel to shared
src/drivers/fence.rs — atomic-based fence tracking suitable
for Intel, VIRGL, and AMD drivers.
Extract protocol-agnostic SyncobjManager from Intel to shared
src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/
wait/query and sync_file fd export/import.
Wire both into VirtioDriver:
- Add FenceTimeline + SyncobjManager fields
- Implement all 5 GpuDriver syncobj trait methods
(create, destroy, wait, export_fd, import_fd)
- Track fence seqnos in virgl_submit_3d (allocate
before submit, signal after completion)
Intel fence.rs and syncobj.rs converted to thin re-export
modules pointing at shared sources — no behavioral change
for Intel driver.
This gives Mesa VIRGL userspace the standard DRM syncobj
API for GPU/compositor synchronization.
Passes the current Unix timestamp as BUILD_TIMESTAMP env var
to cargo, so rtcd can use it as a fallback when the hardware
RTC is unavailable or returns invalid data.
bison: fix __fseterr stub injection using LIBS variable instead
of ar rcs to avoid static archive member ordering issues.
Root cause chain discovered and fixed:
1. GCC built-in stddef.h shadowed by relibc's _STDDEF_H guard
→ fix_types.h with guarded typedefs for 15+ sys types
2. gnulib configure bakes raw typedefs into GL_CFLAG_GNULIB_WARNINGS
→ strip them from Makefiles after configure
3. __fseterr/__freadahead don't exist in relibc
→ compile C stubs and inject into link via Makefile patch
The recipe pattern is documented and reusable for other gnulib packages
(ninja-build, diffutils, etc.).
Also: bootloader recipe needs RUSTFLAGS=-Zunstable-options for
custom target support after redoxer toolchain restore.
Proven recipe pattern for gnulib cross-compilation on Redox:
1. fix_types.h with guarded typedefs for ALL sys/types.h types
2. Strip raw typedefs from GL_CFLAG_GNULIB_WARNINGS after configure
3. Set cache vars for functions gnulib can't detect
Remaining: __fseterr/__freadahead stubs for linker (need relibc-level
or recipe-level .o injection)
Root cause: gnulib configure bakes raw typedef statements
(typedef long unsigned int size_t; etc.) into the generated
Makefile's GL_CFLAG_GNULIB_WARNINGS variable. These break
shell command parsing when expanded on recipe lines.
Fix:
1. Strip raw typedefs from all generated Makefiles after configure
2. Provide fix_types.h with guarded typedefs for size_t, ptrdiff_t,
off_t, wchar_t, ssize_t, time_t
3. Force-include fix_types.h via CPPFLAGS to work around the
cross-compiler's GCC built-in stddef.h ordering issue
Also: comprehensive upstream relibc comparison and import plan
The cross-compiler's GCC built-in stddef.h is blocked by relibc's
_STDDEF_H guard, causing size_t/off_t/ptrdiff_t to be undefined.
Add fix_types.h with guarded typedefs and force-include via CPPFLAGS.
Also: comprehensive upstream relibc comparison for systematic import.
Remaining: redoxer env overrides CC, injecting broken stdint typedefs
from its toolchain. This needs a redoxer-level fix to clean the
injected flags before passing to build commands.
Without this cache variable, gnulib's configure incorrectly assumes
time_t is unavailable when cross-compiling for Redox, generating
broken fallback headers that fail with 'time_t undeclared' at
the compile-time integrality check.
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.
Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.
127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.
Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.
127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.