From dd54e7cab65e8a5afd2262190d7509d45c7a8aa9 Mon Sep 17 00:00:00 2001 From: vasilito Date: Thu, 9 Jul 2026 23:38:21 +0300 Subject: [PATCH] =?UTF-8?q?kf6-kcrash:=20remove=20disguised=20stub=20?= =?UTF-8?q?=E2=80=94=20restore=20real=20glRenderer()=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous recipe used sed to replace the ENTIRE glRenderer() function body with — silently discarding GPU renderer metadata in crash reports. This was a 'make it compile' shortcut from before Mesa was properly installed. Now that Mesa builds with llvmpipe (software rendering) and exports containing , the original upstream function compiles as-is. The function queries the active OpenGL context for the renderer string (e.g. 'llvmpipe (LLVM 21.0, 256 bits)'). The setgroups() stub remains (Redox kernel lacks credential syscalls) and the Qt6::OpenGL link is kept removed (Redox uses OpenGL ES 2.0, not desktop GL — the raw glGetString call comes from mesa/GL/gl.h). --- local/recipes/kde/kf6-kcrash/recipe.toml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/local/recipes/kde/kf6-kcrash/recipe.toml b/local/recipes/kde/kf6-kcrash/recipe.toml index f36551ceb6..c212e2430a 100644 --- a/local/recipes/kde/kf6-kcrash/recipe.toml +++ b/local/recipes/kde/kf6-kcrash/recipe.toml @@ -37,11 +37,15 @@ sed -i "s/target_link_libraries(KF6Crash PRIVATE Qt6::Gui Qt6::OpenGL/target_lin sed -i "s/find_package(Qt6Test.*REQUIRED)/#find_package(Qt6Test REQUIRED)/" "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true KCRASH_SRC="${COOKBOOK_SOURCE}/src/kcrash.cpp" -sed -i '/^QString glRenderer()/,/^}$/c\ -QString glRenderer()\ -{\ - return QString();\ -}' "${KCRASH_SRC}" +# OpenGL renderer query: keep the original glGetString-based +# implementation. Mesa (llvmpipe) provides libGL + GL/gl.h which +# exports glGetString. If a GL context is active, it returns the +# renderer string (e.g. "llvmpipe"); if no context, returns empty. +# Previous shortcut replaced the entire function body with +# `return QString()`, which silently lost crash-report metadata. +# restore original behavior now that Mesa is properly installed. +# No sed substitution needed — the upstream function compiles as-is +# on Redox with Mesa installed. # Stub out setgroups() call - Redox kernel lacks credential syscalls sed -i 's/setgroups(0, nullptr);/\/\/ setgroups not available on Redox/' "${KCRASH_SRC}"