From 9bfcf2e99afac559f6c53936e91a30c8c7aab293 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 27 Sep 2013 15:27:06 +0200 Subject: [PATCH] Expose sharedir in pathutils This path is needed to construct the link target for $(sysconfdir)/ganeti/share for a different version. The latter will happen in the automated upgrade procedure. Signed-off-by: Klaus Aehlig Reviewed-by: Jose Lopes --- Makefile.am | 1 + lib/pathutils.py | 1 + src/AutoConf.hs.in | 3 +++ src/Ganeti/HsConstants.hs | 3 +++ 4 files changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index b2296f0..120245c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1811,6 +1811,7 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in | stamp-directories -DGNT_SCRIPTS="$(foreach i,$(notdir $(gnt_scripts)),\"$(i)\":)" \ -DHS_HTOOLS_PROGS="$(foreach i,$(HS_HTOOLS_PROGS),\"$(i)\":)" \ -DPKGLIBDIR="$(libdir)/ganeti" \ + -DSHAREDIR="$(prefix)/share/ganeti" \ -DVERSIONEDSHAREDIR="$(versionedsharedir)" \ -DDRBD_BARRIERS="$(DRBD_BARRIERS)" \ -DDRBD_NO_META_FLUSH="$(DRBD_NO_META_FLUSH)" \ diff --git a/lib/pathutils.py b/lib/pathutils.py index 8731f93..2a85f19 100644 --- a/lib/pathutils.py +++ b/lib/pathutils.py @@ -42,6 +42,7 @@ XEN_CONFIG_DIR = vcluster.AddNodePrefix(_constants.XEN_CONFIG_DIR) SYSCONFDIR = vcluster.AddNodePrefix(_constants.SYSCONFDIR) TOOLSDIR = _constants.TOOLSDIR PKGLIBDIR = _constants.PKGLIBDIR +SHAREDIR = _constants.SHAREDIR LOCALSTATEDIR = vcluster.AddNodePrefix(_constants.LOCALSTATEDIR) # Paths which don't change for a virtual cluster diff --git a/src/AutoConf.hs.in b/src/AutoConf.hs.in index efabe6c..415bdfe 100644 --- a/src/AutoConf.hs.in +++ b/src/AutoConf.hs.in @@ -121,6 +121,9 @@ htoolsProgs = HS_HTOOLS_PROGS[] pkglibdir :: String pkglibdir = "PKGLIBDIR" +sharedir :: String +sharedir = "SHAREDIR" + versionedsharedir :: String versionedsharedir = "VERSIONEDSHAREDIR" diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs index 98773df..108971a 100644 --- a/src/Ganeti/HsConstants.hs +++ b/src/Ganeti/HsConstants.hs @@ -99,6 +99,9 @@ localstatedir = AutoConf.localstatedir pkglibdir :: String pkglibdir = AutoConf.pkglibdir +sharedir :: String +sharedir = AutoConf.sharedir + -- * 'autoconf' constants for Python only ('lib/build/sphinx_ext.py') manPages :: Map String Int -- 1.7.10.4