public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Qi.Chen@windriver.com
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][PATCH 3/3] rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_check
Date: Wed, 27 Dec 2023 12:20:36 +0800	[thread overview]
Message-ID: <20231227042036.2376255-3-Qi.Chen@windriver.com> (raw)
In-Reply-To: <20231227042036.2376255-1-Qi.Chen@windriver.com>

From: Chen Qi <Qi.Chen@windriver.com>

The check was forcing every field to be identical, this is too
strict. For example, if the comment differs, there's really no
impact. For example, root user's comment is 'root' in passwd,
and it's 'Super User' in sysusers.d/basic.conf. Such difference is
not worth a warning. In fact, previous codes use 'lower()' to
avoid warning between 'nobody' and 'Nobody', and what's more, another
patch puts its own basic.conf.in in systemd's SRC_URI, but it changes
'Super User' to 'root'. Such changes are all unnecessary. We should
just ignore comment mismatch.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes-recipe/rootfs-postcommands.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass
index 29ee74932a..f996b6c71a 100644
--- a/meta/classes-recipe/rootfs-postcommands.bbclass
+++ b/meta/classes-recipe/rootfs-postcommands.bbclass
@@ -111,12 +111,11 @@ def compare_users(user, e_user):
     # user and e_user must not have None values. Unset values must be '-'.
     (name, uid, gid, comment, homedir, ushell) = user
     (e_name, e_uid, e_gid, e_comment, e_homedir, e_ushell) = e_user
-    # Ignore 'uid', 'gid' or 'comment' if they are not set
+    # Ignore 'uid', 'gid' or 'homedir' if they are not set
     # Ignore 'shell' and 'ushell' if one is not set
     return name == e_name \
         and (uid == '-' or uid == e_uid) \
         and (gid == '-' or gid == e_gid) \
-        and (comment == '-' or e_comment == '-' or comment.lower() == e_comment.lower()) \
         and (homedir == '-' or e_homedir == '-' or homedir == e_homedir) \
         and (ushell == '-' or e_ushell == '-' or ushell == e_ushell)
 
-- 
2.34.1



  parent reply	other threads:[~2023-12-27  4:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  4:20 [OE-core][PATCH 1/3] systemd: upgrade to 255.1 Qi.Chen
2023-12-27  4:20 ` [OE-core][PATCH 2/3] systemd-boot: " Qi.Chen
2023-12-27  4:20 ` Qi.Chen [this message]
2023-12-27 11:59 ` [OE-core][PATCH 1/3] systemd: " Alexandre Belloni
2023-12-28  3:00   ` Chen, Qi
2023-12-28  3:19     ` Khem Raj
2023-12-28  3:32       ` Chen, Qi
2023-12-28 21:14     ` Alexandre Belloni
2023-12-29  2:38       ` ChenQi
2023-12-29  8:03         ` Alexander Kanavin
2023-12-29 10:48           ` Chen, Qi
2024-01-05 16:01 ` Alexandre Belloni
2024-01-07 14:05   ` Chen, Qi
2024-01-09  7:47     ` Alexandre Belloni
2024-01-09  8:14       ` Chen, Qi
2024-01-19  3:09 ` ChenQi
2024-01-19 18:13   ` Alexandre Belloni
2024-01-19 18:14     ` Alexandre Belloni
2024-01-22  4:38       ` ChenQi
2024-01-22  8:04         ` Alexandre Belloni
2024-01-22  8:15           ` ChenQi
2024-01-22  8:18             ` Alexandre Belloni

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=20231227042036.2376255-3-Qi.Chen@windriver.com \
    --to=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