Expose sharedir in pathutils
authorKlaus Aehlig <aehlig@google.com>
Fri, 27 Sep 2013 13:27:06 +0000 (15:27 +0200)
committerKlaus Aehlig <aehlig@google.com>
Fri, 4 Oct 2013 14:10:58 +0000 (16:10 +0200)
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 <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

Makefile.am
lib/pathutils.py
src/AutoConf.hs.in
src/Ganeti/HsConstants.hs

index b2296f0..120245c 100644 (file)
@@ -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)" \
index 8731f93..2a85f19 100644 (file)
@@ -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
index efabe6c..415bdfe 100644 (file)
@@ -121,6 +121,9 @@ htoolsProgs = HS_HTOOLS_PROGS[]
 pkglibdir :: String
 pkglibdir = "PKGLIBDIR"
 
+sharedir :: String
+sharedir = "SHAREDIR"
+
 versionedsharedir :: String
 versionedsharedir = "VERSIONEDSHAREDIR"
 
index 98773df..108971a 100644 (file)
@@ -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