Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Christopher Larson <kergoth@gmail.com>,
	Andrea Adami <andrea.adami@gmail.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/3] update_gio_module_cache: fix host user	contamination
Date: Wed, 29 Mar 2017 23:54:33 +0000	[thread overview]
Message-ID: <9d94d2771cd34d5fa5f1f3df1ee52ffa@XBOX02.axis.com> (raw)
In-Reply-To: <CABcZAN=vQzdwxd6F=nGBq0TWhOjx8kw0_MZfPpN82V=pbntF5g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4131 bytes --]


From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Christopher Larson
Sent: den 29 mars 2017 22:40
To: Andrea Adami
Cc: openembedded-core
Subject: Re: [OE-core] [PATCH 1/3] update_gio_module_cache: fix host user contamination


On Wed, Mar 29, 2017 at 1:33 PM, Andrea Adami <andrea.adami@gmail.com<mailto:andrea.adami@gmail.com>> wrote:
On Tue, Mar 28, 2017 at 6:14 PM, Christopher Larson <kergoth@gmail.com<mailto:kergoth@gmail.com>> wrote:
> From: Abdur Rehman <abdur_rehman@mentor.com<mailto: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 contamination
> by host.
>
> Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com<mailto:abdur_rehman@mentor.com>>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com<mailto:chris_larson@mentor.com>>
> ---
>  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=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$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<mailto: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        = "1.33.2"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-16.04"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "c7x0"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "arm armv5 thumb dsp"
TARGET_FPU        = "soft"
meta              = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613"
meta-handheld     = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"
meta-oe
meta-initramfs    = "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’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.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

I have sent a patch to fix this. The interesting part from the log was:

chown: cannot access `${WORKDIR}/rootfs/usr/lib/gio/modules/giomodule.cache': No such file or directory

One thing that confuses me though is the “(Output: b'')” part in the warning below:

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'')

What does that b'' mean?

//Peter


[-- Attachment #2: Type: text/html, Size: 9861 bytes --]

  parent reply	other threads:[~2017-03-29 23:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 16:14 [PATCH 0/3] A few misc fixes Mentor is carrying Christopher Larson
2017-03-28 16:14 ` [PATCH 1/3] update_gio_module_cache: fix host user contamination Christopher Larson
2017-03-29 20:33   ` Andrea Adami
2017-03-29 20:40     ` Christopher Larson
2017-03-29 21:08       ` Andrea Adami
2017-03-30  8:54         ` Jussi Kukkonen
2017-03-29 23:54       ` Peter Kjellerstedt [this message]
2017-03-30  8:57         ` Richard Purdie
2017-03-30 11:46         ` Patrick Ohly
2017-03-30  9:27   ` Alexander Kanavin
2017-03-28 16:14 ` [PATCH 2/3] sysroot-relativelinks: also consider links to dirs on the host Christopher Larson
2017-03-28 16:14 ` [PATCH 3/3] systemd-boot: write startup.nsh Christopher Larson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d94d2771cd34d5fa5f1f3df1ee52ffa@XBOX02.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=andrea.adami@gmail.com \
    --cc=kergoth@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox