diff --git a/debian/changelog b/debian/changelog index 7a93d0e..2c3b644 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ qt6-base (6.4.0+dfsg-1) UNRELEASED; urgency=medium [ Patrick Franz ] * New upstream release (6.4.0). * Update ABI to 6.4.0. + * Remove some patches as they have been applied upstream. -- Debian Qt/KDE Maintainers Sat, 01 Oct 2022 19:38:04 +0200 diff --git a/debian/patches/series b/debian/patches/series index 609040d..d598193 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,10 +1,3 @@ -# fixed in 6.4 -upstream_CMake-add-support-for-GNU-Hurd.patch -upstream_QProcess-Unix-fallback-on-_POSIX_PIPE_BUF-w-missing-.patch -upstream_Hurd-enable-XOPEN-largefile-APIs.patch -upstream_Avoid-a-stack-buffer-when-not-needed.patch -upstream_QFileSystemEngine-canonicalName-Unix-clean-up-contro.patch - # Debian specific remove_privacy_breaches.diff build_path_embedded_qtbuildinternalsextra_cmake.patch diff --git a/debian/patches/upstream_Avoid-a-stack-buffer-when-not-needed.patch b/debian/patches/upstream_Avoid-a-stack-buffer-when-not-needed.patch deleted file mode 100644 index 15c5b99..0000000 --- a/debian/patches/upstream_Avoid-a-stack-buffer-when-not-needed.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7c54988b1b3b9eb4d2f3650c1ba5ffe97673ca92 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Thu, 10 Feb 2022 08:26:11 +0100 -Subject: [PATCH] Avoid a stack buffer when not needed - -Allocate a PATH_MAX-sized buffer on stack only in case we are not using -realpath(X, null), i.e. on platforms with older POSIX versions, macOS, -or Android. - -This fixes the build on platforms that do not have PATH_MAX (e.g. -GNU/Hurd), and it provides a minor optimization on realpath(X, null) -platforms. - -Change-Id: Icd92a1b15ec18c5eef8113408e9610dfac774101 -Reviewed-by: Thiago Macieira ---- - src/corelib/io/qfilesystemengine_unix.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp -index 6e8229daec..fb66d47d38 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -686,7 +686,9 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, - Q_UNUSED(data); - return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); - #else -+# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || _POSIX_VERSION < 200801L - char stack_result[PATH_MAX+1]; -+# endif - char *resolved_name = nullptr; - # if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) - // On some Android and macOS versions, realpath() will return a path even if -@@ -714,8 +716,10 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, - data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; - data.entryFlags |= QFileSystemMetaData::ExistsAttribute; - QString canonicalPath = QDir::cleanPath(QFile::decodeName(resolved_name)); -+# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || _POSIX_VERSION < 200801L - if (resolved_name != stack_result) - free(resolved_name); -+# endif - return QFileSystemEntry(canonicalPath); - } else if (errno == ENOENT || errno == ENOTDIR) { // file doesn't exist - data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; --- -2.34.1 - diff --git a/debian/patches/upstream_CMake-add-support-for-GNU-Hurd.patch b/debian/patches/upstream_CMake-add-support-for-GNU-Hurd.patch deleted file mode 100644 index 3b92dff..0000000 --- a/debian/patches/upstream_CMake-add-support-for-GNU-Hurd.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 099e0fff61f080e2d628c8f472df78f6fd2f5234 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Sun, 21 Nov 2021 08:59:56 +0100 -Subject: [PATCH] CMake: add support for GNU/Hurd - -Add a "HURD" CMake platform specification, so it can be properly -checked in the build system. - -Set QT_DEFAULT_MKSPEC to the existing hurd-g++ mkspec. - -Hurd supports $ORIGIN in RPATH, so enable it. - -Hurd uses X11, so add it to the X11_SUPPORTED list. - -Enable few more feature checks that apply to Hurd as well: either -because they are provided by GNU libc itself, or because they are -implemented on Hurd. - -Check and set the ELF interpreter, as it is a common functionality of -the GNU toolchain. - -Change-Id: Id347033560bbc5a2a4e2c3abb493c948c002b40e -Reviewed-by: Edward Welbourne -Reviewed-by: Joerg Bornemann -Reviewed-by: Qt CI Bot -Reviewed-by: Alexandru Croitor ---- - cmake/QtBuild.cmake | 2 ++ - cmake/QtPlatformSupport.cmake | 1 + - cmake/QtRpathHelpers.cmake | 2 +- - src/corelib/CMakeLists.txt | 2 +- - src/corelib/configure.cmake | 8 ++++---- - src/gui/configure.cmake | 2 +- - 6 files changed, 10 insertions(+), 7 deletions(-) - -diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake -index b06dec60d8..d267f560c1 100644 ---- a/cmake/QtBuild.cmake -+++ b/cmake/QtBuild.cmake -@@ -362,6 +362,8 @@ elseif(SOLARIS) - set(QT_DEFAULT_MKSPEC solaris-cc) - endif() - endif() -+elseif(HURD) -+ set(QT_DEFAULT_MKSPEC hurd-g++) - endif() - - if(NOT QT_QMAKE_TARGET_MKSPEC) -diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake -index c8462043c9..44db95d807 100644 ---- a/cmake/QtPlatformSupport.cmake -+++ b/cmake/QtPlatformSupport.cmake -@@ -18,6 +18,7 @@ qt_set01(FREEBSD CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FIXME: How to identify - qt_set01(NETBSD CMAKE_SYSTEM_NAME STREQUAL "NetBSD") # FIXME: How to identify this? - qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR EMSCRIPTEN) - qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS") -+qt_set01(HURD CMAKE_SYSTEM_NAME STREQUAL "GNU") - - # This is the only reliable way we can determine the webOS platform as the yocto recipe adds this - # compile definition into its generated toolchain.cmake file - -diff --git a/cmake/QtRpathHelpers.cmake b/cmake/QtRpathHelpers.cmake -index 6e3414b50f..cbe33a6b77 100644 ---- a/cmake/QtRpathHelpers.cmake -+++ b/cmake/QtRpathHelpers.cmake -@@ -20,7 +20,7 @@ function(qt_compute_relative_rpath_base rpath install_location out_var) - # needed in the .prf files, but for CMake we need to prepend them ourselves. - if(APPLE) - set(rpath_rel_base "@loader_path") -- elseif(LINUX OR SOLARIS OR FREEBSD) -+ elseif(LINUX OR SOLARIS OR FREEBSD OR HURD) - set(rpath_rel_base "$ORIGIN") - else() - message(WARNING "No known RPATH_REL_BASE for target platform.") -diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt -index c1259150ab..be4bc7b2de 100644 ---- a/src/corelib/CMakeLists.txt -+++ b/src/corelib/CMakeLists.txt -@@ -339,7 +339,7 @@ set_property(TARGET Core APPEND PROPERTY - PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig_p.h") - - # Find ELF interpreter and define a macro for that: --if (LINUX AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS) -+if ((LINUX OR HURD) AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS) - if (NOT DEFINED ELF_INTERPRETER) - execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/ls - RESULT_VARIABLE readelf_ok -diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake -index 08d1e0d976..71e237ae9c 100644 ---- a/src/corelib/configure.cmake -+++ b/src/corelib/configure.cmake -@@ -578,7 +578,7 @@ qt_feature("glib" PUBLIC PRIVATE - qt_feature_definition("glib" "QT_NO_GLIB" NEGATE VALUE "1") - qt_feature("glibc" PRIVATE - LABEL "GNU libc" -- AUTODETECT LINUX -+ AUTODETECT ( LINUX OR HURD ) - CONDITION TEST_glibc - ) - qt_feature("icu" PRIVATE -@@ -612,7 +612,7 @@ qt_feature("system-libb2" PRIVATE - # Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rules - qt_feature("linkat" PRIVATE - LABEL "linkat()" -- AUTODETECT LINUX AND NOT ANDROID -+ AUTODETECT ( LINUX AND NOT ANDROID ) OR HURD - CONDITION TEST_linkat - ) - qt_feature("std-atomic64" PUBLIC -@@ -669,7 +669,7 @@ qt_feature("qqnx_pps" PRIVATE - ) - qt_feature("renameat2" PRIVATE - LABEL "renameat2()" -- CONDITION LINUX AND TEST_renameat2 -+ CONDITION ( LINUX OR HURD ) AND TEST_renameat2 - ) - qt_feature("slog2" PRIVATE - LABEL "slog2" -@@ -677,7 +677,7 @@ qt_feature("slog2" PRIVATE - ) - qt_feature("statx" PRIVATE - LABEL "statx() in libc" -- CONDITION LINUX AND TEST_statx -+ CONDITION ( LINUX OR HURD ) AND TEST_statx - ) - qt_feature("syslog" PRIVATE - LABEL "syslog" -diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake -index f5d26977af..b4625c77b4 100644 ---- a/src/gui/configure.cmake -+++ b/src/gui/configure.cmake -@@ -25,7 +25,7 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system) - - - #### Libraries --qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS) # special case -+qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR HURD) # special case - qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi) - qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb) - qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm) --- -2.34.1 - diff --git a/debian/patches/upstream_Hurd-enable-XOPEN-largefile-APIs.patch b/debian/patches/upstream_Hurd-enable-XOPEN-largefile-APIs.patch deleted file mode 100644 index cb09c3a..0000000 --- a/debian/patches/upstream_Hurd-enable-XOPEN-largefile-APIs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 06e7b5168e269f913f03ecb9d77fc82db4d9dfd6 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Mon, 31 Jan 2022 21:36:59 +0100 -Subject: [PATCH] Hurd: enable XOPEN largefile APIs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Hurd supports largefile, so enable it also in Qt. - -Change-Id: I8384ca2cb5c6250376916b6a890e1a873c0a0e96 -Reviewed-by: Jörg Bornemann ---- - mkspecs/hurd-g++/qplatformdefs.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h -index b1887aae7f..c6d35e0ac5 100644 ---- a/mkspecs/hurd-g++/qplatformdefs.h -+++ b/mkspecs/hurd-g++/qplatformdefs.h -@@ -78,6 +78,7 @@ - #include - #include - -+#define QT_USE_XOPEN_LFS_EXTENSIONS - #include "../common/posix/qplatformdefs.h" - - #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) --- -2.34.1 - diff --git a/debian/patches/upstream_QFileSystemEngine-canonicalName-Unix-clean-up-contro.patch b/debian/patches/upstream_QFileSystemEngine-canonicalName-Unix-clean-up-contro.patch deleted file mode 100644 index 1f034d0..0000000 --- a/debian/patches/upstream_QFileSystemEngine-canonicalName-Unix-clean-up-contro.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 06e45cbd6a2e09bc32cb1c9aa3779d6bd5282c45 Mon Sep 17 00:00:00 2001 -From: Fabian Kosmale -Date: Mon, 14 Feb 2022 10:29:24 +0100 -Subject: [PATCH] QFileSystemEngine::canonicalName (Unix): clean up - control-flow - -When passing a nullptr to realpath, it will allocate memory. That memory -has to be freed (with free) later to avoid a leak, which we so far -didn't. -This patch ensures that we always clean up the memory by using a -unique_ptr. As a drive-by, clean up the control-flow: -- Always pass either the stack buffer or nullptr to realpath. -- Rely on realpath returning nullptr in the error case. -Lastly, fix a few coding-style issues. - -Change-Id: Ia906df77324020c267b087ec52a9a6c47aaa2a59 -Reviewed-by: Thiago Macieira ---- - src/corelib/io/qfilesystemengine_unix.cpp | 43 ++++++++++++----------- - 1 file changed, 23 insertions(+), 20 deletions(-) - -diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp -index fb66d47d38..47dd7bea7e 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -58,6 +58,8 @@ - #include - #include - -+#include // for std::unique_ptr -+ - #if __has_include() - # include - #endif -@@ -687,39 +689,40 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, - return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); - #else - # if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || _POSIX_VERSION < 200801L -- char stack_result[PATH_MAX+1]; -+ // used to store the result of realpath in case where realpath cannot allocate itself -+ char stack_result[PATH_MAX + 1]; -+#else -+ // enables unconditionally passing stack_result below -+ std::nullptr_t stack_result = nullptr; -+# endif -+ auto resolved_path_deleter = [&](char *ptr) { -+ // frees resolved_name if it was allocated by realpath -+# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || _POSIX_VERSION < 200801L -+ // ptr is either null, or points to stack_result -+ Q_ASSERT(!ptr || ptr == stack_result); -+ return; -+#else -+ free(ptr); - # endif -- char *resolved_name = nullptr; -+ }; -+ std::unique_ptr resolved_name {nullptr, resolved_path_deleter}; - # if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) - // On some Android and macOS versions, realpath() will return a path even if - // it does not exist. To work around this, we check existence in advance. - if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute)) - fillMetaData(entry, data, QFileSystemMetaData::ExistsAttribute); - -- if (!data.exists()) { -+ if (!data.exists()) - errno = ENOENT; -- } else { -- resolved_name = stack_result; -- } -- if (resolved_name && realpath(entry.nativeFilePath().constData(), resolved_name) == nullptr) -- resolved_name = nullptr; -+ else -+ resolved_name.reset(realpath(entry.nativeFilePath().constData(), stack_result)); - # else --# if _POSIX_VERSION >= 200801L // ask realpath to allocate memory -- resolved_name = realpath(entry.nativeFilePath().constData(), nullptr); --# else -- resolved_name = stack_result; -- if (realpath(entry.nativeFilePath().constData(), resolved_name) == nullptr) -- resolved_name = nullptr; --# endif -+ resolved_name.reset(realpath(entry.nativeFilePath().constData(), stack_result)); - # endif - if (resolved_name) { - data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; - data.entryFlags |= QFileSystemMetaData::ExistsAttribute; -- QString canonicalPath = QDir::cleanPath(QFile::decodeName(resolved_name)); --# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || _POSIX_VERSION < 200801L -- if (resolved_name != stack_result) -- free(resolved_name); --# endif -+ QString canonicalPath = QDir::cleanPath(QFile::decodeName(resolved_name.get())); - return QFileSystemEntry(canonicalPath); - } else if (errno == ENOENT || errno == ENOTDIR) { // file doesn't exist - data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; --- -2.34.1 - diff --git a/debian/patches/upstream_QProcess-Unix-fallback-on-_POSIX_PIPE_BUF-w-missing-.patch b/debian/patches/upstream_QProcess-Unix-fallback-on-_POSIX_PIPE_BUF-w-missing-.patch deleted file mode 100644 index 7d93f08..0000000 --- a/debian/patches/upstream_QProcess-Unix-fallback-on-_POSIX_PIPE_BUF-w-missing-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 13a11f1c3526112eaf28943185fadc14523fd496 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Mon, 17 Jan 2022 20:43:01 +0100 -Subject: [PATCH] QProcess/Unix: fallback on _POSIX_PIPE_BUF w/ missing - PIPE_BUF - -PIPE_BUF is optional in POSIX, e.g. "where the corresponding value is -equal to or greater than the stated minimum, but where the value can -vary depending on the file to which it is applied." [1] - -GNU/Hurd does not provide PIPE_BUF, so fallback to its minimum -acceptable value, that is _POSIX_PIPE_BUF. - -[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html - -Also, explicitly include in this file, to make sure PIPE_BUF -or _POSIX_PIPE_BUF are available without relying on other headers to -pull . - -Change-Id: Ifae964db81841e1d31fc09e73b45594af9a326d1 -Reviewed-by: Oswald Buddenhagen -Reviewed-by: Thiago Macieira ---- - src/corelib/io/qprocess_unix.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp -index bf19fc2183..91005b0b67 100644 ---- a/src/corelib/io/qprocess_unix.cpp -+++ b/src/corelib/io/qprocess_unix.cpp -@@ -69,6 +69,7 @@ - #endif - - #include -+#include - #include - #include - -@@ -935,7 +936,11 @@ bool QProcessPrivate::startDetached(qint64 *pid) - { - QByteArray encodedWorkingDirectory = QFile::encodeName(workingDirectory); - -+#ifdef PIPE_BUF - static_assert(PIPE_BUF >= sizeof(ChildError)); -+#else -+ static_assert(_POSIX_PIPE_BUF >= sizeof(ChildError)); -+#endif - ChildError childStatus = { 0, {} }; - - AutoPipe startedPipe, pidPipe; --- -2.34.1 -