]> code.ossystems Code Review - openembedded-core.git/commit
systemd: Correct and clean up user/group definitions
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 15 Jan 2019 00:49:05 +0000 (01:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Jan 2019 16:56:33 +0000 (16:56 +0000)
commit419aaf698b2823ec9bb5a94d4605bdcfd8e90142
treea2824096738a93827fde4bd3ddcf713e87cc0bc6
parent2da88ecbbf118bb7440f48184d4b39c273ab57e9
systemd: Correct and clean up user/group definitions

This makes sure that packages are only added to USERADD_PACKAGES if
they will create users/groups. This avoids the following error:

  ERROR: systemd_239.bb: meta/recipes-core/systemd/systemd_239.bb
  inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
  GROUPMEMS_PARAM for package systemd-journal-gateway

Normally this problem is not triggered even if the conditional code that
expands in, e.g., USERADD_PARAM_${PN}-journal-gateway is empty because
it is assigned with += and thus ends up as " ", which fools the check in
useradd.bbclass.

However, if USERADDEXTENSION += "useradd-staticids" and
INHERIT += "extrausers" are used, they cause the problem to occur. The
reason for this is because when useradd-staticids is used, it rewrites
USERADD_PARAM_${PN}-journal-gateway, which strips unnecessary whitespace
and thus USERADD_PARAM_${PN}-journal-gateway becomes empty. And
extrausers is needed, because otherwise the test in useradd.bbclass is
triggered before useradd-staticids has rewritten the variables...

(From OE-Core rev: 63ae444b1dba65ccb1693648914becabd65ac30d)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/systemd/systemd_239.bb