kf6-kcrash: remove disguised stub — restore real glRenderer() function
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).
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user