Bug 9722

Summary: Add DISTRO_FEATURE to enable a merged /usr
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: coreAssignee: Joshua Lock <joshuagloe>
Status: VERIFIED DUPLICATE QA Contact:
Severity: enhancement    
Priority: Medium CC: jose.perez.carranza, meta.mr.watcher, meta.watcher
Version: 2.2   
Target Milestone: 2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Attachments:
Description Flags
Smart PM errors at image construction time with merged /usr
none
file-rdeps warnings due to merged /usr none

Description Joshua Lock 2016-06-07 11:32:25 UTC
Most of our recipes in OE-Core now support building with a merged /usr, we should make this feature easy to adopt by adding DISTRO_FEATURE to configure variables (bindir, libdir and sbindir), base-files and systemd appropriately.

Patches for bitbake.conf, base-files_3.0.14.bb and systemd_229.bb are available:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=joshuagl/usrmerge

However building with those patches and the usrmerge DISTRO_FEATURE enabled results in a failure to generate the rootfs with Smart, see smartpm.log and several warnings when using other package managers (opkg and dpkg), see warnings.log.

In both cases the root problem is the same, various of our scripts have a shebang of /bin/bash (or other utilities in /bin in some cases, i.e. sed) which is not present as we now install those binaries to /usr/bin

We need to come up with a generic solution to this problem which doesn't involve manually patching all of the shell scripts a package might include…
Comment 1 Joshua Lock 2016-06-07 11:36:29 UTC
Created attachment 3218 [details]
Smart PM errors at image construction time with merged /usr
Comment 2 Joshua Lock 2016-06-07 11:36:58 UTC
Created attachment 3219 [details]
file-rdeps warnings due to merged /usr
Comment 3 Joshua Lock 2016-06-28 16:46:40 UTC
#7040 is an older bug requesting this same enhancement, mark this issue as a duplicate of it.

*** This bug has been marked as a duplicate of bug 7040 ***
Comment 4 Jose Perez C 2016-09-09 16:36:01 UTC
verified as duplicate