Commit 780060cb authored by Klaus Aehlig's avatar Klaus Aehlig

Adapt the base directories according to new layout

The file layout described in the upgrades design document has changed.
Adapt the base directories accordingly.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 8a7a197a
...@@ -40,9 +40,23 @@ CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants ...@@ -40,9 +40,23 @@ CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
BUILD_RPC = $(top_srcdir)/autotools/build-rpc BUILD_RPC = $(top_srcdir)/autotools/build-rpc
SHELL_ENV_INIT = autotools/shell-env-init SHELL_ENV_INIT = autotools/shell-env-init
# starting as of Ganeti 2.10, all files are stored in a single directory, # starting as of Ganeti 2.10, all files are stored in two directories,
# with only symbolic links added at other places. # with only symbolic links added at other places.
versiondir = $(libdir)/ganeti-$(VERSION) #
# $(versiondir) contains most of Ganeti and all architecture-dependent files
# $(versionedsharedir) contains only architecture-independent files; all python
# executables need to go directly to $(versionedsharedir), as all ganeti python
# mdules are installed outside the usual python path, i.e., as private modules.
#
# $(defaultversiondir) and $(defaultversionedsharedir) are the corresponding
# directories for "the currently running" version of Ganeti. We never install
# there, but all symbolic links go there, rather than directory to $(versiondir)
# or $(versionedsharedir). Note that all links to $(default*dir) need to be stable;
# so, if some currently architecture-independent executable is replaced by an
# architecture-dependent one (and hence has to go under $(versiondir)), add a link
# under $(versionedsharedir) but do not change the external links.
versiondir = $(libdir)/ganeti/$(VERSION)
versionedsharedir = $(prefix)/share/ganeti/$(VERSION)
# Note: these are automake-specific variables, and must be named after # Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix # the directory + 'dir' suffix
...@@ -50,8 +64,12 @@ pkglibdir = $(versiondir)$(libdir)/ganeti ...@@ -50,8 +64,12 @@ pkglibdir = $(versiondir)$(libdir)/ganeti
myexeclibdir = $(pkglibdir) myexeclibdir = $(pkglibdir)
bindir = $(versiondir)$(exec_prefix)/bin bindir = $(versiondir)$(exec_prefix)/bin
sbindir = $(versiondir)$(exec_prefix)/sbin sbindir = $(versiondir)$(exec_prefix)/sbin
mandir = $(versiondir)$(datarootdir)/man mandir = $(versionedsharedir)$(datarootdir)/man
pkgpythondir = $(versiondir)$(pythondir)/ganeti pkgpythondir = $(versionedsharedir)/ganeti
gntpythondir = $(versionedsharedir)
pkgpython_bindir = $(versionedsharedir)
gnt_python_sbindir = $(versionedsharedir)
tools_pythondir = $(versionedsharedir)
clientdir = $(pkgpythondir)/client clientdir = $(pkgpythondir)/client
cmdlibdir = $(pkgpythondir)/cmdlib cmdlibdir = $(pkgpythondir)/cmdlib
...@@ -213,6 +231,7 @@ CLEANFILES = \ ...@@ -213,6 +231,7 @@ CLEANFILES = \
$(addsuffix /*.hi,$(HS_DIRS)) \ $(addsuffix /*.hi,$(HS_DIRS)) \
$(addsuffix /*.o,$(HS_DIRS)) \ $(addsuffix /*.o,$(HS_DIRS)) \
$(PYTHON_BOOTSTRAP) \ $(PYTHON_BOOTSTRAP) \
$(gnt_python_sbin_SCRIPTS) \
epydoc.conf \ epydoc.conf \
$(REPLACE_VARS_SED) \ $(REPLACE_VARS_SED) \
$(SHELL_ENV_INIT) \ $(SHELL_ENV_INIT) \
...@@ -237,6 +256,7 @@ CLEANFILES = \ ...@@ -237,6 +256,7 @@ CLEANFILES = \
stamp-directories \ stamp-directories \
stamp-srclinks \ stamp-srclinks \
$(nodist_pkgpython_PYTHON) \ $(nodist_pkgpython_PYTHON) \
$(gnt_scripts) \
$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \ $(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
$(HS_BUILT_TEST_HELPERS) \ $(HS_BUILT_TEST_HELPERS) \
src/ganeti-confd \ src/ganeti-confd \
...@@ -295,6 +315,12 @@ BUILT_EXAMPLES = \ ...@@ -295,6 +315,12 @@ BUILT_EXAMPLES = \
nodist_pkgpython_PYTHON = \ nodist_pkgpython_PYTHON = \
$(BUILT_PYTHON_SOURCES) $(BUILT_PYTHON_SOURCES)
nodist_pkgpython_bin_SCRIPTS = \
$(nodist_pkglib_python_scripts)
pkgpython_bin_SCRIPTS = \
$(pkglib_python_scripts)
noinst_PYTHON = \ noinst_PYTHON = \
lib/build/__init__.py \ lib/build/__init__.py \
lib/build/shell_example_lexer.py \ lib/build/shell_example_lexer.py \
...@@ -867,15 +893,21 @@ gnt_scripts = \ ...@@ -867,15 +893,21 @@ gnt_scripts = \
scripts/gnt-os \ scripts/gnt-os \
scripts/gnt-storage scripts/gnt-storage
gnt_scripts_basenames = \
$(patsubst scripts/%,%,$(gnt_scripts))
gnt_python_sbin_SCRIPTS = \
$(PYTHON_BOOTSTRAP_SBIN)
gntpython_SCRIPTS = $(gnt_scripts)
PYTHON_BOOTSTRAP_SBIN = \ PYTHON_BOOTSTRAP_SBIN = \
daemons/ganeti-masterd \ daemons/ganeti-masterd \
daemons/ganeti-noded \ daemons/ganeti-noded \
daemons/ganeti-rapi \ daemons/ganeti-rapi \
daemons/ganeti-watcher \ daemons/ganeti-watcher
$(gnt_scripts)
PYTHON_BOOTSTRAP = \ PYTHON_BOOTSTRAP = \
$(PYTHON_BOOTSTRAP_SBIN) \
tools/burnin \ tools/burnin \
tools/ensure-dirs \ tools/ensure-dirs \
tools/node-cleanup \ tools/node-cleanup \
...@@ -983,7 +1015,6 @@ dist_sbin_SCRIPTS = \ ...@@ -983,7 +1015,6 @@ dist_sbin_SCRIPTS = \
tools/ganeti-listrunner tools/ganeti-listrunner
nodist_sbin_SCRIPTS = \ nodist_sbin_SCRIPTS = \
$(PYTHON_BOOTSTRAP_SBIN) \
daemons/ganeti-cleaner daemons/ganeti-cleaner
# strip path prefixes off the sbin scripts # strip path prefixes off the sbin scripts
...@@ -1025,11 +1056,10 @@ dist_tools_SCRIPTS = \ ...@@ -1025,11 +1056,10 @@ dist_tools_SCRIPTS = \
tools/master-ip-setup \ tools/master-ip-setup \
tools/xen-console-wrapper tools/xen-console-wrapper
nodist_tools_python_scripts = \ nodist_tools_python_SCRIPTS = \
tools/node-cleanup tools/node-cleanup
nodist_tools_SCRIPTS = \ nodist_tools_SCRIPTS = \
$(nodist_tools_python_scripts) \
tools/users-setup \ tools/users-setup \
tools/vcluster-setup tools/vcluster-setup
...@@ -1047,12 +1077,8 @@ myexeclib_SCRIPTS = \ ...@@ -1047,12 +1077,8 @@ myexeclib_SCRIPTS = \
tools/kvm-ifup \ tools/kvm-ifup \
tools/vif-ganeti \ tools/vif-ganeti \
tools/net-common \ tools/net-common \
$(pkglib_python_scripts) \
$(HS_MYEXECLIB_PROGS) $(HS_MYEXECLIB_PROGS)
nodist_myexeclib_SCRIPTS = \
$(nodist_pkglib_python_scripts)
# strip path prefixes off the lib python scripts # strip path prefixes off the lib python scripts
all_myexeclib_scripts = \ all_myexeclib_scripts = \
$(patsubst tools/%,%,$(patsubst daemons/%,%,\ $(patsubst tools/%,%,$(patsubst daemons/%,%,\
...@@ -1525,6 +1551,7 @@ lint_python_code = \ ...@@ -1525,6 +1551,7 @@ lint_python_code = \
$(CHECK_IMPORTS) \ $(CHECK_IMPORTS) \
$(CHECK_HEADER) \ $(CHECK_HEADER) \
$(DOCPP) \ $(DOCPP) \
$(gnt_python_sbin_SCRIPTS) \
$(PYTHON_BOOTSTRAP) $(PYTHON_BOOTSTRAP)
standalone_python_modules = \ standalone_python_modules = \
...@@ -1541,6 +1568,7 @@ pep8_python_code = \ ...@@ -1541,6 +1568,7 @@ pep8_python_code = \
$(CHECK_HEADER) \ $(CHECK_HEADER) \
$(DOCPP) \ $(DOCPP) \
$(PYTHON_BOOTSTRAP) \ $(PYTHON_BOOTSTRAP) \
$(gnt_python_sbin_SCRIPTS) \
qa \ qa \
$(python_test_support) $(python_test_support)
...@@ -1963,7 +1991,7 @@ tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join ...@@ -1963,7 +1991,7 @@ tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join
tools/node-cleanup: MODULE = ganeti.tools.node_cleanup tools/node-cleanup: MODULE = ganeti.tools.node_cleanup
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst test/hs/%,%,$@) $(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst test/hs/%,%,$@)
$(PYTHON_BOOTSTRAP): Makefile | stamp-directories $(PYTHON_BOOTSTRAP) $(gnt_scripts) $(gnt_python_sbin_SCRIPTS): Makefile | stamp-directories
test -n "$(MODULE)" || { echo Missing module; exit 1; } test -n "$(MODULE)" || { echo Missing module; exit 1; }
set -e; \ set -e; \
{ echo '#!/usr/bin/python'; \ { echo '#!/usr/bin/python'; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment