<?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>5765</bug_id>
          
          <creation_ts>2014-01-29 12:17:11 +0000</creation_ts>
          <short_desc>ROOT_HOME variable change not recognized</short_desc>
          <delta_ts>2014-03-03 22:39:00 +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.5.1</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.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Elstner">daniel.elstner</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>jack</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>40073</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Elstner">daniel.elstner</who>
    <bug_when>2014-01-29 12:17:11 +0000</bug_when>
    <thetext>When I changed ROOT_HOME in my custom distro conf file, I had to manually clean the sstate directories of base-files and base-passwd or the change would not appear in the generated RPM packages and the image rootfs.

Running the package task manually on those recipes did produce a package directory with correct content, but package_write_rpm again replaced it with the old incorrect content.  This had me stumped for a while, but cleaning the sstate fixed it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40483</commentid>
    <comment_count>1</comment_count>
    <who name="Jack Mitchell">jack</who>
    <bug_when>2014-02-20 11:42:35 +0000</bug_when>
    <thetext>I can confirm this is still an issue in the latest master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40484</commentid>
    <comment_count>2</comment_count>
    <who name="Jack Mitchell">jack</who>
    <bug_when>2014-02-20 11:50:10 +0000</bug_when>
    <thetext>This should also cause a re-build of the rootfs, which is doesn&apos;t trigger.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40551</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-02-21 02:03:17 +0000</bug_when>
    <thetext>Can you provide a little more detail, like what version of Poky/OE-Core 
meta-data you are using, which bitbake?  I just tested this here with 
core-image-minimal built with no change and then set the ROOT_HOME, I also 
confirmed that the Signature stamps changed.  I looked at the generated rootfs 
and it has the root directory as /root not /home/root.

% cat 
tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/passwd 
root::0:0:root:/root:/bin/sh

There have been some critical changes recently, just want to make sure you are 
using the latest HEAD, as it may be fixed there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40572</commentid>
    <comment_count>4</comment_count>
    <who name="Jack Mitchell">jack</who>
    <bug_when>2014-02-21 10:05:53 +0000</bug_when>
    <thetext>oe-core: 9a98b8bfe13b94d89a9e39cca821f26fdeaeffc3
bitbake: 56321b18808f5ed932543d907b9ebcfbf4420233

The main offenders in my case were openshh still using /home/root and passwd still having /home/root. I&apos;m sure there are others, but in order to get a truely clean build I had to wipre tmp/ and sstate/.

In order to get it to rebuild at all I had to force the clean of a few packages and then force a rebuild of the rootfs. It didn&apos;t pick up the change automatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40607</commentid>
    <comment_count>5</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-02-21 20:00:30 +0000</bug_when>
    <thetext>Ok, I tried this again with openssh and it worked correctly for me.

Here is what I did: build core-image-minimal with IMAGE_FEATURES +- 
&quot;ssh-server-openssh&quot; to enable the openssh server.  I built that image and 
verified that the root&apos;s home directory is /home/root, then I set 
ROOT_HOME=&quot;/root&quot; and rebuilt, I confirmed in the logs that both base-passwd 
and openssh rebuilt and the resulting rootfs contained a /root home directory 
that I could log into via the console and ssh remotely.

I am building with Poky master HEAD which has a few more patches, but I don&apos;t 
think any should affect this.

I also verified with bitbake-dumpsig the signatures were different before and 
after the ROOT_HOME change

I guess I still need more details about what&apos;s failing and how, since I can&apos;t 
reproduce it (yet).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40690</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-02-26 07:22:23 +0000</bug_when>
    <thetext>I think I have tracked this down a little better, turns out that we are sed&apos;ing 
the patch file and once it&apos;s changed, the next time we run do_install the 
change is maintained due to the orignal sed is not matched (since we changed it 
from /root -&gt; /home/root) the next sed just changes /home/root -&gt; /home/root 
(matching on the /root part).  So no change.

I found this is a problem in both base-files and base-passwd, but also found 
the systemd has a similar issue when it sed&apos;s the units directory.  For the 
base-* files, I am changing to sed after installing the file, so the installed 
file always starts out as the original.  The units directory issue is a little 
harder.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40693</commentid>
    <comment_count>7</comment_count>
    <who name="Jack Mitchell">jack</who>
    <bug_when>2014-02-26 10:03:34 +0000</bug_when>
    <thetext>Ah hah, good shout. I don&apos;t use the systemd build so hadn&apos;t noticed any issues with that.

I found that the OpenSSH problem was seemingly one of my own making so I would cross that off from the list for the time being.

I&apos;m glad you&apos;ve found the issue, I was starting to doubt what I&apos;d seen!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40847</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-03-03 22:39:00 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=49cdb68e3bfa885e7eaf67aec97631413f53bdf3
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=370b2d819648ea6dd963b1e6f22ef2d15e6f74ea
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d2f5f2b0b129a654ae8b3ff3f048b582c93c385b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>