aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Minor <james.minor@ni.com>2024-04-05 13:54:34 -0500
committerMartin Jansa <martin.jansa@gmail.com>2024-04-18 10:13:01 +0200
commit585d28d0da0f9fa1251a6abb5056317e471eb747 (patch)
tree742bd3e8220899f821fd760a3ab00b349c164966
parent89450b4b7cacccb5811446ec5c2ef6f2333e7027 (diff)
qtbase: Remove host paths from qmake
The buildpaths QA check is producing the following warnings: WARNING: qtbase-5.15.13+git-r0 do_package_qa: QA Issue: File /usr/bin/.debug/qmake in package qtbase-dbg contains reference to TMPDIR [buildpaths] WARNING: qtbase-5.15.13+git-r0 do_package_qa: QA Issue: File /usr/bin/qmake in package qtbase-tools contains reference to TMPDIR [buildpaths] WARNING: qtbase-5.15.13+git-r0 do_package_qa: QA Issue: File /usr/src/debug/qtbase/5.15.13+git/src/corelib/global/qconfig.cpp in package qtbase-src contains reference to TMPDIR [buildpaths] To remove the host path from qmake, set various path strings in configure.pri to something else. Signed-off-by: James Minor <james.minor@ni.com> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtbase/0028-Remove-host-paths-from-qmake.patch43
-rw-r--r--recipes-qt/qt5/qtbase_git.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0028-Remove-host-paths-from-qmake.patch b/recipes-qt/qt5/qtbase/0028-Remove-host-paths-from-qmake.patch
new file mode 100644
index 00000000..bb20a0ef
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0028-Remove-host-paths-from-qmake.patch
@@ -0,0 +1,43 @@
+Remove host paths from qmake
+The host paths are not useful on the target and may cause security concerns.
+
+Instead set them to extprefix or just plain "/" to at least remove host paths.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: James Minor <james.minor@ni.com>
+--- a/configure.pri
++++ b/configure.pri
+@@ -854,7 +854,7 @@ defineTest(qtConfOutput_preparePaths) {
+ export(config.qtbase.features.shared.available)
+
+ hostbindir_absolute_path = $$absolute_path($$config.rel_input.hostbindir, $$config.input.hostprefix)
+- config.input.hostbindir_to_hostprefix = $$relative_path($$config.input.hostprefix, $$hostbindir_absolute_path)
++ config.input.hostbindir_to_hostprefix = $$relative_path($$config.input.extprefix, $$hostbindir_absolute_path)
+ config.input.hostbindir_to_extprefix = $$relative_path($$config.input.extprefix, $$hostbindir_absolute_path)
+
+ !isEmpty(PREFIX_COMPLAINTS) {
+@@ -889,11 +889,11 @@ defineTest(qtConfOutput_preparePaths) {
+ QT_CONFIGURE_STR_OFFSETS =
+ QT_CONFIGURE_STRS =
+
+- addConfStr($$config.input.sysroot)
++ addConfStr("/")
+ addConfStr($$qmake_sysrootify)
+- addConfStr($$config.rel_input.hostbindir)
+- addConfStr($$config.rel_input.hostlibdir)
+- addConfStr($$config.rel_input.hostdatadir)
++ addConfStr($$config.rel_input.bindir)
++ addConfStr($$config.rel_input.libdir)
++ addConfStr($$config.rel_input.datadir)
+ addConfStr($$XSPEC)
+ addConfStr($$[QMAKE_SPEC])
+
+@@ -902,7 +902,7 @@ defineTest(qtConfOutput_preparePaths) {
+ "static const char qt_configure_prefix_path_str [12+512] = \"qt_prfxpath=$$config.input.prefix\";" \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
+ "static const char qt_configure_ext_prefix_path_str [12+512] = \"qt_epfxpath=$$config.input.extprefix\";" \
+- "static const char qt_configure_host_prefix_path_str [12+512] = \"qt_hpfxpath=$$config.input.hostprefix\";" \
++ "static const char qt_configure_host_prefix_path_str [12+512] = \"qt_hpfxpath=$$config.input.extprefix\";" \
+ "$${LITERAL_HASH}endif" \
+ "" \
+ "static const short qt_configure_str_offsets[] = {" \
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 9ba71afe..00d55e34 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -47,6 +47,7 @@ SRC_URI += "\
file://0027-xkb-fix-build-with-libxkbcommon-1.6.0-and-later.patch \
file://0001-CVE-2023-51714-qtbase-5.15.diff \
file://0002-CVE-2023-51714-qtbase-5.15.diff \
+ file://0028-Remove-host-paths-from-qmake.patch \
"
# Disable LTO for now, QT5 patches are being worked upstream, perhaps revisit with