On Wed, Sep 11, 2013 at 12:27 PM, Klaus Aehlig <[email protected]> wrote:
> Upon build time, also generate, in the directory doc/users, files > containing the groups, the users with their primary group, and the > additional groupmemberships to be added. In this way, packages can use > their own way of adding users to the system, instead of telling the > adiminstrator to run tools/users-setup. > s/adiminstrator/administrator > Signed-off-by: Klaus Aehlig <[email protected]> > --- > .gitignore | 3 +++ > Makefile.am | 10 ++++++++++ > doc/users/groupmemberships.in | 11 +++++++++++ > doc/users/groups.in | 7 +++++++ > doc/users/users.in | 6 ++++++ > 5 files changed, 37 insertions(+) > create mode 100644 doc/users/groupmemberships.in > create mode 100644 doc/users/groups.in > create mode 100644 doc/users/users.in > > diff --git a/.gitignore b/.gitignore > index be68d6f..eb953d3 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -62,6 +62,9 @@ > /doc/hs-lint.html > /doc/manpages-enabled.rst > /doc/man-*.rst > +/doc/users/groupmemberships > +/doc/users/groups > +/doc/users/users > > # doc/examples > /doc/examples/bash_completion > diff --git a/Makefile.am b/Makefile.am > index 7aef305..2bfb1fe 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -189,6 +189,7 @@ CLEANFILES = \ > $(BUILT_EXAMPLES) \ > doc/examples/bash_completion \ > doc/examples/bash_completion-debug \ > + $(userspecs) \ > lib/_generated_rpc.py \ > $(man_MANS) \ > $(manhtml) \ > @@ -743,12 +744,21 @@ else > exit 1; > endif > > +doc/users/%: doc/users/%.in Makefile $(REPLACE_VARS_SED) > + cat $< | sed -f $(REPLACE_VARS_SED) | LC_ALL=C sort | uniq | (grep > -v '^root' || true) > $@ > + > +userspecs = \ > + doc/users/users \ > + doc/users/groups \ > + doc/users/groupmemberships > I'm a bit curious: why putting these files in doc/users? We currently have some autogenerated files in doc/examples/ and some in tools/, but, as far as I remember, none in doc/. Why not tools/users/, given that currently the user creation script is in tools/? > + > # Things to build but not to install (add it to EXTRA_DIST if it should be > # distributed) > noinst_DATA = \ > $(BUILT_EXAMPLES) \ > doc/examples/bash_completion \ > doc/examples/bash_completion-debug \ > + $(userspecs) \ > $(manhtml) > > if HAS_SPHINX > diff --git a/doc/users/groupmemberships.in b/doc/users/groupmemberships.in > new file mode 100644 > index 0000000..07be505 > --- /dev/null > +++ b/doc/users/groupmemberships.in > @@ -0,0 +1,11 @@ > +@GNTMASTERUSER@ @GNTDAEMONSGROUP@ > +@GNTCONFDUSER@ @GNTDAEMONSGROUP@ > +@GNTLUXIDUSER@ @GNTDAEMONSGROUP@ > +@GNTRAPIUSER@ @GNTDAEMONSGROUP@ > +@GNTMONDUSER@ @GNTDAEMONSGROUP@ > +@GNTMASTERUSER@ @GNTADMINGROUP@ > +@GNTRAPIUSER@ @GNTADMINGROUP@ > +@GNTMASTERUSER@ @GNTCONFDGROUP@ > +@GNTMONDUSER@ @GNTMASTERDGROUP@ > +@GNTLUXIDUSER@ @GNTMASTERDGROUP@ > +@GNTLUXIDUSER@ @GNTCONFDGROUP@ > diff --git a/doc/users/groups.in b/doc/users/groups.in > new file mode 100644 > index 0000000..09306b5 > --- /dev/null > +++ b/doc/users/groups.in > @@ -0,0 +1,7 @@ > +@GNTDAEMONSGROUP@ > +@GNTADMINGROUP@ > +@GNTMASTERUSER@ > +@GNTRAPIUSER@ > +@GNTCONFDUSER@ > +@GNTLUXIDUSER@ > +@GNTMONDUSER@ > diff --git a/doc/users/users.in b/doc/users/users.in > new file mode 100644 > index 0000000..83b6d32 > --- /dev/null > +++ b/doc/users/users.in > @@ -0,0 +1,6 @@ > +@GNTMASTERUSER@ @GNTMASTERDGROUP@ > +@GNTRAPIUSER@ @GNTRAPIGROUP@ > +@GNTCONFDUSER@ @GNTCONFDGROUP@ > +@GNTLUXIDUSER@ @GNTLUXIDGROUP@ > +@GNTMONDUSER@ @GNTMONDGROUP@ > +@GNTNODEDUSER@ > -- > 1.8.4 > > Thanks, Michele -- Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
