<?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>1755</bug_id>
          
          <creation_ts>2011-11-07 05:23:20 +0000</creation_ts>
          <short_desc>preinst not run at rootfs time with rpm images</short_desc>
          <delta_ts>2011-11-21 18:39:01 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Mark Hatle">mark.hatle</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.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>17140</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-07 05:23:20 +0000</bug_when>
    <thetext>At rootfs generation time the preinst (%pre) functions aren&apos;t being run with the rpm backand. An example is the dbus package which results in no messagebus user and problems with the image at runtime.

I did try adding &quot;--pre&quot; to the final rootfs rpm call at rootfs creation time but this attempts to run the script within a chroot using target rootfs binaries which isn&apos;t cross safe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17141</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-07 05:24:32 +0000</bug_when>
    <thetext>For reference this looks like the reason the connman sanity tests are failing on the autobuilder as dbus isn&apos;t running in the images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17149</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-07 17:07:33 +0000</bug_when>
    <thetext>I&apos;ve put a hacktastic demo of a fix at http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/useradd&amp;id=5f190959cb38f92f575d6f861f1f447ba9f4b8e8

I&apos;m not suggesting we integrate that but it gives an idea of what the problems are:

a) base-passwd&apos;s preinst is fundamentally flawed as the files are unavailable
b) rpm needs to not run scripts under the chroot
c) We need $D in the environment
d) We need to tell rpm to run %pre
e) We need the native PATH in $PATH in the script so it finds the right tools

It also proves that if we fix those problems, connman/dbus start working properly in rpm images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17153</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-11-08 08:42:07 +0000</bug_when>
    <thetext>*** Bug 1699 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17183</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-11-11 08:36:01 +0000</bug_when>
    <thetext>Commit checked in:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ef1d61d711102b3417e83e56d4e2746f5b6a5db9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17304</commentid>
    <comment_count>5</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2011-11-21 18:39:01 +0000</bug_when>
    <thetext>Verified with 20111117 build.

Tree/Branch: Poky/master
Poky Commit:f2d077255d9ddf9b87e9a781b989bcce69047cf5</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>