All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] A few misc fixes Mentor is carrying
@ 2017-03-28 16:14 Christopher Larson
  2017-03-28 16:14 ` [PATCH 1/3] update_gio_module_cache: fix host user contamination Christopher Larson
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Christopher Larson @ 2017-03-28 16:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

The following changes since commit d68a86d87aa017dd0fecb0f626d22711efefcd3f:

  dnf: remove systemd units in nativesdk builds (2017-03-28 10:34:26 +0100)

are available in the git repository at:

  git@github.com:kergoth/openembedded-core.git misc-fixes

for you to fetch changes up to 571fe26dcf1d704cc97e834b19adb51b782b4cca:

  systemd-boot: write startup.nsh (2017-03-28 21:12:18 +0500)

----------------------------------------------------------------
Abdur Rehman (1):
  update_gio_module_cache: fix host user contamination

Christopher Larson (2):
  sysroot-relativelinks: also consider links to dirs on the host
  systemd-boot: write startup.nsh

 meta/classes/systemd-boot.bbclass                   | 2 ++
 scripts/postinst-intercepts/update_gio_module_cache | 2 ++
 scripts/sysroot-relativelinks.py                    | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.11.1



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-28 16:14 [PATCH 0/3] A few misc fixes Mentor is carrying Christopher Larson
@ 2017-03-28 16:14 ` Christopher Larson
  2017-03-29 20:33   ` Andrea Adami
  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
  2 siblings, 2 replies; 12+ messages in thread
From: Christopher Larson @ 2017-03-28 16:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

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 contamination
by host.

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
Signed-off-by: Christopher Larson <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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] sysroot-relativelinks: also consider links to dirs on the host
  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-28 16:14 ` Christopher Larson
  2017-03-28 16:14 ` [PATCH 3/3] systemd-boot: write startup.nsh Christopher Larson
  2 siblings, 0 replies; 12+ messages in thread
From: Christopher Larson @ 2017-03-28 16:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Dead symlinks, or symlinks to existing files will show up in 'files' of an
os.walk, but symlinks to existing directories show up in 'dirs', so we need to
consider both.

As one example where this is an issue, the symlink from /usr/lib/ssl/certs was
left pointing to /etc/ssl/certs rather than the relative path when the sdk was
built on hosts where the latter exists.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/sysroot-relativelinks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py
index e44eba2b11..ffe254728b 100755
--- a/scripts/sysroot-relativelinks.py
+++ b/scripts/sysroot-relativelinks.py
@@ -24,7 +24,7 @@ def handlelink(filep, subdir):
     os.symlink(os.path.relpath(topdir+link, subdir), filep)
 
 for subdir, dirs, files in os.walk(topdir):
-    for f in files:
+    for f in dirs + files:
         filep = os.path.join(subdir, f)
         if os.path.islink(filep):
             #print("Considering %s" % filep)
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] systemd-boot: write startup.nsh
  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-28 16:14 ` [PATCH 2/3] sysroot-relativelinks: also consider links to dirs on the host Christopher Larson
@ 2017-03-28 16:14 ` Christopher Larson
  2 siblings, 0 replies; 12+ messages in thread
From: Christopher Larson @ 2017-03-28 16:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This aligns with the behavior of grub-efi and gummiboot, and is needed to fix
auto-boot of intel-corei7-64 for non-GPLv3 builds.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/systemd-boot.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass
index 6d002c0e4e..4e69a2c6b5 100644
--- a/meta/classes/systemd-boot.bbclass
+++ b/meta/classes/systemd-boot.bbclass
@@ -37,6 +37,8 @@ efi_populate() {
         install -d ${DEST}/loader
         install -d ${DEST}/loader/entries
         install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
+        EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+        printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
         install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
         for i in ${SYSTEMD_BOOT_ENTRIES}; do
             install -m 0644 ${i} ${DEST}/loader/entries
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  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-30  9:27   ` Alexander Kanavin
  1 sibling, 1 reply; 12+ messages in thread
From: Andrea Adami @ 2017-03-29 20:33 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, openembedded-core

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 contamination
> by host.
>
> Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
> Signed-off-by: Christopher Larson <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
> 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.

Cheers
Andrea


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-29 20:33   ` Andrea Adami
@ 2017-03-29 20:40     ` Christopher Larson
  2017-03-29 21:08       ` Andrea Adami
  2017-03-29 23:54       ` Peter Kjellerstedt
  0 siblings, 2 replies; 12+ messages in thread
From: Christopher Larson @ 2017-03-29 20:40 UTC (permalink / raw)
  To: Andrea Adami; +Cc: openembedded-core

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

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 contamination
> > by host.
> >
> > Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
> > Signed-off-by: Christopher Larson <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
> > 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

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Andrea Adami @ 2017-03-29 21:08 UTC (permalink / raw)
  To: Christopher Larson; +Cc: openembedded-core

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 contamination
>> > by host.
>> >
>> > Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
>> > Signed-off-by: Christopher Larson <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
>> > 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.
> --

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

Cheers
Andrea

> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-29 20:40     ` Christopher Larson
  2017-03-29 21:08       ` Andrea Adami
@ 2017-03-29 23:54       ` Peter Kjellerstedt
  2017-03-30  8:57         ` Richard Purdie
  2017-03-30 11:46         ` Patrick Ohly
  1 sibling, 2 replies; 12+ messages in thread
From: Peter Kjellerstedt @ 2017-03-29 23:54 UTC (permalink / raw)
  To: Christopher Larson, Andrea Adami; +Cc: openembedded-core

[-- 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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-29 21:08       ` Andrea Adami
@ 2017-03-30  8:54         ` Jussi Kukkonen
  0 siblings, 0 replies; 12+ messages in thread
From: Jussi Kukkonen @ 2017-03-30  8:54 UTC (permalink / raw)
  To: Andrea Adami; +Cc: openembedded-core

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

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 contamination
> >> > by host.
> >> >
> >> > Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
> >> > Signed-off-by: Christopher Larson <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
> >> > 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.
> > --
>
> 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

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-29 23:54       ` Peter Kjellerstedt
@ 2017-03-30  8:57         ` Richard Purdie
  2017-03-30 11:46         ` Patrick Ohly
  1 sibling, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2017-03-30  8:57 UTC (permalink / raw)
  To: Peter Kjellerstedt, Christopher Larson, Andrea Adami; +Cc: openembedded-core

On Wed, 2017-03-29 at 23:54 +0000, Peter Kjellerstedt wrote:
> 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

Does this fix this or workaround the issue? I think the bigger worry is
why the cache file doesn't exist when the previous command should have
created it?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  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-30  9:27   ` Alexander Kanavin
  1 sibling, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2017-03-30  9:27 UTC (permalink / raw)
  To: openembedded-core

On 03/28/2017 07:14 PM, Christopher Larson wrote:
> 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.

I don't understand how one is related to another, can you explain 
please? What is happening, and why chown is fixing the problem?


Alex



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
  2017-03-29 23:54       ` Peter Kjellerstedt
  2017-03-30  8:57         ` Richard Purdie
@ 2017-03-30 11:46         ` Patrick Ohly
  1 sibling, 0 replies; 12+ messages in thread
From: Patrick Ohly @ 2017-03-30 11:46 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

On Wed, 2017-03-29 at 23:54 +0000, Peter Kjellerstedt wrote:
> 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?

A empty binary string - that's what Python 3 uses when it deals with raw
bytes instead of text with a known encoding.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-03-30 11:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.