<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2804</bug_id>
          
          <creation_ts>2012-07-20 07:17:02 +0000</creation_ts>
          <short_desc>mdadm: udev rules dir is hardcoded to /lib</short_desc>
          <delta_ts>2012-12-25 08:00:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jesse Zhang">sen.zhang</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>liang.li2</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>23305</commentid>
    <comment_count>0</comment_count>
    <who name="Jesse Zhang">sen.zhang</who>
    <bug_when>2012-07-20 07:17:02 +0000</bug_when>
    <thetext>mdadm hardcodes the udev rules dir to be /lib/udev/rules.d,

install-udev: udev-md-raid.rules
      $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules

while udev configs it to be ${base_libdir} (udev.inc: libexecdir = &quot;${base_libdir}/udev&quot;).

Thus on 64bit targets, the mdraid.rules file will be missing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27682</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2012-11-26 10:51:24 +0000</bug_when>
    <thetext>Udev manual clearly say: 
&quot;The udev rules are read from the files located in the default rules directory /lib/udev/rules.d/, the custom rules directory /etc/udev/rules.d/ and the temporary rules directory /run/udev/rules.d/.&quot;

Besides, there are other packages that hardcode udev rules directory to be &apos;/lib/udev/rules.d/&apos;. So I think it&apos;s not mdadm which should be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27707</commentid>
    <comment_count>2</comment_count>
    <who name="Jesse Zhang">sen.zhang</who>
    <bug_when>2012-11-27 02:19:18 +0000</bug_when>
    <thetext>Yeah. But did you check an actual build?

meta/recipes-core/udev/udev.inc: libexecdir = &quot;${base_libdir}/udev&quot;

udev Makefile.am: udevrulesdir = $(libexecdir)/rules.d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27709</commentid>
    <comment_count>3</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2012-11-27 02:32:31 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Yeah. But did you check an actual build?
&gt; 
&gt; meta/recipes-core/udev/udev.inc: libexecdir = &quot;${base_libdir}/udev&quot;
&gt; 
&gt; udev Makefile.am: udevrulesdir = $(libexecdir)/rules.d

Yes. That&apos;s why this bug was originally reported. If the target arch is &apos;powerpc64&apos;, the udev rules directory would be &apos;/lib64/udev/rules.d/&apos;. However, the mdadm hardcodes its udevrulesdir to be &apos;/lib/udev/rules.d/&apos;. 

And I checked alsa-utils package, it also hardcodes udevrulesdir to be &apos;/lib/udev/rules.d/&apos;.

Thus, I think maybe we should not fix mdadm and other packages that hardcode udevrulesdir. After all, it&apos;s the manual that says it&apos;s the default directory.

Maybe we should fix udev? Say, make udev always install its rules files to &apos;/lib/udev/rules.d&apos;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27710</commentid>
    <comment_count>4</comment_count>
    <who name="Jesse Zhang">sen.zhang</who>
    <bug_when>2012-11-27 02:35:45 +0000</bug_when>
    <thetext>Yeah, that works for me too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28392</commentid>
    <comment_count>5</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2012-12-20 05:08:28 +0000</bug_when>
    <thetext>Applied the following commit made by Constantin Musca &lt;constantinx.musca@intel.com&gt;, there isn&apos;t any problem anymore.

http://cgit.openembedded.org/openembedded-core/commit/?id=0730a8cbb42cd8b6667f2d1daefa0f6fcec06af2

I tested with multilib and ppc64-arch, the udev rules files are shipped correctly.

So I changed the status of this bug to resolved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28445</commentid>
    <comment_count>6</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2012-12-25 08:00:13 +0000</bug_when>
    <thetext>on arch qemu-x86-64 run &quot;bitbake mdadm&quot;,the &quot;64-md-raid.rules&quot; found in dir &quot;/lib/udev/rules.d&quot; with git master commit 90c0eb29f0b41e4ac2d3d17ebad7295c2ebdc02a.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>