Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: "Manuel Rüger" <mrueg@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Userkit.eclass
Date: Wed, 23 Nov 2016 09:56:53
Message-Id: 20161123105633.5a513b45.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: Userkit.eclass by "Manuel Rüger"
1 On Wed, 23 Nov 2016 10:19:42 +0100
2 Manuel Rüger <mrueg@g.o> wrote:
3
4 > On 23.11.2016 10:08, Michał Górny wrote:
5 > > On Wed, 23 Nov 2016 09:44:33 +0100
6 > > Manuel Rüger <mrueg@g.o> wrote:
7 > >
8 > >> I have not started to write it, but I am considering it and rather want
9 > >> to gather feedback on my idea first.
10 > >> I am aware that https://wiki.gentoo.org/wiki/GLEP:27 exists, but as of
11 > >> right now I haven't seen anyone working on it. The goal of this eclass
12 > >> is to improve user/group handling without touching the PMS.
13 > >>
14 > >> tl;dr: Userkit eclass will improve the user handling by externalizing
15 > >> the configuration to variables that can be set from outside of the ebuild.
16 > >>
17 > >> Userkit.eclass will inherit user.eclass and require bash arrays
18 > >> USERKIT_USER and USERKIT_GROUP for configuration.
19 > >> I will export a pkg_setup with the corresponding setup (basically
20 > >> calling enewuser and enewgroup). It will provide get_user, get_uid,
21 > >> get_group, get_gid and get_home functions.
22 > >> This would allow to do something like "fowners $(get_user):$(get_group)
23 > >> foo".
24 > >>
25 > >> If ${CATEGORY}-${PN}_user and ${CATEGORY}-${PN}_group are set, these
26 > >> will replace the contents of USERKIT_USER and USERKIT_GROUP, allowing
27 > >> the user to fully define everything user/group related.
28 > >
29 > > How does that all map to multiple users/groups? How does that map to
30 > > USE-conditional users/groups? How does that map to users/groups shared
31 > > between multiple packages?
32 > >
33 > simply via calling the function conditional in pkg_setup
34 > My goal is not to focus on handling multiple users/groups. Synchronizing
35 > settings between multiple packages is a task of the user, it doesn't
36 > make any sense to make guesses there. People will come up with wonderful
37 > symlinked solutions.
38 > > Besides, this sounds a lot like games.eclass... will developers be
39 > > required to patch upstream software now to force support for using
40 > > custom users/groups?
41 > I am not aware of any patches that are required. What I care about is
42 > having predictable uid/gid and home for everything I can configure via
43 > an ebuild.
44
45 Wait a minute. So you're talking about configuring UID/GID (as
46 in numbers) and not changing usernames? That's the problem when you
47 jump straight to solutions and don't state the problem -- nobody knows
48 what you're really up to.
49
50 --
51 Best regards,
52 Michał Górny
53 <http://dev.gentoo.org/~mgorny/>