<?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>7040</bug_id>
          
          <creation_ts>2014-12-08 13:32:45 +0000</creation_ts>
          <short_desc>Support for /usr merge (à la systemd and Fedora)</short_desc>
          <delta_ts>2017-07-18 08:58:48 +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.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=5143</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kjellerstedt">peter.kjellerstedt</reporter>
          <assigned_to name="Amaranth Valluri">amarnath.valluri</assigned_to>
          <cc>amarnath.valluri</cc>
    
    <cc>andrew</cc>
    
    <cc>f.schuettler</cc>
    
    <cc>jku</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>matti-pekka.sivosuo</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>mikko.ylinen</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47422</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kjellerstedt">peter.kjellerstedt</who>
    <bug_when>2014-12-08 13:32:45 +0000</bug_when>
    <thetext>We would like to be able to configure our embedded system with a merged /usr à la Fedora. Preferably through a simple DISTRO_FEATURE.

Typically this would involve having /bin, /sbin and /lib* be symbolic links to their /usr counterparts. From a discussion on the oe-core mailing list I gathered that files/fs-perms.txt would need to be modified, as well as changing ${base_bindir}, ${base_sbindir} and ${base_libdir}.

According to Mark Hattle it should be pretty straightforward to redirect the /usr directories to their / counterparts. However, according to Chen Qi, the opposite is more troublesome and will require changes.

For reference: http://0pointer.de/blog/projects/the-usr-merge</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47496</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-12-11 15:43:42 +0000</bug_when>
    <thetext>In the past OE has supported a model where the prefix was changed and the /usr directory was removed entirely (or could be a sumlink). This proposal seems to be different in that /usr is retained with symlinks to the usr counterparts.

This isn&apos;t something anyone I know is working on, hence the priority its being assigned. If someone is going to get it working, that would be fine, as long as the changes are not too invasive to the system. If it proves invasive, I&apos;d much prefer the prefix approach since we know that isn&apos;t too invasive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63415</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-28 16:46:40 +0000</bug_when>
    <thetext>*** Bug 9722 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63416</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-28 16:49:03 +0000</bug_when>
    <thetext>A bunch of progress towards this has been made in master over recent releases and further supporting changes are being developed in my joshuagl/usrmerge branch on poky-contrib:

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

Building that tree with the usrmerge DISTRO_FEATURE enabled results in a failure to generate the rootfs with Smart and several warnings when using other package managers (opkg and dpkg).

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&apos;t involve manually patching all of the shell scripts a package might include…</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69475</commentid>
    <comment_count>4</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-01-04 10:10:49 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Building that tree with the usrmerge DISTRO_FEATURE enabled results in a
&gt; failure to generate the rootfs with Smart and several warnings when using
&gt; other package managers (opkg and dpkg).
&gt; 
&gt; In both cases the root problem is the same, various of our scripts have a
&gt; shebang of /bin/bash (or other utilities in /bin in some cases, i.e. sed)
&gt; which is not present as we now install those binaries to /usr/bin
&gt; 
&gt; We need to come up with a generic solution to this problem which doesn&apos;t
&gt; involve manually patching all of the shell scripts a package might include…

I&apos;ve been testing this stuff a little.

There are some minor issues I want to fix but the two major problems are:

1. build time dependencies to /bin or /lib.
I think we want to create the symlinks in the sysroots (when &quot;usrmerge&quot; is in DISTRO_FEATURES): otherwise things will fail and we might not even notice. Currently e.g. gobject-introspection fails to build and many postinst scripts fail at rootfs generation because prelink-rtld looks for &quot;/lib/ld-linux.so.2&quot;.
This is not possible in a normal recipe (like base-files) because of how staging.bbclass currently works.

2. FILERDEPENDS on e.g. /bin/sh
With rpm this means install fails as nothing RPROVIDES /bin/sh. Calling /bin/sh works because the symlink is there and /usr/bin/sh exists. I&apos;m not 100% sure what the right fix would be... Considering this:
* Make sure FILERDEPENDS is always tweaked to point to e.g. /usr/bin/sh  
* Add a QA check for not packaging things into /bin (etc) -- currently only kernel seems to break this in oe-core</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73041</commentid>
    <comment_count>5</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-05-04 12:39:01 +0000</bug_when>
    <thetext>All patches were sent but some are still missing http://lists.openembedded.org/pipermail/openembedded-core/2017-March/134354.html

Can the remaining patches be prioritized for 2.4M1?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73051</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-05-04 15:21:45 +0000</bug_when>
    <thetext>Mikko: can someone rebase the outstanding patches to master and publish the branch somewhere for constructive review?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73074</commentid>
    <comment_count>7</comment_count>
    <who name="Amaranth Valluri">amarnath.valluri</who>
    <bug_when>2017-05-05 07:50:25 +0000</bug_when>
    <thetext>Ross, the rebased changes are on my repo on github:
https://github.com/avalluri/openembedded-core/commits/usrmerge</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73405</commentid>
    <comment_count>8</comment_count>
    <who name="Amaranth Valluri">amarnath.valluri</who>
    <bug_when>2017-05-22 12:22:43 +0000</bug_when>
    <thetext>Ross, did you get chance to look at the patchset</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74451</commentid>
    <comment_count>9</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-06-22 07:21:50 +0000</bug_when>
    <thetext>Amarnath, sorry for not being more active on this lately. I&apos;ve assigned to you as an acknowledgement of reality... if you disagree: that&apos;s not a problem, just assign it back to me.

If there&apos;s something I can do to help with the patches, I can try but currently I&apos;m not up-to-date on them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74452</commentid>
    <comment_count>10</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-06-22 07:25:40 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Amarnath, sorry for not being more active on this lately. I&apos;ve assigned to
&gt; you as an acknowledgement of reality... if you disagree: that&apos;s not a
&gt; problem, just assign it back to me.

Oh and the milestone needs to be changed if the patches are not in M1: I didn&apos;t want to decide on the milestone without being up to date on the state of patchset...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74453</commentid>
    <comment_count>11</comment_count>
    <who name="Amaranth Valluri">amarnath.valluri</who>
    <bug_when>2017-06-22 07:34:25 +0000</bug_when>
    <thetext>Jussi, All the review comments are addressed, and still 7 patches needs to be accepted. The rebased changes are here: https://github.com/avalluri/openembedded-core/commits/usrmerge</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74454</commentid>
    <comment_count>12</comment_count>
    <who name="Amaranth Valluri">amarnath.valluri</who>
    <bug_when>2017-06-22 07:56:55 +0000</bug_when>
    <thetext>RP/Ross: Can you pleases suggest if we can take this for M1, i feel its bit unrealistic as we are nearing the milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75097</commentid>
    <comment_count>13</comment_count>
    <who name="Amaranth Valluri">amarnath.valluri</who>
    <bug_when>2017-07-18 08:58:48 +0000</bug_when>
    <thetext>All the needed patches landed in oe-core master.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>