Patchwork [5/8] udev: fix unsafe reference by installing libgudev in libdir

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Nov. 9, 2013, 5:28 a.m.
Message ID <f848a2ff5e5545b9e3f4b914677417359735f3e1.1383974819.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/61363/
State New
Headers show

Comments

Qi.Chen@windriver.com - Nov. 9, 2013, 5:28 a.m.
From: Chen Qi <qi.chen@windriver.com>

This patch fixes the following QA issue about unsafe reference in
binaries.

/lib/libgudev-1.0.so.0.1.1 requires /usr/lib/libgobject-2.0.so.0.

As libgudev is a GObject wrapper for libudev, and the purpose of
it is to make the development of GObject based applications easier,
there's no reason why it should remain in /lib. So this patches moves
the libgudev to /usr/lib.

This patch also removes a duplicate line in the EXTRA_OECONF.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/udev/udev.inc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index 69ce123..5b926c3 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -39,7 +39,6 @@  EXTRA_OECONF = "--disable-introspection \
                 ac_cv_file__usr_share_misc_pci_ids=yes \
                 --sbindir=${base_sbindir} \
                 --libexecdir=${nonarch_base_libdir} \
-                --with-rootlibdir=${base_libdir} \
                 --with-rootprefix= \
                 --without-systemdsystemunitdir \
                "
@@ -97,6 +96,11 @@  do_install_append () {
 	# hid2hci has moved to bluez4. removed in udev as of version 169
 	rm -f ${D}${base_libdir}/udev/hid2hci
 
+	# install libgudev.so.* into libdir.
+	so_img_name=`basename $(readlink ${D}${libdir}/libgudev-1.0.so)`
+	mv ${D}${base_libdir}/libgudev-1.0.so.* ${D}${libdir}
+	ln -sf $so_img_name ${D}${libdir}/libgudev-1.0.so
+
 	echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf
 }