| Summary: | useradd.bbclass calls groupmems with unsupported option --prefix | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> | ||||
| Component: | core | Assignee: | Peter Kjellerstedt <peter.kjellerstedt> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | High | CC: | meta.mr.watcher, meta.watcher, peter.kjellerstedt, randy.macleod, richard.purdie, ross.burton | ||||
| Version: | 5.3 | ||||||
| Target Milestone: | 6.1 M1 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
I've assigned this issue to me. Since this feature does not seem to be used by many others while we have more than 300 recipes that rely on GROUPMEMS_PARAM, I believe it makes sense for us to fix it. Created attachment 5214 [details]
WIP patch
This is my work-in-progress. The plan was to step through all the places where "groupmems" appeared and add support for usermod (so that piece can be backported if needed), then delete all the groupmems support and add a deprecation alert on the variable name.
Note that I hadn't yet found all the instances of groupmems in oe-core's code, this is very much _in progress_.
And obviously write a test case for USERMOD_PARAMS so we'd notice if it broke. YP BZ meeting notes: Patch in review. Trying to figure if the backport is possible and/or sensible for the project. |
In master we switched useradd.bbclass to use --prefix instead of --root, but groupmems (as exposed via GROUPMEMS_PARAM) doesn't support this option: NOTE: parsec-service: Running groupmems command with group tss and user parsec groupmems: unrecognized option '--prefix' Usage: groupmems [options] [action] This is used in the parsec recipe in meta-security and nowhere else that I can see. groupmems only supports --root. You could patch groupmems to add --prefix but upstream shadow deleted groupmems recently in 388ce70: */: groupmems(8): Remove program The utility is redundant for root and effectively broken for regular users across major distributions, its continued maintenance adds complexity for little to no benefit. I propose that we delete the GROUPMEMS_PARAM support from the useradd class and replace it with USERMOD_PARAMS that invokes the usermod tool (that does support prefix). The arguments do not match so we can't just keep the variable but change the tool. Tasks: - Add USERMOD_PARAMS variable, callers, and documentation - Delete GROUPMEMS_PARAM and mark as replaced by USERMOD_PARAMS - Add test case for USERMOD_PARAMS - Update parsec recipe