| Summary: | ROOT_HOME variable change not recognized | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Daniel Elstner <daniel.elstner> |
| Component: | core | Assignee: | Saul Wold <sgw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | jack, jessica.zhang, meta.mr.watcher, meta.watcher |
| Version: | 1.5.1 | ||
| Target Milestone: | 1.6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Daniel Elstner
2014-01-29 12:17:11 UTC
I can confirm this is still an issue in the latest master. This should also cause a re-build of the rootfs, which is doesn't trigger. 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. oe-core: 9a98b8bfe13b94d89a9e39cca821f26fdeaeffc3 bitbake: 56321b18808f5ed932543d907b9ebcfbf4420233 The main offenders in my case were openshh still using /home/root and passwd still having /home/root. I'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't pick up the change automatically. 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 +- "ssh-server-openssh" to enable the openssh server. I built that image and verified that the root's home directory is /home/root, then I set ROOT_HOME="/root" 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'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's failing and how, since I can't reproduce it (yet). I think I have tracked this down a little better, turns out that we are sed'ing the patch file and once it'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 -> /home/root) the next sed just changes /home/root -> /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'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. Ah hah, good shout. I don't use the systemd build so hadn'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'm glad you've found the issue, I was starting to doubt what I'd seen! |