From b0ea2d10f7668f1d1076e06ec165230526d8b892 Mon Sep 17 00:00:00 2001 From: Shwetha K Acharya Date: Wed, 16 Oct 2019 14:53:22 +0530 Subject: build: var data is saved under $prefix instead of localstatedir Problem:glusterfind saves var data under $prefix, even though the localstatedir is mentioned while installing i.e, when we install glusterfs with ./configure --prefix=/path/to/prefix --localstatedir=/path/to/var This happens because, glusterfind stores working dir as, working_dir=@GLUSTERFSD_MISCDIR@/glusterfind/ and in configure.ac, GLUSTERFSD_MISCDIR is defined as: GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd" Solution: $localstatedir is used instead of $prefix while defining, GLUSTERFSD_MISCDIR to avoid such anomaly. fixes: bz#1489610 Change-Id: I431a63c14bee23a1aac612a3dcb0431cb29ca4a2 Signed-off-by: Shwetha K Acharya --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fdaed4ea310..772958df9c5 100644 --- a/configure.ac +++ b/configure.ac @@ -1140,7 +1140,6 @@ if test "x$exec_prefix" = xNONE; then exec_prefix="$(eval echo $prefix)" fi GLUSTERFS_LIBEXECDIR="$(eval echo $libexecdir)/glusterfs" -GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd" prefix=$old_prefix exec_prefix=$old_exec_prefix @@ -1152,6 +1151,8 @@ fi localstatedir="$(eval echo ${localstatedir})" LOCALSTATEDIR=$localstatedir +GLUSTERFSD_MISCDIR="$(eval echo ${localstatedir})/lib/misc/glusterfsd" + old_prefix=$prefix if test "x$prefix" = xNONE; then prefix=$ac_default_prefix -- cgit