1 |
On Thu, Jan 29, 2004 at 10:03:48AM +0100, Paul de Vrieze wrote: |
2 |
> Basically I think we need a way to just say "ensureUser heartbeat" or |
3 |
> "ensureGroup heartbeat" which will add a user/group with that name if |
4 |
> not available through nsswitch. It should probably call an |
5 |
> adduser/addgroup script to add the user/group. |
6 |
enewuser and enewgroup already have this functionality (they only add it |
7 |
if it doesn't already exist). |
8 |
|
9 |
> Ebuilds should not depend on specific numbers. If there are ebuilds |
10 |
> that want the existence of the user to exist at compilation time we |
11 |
> might need to have a way to do it before compiling (and before |
12 |
> installation too). Applications that want to know the numeric uid/gid |
13 |
> should be patched to retrieve it based on a username / groupname |
14 |
> instead. |
15 |
I'm sorry, but that is wrong, for several reasons. While it is definetly |
16 |
true that packages shouldn't have hardcoded numeric uid/gid in the |
17 |
package, actually really do want specific numeric uid/gid in the |
18 |
ebuilds, or somewhere within the control of the distribution. The |
19 |
simplest of cases for this is GRP. For example: Take qmail as a package, |
20 |
and say it's users weren't already in baselayout (where they are |
21 |
presently), but rather assigned the next available values when |
22 |
pkg_preinst is done. Tar stores uid/gids numerically as opposed to |
23 |
names, so there is no gaurentee that install accross two systems at |
24 |
different stages will produce a installed package that works. Doing lots |
25 |
of chown calls after the package is merged, while possible, is more of a |
26 |
pain in the posterior than anything else. |
27 |
|
28 |
Another problem case is applications that resolve usernames/groupnames |
29 |
into numeric values at compile time, they also won't take kindly to |
30 |
being moved over systems as compiled packages, when the uid/gid values |
31 |
vary. |
32 |
|
33 |
One final case, more for convenience in data recovery than anything |
34 |
else. Say you loose your /etc/passwd and /etc/group due to some reason |
35 |
(filesystem corruption, user error, etc.), but /usr and /var are |
36 |
still intact, distribution constant uid/gid values make recovery a |
37 |
_lot_ easier. |
38 |
|
39 |
-- |
40 |
Robin Hugh Johnson |
41 |
E-Mail : robbat2@××××××××××××××.net |
42 |
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 |
43 |
ICQ# : 30269588 or 41961639 |
44 |
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 |