Commit Graph

711 Commits

Author SHA1 Message Date
vasilito f44cf75930 tlc: update README + PLAN — 973 tests, 90% binding parity, all MEDIUM gaps closed 2026-06-19 09:06:14 +03:00
vasilito 6f3e129068 tlc: PanelInfo (C-x i) and PanelQuickView (C-x q) modes
PanelInfo: inactive panel shows filesystem summary + cursor file
metadata (size, mode, owner, links, mtime/atime/ctime).
PanelQuickView: inactive panel shows first 30 lines of cursor file
(binary detection via NUL byte scan).

Both modes are toggle-only (not in Alt-L listing cycle). Pressing
the chord again restores normal Full listing.

New ListingMode variants: Info, QuickView.
New Cmd variants: PanelInfo, PanelQuickView.
Ctrl-X dispatcher: 'i' and 'q' follow-up keys wired.
render_info_body and render_quickview_body renderers added.

9 new tests (toggle round-trips, cycle-skip, dispatch integration,
quickview text/binary). 973 tests total, 0 failures.
2026-06-19 09:05:31 +03:00
vasilito ed77278066 tlc: update PLAN.md + README — VFS integration done, clippy clean, 964 tests
PLAN.md §3.A item 6 (VFS): resolved — panel now browses archives in-place
PLAN.md §3.A item 8 (clippy): resolved — all lints clean
PLAN.md §3.B item 18 (clippy): resolved
PLAN.md §14.1 summary: 67/77 bindings (87%), remaining MEDIUM in progress
README: 964 tests, phase 15h file highlighting
2026-06-19 08:57:43 +03:00
vasilito 277b3f0b16 tlc: clippy cleanup — fix all lint warnings
Fixes 19 clippy warnings across 9 files:
- filehighlight.rs: iter().any() → contains()
- info.rs: manual clamp → .clamp()
- jobs.rs: format!("{}",x) → to_string(), clone → from_ref, allow if_same_then_else
- mod.rs: clone → from_ref, Box::new(x::new()) → Box::default(), allow collapsible_match
- panel.rs: io::Error::new(Other,..) → io::Error::other(..), merge identical archive ext branches
- subshell.rs: allow needless_return (cfg-gated false positive)
- tar.rs, cpio.rs: simplify boolean expressions
- macro.rs: allow collapsible_match (guard would change fallthrough semantics)

1 pre-existing warning remains (Include(String) never read in mc_ext.rs).
964 tests pass, 0 failures.
2026-06-19 08:51:10 +03:00
vasilito fde8384189 tlc: VFS archive panel integration — browse archives in-place
Panel now enters archives (.tar, .tar.gz, .tar.bz2, .tar.xz, .zip,
.cpio) when pressing Enter, browsing their contents like directories.
Pressing '..' at the archive root exits back to the local filesystem.

Three new Panel fields: vfs (Box<dyn Vfs> backend), vfs_path (VfsPath
inside archive), vfs_archive (local PathBuf of archive file).

New methods: try_enter_archive(), replace_directory_vfs(),
display_path(), is_in_vfs(), is_archive_extension() helper.

Title bar shows 'archive.tar:/inner/path' when browsing inside an
archive via synthesized display path.

5 new tests for archive extension detection (case-insensitive).
964 tests total, 0 failures.
2026-06-19 08:40:42 +03:00
vasilito ddc95702a0 tlc: update README — 959 tests, phase 15h file highlighting 2026-06-19 08:35:47 +03:00
vasilito 77750b5128 tlc: file highlighting — type-based coloring in panel entries
New filehighlight.rs module categorizes files by extension into 9 types
(Normal, Executable, Archive, Audio, Video, Image, Source, Documentation,
Database). Each type maps to a theme palette color via file_type_color().

entry_style() in mod.rs now applies file type colors for non-directory,
non-symlink files. Executable detection uses permission bits (owner_exec
|| group_exec || other_exec).

13 new unit tests covering all categories, case insensitivity, hidden
files, and edge cases. 959 tests total, 0 failures.
2026-06-19 08:33:22 +03:00
vasilito a8e10e731a tlc: update PLAN.md parity tables — 65/77 bindings done (84%)
Updated statuses for features implemented in recent batches:
- ScreenList (Alt-backtick), EditHistory (Alt-Shift-E) → Done
- SymlinkRelative (C-x s), SymlinkEdit (C-x v) → Done
- CompareDirs (C-x d) → Done
- ExternalPanelize (C-x !), Jobs (C-x j), VfsList (C-x a) → Done
- FilteredView (Alt-!) → Done
- Editor prompts (Find/Replace/GotoLine/GotoCol/SaveAs) → Done
- Updated mod.rs line count (1597→3119)
2026-06-19 08:32:00 +03:00
vasilito a223e2ff67 Fix redbear-mini build: syslog va_list, ps2d, fbcond, acpid, bootstrap, m4, bash
Core fixes to get redbear-mini building and booting via UEFI:

relibc: Use 'VaListImpl as va_list' in syslog so cbindgen outputs va_list
  instead of unknown VaListImpl type (matches stdio pattern). Fixes
  openssl3 and all C consumers of syslog.h.

base fork (f97da5b0): ps2d missing info! import, ps2d dead variable,
  fbcond drm-0.15 API fix, acpid 31 errors (ivrs/mcfg modules, duplicate
  methods, packed fields, dmar copy-paste bug), bootstrap abort_immediate
  removal (feature removed from nightly)

redox-driver-sys: Add PciQuirkFlags re-export for crate-root imports

bash: Regenerate P1-mksyntax-host-headers.patch with proper unified diff

m4: Fix getlocalename_l unsafe wrapper

config: Comment out mc (requires glib-2.0 chain, not needed for mini)

UEFI boot verified in QEMU — boots to RedBear login prompt.

Author: vasilito <adminpupkin@gmail.com>
2026-06-19 08:30:37 +03:00
vasilito ffaaf1a540 tlc: update README stats — 946 tests, phase 15g complete 2026-06-19 06:50:30 +03:00
vasilito 59a4672acd tlc: Ctrl-X chord system, Compare Dirs, SymlinkRelative/Edit, format paragraph, viewer tail-f
- Ctrl-X prefix chord: dispatch_ctrl_x_followup routes 9 follow-up keys
  (d/j/c/o/l/s/v/a/!) to their respective commands
- Compare Dirs (C-x d): size-only mode matching MC behavior, marks
  files that differ between left and right panels
- SymlinkRelative (C-x s): creates symlinks with relative target paths
  via relpath_from() helper
- SymlinkEdit (C-x v): reads existing symlink target, opens edit dialog
  with for_editing() constructor, removes old link before recreating
- ScreenList/EditHistory/FilteredView dialogs wired through dispatcher,
  handle_dialog_key, apply_finished_dialog, and render
- Editor format paragraph (Alt-P): wrap_paragraph + paragraph_range +
  reformat_paragraph_at in format.rs, 29 unit tests
- Viewer growing buffer: toggle_growing/check_growing for tail -f mode,
  detects file growth and appends new content

946 tests pass (default), 964 (all features), 0 failures
2026-06-19 06:49:15 +03:00
vasilito 9c5c5733cc tlc: add screen_list, edit_history, filtered_view dialog modules 2026-06-19 06:34:02 +03:00
vasilito 28b9621f17 fix: uutils-tar build + ncurses patch for ncurses-6.6
uutils-tar (WIP recipe):
- Pin to commit 8ecd8e0 (rust-version 1.85.0, compatible with our
  nightly-2025-10-03 toolchain)
- Fix nix-0.30.1 Redox bug: SaFlags_t declared as c_ulong but libc-0.2.184
  defines SA_*/sa_flags as c_int. Patch SaFlags_t to c_int.
- Enable nix pty module for Redox (relibc has all POSIX PTY functions)
- Add forkpty to libc-0.2.184 Redox module (relibc's pty.h defines it
  but libc crate doesn't expose it)

ncurses:
- Remove obsolete first hunk from redox.patch (cf_includedir lines
  already removed in ncurses-6.6). Keep second hunk (redox* platform
  detection).
2026-06-19 03:35:28 +03:00
vasilito 121ad07561 tlc: comprehensive feature batch — syntax highlighting, jobs/panelize/vfs dialogs, bug fixes
Editor:
- Wire syntect Highlighter into Editor::render() with viewport scroll
  state replay and selection-aware span splitting
  (split_spans_for_selection helper)
- F5/F6 escape sequence fallback parser (parse_unsupported_fkey)
  handles CSI-tilde, SS3, and Linux console F-key encodings
- Arrow key cursor sync (Option B — every move_*/select_* syncs buffer)
- ESC no-op on main screen (MC parity, F10 only exit)

FileManager:
- Background jobs dialog (Cmd::Jobs / C-x j) with Arc<Mutex<JobRegistry>>,
  worker threads, progress bars, retry, dismiss — zero unsafe
- External panelize dialog (Cmd::Panelize / C-x !)
- VFS list dialog (Cmd::VfsList / C-x a)
- Dialog consistency: MkDir/Delete now use render_button_row
- Panel cursor starts on first entry (index 1, not ..)
- Command execution returns immediately (no pause/prompt)
- Confirm dialog, sort dialog modules
- Backspace navigates to parent dir (MC parity, already worked)

Viewer:
- Magic number detection module
- NROFF backspace-overstrike rendering for man pages

Binaries:
- tlcedit (standalone editor, 1.2 MB)
- tlcview (standalone viewer, 661 KB)

Docs:
- PLAN.md §14 parity tables reconciled with comprehensive audit
- README.md updated: 109 files, 43k lines, 902 tests, 3 binaries

Stats: 902 tests pass (default), 920 (all features), 0 failures, 1 pre-existing warning
2026-06-19 03:23:42 +03:00
vasilito 1648147405 docs: add PACKAGE-BUILD-QUIRKS.md, update sync docs with build quirks
- Create local/docs/PACKAGE-BUILD-QUIRKS.md: central reference for all
  known cross-compilation build issues (DYNAMIC_INIT behavior, m4
  CFLAGS/LDFLAGS ordering, ninja-build BUILD_TESTING, general patterns)
- Update UPSTREAM-SYNC-PROCEDURE.md: add m4 LDFLAGS ordering quirk
  (must be set AFTER DYNAMIC_INIT), ninja-build BUILD_TESTING=OFF,
  DYNAMIC_INIT overwrite behavior, source reversion root cause summary
- Update AGENTS.md: reference PACKAGE-BUILD-QUIRKS.md in WHERE TO LOOK
  table, add DYNAMIC_INIT and cross-compilation test conventions
- Fix ninja-build recipe: add cmakeflags=['-DBUILD_TESTING=OFF']
  (tests require host gtest which conflicts with Redox sysroot stdlib.h)
2026-06-19 01:32:06 +03:00
vasilito 7606343765 build: fix source reversion root cause — stop applying patches to local fork paths
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)
2026-06-19 01:05:08 +03:00
vasilito 3333dc1867 kernel: remove 78 old patch symlinks (path= local fork model)
The old patch symlinks (P0-*.patch through P17-*.patch, redox.patch,
redbear-consolidated.patch) were leftover from the git+patches model.
With path = "../../../local/sources/kernel", the cookbook creates a
symlink to the local fork and does NOT apply any patches. The patches
are preserved in local/patches/kernel/ for reference only.
2026-06-19 00:52:15 +03:00
vasilito 75d10c2f90 docs: comprehensive update to upstream-sync known issues
Document all kernel compile errors and fixes from V151-V156:
- Feature gates (asm_cfg, if_let_guard)
- Unsafe blocks (Rust 2024 edition)
- Removed Red Bear APIs (SchedPolicy, RUN_QUEUE_COUNT, etc.)
- CONTEXT_SWITCH_LOCK missing
- new_addrsp_guard field missing
- switch.rs must be replaced entirely (EEVDF replaces DWRR)
- kcall signature change
- ProcSchemeVerb new variants
- notify_files type change (Vec -> SmallVec)
- RSDP signature change
- Cookbook symlink behavior for local forks
- m4 platform detection and -fcommon fix

Author: vasilito <adminpupkin@gmail.com>
2026-06-19 00:09:51 +03:00
vasilito a853c9250e docs: document known issues and fixes from 2026-06-18 upstream sync
Author: vasilito <adminpupkin@gmail.com>
2026-06-18 22:22:29 +03:00
vasilito 4d8b7bd5e0 kernel: remove RUSTC_BOOTSTRAP from recipe (env var approach in Makefile)
Author: vasilito <adminpupkin@gmail.com>
2026-06-18 22:20:30 +03:00
vasilito efaea36d8a kernel: switch recipe to local fork (path-based source)
Use local/sources/kernel/ as path source instead of git+patches.
The fork is synced to upstream b93260ed and has all Red Bear changes
squash-merged. Old patches preserved in local/patches/kernel/ for
reference only.

Author: vasilito <adminpupkin@gmail.com>
2026-06-18 22:09:54 +03:00
vasilito c2077aca68 installer: switch recipe to local fork (path-based source)
Use local/sources/installer/ as path source instead of git+patch.
The fork is synced to upstream 142b2d6. The ext4/GRUB patch will
be re-applied to the fork as a follow-up.

Author: vasilito <adminpupkin@gmail.com>
2026-06-18 21:43:01 +03:00
vasilito eaf8e89785 recipes: bump redox_syscall 0.7 → 0.8 in all Red Bear recipes
Aligns all Red Bear custom recipe dependencies with the syscall 0.8.x
version used by the upstream-synced base and relibc forks.

Author: vasilito <adminpupkin@gmail.com>
2026-06-18 21:36:21 +03:00
vasilito 89e6f29b22 local: commit full local tree state 2026-06-18 20:46:44 +03:00
vasilito e689c19d10 gitignore: stop ignoring local tree 2026-06-18 20:45:28 +03:00
vasilito 3c56003215 gitignore: track tlc source tree 2026-06-18 20:44:27 +03:00
vasilito 3c81c96cd1 tui/tlc: recover shell control and editor surface work 2026-06-18 20:43:28 +03:00
vasilito 60a062132a sync: relibc upstream + build system fixes
- relibc: update local fork to upstream 99675e2b, switch recipe to path source
- prefix.mk: auto-sync relibc artifacts from sysroot to gcc-install
- script.rs: add prefix sysroot -L to LDFLAGS for correct libc.a resolution
- config.rs: env vars always override cookbook.toml (fix COOKBOOK_OFFLINE bug)
- docs: add UPSTREAM-SYNC-PROCEDURE.md for repeatable fork updates
2026-06-18 20:27:46 +03:00
vasilito 5e0a3cc15b fix(redox-driver-sys): use std::result::Result for acquire_iopl and rename unused param
The redox arm of acquire_iopl was using 'crate::Result' which is a
1-generic type alias. Use std::result::Result<(), Error> instead.

Also rename unused 'product' param to '_product' in lookup_hid_quirks.
2026-06-18 18:45:56 +03:00
vasilito c43d3eddd9 fix(redox-driver-sys): restore redox_syscall alias in io.rs and fix Result type
io.rs uses redox_syscall::dup, ::CallFlags, ::ProcSchemeVerb but was
missing the 'use syscall as redox_syscall' alias (was removed earlier
because cargo check passed locally without it, but actual build needs it).

Also fixed: the non-redox arm of acquire_iopl was using crate::Result
which is a 1-generic type alias; std::result::Result with 2 generics
is what's needed here.

Removed leftover cfg attribute and duplicate use crate::Result.
2026-06-18 18:39:44 +03:00
vasilito 6512746ad7 feat(redox-driver-sys): add HidQuirkFlags and lookup_hid_quirks
usbhidd references redox_driver_sys::quirks::HidQuirkFlags and
redox_driver_sys::quirks::lookup_hid_quirks. Add these to unblock
HID driver compilation.
2026-06-18 18:26:25 +03:00
vasilito 5916b24732 feat(redox-driver-sys): add missing quirk types and PCI config API
Add types referenced by acpid/pcid/xhcid but missing from redox-driver-sys:
- AcpiQuirkFlags: 15 flag variants (OSI disable, battery, lid, sleep)
- ChipsetQuirkFlags, ClocksourceQuirkFlags, CpuBugFlags, UsbAudioQuirkFlags:
  empty bitflag structs (full implementation is follow-up)
- ConfigWriteWidth enum, QuirkAction enum, PciConfigWriter trait
- PciQuirkLookup struct, lookup_pci_quirks_full function
- XhciControllerQuirkFlags: 7 variants
- lookup_xhci_controller_quirks_full function
- load_dmi_acpi_quirks function
- Missing PciQuirkFlags: NO_PM_RESET, NO_FLR, BROKEN_INTX_MASKING, NO_PME
- Default impl on PciQuirkFlags (required by lookup return)

Also restored 'use syscall as redox_syscall' alias to all source files
since the redox_syscall crate (0.7.x and 0.8.x) exposes itself as 'syscall'.

This unblocks compilation of base fork's pcid, acpid, xhcid daemons.
2026-06-18 17:59:29 +03:00
vasilito 8657c6d45e fix(redox-driver-sys): pin redox_syscall to 0.7 to match base workspace
Base fork workspace pins redox_syscall = '0.7.4' (resolves to 0.7.5).
Without this pin, redox-driver-sys pulls in 0.8.1, causing type mismatches
in downstream crates like driver-graphics that use both 0.7.5 and 0.8.1
types in the same expression.
2026-06-18 17:19:02 +03:00
vasilito 4b988041b5 fix(cookbook): symlink local-fork Path sources instead of copying
When the cookbook copies a Path source into recipes/<name>/source, the
relative 'path = ...' references in [workspace.dependencies] are resolved
relative to the COPY location (recipes/<name>/source/), not the original
fork location (local/sources/<name>/). Since these directories are at
different depths from repo root (3 levels vs 4 levels), no single relative
path can resolve correctly in both locations.

Fix: for Path sources that point inside local/sources/ or local/recipes/,
use symlink instead of copy. The symlink preserves the original location
so the workspace root remains the fork's native directory, and relative
paths resolve consistently.

Also fixes symlink target bug: use canonicalize() to convert the path to
absolute form before symlinking. The previous code used the relative path
as the symlink target, which was resolved relative to the symlink's parent
directory (not where the symlink was created), producing broken symlinks.
2026-06-18 17:15:12 +03:00
vasilito 0ea71065b7 fix(cookbook): copy path source in fetch_offline() too (was only in fetch())
fetch_offline() is called for protected recipes (base, kernel, relibc, etc.)
when REDBEAR_ALLOW_PROTECTED_FETCH=1 is set. Previously, its Path source
arm called only redbear_ensure_offline_source() which fails with
'is not exist' if the source dir is empty.

The fix: do the same copy_dir_all() in fetch_offline()'s Path arm as
in fetch()'s Path arm. This means local fork paths (local/sources/base,
local/sources/relibc, etc.) are correctly copied into recipes/<name>/source
during protected recipe fetch.
2026-06-18 16:48:33 +03:00
vasilito 58901ef83e fix(redox-driver-sys): restore 'use syscall as redox_syscall' alias
The redox_syscall crate (0.7.x and 0.8.x) has [lib].name = 'syscall',
so the crate is exposed as 'syscall' in source code, not 'redox_syscall'.
Without the alias, all 'use redox_syscall::...' imports fail to resolve.

Also fixed:
- lib.rs:46,86 'redox_syscall::error::Error' (now resolves via alias)
- io.rs:23 'Result<()>' -> 'Result<(), crate::DriverError>' (Result needs 2 generics)
- Cargo.toml: pin redox_syscall to 0.7 to match the rest of base fork

This restores redox-driver-sys compilation against base fork 0.2.3
reset to redbear-working.
2026-06-18 16:47:56 +03:00
vasilito b9cefe0806 docs: comprehensive audit fixes (build paths, python314, stubs, my-→redbear-, immutability)
Top-level + local docs audit (2026-06-18). Findings and fixes:

1. AGENTS.md CONVENTIONS section — corrected 'my-' prefix contradiction.
   The legacy 'my-*' prefix is deprecated and git-ignored. Use 'redbear-*'
   for tracked first-class configs.

2. README.md quick-start — promoted 'local/scripts/build-redbear.sh' to
   the recommended entry point. Bare 'scripts/run.sh --build' remains as
   a secondary path. Added note about build-redbear.sh's policy gates
   (.config checking, REDBEAR_ALLOW_PROTECTED_FETCH=1).

3. docs/06-BUILD-SYSTEM-SETUP.md — restructured Building section to put
   'build-redbear.sh' first, then 'make all' as legacy/advanced with
   clear notes on what gates it bypasses.

4. docs/05-KDE-PLASMA-ON-REDOX.md — replaced 'Stub-only package for
   dependency resolution' wording for kirigami. Per project policy
   (local/AGENTS.md STUB AND WORKAROUND POLICY — ZERO TOLERANCE),
   stubs are forbidden. The kirigami build is blocked at the QML gate;
   the recipe is honest and ships no fake/fallback package.

5. local/docs/BUILD-TOOLS-PORTING-PLAN.md — replaced all 'python312'
   references with 'python314' (matches V8.3 P0 bump from earlier).

6. local/AGENTS.md — added 'LOCAL RECIPE SOURCE IMMUTABILITY' section
   documenting the cb8b093564 guarantee. Any path matching
   /local/recipes/ is unconditionally immutable; no env var or flag
   can override. REDBEAR_ALLOW_LOCAL_UNFETCH=1 was removed as a kill
   switch and is now dead code. distclean-nuclear is now a no-op for
   local recipes.
2026-06-18 15:29:11 +03:00
vasilito dc9465fc1e tui/tlc: restore recovered UI and input work 2026-06-18 15:26:30 +03:00
vasilito cb8b093564 fix(build): make local/recipes/* sources unconditionally immutable
Internal Red Bear subprojects (tlc, redbear-*, redbear-greeter, etc.) live
under local/recipes/* and have no upstream source — they are committed to
our own gitea only. If lost, they cannot be recovered from any public
source.

The previous guard used is_local_overlay() && !redbear_allow_local_unfetch()
which could be bypassed by setting REDBEAR_ALLOW_LOCAL_UNFETCH=1. This was
triggered inadvertently (exact trigger unknown) and destroyed the source
tree of local/recipes/tui/tlc/source/.

This commit makes the protection UNCONDITIONAL:

- is_local_overlay() already correctly identifies any path under
  local/recipes/ as internal.
- The handle_clean unfetch path now refuses ALL local/recipes/* sources
  with a clear error message. No env var can override this.
- The fetch() path's git-reset/git-clean-ffdx and source-wipe guards now
  also refuse local overlays unconditionally.
- The dead redbear_allow_local_unfetch() function is removed.
- Makefile distclean-nuclear target is documented as a no-op for local/.

distclean still works for non-local recipes (upstream sources from
sources/redbear-0.1.0/ or git mirrors can be safely re-fetched).
2026-06-18 15:13:11 +03:00
vasilito f54ac13045 build: restore offline-first policy (REDBEAR_RELEASE + drop vendored gnu-config)
- .config: restore REDBEAR_RELEASE?=0.1.0. The previous commit
  (f6241fb80e) dropped it, which violates the release model in
  local/AGENTS.md (sources are frozen at the 0.1.0 release and
  the .config file must declare the active release identifier
  so the build is reproducible).
- src/cook/gnu-config/{config.guess,config.sub}: remove the
  vendored copies added in the previous commit. Modifying
  src/ directly violates the policy in local/AGENTS.md:
  'DO NOT modify mk/ or src/ directly — extend via local/scripts/'.
  Any offline fallback for GNU_CONFIG_GET should live in
  local/scripts/, not in mainline src/.

Per local/AGENTS.md STUB AND WORKAROUND POLICY (zero tolerance for
stubs, workarounds, sed/awk hacks, etc.) and RELEASE MODEL (FORK —
sources frozen, REDBEAR_RELEASE required).
2026-06-18 12:58:35 +03:00
vasilito f6241fb80e build: align with overlay-patches policy + gnu-config + gettext fix
- .config: drop REDBEAR_RELEASE?=0.1.0 (was forcing offline)
- local/patches/gettext/01-external-gettext.patch (new): fix
  AM_GNU_GETTEXT arg for autopoint 0.23.1+. autopoint now requires
  'external' as first arg; gettext 0.22.5 used 'use-libtool'/'here'.
  Patched 3 files: gettext-tools, gettext-runtime, gettext-runtime/intl.
- recipes/tools/gettext/01-external-gettext.patch (symlink): durable
  source for the patch.
- recipes/tools/gettext/recipe.toml: fix source script for
  gettext 0.22.5:
  - Use /usr/share/aclocal (not /share/aclocal) — host sysroot is /.
  - Create missing m4/ subdirs in every configure.ac-bearing dir
    before autoreconf runs (newer aclocal needs them).
- src/cook/gnu-config/{config.sub,config.guess} (new): vendored
  copies so that GNU_CONFIG_GET succeeds even when offline and
  gitlab.redox-os.org is unreachable.
2026-06-18 11:46:12 +03:00
vasilito 439542adaa refactor(base): switch recipe to use local/sources/base fork
After several rounds of patch alignment issues with the overlay-patches
approach, switching to the local Red Bear base fork. The local fork is
the durable source of truth (already at d0ca0d5f with 14 unused-var
fixes). Future work will import upstream redox-os/base commits into the
fork and re-apply any necessary Red Bear deltas as patches on top.

This matches the existing pattern: kernel and relibc are also built
from local forks (local/sources/kernel, local/sources/relibc).

The old overlay patches in local/patches/base/ are preserved for
reference and will be re-applied to the fork during the next
synchronization pass.
2026-06-18 11:44:44 +03:00
vasilito 1c05667c4e fix(patches): use minimal context hunks to allow strict (fuzz=0) apply
The build system uses `patch --fuzz=0` to apply patches atomically.
Previous patches had extra context that included line counts in the
hunk header that didn't match the current source state due to upstream
drift. The result was atomic rollbacks.

Reduce the hunk context to 1-2 lines around the actual change. This
keeps the patches minimal and ensures they apply cleanly under fuzz=0.

- P0-redox-scheme-bump-0.11.1.patch: hunk now starts at line 96
  (where redox-scheme actually is in the current source)
- P0-relibc-syscall-0.8.1.patch: hunk now starts at line 71
  (where redox_syscall actually is in the current relibc source)
2026-06-18 11:33:25 +03:00
vasilito cca5261f3a fix(relibc): bump workspace redox_syscall to 0.8.1 too
The P0-redox-ioctl-syscall-0.8.1.patch only bumped the redox-ioctl
sub-crate's pin. The relibc main workspace still pinned
redox_syscall = 0.7.4, causing relibc itself to fail to compile
with redox-rt errors when the path-override in base pulled in
the now-0.8.1 redox-ioctl.

Bump the relibc workspace's redox_syscall to 0.8.1 to match.
2026-06-18 11:06:21 +03:00
vasilito 3652bca828 fix(base): add P0-redox-ioctl-path-override.patch to use local redox-ioctl
The previous P0-redox-ioctl-syscall-0.8.1.patch on relibc was useless
because base uses `redox-ioctl = { git = ... relibc.git }` which
bypasses the relibc recipe's local source.

Add a [patch] override in base/Cargo.toml to use the local relibc
source's redox-ioctl instead, which has the syscall 0.8.1 pin.
2026-06-18 10:59:30 +03:00
vasilito a4393b4533 fix(relibc): bump redox-ioctl's redox_syscall pin to 0.8.1
Base build was failing with:

  error[E0277]: `?` couldn't convert the error to `syscall::error::Error`
    --> drivers/graphics/driver-graphics/src/lib.rs

because relibc's redox-ioctl sub-crate pins `redox_syscall = "0.7"`
which uses one syscall::Error type, but the rest of the build
(redox-scheme 0.11.1, base workspace redox_syscall 0.8.1) uses
another. Two versions of the same type can't unify across crate
boundaries.

Bump the pin in relibc/redox-ioctl/Cargo.toml to 0.8.1 to match.
2026-06-18 10:54:36 +03:00
vasilito 6c440d0d03 fix(base): comprehensive daemon fix replacing conflicting patch chain
The previous daemon patches (P0-daemon-init-notify-graceful, P0-daemon-fix-init-notify-unwrap,
P0-daemon-silence-init-notify) were conflicting with each other and with
the upstream daemon code. The result was either:
1. get_fd returns RawFd (-1) but Daemon.write_pipe is Option<PipeWriter>
   (from P0-daemon-init-notify-graceful) — broken
2. get_fd returns Option<RawFd> but Daemon::new uses io::PipeWriter::from_raw_fd
   (no .map()) — broken

This single comprehensive patch applies all needed changes atomically:
- get_fd returns Option<RawFd> with full error handling
- Daemon.write_pipe: Option<PipeWriter>
- Daemon::new uses .map(|fd| unsafe { from_raw_fd(fd) })
- Daemon::ready handles Option
- SchemeDaemon.write_pipe: Option<PipeWriter>
- SchemeDaemon::new uses same closure pattern
- ready_with_fd handles Option

Replaces: P0-daemon-init-notify-graceful, P0-daemon-fix-init-notify-unwrap,
P0-daemon-silence-init-notify
2026-06-18 10:48:56 +03:00
vasilito e460612120 fix(base): drop my P0-daemon-schemedaemon-option-unwrap.patch (was wrong state)
The previous commit (d86bcb24a) added this patch which assumed a
different state of daemon/src/lib.rs than what P0-daemon-fix-init-notify-unwrap.patch
produces. The original P0-daemon-fix-init-notify-unwrap.patch ALREADY
fixes the same lines using a proper closure:

  unsafe { get_fd("INIT_NOTIFY").map(|fd| io::PipeWriter::from_raw_fd(fd)) }

vs my (broken) version:

  unsafe { get_fd("INIT_NOTIFY").map(io::PipeWriter::from_raw_fd) }

The original uses a closure which makes the unsafe call syntactically
valid. My version passes the function directly which Rust 2024 rejects
because from_raw_fd is unsafe fn.

Removing the redundant patch and relying on P0-daemon-fix-init-notify-unwrap
which is already in the recipe.
2026-06-18 10:44:40 +03:00
vasilito 4822495e25 fix(base): drop inverted P2-xhcid-remaining.patch
P2-xhcid-remaining.patch was renaming allocate_first_msi_interrupt_on_bsp
to try_allocate_first_msi_interrupt_on_bsp and adding Result return types.
But the upstream pcid crate has the un-prefixed allocate_* functions, not
the try_ versions. This patch was based on a future pcid API that does
not exist in the current source.

Without the patch, the upstream xhcid main.rs uses the correct
allocate_* function names that match the upstream pcid crate API.
2026-06-18 10:32:17 +03:00
vasilito a4ff225df3 fix(base): drop broken P2-ihdad-hda-stream.patch
Same issue as P2-ihdad-device-refactor (already removed in df8027fb2f).
Adds imports for parser, digital, dispatch, FixupEngine, InputStream
modules that don't exist in the source tree.
2026-06-18 10:28:12 +03:00