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:08:58
Message-Id: 20161123100840.584d0de3.mgorny@gentoo.org
In Reply to: [gentoo-dev] RFC: Userkit.eclass by "Manuel Rüger"
1 On Wed, 23 Nov 2016 09:44:33 +0100
2 Manuel Rüger <mrueg@g.o> wrote:
3
4 > I have not started to write it, but I am considering it and rather want
5 > to gather feedback on my idea first.
6 > I am aware that https://wiki.gentoo.org/wiki/GLEP:27 exists, but as of
7 > right now I haven't seen anyone working on it. The goal of this eclass
8 > is to improve user/group handling without touching the PMS.
9 >
10 > tl;dr: Userkit eclass will improve the user handling by externalizing
11 > the configuration to variables that can be set from outside of the ebuild.
12 >
13 > Userkit.eclass will inherit user.eclass and require bash arrays
14 > USERKIT_USER and USERKIT_GROUP for configuration.
15 > I will export a pkg_setup with the corresponding setup (basically
16 > calling enewuser and enewgroup). It will provide get_user, get_uid,
17 > get_group, get_gid and get_home functions.
18 > This would allow to do something like "fowners $(get_user):$(get_group)
19 > foo".
20 >
21 > If ${CATEGORY}-${PN}_user and ${CATEGORY}-${PN}_group are set, these
22 > will replace the contents of USERKIT_USER and USERKIT_GROUP, allowing
23 > the user to fully define everything user/group related.
24
25 How does that all map to multiple users/groups? How does that map to
26 USE-conditional users/groups? How does that map to users/groups shared
27 between multiple packages?
28
29 Besides, this sounds a lot like games.eclass... will developers be
30 required to patch upstream software now to force support for using
31 custom users/groups?
32
33 > What happens if the ebuild wants to create multiple users/group?
34 > Currently, I want to ignore that case and focus on the 80% ebuilds that
35 > can profit from such an eclass.
36
37 Do you have specific numbers? I don't see 80% of ebuilds caring about
38 users/groups. I don't see the problem you are trying to fix.
39
40 Is it one of those problems that someone thinks it's awesome to make
41 everything declaratory, and add tons of middleware to make the
42 declaratory work somehow for the most common use cases?
43
44 --
45 Best regards,
46 Michał Górny
47 <http://dev.gentoo.org/~mgorny/>

Replies

Subject Author
Re: [gentoo-dev] RFC: Userkit.eclass "Manuel Rüger" <mrueg@g.o>
Re: [gentoo-dev] RFC: Userkit.eclass Daniel Campbell <zlg@g.o>