Patchwork [0/2] useradd-staticids

mail settings
Submitter Mark Hatle
Date Feb. 10, 2014, 7:28 p.m.
Message ID <>
Download mbox
Permalink /patch/66535/
State New
Headers show


git:// mhatle/uidgid


Mark Hatle - Feb. 10, 2014, 7:28 p.m.
Someone found a bug with the code already, see the bug information below:

> I'm testing with our current recipes which creates a user has a uid 
> overridden in a configured passwd table file.
> Snippet from
> USERADD_PARAM_${PN} = "--system -s /bin/sh --user-group somename"
> It does not contain any GROUPADD_PARAM_${PN}.
> This build fails since when adding the user 'somename', the group 
> 'somename' can't be found. Activating some commented debugging in the 
> bbclass, you can see these printouts:
> WARNING: Before: 'USERADD_PARAM_somepkg' - '--system -s /bin/sh 
> --user-group somename'
> WARNING: After:  'USERADD_PARAM_somepkg' - '--gid somename --system 
> --shell /bin/sh --uid XX somename'
> What can be seen is that the uid is fetched from the static passwd-file 
> that is configured, however the --user-group flag is lost and no group 
> is created (GROUPADD_PARAM is set to "" (blank) in the 
> run.do_install.useradd_sysroot.<pid>).

As noted above the --user-group flag was being cleared, even in cases where
we did not have enough information to properly clear it.  Refactor the code
in this section of the class..  (The above was used to verify functionality.)

In addition, a second patch cleaned up the error checking and added an
easier way for a developer of this code to see what is happening during initial

The following changes since commit b5b4898cd409036161c62891e9618d9ab3f891f9:

  python-pycurl: upgrade to 7.19.3 (2014-02-08 21:03:27 +0000)

are available in the git repository at:

  git:// mhatle/uidgid

Mark Hatle (2):
  useradd-staticids: Fix groupadd when --user-group is selected
  useradd-staticids: Adjust USERADD_ERROR_DYNAMIC condition and error

 meta/classes/useradd-staticids.bbclass | 58 ++++++++++++++++++++--------------
 1 file changed, 35 insertions(+), 23 deletions(-)