<?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>5694</bug_id>
          
          <creation_ts>2013-12-31 01:55:10 +0000</creation_ts>
          <short_desc>smart reads the host&apos;s /etc/passwd instead of the sysroot when creating a new rootfs</short_desc>
          <delta_ts>2015-02-16 20:30:29 +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>devtools / tool chain</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</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.8 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Randy Witt">randy.e.witt</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>tomw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39631</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-12-31 01:55:10 +0000</bug_when>
    <thetext>We found this problem when a recipe tries to chown files to a user (www-data in this case). On my host system&apos;s /etc/passwd and /etc/group did not have a www-data user, I noted in my logs warnings:

warning: user www-data does not exist - using root

But when I checked the tmp/sysroots/qemux86-64/etc/passwd, www-data user existed in that file.

Further investigation via strace, revealed that smart first looks in the newly created rootfs/etc/passwd (which is not installed yet) and then falls back to the host&apos;s /etc/passwd, clearly we need to fall back to the sysroot password file, which will have the right collection of users.

This applies to both passwd and group.

Tom Walsh pointed this issue out originally on IRC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39638</commentid>
    <comment_count>1</comment_count>
      <attachid>1702</attachid>
    <who name="Tom Walsh">tomw</who>
    <bug_when>2013-12-31 12:42:44 +0000</bug_when>
    <thetext>Created attachment 1702
smart failure to access correct /etc/passwd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39639</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Walsh">tomw</who>
    <bug_when>2013-12-31 12:44:48 +0000</bug_when>
    <thetext>This occurs if you fail to add RDEPENDS_${PN} = &quot;base-passwd&quot; to a recipe which then uses chown / install to change user/group ownership.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48410</commentid>
    <comment_count>3</comment_count>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2015-01-29 18:35:11 +0000</bug_when>
    <thetext>This appears to still happen in dizzy-12.0.0. However, in dizzy-12.0.1 it appears to have been fixed.

In dizzy-12.0.1 when using the attached recipe, the &quot;install -o www-data -g www-data -d ${D}/foobar&quot; fails as expected even when using a user that exists on the host.

I believe this was fixed with the series of patches at:
http://lists.openembedded.org/pipermail/openembedded-core/2014-November/099051.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48871</commentid>
    <comment_count>4</comment_count>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2015-02-16 20:30:29 +0000</bug_when>
    <thetext>As mentioned this is fixed in 1.7.1.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1702</attachid>
            <date>2013-12-31 12:42:44 +0000</date>
            <delta_ts>2013-12-31 12:42:44 +0000</delta_ts>
            <desc>smart failure to access correct /etc/passwd</desc>
            <filename>foo_1.0.bb</filename>
            <type>text/plain</type>
            <size>366</size>
            <attacher name="Tom Walsh">tomw</attacher>
            
              <data encoding="base64">REVTQ1JJUFRJT04gPSAidGVzdCBjYXNlIgpMSUNFTlNFID0gIkdQTHYyIgpMSUNfRklMRVNfQ0hL
U1VNID0gImZpbGU6Ly8ke1dPUktESVJ9L0NPUFlJTkc7bWQ1PWNmNjk3MGRjZDU5MTNhM2EyZGU3
Y2I0YmZjYWY1YjM2IgoKU1JDX1VSSSA9ICJmaWxlOi8vQ09QWUlORyIKClBSID0gInIwIgoKZG9f
aW5zdGFsbCAoKSB7CglpbnN0YWxsIC1vIHd3dy1kYXRhIC1nIHd3dy1kYXRhIC1kICR7RH0vZm9v
YmFyCgl0b3VjaCAke0R9L2Zvb2Jhci9lbXB0eQoJY2hvd24gd3d3LWRhdGE6d3d3LWRhdGEgJHtE
fS9mb29iYXIvZW1wdHkKfQoKRklMRVNfJHtQTn0gPSAiL2Zvb2Jhci9lbXB0eSIKClJERVBFTkRT
XyR7UE59ID0gImJhc2UtcGFzc3dkIgoK
</data>

          </attachment>
      

    </bug>

</bugzilla>