Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 479384

Summary: user.eclass does not respect $ROOT when manipulating users / groups (patch supplied)
Product: Gentoo Linux Reporter: Max Hacking <max.gentoo.bugzilla>
Component: EclassesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal CC: arfrever.fta
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to make user.eclass respect $ROOT when manipulating users / groups

Description Max Hacking 2013-08-01 11:16:31 UTC
Created attachment 354806 [details, diff]
Patch to make user.eclass respect $ROOT when manipulating users / groups

When using emerge to install packages to a root other than / the user manipulation functions in user.eclass do not respect the $ROOT variable and thus create / manipulate the users / groups of the host system instead.

The supplied patch resolves this issue.

Patch notes:

1) I have added 

DEPEND="sys-auth/pambase
	sys-apps/shadow"
RDEPEND="${DEPEND}"

to the top of user.eclass as without this merges which use these functions will fail due to missing files in $ROOT/etc/pam.d

2) I have added extra einfo output to make debugging any potential problems easier - feel free to remove these if you wish.

3) These fixes are for Gentoo only and do NOT resolve the problems on other distributions, such as darwin, netbsd, etc.

4) The patch has been well tested as we use it to automate building stages for (automated) Xen VM deployment so we know it works!  :-)

I hope this is of some assistance.  Keep up the good work.
Comment 1 SpanKY gentoo-dev 2013-12-10 23:52:52 UTC

*** This bug has been marked as a duplicate of bug 53269 ***