Add new lock level for node resource modifications
[ganeti-local] / Makefile.am
index 5031a53..f9ebfeb 100644 (file)
@@ -21,6 +21,7 @@ ACLOCAL_AMFLAGS = -I autotools
 BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
 RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
 CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
+CHECK_HEADER = $(top_srcdir)/autotools/check-header
 CHECK_MAN = $(top_srcdir)/autotools/check-man
 CHECK_VERSION = $(top_srcdir)/autotools/check-version
 CHECK_NEWS = $(top_srcdir)/autotools/check-news
@@ -28,6 +29,7 @@ CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
 DOCPP = $(top_srcdir)/autotools/docpp
 REPLACE_VARS_SED = autotools/replace_vars.sed
 CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
+BUILD_RPC = $(top_srcdir)/autotools/build-rpc
 
 # Note: these are automake-specific variables, and must be named after
 # the directory + 'dir' suffix
@@ -144,6 +146,7 @@ CLEANFILES = \
        doc/examples/ganeti.cron \
        doc/examples/gnt-config-backup \
        doc/examples/hooks/ipsec \
+       lib/_generated_rpc.py \
        $(man_MANS) \
        $(manhtml) \
        tools/kvm-ifup \
@@ -164,7 +167,8 @@ BUILT_SOURCES = \
 
 BUILT_PYTHON_SOURCES = \
        lib/_autoconf.py \
-       lib/_vcsversion.py
+       lib/_vcsversion.py \
+       lib/_generated_rpc.py
 
 nodist_pkgpython_PYTHON = \
        $(BUILT_PYTHON_SOURCES)
@@ -199,6 +203,7 @@ pkgpython_PYTHON = \
        lib/qlang.py \
        lib/query.py \
        lib/rpc.py \
+       lib/rpc_defs.py \
        lib/runtime.py \
        lib/serializer.py \
        lib/ssconf.py \
@@ -273,11 +278,11 @@ pytools_PYTHON = \
 utils_PYTHON = \
        lib/utils/__init__.py \
        lib/utils/algo.py \
-       lib/utils/cfunc.py \
        lib/utils/filelock.py \
        lib/utils/hash.py \
        lib/utils/io.py \
        lib/utils/log.py \
+       lib/utils/mlock.py \
        lib/utils/nodesetup.py \
        lib/utils/process.py \
        lib/utils/retry.py \
@@ -555,6 +560,8 @@ EXTRA_DIST = \
        epydoc.conf.in \
        pylintrc \
        autotools/build-bash-completion \
+       autotools/build-rpc \
+       autotools/check-header \
        autotools/check-python-code \
        autotools/check-imports \
        autotools/check-man \
@@ -724,11 +731,11 @@ python_tests = \
        test/ganeti.tools.ensure_dirs_unittest.py \
        test/ganeti.uidpool_unittest.py \
        test/ganeti.utils.algo_unittest.py \
-       test/ganeti.utils.cfunc.mlockall_unittest.py \
        test/ganeti.utils.filelock_unittest.py \
        test/ganeti.utils.hash_unittest.py \
        test/ganeti.utils.io_unittest.py \
        test/ganeti.utils.log_unittest.py \
+       test/ganeti.utils.mlock_unittest.py \
        test/ganeti.utils.nodesetup_unittest.py \
        test/ganeti.utils.process_unittest.py \
        test/ganeti.utils.retry_unittest.py \
@@ -739,6 +746,7 @@ python_tests = \
        test/ganeti.workerpool_unittest.py \
        test/cfgupgrade_unittest.py \
        test/docs_unittest.py \
+       test/pycurl_reset_unittest.py \
        test/tempfile_fork_unittest.py
 
 haskell_tests = htools/test
@@ -798,6 +806,7 @@ srclink_files = \
 check_python_code = \
        $(BUILD_BASH_COMPLETION) \
        $(CHECK_IMPORTS) \
+       $(CHECK_HEADER) \
        $(DOCPP) \
        $(all_python_code)
 
@@ -809,6 +818,7 @@ lint_python_code = \
        $(pkglib_python_scripts) \
        $(BUILD_BASH_COMPLETION) \
        $(CHECK_IMPORTS) \
+       $(CHECK_HEADER) \
        $(DOCPP) \
        $(PYTHON_BOOTSTRAP)
 
@@ -823,6 +833,7 @@ pep8_python_code = \
        $(dist_tools_PYTHON) \
        $(pkglib_python_scripts) \
        $(BUILD_BASH_COMPLETION) \
+       $(CHECK_HEADER) \
        $(DOCPP) \
        $(PYTHON_BOOTSTRAP) \
        qa
@@ -985,6 +996,7 @@ lib/_autoconf.py: Makefile | lib/.dir
          echo "NODED_USER = '$(NODED_USER)'"; \
          echo "NODED_GROUP = '$(NODED_GROUP)'"; \
          echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
+         echo "QEMUIMG_PATH = '$(QEMUIMG_PATH)'"; \
          if [ "$(HTOOLS)" ]; then \
            echo "HTOOLS = True"; \
          else \
@@ -1013,6 +1025,9 @@ lib/_vcsversion.py: Makefile vcs-version | lib/.dir
          echo "VCS_VERSION = '$$VCSVER'"; \
        } > $@
 
+lib/_generated_rpc.py: lib/rpc_defs.py $(BUILD_RPC) | lib/.dir
+       PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_RPC) $< > $@
+
 $(REPLACE_VARS_SED): Makefile
        set -e; \
        { echo 's#@PREFIX@#$(prefix)#g'; \
@@ -1114,6 +1129,7 @@ check-dirs: $(BUILT_SOURCES)
 .PHONY: check-local
 check-local: check-dirs $(BUILT_SOURCES)
        $(CHECK_PYTHON_CODE) $(check_python_code)
+       PYTHONPATH=. $(CHECK_HEADER) $(check_python_code)
        $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
        $(CHECK_NEWS) < $(top_srcdir)/NEWS
        PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules)