Note UUID identification change in NEWS file
[ganeti-local] / Makefile.am
index 7c8776b..1e17f79 100644 (file)
@@ -108,6 +108,7 @@ DIRS = \
        doc/examples \
        doc/examples/gnt-debug \
        doc/examples/hooks \
+       doc/users \
        test/data/htools \
        test/data/htools/rapi \
        test/hs/shelltests \
@@ -198,6 +199,7 @@ CLEANFILES = \
        $(BUILT_EXAMPLES) \
        doc/examples/bash_completion \
        doc/examples/bash_completion-debug \
+       $(userspecs) \
        lib/_generated_rpc.py \
        $(man_MANS) \
        $(manhtml) \
@@ -436,12 +438,15 @@ docinput = \
        doc/design-2.6.rst \
        doc/design-2.7.rst \
        doc/design-2.8.rst \
+       doc/design-2.9.rst \
        doc/design-autorepair.rst \
        doc/design-bulk-create.rst \
        doc/design-chained-jobs.rst \
        doc/design-cpu-pinning.rst \
        doc/design-device-uuid-name.rst \
        doc/design-draft.rst \
+       doc/design-glusterfs-ganeti-support.rst \
+       doc/design-daemons.rst \
        doc/design-htools-2.3.rst \
        doc/design-http-server.rst \
        doc/design-impexp2.rst \
@@ -452,6 +457,7 @@ docinput = \
        doc/design-network.rst \
        doc/design-node-add.rst \
        doc/design-oob.rst \
+       doc/design-openvswitch.rst \
        doc/design-ovf-support.rst \
        doc/design-opportunistic-locking.rst \
        doc/design-partitioned.rst \
@@ -778,12 +784,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
@@ -1001,7 +1016,6 @@ EXTRA_DIST = \
        tools/kvm-ifup.in \
        tools/vif-ganeti.in \
        tools/net-common.in \
-       tools/users-setup.in \
        tools/vcluster-setup.in \
        $(docinput) \
        doc/html \
@@ -1012,6 +1026,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 \
@@ -1150,6 +1167,7 @@ TEST_FILES = \
        test/data/cert2.pem \
        test/data/cluster_config_2.7.json \
        test/data/cluster_config_2.8.json \
+       test/data/cluster_config_2.9.json \
        test/data/instance-minor-pairing.txt \
        test/data/instance-prim-sec.txt \
        test/data/ip-addr-show-dummy0.txt \
@@ -1442,8 +1460,26 @@ tools/net-common: tools/net-common.in $(REPLACE_VARS_SED)
        sed -f $(REPLACE_VARS_SED) < $< > $@
        chmod +x $@
 
-tools/users-setup: tools/users-setup.in $(REPLACE_VARS_SED)
-       sed -f $(REPLACE_VARS_SED) < $< > $@
+tools/users-setup: Makefile $(userspecs)
+       set -e; \
+       { echo '#!/bin/sh'; \
+         echo 'if [ "x$$1" != "x--yes-do-it" ];'; \
+         echo 'then echo "This will do the following changes"'; \
+         $(AWK) -- '{print "echo + Will add group ",$$1; count++}\
+                    END {if (count == 0) {print "echo + No groups to add"}}' doc/users/groups; \
+         $(AWK) -- '{if (NF > 1) {print "echo + Will add user",$$1,"with primary group",$$2} \
+                                 else {print "echo + Will add user",$$1}; count++}\
+                    END {if (count == 0) {print "echo + No users to add"}}' doc/users/users; \
+         $(AWK) -- '{print "echo + Will add user",$$1,"to group",$$2}' doc/users/groupmemberships; \
+         echo 'echo'; \
+         echo 'echo "OK? (y/n)"'; \
+         echo 'read confirm'; \
+         echo 'if [ "x$$confirm" != "xy" ]; then exit 0; fi'; \
+         echo 'fi'; \
+         $(AWK) -- '{print "addgroup --system",$$1}' doc/users/groups; \
+         $(AWK) -- '{if (NF > 1) {print "adduser --system --ingroup",$$2,$$1} else {print "adduser --system",$$1}}' doc/users/users; \
+         $(AWK) -- '{print "adduser",$$1,$$2}' doc/users/groupmemberships; \
+       } > $@
        chmod +x $@
 
 tools/vcluster-setup: tools/vcluster-setup.in $(REPLACE_VARS_SED)
@@ -1594,7 +1630,6 @@ lib/_autoconf.py: Makefile | stamp-directories
          echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
          echo "XEN_INITRD = '$(XEN_INITRD)'"; \
          echo "KVM_KERNEL = '$(KVM_KERNEL)'"; \
-         echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
          echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
          echo "KVM_PATH = '$(KVM_PATH)'"; \
          echo "IP_PATH = '$(IP_PATH)'"; \
@@ -1705,6 +1740,7 @@ $(REPLACE_VARS_SED): $(SHELL_ENV_INIT) Makefile stamp-directories
          echo 's#@''GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \
          echo 's#@''GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \
          echo 's#@''GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \
+         echo 's#@''GNTNODEDGROUP@#$(NODED_GROUP)#g'; \
          echo 's#@''GNTLUXIDGROUP@#$(LUXID_GROUP)#g'; \
          echo 's#@''GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
          echo 's#@''GNTMONDGROUP@#$(MOND_GROUP)#g'; \
@@ -1882,6 +1918,7 @@ hs-check: hs-tests hs-shell
 #       (since our indent level is not 4)
 # E125: continuation line does not distinguish itself from next logical line
 #       (since our indent level is not 4)
+# E123: closing bracket does not match indentation of opening bracket's line
 # E127: continuation line over-indented for visual indent
 #       (since our indent level is not 4)
 # note: do NOT add E128 here; it's a valid style error in most cases!
@@ -1890,7 +1927,7 @@ hs-check: hs-tests hs-shell
 # instead of silencing it
 # E261: at least two spaces before inline comment
 # E501: line too long (80 characters)
-PEP8_IGNORE = E111,E121,E125,E127,E261,E501
+PEP8_IGNORE = E111,E121,E123,E125,E127,E261,E501
 
 # For excluding pep8 expects filenames only, not whole paths
 PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(BUILT_PYTHON_SOURCES))))