kde/H-Qt: receta qtbase de-Alpinizada (gate campaña KDE) + cola incoming-kde al worker
qt6-qtbase 6.11.1 desde Alpine community: conserva sus 3 parches de musl (LFS64/ DNS-resolver/symlinks), reescribe abuild→CMake/Ninja explícito. link=DINÁMICO (política capa GUI, ADR 0011). Minimal para el gate: Wayland-only (xcb OFF), icu/vulkan/cups/libproxy/libinput/accessibility OFF, double-conversion+libb2 bundled ⇒ compila reusando SOLO deps ya selladas, cero recetas nuevas. sha256 pinneado (sha512 cotejado con Alpine). farm-worker-loop añade recipes/incoming-kde a QUEUES. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
the *64 apis are useless as musl is always 64-bit for them.
|
||||
even on glibc, passing -D_FILE_OFFSET_BITS=64 defines 64-bit variants for non-64 names.
|
||||
this legacy api is removed in musl-1.2.4 unless -D_LARGEFILE64_SOURCE,
|
||||
omit it from here to fix downstream use without having to pass defines.
|
||||
--
|
||||
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
|
||||
index ffae2ac3..665ae46f 100644
|
||||
--- a/mkspecs/common/posix/qplatformdefs.h
|
||||
+++ b/mkspecs/common/posix/qplatformdefs.h
|
||||
@@ -14,28 +14,28 @@
|
||||
|
||||
#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(QT_LARGEFILE_SUPPORT)
|
||||
|
||||
-#define QT_STATBUF struct stat64
|
||||
-#define QT_FPOS_T fpos64_t
|
||||
-#define QT_OFF_T off64_t
|
||||
+#define QT_STATBUF struct stat
|
||||
+#define QT_FPOS_T fpos_t
|
||||
+#define QT_OFF_T off_t
|
||||
|
||||
-#define QT_STAT ::stat64
|
||||
-#define QT_LSTAT ::lstat64
|
||||
-#define QT_TRUNCATE ::truncate64
|
||||
+#define QT_STAT ::stat
|
||||
+#define QT_LSTAT ::lstat
|
||||
+#define QT_TRUNCATE ::truncate
|
||||
|
||||
// File I/O
|
||||
-#define QT_OPEN ::open64
|
||||
-#define QT_LSEEK ::lseek64
|
||||
-#define QT_FSTAT ::fstat64
|
||||
-#define QT_FTRUNCATE ::ftruncate64
|
||||
+#define QT_OPEN ::open
|
||||
+#define QT_LSEEK ::lseek
|
||||
+#define QT_FSTAT ::fstat
|
||||
+#define QT_FTRUNCATE ::ftruncate
|
||||
|
||||
// Standard C89
|
||||
-#define QT_FOPEN ::fopen64
|
||||
-#define QT_FSEEK ::fseeko64
|
||||
-#define QT_FTELL ::ftello64
|
||||
-#define QT_FGETPOS ::fgetpos64
|
||||
-#define QT_FSETPOS ::fsetpos64
|
||||
+#define QT_FOPEN ::fopen
|
||||
+#define QT_FSEEK ::fseeko
|
||||
+#define QT_FTELL ::ftello
|
||||
+#define QT_FGETPOS ::fgetpos
|
||||
+#define QT_FSETPOS ::fsetpos
|
||||
|
||||
-#define QT_MMAP ::mmap64
|
||||
+#define QT_MMAP ::mmap
|
||||
|
||||
#else // !defined(QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT)
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
diff --git a/cmake/FindWrapResolv.cmake b/cmake/FindWrapResolv.cmake
|
||||
index 159df9b60d8..7d6b3fa50f7 100644
|
||||
--- a/cmake/FindWrapResolv.cmake
|
||||
+++ b/cmake/FindWrapResolv.cmake
|
||||
@@ -40,9 +40,8 @@ check_cxx_source_compiles("
|
||||
|
||||
int main(int, char **argv)
|
||||
{
|
||||
- res_state statep = {};
|
||||
- int n = res_nmkquery(statep, 0, argv[1], 0, 0, NULL, 0, NULL, NULL, 0);
|
||||
- n = res_nsend(statep, NULL, 0, NULL, 0);
|
||||
+ int n = res_mkquery(0, argv[1], 0, 0, NULL, 0, NULL, NULL, 0);
|
||||
+ n = res_send(NULL, 0, NULL, 0);
|
||||
n = dn_expand(NULL, NULL, NULL, NULL, 0);
|
||||
return n;
|
||||
}
|
||||
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
|
||||
index 4262ad58d50..47524f954af 100644
|
||||
--- a/src/network/kernel/qdnslookup_unix.cpp
|
||||
+++ b/src/network/kernel/qdnslookup_unix.cpp
|
||||
@@ -25,6 +25,10 @@ QT_REQUIRE_CONFIG(libresolv);
|
||||
|
||||
#include <array>
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+# include "resolv_compat.h"
|
||||
+#endif
|
||||
+
|
||||
#ifndef T_OPT
|
||||
// the older arpa/nameser_compat.h wasn't updated between 1999 and 2016 in glibc
|
||||
# define T_OPT ns_t_opt
|
||||
@@ -133,7 +137,7 @@ static int
|
||||
prepareQueryBuffer(res_state state, QueryBuffer &buffer, const char *label, ns_rcode type)
|
||||
{
|
||||
// Create header and our query
|
||||
- int queryLength = res_nmkquery(state, QUERY, label, C_IN, type, nullptr, 0, nullptr,
|
||||
+ int queryLength = res_mkquery(QUERY, label, C_IN, type, nullptr, 0, nullptr,
|
||||
buffer.data(), buffer.size());
|
||||
Q_ASSERT(queryLength < int(buffer.size()));
|
||||
if (Q_UNLIKELY(queryLength < 0))
|
||||
@@ -170,7 +174,7 @@ static int sendStandardDns(QDnsLookupReply *reply, res_state state, QSpan<unsign
|
||||
|
||||
auto attemptToSend = [&]() {
|
||||
std::memset(buffer.data(), 0, HFIXEDSZ); // the header is enough
|
||||
- int responseLength = res_nsend(state, qbuffer.data(), qbuffer.size(), buffer.data(), buffer.size());
|
||||
+ int responseLength = res_send(qbuffer.data(), qbuffer.size(), buffer.data(), buffer.size());
|
||||
if (responseLength >= 0)
|
||||
return responseLength; // success
|
||||
|
||||
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
|
||||
index 3b0e2d333aa..8eeb3cc2c0d 100644
|
||||
--- a/src/network/kernel/qhostinfo_unix.cpp
|
||||
+++ b/src/network/kernel/qhostinfo_unix.cpp
|
||||
@@ -18,6 +18,10 @@
|
||||
# include <resolv.h>
|
||||
#endif
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+# include "resolv_compat.h"
|
||||
+#endif
|
||||
+
|
||||
#ifndef _PATH_RESCONF
|
||||
# define _PATH_RESCONF "/etc/resolv.conf"
|
||||
#endif
|
||||
diff --git a/src/network/kernel/resolv_compat.h b/src/network/kernel/resolv_compat.h
|
||||
new file mode 100644
|
||||
index 0000000..4f0e852
|
||||
--- /dev/null
|
||||
+++ b/src/network/kernel/resolv_compat.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+#if !defined(__GLIBC__)
|
||||
+/***************************************************************************
|
||||
+ * resolv_compat.h
|
||||
+ *
|
||||
+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
|
||||
+ * Note: res_init() is actually deprecated according to
|
||||
+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
|
||||
+ **************************************************************************/
|
||||
+#include <string.h>
|
||||
+
|
||||
+static inline int res_ninit(res_state statp)
|
||||
+{
|
||||
+ int rc = res_init();
|
||||
+ if (statp != &_res) {
|
||||
+ memcpy(statp, &_res, sizeof(*statp));
|
||||
+ }
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+static inline int res_nclose(res_state statp)
|
||||
+{
|
||||
+ if (!statp)
|
||||
+ return -1;
|
||||
+ if (statp != &_res) {
|
||||
+ memset(statp, 0, sizeof(*statp));
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
@@ -0,0 +1,95 @@
|
||||
# qt6-qtbase 6.11.1 — el corazón de Qt6, base de todo KDE. Etapa Escritorio / campaña KDE (ADR 0011).
|
||||
# De-Alpinizada del APKBUILD community/qt6-qtbase: se conservan sus 3 parches de musl (LFS64, DNS
|
||||
# resolver, symlinks) — el trabajo de portabilidad que un import de nix pierde — y se reescriben las
|
||||
# fases desde el wrapper abuild a CMake/Ninja explícito.
|
||||
#
|
||||
# POLÍTICA DE LA CAPA GUI (ADR 0011): link=DINÁMICO. Qt carga plugins .so en runtime (QPA, formatos,
|
||||
# estilos); un Qt estático no abre una ventana. Se abandona el -static del userland CLI (no re-hashea
|
||||
# nada sellado). BUILD_SHARED_LIBS=ON (default de Qt) ⇒ libQt6Core.so, etc.
|
||||
#
|
||||
# MINIMAL PARA EL GATE H-Qt: Wayland-only (xcb OFF ⇒ toda la cadena xcb-util-* fuera del camino
|
||||
# crítico), icu OFF (Qt usa su fallback), vulkan OFF (se reactiva para KWin), double-conversion y
|
||||
# libb2 BUNDLED (Qt trae 3rdparty ⇒ no necesitan receta), cups/at-spi/libproxy/tslib/DB-no-sqlite OFF.
|
||||
# Con esto qtbase compila reusando SOLO deps ya selladas (freetype/fontconfig/harfbuzz/glib/mesa/
|
||||
# wayland/openssl/sqlite/pcre2/zlib/libpng/libjpeg-turbo/dbus/libxkbcommon) — CERO recetas nuevas.
|
||||
#
|
||||
# NOTA compiler: Qt6 es el stress-test C++ más grande del lab. Se intenta zig-cc primero (coherente
|
||||
# con el resto); si el C++ a escala lo rompe, caer a gcc-de-gueto (patrón kernel/cmake, ADR 0011).
|
||||
# IPO/LTO OFF para el gate: reduce riesgo y tiempo; se puede reactivar tras validar.
|
||||
name = "qt6-qtbase"
|
||||
version = "6.11.1"
|
||||
|
||||
[source]
|
||||
tarball = "https://download.qt.io/official_releases/qt/6.11/6.11.1/submodules/qtbase-everywhere-src-6.11.1.tar.xz"
|
||||
sha256 = "d9594a31228aa23ad6b531719a29b45f0f3989fe6c136d45767ea179f233c1ac"
|
||||
patches = ["0001-qt6-qtbase-lfs64.patch", "0002-qt6-qtbase-dns-resolver.patch", "symlinks.patch"]
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin \
|
||||
-DINSTALL_PUBLICBINDIR=bin \
|
||||
-DINSTALL_LIBEXECDIR=lib/qt6/libexec \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 \
|
||||
-DINSTALL_DATADIR=share/qt6 \
|
||||
-DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DQT_FEATURE_relocatable=OFF \
|
||||
-DQT_FEATURE_reduce_relocations=OFF \
|
||||
-DQT_FEATURE_journald=OFF \
|
||||
-DQT_FEATURE_icu=OFF \
|
||||
-DQT_FEATURE_vulkan=OFF \
|
||||
-DQT_FEATURE_xcb=OFF \
|
||||
-DQT_FEATURE_libproxy=OFF \
|
||||
-DQT_FEATURE_cups=OFF \
|
||||
-DQT_FEATURE_libinput=OFF \
|
||||
-DQT_FEATURE_accessibility=OFF \
|
||||
-DQT_FEATURE_system_doubleconversion=OFF \
|
||||
-DQT_FEATURE_libb2=OFF \
|
||||
-DQT_FEATURE_system_sqlite=ON \
|
||||
-DQT_FEATURE_sql_mysql=OFF \
|
||||
-DQT_FEATURE_sql_psql=OFF \
|
||||
-DQT_FEATURE_sql_odbc=OFF \
|
||||
-DQT_FEATURE_openssl_linked=ON \
|
||||
-DQT_FEATURE_system_zlib=ON \
|
||||
-DQT_FEATURE_system_libpng=ON \
|
||||
-DQT_FEATURE_system_libjpeg=ON \
|
||||
-DQT_FEATURE_system_freetype=ON \
|
||||
-DQT_FEATURE_system_harfbuzz=ON \
|
||||
-DQT_FEATURE_system_pcre2=ON \
|
||||
-DQT_FEATURE_fontconfig=ON \
|
||||
-DQT_FEATURE_glib=ON \
|
||||
-DQT_FEATURE_opengl=ON \
|
||||
-DQT_FEATURE_egl=ON \
|
||||
-DQT_FEATURE_dbus=ON \
|
||||
-DQT_FEATURE_widgets=ON \
|
||||
-DQT_BUILD_EXAMPLES=OFF \
|
||||
-DQT_BUILD_TESTS=OFF
|
||||
'''
|
||||
compile = "cmake --build build"
|
||||
install = '''
|
||||
DESTDIR=/out cmake --install build
|
||||
# symlinks a las dev-tools (moc/uic/rcc…) en /usr/bin, como el package() de Alpine
|
||||
if [ -f build/user_facing_tool_links.txt ]; then
|
||||
mkdir -p /out/usr/bin
|
||||
while read -r target name; do ln -sf "$target" "/out/$name"; done < build/user_facing_tool_links.txt
|
||||
fi
|
||||
'''
|
||||
|
||||
[deps]
|
||||
# Sólo deps YA selladas + toolchain. double-conversion/libb2/icu/vulkan/xcb/cups quedan bundled u OFF.
|
||||
build = [
|
||||
"cmake", "samurai", "perl", "python3", "pkgconf",
|
||||
"glib", "freetype", "fontconfig", "harfbuzz", "libpng", "libjpeg-turbo",
|
||||
"pcre2", "zlib", "openssl", "sqlite",
|
||||
"wayland", "wayland-protocols", "libxkbcommon", "mesa", "dbus",
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
Fix broken symlink path
|
||||
|
||||
--- a/cmake/QtPostProcessHelpers.cmake
|
||||
+++ b/cmake/QtPostProcessHelpers.cmake
|
||||
@@ -883,7 +883,7 @@
|
||||
endif()
|
||||
endif()
|
||||
qt_path_join(tool_target_path "${CMAKE_INSTALL_PREFIX}" "${INSTALL_BINDIR}" "${filename}")
|
||||
- qt_path_join(tool_link_path "${INSTALL_PUBLICBINDIR}" "${linkname}${PROJECT_VERSION_MAJOR}")
|
||||
+ qt_path_join(tool_link_path "${CMAKE_INSTALL_PREFIX}" "${INSTALL_PUBLICBINDIR}" "${linkname}${PROJECT_VERSION_MAJOR}")
|
||||
_qt_internal_relative_path(tool_target_path BASE_DIRECTORY ${tool_link_base_dir})
|
||||
list(APPEND lines "${tool_target_path} ${tool_link_path}")
|
||||
endforeach()
|
||||
@@ -72,7 +72,7 @@ DISK_HIGH="${DISK_HIGH:-82}"
|
||||
# `rm -rf work/farm` al inicio ⇒ construirlas EN SERIE (una por vuelta) es seguro, sin colisión.
|
||||
# incoming-clib: libs C (toolkit/foundational) que el worker SELLA pero el cron de cosecha-go IGNORA
|
||||
# (son build-deps, se usan vía catálogo; no tienen binario que el gate Go pueda smoke-testear).
|
||||
QUEUES="${QUEUES:-recipes/incoming recipes/incoming-go recipes/incoming-clib}"
|
||||
QUEUES="${QUEUES:-recipes/incoming recipes/incoming-go recipes/incoming-clib recipes/incoming-kde}"
|
||||
echo "$(date -u +%FT%TZ) worker-loop arrancado: JOBS=$JOBS IDLE_SLEEP=$IDLE_SLEEP QUEUES='$QUEUES'"
|
||||
while :; do
|
||||
total=0
|
||||
|
||||
Reference in New Issue
Block a user