<div dir="ltr"><div dir="ltr"><div dir="ltr">There are other rare reproducers which don&#39;t involve cp/install (e.g. older qmake was triggering it quite often as well), I&#39;ve mentioned some in:<div><a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=12434">https://bugzilla.yoctoproject.org/show_bug.cgi?id=12434</a><br></div><div><br></div><div>glibc-locale is the most common one for sure as pretty much everybody is building that one, I don&#39;t have objection converting this from cp to install to prevent this random error (very rare random failure doesn&#39;t really help with #12434 reproducer and whoever work on it, can either revert this change or try to reproduce with something else) - I&#39;ve included few hundreds of INSANE_SKIPs to ignore _random_ host-user-contaminated QAs in LG layers to prevent our builds failing randomly and the one for glibc-locale is the longest part:</div><div><a href="https://github.com/webosose/meta-webosose/blob/master/meta-webos/recipes-core/glibc/glibc-locale_%25.bbappend">https://github.com/webosose/meta-webosose/blob/master/meta-webos/recipes-core/glibc/glibc-locale_%25.bbappend</a><br></div><div><br></div><div>Regards,</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 7, 2019 at 3:50 PM Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Feb 7, 2019 at 1:00 AM Richard Purdie<br>
&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br>
&gt;<br>
&gt; On Wed, 2019-02-06 at 16:35 -0800, Khem Raj wrote:<br>
&gt; &gt; This has been a constant source of trouble for build failures due to host-user-contaminated QA<br>
&gt; &gt; errors of sort<br>
&gt; &gt;<br>
&gt; &gt; ERROR: QA Issue: glibc-locale: /glibc-binary-localedata-ca-es+valencia/usr/lib/locale/ca_ES@valencia/LC_MONETARY is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]<br>
&gt; &gt;<br>
&gt; &gt; So far we have tried to mould cp command into not carrying the build<br>
&gt; &gt; user permissions into install area but it is never entirely fixed since<br>
&gt; &gt; the issue keeps popping up in various scenes<br>
&gt; &gt;<br>
&gt; &gt; This patch replaces use of cp with install utility and specifies install<br>
&gt; &gt; mode for files explcitly<br>
&gt; &gt;<br>
&gt; &gt; Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;  meta/recipes-core/glibc/glibc-locale.inc | 44 ++++++++++++++----------<br>
&gt; &gt;  1 file changed, 25 insertions(+), 19 deletions(-)<br>
&gt; &gt;<br>
&gt; &gt; diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc<br>
&gt; &gt; index 6384f9cbf1..9b256a5108 100644<br>
&gt; &gt; --- a/meta/recipes-core/glibc/glibc-locale.inc<br>
&gt; &gt; +++ b/meta/recipes-core/glibc/glibc-locale.inc<br>
&gt; &gt; @@ -72,27 +72,33 @@ FILES_localedef = &quot;${bindir}/localedef&quot;<br>
&gt; &gt;  LOCALETREESRC = &quot;${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale&quot;<br>
&gt; &gt;<br>
&gt; &gt;  do_install () {<br>
&gt; &gt; -     mkdir -p ${D}${bindir} ${D}${datadir}<br>
&gt; &gt; -     if [ -n &quot;$(ls ${LOCALETREESRC}/${bindir})&quot; ]; then<br>
&gt; &gt; -             cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir}<br>
&gt; &gt; -     fi<br>
&gt; &gt; -     if [ -n &quot;$(ls ${LOCALETREESRC}/${localedir})&quot; ]; then<br>
&gt; &gt; -             mkdir -p ${D}${localedir}<br>
&gt; &gt; -             cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir}<br>
&gt; &gt; -     fi<br>
&gt; &gt; +        install -d ${D}${bindir}<br>
&gt; &gt; +        find &quot;${LOCALETREESRC}/${bindir}&quot; -maxdepth 1 -type f \<br>
&gt; &gt; +        -exec install -m 0755 -t &quot;${D}${bindir}&quot; {} \;<br>
&gt; &gt; +<br>
&gt; &gt; +        for d in . $(find &quot;${LOCALETREESRC}/${localedir}&quot; -type d -printf &#39;%P &#39;) ; do<br>
&gt; &gt; +                install -d &quot;${D}${localedir}/$d&quot;<br>
&gt; &gt; +                find &quot;${LOCALETREESRC}/${localedir}/$d&quot; -maxdepth 1 -type f \<br>
&gt; &gt; +                -exec install -m 0644 -t &quot;${D}${localedir}/$d&quot; {} \;<br>
&gt; &gt; +        done<br>
&gt; &gt;       if [ ${@d.getVar(&#39;PACKAGE_NO_GCONV&#39;)} -eq 0 ]; then<br>
&gt; &gt; -             mkdir -p ${D}${libdir}<br>
&gt; &gt; -             if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then<br>
&gt; &gt; -                     cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}<br>
&gt; &gt; -             fi<br>
&gt; &gt; -             if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then<br>
&gt; &gt; -                     cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}<br>
&gt; &gt; -             fi<br>
&gt; &gt; -     fi<br>
&gt; &gt; -     if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then<br>
&gt; &gt; -             cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}<br>
&gt; &gt; +                for d in . $(find &quot;${LOCALETREESRC}/${libdir}/gconv&quot; -type d -printf &#39;%P &#39;) ; do<br>
&gt; &gt; +                        install -d &quot;${D}${libdir}/gconv/$d&quot;<br>
&gt; &gt; +                        find &quot;${LOCALETREESRC}/${libdir}/gconv/$d&quot; -maxdepth 1 -type f \<br>
&gt; &gt; +                        -exec install -m 0755 -t &quot;${D}${libdir}/gconv/$d&quot; {} \;<br>
&gt; &gt; +                done<br>
&gt; &gt; +                for d in . $(find &quot;${LOCALETREESRC}/${datadir}/i18n&quot; -type d -printf &#39;%P &#39;) ; do<br>
&gt; &gt; +                        install -d &quot;${D}${datadir}/i18n/$d&quot;<br>
&gt; &gt; +                        find &quot;${LOCALETREESRC}/${datadir}/i18n/$d&quot; -maxdepth 1 -type f \<br>
&gt; &gt; +                        -exec install -m 0644 -t &quot;${D}${datadir}/i18n/$d&quot; {} \;<br>
&gt; &gt; +                done<br>
&gt; &gt;       fi<br>
&gt; &gt; -     cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/SUPPORTED ${WORKDIR}<br>
&gt; &gt; +        for d in . $(find &quot;${LOCALETREESRC}/${datadir}/locale&quot; -type d -printf &#39;%P &#39;) ; do<br>
&gt; &gt; +                install -d &quot;${D}${datadir}/locale/$d&quot;<br>
&gt; &gt; +                find &quot;${LOCALETREESRC}/${datadir}/locale/$d&quot; -maxdepth 1 -type f \<br>
&gt; &gt; +                -exec install -m 0644 -t &quot;${D}${datadir}/locale/$d&quot; {} \;<br>
&gt; &gt; +        done<br>
&gt; &gt; +     install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED<br>
&gt; &gt;  }<br>
&gt; &gt;<br>
&gt; &gt;  inherit libc-package<br>
&gt;<br>
&gt; The trouble is this is a workaround. The cp commands should work and<br>
&gt; there is some underlying issue in pseudo causing this. We really need<br>
&gt; to figure out what that is since this will likely just mean we see the<br>
&gt; problem somewhere else :(<br>
<br>
so far this is the only place where it shows in world builds that<br>
meta-oe does which includes many layers.<br>
<br>
&gt;<br>
&gt; I still suspect some kind of inode number reuse problem which these cp<br>
&gt; commands trigger...<br>
<br>
cp and install are not same when it comes to how they operate<br>
underneath. install is better when it comes to what we are doing here<br>
it also gives better control of permissions and mods,as a recipe writer<br>
someone would prefer then to let the tool ( cp ) assume it.<br>
<br>
So there might be a pseudo issue, I dont disagree but not obvious and<br>
I believe using cp is subpar anyway.<br>
<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Richard<br>
&gt;<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>