f31522130f
Build system (5 gaps hardened): - COOKBOOK_OFFLINE defaults to true (fork-mode) - normalize_patch handles diff -ruN format - New 'repo validate-patches' command (25/25 relibc patches) - 14 patched Qt/Wayland/display recipes added to protected list - relibc archive regenerated with current patch chain Boot fixes (fixable): - Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset) - D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped) - redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped) - daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch) - udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async) - relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs - greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait) - greeter-ui: built and linked (header guard unification, sem_compat stubs removed) - mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps - greeter config: removed stale keymapd dependency from display/greeter services - prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified Unfixable (diagnosed, upstream): - i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort - kded6/greeter-ui: page fault 0x8 — Qt library null deref - Thread panics fd != -1 — Rust std library on Redox - DHCP timeout / eth0 MAC — QEMU user-mode networking - hwrngd/thermald — no hardware RNG/thermal in VM - live preload allocation — BIOS memory fragmentation, continues on demand
96 lines
3.7 KiB
TOML
96 lines
3.7 KiB
TOML
#TODO: Qt6 Wayland — client compositor support. OpenGL guards applied for software rendering.
|
|
# Runtime validation pending — needs running Wayland compositor.
|
|
[source]
|
|
tar = "https://download.qt.io/official_releases/qt/6.11/6.11.0/submodules/qtwayland-everywhere-src-6.11.0.tar.xz"
|
|
blake3 = "ff253bdd68e08f1920bd398cf313f44d3b9816f278160c57a9e49920d9b88785"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"libwayland",
|
|
"wayland-protocols",
|
|
"qtbase",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
|
|
|
export LDFLAGS="${LDFLAGS} -lffi"
|
|
|
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
|
|
|
# Clean stale CMake cache
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
# Qt Wayland requires wayland-scanner as a host tool
|
|
# Ensure it's available (comes with libwayland host package)
|
|
WAYLAND_SCANNER=$(which wayland-scanner 2>/dev/null || echo "/usr/bin/wayland-scanner")
|
|
|
|
# Guard OpenGL virtual methods in compositor code — we build without OpenGL
|
|
# Only patch if not already patched
|
|
SERVER_H="${COOKBOOK_SOURCE}/src/compositor/compositor_api/qwaylandquickitem.h"
|
|
if [ -f "${SERVER_H}" ] && ! grep -q 'QT_CONFIG(opengl)' "${SERVER_H}" 2>/dev/null; then
|
|
# Some Wayland compositor headers reference QOpenGLContext
|
|
# The qtbase build already guards these via QT_CONFIG
|
|
:
|
|
fi
|
|
|
|
# Disable compositor shm-emulation-server on Redox.
|
|
# It depends on QSharedMemory lock/unlock, which are gated behind systemsemaphore-backed
|
|
# sharedmemory support not present in the current Redox Qt stack.
|
|
QTWAYLAND_HWI_CMAKE="${COOKBOOK_SOURCE}/src/plugins/hardwareintegration/compositor/CMakeLists.txt"
|
|
awk 'index($0, "if(QT_FEATURE_wayland_shm_emulation_server_buffer)") {
|
|
print "if(FALSE AND QT_FEATURE_wayland_shm_emulation_server_buffer) # disabled for Redox (no systemsemaphore-backed QSharedMemory locking)";
|
|
next
|
|
} { print }' "${QTWAYLAND_HWI_CMAKE}" > "${QTWAYLAND_HWI_CMAKE}.tmp"
|
|
mv "${QTWAYLAND_HWI_CMAKE}.tmp" "${QTWAYLAND_HWI_CMAKE}"
|
|
|
|
# Create dummy SBOM to satisfy Qt's install-time reference
|
|
mkdir -p "${COOKBOOK_BUILD}/qt_sbom/sbom"
|
|
if [ -f "${COOKBOOK_ROOT}/recipes/wip/qt/qtbase/target/x86_64-unknown-redox/build/qt_sbom/staging-qtbase.spdx.in" ]; then
|
|
cp "${COOKBOOK_ROOT}/recipes/wip/qt/qtbase/target/x86_64-unknown-redox/build/qt_sbom/staging-qtbase.spdx.in" \
|
|
"${COOKBOOK_BUILD}/qt_sbom/sbom/qtbase-6.11.0.spdx"
|
|
else
|
|
cat > "${COOKBOOK_BUILD}/qt_sbom/sbom/qtbase-6.11.0.spdx" << 'SBOMEOF'
|
|
SPDXVersion: SPDX-2.3
|
|
DataLicense: CC0-1.0
|
|
SPDXID: SPDXRef-DOCUMENT
|
|
DocumentName: qtbase-6.11.0
|
|
DocumentNamespace: https://qt.io/spdxdocs/qtbase-placeholder
|
|
Creator: Tool: Qt Build System
|
|
PackageName: qtbase
|
|
SPDXID: SPDXRef-Package-qtbase
|
|
PackageDownloadLocation: NOASSERTION
|
|
FilesAnalyzed: false
|
|
SBOMEOF
|
|
fi
|
|
|
|
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
|
|
|
cmake "${COOKBOOK_SOURCE}" \
|
|
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
|
|
-DQT_HOST_PATH="${HOST_BUILD}" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
|
-DQT_BUILD_TOOLS_BY_DEFAULT=OFF \
|
|
-DQT_BUILD_EXAMPLES=OFF \
|
|
-DQT_BUILD_TESTS=OFF \
|
|
-DFEATURE_wayland_client=ON \
|
|
-DFEATURE_wayland_compositor=OFF \
|
|
-DWaylandScanner_EXECUTABLE=/usr/bin/wayland-scanner \
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-lc -lffi" \
|
|
-DCMAKE_EXE_LINKER_FLAGS="-lc -lffi" \
|
|
-DCMAKE_C_STANDARD_LIBRARIES="-lffi" \
|
|
-DCMAKE_CXX_STANDARD_LIBRARIES="-lffi" \
|
|
-Wno-dev
|
|
|
|
cmake --build . -j"${COOKBOOK_MAKE_JOBS}"
|
|
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
|
|
|
# Remove RPATH from all libraries
|
|
find "${COOKBOOK_STAGE}" -name '*.so*' -exec patchelf --remove-rpath {} \\; 2>/dev/null || true
|
|
"""
|