<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.abn
        {mso-style-name:abn;}
span.aqj
        {mso-style-name:aqj;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org]
<b>On Behalf Of </b>Christopher Larson<br>
<b>Sent:</b> den 29 mars 2017 22:40<br>
<b>To:</b> Andrea Adami<br>
<b>Cc:</b> openembedded-core<br>
<b>Subject:</b> Re: [OE-core] [PATCH 1/3] update_gio_module_cache: fix host user contamination<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Mar 29, 2017 at 1:33 PM, Andrea Adami <<a href="mailto:andrea.adami@gmail.com" target="_blank">andrea.adami@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">On Tue, Mar 28, 2017 at 6:14 PM, Christopher Larson <<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>> wrote:<br>
> From: Abdur Rehman <<a href="mailto:abdur_rehman@mentor.com">abdur_rehman@mentor.com</a>><br>
><br>
> update_gio_module_cache intercept creates file:<br>
> $D${libdir}/gio/modules/giomodule.cache<br>
><br>
> Change ownership of this file to root:root to avoid user contamination<br>
> by host.<br>
><br>
> Signed-off-by: Abdur Rehman <<a href="mailto:abdur_rehman@mentor.com">abdur_rehman@mentor.com</a>><br>
> Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
> ---<br>
> scripts/postinst-intercepts/update_gio_module_cache | 2 ++<br>
> 1 file changed, 2 insertions(+)<br>
><br>
> diff --git a/scripts/postinst-intercepts/update_gio_module_cache b/scripts/postinst-intercepts/update_gio_module_cache<br>
> index fe468092cf..92092f2144 100644<br>
> --- a/scripts/postinst-intercepts/update_gio_module_cache<br>
> +++ b/scripts/postinst-intercepts/update_gio_module_cache<br>
> @@ -5,3 +5,5 @@ set -e<br>
> PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \<br>
> $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/<br>
><br>
> +chown root:root $D${libdir}/gio/modules/giomodule.cache<br>
> +<br>
> --<br>
> 2.11.1<br>
><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">> --<br>
> _______________________________________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">
http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<br>
<br>
Hello,<br>
There must be something wrong with this patch.<br>
After fresh pull of an hour ago I git:<br>
<br>
andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base<br>
Loading c<span class="aqj">ache: 1</span>00% |############################################| Time: 0:00:00<br>
Loaded 2095 entries from dependency cache.<br>
NOTE: Resolving any missing task queue dependencies<br>
<br>
Build Configuration:<br>
BB_VERSION = "1.33.2"<br>
BUILD_SYS = "x86_64-linux"<br>
NATIVELSBSTRING = "ubuntu-16.04"<br>
TARGET_SYS = "arm-oe-linux-gnueabi"<br>
MACHINE = "c7x0"<br>
DISTRO = "nodistro"<br>
DISTRO_VERSION = "nodistro.0"<br>
TUNE_FEATURES = "arm armv5 thumb dsp"<br>
TARGET_FPU = "soft"<br>
meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613"<br>
meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"<br>
meta-oe<br>
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"<br>
<br>
Initialis<span class="aqj">ing tas</span>ks: 100% |#######################################| Time: 0:00:08<br>
NOTE: Executing SetScene Tasks<br>
NOTE: Executing RunQueue Tasks<br>
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall intercept<br>
hook 'update_gio_module_cache' failed (exit code: 1)! See log for<br>
details! (Output: b'')<br>
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for the<br>
following packages will be postponed for first boot: libglib-2.0-0<br>
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to<br>
be rerun and all succeeded.<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
Odd, we’ve been running with this applied for ages. Is there anything useful in do_rootfs? I’ll attempt to repro here. Thanks, and sorry for the hassle.<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Christopher Larson<br>
kergoth at gmail dot com<br>
Founder - BitBake, OpenEmbedded, OpenZaurus<br>
Senior Software Engineer, Mentor Graphics<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634">I have sent a patch to fix this. The interesting part from the log was:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634">chown: cannot access `${WORKDIR}/rootfs/usr/lib/gio/modules/giomodule.cache': No such file or directory<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634">One thing that confuses me though is the “(Output: b'')” part in the warning below:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Consolas;color:#943634">WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634">What does that b'' mean?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634">//Peter<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#943634"><o:p> </o:p></span></p>
</div>
</body>
</html>