public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: Userkit.eclass
@ 2016-11-23  8:44 Manuel Rüger
  2016-11-23  9:08 ` Michał Górny
                   ` (2 more replies)
  0 siblings, 3 replies; 65+ messages in thread
From: Manuel Rüger @ 2016-11-23  8:44 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1943 bytes --]

Hi everyone,

I have not started to write it, but I am considering it and rather want
to gather feedback on my idea first.
I am aware that https://wiki.gentoo.org/wiki/GLEP:27 exists, but as of
right now I haven't seen anyone working on it. The goal of this eclass
is to improve user/group handling without touching the PMS.

tl;dr: Userkit eclass will improve the user handling by externalizing
the configuration to variables that can be set from outside of the ebuild.

Userkit.eclass will inherit user.eclass and require bash arrays
USERKIT_USER and USERKIT_GROUP for configuration.
I will export a pkg_setup with the corresponding setup (basically
calling enewuser and enewgroup). It will provide get_user, get_uid,
get_group, get_gid and get_home functions.
This would allow to do something like "fowners $(get_user):$(get_group)
foo".

If ${CATEGORY}-${PN}_user and ${CATEGORY}-${PN}_group are set, these
will replace the contents of USERKIT_USER and USERKIT_GROUP, allowing
the user to fully define everything user/group related.

It will also be possible to enable a switch to that makes the ebuild
fail if those are not set, as you then can set those variables first.
Another one allows to make them nops (which is nice for testing the
ebuild via "ebuild $PN test").

My only concerns right now are:
Where to store those ${CATEGORY}-${PN}_user and ${CATEGORY}-${PN}_group?
One solution could be to have another eclass named userkit-data.eclass,
which is empty by default and needs to be forked to an overlay and then
use the eclass-override setting in repos.conf. Unfortunately this will
cause a lot of md5-cache rewrites.
Another solution would be portage/package.env or portage/env.

What happens if the ebuild wants to create multiple users/group?
Currently, I want to ignore that case and focus on the 80% ebuilds that
can profit from such an eclass.

Any thoughts?

Cheers,

Manuel


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 603 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2016-12-05 20:39 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23  8:44 [gentoo-dev] RFC: Userkit.eclass Manuel Rüger
2016-11-23  9:08 ` Michał Górny
2016-11-23  9:19   ` Manuel Rüger
2016-11-23  9:56     ` Michał Górny
2016-11-26  7:39   ` Daniel Campbell
2016-11-28 16:21     ` William L. Thomson Jr.
2016-11-28 18:42       ` Alec Warner
2016-11-28 19:39         ` William L. Thomson Jr.
2016-11-28 23:26           ` M. J. Everitt
2016-12-03  8:21             ` Daniel Campbell
2016-12-03 14:00               ` [gentoo-dev] OT Who runs Gentoo was -> " William L. Thomson Jr.
2016-12-03 14:09                 ` Rich Freeman
2016-12-03 14:20                   ` William L. Thomson Jr.
2016-12-03 14:36                     ` Rich Freeman
2016-12-03 14:57                       ` William L. Thomson Jr.
2016-12-03 16:58                 ` Tobias Klausmann
2016-12-03 17:08                   ` William L. Thomson Jr.
2016-12-03 19:27                     ` Brian Dolbec
2016-12-03 21:49                       ` William L. Thomson Jr.
2016-12-03 21:56                         ` Brian Dolbec
2016-12-03 22:09                           ` William L. Thomson Jr.
2016-12-03 22:34                             ` Rich Freeman
2016-12-03 22:55                               ` William L. Thomson Jr.
2016-12-03 23:01                         ` Robin H. Johnson
2016-12-03 23:30                           ` William L. Thomson Jr.
2016-12-04  7:22                             ` Robin H. Johnson
2016-12-04 14:14                               ` William L. Thomson Jr.
2016-12-04 18:10                               ` james
2016-12-04 22:55                                 ` [gentoo-dev] (OT) Accounting systems: Ledger-CLI vs GNUcash Robin H. Johnson
2016-12-04 23:07                                   ` M. J. Everitt
2016-12-04 23:49                                     ` Robin H. Johnson
2016-12-05  0:03                                       ` M. J. Everitt
2016-12-05  2:47                                         ` Daniel Campbell
2016-12-05 10:01                                           ` Ciaran McCreesh
2016-12-05 15:26                                             ` Ian Stakenvicius
2016-12-05  3:06                                       ` james
2016-12-05  3:10                                         ` M. J. Everitt
2016-12-05 20:39                                           ` james
2016-12-05  1:04                                   ` james
2016-12-05  1:53                                   ` james
2016-12-05  2:44                                 ` [gentoo-dev] OT Who runs Gentoo was -> RFC: Userkit.eclass Daniel Campbell
2016-12-04  7:42                           ` Daniel Campbell
2016-12-04 14:27                             ` William L. Thomson Jr.
2016-12-04 19:45                               ` Ulrich Mueller
2016-12-03 22:40                 ` Alec Warner
2016-12-03 22:57                   ` William L. Thomson Jr.
2016-11-29 15:40           ` [gentoo-dev] " Michael Mol
2016-11-29 21:49             ` William L. Thomson Jr.
2016-11-29 22:49               ` Alan McKinnon
2016-11-29 23:13                 ` William L. Thomson Jr.
2016-11-30  1:18                   ` Alan McKinnon
2016-11-30  4:32                     ` William L. Thomson Jr.
2016-11-30  7:54                   ` Michał Górny
2016-11-30 15:16                     ` William L. Thomson Jr.
2016-11-30 18:22               ` Michael Mol
2016-11-30 18:41                 ` William L. Thomson Jr.
2016-11-30 20:08                   ` Michael Mol
2016-11-30 20:25                     ` William L. Thomson Jr.
2016-11-30 21:38                       ` Michael Mol
2016-11-30 22:27                         ` William L. Thomson Jr.
2016-11-30 15:23       ` William L. Thomson Jr.
2016-11-30 16:53         ` james
2016-11-23 17:46 ` Kent Fredric
2016-11-23 18:00   ` Zac Medico
2016-11-23 18:03 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox