[neon/qt6/qt6-base/Neon/unstable] debian: sync patches to salsa

Carlos De Maine null at kde.org
Thu Dec 7 05:08:30 GMT 2023


Git commit 4c0cf47fece77a06faf0f79d87545c349f2a6700 by Carlos De Maine.
Committed on 07/12/2023 at 06:08.
Pushed by carlosdem into branch 'Neon/unstable'.

sync patches to salsa

A  +82   -0    debian/patches/be_verbose_on_plugin_inclusion.patch
A  +39   -0    debian/patches/enable_skip_plugins.patch
D  +0    -28   debian/patches/force_shared_libzstd.patch
M  +6    -18   debian/patches/series
M  +8    -10   debian/rules

https://invent.kde.org/neon/qt6/qt6-base/-/commit/4c0cf47fece77a06faf0f79d87545c349f2a6700

diff --git a/debian/patches/be_verbose_on_plugin_inclusion.patch b/debian/patches/be_verbose_on_plugin_inclusion.patch
new file mode 100644
index 0000000..f618366
--- /dev/null
+++ b/debian/patches/be_verbose_on_plugin_inclusion.patch
@@ -0,0 +1,82 @@
+From c8e2cdda704dbe2c381091fe687653cdf2b191ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer at gmail.com>
+Date: Wed, 1 Nov 2023 21:41:59 -0300
+Subject: [PATCH] Be verbose on plugin inclusion, easy patch point for distros
+
+TL;DR: This creates two changes:
+
+1. Makes the plugin inclusion status more visible for builders for both Qt
+   itself and applications.
+2. Allows a simple patch-point for distros to change the default
+   (perhaps not ideal, but good enough).
+3. Does not changes the current behavior.
+
+As discussed both in the mailing list and privately with
+Alexandru Croitor and Joerg Bornemann this makes a lot os sense for Qt
+on static builds and when trying to find where the plugins are so they
+can be easily packaged up in order to distribute a build with all the
+dependencies on it.
+
+But at the same time it makes no sense for distributions building the
+libraries in dynamic mode as it forces unnecesary build time
+dependencies for for both Qt and applications like QML modules or even
+PostgreSQL! [0].
+
+[0] <https://sources.debian.org/src/martchus-qtutilities/6.10.0-1/cmake/modules/QtConfig.cmake/?hl=35#L35>
+
+Other approaches have been considered like not shipping specific CMake
+files, but this depends on the packager finding the right ones at the
+right time, and does not allows end users to change the behavior if they
+happen to need it.
+
+Change-Id: Id32fbc0cf0f289edd4426fb703cf1195288aacb4
+Gerrit: https://codereview.qt-project.org/c/qt/qtbase/+/515440
+---
+ cmake/QtPlugins.cmake.in         | 9 +++++++++
+ cmake/QtPostProcessHelpers.cmake | 9 +++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in
+index 405d5f37b9..c951eaae42 100644
+--- a/cmake/QtPlugins.cmake.in
++++ b/cmake/QtPlugins.cmake.in
+@@ -1,6 +1,15 @@
+ include_guard(DIRECTORY)
+ @QT_MODULE_PLUGIN_INCLUDES@
+
++# Distributions should probably change this default.
++if(NOT DEFINED QT_SKIP_AUTO_PLUGIN_INCLUSION)
++    set(QT_SKIP_AUTO_PLUGIN_INCLUSION OFF)
++endif()
++
++if(QT_REPO_MODULE_VERSION)
++    message(STATUS "Skip auto plugin inclusion is set to ${QT_SKIP_AUTO_PLUGIN_INCLUSION}")
++endif()
++
+ if(NOT QT_NO_CREATE_TARGETS AND NOT QT_SKIP_AUTO_PLUGIN_INCLUSION)
+     __qt_internal_include_plugin_packages(@QT_MODULE@)
+ endif()
+diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
+index 83bcabe49b..82a88565a6 100644
+--- a/cmake/QtPostProcessHelpers.cmake
++++ b/cmake/QtPostProcessHelpers.cmake
+@@ -446,6 +446,15 @@ function(qt_internal_create_plugins_auto_inclusion_files)
+ # TODO: Find a better way to deal with this, perhaps by using find_package() instead of include
+ # for the Qml PluginConfig.cmake files.
+
++# Distributions should probably change this default.
++if(NOT DEFINED QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
++    set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION OFF)
++endif()
++
++if(QT_REPO_MODULE_VERSION)
++    message(STATUS \"Skip auto QML plugin inclusion is set to \${QT_SKIP_AUTO_QML_PLUGIN_INCLUSION}\")
++endif()
++
+ file(GLOB __qt_qml_plugins_config_file_list \"\${CMAKE_CURRENT_LIST_DIR}/QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake\")
+ if (__qt_qml_plugins_config_file_list AND NOT QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
+     # First round of inclusions ensure all qml plugin targets are brought into scope.
+--
+2.42.0
+
diff --git a/debian/patches/enable_skip_plugins.patch b/debian/patches/enable_skip_plugins.patch
new file mode 100644
index 0000000..cf1a9da
--- /dev/null
+++ b/debian/patches/enable_skip_plugins.patch
@@ -0,0 +1,39 @@
+Description: Enable skipping plugins search at build time.
+ This patch sets
+ QT_SKIP_AUTO_PLUGIN_INCLUSION and QT_SKIP_AUTO_QML_PLUGIN_INCLUSION to ON
+ by default, thus avoiding unnecesary build dependencies on plugins.
+ .
+ The variables can still be set to OFF by the user at build time, allowing
+ them to find the packages if necessary. But if you need so for a Debian
+ package please reach the Qt maintainers first. We want to know why you
+ need to do so. Thanks in advance!
+Author: Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>
+Forwarded: not-needed
+
+---
+ cmake/QtPlugins.cmake.in         |    2 +-
+ cmake/QtPostProcessHelpers.cmake |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/cmake/QtPlugins.cmake.in
++++ b/cmake/QtPlugins.cmake.in
+@@ -3,7 +3,7 @@ include_guard(DIRECTORY)
+
+ # Distributions should probably change this default.
+ if(NOT DEFINED QT_SKIP_AUTO_PLUGIN_INCLUSION)
+-    set(QT_SKIP_AUTO_PLUGIN_INCLUSION OFF)
++    set(QT_SKIP_AUTO_PLUGIN_INCLUSION ON)
+ endif()
+
+ if(QT_REPO_MODULE_VERSION)
+--- a/cmake/QtPostProcessHelpers.cmake
++++ b/cmake/QtPostProcessHelpers.cmake
+@@ -448,7 +448,7 @@ function(qt_internal_create_plugins_auto
+
+ # Distributions should probably change this default.
+ if(NOT DEFINED QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
+-    set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION OFF)
++    set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION ON)
+ endif()
+
+ if(QT_REPO_MODULE_VERSION)
diff --git a/debian/patches/force_shared_libzstd.patch b/debian/patches/force_shared_libzstd.patch
deleted file mode 100644
index 09a453c..0000000
--- a/debian/patches/force_shared_libzstd.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: force the usage of the shared libzstd library.
- The library provides both versions, and the original code prefers the static
- version over the shared, while on Debian it should always use the shared
- version.
-Author: Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>
-Bug: https://bugreports.qt.io/browse/QTBUG-110978
-Forwarded: not-needed
-
----
- cmake/FindWrapZSTD.cmake |    7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
---- a/cmake/FindWrapZSTD.cmake
-+++ b/cmake/FindWrapZSTD.cmake
-@@ -28,11 +28,8 @@
- if(TARGET zstd::libzstd_static OR TARGET zstd::libzstd_shared)
-     find_package_handle_standard_args(WrapZSTD
-                                       REQUIRED_VARS zstd_VERSION VERSION_VAR zstd_VERSION)
--    if(TARGET zstd::libzstd_shared)
--        set(zstdtargetsuffix "_shared")
--    else()
--        set(zstdtargetsuffix "_static")
--    endif()
-+    set(zstdtargetsuffix "_shared")
-+
-     if(NOT TARGET WrapZSTD::WrapZSTD)
-         add_library(WrapZSTD::WrapZSTD INTERFACE IMPORTED)
-         set_target_properties(WrapZSTD::WrapZSTD PROPERTIES
diff --git a/debian/patches/series b/debian/patches/series
index ac8f47b..f7fc281 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,33 +1,21 @@
-# fixed in 6.6.1
+# NEON backported patches as requested - fixed in 6.6.1??
 wayland_ally
 qtdbus_metatypename
 
-# fixed in 6.5.2
-#cve-2023-34410-57ba626.diff
-#cve-2023-34410-ada2c57.diff
-
-# fixed in 6.5.1
-#cve-2023-32762.diff
-#cve-2023-32763.diff
-#cve-2023-33285.diff
-#upstream_Add-HPPA-detection.patch
-#upstream_Add-M68k-detection.patch
-#upstream_Add-enable-Alpha-detection.patch
-
-# fixed in 6.4.3
-#cve-2023-24607.patch
-
 # Needs to be fixed upstream.
 Add-SH-detection.patch
 
+# Pushed to gerrit
+be_verbose_on_plugin_inclusion.patch
+
 # Debian specific
 remove_privacy_breaches.diff
 build_path_embedded_qtbuildinternalsextra_cmake.patch
 cross.patch
-force_shared_libzstd.patch
-#no_htmlinfo_example.patch #### no longer required
 remove_rpath_from_examples.patch
 forkfd_grow_stack_upwards_on_hppa.patch
+enable_skip_plugins.patch
+
 
 # Don't use yield on CPUs that might not support it
 armel-noyield.patch
diff --git a/debian/rules b/debian/rules
index b09ee63..29fafcf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
 include /usr/share/dpkg/architecture.mk
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
-
+sslpkgname := $(shell dpkg-query --show '--showformat=$${Depends}' libssl-dev | cut -d ' ' -f1)
 # need gcc 12.1 for mold to be able to process --gdb-index
 export CC=gcc-12
 export CXX=g++-12
@@ -35,11 +35,12 @@ endif
 %:
 	dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 
+##		-DFEATURE_lttng=ON \
 ## segfaults at
 ## FAILED: src/gui/qtgui_tracepoints_p.
 ## tracegen: fatal: Cannot deduce CTF type for 'QImage::Format format
 ##
-#		-DFEATURE_lttng=ON \  
+
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
@@ -95,14 +96,11 @@ override_dh_auto_configure:
 		-DINSTALL_SYSCONFDIR=/etc/xdg \
 		-DINSTALL_TRANSLATIONDIR=share/qt6/translations \
 		-DQT_BUILD_EXAMPLES=ON \
+		-DQT_INSTALL_EXAMPLES_SOURCES=ON \
 		-DQT_UNITY_BUILD=ON \
 		$(extra_cmake_args)
 
 execute_after_dh_auto_install-arch:
-#	# Policy § 10.4. Remove this if https://bugs.debian.org/904409 gets fixed.
-#	sed -i 's,bin/env perl,bin/perl,' debian/tmp/usr/lib/qt6/libexec/*.pl \
-#		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/mkspecs/features/data/unix/findclasslist.pl
-
 	# Reproducible builds: remove build paths from .prl files
 	sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libQt6*.prl
 
@@ -118,8 +116,8 @@ execute_after_dh_auto_install-arch:
 		< debian/qmake-cross-wrapper.in > debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6
 	chmod +x debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6
 
-	# Fix cmake config file's installed into /usr/lib/qt6/libexec
-	mv -v debian/tmp/usr/lib/qt6/libexec/*.cmake debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6/
+#	# Fix cmake config file's installed into /usr/lib/qt6/libexec
+#	mv -v debian/tmp/usr/lib/qt6/libexec/*.cmake debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6/
 
 	# Fix Qt6::qmake IMPORTED_LOCATION, see https://bugs.debian.org/1030980
 	sed -i 's,lib/qt6/bin/qmake,bin/$(DEB_HOST_GNU_TYPE)-qmake6,' \
@@ -137,5 +135,5 @@ override_dh_auto_install-indep:
 #override_dh_makeshlibs:
 #	dh_makeshlibs -XlibQt6EglFSDeviceIntegration -XlibQt6EglFsKmsGbmSupport -XlibQt6EglFsKmsSupport -XlibQt6XcbQpa
 
-#execute_after_dh_shlibdeps-arch:
-#	echo libssl:Depends=$(sslpkgname) >> debian/libqt6network6.substvars
+execute_after_dh_shlibdeps-arch:
+	echo libssl:Depends=$(sslpkgname) >> debian/libqt6network6.substvars


More information about the Neon-commits mailing list