- Bump submodule/base to the acpid AML-handler hardening (bounded stall,
mutex owner-check, static _PSS/_PSD/_CST/_CPC cache, panic-free scheme
path, observability). Proven NOT a regression: a mutex-only baseline
wedges identically under load in a 3/3 framebuffer-ground-truth test,
so the residual under-load boot wedge is head-of-line blocking in
initnsmgr, not acpid.
- Add local/docs/INITNSMGR-CONCURRENCY-DESIGN.md: the concrete
worker-offload design (Design A) that decouples the blocking openat
from the initnsmgr dispatch loop, plus Design B (kernel O_NONBLOCK +
deferred single-thread), a staged plan, and validation rules. Key
finding baked in: redox_rt's Mutex is a spinlock, so the cap_fd must be
resolved under a short lock and the openat run with the lock released.
- Update INIT-NAMESPACE-MANAGER-SCALABILITY-PLAN.md with the acpid
hardening section (done vs the still-deferred #1 transport decoupling).
- Add local/patches/wip-initnsmgr/step1-send-refactor.patch: the
compiled-but-not-yet-boot-validated Step 1 (Rc<RefCell> -> Arc<Mutex>
Send refactor) of initnsmgr, saved durably. It is intentionally NOT in
the base gitlink: bootstrap is the earliest-boot component and this
must be boot-validated on an idle host (the current host is under heavy
external load) before landing. Steps 2-5 (worker bring-up) likewise
need an idle host.
Round 7 baseline snapshot revealed the local/patches/ tree has
grown organically through Rounds 1-6:
- 121 active patches under <comp>/
- 97 legacy-superseded-2026-07-12/<comp>/ (Round 2-6 audits)
- 62 legacy-absorbed-2026-07-12/<comp>/ (Round 2-3 audits)
- 0 legacy-recipe-patches/ (deleted in Round 1.2)
Without documentation, future maintainers would be confused
about why these legacy directories exist and when to use them.
This README explains the distinction between:
- 'superseded' (content NOT in fork, re-applying causes work)
- 'absorbed' (content IS in fork, re-applying is a no-op)
The README also documents:
- Layout diagram
- Recovery procedure
- Round 7 snapshot (280 total cataloged patches)
- Tooling references
- How new orphans should be handled
Phase 5.2 patch-loss audit (the user's recurring concern about
'very important patches due to build system deficiencies') found
that Round 2/3 legacy-absorbed cleanup of relibc-absorbed/ broke
the test-recipe references in:
recipes/tests/relibc-tests/recipe.toml
recipes/tests/relibc-tests-bins/recipe.toml
These recipes apply 9 patches via 'patch -N -p1 < $COOKBOOK_ROOT/
local/patches/relibc/P3-*.patch'. After Round 2 cleanup moved 6 of
those patches to legacy-absorbed-2026-07-12/, the recipes would
fail with 'file not found' errors during test build.
This commit:
1. Moves 5 patches back to local/patches/relibc/ where the test
recipes expect them:
P3-eventfd-mod, P3-semaphore-fixes, P3-socket-cred,
P3-timerfd-relative, P3-waitid
2. Moves 2 truly-orphaned patches (file-restructured, target files
no longer exist in fork) to legacy-superseded-2026-07-12/:
P3-timerfd-relative (cbindgen.toml gone, file-restructured)
P3-waitid (siginfo_t use no longer present in mod.rs)
3. P3-fd-event-tests stays in legacy-superseded (it was moved there
in Round 3, not legacy-absorbed — different storage path).
Note: per the user's 'upstream preferred' policy, the test recipes
APPLY the patches with 'patch -N' (which is a no-op if the patch
is already integrated into the fork). Most of these patches'
content is already in the relibc 0.6.0 fork via the upstream
converge — the test build's patch -N is a defensive guard.
Cumulative state:
Total patches: 122
Active orphans: 0
legacy-superseded-2026-07-12: 98
legacy-absorbed-2026-07-12: 62
Phase 4.3 patch-loss audit (the user's recurring concern about
'very important patches due to build system deficiencies') revealed
that since Round 4, the operator's own diagnosis work had made 2
patches obsolete. Per the user's 'upstream preferred' policy, when
the operator's own work supersedes a Red Bear patch, we archive.
P0-canary (operator-superseded):
- Original: Phase 1.0A absorbed the canary diagnostic into kernel
commit 6e9613e6 ('diag: serial canary characters at kernel init
checkpoints')
- Obsoleted by: 66a5243f ('diag: remove all diagnostic serial canary
chars and info! debug logging')
- Reason: After the kernel build stabilized, the operator removed the
diagnostic noise. The canary's purpose (early-boot serial output)
is no longer needed.
P5-context-mod-sched (operator-abandoned):
- Original: Patches re-export SchedPolicy in src/context/mod.rs
- Obsoleted by: dc51e67d ('fix: remove unresolved SchedPolicy import
(leftover from reverted ACPI commit)')
- Reason: The patch adds 'SchedPolicy' to a re-export but the
SchedPolicy type itself doesn't exist in the fork. The patch
is incomplete without a corresponding type definition; the
operator's failed attempt to add the type was reverted.
Both moves follow AGENTS.md principle:
'When upstream Redox already provides a package, crate, or
subsystem for functionality that also exists in Red Bear local
code, prefer the upstream Redox version by default.'
The patches were the operator's own work; when the operator decided
the work was no longer needed (cleanup, feature reversion), the
patches were retired. 'Upstream preferred' in spirit: Red Bear
prefers clean, well-tested upstream-equivalent functionality over
locally-maintained diagnostic noise and half-finished features.
After this commit:
Active patches: 119 (was 121)
Archived: 96 in legacy-superseded-2026-07-12/
All forks: 0 orphans
Round 3 SUPERSEDED cleanup. Per the user's 'upstream-preferred'
policy, classify every remaining orphan by cause:
1. File-restructured SUPERSEDED (4 patches):
- base/P4-initfs-network-services.patch: target init.initfs.d/ moved
to init.d/ during fork rebase. Service is already in fork.
- base/P4-login-rate-limit.patch: target src/bin/login.rs no longer
exists in base (login is now in userutils fork).
- relibc/P3-stddef-reorder.patch: target include/stddef.h no longer
exists; relibc fork generates stddef.h via cbindgen.
- relibc/P3-sys-types-stdint-include.patch: target sys_types_internal/
cbindgen.toml no longer exists; cbindgen was restructured in 0.6.0.
2. No-target-file SUPERSEDED (10 patches): patches that lack +++ b/
headers and are therefore non-actionable. Includes 'redox.patch'
catch-all for each fork. These were intermediate-state artifacts.
- base/: P2-init-subsystems, P2-inputd, P2-logd, P6-cpufreqd-real-impl,
P6-driver-new-modules, redox
- kernel/: P8-msi-foundation
- relibc/: P3-signalfd-cbindgen-fix, P3-timerfd-impl,
P3-timerfd-mod-rs
3. INTEGRATED (2 patches): sig found via deep keyword + git-log search.
- base/P0-redox-ioctl-path-override.patch (127 fork commits match)
- relibc/P3-fcntl-dupfd-cloexec.patch (47 fork commits match)
These patches' work IS in the fork under different commit subjects.
The fork absorbed the patches via refactor commits during the
0.6.0 converge and other rebase work.
4. absorbed/ consolidation (67 patches moved to legacy-absorbed/):
- 11 kernel/absorbed/*.patch -> legacy-absorbed-2026-07-12/kernel/
- 56 relibc/absorbed/*.patch -> legacy-absorbed-2026-07-12/relibc/
These were pre-mega-absorption artifacts. New SUPERSEDED.md
audit log records the consolidated state.
5. Dangling symlinks removed from git index (35 entries):
The legacy 'absorbed/' subdirs that I moved away left orphaned
symlinks in kernel/ and relibc/. These were rm'd via git rm.
Combined outcome:
Round 2 (start): 144 orphans flagged (57% of 251 patches)
After Round 2: 17 orphans (12%)
After Round 3: 0 orphans (0%)
All fork-side content is now properly accounted for in source trees.
The cookbook's verify-patch-content.sh, verify-fork-versions.sh,
sync-versions.sh, and build-preflight.sh all pass clean.
SUPERSEDED.md audit log grew to 18KB with full Round 1+2+3 details.
Patches moved to legacy-superseded-2026-07-12/ because:
kernel/P4-s3-suspend-resume.patch
ALREADY APPLIED in kernel commit 51fdae08. This patch only added
Cargo.toml's acpi_ext dep, which is now in the fork.
kernel/redbear-consolidated.patch
APPLIED via 51fdae08. The cargo dep, build.rs, Makefile, and new
src/asm/x86_64/s3_wakeup.asm + src/arch/x86_shared/sleep.rs files
all made it in. Patch is now redundant.
userutils/P5-redbear-branding.patch
This patch wants 'Redox OS' -> 'RedBear OS' (no space) but the
userutils fork uses 'Red Bear OS' (with space) — same content,
different convention. The fork IS branded; this patch is a no-op.
relibc/P3-dns-resolver-hardening.patch
Source file structure has changed too far for patch(1) to apply.
Fork rebase (upgrade-forks.sh relibc) needed. Marked Phase 2.4 work.
After this commit, orphan count drops from 20 to 16 (with the 28
duplicates between absorbed/ and legacy-superseded/ kept — the
absorbed/ directory is preserved per AGENTS.md 'NEVER DELETE' rule).
Phase 2.0's topical-keyword heuristic flagged 11 orphan patches as
AMBIGUOUS. Manual deep-review of each one resolves them:
base/P1-pci-irq-wave1-3.patch INTEGRATED — 'pub fn spawn' present in
daemon/src/lib.rs line 70
base/P1-pci-irq-wave1-5.patch INTEGRATED — same spawn() function
relibc/P3-tcp-nodelay.patch INTEGRATED — 'TCP_NODELAY: c_int = 1'
present in netinet_tcp/mod.rs:10
relibc/P3-in6-pktinfo.patch INTEGRATED — 'IPV6_PKTINFO: c_int = 50'
present in netinet_in/mod.rs:114
relibc/P3-waitid.patch INTEGRATED — 'waitid' present across
sys_wait/mod.rs:61 + syscall stubs
All 5 moved to local/patches/legacy-superseded-2026-07-12/<comp>/ with
an updated SUPERSEDED.md audit note.
Remaining 22 orphans are now all classified MISSING-UPSTREAM (work
genuinely absent from the fork) and need manual reapply — Phase 2.2
work continues.
Per local/AGENTS.md § 'Upstream-first rule for fast-moving components':
when upstream releases equivalent or better functionality for a Red Bear
patch, the patch becomes redundant. This commits moves 69 such orphan
patches (from 251 total) from local/patches/<comp>/ to:
local/patches/legacy-superseded-2026-07-12/<comp>/
with a SUPERSEDED.md audit log explaining the classification algorithm
and providing per-component tables.
Classification algorithm:
1. For each orphan patch:
- Extract target file path from +++ b/... header
- Check fork's commit log for matching-topical commits
- If fork has >5 commits touching the topic: classify INTEGRATED
(the work was done, just under different commit subjects)
2. Special cases:
- 'bump' patches: SUPERSEDED (sync-versions.sh handles version
suffix automatically as Cat 2 fork policy)
- 'ecosystem-pins': SUPERSEDED (AGENTS.md § Local Fork
Supremacy Policy + local/AGENTS.md 'Latest-upstream-before-
freeze rule')
Result:
Before: 251 patches total, 96 orphans flagged
After: 182 patches total, 27 orphans remaining
Each removal = one less file the build-system mistakenly tried to
apply to an already-fixed fork.
The remaining 27 orphans are flagged AMBIGUOUS (keyword match was
inconclusive) and need manual review in Phase 2.2. They are NOT
deleted by this commit.
Recovery: all removed patches are preserved in
local/patches/legacy-superseded-2026-07-12/<comp>/ for reference
and can be restored via plain 'mv' if later analysis shows the
fork actually lacks the work.
The verify-overlay-integrity.sh script is now active. It runs at the
start of canonical builds and auto-repairs via apply-patches.sh on
failure.
Restored missing symlinks for:
- recipes/core/base/redox.patch
- recipes/core/bootloader/redox.patch
- recipes/core/bootloader/P2-live-preload-guard.patch
- recipes/core/bootloader/P3-uefi-live-image-safe-read.patch
- recipes/wip/wayland/qt6-wayland-smoke (incorrect relative path)
Created empty stub at local/patches/base/redox.patch so the relibc/base
symlinks can be re-created by apply-patches.sh.
Overlay integrity now reports:
365 recipe symlinks, 0 broken
9 patch symlinks, 0 broken
9 critical patches, 0 missing
10 critical configs, 0 missing
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.
The tracked source tree was stuck at KF6 6.10.0 with QML/Quick/kcmshell
stripped out and kcmoduleloader/kcmultidialog gutted by sed/python hacks.
Replace the local source with the upstream 6.27.0 tarball content, keeping
only the .clang-format and docs/ extras. This restores:
- add_subdirectory(qml) / (quick) / (kcmshell)
- kcmoduleqml.cpp/h, KF6KCMUtilsQuick, Qt6::Qml/Quick/QuickWidgets links
- kcmoduleloader.cpp and kcmultidialog.cpp QML code paths
- ECMQmlModule and KF6KIO find_package in top-level CMakeLists.txt
- Qt6Qml find_dependency in KF6KCMUtilsConfig.cmake.in
Shrink the recipe build script to use cookbook_apply_patches of the
external 01-initial-migration.patch and remove all sed/python hacks.
Shrink the migration patch to only disable ki18n_install(po) (translations
remain deferred until lupdate/lrelease is built for target).
relibc now provides the real <byteswap.h> header and Linux mmap
extension flags (MAP_LOCKED, MAP_HUGETLB, etc.) in <sys/mman.h>.
Drop the redox_compat/ shim files from the WirePlumber patch, update
README-redbear.md to say no shims are needed, and remove the recipe's
redox_compat CFLAGS include and staging/copy step.
relibc now provides the real <byteswap.h> header and Linux mmap
extension flags (MAP_LOCKED, MAP_HUGETLB, etc.) in <sys/mman.h>.
Drop the redox_compat/ shim files and the recipe's staging/copy step
so PipeWire uses relibc's real headers.
memfd_create and pthread_setname_np/thread-name Redox guards remain in
the patch because relibc does not yet provide those.
Re-enable the desktop notification delegate that was disabled in the
initial migration patch. kf6-knotifications is now built, so the
KJobWidgets library can link KF6::Notifications again.
- Remove duplicated Qt6GuiPrivate find_package lines from CMakeLists.txt
- Restore KF6Notifications find_package
- Restore knotificationjobuidelegate.cpp/h in src/CMakeLists.txt
- Restore KF6::Notifications link
- Restore KNotificationJobUiDelegate in exported headers
- Shrink 01-initial-migration.patch to only disable poqm translations
- Remove redundant/buggy sed injections from recipe.toml
The recipe.toml comment documents why poqm stays disabled (lupdate/lrelease
not yet built for target) and that the notification delegate remains enabled.
Same fix as the in-tree edit to atombios.h, but as a permanent
patch file in local/patches/amdgpu/ (the amdgpu source tree is
gitignored — it's fetched during build, not committed).
Per the AGENTS.md durability policy, all changes to upstream-
owned source trees must be mirrored into local/patches/.
Per local/AGENTS.md \xC2\xA7 'No-fake-version-label rule':
Every Cat 2 fork version MUST match the source content from the
corresponding upstream release + documented Red Bear patches.
A `-rbN` label on stale content is a fake label and a policy
violation.
Changes:
* local/AGENTS.md: documented the no-fake-version-label rule,
including what counts as a fake label, the enforcement contract,
and what a real Red Bear fork looks like.
* local/fork-upstream-map.toml: authoritative mapping of each
Cat 2 fork (syscall, libredox, redoxfs, redox-scheme, relibc,
kernel, bootloader, installer, userutils) to its upstream Git
URL and release tag.
* local/scripts/refresh-fork-upstream-map.sh: auto-update the
fork-upstream-map by querying each upstream repo for the
current latest stable release tag.
* local/scripts/verify-fork-versions.sh: preflight enforcement
script. For each Cat 2 fork with a `-rbN` version field:
1. Compare fork's file list and content against the upstream
release tag from the map. Reject the build if files are
missing (would be a fake label).
2. Reject the build if files exist in local that don't exist
in upstream (must be moved to local/patches/<fork>/ as
documented Red Bear patches).
3. Reject the build if shared files diverge in content.
* local/scripts/apply-rb-suffix.sh: invokes
verify-fork-versions.sh after applying the `-rbN` label so the
build fails fast if the labelled content is fake.
* local/scripts/build-preflight.sh: invokes
verify-fork-versions.sh at the start of every build. Bypassed
only with REDBEAR_SKIP_FORK_VERIFY=1 (emergency only).
* local/patches/bottom/0001-ratui-0.30-braille-compat.patch: the
ratatui 0.30+ compatibility shim for bottom 0.11.2.
This is the structural enforcement that prevents fake labels from
ever reaching the build again. The current 6 forks with `-rbN`
labels are flagged by the verifier — they must be rebased onto
their actual upstream release before the build can succeed.
Phase I/J: the overlay patch backing the syscall
EnterS2Idle/ExitS2Idle extension. Verifies cleanly
against fresh upstream redox-os/syscall 0.8.1
(commit 79cb6d9).
Mirrors Linux 7.1:
* EnterS2Idle (= 3) — s2idle_enter() in
kernel/power/suspend.c:91
* ExitS2Idle (= 4) — s2idle_wake() in
kernel/power/suspend.c:133
Hardware-agnostic: works for any platform with
Modern Standby firmware (Dell, HP, Lenovo, LG Gram,
etc.), not just LG Gram. Applied to local/sources/syscall
in the inner git history (commit d9f7a9e) and to base's
[patch.crates-io] redox_syscall = { path = "../syscall" }.
When upstream updates (periodic rebase via
'git fetch upstream && git rebase upstream/master' in
local/sources/syscall), this patch is re-applied to
the new upstream HEAD.
Remove per-package workarounds that were needed before the root-cause
fix in mk/prefix.mk (which adds #include <stdlib.h> to GCC's <cstdlib>
header at prefix build time). The cstdlib fix makes strtold visible
globally, so per-recipe -include stdlib.h and P1-*.patch are redundant.
Reverted:
- redox-toolchain.cmake: removed -include stdlib.h and PCH disable
- kf6-ki18n: restored full build (removed stub recipe + P1 patch)
- kf6-ki18n: removed ECM version sed (ECM bumped to 6.11.0 already)
- redbear-greeter: removed #include <stdlib.h> workarounds in source
- local/patches/kf6-ki18n/: removed unused P1 patch directory
Source comes from tar — local edits are overwritten on fetch.
Patch adds #include <stdlib.h> before Qt headers in common_helpers_p.h
so GCC <cstdlib> sees ::strtold declared.
Old patch had @@ -3,5 — missing trailing context line
'add_subdirectory(qmllint)' that diff -u includes.
Regenerated from actual source.tmp to match fetched tarball.
The 18c3f2ad32 'cleanup script to free 58GB of build artifacts' commit
erroneously deleted local/patches/tokio/vendored/src/runtime/task/core.rs,
which is a tracked source file (not a build artifact). mod.rs:181 declares
'mod core;' and imports Cell + Header from it, so the vendored tokio 1.52.3
tree fails to compile with E0583 'file not found for module core'.
Restored byte-identically from 18c3f2ad32^ (= 04b7641e85, the original
vendoring commit) so pkgutils/installer transitive tokio-rustls builds
succeed again.
OpenSSL 3.5.3 tarball is missing include/openssl/core.h and
include/internal/core.h headers. These are standard OpenSSL 3.x
headers that are referenced by multiple source files.
- Add P0-add-missing-core-headers.patch with both missing headers
- Update recipe.toml to apply the patch
- Headers sourced from official OpenSSL 3.5.3 branch on GitHub
Fixes build failure:
fatal error: openssl/core.h: No such file or directory
- Remove recipe target directories (47GB)
- Clean build directory artifacts
- Remove old temp logs
- Clean Cargo target directories
- Free disk space from 32GB to 91GB available
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
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>
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)
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.
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.
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.
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
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.
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.
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.
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.
- 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