1 |
On Tue, Dec 15, 2015 at 6:19 AM, Mike Frysinger <vapier@g.o> wrote: |
2 |
|
3 |
> On 15 Dec 2015 07:28, Ulrich Mueller wrote: |
4 |
> > >>>>> On Tue, 15 Dec 2015, Mike Frysinger wrote: |
5 |
> > |
6 |
> > > On 14 Dec 2015 21:22, Ulrich Mueller wrote: |
7 |
> > >> The spec seems incomplete. I cannot find a description of the user and |
8 |
> > >> group files' format. (But in fact, there is a standard format which |
9 |
> > >> suggests itself, namely that of the passwd(5) and group(5) files.) |
10 |
> > |
11 |
> > > i recall going with xml at the time, but i can't find reference to it. |
12 |
> > |
13 |
> > So the package manager would have to parse XML? We have tried to avoid |
14 |
> > that, so far. |
15 |
> |
16 |
> not entirely accurate considering we have metadata.xml |
17 |
> |
18 |
> > >> Also having whole directory trees seems wasteful and doesn't fit so |
19 |
> > >> well into the existing design of profiles. It might be simpler to put |
20 |
> > >> "user" (or "passwd") and "group" files directly in the profile. |
21 |
> > >> (If directories are really needed, we could use the scheme foreseen |
22 |
> > >> in [1] for package.* and use.* files.) |
23 |
> > |
24 |
> > > we implemented this GLEP in Chromium OS and have been using it for a |
25 |
> while: |
26 |
> > > |
27 |
> https://chromium.googlesource.com/chromiumos/overlays/eclass-overlay/+/master |
28 |
> > |
29 |
> > > having a directory of files is way more user friendly imo and allows |
30 |
> for |
31 |
> > > a format that is easier to read. /etc/passwd and /etc/group format are |
32 |
> > > not that easy to scan and aren't portable. |
33 |
> > |
34 |
> > As we most likely will introduce profile file directories in EAPI 7 |
35 |
> > (see bug 282296), I'd rather use the same scheme for the user and |
36 |
> > group files, but not something different. |
37 |
> |
38 |
> a flat text file akin to /etc/passwd is not readable. xml is readable. |
39 |
> |
40 |
|
41 |
u trollin' bro? |
42 |
|
43 |
|
44 |
> |
45 |
> a markdown like format would work -- easy to parse by machines & humans |
46 |
> and is a single stackable file. |
47 |
> user:ntp |
48 |
> <whitespace>uid:203 |
49 |
> <whitespace>gid:203 |
50 |
> user:man |
51 |
> <whitespace>uid:13 |
52 |
> <whitespace>gid:13 |
53 |
> (using : as delimiter since that's what *NIX uses in /etc/passwd) |
54 |
> |
55 |
> the main one would grow probably to about 2000+ lines (~400 users in the |
56 |
> tree and each entry takes ~4 lines assuming we enforce eliding of defaults) |
57 |
> which isn't that terrible. CrOS has a python script already for validating |
58 |
> the db consistency. |
59 |
> |
60 |
> > >> Also a mechanism how a subprofile could undefine a user or group |
61 |
> > >> defined in its parent seems to be missing. |
62 |
> > |
63 |
> > > what exactly do you mean by that ? you want to make it so attempts to |
64 |
> > > use the account yield an undefined error ? or you want to have it so |
65 |
> > > a child can revert back to an earlier definition ? |
66 |
> > |
67 |
> > The former. |
68 |
> |
69 |
> we already handle this in CrOS by explicitly including a flag in the file: |
70 |
> defunct:true |
71 |
> |
72 |
> thus the PM need not care about the status when locating files or otherwise |
73 |
> include any special handling. if the last file you hit is marked as |
74 |
> defunct, |
75 |
> then enew{user,group} will throw an error when they're called. |
76 |
> -mike |
77 |
> |