Commit Graph

682 Commits

Author SHA1 Message Date
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
vasilito bb6cca06ad fix(base): remove orphan P0-ihdad-* patches (no longer needed) 2026-06-18 10:24:41 +03:00
vasilito df8027fb2f fix(base): drop broken P2-ihdad-device-refactor.patch
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.
2026-06-18 10:24:24 +03:00
vasilito 95b4c5ecfd fix(base): clean up workspace patches; only add-missing-drivers needed
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.
2026-06-18 10:18:14 +03:00
vasilito 87f932c48a fix(base): comprehensive workspace fix (exclude bootstrap + add missing drivers)
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)
2026-06-18 10:13:16 +03:00
vasilito d86bcb24af fix(base): add P0-daemon-schemedaemon-option-unwrap.patch
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.
2026-06-18 10:06:12 +03:00
vasilito f819d0f64a fix(base): bump redox-scheme 0.11.0->0.11.1 and redox_syscall 0.7.4->0.8.1
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.
2026-06-18 09:57:43 +03:00
vasilito 513bcf3569 fix(base): remove inverted P0-bootstrap-workspace-fix.patch
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.
2026-06-18 09:46:27 +03:00
vasilito a07df50a6c fix(relibc): add missing P3-stdio-fseterr.patch to recipe
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.
2026-06-18 09:41:39 +03:00
vasilito d5ef14e689 fix(build): skip strict source-tree validation in development mode
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)
2026-06-18 09:34:16 +03:00
vasilito 79e242d539 fix(build): remove dangling base/redox.patch symlink + policy doc
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)
2026-06-18 09:31:12 +03:00
vasilito 691ae7980a m4: fix getlocalename_l-unsafe.c patch to use !HAVE_GETLOCALENAME_L
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.
2026-06-18 09:18:52 +03:00
vasilito 6a146bf7ac kf6-kio: align with overlay-patches policy + use 6.27.0 tarball
- 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
2026-06-18 08:38:30 +03:00
vasilito 1a46659555 fix: noconfirm auto-selects first AUR match 2026-05-08 11:01:02 +01:00
vasilito 2fb61f3cde feat: yay-style combined flags (-Sdy, -Sdd, -Sfyu), --noconfirm, -Gp, -Scc
- 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
2026-05-08 08:16:50 +01:00
vasilito ccb3e319bf fix: all cub/cubl operations now use ~/.cub/
- import saves to ~/.cub/recipes/ (primary, not CWD)
- build temp dirs use ~/.cub/tmp/ (not /tmp)
- AUR clone temp dirs use ~/.cub/tmp/
- cub_temp_dir() replaces create_temp_dir()
- removed old create_temp_dir (dead code)
2026-05-08 07:47:05 +01:00
vasilito 1a281b6805 fix: --import-aur now saves to both CWD and ~/.cub/ 2026-05-08 07:43:13 +01:00
vasilito 8557b30fd0 fix: extract PKGBUILD build()/package() bodies for Custom templates
- 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
2026-05-08 07:39:37 +01:00
vasilito 83fec96974 fix: cubl exact-match AUR search, numbered ambiguity menu, PKGBUILD-not-found handling 2026-05-08 07:32:38 +01:00
vasilito c7ed251250 fix: cubl AUR search on Linux, graceful pkgutils fallback
- 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
2026-05-08 00:47:51 +01:00
vasilito 8b45905b5b fix: restore ratatui deps in cub-tui, add cubl host recipe 2026-05-08 00:41:13 +01:00
vasilito 950edaa65f cub: full AUR package manager + Phase 1-5 native build tools
cub redesign (local/recipes/system/cub/):
- AUR RPC v5 client (serde_json) with search/info
- ~/.cub/ user-local recipe/source/repo storage
- Enhanced PKGBUILD parser: optdepends, .SRCINFO, split packages, 19 linuxism patterns
- Recipe generation: host: prefix on dev-deps, shallow_clone, cargopath, installs, optional-packages
- Dependency resolver: scans build errors for missing commands/headers/libs/pkgconfig, maps to packages
- Dependency installation: checks installed packages, fetches AUR deps, interactive prompt
- ~110 Arc→Redox dependency mappings
- ratatui TUI: search, info, install, build, query views
- 14 Arch-style CLI switches (-S/-Si/-Syu/-G/-R/-Q/-Qi/-Ql)
- 65 tests, 0 failures, clean build

Phase 1-5 native build tools (local/recipes/dev/):
- P1 Substrate: tar, m4, diffutils (gnulib bypass), mkfifo kernel patch (1085 lines)
- P2 Build Systems: bison, flex, meson (standalone wrapper), ninja-build, libtool
- P3 Native GCC: gcc-native, binutils-native (cross-compiled for redox host)
- P4 Native LLVM: llvm-native (clang + lld from monorepo)
- P5 Native Rust: rust-native (rustc + cargo)
- Groups: build-essential-native, dev-essential expanded

Config:
- redbear-mini: +7 tools (diffutils, tar, bison, flex, meson, ninja, m4)
- redbear-full: +4 native tools (gcc, binutils, llvm, rust)
- All recipes moved to local/ with symlinks for cookbook discovery (Red Bear policy)

Docs:
- BUILD-TOOLS-PORTING-PLAN.md: phased porting roadmap
- CUB-WORKFLOW-ASSESSMENT.md: gap analysis and integration assessment
2026-05-08 00:13:31 +01:00
vasilito b3efb0e400 fix: handle nullable Cub AUR fields 2026-05-07 21:20:15 +01:00
vasilito 27daa8e1f0 feat: add Cub cook autodetect strategy 2026-05-07 21:19:24 +01:00
vasilito d2c1c1a5b1 fix: type Cub AUR out-of-date visitor 2026-05-07 21:18:34 +01:00
vasilito 3917bf5dfe style: format Cub TUI module 2026-05-07 21:17:45 +01:00
vasilito c03165e98d style: format Cub library modules 2026-05-07 21:17:24 +01:00
vasilito eeec04b0a9 style: format Cub CLI code 2026-05-07 21:17:06 +01:00
vasilito 7316ffc203 fix: parse Cub AUR responses with serde 2026-05-07 21:15:48 +01:00
vasilito 8cd3f6035a docs: document Cub package manager 2026-05-07 21:15:08 +01:00