pkgcheck.checks.acct module

Various checks for acct-group and acct-user packages.

class pkgcheck.checks.acct.AcctCheck(*args)[source]

Bases: GentooRepoCheck, RepoCheck

Various checks for acct-* packages.

Verify that acct-* packages do not use conflicting, invalid or out-of-range UIDs/GIDs. This check uses a special file metadata/qa-policy.conf located within the repository. It should contain a user-group-ids section containing two keys: uid-range and gid-range, which consist of a comma separated list, either <n> for a single value or <m>-<n> for a range of values (including both ends). In case this file doesn’t exist or is wrongly defined, this check is skipped.

feed(pkg)[source]

Handle functionality against the passed in item.

finish()[source]

Do cleanup and yield final results here.

known_results = frozenset({<class 'pkgcheck.checks.acct.ConflictingAccountIdentifiers'>, <class 'pkgcheck.checks.acct.MissingAccountIdentifier'>, <class 'pkgcheck.checks.acct.OutsideRangeAccountIdentifier'>})
load_ids_from_configuration(repo)[source]
parse_config_id_range(config: ConfigParser, config_key: str)[source]
scope = <PackageScope desc='repo' @0x7fc9bedc9d90>
class pkgcheck.checks.acct.ConflictingAccountIdentifiers(kind, identifier, pkgs)[source]

Bases: Error

Same UID/GID is used by multiple packages.

property desc

Result description.

name = 'ConflictingAccountIdentifiers'
class pkgcheck.checks.acct.MissingAccountIdentifier(var, **kwargs)[source]

Bases: VersionResult, Warning

UID/GID can not be found in account package.

property desc

Result description.

name = 'MissingAccountIdentifier'
class pkgcheck.checks.acct.OutsideRangeAccountIdentifier(kind, identifier, **kwargs)[source]

Bases: VersionResult, Error

UID/GID outside allowed allocation range.

To view the range accepted for this repository, look at the file metadata/qa-policy.conf in the section user-group-ids.

property desc

Result description.

name = 'OutsideRangeAccountIdentifier'