Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] useradd: don't override pseudo environment
@ 2017-09-15 11:58 Ross Burton
  2017-09-15 12:04 ` Martin Jansa
  2017-09-15 17:58 ` Seebs
  0 siblings, 2 replies; 4+ messages in thread
From: Ross Burton @ 2017-09-15 11:58 UTC (permalink / raw)
  To: openembedded-core

Back in the dark days before recipe-specific-sysroots the paths being passed in
this manual construction of the pseudo environment made sense, but now they're
incorrect and result in pseudo writing to two different databases during a
single build.  The result is that pseudo doesn't follow changes to /etc/passwd
in the sysroot, and warns in the logs.

Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct assignment in
FAKEROOTENV.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/useradd.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 6017ded8601..0f51e5522b1 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -100,7 +100,7 @@ useradd_sysroot () {
 	# Pseudo may (do_prepare_recipe_sysroot) or may not (do_populate_sysroot_setscene) be running 
 	# at this point so we're explicit about the environment so pseudo can load if 
 	# not already present.
-	export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${PSEUDO_SYSROOT}${bindir_native}/pseudo"
+	export PSEUDO="${FAKEROOTENV} ${PSEUDO_SYSROOT}${bindir_native}/pseudo"
 
 	# Explicitly set $D since it isn't set to anything
 	# before do_prepare_recipe_sysroot
-- 
2.11.0



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

* Re: [PATCH] useradd: don't override pseudo environment
  2017-09-15 11:58 [PATCH] useradd: don't override pseudo environment Ross Burton
@ 2017-09-15 12:04 ` Martin Jansa
  2017-09-15 17:58 ` Seebs
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2017-09-15 12:04 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer

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

nice

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

On Fri, Sep 15, 2017 at 1:58 PM, Ross Burton <ross.burton@intel.com> wrote:

> Back in the dark days before recipe-specific-sysroots the paths being
> passed in
> this manual construction of the pseudo environment made sense, but now
> they're
> incorrect and result in pseudo writing to two different databases during a
> single build.  The result is that pseudo doesn't follow changes to
> /etc/passwd
> in the sysroot, and warns in the logs.
>
> Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct
> assignment in
> FAKEROOTENV.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/useradd.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index 6017ded8601..0f51e5522b1 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -100,7 +100,7 @@ useradd_sysroot () {
>         # Pseudo may (do_prepare_recipe_sysroot) or may not
> (do_populate_sysroot_setscene) be running
>         # at this point so we're explicit about the environment so pseudo
> can load if
>         # not already present.
> -       export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${
> STAGING_DIR_TARGET}${localstatedir}/pseudo ${PSEUDO_SYSROOT}${bindir_
> native}/pseudo"
> +       export PSEUDO="${FAKEROOTENV} ${PSEUDO_SYSROOT}${bindir_
> native}/pseudo"
>
>         # Explicitly set $D since it isn't set to anything
>         # before do_prepare_recipe_sysroot
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

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

* Re: [PATCH] useradd: don't override pseudo environment
  2017-09-15 11:58 [PATCH] useradd: don't override pseudo environment Ross Burton
  2017-09-15 12:04 ` Martin Jansa
@ 2017-09-15 17:58 ` Seebs
  2017-09-15 22:55   ` Richard Purdie
  1 sibling, 1 reply; 4+ messages in thread
From: Seebs @ 2017-09-15 17:58 UTC (permalink / raw)
  To: Ross Burton; +Cc: openembedded-core

On Fri, 15 Sep 2017 12:58:48 +0100
Ross Burton <ross.burton@intel.com> wrote:

> Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct
> assignment in FAKEROOTENV.

Nice catch! This probably explains a LOT of the strange behaviors we've
been seeing.

-s


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

* Re: [PATCH] useradd: don't override pseudo environment
  2017-09-15 17:58 ` Seebs
@ 2017-09-15 22:55   ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2017-09-15 22:55 UTC (permalink / raw)
  To: Seebs, Ross Burton; +Cc: openembedded-core

On Fri, 2017-09-15 at 12:58 -0500, Seebs wrote:
> On Fri, 15 Sep 2017 12:58:48 +0100
> Ross Burton <ross.burton@intel.com> wrote:
> 
> > 
> > Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct
> > assignment in FAKEROOTENV.
> Nice catch! This probably explains a LOT of the strange behaviors
> we've been seeing.

I think it will fix some warnings but I believe the bulk of the issues
are from files being deleted in contents outside of pseudo and then the
inode numbers being reused.

Note that this issue existed long before we had recipe specific
sysroots.

Unfortunately its very hard to guarantee we'll always delete files
under pseudo context as for example "do_clean",
"do_recipe_prepare_sysroot" and others are not pseudo tasks but can
add/delete files. Files in ${WORKDIR}/temp such as log files and
sysroot manifests and locks may be modified by both the fakeroot worker
and the parent bitbake server too.

Possible options:

a) Add a way to filter the paths pseudo looks at and cares about.
b) At server startup, check files really do exist
c) Add some way to trigger a sync of the pseudo db with what is on 
   disk.

Cheers,

Richard


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

end of thread, other threads:[~2017-09-15 22:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 11:58 [PATCH] useradd: don't override pseudo environment Ross Burton
2017-09-15 12:04 ` Martin Jansa
2017-09-15 17:58 ` Seebs
2017-09-15 22:55   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox