André Draszik
1b00c47aca
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.
(From OE-Core rev: fc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d)
Signed-off-by: André Draszik <adraszik@tycoint.com >
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org >
2017-09-25 14:14:17 +01:00
..
2017-06-14 10:18:28 +01:00
2017-06-06 19:52:25 +01:00
2014-02-28 14:01:16 +00:00
2017-07-30 08:46:19 +01:00
2017-07-21 22:51:38 +01:00
2016-08-25 23:03:45 +01:00
2012-09-10 13:01:46 +01:00
2016-12-22 08:50:17 +00:00
2017-04-14 09:47:08 +01:00
2017-04-13 10:54:09 +01:00
2015-02-17 13:43:38 +00:00
2017-01-09 13:39:11 +00:00
2017-08-23 14:16:01 +01:00
2016-12-16 10:23:23 +00:00
2017-03-01 23:27:10 +00:00
2017-07-17 14:01:36 +01:00
2016-12-16 10:23:23 +00:00
2013-10-26 15:59:13 +01:00
2017-05-23 17:45:36 +01:00
2017-08-09 09:24:15 +01:00
2017-01-09 13:39:11 +00:00
2016-12-16 10:23:23 +00:00
2017-06-28 20:55:08 +01:00
2017-03-24 23:43:32 +00:00
2015-10-29 07:31:17 +00:00
2017-06-12 15:08:31 +01:00
2015-10-29 07:31:17 +00:00
2017-09-21 09:24:24 +01:00
2017-07-06 14:38:15 +01:00
2017-04-10 23:00:44 +01:00
2017-09-05 15:01:02 +01:00
2016-12-16 10:23:23 +00:00
2015-10-01 07:43:36 +01:00
2017-06-06 19:02:43 +01:00
2017-09-18 11:07:29 +01:00
2017-04-19 10:18:43 +01:00
2016-12-16 10:23:23 +00:00
2017-08-16 00:03:13 +01:00
2017-07-17 14:01:36 +01:00
2016-12-16 10:23:23 +00:00
2017-03-31 10:10:30 +01:00
2017-06-09 17:12:14 +01:00
2017-07-08 13:34:45 +01:00
2017-03-27 11:08:34 +01:00
2017-03-31 10:10:29 +01:00
2017-09-21 09:24:24 +01:00
2017-01-19 22:47:20 +00:00
2017-01-20 11:53:51 +00:00
2017-01-09 13:39:11 +00:00
2017-01-20 11:53:51 +00:00
2017-08-30 11:14:25 +01:00
2017-01-20 11:53:51 +00:00
2015-08-24 23:46:53 +01:00
2017-06-28 15:52:17 +01:00
2017-09-21 09:05:50 +01:00
2017-09-14 11:35:45 +01:00
2016-09-14 22:22:08 +01:00
2017-01-23 12:05:17 +00:00
2017-08-03 11:14:13 +01:00
2017-01-20 11:53:51 +00:00
2017-09-11 17:30:28 +01:00
2017-01-20 11:53:49 +00:00
2017-01-20 11:53:51 +00:00
2017-07-21 22:51:37 +01:00
2017-07-27 22:36:52 +01:00
2017-09-12 23:55:29 +01:00
2017-03-22 11:35:21 +00:00
2017-02-19 06:49:00 -08:00
2017-09-21 09:24:25 +01:00
2016-03-10 23:13:54 +00:00
2017-08-16 00:03:15 +01:00
2017-09-21 09:24:25 +01:00
2017-09-13 22:07:43 +01:00
2017-04-20 07:55:26 +01:00
2017-09-25 14:14:17 +01:00
2017-09-25 14:14:17 +01:00
2016-12-16 10:23:23 +00:00
2017-09-12 23:55:28 +01:00
2017-09-25 14:14:17 +01:00
2017-09-25 14:14:17 +01:00
2017-08-24 13:48:10 +01:00
2017-09-21 09:24:25 +01:00
2017-01-28 23:32:16 +00:00
2013-01-07 11:09:42 +00:00
2016-12-16 10:23:23 +00:00
2016-12-16 10:23:23 +00:00
2017-08-31 23:30:03 +01:00
2014-12-21 12:37:53 +00:00
2017-07-08 13:34:46 +01:00
2017-07-17 14:01:37 +01:00
2015-07-16 15:09:24 +01:00
2016-10-28 16:15:19 +01:00
2014-07-03 17:41:16 +01:00
2016-12-16 10:23:23 +00:00
2016-12-16 10:23:23 +00:00
2017-01-20 11:53:51 +00:00
2017-08-30 11:14:26 +01:00
2015-11-24 15:50:27 +00:00
2017-07-30 08:46:19 +01:00
2017-02-15 09:29:55 -08:00
2017-03-31 10:10:29 +01:00
2017-06-23 11:44:13 +01:00
2017-06-22 09:16:00 +01:00
2017-06-12 15:08:32 +01:00
2016-05-30 15:58:11 +01:00
2017-03-22 11:35:20 +00:00
2016-12-16 10:23:23 +00:00
2017-08-30 11:14:26 +01:00
2017-09-11 17:30:28 +01:00
2017-09-11 17:30:28 +01:00
2017-08-17 00:21:14 +01:00
2017-02-15 09:29:55 -08:00
2017-09-18 11:07:29 +01:00
2016-12-16 10:23:23 +00:00
2017-08-18 10:40:27 +01:00
2017-04-12 15:09:58 +01:00
2017-02-07 14:50:09 +00:00
2017-06-12 15:08:31 +01:00
2012-07-26 14:56:20 +01:00
2017-04-19 10:18:43 +01:00
2012-10-18 12:13:12 +01:00
2017-08-16 00:03:13 +01:00
2017-09-18 11:07:29 +01:00
2012-09-02 05:52:06 -07:00
2016-12-16 10:23:23 +00:00
2013-06-14 12:55:47 +01:00
2015-11-24 15:50:25 +00:00
2017-03-04 23:18:19 +00:00
2016-06-01 12:38:41 +01:00
2017-09-14 11:35:46 +01:00
2016-06-01 12:38:41 +01:00
2017-09-14 11:35:46 +01:00
2017-01-09 13:39:11 +00:00
2017-08-31 17:41:42 +01:00
2017-04-05 23:22:11 +01:00
2017-02-09 10:52:03 +00:00
2017-01-31 23:47:33 +00:00
2016-02-02 14:44:16 +00:00
2017-08-18 23:46:37 +01:00
2017-01-20 11:53:48 +00:00
2017-08-16 00:03:14 +01:00
2017-06-22 09:16:00 +01:00
2017-03-14 14:42:17 +00:00
2017-03-28 08:43:13 +01:00
2017-09-05 15:01:01 +01:00
2017-07-30 08:46:19 +01:00
2017-09-22 17:15:29 +01:00
2016-09-24 07:30:10 +01:00
2015-06-08 17:34:04 +01:00
2017-07-08 13:34:45 +01:00
2016-12-16 10:23:23 +00:00
2017-08-16 00:03:15 +01:00
2017-08-18 23:46:37 +01:00
2017-01-23 12:05:17 +00:00
2017-07-30 08:46:19 +01:00
2016-12-16 10:23:23 +00:00
2017-09-18 11:07:29 +01:00
2017-09-25 14:14:17 +01:00
2017-02-15 09:29:55 -08:00
2017-08-03 11:14:13 +01:00
2017-02-15 09:29:55 -08:00
2017-03-13 09:42:09 +00:00
2017-06-02 13:36:14 +01:00
2016-01-11 23:26:29 +00:00
2017-08-23 14:16:01 +01:00
2017-06-09 17:12:15 +01:00
2016-11-06 23:35:35 +00:00
2017-01-09 13:39:11 +00:00
2017-06-12 23:01:22 +01:00
2016-09-23 14:56:39 +01:00
2017-06-28 15:52:17 +01:00
2016-12-16 10:23:23 +00:00
2017-06-14 10:18:30 +01:00
2017-09-25 14:14:17 +01:00
2017-03-17 16:53:05 +00:00
2017-08-03 11:14:13 +01:00
2017-03-04 23:18:19 +00:00
2017-02-15 09:29:55 -08:00
2016-12-17 09:57:04 +00:00
2017-01-26 10:44:27 +00:00
2017-09-25 14:14:17 +01:00
2017-09-18 11:07:30 +01:00
2017-03-22 11:35:19 +00:00
2017-06-14 10:18:28 +01:00
2016-03-12 22:11:44 +00:00
2017-01-19 22:47:20 +00:00