rrdtool: fix useless-rpath QA issue
PATCH v3 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 'LD_RUN_PATH=$(libdir)' when compiling rrdtool.so.
As we use '--disable-rpath' in EXTRA_OECONF, we don't need to the to remove '--rpath=$(libdir)' in Makefile.am.
--- ...1-bindings-Makefile.am-remove-LD_RUN_PATH.patch | 24 ++++++++++++++++++++++ meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-extended/rrdtool/files/0001-bindings-Makefile.am-remove-LD_RUN_PATH.patch
meta-oe/recipes-extended/rrdtool/files/0001-bindings-Makefile.am-remove-LD_RUN_PATH.patch new file +24 -0
@@ -0,0 +1,24 @@ +Upstream-Status: Inappropriate [OE specific] + +Subject: bindings/Makefile.am: remove LD_RUN_PATH + +Signed-off-by: Chen Qi <[email protected]> +--- + bindings/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/bindings/Makefile.am b/bindings/Makefile.am +index 54f5c23..8ea16b7 100644 +--- a/bindings/Makefile.am ++++ b/bindings/Makefile.am +@@ -67,7 +67,6 @@ python: + && env \ + ABS_TOP_SRCDIR=${abs_top_srcdir} \ + ABS_TOP_BUILDDIR=${abs_top_builddir} \ +- LD_RUN_PATH=$(libdir) \ + $(PYTHON) ${abs_srcdir}/$@/setup.py build_ext $(PYTHON_RPATH) \ + && env \ + ABS_TOP_SRCDIR=${abs_top_srcdir} \ +-- +1.9.1 +
meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +1 -2
@@ -11,6 +11,7 @@ PV = "1.5.4" SRC_URI = "\ git://github.com/oetiker/rrdtool-1.x.git;branch=1.5 \ + file://0001-bindings-Makefile.am-remove-LD_RUN_PATH.patch \ " S = "${WORKDIR}/git"
@@ -70,8 +71,6 @@ do_configure() { sed -i -e '/PYTHON_INCLUDES="-I${/c \ 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
Signature · 1 line
1.9.1
PATCH v3 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
@@ -101,11 +101,11 @@ do_configure() { 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
PATCH v3 3/4 rrdtool: add systemd support and fix QA issue
In reply to Chen QiWhen 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
@@ -16,11 +16,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 \
@@ -34,6 +36,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
PATCH v3 4/4 rrdtool: fix do_configure to suite the latest version
In reply to Chen QiFix the do_configure task to suite the latest version so that python modules could be installed into the correct location.
This would fix the following QA issue.
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
....
--- 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
@@ -82,8 +82,8 @@ do_configure() { #remove the dependency of perl-shared:Makefile #or perl-shared/Makefile will be regenerated #if any code touch bindings/Makefile after below perl bindings code - sed -i -e "s:\$(PYTHON) setup.py install:\$(PYTHON) setup.py install \ - --install-lib=${D}${PYTHON_SITEPACKAGES_DIR}:" \ + sed -i -e "s:python/setup.py install:python/setup.py install \ + --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \ -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \ ${B}/bindings/Makefile
Signature · 1 line
1.9.1
Please ignore these patches.
I'll send out patches based on the latest master.
// Qi
Quoted 69 lines · Chen Qi
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 'LD_RUN_PATH=$(libdir)' when compiling rrdtool.so.
As we use '--disable-rpath' in
EXTRA_OECONF, we don't need to the to remove '--rpath=$(libdir)' in Makefile.am.Signed-off-by Chen Qi <[email protected]>--- ...1-bindings-Makefile.am-remove-LD_RUN_PATH.patch | 24 ++++++++++++++++++++++ meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-)create mode 100644
meta-oe/recipes-extended/rrdtool/files/0001-bindings-Makefile.am-remove-LD_RUN_PATH.patchmeta-oe/recipes-extended/rrdtool/files/0001-bindings-Makefile.am-remove-LD_RUN_PATH.patch new file +24
-0@@ -0,0 +1,24 @@ +Upstream-Status: Inappropriate [OE specific] + +Subject: bindings/Makefile.am: remove LD_RUN_PATH + +Signed-off-by: Chen Qi <[email protected]> +--- + bindings/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/bindings/Makefile.am b/bindings/Makefile.am +index 54f5c23..8ea16b7 100644 +--- a/bindings/Makefile.am ++++ b/bindings/Makefile.am +@@ -67,7 +67,6 @@ python: + && env \ + ABS_TOP_SRCDIR=${abs_top_srcdir} \ + ABS_TOP_BUILDDIR=${abs_top_builddir} \ +- LD_RUN_PATH=$(libdir) \ + $(PYTHON) ${abs_srcdir}/$@/setup.py build_ext $(PYTHON_RPATH) \ + && env \ + ABS_TOP_SRCDIR=${abs_top_srcdir} \ +-- +1.9.1 +meta-oe/recipes-extended/rrdtool/rrdtool_1.5.4.bb +1
-2@@ -11,6 +11,7 @@ PV = "1.5.4" SRC_URI = "\ git://github.com/oetiker/rrdtool-1.x.git;branch=1.5 \ + file://0001-bindings-Makefile.am-remove-LD_RUN_PATH.patch \ " S = "${WORKDIR}/git"@@ -70,8 +71,6 @@ do_configure() { sed -i -e '/PYTHON_INCLUDES="-I${/c \ 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