variables. The underline is there to mark it as a private module.
Reviewed-by: iustinp
AC_MSG_WARN([docbook2man not found.])
fi
-AC_SUBST(PACKAGE_VERSION)
-
-AC_CONFIG_FILES([Makefile man/Makefile doc/Makefile
- testing/Makefile tools/Makefile
- lib/Makefile scripts/Makefile daemons/Makefile
- doc/examples/Makefile lib/version.py])
+AC_CONFIG_FILES([
+ Makefile
+ daemons/Makefile
+ doc/Makefile
+ doc/examples/Makefile
+ lib/Makefile
+ man/Makefile
+ scripts/Makefile
+ testing/Makefile
+ tools/Makefile
+])
AC_OUTPUT
-MAINTAINERCLEANFILES = version.py
-EXTRA_DIST = version.py.in
-nodist_pkgpython_PYTHON = version.py
+MAINTAINERCLEANFILES = _autoconf.py
+nodist_pkgpython_PYTHON = _autoconf.py
pkgpython_PYTHON = __init__.py backend.py cli.py cmdlib.py config.py \
objects.py errors.py logger.py ssh.py utils.py rpc.py \
bdev.py hypervisor.py opcodes.py mcpu.py constants.py \
ssconf.py
+
+_autoconf.py: Makefile
+ { echo '# This file is automatically generated, do not edit!'; \
+ echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
+ echo "LOCALSTATEDIR = '$(localstatedir)'"; \
+ echo "SYSCONFDIR = '$(sysconfdir)'"; \
+ } > $@
"""Module holding different constants."""
-from ganeti import version
+from ganeti import _autoconf
# various versions
CONFIG_VERSION = 3
PROTOCOL_VERSION = 2
-RELEASE_VERSION = version.RELEASE_VERSION
+RELEASE_VERSION = _autoconf.PACKAGE_VERSION
OS_API_VERSION = 4
EXPORT_VERSION = 0
# file paths
-DATA_DIR = "/var/lib/ganeti"
+DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
SSL_CERT_FILE = DATA_DIR + "/server.pem"
WATCHER_STATEFILE = DATA_DIR + "/restart_state"
SSH_KNOWN_HOSTS_FILE = DATA_DIR + "/known_hosts"
-NODE_INITD_SCRIPT = "/etc/init.d/ganeti"
+NODE_INITD_SCRIPT = _autoconf.SYSCONFDIR + "/init.d/ganeti"
DEFAULT_NODED_PORT = 1811
FIRST_DRBD_PORT = 11000
LAST_DRBD_PORT = 14999
MASTER_SCRIPT = "ganeti-master"
-LOG_DIR = "/var/log/ganeti"
+LOG_DIR = _autoconf.LOCALSTATEDIR + "/log/ganeti"
LOG_OS_DIR = LOG_DIR + "/os"
LOG_NODESERVER = LOG_DIR + "/node-daemon.log"
EXPORT_CONF_FILE = "config.ini"
# hooks-related constants
-HOOKS_BASE_DIR = "/etc/ganeti/hooks"
+HOOKS_BASE_DIR = _autoconf.SYSCONFDIR + "/ganeti/hooks"
HOOKS_PHASE_PRE = "pre"
HOOKS_PHASE_POST = "post"
HOOKS_VERSION = 1
+++ /dev/null
-#!/usr/bin/python
-#
-
-# Copyright (C) 2007 Google Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-
-"""Ganeti version
-"""
-
-RELEASE_VERSION = "@PACKAGE_VERSION@"