Skip to contentSkip to conversation

rrdtool: fix useless-rpath QA issue

PATCH Superseded Chen Qi 2 participants 6 messages Oct 13, 2015 – Oct 21, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/4 rrdtool: fix useless-rpath QA issue

When building rrdtool, we would meet the following error.

ERROR: QA Issue: rrdtool-python: work/core2-64-poky-linux/rrdtool /1.5.4-r0/packages-split/rrdtool-python/usr/lib/python2.7/site-packages /rrdtool.so contains probably-redundant RPATH /usr/lib [useless-rpaths]

Fix this issue by removing the redundante RPATH section from rrdtool.so.

As we use '--disable-rpath' in EXTRA_OECONF, we don't need to the `sed' line in do_configure.

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +5 -1
index 91a30cf..f2ded65 100644
@@ -71,7 +71,6 @@ do_configure() {
     PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
         ${S}/m4/acinclude.m4
     #remove the hardcoded $(libdir) rpath
-    sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
 
     autotools_do_configure
 
@@ -100,6 +99,11 @@ do_configure() {
         ${B}/examples/*.pl
 }
 
+do_compile_append() {
+    # Remove useless rpath
+    find ${B}/bindings/python/build -name "rrdtool.so" | xargs chrpath -d
+}
+
 PACKAGES =+ "${PN}-perl ${PN}-python"
 
 FILES_${PN}-doc += "${datadir}/examples"
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/4 rrdtool: fix file locations

When we build rrdtool, we would meet the following QA issue.

QA Issue: /usr/share/rrdtool/examples/stripes.py_rrdtool-perl contained in package rrdtool-perl requires /usr/bin/python, but no providers found in its RDEPENDS [file-rdeps]

The problem is that /usr/share/rrdtool/examples not only contain perl examples, but also contains python examples.

Besides, ${datadir}/examples don't exist, fix it to be ${datadir}/rrdtool/examples.

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +2 -2
index f2ded65..07d70c7 100644
@@ -106,11 +106,11 @@ do_compile_append() {
 
 PACKAGES =+ "${PN}-perl ${PN}-python"
 
-FILES_${PN}-doc += "${datadir}/examples"
+FILES_${PN}-doc += "${datadir}/rrdtool/examples"
 
 DESCRIPTION_${PN}-perl = \
 "The ${PN}-perl package includes RRDtool bindings for perl."
-FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm ${datadir}/rrdtool/examples \
+FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \
     ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*"
 RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \
     perl-module-io-file perl-module-ipc-open2 perl-module-io-socket"
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 3/4 rrdtool: add systemd support and fix QA issue

In reply to Chen Qi

When building rrdtool in a building directory where systemd is configured to be the init system, we would meet the following error.

ERROR: QA Issue: rrdtool: Files/directories were installed but not shipped in any package:
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/rrdcached.socket /lib/systemd/system/rrdcached.service

Fix this problem by adding systemd support to the rrdtool recipe.

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +6 -2
index 07d70c7..6331393 100644
@@ -15,11 +15,13 @@ SRC_URI = "\
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep gettext pythonnative perlnative python-dir cpan-base
+inherit autotools-brokensep gettext pythonnative perlnative python-dir cpan-base systemd
+
+SYSTEMD_SERVICE_${PN} = "rrdcached.socket rrdcached.service"
 
 EXTRA_AUTORECONF = "-I m4"
 
-PACKAGECONFIG ??= "python perl"
+PACKAGECONFIG ??= "python perl ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
 PACKAGECONFIG[python] = "--enable-python=yes \
 am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
@@ -33,6 +35,8 @@ ac_cv_path_PERL_CC='${CC}',  \
 
 PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
 
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
+
 EXTRA_OECONF = " \
     --enable-shared \
     --disable-libwrap \
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 4/4 rrdtool: fix multilib problem

In reply to Chen Qi

When building rrdtool with multilib enabled, we would meet the following error.

ERROR: QA Issue: rrdtool: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages/rrdtool.so
....

Fix this problem by using nonarch_libdir instead of libdir.

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +2 -2
index 6331393..cc87d1a 100644
@@ -121,8 +121,8 @@ RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-
 
 DESCRIPTION_${PN}-python = \
 "The ${PN}-python package includes RRDtool bindings for python."
-FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_${PN}-python = "${nonarch_libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
 RDEPENDS_${PN}-python = "python"
 
 FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \
-    ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
+    ${nonarch_libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"
Signature · 1 line
1.9.1
#4 lore raw
In reply to Chen Qi
Quoted 1 line · Chen Qi

When building rrdtool, we would meet the following error.

Now it fails for qemuarm and qemux86, not sure which change is causing that:

http://errors.yoctoproject.org/Errors/Details/20597/
http://errors.yoctoproject.org/Errors/Details/20601/

Quoted 42 lines

ERROR: QA Issue: rrdtool-python: work/core2-64-poky-linux/rrdtool /1.5.4-r0/packages-split/rrdtool-python/usr/lib/python2.7/site-packages /rrdtool.so contains probably-redundant RPATH /usr/lib [useless-rpaths]

Fix this issue by removing the redundante RPATH section from rrdtool.so.

As we use '--disable-rpath' in EXTRA_OECONF, we don't need to the `sed' line in do_configure.

---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +5 -1
index 91a30cf..f2ded65 100644
@@ -71,7 +71,6 @@ do_configure() {
     PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
         ${S}/m4/acinclude.m4
     #remove the hardcoded $(libdir) rpath
-    sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
 
     autotools_do_configure
 
@@ -100,6 +99,11 @@ do_configure() {
         ${B}/examples/*.pl
 }
 
+do_compile_append() {
+    # Remove useless rpath
+    find ${B}/bindings/python/build -name "rrdtool.so" | xargs chrpath -d
+}
+
 PACKAGES =+ "${PN}-perl ${PN}-python"
 
 FILES_${PN}-doc += "${datadir}/examples"
Signature · 1 line
1.9.1
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#5 lore raw
Quoted 8 lines · Martin Jansa
Quoted 1 line · Chen Qi

When building rrdtool, we would meet the following error.

Now it fails for qemuarm and qemux86, not sure which change is causing that:

http://errors.yoctoproject.org/Errors/Details/20597/
http://errors.yoctoproject.org/Errors/Details/20601/

I'm looking into this problem today, although I currently have some problem reproducing it. I'll look at the logs and try to find out something.

Regards,
Chen Qi

Quoted 41 lines
Quoted 41 lines

ERROR: QA Issue: rrdtool-python: work/core2-64-poky-linux/rrdtool /1.5.4-r0/packages-split/rrdtool-python/usr/lib/python2.7/site-packages /rrdtool.so contains probably-redundant RPATH /usr/lib [useless-rpaths]

Fix this issue by removing the redundante RPATH section from rrdtool.so.

As we use '--disable-rpath' in EXTRA_OECONF, we don't need to the `sed' line in do_configure.

---
  meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +5 -1
index 91a30cf..f2ded65 100644
@@ -71,7 +71,6 @@ do_configure() {
      PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
          ${S}/m4/acinclude.m4
      #remove the hardcoded $(libdir) rpath
-    sed -i -e 's|--rpath=$(libdir)||g' ${S}/bindings/Makefile.am
 
      autotools_do_configure
 
@@ -100,6 +99,11 @@ do_configure() {
          ${B}/examples/*.pl
  }
 
+do_compile_append() {
+    # Remove useless rpath
+    find ${B}/bindings/python/build -name "rrdtool.so" | xargs chrpath -d
+}
+
  PACKAGES =+ "${PN}-perl ${PN}-python"
 
  FILES_${PN}-doc += "${datadir}/examples"
Signature · 1 line
1.9.1