Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP] User and group management via dedicated packages
Date: Wed, 29 May 2019 15:55:16
Message-Id: fd7ce6aa-7cb5-e619-c91f-cdb724cb54de@gentoo.org
In Reply to: Re: [gentoo-dev] [pre-GLEP] User and group management via dedicated packages by Ulrich Mueller
1 On 5/29/19 4:01 AM, Ulrich Mueller wrote:
2 >
3 > I wonder why that would be needed. It won't catch collisions with users
4 > created by the system administrator.
5
6 The reference implementation did its best not to annoy you here.
7 Ultimately, no, it can't prevent the system administrator from
8 clobbering a UID that some package needs. But, most packages won't
9 insist on a fixed UID. If they do, and if the system administrator
10 created a "compatible" user (one that doesn't conflict with any of your
11 useradd arguments), then the existing user account would be reused.
12
13
14 > Collisions between packages could
15 > certainly be prevented without littering the file system, e.g., by
16 > scanning ebuilds in that category (by repoman, or CI)?
17 >
18
19 Memory hazy, but I think I ventured down this road for a few reasons:
20
21 * Using file collisions is a PMS behavior that will work everywhere.
22 * Parsing bash variables in repoman/CI sucks and doesn't work.
23 * We want to be warned about the collision during development, before
24 we push to ::gentoo.
25 * We should prevent collisions in overlays, too.
26 * The UID that actually gets created may not be the one in your
27 ebuild, if it wasn't available. The real UID is only known at
28 install-time. (This one is important IIRC.)