From: Klaus Aehlig Date: Tue, 10 Sep 2013 16:00:23 +0000 (+0200) Subject: Provide ganeti user and group data in easy-to-parse form X-Git-Tag: v2.8.0rc3~8 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/d2f465dc45bd581c8c1c0b714b6c0465382e21f9 Provide ganeti user and group data in easy-to-parse form 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 adiministrator to run tools/users-setup. Signed-off-by: Klaus Aehlig Reviewed-by: Michele Tartara --- 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..902f06b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,6 +100,7 @@ DIRS = \ doc/examples \ doc/examples/gnt-debug \ doc/examples/hooks \ + doc/users \ test/data/htools \ test/data/htools/rapi \ test/hs/shelltests \ @@ -189,6 +190,7 @@ CLEANFILES = \ $(BUILT_EXAMPLES) \ doc/examples/bash_completion \ doc/examples/bash_completion-debug \ + $(userspecs) \ lib/_generated_rpc.py \ $(man_MANS) \ $(manhtml) \ @@ -743,12 +745,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 + # 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 @@ -971,6 +982,9 @@ EXTRA_DIST = \ doc/examples/gnt-debug/README \ doc/examples/gnt-debug/delay0.json \ doc/examples/gnt-debug/delay50.json \ + doc/users/groupmemberships.in \ + doc/users/groups.in \ + doc/users/users.in \ test/py/lockperf.py \ test/py/testutils.py \ test/py/mocks.py \ 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@