Add eclass which overrides existing portage mechanisms for UID/GID management.

In accordance with http://www.gentoo.org/proj/en/glep/glep-0027.html, this
patch adds a mechanism for managing UIDs and GIDs centrally and consistently
in a build environment. Users and groups are managed by a tree of files
containing key:value pairs as discussed in the GLEP. Examples and more
can be found in the profiles/base/accounts/README.

CQ-DEPEND=CL:181874,CL:182560
BUG=chromium:205164
TEST=FAIL: create a group with an already-used GID
TEST=FAIL: create a group not mentioned in profile/
TEST=FAIL: create a group with a different GID than is specified in profile/
TEST=FAIL: create a group with default GID, and none is specified in profile/
TEST=GOOD: create a group with default GID, profile/ specifies
TEST=GOOD: create a group with same GID that profile/ specifies
TEST=GOOD: create a group with given GID, and none is specified in profile/

TEST=FAIL: create a user with an already-used UID
TEST=FAIL: create a user not mentioned in profile/
TEST=FAIL: create a user with a different UID than is specified in profile/
TEST=FAIL: create a user with default UID, and none is specified in profile/
TEST=GOOD: create a user with default UID (none, or -1), profile/ specifies
TEST=GOOD: create a user with same UID that profile/ specifies
TEST=GOOD: create a user with given UID, and none is specified in profile/
TEST=lumpy-paladin trybot: http://chromegw/i/chromiumos.tryserver/builders/lumpy-paladin/builds/1487
TEST=x86-generic-full trybot: http://chromegw/i/chromiumos.tryserver/builders/x86-generic-full/builds/1038
TEST=chromiumos-sdk trybot: http://chromegw/i/chromiumos.tryserver/builders/chromiumos-sdk/builds/1032

Change-Id: I2a7013769b1ca44a1cb6253bdd602eea23654192
Reviewed-on: https://chromium-review.googlesource.com/179894
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
141 files changed
tree: 1b4cdf7dc80d8b392f4949541082a2a0a4a15dea
  1. eclass/
  2. metadata/
  3. profiles/