summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types_wic.bbclass
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2017-09-22 10:00:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-25 14:14:04 +0100
commitfc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d (patch)
tree4bdfaf43330466cb27ed423c8f2f1754c215ee09 /meta/classes/image_types_wic.bbclass
parent3e80f86b4227f1d6ddd604a0738449d93f01c03f (diff)
downloadopenembedded-core-contrib-fc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d.tar.gz
useradd-staticids: don't create username-group if gid is specified
Adding distcc to an image, and having staticids enabled, doesn't work as it causes a a superfluous 'distcc' group being added using a conflicting GID, thus failing the build: | ERROR: distcc-3.2-r0 do_prepare_recipe_sysroot: distcc: groupadd command did not succeed. Compared to other recipes, the distcc recipe only specifies --gid for the primary group, and doesn't specify --no-user-group, but when --gid is given, it doesn't make sense to create a matching username-group in addition, even if --no-user-group was not specified, and 'useradd' actually complains if --gid and --user-group are given both. If only --gid is given, the current code in here effectively behaves as if --user-group was specified, taking the group-id of the username-group from the --gid parameter. This causes the error above, as we try to add a new group (distcc) with an existing group-id (nogroup). This is contrary to the comment in this file just above, contrary to what useradd can do, contrary to behaviour without the useradd-staticids bbclass, and non-intuitive. Change the code such that a username-group is only created - if a primary group using --gid was not specified, or - if --no-user-group was not specified To be in line with useradd, if gid is not given, and --no-user-group is given, we add the user to the group 'users', which mimics useradd's behaviour. Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image_types_wic.bbclass')
0 files changed, 0 insertions, 0 deletions