]> code.ossystems Code Review - openembedded-core.git/commit
useradd-staticids: explain how to fix the the problem
authorPatrick Ohly <patrick.ohly@intel.com>
Thu, 19 Oct 2017 07:13:26 +0000 (09:13 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Nov 2017 19:54:22 +0000 (19:54 +0000)
commit883bfc2bbb4d2120dbad6b0f2056503b012b1a2b
tree84ad0c630f0c3cf96c2e8f732cd0dc4fbf2b3cfd
parent9113928cea88c2187e8640ac489671cb81f58103
useradd-staticids: explain how to fix the the problem

When a distro uses useradd-staticids.bbclass and some developer
unfamiliar with the static ID mechanism tries to add a recipe which
needs new IDs, the resulting error or warning is typically not
something that the developer will understand.

Even experienced developers do not get enough information. They first
must find out whether the missing ID is for a system user or group,
then locate the file(s) in which the ID could be added. Both of this
is now part of the message:

ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie -
cronie: system groupname crontab does not have a static ID defined.
Add crontab to one of these files: /.../conf/distro/include/my-distro-group

The case that no file was found is also handled:

ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie -
cronie: system groupname crontab does not have a static ID defined.
USERADD_GID_TABLES file(s) not found in BBPATH: files/group

It would be nice if the error message could also list the range in
which a new ID needs to be allocated, but /etc/login.defs isn't
available at the time of creating the message, so that part is still
something that a developer needs to know.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/useradd-staticids.bbclass