P2-ihdad-device-refactor.patch was adding imports for modules that
don't exist in the source tree (parser, digital, dispatch, FixupEngine,
InputStream). The build was failing with:
error[E0432]: unresolved import `super::parser`
error[E0432]: unresolved import `super::digital`
error[E0432]: unresolved import `super::dispatch`
error[E0432]: unresolved import `super::FixupEngine`
error[E0432]: unresolved import `super::InputStream`
This patch was speculative work referencing modules that were never
committed to the source. Without those modules, the patch breaks the
build. The Red Bear base fork (local/sources/base) has the same
device.rs as upstream (no patch needed), so removing this patch is
safe.
The other P2-ihdad-* patches (P2-ihdad-graceful-init, P2-ihdad-hda-stream)
remain as they don't add missing imports.
Earlier we over-included workspace patches. After closer inspection:
- Upstream Cargo.toml ALREADY has `exclude = ["bootstrap"]` at the end
of the workspace members list (line 72). No need to add another.
- Upstream bootstrap/Cargo.toml ALREADY has `[workspace]` declaration.
No need to add another.
The only real gap was the missing driver members (i2c, gpio, intel-thc-hidd,
acpi-resource, amlserde, thermald, ucsid). The P0-add-missing-driver-members.patch
fixes that alone.
Removed the redundant P0-bootstrap-workspace-{fix,exclude,standalone} patches.
The base build was failing with:
error: package ID specification `amd-mp2-i2cd` did not match any packages
error: package ID specification `dw-acpi-i2cd` did not match any packages
... (15+ missing drivers)
because the upstream base Cargo.toml workspace members list is missing
drivers that the recipe's BINS list tries to build (e1000d-rtl8139d
succeeded but amd-mp2-i2cd, i2c-*, gpio-*, intel-thc-hidd, ucsid, etc.
failed). Earlier Red Bear session must have had a more comprehensive
patch.
The new P0-bootstrap-workspace-exclude.patch:
- Adds `exclude = ["bootstrap"]` to the parent workspace
- Adds missing drivers to members: i2c/*, gpio/*, input/i2c-hidd,
input/intel-thc-hidd, acpi-resource, amlserde, thermald, usb/ucsid
The new P0-bootstrap-workspace-standalone.patch:
- Adds `[workspace]` to bootstrap/Cargo.toml so it can be standalone
(matches the parent workspace's exclude)
The base build was failing with:
error[E0277]: expected a `FnOnce(i32)` closure
--> daemon/src/lib.rs:67:61
error[E0308]: mismatched types
--> daemon/src/lib.rs:119:63
arguments to this function are incorrect
because P0-daemon-fix-init-notify-unwrap.patch changed `unsafe fn
get_fd(var: &str)` to return `Option<RawFd>` instead of `RawFd`,
but the upstream daemon code in SchemeDaemon::new still treated the
return value as `RawFd` (not `Option<RawFd>`).
This patch updates the SchemeDaemon code to handle the Option<RawFd>:
- Change `write_pipe` field to `Option<PipeWriter>`
- Use `.map(io::PipeWriter::from_raw_fd)` in new()
- Handle None case in ready_with_fd (return Ok early)
This matches the Daemon struct above and the Red Bear base fork at
local/sources/base.
Base build was failing with:
error[E0277]: the trait `From<libredox::error::Error>` is not implemented for `syscall::Error`
error: could not compile `scheme-utils` (lib) due to 13 previous errors
error: could not compile `daemon` (lib) due to 6 previous errors
because the workspace pinned redox-scheme 0.11.0 (libredox 0.1.12) and
redox_syscall 0.7.4. The newer libredox 0.1.16/0.1.17 has a different
Error API. Bump both to versions compatible with libredox 0.1.17:
redox-scheme 0.11.0 -> 0.11.1 (requires libredox 0.1.17)
redox_syscall 0.7.4 -> 0.8.1 (requires libredox 0.1.17)
This matches the Red Bear base fork at local/sources/base.
The base build was failing with:
error: multiple workspace roots found in the same workspace:
bootstrap
source
because P0-bootstrap-workspace-fix.patch was adding a [workspace] block
to bootstrap/Cargo.toml, while P0-workspace-add-bootstrap.patch was
adding 'bootstrap' as a member of the parent source/Cargo.toml
workspace. Cargo forbids a member from also being a workspace root.
The correct fix is P0-workspace-add-bootstrap.patch alone (which makes
bootstrap a member of the parent workspace). The P0-bootstrap-workspace-fix
patch was an inverted/historical artifact and has been removed.
This restores the build to working state for the redbear-mini target.
bison build was failing with:
undefined reference to `__fseterr\'
in function `rpl_fprintf'
in function `rpl_vfprintf'
because the relibc recipe was missing P3-stdio-fseterr.patch, which
implements `__freadahead` and `__fseterr` in src/header/stdio/ext.rs
and adds the stdio_ext.h prototypes needed by gnulib (which m4, bison,
and flex all rely on).
The patch file was already present in local/patches/relibc/ with a
symlink at recipes/core/relibc/P3-stdio-fseterr.patch, but the recipe
never listed it. Without these symbols, any gnulib-using package that
links rpl_fprintf/rpl_vfprintf fails to link.
This is the same fix that was already applied to local/sources/relibc
fork at commit f45729d4 but not mirrored into the recipe patch chain
for upstream builds.
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)
The previous patch left a broken `__redox__ && HAVE_GETLOCALENAME_L`
branch that referenced the non-existent relibc function `getlocalename_l`,
causing the m4 build to fail with:
error: #error "Please port gnulib getlocalename_l-unsafe.c to your platform!"
Redox's relibc has no `getlocalename_l` symbol. The patch now uses
`__redox__ && !HAVE_GETLOCALENAME_L` and returns "C" (matching
the existing `__ANDROID__` branch behaviour for unknown locales),
so the build no longer hits the gnulib #error.
- Switch tar URL from invent.kde.org git tag v6.10.0 to
download.kde.org 6.27.0 release tarball (matching the other KF6
packages). Add blake3 verified against source.tar.
- Add cookbook_apply_patches call so the durable patches in
local/patches/kf6-kio/ are applied at cook time.
- Add local/patches/kf6-kio/01-no-testlib.patch:
- Drop Qt6 Test from top-level find_package, make conditional on
BUILD_TESTING (relibc qtbase disables Test)
- Skip LibMount find_package on cross-compile (CMAKE_CROSSCOMPILING)
to avoid LibMount errors since the toolchain sets CMAKE_SYSTEM_NAME=Linux
- Combined short flags expand: -Sdy → install --noconfirm
- -Gp prints raw PKGBUILD from AUR
- -Scc cleans all caches including ~/.cub/tmp/
- --noconfirm skips interactive prompts
- Deduplicated flag expansion, added to global flag list
- extract_bash_function() extracts bash function bodies by brace-matching
- Custom template now populates build_script from build() body
- Custom template now populates install_script from package() body
- Fixes 'custom builds require prepare/build/install instructions' error
- search now queries AUR directly on Linux (skips pkgutils repo)
- install -S offers AUR fetch + recipe conversion on Linux
- update-all, remove, query-* show helpful error on Linux
- host_only_notice() helper for consistent messaging