openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Louis Rannou <lrannou@baylibre.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	tgamblin@baylibre.com,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [RFC] incorrect parsing of sysusers.d in rootfs generation
Date: Thu, 8 Jun 2023 13:56:46 +0200	[thread overview]
Message-ID: <74576333-4bd3-dcd8-b581-85e1bc289e41@baylibre.com> (raw)
In-Reply-To: <c914f55e1cf6a1ef38a2c683d42ba315a204a182.camel@linuxfoundation.org>



On 08/06/2023 12:36, Richard Purdie wrote:
> On Thu, 2023-06-08 at 12:28 +0200, Louis Rannou wrote:
>> Hello,
>>
>> On 08/06/2023 11:19, Richard Purdie wrote:
>>> On Wed, 2023-06-07 at 17:16 +0200, Louis Rannou wrote:
>>>> Hello again,
>>>>
>>>> a python solution could be one below.
>>>>
>>>> Also, I found that most of users/groups defined there are redundant as
>>>> they already exist (such as root). I guess they are defined from
>>>> base-passwd. I am not sure which recipe (base-passwd or systemd) should
>>>> have the precedence on this. If it's base-passwd, perhaps this
>>>> postcommand should check first if the user does already exist.
>>>
>>> I'd say base-passwd should likely be the winner but we should probably
>>> error if there is a conflict between what sysusers.d and base-passwd
>>> are defining.
>> There will be some conflict. As an example the root home directory in
>> sysusers.d is /root.
>>
>> Some others users/groups defined in sysusers.d files are already created
>> in recipes with the useradd class (such as systemd-resolved,
>> systemd-network who are defined in the systemd recipe).
>>
>> In the end, almost all users/groups in sysusers.d/* already exist.
>> Perhaps it's a wrong way to parse this file to add users. In my opinion,
>> we should only parse this file to check users/groups are already created
>> and raise an error if one is missing.
> 
> Perhaps lets start there. The fact different bits of systemd are
> configured with different home directories is a problem we should
> really fix though and ultimately that probably should be an error too.

Concerning the root home directory, I asked a question to systemd 
https://github.com/systemd/systemd/issues/27959 and LP answered he 
doesn't want to support a customizable root home directory.

Should we patch systemd to match our configuration, or should we change 
our configuration to match systemd's will...

Louis


  reply	other threads:[~2023-06-08 11:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 15:55 [RFC] incorrect parsing of sysusers.d in rootfs generation Louis Rannou
2023-06-07 15:16 ` Louis Rannou
2023-06-08  9:19   ` [OE-core] " Richard Purdie
2023-06-08 10:28     ` Louis Rannou
2023-06-08 10:36       ` Richard Purdie
2023-06-08 11:56         ` Louis Rannou [this message]
2023-06-09 11:06           ` Louis Rannou

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=74576333-4bd3-dcd8-b581-85e1bc289e41@baylibre.com \
    --to=lrannou@baylibre.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=tgamblin@baylibre.com \
    /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;
as well as URLs for NNTP newsgroup(s).