abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+# Use bash in order to be able to use pipefail
+SHELL=/bin/bash
+
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_MAN = $(top_srcdir)/autotools/check-man
CHECK_VERSION = $(top_srcdir)/autotools/check-version
+CHECK_NEWS = $(top_srcdir)/autotools/check-news
REPLACE_VARS_SED = autotools/replace_vars.sed
clientdir = $(pkgpythondir)/client
$(addsuffix /*.py[co],$(DIRS)) \
$(all_dirfiles) \
$(PYTHON_BOOTSTRAP) \
+ epydoc.conf \
autotools/replace_vars.sed \
daemons/daemon-util \
daemons/ensure-dirs \
doc/examples/hooks/ipsec \
$(man_MANS) \
$(manhtml) \
+ tools/kvm-ifup \
stamp-srclinks \
$(nodist_pkgpython_PYTHON)
lib/utils/algo.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 \
lib/utils/text.py \
- lib/utils/wrapper.py
+ lib/utils/wrapper.py \
+ lib/utils/x509.py
docrst = \
doc/admin.rst \
doc/design-2.1.rst \
doc/design-2.2.rst \
doc/design-2.3.rst \
+ doc/design-2.4.rst \
doc/design-oob.rst \
doc/design-query2.rst \
doc/cluster-merge.rst \
pkglib_SCRIPTS = \
daemons/daemon-util \
daemons/ensure-dirs \
+ tools/kvm-ifup \
$(pkglib_python_scripts)
EXTRA_DIST = \
NEWS \
UPGRADE \
+ epydoc.conf.in \
pylintrc \
autotools/build-bash-completion \
autotools/check-python-code \
autotools/check-man \
+ autotools/check-news \
autotools/check-tar \
autotools/check-version \
autotools/gen-coverage \
daemons/ganeti-cleaner.in \
$(pkglib_python_scripts) \
devel/upload.in \
+ tools/kvm-ifup.in \
$(docdot) \
$(docpng) \
$(docrst) \
doc/examples/ganeti-kvm-poweroff.initd.in \
doc/examples/ganeti.cron.in \
doc/examples/gnt-config-backup.in \
- doc/examples/dumb-allocator \
doc/examples/ganeti.default \
doc/examples/ganeti.default-debug \
doc/examples/hooks/ethers \
test/ganeti.utils.algo_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 \
test/ganeti.utils.text_unittest.py \
test/ganeti.utils.wrapper_unittest.py \
+ test/ganeti.utils.x509_unittest.py \
test/ganeti.utils_unittest.py \
test/ganeti.workerpool_unittest.py \
test/cfgupgrade_unittest.py \
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
+tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
+ sed -f $(REPLACE_VARS_SED) < $< > $@
+ chmod +x $@
+
devel/upload: devel/upload.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
chmod u+x $@
man/%.7.in man/%.8.in: man/%.rst man/footer.man
@test -n "$(PANDOC)" || \
{ echo 'pandoc' not found during configure; exit 1; }
+ set -o pipefail ; \
$(PANDOC) -s -f rst -t man -A man/footer.man $< | \
sed -e 's/\\@/@/g' > $@
if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi
man/%.html.in: man/%.rst man/footer.html
@test -n "$(PANDOC)" || \
{ echo 'pandoc' not found during configure; exit 1; }
+ set -o pipefail ; \
$(PANDOC) -s -f rst -t html -A man/footer.html $< | \
sed -e 's/\\@/@/g' > $@
-
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
+epydoc.conf: epydoc.conf.in
+ sed -e 's#@MODULES@#$(lint_python_code)#g' < $< > $@
+
vcs-version:
if test -d .git; then \
git describe > $@; \
echo "CONFD_USER = '$(CONFD_USER)'"; \
echo "CONFD_GROUP = '$(CONFD_GROUP)'"; \
echo "NODED_USER = '$(NODED_USER)'"; \
+ echo "NODED_GROUP = '$(NODED_GROUP)'"; \
echo "VCS_VERSION = '$$VCSVER'"; \
echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \
} > $@
echo '# Temporarily alias commands until bash completion'; \
echo '# generator is changed'; \
echo 'if hasattr(main, "commands"):'; \
- echo ' commands = main.commands # pylint: disable-msg=E1101'; \
+ echo ' commands = main.commands # pylint: disable-msg=E1101'; \
+ echo 'if hasattr(main, "aliases"):'; \
+ echo ' aliases = main.aliases # pylint: disable-msg=E1101'; \
echo; \
echo 'if __name__ == "__main__":'; \
echo ' sys.exit(main.Main())'; \
check-local: check-dirs
$(CHECK_PYTHON_CODE) $(check_python_code)
$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
+ $(CHECK_NEWS) < $(top_srcdir)/NEWS
+ expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
+ if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \
+ echo "Incorrect version in README, expected $$expver"; \
+ exit 1; \
+ fi
.PHONY: lint
lint: $(BUILT_SOURCES)
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
$(PYLINT) $(LINT_OPTS) $(lint_python_code)
+ cd $(top_srcdir)/qa && \
+ PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
+ --rcfile ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
# a dist hook rule for updating the vcs-version file; this is
# hardcoded due to where it needs to build the file...