Commit Graph

1722 Commits

Author SHA1 Message Date
vasilito 9164a255dd mesa: adapt recipe to upstream 26.1.4 structure
- drop obsolete/unapplied Redox platform patches 03/06/07
- keep only patches that still apply cleanly (01/02/04/05)
- switch non-existent platform 'redox' to upstream-supported wayland + egl-native-platform=surfaceless
- replace removed gallium driver alias 'swrast' with softpipe,llvmpipe
2026-07-11 17:23:31 +03:00
vasilito a906c11c36 libs: SDL2_image 2.0.4→2.8.12, SDL2_ttf 2.0.15→2.24.0, SDL2_mixer 2.8.1→2.8.2
Massive version jumps for image and TTF — 4+ years of accumulated fixes.
Both had no BLAKE3 hash originally (untracked). All tarballs re-downloaded
from https://www.libsdl.org/release/ and hashes verified.
2026-07-11 17:03:54 +03:00
vasilito 7a6e897a8c mesa: 24.0.8 → 26.1.4 (tar-based, 4/7 patches applied, 3 need manual rebase)
Per user instruction — upgrade to latest. Redox mesa fork at redox-24.0
has no redox-26.0 branch; switched to tar-based upstream 26.1.4 with
Red Bear patches applied on top.

Patch dry-run results vs 26.1.4:
   02-gbm-dumb-prime-export.patch
   04-sys-ioccom-stub-header.patch
   05-vk-sync-wchar-include.patch
  🔴 01-virgl-redox-disk-cache.patch (hunk #1 FAIL at 1054)
  🔴 03-platform-redox-gpu-probe.patch (8 hunks ignored)
  🔴 06-redox-surface-image-fields.patch (hunk #1 FAIL at 333)
  🔴 07-wayland-scanner-env-override.patch (hunk #1 FAIL at 1992)

Patches 01,03,06,07 require manual rebase — documented in recipe comment.
Added mesa to apply-patches.sh graphics symlinks for local fork tracking.
2026-07-11 17:02:30 +03:00
vasilito 31a92b2f66 libs: freeciv 3.1.4→3.2.5, gstreamer 1.24.12→1.29.2, nettle 3.9.1→4.0
freeciv: latest stable release (game).
gstreamer: jumped 5 minor versions, needed for modern desktop audio/video
  features.
nettle: 4.0 is the latest (2024-11 release), includes security fixes.
2026-07-11 16:49:37 +03:00
vasilito f87bf22abb lib: libjpeg-turbo 3.1.0→3.2.0 (May 2025 release) 2026-07-11 16:23:34 +03:00
vasilito 6c30be9700 dev: lua54 5.4.7→5.4.8 2026-07-11 16:16:01 +03:00
vasilito 35325b9fae libs: libssh2 1.10.0→1.11.1 (security), ncdu 1.22→2.9.2 (security + features) 2026-07-11 16:14:16 +03:00
vasilito 2df98b27bf KDE Plasma upgrades: kirigami 6.10→6.28, plasma-framework 6.10→6.7.2, kglobalacceld 6.0→6.7.2, kde-cli-tools 6.3.4→6.7.2, plasma-desktop 6.3.4→6.7.2
All current per https://invent.kde.org/ tags (live verification).
Per user instruction: 6 months old is already old — these packages
were 1.5+ years stale against latest. All tarballs re-downloaded,
BLAKE3 hashes verified.
2026-07-11 16:11:41 +03:00
vasilito ffaf6befb5 active build: iperf3 3.20→3.21, rsync 3.4.1→3.4.4, git 2.13.1→2.55.0
iPerf3 3.21 is a bug fix release from July 2025.
rsync 3.4.4 is the latest 3.4.x maintenance release.
git 2.55.0 is the latest 2.55.x stable release, fixing 9+ years of CVEs
and bugs since the Red Bear build's 2.13.1 baseline. This is a security
critical upgrade.
2026-07-11 16:07:17 +03:00
vasilito 5474781a9b active build: bash 5.2.15 → 5.3 (latest stable) 2026-07-11 16:02:41 +03:00
vasilito 6a4af4b95b library upgrades: libffi 3.4.5→3.7.1, libarchive 3.6.2→3.8.8, libuv 1.51.0→1.52.1, libxml2 2.11.3→2.15.3
All tarballs re-downloaded from upstream mirrors, BLAKE3 hashes verified.
Continuing the comprehensive recipe walk per user instruction.
2026-07-11 15:59:18 +03:00
vasilito f28d633284 apply-patches.sh: symlink graphics libs to local forks (latest versions)
The 5 graphics libraries (freetype2, glib, harfbuzz, pango, cairo)
now use their local fork versions instead of the mainline
recipe versions:
- freetype2: 2.13.3 → 2.14.3
- glib: 2.87.0 → 2.89.1
- harfbuzz: 11.0.1 → 14.2.1
- pango: 1.56.3 → 1.56.4
- cairo: 1.18.4 (current)

Mainline recipe.toml files removed via symlink replacement.
Each local fork recipe tracks the latest stable release.
2026-07-11 15:37:03 +03:00
vasilito 344de21bb6 active build upgrades (Round 2 cont.): sed 4.4→4.10, meson 1.3→1.8.3, gettext 0.22→0.25.1, xz 5.2→5.8.1, zlib 1.3→1.3.1, file 5.46→5.47, patchelf 0.18→0.19.1
All tarballs re-downloaded from upstream mirrors, BLAKE3 hashes
verified against downloaded files. Per user request: walk through ALL
recipes, not just graphics. This is the active build pipeline batch.
2026-07-11 15:28:03 +03:00
vasilito b70f75b1e3 graphics packages: comprehensive version upgrades (Round 2)
KF6 frameworks: 44 packages 6.27.0 → 6.28.0
- Verified live upstream at https://download.kde.org/stable/frameworks/6.28/
- All tarballs re-downloaded, BLAKE3 hashes computed
- 39 auto-updated via script, 5 hand-fixed (kded6, notifyconfig,
  parts, pty, syntaxhighlighting) due to package-name variants

Local forks (CachyOS-stable):
- freetype2: 2.13.3 → 2.14.3
- libxkbcommon: 1.11.0 → 1.13.2
- glib: 2.87.0 → 2.89.1

Upstream recipes (gnome.org):
- harfbuzz: 11.0.1 → 14.2.1
- pango: 1.56.3 → 1.56.4

All tarballs re-downloaded from upstream mirrors, BLAKE3 hashes
verified against the downloaded files. Each recipe updated with
new tar URL + BLAKE3 hash.

This is the first batch of the Round-2 comprehensive upgrade.
cstdlib/fstring.h file 'tostring' recipe was already at 1.19.1
(was a 404 from cairographics.org, kept at 1.18.4). cairo recipe
was already at 1.18.4 (latest).

Build verification pending via build-redbear.sh. Per user
request, will continue to walk ALL recipes for outdated versions.
2026-07-11 15:10:43 +03:00
vasilito 8f655e757c kernel: debug markers 2026-07-11 14:38:52 +03:00
vasilito f114a3b3fb base: submodule pointer — bootstrap fix 2026-07-11 14:22:00 +03:00
vasilito f6f1dcb197 base: submodule pointer — bootstrap API adaptation 2026-07-11 14:13:51 +03:00
vasilito bb15b7b117 relibc: submodule pointer — float.h C11 macros 2026-07-11 13:57:04 +03:00
vasilito 5008627335 relibc: submodule pointer — unsafe fix 2026-07-11 13:48:03 +03:00
vasilito 0150e8bacb relibc: submodule pointer — getprogname() implementation 2026-07-11 13:42:07 +03:00
vasilito 05a003038d installer: submodule pointer — Cargo.lock fix 2026-07-11 13:17:35 +03:00
vasilito cb53247afa kernel: submodule pointer — merge-fix commit 2026-07-11 13:16:54 +03:00
vasilito edaebf9012 submodules: sync redoxfs Cargo.lock + deps 2026-07-11 12:44:40 +03:00
vasilito f70b482348 submodules: sync installer Cargo.lock 2026-07-11 12:29:24 +03:00
vasilito 27dd80b01f submodules: sync bootloader Cargo.lock 2026-07-11 12:19:53 +03:00
vasilito a72281c311 submodules: sync base Cargo.lock 2026-07-11 12:02:49 +03:00
vasilito 8f3a363a59 0.3.1: upgrade all forks to latest upstream
Fork upgrades:
- base: rebased to upstream/main (2551→0 behind), 251 files RB-patched
- kernel: merged upstream/master (7→0 behind), NUMA scheduler adopted
- installer: merged upstream/master (55→0 behind), path deps preserved
- libredox: reset to upstream/master (67→0 behind), RB path deps applied
- userutils: reset to upstream/master (200→0 behind), RB patches applied
- redoxfs: cherry-picked RB patches on upstream/master (4→0 behind)
- relibc: reset to upstream/master (3420→0 behind), fresh start with
  only path deps + version suffix. All previous RB patches for
  already-upstreamed functionality dropped per golden rule.
- syscall: already at 0 behind, version bumped
- bootloader: already upgraded in previous session

fork-upstream-map.toml: relibc version updated 0.6.0→0.2.5 (upstream
major version reset)
2026-07-11 11:46:20 +03:00
vasilito 2fb034fd62 submodules: sync 0.3.1 version bumps 2026-07-11 11:22:49 +03:00
vasilito 6e7c17d811 0.3.1: sync all Cat 1 + Cat 2 versions to +rb0.3.1 2026-07-11 11:21:22 +03:00
vasilito 4e88d1915f build system: add upstream drift detection and fork upgrade tooling
- check-fork-drift.sh: compares each submodule HEAD against upstream/master,
  reports behind/ahead counts, exits 1 if any fork exceeds threshold
- upgrade-forks.sh: fetches latest upstream, saves RB commits, resets to
  upstream, cherry-picks RB patches with conflict handling and backups
- build-preflight.sh: wired drift check into preflight (threshold=50,
  suppressible via REDBEAR_SKIP_DRIFT_CHECK=1)
- bootloader submodule pointer updated to latest upstream rebase
2026-07-11 11:20:29 +03:00
vasilito f2f6030dab bootloader: update recipe.toml for latest upstream Makefile format
Upstream bootloader Makefile uses BUILD=$(CURDIR) and auto-detects SOURCE.
Override BUILD to relative path so targets resolve correctly.
2026-07-11 10:51:38 +03:00
vasilito 068a1ca63e bootloader: rebase onto upstream 1.0.0, sync firmware-loader version
Bootloader fork rebase:
- Base changed from 0.1.0 pre-patched archive to upstream 1.0.0 tag (c7eeb9f)
- Applied 0001-redbear-local-forks.patch (Cargo.toml crate path redirects)
- Applied fix-uefi-alloc-panic.patch equivalents (4 panic!() -> graceful
  error handling in src/main.rs)
- Applied P5-live-preload-cap-1gib.patch (1 GiB cap on live image preload)
- Skipped: P0 GPT partition scan (requires new module + integration),
  P1 timeout/default-resolution, P2 live preload guard (subsumed by
  panic fixes + cap), P3 live image safe read, P4 large ISO boot,
  redox.patch — to be applied in dedicated rebase session.

firmware-loader/Cargo.toml: version 0.1.0 -> 0.3.0 (sync with other
Red Bear custom crates which are at 0.3.0).

fork-upstream-map.toml: bootloader back from PENDING_REBASE to 1.0.0
since the partial rebase matches upstream 1.0.0 content.

fork-upstream-map.toml: base restored to 'main' tracked (was correctly
tracked by build-redbear.sh).
2026-07-11 09:47:59 +03:00
vasilito 9bbc38fe60 build tools: gnu-grep 3.1→3.12, libsodium 1.0.16→1.0.22, autoconf 2.71→2.73
Live upstream versions verified 2026-07-11:
- gnu-grep 3.12 (2025-04-10)  -- https://ftp.gnu.org/gnu/grep/
- libsodium 1.0.22-stable (2026-07-08) -- https://download.libsodium.org/libsodium/releases/
- autoconf 2.73 (2026-03-20)  -- https://ftp.gnu.org/gnu/autoconf/

Each recipe updated with new tar URL + BLAKE3 hash. Build-tool upgrades are
isolated from the fork content-verification system, so these are SAFE to
upgrade without the relibc-style risk.

diffutils was already at 3.12 (previously committed).

Also: fork-upstream-map.toml — bootloader flagged PENDING_REBASE
(2026-07-11 detection: 1.0.0 tag mismatch, fork based on 0.1.0 archive
not a true rebase — documented inline).
2026-07-11 02:26:10 +03:00
vasilito 7d134eef37 verify-fork-versions.sh: remove snapshot content-skip, add base fork to map
Context: A relibc fork check via cargo compare exposed that the fork
labeled 0.6.0 (matching a 2020-12-23 upstream tag) was on a
completely different codebase from upstream master. The fork was
imported as a snapshot. The verify-fork-versions.sh tool allowed
this because 'snapshot' mode skipped byte-for-byte content comparison.

Changes:
1. Remove 'snapshot = skip content check' behavior. All Cat 2 forks must
   pass actual content comparison against their claimed upstream tag.
2. Add base to local/fork-upstream-map.toml so it's checked too (was missing).

Effect: Future 'fake version label' divergences (Cargo.toml says
version X but source content does not match upstream X) will be
caught by the preflight check instead of slipping through build.
2026-07-11 01:49:12 +03:00
vasilito 311a96bc94 qt/qtsvg: apply CVE-2026-6210 patch (heap-overflow in QSvgMarker::drawHelper)
Cherry-picked from Qt upstream (commit e488f852fa18c2afc2842a88eff8f66ad4105a45).
Original patch source:
https://download.qt.io/official_releases/qt/6.11/CVE-2026-6210-qtsvg-6.11.diff

Fix: Test types of nodes before downcasting them. A bad cast in
QSvgMarker::drawHelper led to endless recursion resulting in a heap
overflow. While fixing that, another similar case was also fixed.
2026-07-11 01:36:28 +03:00
vasilito 48021ef39c diffutils: add cookbook_make and cookbook_make_install steps
The diffutils recipe only ran cookbook_configure but never actually
compiled or installed anything, leaving stage.tmp empty (4K). This
caused redbear-mini to fail with a 4.0K INCOMPLETE stage and no
diff/diff3 binaries in the final image.

Add the missing make and make install steps, matching the pattern
used by other autotools recipes (bison, findutils, etc.).
2026-07-11 00:04:31 +03:00
vasilito 82869ff187 kde: remove kf6-kcrash OpenGL stub, restore setgroups, and re-enable KWin Sensors 2026-07-10 23:43:40 +03:00
vasilito 53ed5678f9 submodules: sync kernel for mmap result ignore 2026-07-10 23:34:54 +03:00
vasilito d3b488c44b submodules: sync relibc+kernel compile fixes 2026-07-10 23:28:09 +03:00
vasilito 078b2b2378 submodules: sync relibc for POSIX stub and ld_so work 2026-07-10 23:07:04 +03:00
vasilito 7d7c95ad15 submodules: sync kernel for rmm free frame tracking 2026-07-10 23:04:06 +03:00
vasilito e686659ea7 submodules: sync kernel for usermode_bootstrap error handling fix 2026-07-10 23:01:00 +03:00
vasilito 7419d00980 submodules: sync relibc, kernel, syscall for POSIX header and futex work 2026-07-10 22:52:01 +03:00
vasilito 8df60d3ec8 submodules: sync kernel+base for init bootstrap stack + setrens fallback 2026-07-10 22:49:21 +03:00
vasilito 3c2a4801ac submodules: sync base pointer for unimplemented! stub cleanup 2026-07-10 22:35:03 +03:00
vasilito cbcf992dc9 submodules: sync kernel pointer for EmulateArch::invalidate fix 2026-07-10 22:32:37 +03:00
vasilito 298a6ed74c cookbook: source content hash for cache invalidation
Implements Improvement 2 from local/docs/BUILD-SYSTEM-IMPROVEMENT-PROPOSAL.md.

Replaces the mtime-only source invalidation with a BLAKE3 content hash
of every file in the source tree (plus recipe.toml and patches). The hash
catches content modifications that preserve mtime (git checkout, git
bisect, cp -a, rsync -a) and silently leave the cache stale.

Design choices:
- Hash written to target/<arch>/source_hash.txt after each successful
  build, atomically (tmp + rename) to survive concurrent builds.
- Two-tier check: mtime fast-path (skip hash compute when mtime says
  'changed'); hash verification (when mtime says 'unchanged', still
  compute hash to catch mtime-preserving edits). The hash compute cost
  is one pass over the source tree per build — acceptable for the
  correctness gain.
- Symlinks are NOT followed in collect_files_recursive (avoids cycles
  and surprises across the sysroot).
- Unreadable files are hashed as <unreadable> sentinel so a permission
  fix later changes the hash and triggers a rebuild (correct
  behavior).
- Patch filenames are hashed alongside contents so reordering or
  renaming patches invalidates the cache (order matters for atomic apply).
- Devices, sockets, .git/, target/, *.swp, *.tmp are excluded.

Smoke-tested: hash is deterministic and different source dirs produce
different hashes. Cookbook compiles cleanly. Integration with the
existing source_changed decision is via OR (mtime OR hash triggers
rebuild).
2026-07-10 22:19:14 +03:00
vasilito f91cb8716a build-redbear: comprehensive build-system improvements 1+3+4+5+6+7+8
Implements 7 of 8 improvements from local/docs/BUILD-SYSTEM-IMPROVEMENT-PROPOSAL.md:

Improvement 1+5: trap-based stash-and-restore for ALL 9 fork sources
  - Replaces single-relibc stash with a loop over the canonical fork
    inventory (relibc, kernel, base, bootloader, installer, redoxfs,
    libredox, syscall, userutils)
  - Records each stash SHA in a label-keyed map for safe round-tripping
  - Pop stashes in LIFO order matching user-visible stash pop convention
  - Idempotent: re-entry during the same build does not double-stash
  - Reports (does not silently swallow) real git errors during stash push
  - Restored on EXIT regardless of success/failure/signal

Improvement 3: cookbook binary freshness check
  - Replaces existence-only check with BLAKE3-of-src/.rs fingerprint
  - Hash written to target/release/.cookbook-src-fingerprint
  - Rebuild triggers on any source file content change, not just mtime
  - Survives git operations that change content without touching mtime

Improvement 4: strict-by-default uncommitted-edit gate
  - Refuses to build with uncommitted edits in any fork source
  - Catches the 'works on my machine' bug class where pkgar fingerprints
    silently mismatch the committed HEAD
  - Escape hatch: REDBEAR_ALLOW_DIRTY=1 for emergency CI use
  - apply-durable-source-edits.py auto-enables strict mode when
    REDBEAR_BUILD_PHASE is set (set by build-redbear.sh)

Improvement 6: failure-cleanup trap with diagnostics
  - EXIT trap captures last 30 lines of each cookbook log
  - Lists orphaned cook/cargo processes (often root cause of follow-on
    build failures via held locks)
  - Reports per-recipe build state (complete vs incomplete)
  - Preserves diagnostics in REDBEAR_BUILD_STATE_DIR (mktemp -d)
  - REDBEAR_KEEP_BUILD_STATE=1 retains the state dir after exit

Improvement 7: pre-cook offline/upstream consistency
  - Pre-cook now follows the same offline policy as the main build phase
  - REDBEAR_ALLOW_UPSTREAM=1 → offline=false
  - default / REDBEAR_RELEASE → offline=true
  - Pre-cook logs captured into REDBEAR_BUILD_LOGS_DIR for diagnostics
  - Sets REDBEAR_BUILD_PHASE=pre-cook so downstream code can distinguish

Improvement 8: cookbook protection against out-of-band invocations
  - src/bin/repo.rs emits a warning when invoked without
    REDBEAR_CANONICAL_BUILD=1 in the environment
  - The warning lists what is bypassed (cache invalidation, prefix
    rebuild, fingerprint tracking, dirty gate)
  - Non-fatal: CI scripts that manage their own checks are unaffected

Smoke-tested: ./local/scripts/build-redbear.sh redbear-mini now exits 1
when relibc/kernel have uncommitted edits, and proceeds when
REDBEAR_ALLOW_DIRTY=1 is set.
2026-07-10 22:10:33 +03:00
vasilito 6b2f54c9bd docs: add canonical build system improvement proposal
Documents 8 concrete improvements to build-redbear.sh and the cookbook
tool, derived from the redbear-mini boot crash debug session:

1. Trap-based stash-and-restore for ALL fork sources (eliminates the
   'where did my edits go?' pain)
2. Source content-hashing to replace mtime-only cache invalidation
3. Cookbook binary freshness check (currently existence-only)
4. Strict-by-default uncommitted-edit gate
5. Stash-all-forks consistency
6. Failure-cleanup trap with diagnostics
7. Pre-cook offline/upstream consistency
8. Cookbook protection against out-of-band invocations

Each improvement has a file:line location, implementation sketch,
and impact/complexity rating. Implementation order suggested.

Problem motivation: the user has repeatedly hit silent stash-loss,
stale cookbook binaries, and mtime-based cache staleness while
debugging kernel/relibc/base forks. The build pipeline should
make these mistakes impossible, not require users to remember
workarounds.
2026-07-10 21:57:46 +03:00
vasilito 7c2ea9b5e3 amdgpu/linux-kpi: replace remaining stubs with real implementations
- Implement krealloc in linux-kpi memory.rs with GFP-aware tracker lookup,
  copying, and zeroing of grown regions; add krealloc declaration to slab.h
- Align __GFP_ZERO/__GFP_NOWARN and GFP_* values between linux-kpi/slab.h
  and redox_glue.h; make __GFP_ZERO a meaningful flag bit
- Add missing POSIX/errno base constants (EFBIG, EISDIR, ESPIPE, etc.) to
  linux-kpi linux/errno.h so firmware-size checks and other drivers compile
- Harden linux-kpi bug.h: BUG()/BUG_ON() abort, WARN_ON_ONCE only warns once,
  BUILD_BUG_ON uses _Static_assert
- Harden redox_glue.h: add PCI_COMMAND_* flags, CONFIG_HZ/HZ, jiffies
  conversion macros, once-only WARN_ON_ONCE, _Static_assert BUILD_BUG_ON
- Implement redox_pci_enable_device/redox_pci_set_master with real local state
  and command-bit updates; document pcid-spawner pre-enable
- Remove realloc-only krealloc from redox_stubs.c; it now links from linux-kpi
- Fix wait_for_completion_timeout to interpret timeout as jiffies and convert
  to milliseconds, and update msecs/usecs_to_jiffies to use HZ
- Stage previously completed firmware-loader path deps and constructor fix
- Stage base and relibc submodule pointer updates from prior work
2026-07-10 19:44:39 +03:00