From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] useradd-staticids.bbclass: Support recipes specifying static IDs
Date: Sat, 11 Mar 2017 06:27:58 +0100 [thread overview]
Message-ID: <20170311052758.19671-1-pkj@axis.com> (raw)
If this bblcass is used and a recipe specifies a static ID for a
user/group as part of the USERADD_PARAM_${PN} or GROUPADD_PARAM_${PN},
the build would fail with and error like this if there was no
corresponding ID in the passwd/group files specified via
USERADD_UID_TABLES/USERADD_GID_TABLES:
ERROR: meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb:
meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb inherits
useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
GROUPMEMS_PARAM for package postgresql
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/useradd-staticids.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index a65c3f69cb..9b194df490 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -125,6 +125,7 @@ def update_useradd_static_config(d):
if uaargs.LOGIN not in users:
if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
handle_missing_id(uaargs.LOGIN, 'user', pkg)
+ newparams.append(param)
continue
field = users[uaargs.LOGIN]
@@ -260,6 +261,7 @@ def update_useradd_static_config(d):
if gaargs.GROUP not in groups:
if not gaargs.gid or not gaargs.gid.isdigit():
handle_missing_id(gaargs.GROUP, 'group', pkg)
+ newparams.append(param)
continue
field = groups[gaargs.GROUP]
--
2.12.0
next reply other threads:[~2017-03-11 5:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 5:27 Peter Kjellerstedt [this message]
2017-03-13 13:55 ` [PATCH] useradd-staticids.bbclass: Support recipes specifying static IDs Mark Hatle
2017-03-13 16:11 ` Peter Kjellerstedt
2017-03-13 16:50 ` Mark Hatle
2017-03-14 0:47 ` Peter Kjellerstedt
2017-03-14 1:35 ` Mark Hatle
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=20170311052758.19671-1-pkj@axis.com \
--to=peter.kjellerstedt@axis.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