Skip to contentSkip to conversation

Fix udev dirs

PATCH Superseded Robert Yang 2 participants 11 messages Jul 25, 2016 – Jul 26, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fix udev dirs

The following changes since commit 0a2df616a5c3316704742f1dcf37b450920e0280:

boost: fix CVE-2012-2677 (2016-07-21 07:45:01 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/udev
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/udev

Robert Yang (7):
bitbake.conf: add eudev's udevdir to FILES_${PN}
systemd: install udev.pc
libinput: fix udevdir
ofono: remove duplicated udev setting from FILES_${PN}
mdadm: remove duplicated udev setting from FILES_${PN}
xf86-input-vmmouse: remove duplicated udev setting from FILES_${PN}
eudev: don't move udev directory

 meta/conf/bitbake.conf                                         |  1 +
 meta/recipes-connectivity/ofono/ofono.inc                      |  2 +-
 meta/recipes-core/systemd/systemd_230.bb                       |  2 ++
 meta/recipes-core/udev/eudev_3.2.bb                            | 10 +---------
 meta/recipes-extended/mdadm/mdadm_3.4.bb                       |  2 --
 meta/recipes-graphics/wayland/libinput_1.3.0.bb                |  6 +++++-
 meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb |  2 +-
 7 files changed, 11 insertions(+), 14 deletions(-)
Signature · 1 line
2.9.0
#1 lore raw

PATCH 1/7 bitbake.conf: add eudev's udevdir to FILES_${PN}

The eudev's udevdir can be ${base_libdir}/udev or ${libdir}/udev, it doesn't have to be hardcoded to /lib/udev, so add them FILES_${PN}.

---
 meta/conf/bitbake.conf | 1 +
 1 file changed, 1 insertion(+)
meta/conf/bitbake.conf +1 -0
index af3b181..50df2f0 100644
@@ -285,6 +285,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS}
             ${base_bindir}/* ${base_sbindir}/* \
             ${base_libdir}/*${SOLIBS} \
             ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
+            ${base_libdir}/udev/rules.d ${libdir}/udev/rules.d \
             ${datadir}/${BPN} ${libdir}/${BPN}/* \
             ${datadir}/pixmaps ${datadir}/applications \
             ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
Signature · 1 line
2.9.0
#2 lore raw

PATCH 2/7 systemd: install udev.pc

In reply to Robert Yang

It provides udev, but doesn't install udev.pc, which causes other recipes failed to figure out udevdir.

Fixed when systemd in DISTRO_FEATURES:

$ bitbake pcmciautils (or btrfs-tools):

Package udev was not found in the pkg-config search path. Perhaps you should add the directory containing `udev.pc' to the PKG_CONFIG_PATH environment variable
No package 'udev' found

Their udev rules file may not be installed according to each pkg's implementation.

---
 meta/recipes-core/systemd/systemd_230.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd_230.bb +2 -0
index 374a197..3c83ebb 100644
@@ -202,6 +202,8 @@ do_install() {
 	install -d ${D}${sysconfdir}/udev/rules.d/
 	install -d ${D}${sysconfdir}/tmpfiles.d
 	install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+	install -d ${D}${libdir}/pkgconfig
+	install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
 
 	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
 
Signature · 1 line
2.9.0
#3 lore raw

PATCH 3/7 libinput: fix udevdir

In reply to Robert Yang

Use "pkg-config --variable=udevdir udev" to fix udevdir, otherwise it would use ${libdir}/udev which is incorrect for systemd's udev.

---
 meta/recipes-graphics/wayland/libinput_1.3.0.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-graphics/wayland/libinput_1.3.0.bb +5 -1
index 13724d5..f0b66de 100644
@@ -20,4 +20,8 @@ PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
 PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
 PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
 
-FILES_${PN} += "${libdir}/udev/"
+UDEVDIR = "`pkg-config --variable=udevdir udev`"
+
+EXTRA_OECONF += "--with-udev-dir=${UDEVDIR}"
+
+FILES_${PN} += "${base_libdir}/udev/ ${nonarch_base_libdir}/udev/"
Signature · 1 line
2.9.0
#4 lore raw

Re: [PATCH 3/7] libinput: fix udevdir

Quoted 2 lines · Robert Yang

+FILES_${PN} += "${base_libdir}/udev/ ${nonarch_base_libdir}/udev/"

Isn't this covered by the bitbake.conf change?

Ross

#5 lore raw

Re: [PATCH 3/7] libinput: fix udevdir

Quoted 8 lines · Ross

On 25 July 2016 at 08:28, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

    +FILES_${PN} += "${base_libdir}/udev/ ${nonarch_base_libdir}/udev/"

Isn't this covered by the bitbake.conf change?

Hi Ross,

No, it is the subdir udev/rules.d in bitbake.conf:

${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d ${base_libdir}/udev/rules.d ${libdir}/udev/rules.d

I'd like to update bitbake.conf to lib/udev (no rules.d) if no objections, then we can drop this patch.

// Robert

Quoted 3 lines

Ross

#6 lore raw

Re: [PATCH 3/7] libinput: fix udevdir

Quoted 3 lines · Robert Yang

I'd like to update bitbake.conf to lib/udev (no rules.d) if no objections, then we can drop this patch.

Just actually looked at what libinput is shipping. :) This seems sensible to me.

Ross

#7 lore raw

PATCH 4/7 ofono: remove duplicated udev setting from FILES_${PN}

In reply to Robert Yang

bitbake.conf already sets it.

---
 meta/recipes-connectivity/ofono/ofono.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/ofono/ofono.inc +1 -1
index 72bbcac..99cb719 100644
@@ -36,6 +36,6 @@ PACKAGES =+ "${PN}-tests"
 
 RDEPENDS_${PN} += "dbus"
 
-FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
+FILES_${PN} += "${systemd_unitdir}"
 FILES_${PN}-tests = "${libdir}/${BPN}/test"
 RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
Signature · 1 line
2.9.0
#8 lore raw

PATCH 5/7 mdadm: remove duplicated udev setting from FILES_${PN}

In reply to Robert Yang

bitbake.conf already sets it.

---
 meta/recipes-extended/mdadm/mdadm_3.4.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-extended/mdadm/mdadm_3.4.bb +0 -2
index 513a3ce..261054e 100644
@@ -46,8 +46,6 @@ do_install() {
 	autotools_do_install
 }
 
-FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
-
 inherit ptest
 
 do_compile_ptest() {
Signature · 1 line
2.9.0
#9 lore raw

PATCH 6/7 xf86-input-vmmouse: remove duplicated udev setting from FILES_${PN}

In reply to Robert Yang

bitbake.conf already sets it.

---
 meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb +1 -1
index 8615b48..92a1b25 100644
@@ -23,4 +23,4 @@ do_install_append () {
 
 EXTRA_OECONF = "--with-udev-rules-dir=${nonarch_base_libdir}/udev/rules.d"
 
-FILES_${PN} += "${nonarch_base_libdir}/udev/rules.d/ ${datadir}/X11/xorg.conf.d"
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
Signature · 1 line
2.9.0
#10 lore raw

PATCH 7/7 eudev: don't move udev directory

In reply to Robert Yang

The code did "mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir}" which is not needed any more, eudev can work with ${base_libdir}/udev.

---
 meta/recipes-core/udev/eudev_3.2.bb | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meta/recipes-core/udev/eudev_3.2.bb +1 -9
index 6270617..ac4285b 100644
@@ -27,7 +27,6 @@ inherit autotools update-rc.d qemu
 
 EXTRA_OECONF = " \
     --sbindir=${base_sbindir} \
-    --libexecdir=${nonarch_base_libdir} \
     --with-rootlibdir=${base_libdir} \
     --with-rootprefix= \
 "
@@ -53,13 +52,6 @@ do_install_append() {
 	# Use classic network interface naming scheme
 	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
 
-	# Fix for multilib systems where libs along with confs are installed incorrectly
-	if ! [ -d ${D}${nonarch_base_libdir}/udev ]
-	then
-		install -d ${D}${nonarch_base_libdir}/udev
-		mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir}
-	fi
-
 	# hid2hci has moved to bluez4. removed in udev as of version 169
 	rm -f ${D}${base_libdir}/udev/hid2hci
 }
@@ -75,7 +67,7 @@ PACKAGES =+ "udev-cache"
 PACKAGES =+ "eudev-hwdb"
 
 
-FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
 FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
                    ${includedir}/libudev.h ${libdir}/libudev.so \
                    ${includedir}/udev.h ${libdir}/libudev.la \
Signature · 1 line
2.9.0