Comprehensive fix — not a fallback. Each recipe now has explicit
[package] section with name and version. Version inference:
- Git-source recipes without rev/branch: '0.1.0' (Red Bear convention)
- Tar/git recipes with version in URL or dir name: extracted version
- Sysroot-copy recipes: matched to toolchain version
Affected: 250+ recipes across all categories (core, libs, dev, system,
kde, qt, drivers, gpu, drm, kernel, userspace, etc.) Every recipe
in the redbear-mini build chain that was missing [package] now has
explicit version metadata. Cookbook can now always determine a version
at packaging time, eliminating 'cannot guess version' failures.
No cookbook fallback hack — the source of truth is recipe metadata.
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.
CMake ninja generator may not create *.dir output directories
before the first compilation pass, causing 'fatal error: opening
dependency file ... No such file or directory' during the Qt host
tools build (moc, uic, qtwaylandscanner). Add a find+mkdir loop
between cmake configure and cmake --build to pre-create them.
The cmake-generated Qt6ShaderToolsConfig.cmake has an empty
extra_cmake_include list. Patch it to include Qt6ShaderToolsMacros.cmake
so qt_internal_add_shaders is defined for downstream modules.
cmake install skipped this 405-line macros file that defines
qt_internal_add_shaders/qt6_add_shaders. Without it, downstream Qt
modules (qtdeclarative) fail at cmake configure with 'Unknown CMake
command qt_internal_add_shaders'.
Qt6's standalone module build installs qsb binary but does not generate
the Qt6ShaderToolsTools cmake wrapper package needed by cross-compile.
Added a Python generator that creates the minimal cmake package files
(Config, Targets, Targets-release, Precheck, AdditionalTargetInfo,
VersionlessTargets, Dependencies, ConfigVersion) following the exact
pattern of Qt6WaylandScannerTools from qtbase host build.
qtshadertools cross-compile needs the host 'qsb' (Qt Shader Builder)
tool, just like qtbase needs host moc/rcc/uic. Added a native cmake
build step that compiles qsb from the 6.11.1 source and installs it
into the shared qt-host-build prefix.
Also regenerate pam-redbear Cargo.lock (stale after 0.2.5 version bump
of redbear-login-protocol path dependency).
The host tool build profile was hardcoded with '6.11.0', causing the
stale 6.11.0 host tools to be reused for the 6.11.1 cross-compile.
Updated profile string to invalidate old host build.
Upstream Qt 6.11.1 already absorbed the #if QT_CONFIG(opengl) guards in
qwaylandclientbufferintegration_p.h that our redox.patch was adding.
Removed the now-obsolete hunks per patch governance (rebase, drop if
upstream absorbed it).
All remaining hunks apply cleanly against 6.11.1 with minor line offsets.
Bump the entire Qt 6 recipe surface to 6.11.1 as resolved from
download.qt.io on 2026-07-02. Per AGENTS.md fork-adaptation policy,
patches in local/patches/qtbase/* and local/patches/qtdeclarative/*
must be re-applied against the 6.11.1 source tree after this commit;
rebase is open work for the next session.
Verified BLAKE3 hashes for the 6.11.1 tarballs:
qtbase c3b83023dc54f1173831bbc80abca1901418ef517875bf8071a4895d3c4a3162
qtdeclarative 10f2d0662047ceb0ef221b725b59e7fec5c9092a4c10d5acc7daefea5f11b962
qtwayland 154b80972e472b10330c82d3b171a915959a5d06139289d5b898c16c58de4de8
qtsvg 49b947e1a96bf0a29a1ee84c231a518a1413d9f3ec360617e405400e510508b2
qtshadertools 24dcd88b9e752a380067182687032b2139d2f6220d64e4193428434970102ae2
qtsensors 52ad8a724bc34f724feef197cf29f1cb535831ddd0fbad6e9dfedaa01eef1379
Also:
- qtbase: bumped from 6.8.2 -> 6.11.1. The 6.11.0 source tree had been
imported under local/recipes/qt/qtbase/source/ by a prior session
without updating the recipe.toml. This commit aligns the recipe
with both the imported source and the resolved upstream latest.
- qtshadertools: NEW recipe created. The recipes/qt/qtshadertools
symlink was dangling (target directory did not exist), making
qtdeclarative's qtshadertools dependency unresolvable. Now wired
up following the qt6-sensors recipe pattern. Source tar URL is
the resolved 6.11.1 upstream; per-repo fetch will populate
source/ on next build.
What's NOT done (deliberately):
- Patch rebase in local/patches/qtbase/P*.patch and
local/patches/qtdeclarative/P1-skip-tools-crosscompile.patch.
These must be re-applied against the 6.11.1 source tree before
the next build. AGENTS.md policy: rebase, do not remove.
- KF6 6.10 -> 6.27.0 bump (38 framework recipes, 17-minor delta).
Deferred — multi-day patch-rebase work, out of scope for one session.
See local/docs/0.2.5-GRAPHICS-FREEZE-PLAN.md §2.2.
- KWin 6.6.5 -> 6.7.2 + wayland-protocols/libdrm/libwayland/...
bumps (remaining graphics recipes). Deferred.
- No build was attempted. recipe.toml pin is now consistent with
resolved upstream latest-stable; no source tree replacement has
happened.
The build-redbear.sh script auto-stashes working tree changes
in nested relibc and base source trees before running the
build. These changes were captured by the failed kernel
build attempt that hit the json-target-spec / kernel rust
toolchain mismatch (fixed in 0.2.5 by creating the local
0.2.5 branch).
Captured changes:
- local/recipes/kde/* : KDE Frameworks 6 source CMakeLists
whitespace changes from the autostash (preserved)
- local/recipes/qt/qtbase/* : qtypes.h whitespace from the
autostash (preserved)
- local/sources/kernel/Cargo.lock : dependency lock from
the kernel relibc rebuild attempt
- local/sources/kernel/src/lib.rs : touched (mtime) by the
build script's touch + make prefix command
This is a bookkeeping commit — the actual code changes
for the threading plan are on the 4 submodule branches
(kernel, relibc, base, libredox) and will be pushed
separately.
0.2.5 branch was created from 0.2.4 (HEAD cd3950072e) to
continue Phase 0 of the multi-threading plan work in a
clean branch.
Three related fixes for the qtbase and KDE source trees:
1. ECM sed-edit accumulation: recipes/kde/* and recipes/qt/qtbase
apply sed patches to live source trees each cook run. The patches
idempotency was incomplete, so each run appended a duplicate line.
'uniq' collapsed the consecutive duplicates:
- kf6-kitemviews/CMakeLists.txt: 165 -> 93 lines
- kf6-kwayland/CMakeLists.txt: 184 -> 133 lines
- qtbase corelib/CMakeLists.txt: removed duplicate Redox block
- qtbase qtypes.h: 359 -> 304 lines
- qtbase qnativesocketengine_unix.cpp: 1624 -> 1513 lines
- qtbase qnet_unix_p.h: 218 -> 163 lines
- qtbase qwaylandclientbufferintegration_p.h: 299 -> 79 lines
Net: 565 duplicate lines removed. Root cause: the ECM sed
operations did not check for prior presence. Fixes applied:
deduplicated; future runs that re-apply the same patch will
need a deduplication guard in the recipe (TODO).
2. Force hosted C++ runtime (-D_GLIBCXX_HOSTED=1) in redox-toolchain.cmake.
Redox is freestanding, so libstdc++ <cstdlib> takes the freestanding
branch which does NOT declare strtold/atoll/strtoll/etc. This
caused ktranscript (in kf6-ki18n) and any other code that uses
<bits/basic_string.h> std::stold to fail at compile time with
'strtold has not been declared in ::'. Forcing hosted mode
selects the libstdc++ hosted branch that #include_next <stdlib.h>
and resolves to relibc's strtold via the cbindgen trailer.
The existing libredbear-qt-strtold-compat.so shim remains
useful for the link step.
3. Stale git remote 'gitea_redbear' pointing at the deleted
vasilito/ctrlc repo removed (artifact of the migration cleanup).
The 6 pre-existing uncommitted changes (Cargo.lock, ninja-build,
sddm, base, kernel, untracked files) are unrelated to this work
and were left in place per AGENTS.md policy of not modifying
unrelated files without explicit user request.
The Qt6SvgTargets.cmake config contains absolute paths to qtsvg's own
sysroot/metatypes/ for INTERFACE_SOURCES. When the cookbook cleans
qtsvg's sysroot between recipe builds, these paths dangle and cause
CMake Generate to fail.
Extend redbear_qt_ensure_dep_sysroots to create symlinks for ALL Qt
directories (metatypes, plugins, mkspecs, modules, qml) — not just
include and lib. Add the call to qtdeclarative's recipe (was missing).
qtwayland build failed because qt_internal_get_wayland_protocols_dir()
resolves to a path under the sysroot, but the cookbook's dependency
resolution doesn't propagate usr/share/ files between recipes.
The text-input-unstable-v2.xml protocol file exists in qtbase's
stage/usr/share/qt6/wayland/protocols/ but was never copied into
qtwayland's sysroot, causing the Qt Wayland code generator to
silently fail producing qwayland-server-text-input-unstable-v2.cpp.
Three build failures (qt6-sensors, sddm, kwin) all trace to
qtdeclarative's sysroot/ directory being missing after staging.
CMake config files reference absolute paths into that sysroot.
1. qt-sysroot.sh: add mkdir -p before ln -sf in
redbear_qt_ensure_dep_sysroots() so the parent directory is
created when the dependency sysroot was cleaned up.
2. sddm wayland-patch.sh: fix sed pattern to include LinguistTools
token that exists in the actual upstream CMakeLists.txt line.
Without it the sed silently fails to match, leaving
LinguistTools/Test/QuickTest as REQUIRED components.
3. qt6-sensors recipe.toml: source qt-sysroot.sh and call
redbear_qt_ensure_dep_sysroots() before cmake configure.
Previously the recipe only symlinked plugins/mkspecs/metatypes/
modules but never fixed up dependency sysroot paths, causing
Qt6::Qml INTERFACE_INCLUDE_DIRECTORIES to reference a
non-existent include path.
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
GCC <cstdlib> needs ::strtold. -include stdlib.h works for normal
compilation but PCH compiles without -include flags. Disabling PCH
globally prevents strtold visibility issues in all Qt/KF6 packages.
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.
GCC <cstdlib> needs ::strtold declared. Qt's include chain pulls in
<cstdlib> before stdlib.h. Adding #include <stdlib.h> at the top of
common_helpers_p.h fixes the 'strtold has not been declared in ::'
error. Reverted -U_GLIBCXX_USE_C99_STDLIB toolchain breakage.
GCC <cstdlib> uses C99 stdlib wrappers (strtold etc.) gated by this macro.
relibc declares but doesn't implement strtold. Undef at toolchain level
prevents 'using ::strtold' errors in KF6/Qt C++ builds.
GCC <cstdlib> needs ::strtold declared. relibc stdlib.h provides it,
but Qt include chains can pull in <cstdlib> before stdlib.h.
Adding -include stdlib.h at the toolchain level fixes all Qt/KF6 recipes.
The qtquick-config.h file was being generated empty by the cmake
build, causing 'division by zero in #if' errors in downstream
consumers (SDDM, KWin) because QT_CONFIG(quick_shadereffect) and
QT_CONFIG(quick_draganddrop) were undefined.
Two fixes:
1. Explicitly enable QT_FEATURE_quick_shadereffect and
QT_FEATURE_quick_draganddrop in the cmake configuration.
2. Add a safety net that regenerates qtquick-config.h with the
required feature definitions if cmake produces an empty file.
The qtdeclarative recipe manually copied include files, which missed
the build-time generated qfeatures.h. Without it, downstream consumers
(SDDM, KWin, etc.) hit 'division by zero in #if' errors in qquickitem.h
because QT_CONFIG(quick_shadereffect) and QT_CONFIG(quick_draganddrop)
were undefined, triggering the deliberate 1/0 preprocessor trap.
Fix: use cmake --install to properly install all files, and add a safety
net that copies qfeatures.h from the build tree if cmake --install
does not place it in the install prefix.
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 --address=unix:path=/run/dbus/system_bus_socket to dbus-daemon args
- Add before = ["13_redbear-sessiond.service"] for strict ordering
- Fixes redbear-sessiond "failed to read from socket" errors
- Add fallback to copy from sysroot/usr/include/KHR/ if available
- Generate minimal khrplatform.h stub if neither exists
- Fixes build failure where Qt's qopengl.h cannot find KHR/khrplatform.h
Root cause: PciDevice::open_io_ports never called acquire_iopl(),
so the first outl to 0xCF8 triggered #GP(0) when redox-drm tried
to scan virtio-gpu PCI capabilities.
- Add ensure_iopl_acquired() helper (thread-local Once)
- Call it in PciDevice::open_io_ports before any I/O
- Add P1-pci-open-io-ports-iopl.patch to recipe
- Mirror patch to local/patches/ for durability