fix WARNING: QA Issue on kmod/udev/nfs-utils (unsafe references [/ references to /usr/lib])
cover fix WARNING: QA Issue on kmod/udev/nfs-utils (unsafe references [/ references to /usr/lib])
The following changes since commit f3541226b8b1187e79dec0f6f9f3c58cedf9ac9b:
bitbake: hob: do not display the "Package list may be incomplete!" dialog (2013-11-01 17:59:31 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-qa-issue
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-qa-issue
Hongxu Jia (4):
insane.bbclass: support to skip unsafe references in binaries qa
check.
kmod: fix QA issue
udev: fix QA issue
nfs-utils: fix QA issue
meta/classes/insane.bbclass | 4 ++++ meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb | 2 ++ meta/recipes-core/udev/udev.inc | 3 +-- meta/recipes-kernel/kmod/kmod_git.bb | 1 + 4 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/4 insane.bbclass: support to skip unsafe references in binaries qa check.
Add a variable to support skipping the unsafe references in binaries qa check.
[YOCTO #5142]
--- meta/classes/insane.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes/insane.bbclass +4 -0
@@ -318,6 +318,10 @@ def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages) if elf: import subprocess as sub pn = d.getVar('PN', True) + # Skip for any packages with unsafe-ref-bin in INSANE_SKIP + if 'unsafe-ref-bin' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split(): + bb.note("Package %s skipping unsafe references in binaries QA test" % (pn)) + return exec_prefix = d.getVar('exec_prefix', True) sysroot_path = d.getVar('STAGING_DIR_TARGET', True)
Signature · 1 line
1.8.1.2
PATCH 2/4 kmod: fix QA issue
In reply to Hongxu JiaThe commit 7163ebd92a799b8f000b2b6f303b20de468b5f90 Revert "kmod: Use base_libdir for installing libkmod"
It caused a QA Issue WARNING:
...
WARNING: QA Issue: kmod: /bin/kmod, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libkmod.so.2 => /usr/lib64/libkmod.so.2 (0x00000000dead1000)
...
But we did this reasonably, we should skip the qa check explicitly.
[YOCTO #5142]
--- meta/recipes-kernel/kmod/kmod_git.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-kernel/kmod/kmod_git.bb +1 -0
@@ -15,6 +15,7 @@ RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod bindir = "${base_bindir}" sbindir = "${base_sbindir}" # libdir = "${base_libdir}" +INSANE_SKIP_${PN} = "unsafe-ref-bin" do_install_append () { install -dm755 ${D}${base_bindir}
Signature · 1 line
1.8.1.2
PATCH 3/4 udev: fix QA issue
In reply to Hongxu Jia...
WARNING: QA Issue: udev: /lib/libgudev-1.0.so.0.1.1, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xdead3000)
WARNING: QA Issue: udev: /lib/libgudev-1.0.so.0.1.1, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libffi.so.6 => /usr/lib/libffi.so.6 (0xdead4000)
WARNING: QA Issue: udev: /lib/libgudev-1.0.so.0.1.1, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xdead5000)
WARNING: QA Issue: udev: /lib/udev/udevd, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libkmod.so.2 => /usr/lib/libkmod.so.2 (0xdead3000)
...
Install libgudev-1.0.so.0.1.1 in ${libdir} rather than ${base_libdir} fixed this issue.
[YOCTO #5142]
--- meta/recipes-core/udev/udev.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-core/udev/udev.inc +1 -2
@@ -32,14 +32,13 @@ inherit autotools pkgconfig update-rc.d libexecdir = "${base_libdir}" EXTRA_OECONF = "--disable-introspection \ - --with-rootlibdir=${base_libdir} \ + --with-rootlibdir=${libdir} \ --with-pci-ids-path=${datadir}/pci.ids \ ac_cv_file__usr_share_pci_ids=no \ ac_cv_file__usr_share_hwdata_pci_ids=no \ ac_cv_file__usr_share_misc_pci_ids=yes \ --sbindir=${base_sbindir} \ --libexecdir=${nonarch_base_libdir} \ - --with-rootlibdir=${base_libdir} \ --with-rootprefix= \ --without-systemdsystemunitdir \ "
Signature · 1 line
1.8.1.2
Re: [PATCH 3/4] udev: fix QA issue
Quoted 4 lines · Hongxu Jia
...
WARNING: QA Issue: udev:/lib/libgudev-1.0.so.0.1.1, installed in thebase_prefix, requires a shared library underexec_prefix(/usr): libgobject-2.0.so.0 =>/usr/lib/libgobject-2.0.so.0(0xdead3000)
WARNING: QA Issue: udev:/lib/libgudev-1.0.so.0.1.1, installed in thebase_prefix, requires a shared library underexec_prefix(/usr): libffi.so.6 =>/usr/lib/libffi.so.6(0xdead4000)
WARNING: QA Issue: udev:/lib/libgudev-1.0.so.0.1.1, installed in thebase_prefix, requires a shared library underexec_prefix(/usr): libglib-2.0.so.0 =>/usr/lib/libglib-2.0.so.0(0xdead5000)
This patch fixed the above three warning, not include the fourth. So please drop this, v2 will send.
//Hongxu
Quoted 33 lines
WARNING: QA Issue: udev:
/lib/udev/udevd, installed in thebase_prefix, requires a shared library underexec_prefix(/usr): libkmod.so.2 =>/usr/lib/libkmod.so.2(0xdead3000)
...Install libgudev-1.0.so.0.1.1 in ${libdir} rather than ${base_libdir} fixed this issue.
[YOCTO #5142]
Signed-off-by Hongxu Jia <[email protected]>--- meta/recipes-core/udev/udev.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)meta/recipes-core/udev/udev.inc +1
-2@@ -32,14 +32,13 @@ inherit autotools pkgconfig update-rc.d libexecdir = "${base_libdir}" EXTRA_OECONF = "--disable-introspection \ - --with-rootlibdir=${base_libdir} \ + --with-rootlibdir=${libdir} \ --with-pci-ids-path=${datadir}/pci.ids \ ac_cv_file__usr_share_pci_ids=no \ ac_cv_file__usr_share_hwdata_pci_ids=no \ ac_cv_file__usr_share_misc_pci_ids=yes \ --sbindir=${base_sbindir} \ --libexecdir=${nonarch_base_libdir} \ - --with-rootlibdir=${base_libdir} \ --with-rootprefix= \ --without-systemdsystemunitdir \ "
PATCH 4/4 nfs-utils: fix QA issue
In reply to Hongxu Jia...
WARNING: QA Issue: nfs-utils: Found a reference to /usr/ in /home/jiahongxu/yocto/build-20131025-gcc5/bitbake_build/tmp/work/x86_64-wrs-linux/nfs-utils/1.2.8-r1/packages-split/nfs-utils/sbin/osd_login
WARNING: QA Issue: Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix
...
Move osd_login from ${base_sbindir} to ${sbindir} fixed this issue
[YOCTO #5142]
--- meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb +2 -0
@@ -89,4 +89,6 @@ do_install_append () { rm -f ${D}${sbindir}/rpcdebug rm -f ${D}${sbindir}/rpcgen rm -f ${D}${sbindir}/locktest + + mv ${D}${base_sbindir}/osd_login ${D}${sbindir}/osd_login }
Signature · 1 line
1.8.1.2
Re: [PATCH 4/4] nfs-utils: fix QA issue
Quoted 19 lines · Hongxu Jia
...
WARNING: QA Issue: nfs-utils: Found a reference to/usr/in/home/jiahongxu/yocto/build-20131025-gcc5/bitbake_build/tmp/work/x86_64-wrs-linux/nfs-utils/1.2.8-r1/packages-split/nfs-utils/sbin/osd_login
WARNING: QA Issue: Shell scripts inbase_bindirandbase_sbindirshould not reference anything inexec_prefix
...Move
osd_loginfrom ${base_sbindir} to ${sbindir} fixed this issue[YOCTO #5142]
Signed-off-by Hongxu Jia <[email protected]>--- meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb +0
-0
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb do_install_append () { · line 93
Quoted 5 lines
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb +2
-0@@ -89,4 +89,6 @@ do_install_append () { rm -f ${D}${sbindir}/rpcdebug rm -f ${D}${sbindir}/rpcgen rm -f ${D}${sbindir}/locktest + + mv ${D}${base_sbindir}/osd_login ${D}${sbindir}/osd_login
There will be error while rerun 'bitbake nfs-utils -cinstall -f'.
It's better to modify osd_login's Makefile to let its be installed in ${sbindir} rather than the hardcoded moving in bb,
I have updated git://git.pokylinux.org/poky-contrib hongxu/fix-qa-issue
meta/recipes-connectivity/nfs-utils/nfs-utils/osd_login-let-sbindir-can-be-overridden-at-config-ti.patch new file +24 -0
@@ -0,0 +1,24 @@ +osd_login: let sbindir can be overridden at config time + +Signed-off-by: Hongxu Jia <[email protected]> +Upstream-Status: Pending +--- + utils/osd_login/Makefile.am | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/utils/osd_login/Makefile.am b/utils/osd_login/Makefile.am +--- a/utils/osd_login/Makefile.am ++++ b/utils/osd_login/Makefile.am +@@ -1,9 +1,5 @@ + ## Process this file with automake to produce Makefile.in + +-# These binaries go in /sbin (not /usr/sbin), and that cannot be +-# overridden at config time. +-sbindir = /sbin +- + sbin_SCRIPTS = osd_login + + MAINTAINERCLEANFILES = Makefile.in +-- +1.8.1.2 +
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb +0 -0
@@ -15,6 +15,7 @@ RRECOMMENDS_${PN} = "kernel-module-nfsd" SRC_URI =
"${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.bz2 \
file://nfs-utils-1.0.6-uclibc.patch \
file://nfs-utils-1.2.3-sm-notify-res_init.patch \
+ file://osd_login-let-sbindir-can-be-overridden-at-config-ti.patch \
file://nfsserver \
file://nfs-utils.conf \//Hongxu
Quoted 1 line
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb +0
-0}