* [PATCH 0/1] mdadm: make udev rules dir configurable @ 2012-11-20 9:34 Qi.Chen 2012-11-20 9:34 ` [PATCH 1/1] " Qi.Chen 0 siblings, 1 reply; 4+ messages in thread From: Qi.Chen @ 2012-11-20 9:34 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao From: Chen Qi <Qi.Chen@windriver.com> The following changes since commit 9acfef96333ffe6e08998e6fd69187c14532d26c: yocto-bsp: update qemu machine.conf template (2012-11-18 16:42:10 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/mdadm http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/mdadm Chen Qi (1): mdadm: make udev rules dir configurable .../mdadm-make-udev-rules-dir-configurable.patch | 30 ++++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_3.2.6.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/mdadm/files/mdadm-make-udev-rules-dir-configurable.patch -- 1.7.9.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] mdadm: make udev rules dir configurable 2012-11-20 9:34 [PATCH 0/1] mdadm: make udev rules dir configurable Qi.Chen @ 2012-11-20 9:34 ` Qi.Chen 2012-11-20 12:07 ` Richard Purdie 0 siblings, 1 reply; 4+ messages in thread From: Qi.Chen @ 2012-11-20 9:34 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao From: Chen Qi <Qi.Chen@windriver.com> mdadm hardcodes the udev rules dir to be '/lib/udev/rules.d'. However, udev configs its base library directory to be ${base_libdir} instead of '/lib'. Thus if the target has powerpc64 architecture, the mdraid.rules file will be missing on the target, as the library directory is 'lib64'. This patch makes the udev rules dir of mdadm configurable, so that the mdraid.rules file will not be missing on any target. [YOCTO #2804] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- .../mdadm-make-udev-rules-dir-configurable.patch | 30 ++++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_3.2.6.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/mdadm/files/mdadm-make-udev-rules-dir-configurable.patch diff --git a/meta/recipes-extended/mdadm/files/mdadm-make-udev-rules-dir-configurable.patch b/meta/recipes-extended/mdadm/files/mdadm-make-udev-rules-dir-configurable.patch new file mode 100644 index 0000000..46928e9 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm-make-udev-rules-dir-configurable.patch @@ -0,0 +1,30 @@ +Make the udev rules dir configurable. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + +Index: mdadm-3.2.6/Makefile +========================================================= +--- mdadm-3.2.6/Makefile ++++ mdadm-3.2.6/Makefile +@@ -98,6 +98,7 @@ MANDIR = /usr/share/man + MAN4DIR = $(MANDIR)/man4 + MAN5DIR = $(MANDIR)/man5 + MAN8DIR = $(MANDIR)/man8 ++udevrulesdir ?= "/lib/udev.d/rules" + + OBJS = mdadm.o config.o policy.o mdstat.o ReadMe.o util.o maps.o lib.o \ + Manage.o Assemble.o Build.o \ +@@ -255,7 +256,7 @@ install-man: mdadm.8 md.4 mdadm.conf.5 mdmon.8 + $(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 + + install-udev: udev-md-raid.rules +- $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules ++ $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)$(udevrulesdir)/64-md-raid.rules + + uninstall: + rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm +-- +1.7.5.4 + diff --git a/meta/recipes-extended/mdadm/mdadm_3.2.6.bb b/meta/recipes-extended/mdadm/mdadm_3.2.6.bb index 7b6a6c7..e0af60e 100644 --- a/meta/recipes-extended/mdadm/mdadm_3.2.6.bb +++ b/meta/recipes-extended/mdadm/mdadm_3.2.6.bb @@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" -PR = "r0" +PR = "r1" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \ file://mdadm-3.2.2_fix_for_x32.patch \ + file://mdadm-make-udev-rules-dir-configurable.patch \ " SRC_URI[md5sum] = "3e255dc71e5144bbcb872788ca647267" @@ -21,6 +22,7 @@ CFLAGS += "-fno-strict-aliasing" inherit autotools +EXTRA_OEMAKE += "udevrulesdir=${base_libdir}/udev/rules.d" # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header do_configure_prepend () { sed -i -e '/.*ansidecl.h.*/d' ${S}/sha1.h -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mdadm: make udev rules dir configurable 2012-11-20 9:34 ` [PATCH 1/1] " Qi.Chen @ 2012-11-20 12:07 ` Richard Purdie 2012-11-23 3:07 ` ChenQi 0 siblings, 1 reply; 4+ messages in thread From: Richard Purdie @ 2012-11-20 12:07 UTC (permalink / raw) To: Qi.Chen; +Cc: Zhenfeng.Zhao, openembedded-core On Tue, 2012-11-20 at 17:34 +0800, Qi.Chen@windriver.com wrote: > From: Chen Qi <Qi.Chen@windriver.com> > > mdadm hardcodes the udev rules dir to be '/lib/udev/rules.d'. > However, udev configs its base library directory to be ${base_libdir} > instead of '/lib'. Thus if the target has powerpc64 architecture, > the mdraid.rules file will be missing on the target, as the library > directory is 'lib64'. > > This patch makes the udev rules dir of mdadm configurable, so that > the mdraid.rules file will not be missing on any target. > > [YOCTO #2804] This is a bit of a tricky one. I suspect in this case we need to install all the udev rules to one place and have an udev look in that place, regardless of which multilib it was compiled for. We already have this problem with systemd_unitdir. I think we need to do something like set: nonarchlib = "/lib" and then use this value in places where we want it to be invariant (yet still allow the layout to be configurable). So your patch starts to help with this but there is more we need to do. Cheers, Richard ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mdadm: make udev rules dir configurable 2012-11-20 12:07 ` Richard Purdie @ 2012-11-23 3:07 ` ChenQi 0 siblings, 0 replies; 4+ messages in thread From: ChenQi @ 2012-11-23 3:07 UTC (permalink / raw) To: Richard Purdie; +Cc: Zhenfeng.Zhao, openembedded-core On 11/20/2012 08:07 PM, Richard Purdie wrote: > On Tue, 2012-11-20 at 17:34 +0800, Qi.Chen@windriver.com wrote: >> From: Chen Qi<Qi.Chen@windriver.com> >> >> mdadm hardcodes the udev rules dir to be '/lib/udev/rules.d'. >> However, udev configs its base library directory to be ${base_libdir} >> instead of '/lib'. Thus if the target has powerpc64 architecture, >> the mdraid.rules file will be missing on the target, as the library >> directory is 'lib64'. >> >> This patch makes the udev rules dir of mdadm configurable, so that >> the mdraid.rules file will not be missing on any target. >> >> [YOCTO #2804] > This is a bit of a tricky one. I suspect in this case we need to install > all the udev rules to one place and have an udev look in that place, > regardless of which multilib it was compiled for. > > We already have this problem with systemd_unitdir. I think we need to do > something like set: > > nonarchlib = "/lib" > > and then use this value in places where we want it to be invariant (yet > still allow the layout to be configurable). > > So your patch starts to help with this but there is more we need to do. > > Cheers, > > Richard > > Hi Richard, Do you mean that what needs to be fixed is udev instead of mdadm? Should I rework on this patch? Thanks, Chen Qi ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-23 3:21 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-20 9:34 [PATCH 0/1] mdadm: make udev rules dir configurable Qi.Chen 2012-11-20 9:34 ` [PATCH 1/1] " Qi.Chen 2012-11-20 12:07 ` Richard Purdie 2012-11-23 3:07 ` ChenQi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox