Commit Graph

656 Commits

Author SHA1 Message Date
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
vasilito f5d8431c08 fix: harden Cub git and tempdir handling 2026-05-07 21:14:48 +01:00
vasilito 6f431603a3 fix: harden Cub CLI runtime fallbacks 2026-05-07 21:08:55 +01:00
vasilito ce4c6beb24 feat: build Cub CLI and TUI workflows 2026-05-07 20:57:51 +01:00
vasilito a77325310b feat: add Cub recipe storage and TUI shell 2026-05-07 20:57:33 +01:00
vasilito 8920083308 feat: add Cub package backend modules 2026-05-07 20:57:11 +01:00
vasilito 37d6e51ad4 fix: adapt KF6 pty and language dialog 2026-05-07 20:56:52 +01:00
vasilito 8932eccf65 fix: add remaining KF6 PIC flags 2026-05-07 20:56:35 +01:00
vasilito f92886b990 fix: add KF6 widget PIC flags 2026-05-07 20:56:16 +01:00
vasilito 0aceb22e55 fix: add KF6 PIC build flags 2026-05-07 20:55:56 +01:00
vasilito 6949e3e869 fix: relax KF6 CMake link targets 2026-05-07 20:55:36 +01:00
vasilito e13b14cdeb fix: guard Qt Wayland empty cursors 2026-05-07 20:55:17 +01:00
vasilito 882c2974ec fix: harden Qt Wayland listener generation 2026-05-07 20:54:59 +01:00
vasilito 182f5dafa1 fix: stabilize linux-kpi mac80211 tx stats layout 2026-05-07 20:54:41 +01:00
vasilito bc7ca1f035 fix: clean linux-kpi memory helpers 2026-05-07 20:54:24 +01:00
vasilito 68cea5a830 fix: clean linux-kpi DRM shim warnings 2026-05-07 20:54:04 +01:00
vasilito de1398c772 fix: map virtio GPU BAR from pcid handoff 2026-05-07 20:53:44 +01:00
vasilito ebd3da74d0 fix: stop redox-drm on terminal scheme EBADF 2026-05-07 20:53:27 +01:00
vasilito e90a637fd3 fix: remove unreachable redox-drm driver match 2026-05-07 20:53:09 +01:00
vasilito 94f5ceed78 fix: wire redox-drm handoff patches 2026-05-07 20:52:51 +01:00
vasilito 5305110a36 feat: add redox-driver-sys pcid handoff client 2026-05-07 20:52:33 +01:00
vasilito a307e3c6cf fix: build redox-driver-sys with cookbook cargo 2026-05-07 20:52:15 +01:00
vasilito 7ad3bd0aba fix: expose pcid handoff to spawned drivers 2026-05-07 20:51:56 +01:00
vasilito 07c812d9b6 fix: release virtio-gpu from initfs 2026-05-07 20:51:38 +01:00
vasilito fba39555a9 fix: harden greeter DRM device wait 2026-05-07 20:51:21 +01:00
vasilito a92bad74b9 fix: extend redbear-full DRM greeter wait 2026-05-07 20:51:05 +01:00
vasilito 3c442003a3 fix: port Konsole to Redox Qt surface 2026-05-07 09:11:47 +01:00