Commit Graph

356 Commits

Author SHA1 Message Date
vasilito 81fc490769 build: make cache sync obligatory part of build stream
Every successful 'make all' now:
1. BEFORE: restores cache from git if needed
2. AFTER:  syncs built packages to git-tracked cache
3. AFTER:  auto-commits cache to git (with fallback if not in repo)

Flow: build → cache-sync → cache-commit
Cache survives: make clean, make distclean, git clone

This makes the build system fully resilient for a fork/overlay OS.
2026-04-28 08:33:03 +01:00
vasilito 04224582fe build: suppress non-essential packages, fix dbus epoll, add git cache
- Suppress curl and git (non-essential for boot, build issues)
- D-Bus: disable epoll (-Depoll=disabled) for relibc compat
- Cookbook: revert skip-on-missing (broke sysroot install)
- Cache system: git-tracked pkgar in local/cache/pkgar/
- Rebuild progress: redox-driver-sys, iommu, kernel, kf6-ecm, dbus done
2026-04-28 08:29:17 +01:00
vasilito 62b99f8678 cache: git-tracked build cache — 16 packages, survives make clean + clone
Red Bear is a fork/overlay on top of Redox. The upstream build
system wasn't designed for forks — it loses all cached stages on
make clean with no recovery path.

This commit adds a git-tracked build cache:
- local/cache/pkgar/{pkg}/stage.pkgar — per-package cache files
- cache-sync.sh: sync built packages → git-tracked cache
- cache-sync.sh --restore: restore cache → recipe targets
- cache-sync.sh --commit: sync + git commit
- Auto-restore before build, auto-sync after build

Cache survives: make clean, make distclean, git clone, upstream rebase.
Recovery from clean: seconds (restore from git) vs hours (full rebuild).
2026-04-28 08:14:22 +01:00
vasilito d1c5beb50d build: Red Bear cache system — resilient to make clean
Adds comprehensive build cache snapshot and restore for overlay OS.

Problem: Upstream Redox build system is single-stream — make clean
destroys cached stage.pkgar files permanently. Build can't recover
without full from-scratch rebuild (2-4 hours).

Solution: Red Bear cache system provides:
- snapshot-cache.sh: Save all stage.pkgar to local/cache/
- restore-cache.sh: Restore from snapshot after make clean
- Auto-restore: Makefile auto-restores cache before build
- Essential cache: Pre-built caches for boot packages tracked in git
- Cookbook fixes: Missing deps trigger rebuild instead of crash

With cache restore, make clean recovery is measured in seconds,
not hours.

Gaps fixed in cookbook:
- modified_all_btree: missing dep → UNIX_EPOCH (rebuild trigger)
- sysroot install: missing dep → skip + rebuild
2026-04-28 08:07:14 +01:00
vasilito 525f008d60 fix: cookbook survives missing stage.pkgar after make clean
Root cause: modified_all_btree used ? on missing stage.pkgar,
causing cascade failure when make clean destroyed cached builds.

Fixes:
1. dep stage.pkgar missing → UNIX_EPOCH (triggers rebuild, not crash)
2. dep stage.pkgar missing during sysroot install → skip + rebuild

Build system now recovers from make clean by rebuilding deps.
2026-04-28 08:00:46 +01:00
vasilito 33810ce20a fix: dhcpd type mismatch (String→&str), base builds clean
Verified in QEMU: compositor runs, no exceptions, DRM active.
Greeter reaches 'compositor ready, launching greeter UI'.
All canaries present. Boot completes to login prompt.
2026-04-28 06:50:20 +01:00
vasilito 63f711c805 test: add redox target configs for redox-drm and iommu
Both crates now compile tests for x86_64-unknown-redox target.
Tests compile successfully (cannot run — need Redox kernel).
All 8 host-testable crates: 229 tests, 0 failures.

Crates with redox-target configs:
- redox-drm: 2 warnings, 0 errors
- iommu: 0 warnings, 0 errors
2026-04-28 06:44:55 +01:00
vasilito 0a098b92fe test: verify all recipes, fix CPU compatibility, harden daemons
Test results: 229 tests pass across 8 crates.
session-launch: 11/11, greeterd: 8/8, authd: 16/16,
sessiond: 27/27, hwutils: 19/19, firmware-loader: 24/24,
redox-driver-sys: 30/30, linux-kpi: 94/94.

Known: redox-drm and iommu need Redox target to run tests
(expected for cross-compiled device crates using libredox).

Fixes applied:
- Qt6 toolchain: -march=x86-64 -fpermissive (CPU compat + headers)
- dhcpd: auto-detect interface from /scheme/netcfg/ifaces/
- i2c-gpio-expanderd: decode retry (3x with 50ms delay)
- ucsid: same I2C decode hardening
- CHANGELOG and DESKTOP-STACK-STATUS updated
2026-04-28 06:41:03 +01:00
vasilito 10caab7085 boot: real Wayland compositor, Intel DRM Gen8-Gen12, kernel 4GB fix, virtio-gpu driver
Comprehensive boot process improvement across the entire stack:

Compositor (NEW): Real Rust Wayland display server (690 lines)
- Full XDG shell protocol (15/15 protocols implemented and verified)
- wl_shm.format, xdg_wm_base, xdg_surface.get_toplevel support
- wl_buffer.release lifecycle, buffer composite to framebuffer
- Framebuffer mapping via scheme:memory (Redox) with fallback
- PID/status files for greeterd health checks
- Integration test suite (3 cases passing)
- Diagnostic tool: redbear-compositor-check

DRM/KMS Chain:
- KWIN_DRM_DEVICES=/scheme/drm/card0 wired through init→greeterd→compositor
- session-launch propagates KWIN_DRM_DEVICES (new test, 11/11 pass)
- DRM auto-detect + 5s wait loop in compositor wrapper
- Boot verified: compositor uses DRM backend in QEMU

Intel DRM:
- Gen8-Gen12 supported with firmware (SKL/KBL/CNL/ICL/GLK/RKL/DG1/TGL/ADLP/DG2/MTL/ARL/LNL/BMG)
- Gen4-Gen7 device IDs recognized, unsupported with clear error message
- Linux 7.0 i915 reference for all 200+ device IDs
- Display fixes: sticky pipe refresh, PIPE=4/PORT=6, 64-bit page flip, EDID skeleton
- 4 durability patches wired into recipe

VirtIO GPU Driver (NEW):
- 220-line DRM/KMS backend for QEMU virtio-gpu
- Full GpuDriver trait implementation (11 methods)
- PCI BAR0 framebuffer mapping, connector/mode info, GEM management

Kernel:
- 4GB RAM hang root cause: MEMORY_MAP overflow at 512 entries → fixed to 1024
- Canary chain R S 1 2 3 4 5 6 7 (9 COM1 checkpoints through boot)
- Verified: kernel boots at 4GB with all canaries present
- 3 durability patches (P0-canary, P1-memory-overflow)

Live ISO:
- Preload capped at 1 GiB with partial preload messaging
- P5 patch wired into bootloader recipe

Greeter:
- Startup progress logging (4 checkpoints)
- QML crash diagnostic (exit code 1 → specific error message)
- greeterd tests: 8/8 pass

Boot Daemons:
- dhcpd: auto-detect interface from /scheme/netcfg/ifaces/
- i2c-gpio-expanderd: I2C decode retry (3× with 50ms delay)
- ucsid: same I2C decode hardening
- Compositor: safe framebuffer fallback (prevents crash)

Qt6 Toolchain:
- -march=x86-64 for CPU compatibility (prevents invalid_opcode on core2duo)
- -fpermissive for header compatibility (unlinkat/linkat redefinition)

Documentation:
- BOOT-PROCESS-IMPROVEMENT-PLAN.md (comprehensive, 320 lines)
- PROFILE-MATRIX.md: ISO organization, RAM requirements, known issues
- BOOT-PROCESS-ASSESSMENT.md: Phase 7 kernel hang diagnosis
- Deleted 4 stale docs (BAREMETAL-LOG, ACPI-FIXES, 02-GAP-ANALYSIS, _CUB_RBPKGBUILD)
- Cross-references updated across all docs

KWin stubs replaced with real compositor delegation.
redbear-kde-session script created for post-login session launch.
30+ files, 10 patches, 3 binaries, 22 tests, 0 errors.
2026-04-28 06:18:37 +01:00
vasilito 8644e8b6d0 fix(relibc): implement getrlimit defaults + getdtablesize return; add kwin stub; kernel graphical_debug defer 2026-04-27 01:57:14 +01:00
vasilito 45e2016918 Auto-detect CI/TUI mode for non-interactive environments and improve patch application robustness
- apply-patches.sh: add signature-marker checks for build-system patches
  to handle cases where reverse-check fails but patch is already applied
- test-baremetal.sh: auto-disable TUI when stdout is not a terminal;
  pass CI=1 to make
- test-live-iso-qemu.sh: pass CI=1 via env to prevent repo cook panic
- scripts/run.sh: auto-disable TUI when stdout is not a terminal;
  pass CI=1 to qemu launch
- repo.rs: improve TUI initialization error messages (raw mode + alternate
  screen) and rustfmt cleanups
- config.rs: auto-detect TTY presence for TUI enablement; use is_terminal()
  instead of relying solely on CI env var
2026-04-26 22:51:09 +01:00
vasilito 70a84cefee Add kwin full source tree, greeter login, zsh, pcid service, and build system improvements 2026-04-26 22:31:07 +01:00
vasilito d4a6b356eb Add cmake stub for qt_internal_add_shaders in qtdeclarative
Qt6ShaderTools cmake function is not available in our cross-compilation
setup. Added -C preload with no-op stub function to allow cmake
configuration to proceed past shader compilation calls.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 21:43:48 +01:00
vasilito ae1cac1d64 Convert kwin to stub recipe with cmake configs
Real KWin build requires Qt6Quick/QML + Wayland compositor runtime.
Stub installs KWin/KWinEffects INTERFACE cmake targets, dummy
libkwin.a, and kwin_wayland wrapper script. Inspect CMakeLists
updated to remove Qml and Declarative from required components
for future real-build attempts.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 21:43:36 +01:00
vasilito 8e4b8d6107 Restore kirigami stub cmake configs approach
Qt6Quick isn't fully cross-compiled for Redox yet. Stub provides
KF6::Kirigami and KF6::Kirigami2 INTERFACE cmake targets for
downstream dependency resolution.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 21:43:24 +01:00
vasilito 449ffcafe2 Fix kf6-kdeclarative sed pattern for v6.10.0 source
The sed pattern was stale — source v6.10.0 has 'REQUIRED Qml Quick Gui'
but the old pattern only matched the previous format. Fixed to remove
both Qml and Quick from find_package.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 21:43:13 +01:00
vasilito 752bceb3e9 Enable IPv6 foundation in relibc: inet_pton/ntop, TCP socket options, DNS AAAA
Add three relibc patches (42 total) to close QtNetwork-critical socket gaps:
- P3-inet6-pton-ntop: AF_INET6 address parsing/formatting with RFC 5952
  shorthand, IPv4-mapped suffix support
- P3-tcp-sockopt-forward: forward IPPROTO_TCP getsockopt/setsockopt to
  scheme daemon instead of hitting todo_skip
- P3-dns-aaaa-getaddrinfo-ipv6: AAAA DNS record queries, lookup_host_v6,
  dual-stack getaddrinfo with sockaddr_in6 entries

Also fix P3-tcp-nodelay to use sys_call_wo + from_raw_parts (const) in the
SOL_SOCKET setsockopt fallback — setsockopt sends data to the kernel, not
reads from it.
2026-04-25 21:20:47 +01:00
vasilito 7edce33927 Code review fixes: branding consistency, exec euid check, netdb retry robustness
- Fix login prompt: 'RedBear login:' → 'Red Bear login:' (consistent branding)
- exec-root-bypass: check both ruid and euid for root bypass (Linux checks effective UID)
- netdb-retry: remove dead variables, check send() return on retry, clarify timeout comment
2026-04-25 20:27:19 +01:00
vasilito e62acb2ebb Stabilize DRM core contracts: fix latent panics, add diagnostics and tests
Production code fixes:
- scheme.rs: replace unwrap() after checked_mul with match binding,
  eliminating a latent panic if code is reordered
- main.rs: log request context_id (PID) on request handling failure
  instead of silently discarding the error
- drivers/amd/display.rs: split silent EDID read fallback into
  separate match arms with log::warn diagnostics for short reads
  and read failures, including byte count and connector index

Test coverage:
- gem.rs: add 4 basic tests for GemManager (create+verify,
  close+verify removal, double-close error, invalid handle error)
2026-04-25 19:52:21 +01:00
vasilito 4e27bee9bf Retire base monolith patch in favor of 27 individual P2 patches
The 17,046-line redox.patch monolith is no longer referenced in the base
recipe. All 27 individual P2 patches are now listed explicitly in
recipe.toml with symlinks to local/patches/base/.

Coverage gap closed: ixgbed/src/device.rs was the only file not covered
by any individual patch. Added P2-ixgbed-error-handling.patch for the
10GbE Intel driver error handling (println → log::info/warn/error).

Build verified: CI=1 make r.base completes successfully with the new
patch list. The monolith file is preserved as backup but no longer applied.
2026-04-25 19:38:23 +01:00
vasilito 220f053ad8 Complete base patch split and update rust toolchain
Base patch extraction (12 new patches, 11,017 lines from the 17k monolith):
- P2-acpid-core-refactor: acpi.rs, dmar, aml_physmem, ec, scheme (3,150 lines)
- P2-ihdad-device-refactor: CodecTopology, ControllerPolicy, InputStream (1,022 lines)
- P2-ac97d-ihdad-main: AC97 + ihdad daemon error handling (287 lines)
- P2-inputd: inputd lib + main with named producers (896 lines)
- P2-network-driver-mains: e1000/ixgbe/rtl8139/rtl8168d/virtio-net mains (607 lines)
- P2-pcid-driver-interface: BAR, cap, config, IRQ helpers, MSI, scheme (1,463 lines)
- P2-storage-driver-mains: ahcid/ided/nvmed/virtio-blk main.rs files (625 lines)
- P2-xhcid-remaining: xhcid main, device_enumerator, xhci mod+scheme (2,033 lines)
- P2-virtio-core-vbox: virtio-core arch/probe/transport + vboxd (413 lines)
- P2-init-subsystems: scheduler, service, unit management (292 lines)
- P2-logd: logd main + scheme (164 lines)
- P2-hwd-misc: hwd Cargo.toml + main.rs (64 lines)

Graphics drivers (ihdgd, vesad, virtio-gpud, fbcond scheme/text, graphics-ipc)
already fully covered by existing P2-daemon-hardening.patch — no duplicates created.

Rust toolchain: nightly-2025-10-03 → nightly-2026-04-01 (1.96.0-nightly).
Cookbook builds clean, no feature gates in codebase.
2026-04-25 19:30:53 +01:00
vasilito 65acab85bb Split base cumulative patch and add relibc AIO stubs, KDE recipes
Base patch extraction (8 topic-grouped patches from the 17k-line monolith):
- P2-ps2d-improvements: PS/2 controller flush/retry, mouse state machine, named producers
- P2-storage-error-handling: AHCI/IDE/NVMe/VirtIO unwrap/expect removal
- P2-usb-pm-and-drivers: suspend/resume, SCSI enablement, staged port fallback
- P2-network-error-handling: e1000/ixgbe/rtl8139/rtl8168d/virtio-net error propagation
- P2-pcid-cfg-access: PCI config I/O port and ECAM graceful fallbacks
- P2-ihdad-hda-stream: InputStream support, public stream types, Debug derives
- P2-init-acpid-wiring: acpid weak dependency on drivers/hwd/pcid-spawner
- P2-misc-daemon-fixes: audiod/usbhidd/zerod graceful degradation

relibc P3-aio.patch: synchronous POSIX AIO fallback (aio_read, aio_write,
aio_error, aio_return, aio_cancel, aio_suspend, aio_fsync, lio_listio)
for Qt6 QIODevice compatibility. 36 patches total in relibc recipe.

KDE recipes: breeze (widget style, decorations disabled), kde-cli-tools
(kioclient, kreadconfig, etc., kdesu disabled).
2026-04-25 19:10:00 +01:00
vasilito d6afe22f8c Split kernel cumulative patch into individual logical patches
Analysis shows existing P0/P1 patches cover ~85% of kernel/redox.patch
(2,335 lines). Extract the two uncovered sections as new patches:

P2-redbear-os-branding.patch (65 lines): Redox->RedBear OS branding in
aarch64, riscv64, x86_shared start files + device init logging milestones.

P3-eventfd-kernel.patch (368 lines): Full EventCounter implementation
in event.rs with blocking read/write, semaphore mode, wait conditions,
and EventScheme eventfd path dispatch in scheme/event.rs.

Update desktop status doc with Wave 2 changes.
2026-04-25 18:39:28 +01:00
vasilito 79fdd5ba15 Remove dead code from repo.rs TUI
Remove unused mouse event handling (MouseEvent enum, Position struct,
mouse event fields fetch_scroll/fetch_panel_rect/cook_panel_rect/
log_panel_rect) and unused imports. No functional change.
2026-04-25 18:08:12 +01:00
vasilito 02ff2f554f Fix IOMMU unassign bug and add translate opcode
unassign_device: clear DTE and submit hardware INVALIDATE_DEVTAB_ENTRY
and INVALIDATE_INTERRUPT_TABLE commands with completion wait (was
previously only clearing the software HashMap).

TRANSLATE opcode (0x0012): walk IOMMU page tables for IOVA-to-physical
address resolution.

fstat: return proper MODE_DIR/MODE_FILE and sizes for all handle kinds
(Root, Control, Domain, Device).

Remove #TODO from recipe.toml.
2026-04-25 18:07:58 +01:00
vasilito 530eb841db Add relibc fenv and sched POSIX implementations
P3-fenv: x86_64 SSE/x87 inline asm for 10 FP environment functions
(feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept,
feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept,
feupdateenv) with proper MXCSR and x87 CW register access.

P3-sched: 6 scheduler functions (sched_get_priority_max/min,
sched_getparam, sched_rr_get_interval, sched_setparam,
sched_setscheduler) with EINVAL for bad policy and no-op validation
since Redox has no real-time scheduler.
2026-04-25 18:07:46 +01:00
vasilito ae1bce5e14 Update desktop docs with improvement plan progress 2026-04-25 17:38:50 +01:00
vasilito fdb62413a6 Add login-protocol recipe and system recipe symlinks 2026-04-25 17:38:39 +01:00
vasilito ab525d4b5d Remove unnecessary ion -c wrappers from service configs 2026-04-25 17:38:28 +01:00
vasilito f6ca9f671c Fix build system: async TUI log writer, error messages, wget retries 2026-04-25 17:38:18 +01:00
vasilito cc0e28d282 Wire 9 missing relibc patches into recipe build list (33 total) 2026-04-25 17:38:06 +01:00
vasilito 9ddf68ce7b Add 8 relibc POSIX compatibility patches for desktop stack 2026-04-25 17:37:54 +01:00
vasilito 7a36312588 Add durability policy, userutils branding patch for Red Bear OS login/issue
Enforce that every source-tree edit must be mirrored to local/patches/
and wired into recipe.toml in the same session. Apply the policy
retroactively to userutils res/issue and res/motd (Redox → Red Bear).
2026-04-25 16:34:45 +01:00
vasilito 296861f1ce Fix mc 100% CPU hang: select() non-epoll timeout and signal.h stdint include
relibc select_epoll() forced timeout=0 when any FD doesn't support epoll
(e.g. TTY on Redox), causing busy-loop. Poll with 100ms interval instead.

Also add stdint.h to signal/cbindgen.toml sys_includes so signalfd_siginfo
struct types (uint32_t, int32_t) resolve without build errors.
2026-04-25 16:31:05 +01:00
vasilito 73fe89b033 Add warning policy and subsystem priority order to AGENTS.md
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:50:42 +01:00
vasilito 4fe9460a33 Red Bear OS 0.2.0 Liliya branding with updated banner and MOTD
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:50:29 +01:00
vasilito bd9eabaaec Fix KIO workerinterface and KXMLGui language dialog for Redox build
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:50:17 +01:00
vasilito 5b88e515df Fix KDE CMake find_package resolution for Qt6 and Wayland dependencies
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:50:06 +01:00
vasilito 965141d67c Add kded6 source with pre-generated D-Bus XML and fix CMake prefix path
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:51 +01:00
vasilito da53c400b4 Add kglobalacceld recipe with D-Bus service wiring and config entry
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:39 +01:00
vasilito 9c8de2d919 Enable host Qt DBus tools and sync unistd.h to cross-compiler toolchain
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:26 +01:00
vasilito 3db1953731 Add relibc exec-root-bypass and tcp-nodelay patches
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-25 14:49:15 +01:00
vasilito 58edf0df0b Add kded6 recipe and rewrite kirigami for real Qt6Quick build
Phase 4 KDE Plasma preparation:

kded6: new recipe at local/recipes/kde/kf6-kded6/ building the KDE
daemon from source. Depends on kf6-kconfig, kf6-kcoreaddons,
kf6-kcrash, kf6-kdbusaddons, kf6-kservice — all already built.
Added to redbear-full.toml package list. D-Bus activation file
already existed; removed TODO now that recipe exists.

kirigami: rewrite from stub to real CMake build. qtdeclarative
(Qt6Quick) is now available, so the real Kirigami can be built
instead of installing dummy cmake configs and a static lib placeholder.
Added qtshadertools and qtsvg as additional dependencies.
2026-04-25 13:20:33 +01:00
vasilito 38013bbf16 Wire evdevd input devices into udev-shim and enable udev in libinput
Phase 3 input chain wiring:

udev-shim: when scheme:evdev is registered (by evdevd), probe for
event0..event7 devices and create /dev/input/eventN nodes pointing to
scheme:evdev/eventN. This bridges evdevd's evdev devices into the
/dev/input namespace that libinput and compositors expect.

libinput: remove -Dudev=false and add libudev-stub as a dependency.
The libudev-stub recipe provides libudev.so that reads from scheme:udev
(udev-shim), giving libinput a working udev enumeration path instead of
stub functions that return NULL.

Input chain is now: hardware → /scheme/input → evdevd → scheme:evdev →
udev-shim → /dev/input/eventN → libudev-stub → libinput → KWin.
2026-04-25 13:15:12 +01:00
vasilito 843f30ba42 Fix relibc netdb/lookup: use-after-move and unsafe block errors
Upstream relibc netdb DNS lookup has two bugs exposed by Rust 2024 edition
strict unsafe handling:

1. packet_data is moved into Box::via into_boxed_slice() but the retry
   loop tries to call packet_data.as_ptr() on the moved value. Use the
   already-created raw pointer packet_data_ptr instead.

2. close() is a safe function in relibc, so wrapping it in unsafe{}
   triggers unused-unsafe (promoted to error by -D unused-unsafe). Remove
   the unnecessary unsafe blocks around close() calls.

Patch carries in local/patches/relibc/P3-netdb-lookup-retry-fix.patch and
is applied via the relibc recipe patches list.
2026-04-25 12:28:37 +01:00
vasilito f665929d96 Fix redbear-sessiond Redox shutdown: remove unreachable code after tokio::select!
The #[cfg(target_os = "redox")] variant of wait_for_shutdown had dead code
after the tokio::select! block. The select already returns Result<(), _>, so
the trailing Ok(()) was unreachable and caused a type mismatch when the compiler
tried to coerce the select result into (). Remove the dead code.
2026-04-25 12:22:33 +01:00
vasilito 61e1a1335c Migrate all init scripts from legacy format to .service TOML units
Convert 14 config files from the legacy init script format (plain-text
commands) to the systemd-style TOML .service format. The init daemon
supports both formats; this eliminates the legacy path entirely so that
all services use the richer, more structured TOML unit format.

Key changes per config:
- base.toml: split 00_base into 00_base.service (tmpdir) + 00_sudo.service
  (sudo daemon); remove redundant 00_drivers and 10_net (handled by
  existing .service files from the base recipe)
- minimal.toml: split 30_console into 29_activate_console.service +
  30_console.service + 31_debug_console.service
- desktop-minimal.toml: convert 20_display and 30_console to .service,
  add 29_activate_console and 31_debug_console overrides
- x11.toml: convert 10_dbus, 10_xenv, 20_orbital, 30_console
- redoxer.toml: split 10_net into 10_smolnetd.service + 10_dhcpd.service,
  convert 30_redoxer
- redbear-legacy-*.toml: update override references to .service paths
- acid.toml, auto-test.toml, os-test.toml, sys-build.toml: direct conversions
2026-04-25 12:20:09 +01:00
vasilito dc69317ddf D-Bus Phase 3/4: upgrade sessiond, services, add StatusNotifierWatcher, consolidate configs
- redbear-sessiond: add Manager.Inhibit (pipe FD), CanPowerOff/CanReboot/
  CanSuspend/CanHibernate/CanHybridSleep/CanSleep (return na), PowerOff/
  Reboot/Suspend stubs, GetSessionByPID, ListUsers, ListSeats,
  ListInhibitors, ActivateSession/LockSession/UnlockSession/TerminateSession
- redbear-sessiond: add Session SetIdleHint, SetLockedHint, SetType,
  Terminate methods; wire PauseDevice/ResumeDevice/Lock/Unlock signal
  emission via SignalEmitter injection; add dynamic device enumeration
  scanning /scheme/drm/card* and /dev/input/event* at startup
- redbear-sessiond: replace infinite pending() with stoppable shutdown
  via tokio watch channel + control socket shutdown command
- redbear-upower: add Changed signal emission with 30s periodic polling
  and power state snapshot comparison
- redbear-notifications: add ActionInvoked signal, expand capabilities
  to body + body-markup + actions
- redbear-polkit, redbear-udisks: replace pending() with stoppable
  shutdown via signal handling + watch channel
- Add redbear-statusnotifierwatcher: new session bus service implementing
  org.freedesktop.StatusNotifierWatcher for KDE system tray
- Add D-Bus activation file for StatusNotifierWatcher
- KWin session.cpp: try LogindSession before NoopSession fallback
- Consolidate config profiles: remove obsolete redbear-desktop, redbear-kde,
  redbear-live-*, redbear-minimal-*, redbear-wayland configs; simplify
  to three supported targets (redbear-full, redbear-mini, redbear-grub)
- Update DBUS-INTEGRATION-PLAN.md and DESKTOP-STACK-CURRENT-STATUS.md
  with Phase 3/4 fragility assessment, KWin readiness matrix, and
  completeness gap analysis
2026-04-25 12:01:25 +01:00
vasilito 0bd58c912f Wire Phase 2 compositor proof: KWin virtual + 60s survival verdict 2026-04-25 09:16:24 +01:00
vasilito ed854acdc4 Add D-Bus and session services to live-mini and minimal configs 2026-04-25 09:16:16 +01:00