Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v3 00/19] User/group packages
Date: Sun, 09 Jun 2019 11:28:29
Message-Id: 20190609112814.15907-1-mgorny@gentoo.org
1 Hello,
2
3 Here's another major iteration of user/group package implementation
4 proposal. There were some major design changes, so probably best
5 to review from scratch.
6
7 Notable changes in user.eclass:
8
9 - Darwin support has been removed. It is unused and has been broken
10 for a long time.
11
12 - Support for *BSD remains as it is working and we can test those
13 platforms easily (it's needed for Gentoo/FBSD).
14
15 - esetshell counterpart to egetshell has been added.
16
17 - egetusername and egetgroupname utility functions for UID/GID→name
18 conversion have been added.
19
20 - egetcomment and esetcomment functions for passwd comment field
21 have been added.
22
23 - egetgroups and esetgroups functions for getting and altering group
24 membership have been added.
25
26
27 Notable changes common to both acct-* eclasses:
28
29 - ACCT_*_NAME internal variables has been added for readability
30 and possible future extension (to avoid using PN to mean user/group
31 name).
32
33 - Detecting UID/GID mismatch or conflict for ACCT_*_ENFORCE_ID has been
34 fixed to work correctly. It no longer fails if the user/group
35 exists already with the correct UID/GID, and now fails if it exists
36 with another UID/GID.
37
38
39 Notable changes in acct-user.eclass:
40
41 - ACCT_USER_GROUPS is now obligatory. After all, there is no
42 well-defined concept of user without a primary group.
43
44 - Account locking (on removal) and unlocking (on reinstall) is now
45 supported. On Linux and FreeBSD it uses both password locking (which
46 should lock the account if sysadmin set any password for it)
47 and expiration (which locks access completely). Also shell is forced
48 to nologin for locked accounts.
49
50 - Account home directory, shell and group memberships are now updated
51 on install. This is needed for unlocking but will also help clean up
52 bad previous designs (see: 'git' user).
53
54 - The comment for newly created accounts is now set from DESCRIPTION,
55 making it possible to properly describe account purposes. On removal,
56 the removal date is appended to the comment.
57
58
59 Please review. I'll send a GLEP update too shortly.
60
61 --
62 Best regards,
63 Michał Górny
64
65
66 Michał Górny (19):
67 user.eclass: Remove dead/broken Darwin support
68 user.eclass: NetBSD has 'getent'
69 user.eclass: Do not create user-group automatically
70 user.eclass: Prevent automated home creation in useradd
71 user.eclass: Support disabling home directory creation
72 user.eclass: Support forcing specified UID/GID
73 user.eclass: Die if no free UID/GID is found
74 user.eclass: Factor out finding nologin into separate function
75 user.eclass: Introduce esetshell
76 user.eclass: Introduce eget{user,group}name
77 user.eclass: Also permit using functions in pkg_*rm phases
78 user.eclass: Support getting & setting comment field
79 user.eclass: Introduce e{get,set}groups
80 acct-group.eclass: A new eclass to maintain group accounts
81 acct-user.eclass: A new eclass to maintain user accounts
82 acct-user.eclass: Supporting locking & unlocking accounts
83 acct-group/ftp: Add 'ftp' group (GID 21)
84 acct-user/ftp: Add 'ftp' user (UID 21)
85 net-ftp/ftpbase: Utilize {group,user}/ftp
86
87 acct-group/ftp/ftp-0.ebuild | 8 +
88 acct-group/ftp/metadata.xml | 5 +
89 acct-user/ftp/ftp-0.ebuild | 13 +
90 acct-user/ftp/metadata.xml | 5 +
91 eclass/acct-group.eclass | 124 ++++++++
92 eclass/acct-user.eclass | 376 ++++++++++++++++++++++++
93 eclass/user.eclass | 387 ++++++++++++++++++++-----
94 net-ftp/ftpbase/ftpbase-0.01-r3.ebuild | 39 +++
95 profiles/categories | 2 +
96 9 files changed, 890 insertions(+), 69 deletions(-)
97 create mode 100644 acct-group/ftp/ftp-0.ebuild
98 create mode 100644 acct-group/ftp/metadata.xml
99 create mode 100644 acct-user/ftp/ftp-0.ebuild
100 create mode 100644 acct-user/ftp/metadata.xml
101 create mode 100644 eclass/acct-group.eclass
102 create mode 100644 eclass/acct-user.eclass
103 create mode 100644 net-ftp/ftpbase/ftpbase-0.01-r3.ebuild
104
105 --
106 2.22.0.rc3

Replies

Subject Author
[gentoo-dev] [PATCH v3 01/19] user.eclass: Remove dead/broken Darwin support "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 02/19] user.eclass: NetBSD has 'getent' "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 03/19] user.eclass: Do not create user-group automatically "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 04/19] user.eclass: Prevent automated home creation in useradd "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 05/19] user.eclass: Support disabling home directory creation "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 06/19] user.eclass: Support forcing specified UID/GID "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 07/19] user.eclass: Die if no free UID/GID is found "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 08/19] user.eclass: Factor out finding nologin into separate function "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 09/19] user.eclass: Introduce esetshell "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 10/19] user.eclass: Introduce eget{user,group}name "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 11/19] user.eclass: Also permit using functions in pkg_*rm phases "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 12/19] user.eclass: Support getting & setting comment field "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 13/19] user.eclass: Introduce e{get,set}groups "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 14/19] acct-group.eclass: A new eclass to maintain group accounts "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 15/19] acct-user.eclass: A new eclass to maintain user accounts "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 16/19] acct-user.eclass: Supporting locking & unlocking accounts "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 17/19] acct-group/ftp: Add 'ftp' group (GID 21) "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 18/19] acct-user/ftp: Add 'ftp' user (UID 21) "Michał Górny" <mgorny@g.o>
[gentoo-dev] [PATCH v3 19/19] net-ftp/ftpbase: Utilize {group,user}/ftp "Michał Górny" <mgorny@g.o>