Files
RedBear-OS/recipes/shells/zsh
vasilito a23012cee0 migrate: remove patch system, adopt direct source ownership
BREAKING CHANGE: The patch-based build system is removed.
All Red Bear source now lives in local/sources/<component>/ as git repos.

Changes:
- src/recipe.rs: remove patches field from SourceRecipe::Git/Tar, add Local variant
- src/cook/fetch.rs: delete fetch_apply_patches, validate_patches, normalize_patch,
  fetch_compute_patches_hash, fetch_write_patches_state, fetch_patches_state_stale,
  fetch_validate_patch_symlinks, fetch_is_patches_newer. Simplify fetch and
  fetch_offline. Remove recipe_has_patches. Add Local source handler.
- src/bin/repo.rs: remove validate-patches command and handle_validate_patches
- 70 recipe.toml files: remove patches arrays, convert core recipes to Local source
- 272 .patch symlinks deleted from recipe directories
- integrate-redbear.sh: replace patch symlink logic with source fork validation
- Makefile: replace validate-patches with validate-sources target
- AGENTS.md: remove 369 lines of patch documentation, add source ownership model
- local/docs/PATCH-GOVERNANCE.md: deleted (replaced by SOURCE-OWNERSHIP-MODEL.md)
- local/docs/SOURCE-OWNERSHIP-MODEL.md: new canonical reference
- local/sources/: Red Bear fork repos created (kernel, relibc, base, bootloader,
  installer) from frozen 0.1.0 pre-patched archives
- .gitignore: exclude local/sources/ (separate git repos)
- create-forks.sh: new script for initializing fork repos

Build: cargo check passes (5 warnings, 0 errors).
Developer workflow is now: edit local/sources/ → repo cook → test. No patches.
2026-05-29 22:32:36 +03:00
..

Zsh on Redox

Production recipe for Zsh 5.9 on Red Bear OS / Redox.

Status

  • Builds: yes
  • Runtime: basic shell works; times builtin is a no-op stub
  • Blockers: times() not yet in relibc; getrusage() present but returns zeroed data (microkernel design)

Patch Summary

File Change Reason
configure.ac Remove getrusage from AC_CHECK_FUNCS Historical: relibc now has getrusage (returns zeroed data)
Src/builtin.c Stub bin_times() times() unavailable in relibc
Src/Builtins/rlimits.c Disable set_resinfo() / free_resinfo() These depend on getrusage()

Configure Flags

  • --disable-gdbm — avoid GNU dbm dependency
  • --disable-pcre — avoid PCRE dependency
  • --disable-cap — avoid POSIX capabilities dependency
  • zsh_cv_sys_elf=no — skip ELF detection (not applicable on Redox)

Dependencies

  • ncursesw — wide-character terminal library

Install Targets

Zsh uses non-standard install targets:

make install.bin install.modules install.fns DESTDIR="${COOKBOOK_STAGE}"

Configuration Files

The recipe installs Manjaro-inspired system-wide zsh configuration:

File Purpose
/etc/zsh/zshenv Environment variables for all zsh shells
/etc/zsh/zprofile Login shell profile (sources /etc/profile for compatibility)
/etc/zsh/zshrc Interactive shell config: history, completion, colors, prompt, aliases
/etc/skel/.zshrc Template for new users
/etc/skel/.zprofile Template for new users (login shell)

Features (Manjaro-style)

  • Colored prompt: green for user, red for root, with hostname and working directory
  • Right-side prompt: shows exit code on error
  • Tab completion: with menu selection, approximate matching, and colorized listings
  • History: shared across sessions, ignores duplicates and leading-space entries
  • Aliases: ls, ll, la, grep, cp, mv, rm with color and safety flags
  • Convenience: AUTO_CD, CORRECT, NO_BEEP
  • Optional plugins: zsh-syntax-highlighting, zsh-autosuggestions (loaded if available)

Future Work

  • Re-enable times builtin when relibc gains times() support
  • Re-enable resource-limit info getrusage is now available (returns zeroed data)
  • Evaluate enabling gdbm, pcre, or cap if those libraries are ported
  • Package zsh-syntax-highlighting and zsh-autosuggestions plugins