public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: ChenQi <Qi.Chen@windriver.com>, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 3/3] shadow: Drop pointless patch
Date: Wed, 22 Apr 2026 07:44:18 +0100	[thread overview]
Message-ID: <8c39da9ca3535ca2fd4c6a4b69e0de4072ffdec8.camel@linuxfoundation.org> (raw)
In-Reply-To: <cf156897-8a47-45cf-a64d-7ab8eb07085d@windriver.com>

Hi Qi,

On Wed, 2026-04-22 at 13:51 +0800, ChenQi wrote:
>  I'm the author of the original patch, so I just double checked it.
>
> This might be counter-intuitive, but this patch does solve some
> problem in pseudo environment.
> 
> Without this patch, running a simple 'bitbake ptest-runner' fails.
> The error message is like:
> 
> NOTE: ptest-runner: Performing useradd with [--root
> /path/to/build/tmp/work/x86-64-v3-poky-linux/ptest-
> runner/2.5.1/recipe-sysroot --system --no-create -home --home / --
> user-group ptest]
>  useradd: cannot open /etc/passwd
>  ERROR: ptest-runner: useradd command did not succeed.
> 
> Anyway, I see in another patch, you switched from '--root' to '--
> prefix', so I guess this patch is not needed after the switch.

I did suspect it was working around some issue but the patch does not
explain what and in theory it should be no change. I therefore sent a
"remove it " patch to work out if it was still needed after 12 years
and if so, what the real issue was.

It turns out that shadow-native on systems using fortify source would
break when building something like ptest-runner. Initially I tested on
a system without fortify source where you don't see the issue.

Looking at the useradd binary from shadow, it was optimising open() to
call __open_2(), and it turns out we're missing a wrapper for that in
pseudo.

I've therefore added it to pseudo and that should remove the need for
the patch. A local test on a system I reproduced it on did show it
being fixed.

We still needed to do this even with the --prefix change, I'll probably
hold off that until the next development cycle though.

Cheers,

Richard



  reply	other threads:[~2026-04-22  6:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 10:41 [PATCH 1/3] pseudo: Update to 1.7.4 Richard Purdie
2026-04-21 10:41 ` [PATCH 2/3] shadow: Disable tallylog execution Richard Purdie
2026-04-21 11:00   ` Patchtest results for " patchtest
2026-04-21 10:41 ` [PATCH 3/3] shadow: Drop pointless patch Richard Purdie
2026-04-22  5:51   ` [OE-core] " ChenQi
2026-04-22  6:44     ` Richard Purdie [this message]
2026-04-21 11:41 ` [OE-core] [PATCH 1/3] pseudo: Update to 1.7.4 Yoann Congal

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=8c39da9ca3535ca2fd4c6a4b69e0de4072ffdec8.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Qi.Chen@windriver.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