Skip to contentSkip to conversation

Fixed installation of qtbase-files.

PATCH In review Simon Aittamaa 2 participants 2 messages Jan 29, 2016 – Feb 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed installation of qtbase-files.

This patch fixes three problems
1) Running on a case-sensitive system would result in an error due to invalid casing of pattern to install.
2) Using install on symlinks would cause multiple copies of the same file to be installed on the target-system, since install doesn't preserve symlinks. This wastes a lot of space and it causes ldconfig to complain about non-symlinked files.
3) Leakage of user-ids, i.e. cp -a would preserve the uid/gid of whoever built the files, which is usually not what you want.

---
 recipes-qt/qt5/qtbase_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-qt/qt5/qtbase_git.bb +2 -2
index 3ef5923..62c0ab5 100644
@@ -229,10 +229,10 @@ do_install_append() {
     # install fonts manually if they are missing
     if [ ! -d ${D}/${OE_QMAKE_PATH_QT_FONTS} ]; then
         mkdir -p ${D}/${OE_QMAKE_PATH_QT_FONTS}
-        cp -a ${S}/lib/fonts/* ${D}/${OE_QMAKE_PATH_QT_FONTS}
+        cp -d ${S}/lib/fonts/* ${D}/${OE_QMAKE_PATH_QT_FONTS}
         chown -R root:root ${D}/${OE_QMAKE_PATH_QT_FONTS}
     fi
-    install -m 0644 ${B}/lib/libqt* ${D}${libdir}
+    cp -d ${B}/lib/libQt* ${D}${libdir}
     # Remove example.pro file as it is useless
     rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro
 
Signature · 1 line
2.7.0
#1 lore raw
Quoted 9 lines · Simon Aittamaa

This patch fixes three problems
1) Running on a case-sensitive system would result in an error due to invalid casing of pattern to install.
2) Using install on symlinks would cause multiple copies of the same file to be installed on the target-system, since install doesn't preserve symlinks. This wastes a lot of space and it causes ldconfig to complain about non-symlinked files.
3) Leakage of user-ids, i.e. cp -a would preserve the uid/gid of whoever built the files, which is usually not what you want.

Does anyone have test-case which shows why this copy is needed?

I wanted to remove .la files (in qmake5_base_do_install) and this copies them back to ${D} which is annoying.

So I've removed this cp line and checked what gets missing and it turns out that nothing important is missing and even more importantly the fixed *prl files are overwritten with their original version.

So unless someone shouts good reason to keep this I'll just drop it.

OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase $ diff -rq 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0*/image Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Bootstrap.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5BootstrapDBus.a
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5BootstrapDBus.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5BootstrapDBus.prl
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Concurrent.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Core.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5DBus.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Gui.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Network.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5OpenGL.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5OpenGLExtensions.la
Files 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib/libQt5OpenGLExtensions.prl and 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/image/usr/lib/libQt5OpenGLExtensions.prl differ
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5PlatformSupport.la
Files 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib/libQt5PlatformSupport.prl and 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/image/usr/lib/libQt5PlatformSupport.prl differ
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5PrintSupport.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Sql.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Test.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Widgets.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5XcbQpa.la
Only in 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib: libQt5Xml.la
OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase $ diff -uNr 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib/libQt5OpenGLExtensions.prl 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/image/usr/lib/libQt5OpenGLExtensions.prl

image/usr/lib/libQt5OpenGLExtensions.prl 2016-02-17 22:38:56.637811683 +0100 renamed from image/usr/lib/libQt5OpenGLExtensions.prl 2016-02-17 22:34:16.397812156 +0100 +1 -1
@@ -3,4 +3,4 @@
 QMAKE_PRL_TARGET = libQt5OpenGLExtensions.a
 QMAKE_PRL_CONFIG = silent lex yacc depend_includepath testcase_targets import_plugins import_qpa_plugin qt warn_on release link_prl incremental cross_compile qpa no_mocdepend release qt_no_framework linux unix posix \$(OE_QMAKE_COMPILER) gcc cross_compile compile_examples qpa largefile use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 pcre prefix_build force_independent force_bootstrap create_prl link_prl prepare_docs qt_docs_targets no_private_qt_headers_warning QTDIR_build exceptions_off testcase_exceptions qt_example_installs warning_clean c++11 static opengl relative_qt_rpath git_build qmake_cache target_qt c++11 strict_c++ c++14 c++1z hide_symbols bsymbolic_functions qt_install_headers need_fwd_pri qt_install_module create_cmake compiler_supports_fpmath create_pc create_libtool have_target staticlib thread opengl moc resources
 QMAKE_PRL_VERSION = 5.6.0
-QMAKE_PRL_LIBS = -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/build/lib -lQt5Gui -lQt5Core -lpthread -lGL
+QMAKE_PRL_LIBS =  -lQt5Gui -lQt5Core -lpthread -lGL

OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase $ diff -uNr 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0.orig/image/usr/lib/libQt5PlatformSupport.prl 5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/image/usr/lib/libQt5PlatformSupport.prl

image/usr/lib/libQt5PlatformSupport.prl 2016-02-17 22:38:56.969811683 +0100 renamed from image/usr/lib/libQt5PlatformSupport.prl 2016-02-17 22:34:16.438812156 +0100 +1 -1
@@ -3,4 +3,4 @@
 QMAKE_PRL_TARGET = libQt5PlatformSupport.a
 QMAKE_PRL_CONFIG = silent lex yacc depend_includepath testcase_targets import_plugins import_qpa_plugin qt warn_on release link_prl incremental cross_compile qpa no_mocdepend release qt_no_framework linux unix posix \$(OE_QMAKE_COMPILER) gcc cross_compile compile_examples qpa largefile use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 pcre prefix_build force_independent force_bootstrap create_prl link_prl prepare_docs qt_docs_targets no_private_qt_headers_warning QTDIR_build exceptions_off testcase_exceptions qt_example_installs warning_clean c++11 static internal_module egl opentype qpa/genericunixfontdatabase relative_qt_rpath git_build qmake_cache target_qt c++11 strict_c++ c++14 c++1z hide_symbols bsymbolic_functions qt_install_headers need_fwd_pri qt_install_module compiler_supports_fpmath create_libtool have_target staticlib qpa/basicunixfontdatabase thread opengl dbusadaptors dbusinterfaces moc resources
 QMAKE_PRL_VERSION = 5.6.0
-QMAKE_PRL_LIBS = -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.5.99+5.6.0-rc+gitAUTOINC+ac8a3b948d-r0/build/lib -lQt5Gui -lQt5DBus -lQt5Core -lpthread -lgthread-2.0 -pthread -lglib-2.0 -lqtfreetype -lz -lpng -lXrender -lXext -lX11 -lm -ludev -lEGL -lGL
+QMAKE_PRL_LIBS =  -lQt5Gui -lQt5DBus -lQt5Core -lpthread -lgthread-2.0 -pthread -lglib-2.0 -lqtfreetype -lz -lpng -lXrender -lXext -lX11 -lm -ludev -lEGL -lGL
Quoted 31 lines
---
 recipes-qt/qt5/qtbase_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-qt/qt5/qtbase_git.bb +2 -2
index 3ef5923..62c0ab5 100644
@@ -229,10 +229,10 @@ do_install_append() {
     # install fonts manually if they are missing
     if [ ! -d ${D}/${OE_QMAKE_PATH_QT_FONTS} ]; then
         mkdir -p ${D}/${OE_QMAKE_PATH_QT_FONTS}
-        cp -a ${S}/lib/fonts/* ${D}/${OE_QMAKE_PATH_QT_FONTS}
+        cp -d ${S}/lib/fonts/* ${D}/${OE_QMAKE_PATH_QT_FONTS}
         chown -R root:root ${D}/${OE_QMAKE_PATH_QT_FONTS}
     fi
-    install -m 0644 ${B}/lib/libqt* ${D}${libdir}
+    cp -d ${B}/lib/libQt* ${D}${libdir}
     # Remove example.pro file as it is useless
     rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro
 
Signature · 7 lines
2.7.0

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]