useradd-staticids
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | useradd-staticids: Fix groupadd when --user-group is selectedmeta/ | +30 | 0 replies | |
| 2/2 | useradd-staticids: Adjust USERADD_ERROR_DYNAMIC condition and error messagemeta/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] useradd-staticids
Someone found a bug with the code already, see the bug information below:
Quoted 17 lines
I'm testing with our current recipes which creates a user has a uid overridden in a configured passwd table file.
Snippet from somepkg.bb:
USERADD_PACKAGES= "${PN}"
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'
Quoted 4 lines
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_PARAMis 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 parse.
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://git.yoctoproject.org/poky-contrib mhatle/uidgid
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mhatle/uidgid
Mark Hatle (2):
useradd-staticids: Fix groupadd when --user-group is selected
useradd-staticids: Adjust USERADD_ERROR_DYNAMIC condition and error
message
meta/classes/useradd-staticids.bbclass | 58 ++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 23 deletions(-)
Signature · 1 line
1.8.5.3