Summary: | user.eclass: enewgroup() does not respect ROOT= | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joakim Tjernlund <joakim.tjernlund> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | dschridde+gentoobugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Joakim Tjernlund
2014-07-21 18:20:17 UTC
The same goes for useradd which also has a --root option hmm, just did a test with --root option and it turns out that groupadd really tries to do a chroot so it will fail again. Got an idea, use sys-apps/proot to bind mount $ROOT/etc over /etc and then run group add: proot -0 --bind=${ROOT}/etc:/etc /usr/sbin/groupadd -r ${opts} "${egroup}" || die This actually works! Should be usable for all group/user related tasks. What do you think of using proot in user.eclass? proot is only avaliaable on x86/amd64 so that won't work well. Wrapping the groupadd call in: if [[ ${ROOT} == / ]] ; then .. fi would be apropiate though, with some msg that groupadd has been skipped. same for enewuser etc. No comment so far, anyone home ? |