REPLACE_VARS_SED = autotools/replace_vars.sed
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
BUILD_RPC = $(top_srcdir)/autotools/build-rpc
+SHELL_ENV_INIT = autotools/shell-env-init
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
$(PYTHON_BOOTSTRAP) \
epydoc.conf \
$(REPLACE_VARS_SED) \
+ $(SHELL_ENV_INIT) \
daemons/daemon-util \
daemons/ganeti-cleaner \
+ daemons/ganeti-master-cleaner \
devel/upload \
$(BUILT_EXAMPLES) \
doc/examples/bash_completion \
$(man_MANS) \
$(manhtml) \
tools/kvm-ifup \
- tools/vcluster-setup
+ tools/vcluster-setup \
stamp-directories \
stamp-srclinks \
$(nodist_pkgpython_PYTHON) \
$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
$(HS_BUILT_TEST_HELPERS) \
+ htools/ganeti-confd \
.hpc/*.mix htools/*.tix htest/*.tix \
doc/hs-lint.html
HTOOLS_GENERATED_FILES =
if WANT_HTOOLS
HTOOLS_GENERATED_FILES += $(HS_PROGS)
-if HS_CONFD
+if ENABLE_CONFD
HTOOLS_GENERATED_FILES += htools/hconfd
endif
endif
confd_PYTHON = \
lib/confd/__init__.py \
- lib/confd/client.py \
- lib/confd/querylib.py \
- lib/confd/server.py
+ lib/confd/client.py
masterd_PYTHON = \
lib/masterd/__init__.py \
server_PYTHON = \
lib/server/__init__.py \
- lib/server/confd.py \
lib/server/masterd.py \
lib/server/noded.py \
lib/server/rapi.py
doc/rapi.rst \
doc/security.rst \
doc/upgrade.rst \
+ doc/virtual-cluster.rst \
doc/walkthrough.rst
HS_PROGS = htools/htools
daemons/ganeti-rapi \
$(gnt_scripts)
-if PY_CONFD
-PYTHON_BOOTSTRAP_SBIN += daemons/ganeti-confd
-endif
-
PYTHON_BOOTSTRAP = \
$(PYTHON_BOOTSTRAP_SBIN) \
tools/ensure-dirs
$(LN_S) -f htools \
$(DESTDIR)$(bindir)/$$role ; \
done
-if HS_CONFD
- mv $(DESTDIR)$(sbindir)/hconfd $(DESTDIR)$(sbindir)/ganeti-confd
-endif
endif
$(HS_ALL_PROGS): %: %.hs $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS) Makefile
nodist_sbin_SCRIPTS = \
$(PYTHON_BOOTSTRAP_SBIN) \
- daemons/ganeti-cleaner
+ daemons/ganeti-cleaner \
+ daemons/ganeti-master-cleaner
+
+if ENABLE_CONFD
+htools/ganeti-confd: htools/hconfd
+ cp -f $< $@
-if HS_CONFD
-nodist_sbin_SCRIPTS += htools/hconfd
+nodist_sbin_SCRIPTS += htools/ganeti-confd
endif
python_scripts = \
$(RUN_IN_TEMPDIR) \
daemons/daemon-util.in \
daemons/ganeti-cleaner.in \
+ daemons/ganeti-master-cleaner.in \
$(pkglib_python_scripts) \
devel/upload.in \
tools/kvm-ifup.in \
man_MANS = \
man/ganeti.7 \
man/ganeti-cleaner.8 \
+ man/ganeti-master-cleaner.8 \
man/ganeti-confd.8 \
man/ganeti-listrunner.8 \
man/ganeti-masterd.8 \
test/ganeti.utils.filelock_unittest.py \
test/ganeti.utils.hash_unittest.py \
test/ganeti.utils.io_unittest.py \
+ test/ganeti.utils.io_unittest-runasroot.py \
test/ganeti.utils.log_unittest.py \
test/ganeti.utils.mlock_unittest.py \
test/ganeti.utils.nodesetup_unittest.py \
test/docs_unittest.py \
test/pycurl_reset_unittest.py \
test/tempfile_fork_unittest.py
-if HAS_FAKEROOT
-python_tests += test/ganeti.utils.io_unittest-runasroot.py
-endif
haskell_tests = htest/test
test/daemon-util_unittest.bash: daemons/daemon-util
-test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner
+test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner \
+ daemons/ganeti-master-cleaner
test/bash_completion.bash: doc/examples/bash_completion-debug
echo "LOCALSTATEDIR = '$(localstatedir)'"; \
echo "SYSCONFDIR = '$(sysconfdir)'"; \
echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \
+ echo "SSH_LOGIN_USER = '$(SSH_LOGIN_USER)'"; \
+ echo "SSH_CONSOLE_USER = '$(SSH_CONSOLE_USER)'"; \
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \
echo "HTOOLS = False"; \
fi; \
echo "ENABLE_CONFD = $(ENABLE_CONFD)"; \
- echo "PY_CONFD = $(PY_CONFD)"; \
- echo "HS_CONFD = $(HS_CONFD)"; \
echo "XEN_CMD = '$(XEN_CMD)'"; \
echo "ENABLE_SPLIT_QUERY = $(ENABLE_SPLIT_QUERY)"; \
} > $@
lib/_generated_rpc.py: lib/rpc_defs.py $(BUILD_RPC)
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_RPC) lib/rpc_defs.py > $@
-$(REPLACE_VARS_SED): Makefile stamp-directories
+$(SHELL_ENV_INIT): Makefile stamp-directories
+ set -e; \
+ { echo '# Allow overriding for tests'; \
+ echo 'readonly LOCALSTATEDIR=$${LOCALSTATEDIR:-$${GANETI_ROOTDIR:-}$(localstatedir)}'; \
+ echo 'readonly SYSCONFDIR=$${SYSCONFDIR:-$${GANETI_ROOTDIR:-}$(sysconfdir)}'; \
+ echo; \
+ echo 'readonly PKGLIBDIR=$(pkglibdir)'; \
+ echo 'readonly LOG_DIR="$$LOCALSTATEDIR/log/ganeti"'; \
+ echo 'readonly RUN_DIR="$$LOCALSTATEDIR/run/ganeti"'; \
+ echo 'readonly DATA_DIR="$$LOCALSTATEDIR/lib/ganeti"'; \
+ echo 'readonly CONF_DIR="$$SYSCONFDIR/ganeti"'; \
+ } > $@
+
+$(REPLACE_VARS_SED): $(SHELL_ENV_INIT) Makefile stamp-directories
set -e; \
{ echo 's#@PREFIX@#$(prefix)#g'; \
echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
echo 's#@CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \
echo 's#@MODULES@#$(strip $(lint_python_code))#g'; \
echo 's#@ENABLE_SPLIT_QUERY@#$(ENABLE_SPLIT_QUERY)#g'; \
+ echo; \
+ echo '/^@SHELL_ENV_INIT@$$/ {'; \
+ echo ' r $(SHELL_ENV_INIT)'; \
+ echo ' d'; \
+ echo '}'; \
} > $@
# Using deferred evaluation
echo "Incorrect version in README, expected $$expver"; \
exit 1; \
fi; \
- for file in doc/iallocator.rst doc/hooks.rst; do \
+ for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst; do \
if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
"Documents Ganeti version $$expver"; then \
echo "Incorrect version in $$file, expected $$expver"; \