From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f174.google.com (mail-yb0-f174.google.com [209.85.213.174]) by mail.openembedded.org (Postfix) with ESMTP id 6BA8377B41 for ; Thu, 30 Mar 2017 08:54:36 +0000 (UTC) Received: by mail-yb0-f174.google.com with SMTP id 3so6067082ybc.0 for ; Thu, 30 Mar 2017 01:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I7K/43Y09TxlWtJRW2juYM5oseyRQgnYbL9NtLepYws=; b=ob2hkaK/CvBj4orlVfEgfpbS0Nw64DxhXG8PcP07scYUQzzbM1u69FQGwel9n4N5+y lXBZCbGoDMi/KLQRIOeD5KIAbZ9T3LwAi3Uc6SlthnZ/+xV43KTgVkPzOcPK6EoLG8d5 OXww6iJSsBPgqBKY7FoYRvMsKBlQMwp6B5yoSmgAcDzTnb8z3mLyVLLrjo0Cx3EaO9CI PV0Q5KwCtGsb1YxmGaUESUd7siamKOo/Pzj0hAYWc9Sm298+yDvGA6XBjkuSXjlCvNqE 0NZ0WUAeiqUu+yMEB4i6vBbBdJecODlfXETDPKMbAi6nq4M14u4gPHzPeGsveaS1b4qQ LJlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I7K/43Y09TxlWtJRW2juYM5oseyRQgnYbL9NtLepYws=; b=G0nJnRXIJi0Rpwx54K0DixmC2SfmQtChcmPNTuVSp+nu7108QESVXcoH56XzMU+rh2 FCEQ+s8bXpjGgBo88yf6qL8JfF4D63jFB7Mr5X8TO8tnbRpw1imF06bkmn7mx4TuJ3lh jRBSmRnCBMbHqzU/qAAHsWE9Nhm1LI8eVF2C+KwR7zyqY3Gz3fzHm1675UOah/MUJ7yV 6HhKy7MII4A4B5IeajXJJeMEo9Ugf5/f8Y5i0k14BMW4VlvEfBaYvLCIpJNWVhc4xqK3 liLaeVv7pifHWRkzRKXUsovC7YhEFqlMd5u743+tYMnBlPQRqMafMBGy2+a3eh8qX/Aj oytA== X-Gm-Message-State: AFeK/H1ctVIQlnH+fNdVLmP73DNf0wUF7Zn5DeIpMQFj45chtb835b5zYve/Kxx+J4aiWRW/GKJ9gMA3dAP12cWW X-Received: by 10.37.170.36 with SMTP id s33mr5875025ybi.189.1490864078183; Thu, 30 Mar 2017 01:54:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.81.136 with HTTP; Thu, 30 Mar 2017 01:54:07 -0700 (PDT) In-Reply-To: References: From: Jussi Kukkonen Date: Thu, 30 Mar 2017 11:54:07 +0300 Message-ID: To: Andrea Adami Cc: openembedded-core Subject: Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 08:54:37 -0000 Content-Type: multipart/alternative; boundary=94eb2c000ceac9eca9054beed797 --94eb2c000ceac9eca9054beed797 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 30 March 2017 at 00:08, Andrea Adami wrote: > On Wed, Mar 29, 2017 at 10:40 PM, Christopher Larson > wrote: > > > > On Wed, Mar 29, 2017 at 1:33 PM, Andrea Adami > > wrote: > >> > >> On Tue, Mar 28, 2017 at 6:14 PM, Christopher Larson > >> wrote: > >> > From: Abdur Rehman > >> > > >> > update_gio_module_cache intercept creates file: > >> > $D${libdir}/gio/modules/giomodule.cache > >> > > >> > Change ownership of this file to root:root to avoid user contaminati= on > >> > by host. > >> > > >> > Signed-off-by: Abdur Rehman > >> > Signed-off-by: Christopher Larson > >> > --- > >> > scripts/postinst-intercepts/update_gio_module_cache | 2 ++ > >> > 1 file changed, 2 insertions(+) > >> > > >> > diff --git a/scripts/postinst-intercepts/update_gio_module_cache > >> > b/scripts/postinst-intercepts/update_gio_module_cache > >> > index fe468092cf..92092f2144 100644 > >> > --- a/scripts/postinst-intercepts/update_gio_module_cache > >> > +++ b/scripts/postinst-intercepts/update_gio_module_cache > >> > @@ -5,3 +5,5 @@ set -e > >> > PSEUDO_UNLOAD=3D1 qemuwrapper -L $D -E > >> > LD_LIBRARY_PATH=3D$D${libdir}:$D${base_libdir} \ > >> > $D${libexecdir}/${binprefix}gio-querymodules > >> > $D${libdir}/gio/modules/ > >> > > >> > +chown root:root $D${libdir}/gio/modules/giomodule.cache > >> > + > >> > -- > >> > 2.11.1 > >> > > >> > -- > >> > _______________________________________________ > >> > Openembedded-core mailing list > >> > Openembedded-core@lists.openembedded.org > >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core > >> > >> > >> Hello, > >> There must be something wrong with this patch. > >> After fresh pull of an hour ago I git: > >> > >> andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base > >> Loading cache: 100% |############################################| > Time: > >> 0:00:00 > >> Loaded 2095 entries from dependency cache. > >> NOTE: Resolving any missing task queue dependencies > >> > >> Build Configuration: > >> BB_VERSION =3D "1.33.2" > >> BUILD_SYS =3D "x86_64-linux" > >> NATIVELSBSTRING =3D "ubuntu-16.04" > >> TARGET_SYS =3D "arm-oe-linux-gnueabi" > >> MACHINE =3D "c7x0" > >> DISTRO =3D "nodistro" > >> DISTRO_VERSION =3D "nodistro.0" > >> TUNE_FEATURES =3D "arm armv5 thumb dsp" > >> TARGET_FPU =3D "soft" > >> meta =3D "master:c187326afcf1e9d781c1bd0923e1362a6f50f613= " > >> meta-handheld =3D "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7= " > >> meta-oe > >> meta-initramfs =3D "master:225e64d95bc41077782815f3dceb6f2d1a42b167= " > >> > >> Initialising tasks: 100% |#######################################| > Time: > >> 0:00:08 > >> NOTE: Executing SetScene Tasks > >> NOTE: Executing RunQueue Tasks > >> 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'') > >> WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for the > >> following packages will be postponed for first boot: libglib-2.0-0 > >> NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to > >> be rerun and all succeeded. > > > > > > Odd, we=E2=80=99ve been running with this applied for ages. Is there an= ything > useful > > in do_rootfs? I=E2=80=99ll attempt to repro here. Thanks, and sorry for= the > hassle. > > -- > > There is just a laconical message: > > NOTE: Running intercept scripts: > NOTE: > Executing update_gio_module_cache intercept ... > chown: cannot access > '/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnueabi/core- > image-base/1.0-r0/rootfs/usr/lib/gio/modules/giomodule.cache': > No such file or directory > > Here the permissions: > andrea@ThinkPad-T520:/tmp/build/tmp-glibc/work/c7x0-oe- > linux-gnueabi/core-image-base/1.0-r0/rootfs/usr/lib/gio$ > ls -al > total 0 > drwxr-xr-x 3 andrea andrea 60 mar 29 21:33 . > drwxr-xr-x 6 andrea andrea 1660 mar 29 22:51 .. > drwxr-xr-x 2 andrea andrea 40 mar 29 21:33 modules > Can you check if usr/lib/gio/modules/giomodule.cache really exists or not? And if it does not, what the gio-querymodules call looks like in temp/run.do_rootfs? Jussi --94eb2c000ceac9eca9054beed797 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 30 March 2017 at 00:08, Andrea Adami <andrea.adami@gmail.com= > wrote:
On Wed, Mar 29, 2017 at 10:40 PM, Christopher Larson = <kergoth@gmail.com> wrote: >
> On Wed, Mar 29, 2017 at 1:33 PM, Andrea Adami <andrea.adami@gmail.com>
> wrote:
>>
>> On Tue, Mar 28, 2017 at 6:14 PM, Christopher Larson <kergoth@gmail.com>
>> wrote:
>> > From: Abdur Rehman <abdur_rehman@mentor.com>
>> >
>> > update_gio_module_cache intercept creates file:
>> > $D${libdir}/gio/modules/giomodule.cache
>> >
>> > Change ownership of this file to root:root to avoid user cont= amination
>> > by host.
>> >
>> > Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
>> > Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>> > ---
>> >=C2=A0 scripts/postinst-intercepts/update_gio_module_cach= e | 2 ++
>> >=C2=A0 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/scripts/postinst-intercepts/update_gio_modu= le_cache
>> > b/scripts/postinst-intercepts/update_gio_module_cache >> > index fe468092cf..92092f2144 100644
>> > --- a/scripts/postinst-intercepts/update_gio_module_cach= e
>> > +++ b/scripts/postinst-intercepts/update_gio_module_cach= e
>> > @@ -5,3 +5,5 @@ set -e
>> >=C2=A0 PSEUDO_UNLOAD=3D1 qemuwrapper -L $D -E
>> > LD_LIBRARY_PATH=3D$D${libdir}:$D${base_libdir} \
>> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $D${libexecdir}/${binprefix= }gio-querymodules
>> > $D${libdir}/gio/modules/
>> >
>> > +chown root:root $D${libdir}/gio/modules/giomodule.cache=
>> > +
>> > --
>> > 2.11.1
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > O= penembedded-core@lists.openembedded.org
>> > http://lists.openembed= ded.org/mailman/listinfo/openembedded-core
>>
>>
>> Hello,
>> There must be something wrong with this patch.
>> After fresh pull of an hour ago I git:
>>
>> andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-ba= se
>> Loading cache: 100% |########################################= ####| Time:
>> 0:00:00
>> Loaded 2095 entries from dependency cache.
>> NOTE: Resolving any missing task queue dependencies
>>
>> Build Configuration:
>> BB_VERSION=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "1.33.2"
>> BUILD_SYS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D "x86_64-linux&= quot;
>> NATIVELSBSTRING=C2=A0 =C2=A0=3D "ubuntu-16.04"
>> TARGET_SYS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "arm-oe-linux-gnuea= bi"
>> MACHINE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D "c7x0&quo= t;
>> DISTRO=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "nodistro= "
>> DISTRO_VERSION=C2=A0 =C2=A0 =3D "nodistro.0"
>> TUNE_FEATURES=C2=A0 =C2=A0 =C2=A0=3D "arm armv5 thumb dsp&quo= t;
>> TARGET_FPU=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "soft"
>> meta=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "mas= ter:c187326afcf1e9d781c1bd0923e1362a6f50f613"
>> meta-handheld=C2=A0 =C2=A0 =C2=A0=3D "master:f88f5bc546e= c18de232a91dc1c8185ad242c45f7"
>> meta-oe
>> meta-initramfs=C2=A0 =C2=A0 =3D "master:225e64d95bc41077= 782815f3dceb6f2d1a42b167"
>>
>> Initialising tasks: 100% |###################################= ####| Time:
>> 0:00:08
>> NOTE: Executing SetScene Tasks
>> NOTE: Executing RunQueue Tasks
>> WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall interce= pt
>> hook 'update_gio_module_cache' failed (exit code: 1)! See = log for
>> details! (Output: b'')
>> WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for th= e
>> following packages will be postponed for first boot: libglib-2.0-0=
>> NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't= need to
>> be rerun and all succeeded.
>
>
> Odd, we=E2=80=99ve been running with this applied for ages. Is there a= nything useful
> in do_rootfs? I=E2=80=99ll attempt to repro here. Thanks, and sorry fo= r the hassle.
> --

There is just a laconical message:

NOTE: Running intercept scripts:
NOTE: > Executing update_gio_module_cache intercept ...
chown: cannot access
'/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnueabi/core-image-b= ase/1.0-r0/rootfs/usr/lib/gio/modules/giomodule.cache':
No such file or directory

Here the permissions:
andrea@ThinkPad-T520:/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnue= abi/core-image-base/1.0-r0/rootfs/usr/lib/gio$
ls -al
total 0
drwxr-xr-x 3 andrea andrea=C2=A0 =C2=A060 mar 29 21:33 .
drwxr-xr-x 6 andrea andrea 1660 mar 29 22:51 ..
drwxr-xr-x 2 andrea andrea=C2=A0 =C2=A040 mar 29 21:33 modules

Can you check if usr/lib/gio/modules/giomodule.cach= e really exists or not? And if it does not, what the gio-querymodules call = looks like in temp/run.do_rootfs?

Jussi
<= /div>
--94eb2c000ceac9eca9054beed797--