acct-group.eclass
Description
This eclass represents and creates a single group entry. The name
of the group is derived from ${PN}
, while (preferred) GID needs to
be specified via ACCT_GROUP_ID
. Packages (and users) needing the group
in question should depend on the package providing it.
Example:
If your package needs group 'foo', you create acct-group/foo
package
and add an ebuild with the following contents:
EAPI=8
inherit acct-group
ACCT_GROUP_ID=200
Then you add appropriate dependencies to your package. Note that
the build system might need to resolve names, too. The dependency
type(s) should be: BDEPEND
if the group must be resolvable at build
time (e.g. fowners
uses it in src_install
), IDEPEND
if it must be
resolvable at install time (e.g. fowners
uses it in pkg_preinst
),
and RDEPEND
in every case.
Functions
- acct-group_pkg_pretend
-
Performs sanity checks for correct eclass usage, and early-checks whether requested GID can be enforced.
- acct-group_src_install
-
Installs
sysusers.d
file for the group. - acct-group_pkg_preinst
-
Creates the group if it does not exist yet.
Variables
- ACCT_GROUP_ID (REQUIRED)
-
Preferred GID for the new group. This variable is obligatory, and its value must be unique across all group packages. This can be overriden in
make.conf
throughACCT_GROUP_<UPPERCASE_USERNAME>_ID
variable.Overlays should set this to -1 to dynamically allocate GID. Using -1 in ::gentoo is prohibited by policy.
- ACCT_GROUP_ENFORCE_ID
-
If set to a non-null value, the eclass will require the group to have specified GID. If the group already exists with another GID, or the GID is taken by another group, the install will fail.
Maintainers
Michał Górny <mgorny@gentoo.org>
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/