summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-03-09 12:18:40 -0500
committerShyamsundar Ranganathan <srangana@redhat.com>2017-03-13 10:18:07 -0400
commitfdabb97d57793084190440b90c75c37761d5720c (patch)
treea714e3f246598b9bd2e3480a751ce1f6f6cd65ca
parentfc97b1dc38ad46302d51a988cda18335f88514a2 (diff)
build/packaging: Debian and Ubuntu don't have /usr/libexec
GLUSTERFS_LIBEXECDIR is effectively hard-coded to /usr/libexec/glusterfs in configure(.ac) Debian-based distributions don't have a /usr/libexec/ directory This issues is partially mitigated by the use of $libexecdir in some of the Makefile.am files, but even so the incorrectly defined GLUSTERFS_LIBEXECDIR results in various things such as gsyncd, glusterfind, eventsd, etc., trying to invoke other scripts and programs from a location that doesn't exist. And once we correctly define GLUSTERFS_LIBEXECDIR, then we might as well use it appropriatedly. Change-Id: If5219cadc51ae316f7ba2e2831d739235c77902d BUG: 1430841 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16880 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Joe Julian <me@joejulian.name> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
-rw-r--r--cli/src/Makefile.am2
-rw-r--r--configure.ac12
-rw-r--r--events/src/Makefile.am8
-rw-r--r--extras/Makefile.am2
-rw-r--r--geo-replication/src/Makefile.am8
-rw-r--r--geo-replication/syncdaemon/Makefile.am2
-rw-r--r--tools/gfind_missing_files/Makefile.am4
-rw-r--r--tools/glusterfind/Makefile.am4
-rw-r--r--tools/glusterfind/src/Makefile.am2
-rw-r--r--xlators/features/ganesha/src/Makefile.am2
-rw-r--r--xlators/mgmt/glusterd/src/Makefile.am2
11 files changed, 24 insertions, 24 deletions
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index f5b8d00e673..5ef93899fca 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -18,7 +18,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_builddir)/rpc/xdr/src\
-DDATADIR=\"$(localstatedir)\" \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" \
- -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
+ -DGSYNCD_PREFIX=\"$(GLUSTERFS_LIBEXECDIR)\"\
-DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) -DSBIN_DIR=\"$(sbindir)\"\
$(XML_CPPFLAGS)
diff --git a/configure.ac b/configure.ac
index 3d796a01128..6d9013d539b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1094,24 +1094,24 @@ old_prefix=$prefix
if test "x$prefix" = xNONE; then
prefix=$ac_default_prefix
fi
-GLUSTERFS_LIBEXECDIR="$(eval echo $prefix)/libexec/glusterfs"
-GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd"
+GLUSTERFS_LIBEXECDIR="$libexecdir/glusterfs"
+GLUSTERFSD_MISCDIR="$prefix/var/lib/misc/glusterfsd"
prefix=$old_prefix
### Dirty hacky stuff to make LOCALSTATEDIR work
if test "x$prefix" = xNONE; then
- test $localstatedir = '${prefix}/var' && localstatedir=$ac_default_prefix/var
+ test $localstatedir = '$prefix/var' && localstatedir=$ac_default_prefix/var
localstatedir=/var
- LOCALSTATEDIR=$(eval echo ${localstatedir})
+ LOCALSTATEDIR=$localstatedir
else
- LOCALSTATEDIR=$(eval echo ${localstatedir})
+ LOCALSTATEDIR=$localstatedir
fi
old_prefix=$prefix
if test "x$prefix" = xNONE; then
prefix=$ac_default_prefix
fi
-GLUSTERD_VOLFILE="$(eval echo ${sysconfdir})/glusterfs/glusterd.vol"
+GLUSTERD_VOLFILE="$sysconfdir/glusterfs/glusterd.vol"
prefix=$old_prefix
diff --git a/events/src/Makefile.am b/events/src/Makefile.am
index 87282c6c6f7..8493abdcd82 100644
--- a/events/src/Makefile.am
+++ b/events/src/Makefile.am
@@ -5,7 +5,7 @@ EXTRA_DIST = glustereventsd.py __init__.py eventsapiconf.py.in \
BUILT_SOURCES = eventtypes.py
CLEANFILES = eventtypes.py
-eventsdir = $(libexecdir)/glusterfs/events
+eventsdir = $(GLUSTERFS_LIBEXECDIR)/events
events_PYTHON = __init__.py gf_event.py eventsapiconf.py eventtypes.py \
utils.py
@@ -13,7 +13,7 @@ eventtypes.py: $(top_srcdir)/events/eventskeygen.py
$(PYTHON) $(top_srcdir)/events/eventskeygen.py PY_HEADER
if BUILD_EVENTS
-eventspeerscriptdir = $(libexecdir)/glusterfs
+eventspeerscriptdir = $(GLUSTERFS_LIBEXECDIR)
eventsconfdir = $(sysconfdir)/glusterfs
eventsconf_DATA = eventsconfig.json
@@ -24,10 +24,10 @@ eventspeerscript_SCRIPTS = peer_eventsapi.py
install-exec-hook:
$(mkdir_p) $(DESTDIR)$(sbindir)
rm -f $(DESTDIR)$(sbindir)/glustereventsd
- ln -s $(libexecdir)/glusterfs/events/glustereventsd.py \
+ ln -s $(GLUSTERFS_LIBEXECDIR)/events/glustereventsd.py \
$(DESTDIR)$(sbindir)/glustereventsd
rm -f $(DESTDIR)$(sbindir)/gluster-eventsapi
- ln -s $(libexecdir)/glusterfs/peer_eventsapi.py \
+ ln -s $(GLUSTERFS_LIBEXECDIR)/peer_eventsapi.py \
$(DESTDIR)$(sbindir)/gluster-eventsapi
uninstall-hook:
diff --git a/extras/Makefile.am b/extras/Makefile.am
index 53ac47679f8..9dfc93d2411 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -1,4 +1,4 @@
-addonexecdir = $(libexecdir)/glusterfs
+addonexecdir = $(GLUSTERFS_LIBEXECDIR)
addonexec_SCRIPTS = peer_add_secret_pub
EditorModedir = $(docdir)
diff --git a/geo-replication/src/Makefile.am b/geo-replication/src/Makefile.am
index 87435d5718c..9937a0bd026 100644
--- a/geo-replication/src/Makefile.am
+++ b/geo-replication/src/Makefile.am
@@ -1,4 +1,4 @@
-gsyncddir = $(libexecdir)/glusterfs
+gsyncddir = $(GLUSTERFS_LIBEXECDIR)
gsyncd_SCRIPTS = gverify.sh peer_gsec_create \
set_geo_rep_pem_keys.sh peer_mountbroker peer_mountbroker.py \
@@ -21,7 +21,7 @@ noinst_HEADERS = procdiggy.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
- -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" -DUSE_LIBGLUSTERFS \
+ -DGSYNCD_PREFIX=\"$(GLUSTERFS_LIBEXECDIR)\" -DUSE_LIBGLUSTERFS \
-DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
@@ -35,11 +35,11 @@ $(top_builddir)/libglusterfs/src/libglusterfs.la:
install-exec-hook:
$(mkdir_p) $(DESTDIR)$(sbindir)
rm -f $(DESTDIR)$(sbindir)/gluster-mountbroker
- ln -s $(libexecdir)/glusterfs/peer_mountbroker.py \
+ ln -s $(GLUSTERFS_LIBEXECDIR)/peer_mountbroker.py \
$(DESTDIR)$(sbindir)/gluster-mountbroker
rm -f $(DESTDIR)$(sbindir)/gluster-georep-sshkey
- ln -s $(libexecdir)/glusterfs/peer_georep-sshkey.py \
+ ln -s $(GLUSTERFS_LIBEXECDIR)/peer_georep-sshkey.py \
$(DESTDIR)$(sbindir)/gluster-georep-sshkey
diff --git a/geo-replication/syncdaemon/Makefile.am b/geo-replication/syncdaemon/Makefile.am
index 7cdaf45ddec..f80fb26c28a 100644
--- a/geo-replication/syncdaemon/Makefile.am
+++ b/geo-replication/syncdaemon/Makefile.am
@@ -1,4 +1,4 @@
-syncdaemondir = $(libexecdir)/glusterfs/python/syncdaemon
+syncdaemondir = $(GLUSTERFS_LIBEXECDIR)/python/syncdaemon
syncdaemon_PYTHON = gconf.py gsyncd.py __init__.py master.py README.md repce.py \
resource.py configinterface.py syncdutils.py monitor.py libcxattr.py \
diff --git a/tools/gfind_missing_files/Makefile.am b/tools/gfind_missing_files/Makefile.am
index 043c34c4182..f77f7899efb 100644
--- a/tools/gfind_missing_files/Makefile.am
+++ b/tools/gfind_missing_files/Makefile.am
@@ -1,4 +1,4 @@
-gfindmissingfilesdir = $(libexecdir)/glusterfs/gfind_missing_files
+gfindmissingfilesdir = $(GLUSTERFS_LIBEXECDIR)/gfind_missing_files
gfindmissingfiles_SCRIPTS = gfind_missing_files.sh gfid_to_path.sh \
gfid_to_path.py
@@ -21,6 +21,6 @@ uninstall-local:
install-data-local:
rm -f $(DESTDIR)$(sbindir)/gfind_missing_files
- ln -s $(libexecdir)/glusterfs/gfind_missing_files/gfind_missing_files.sh $(DESTDIR)$(sbindir)/gfind_missing_files
+ ln -s $(GLUSTERFS_LIBEXECDIR)/gfind_missing_files/gfind_missing_files.sh $(DESTDIR)$(sbindir)/gfind_missing_files
CLEANFILES =
diff --git a/tools/glusterfind/Makefile.am b/tools/glusterfind/Makefile.am
index 37f23bed1bb..92fa61461ad 100644
--- a/tools/glusterfind/Makefile.am
+++ b/tools/glusterfind/Makefile.am
@@ -6,7 +6,7 @@ bin_SCRIPTS = glusterfind
CLEANFILES = $(bin_SCRIPTS)
-deletehookscriptsdir = $(libexecdir)/glusterfs/glusterfind/
+deletehookscriptsdir = $(GLUSTERFS_LIBEXECDIR)/glusterfind/
deletehookscripts_SCRIPTS = S57glusterfind-delete-post.py
uninstall-local:
@@ -16,5 +16,5 @@ install-data-local:
$(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR)/glusterfind/.keys
$(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/
rm -f $(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/S57glusterfind-delete-post
- ln -s $(libexecdir)/glusterfs/glusterfind/S57glusterfind-delete-post.py \
+ ln -s $(GLUSTERFS_LIBEXECDIR)/glusterfind/S57glusterfind-delete-post.py \
$(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/S57glusterfind-delete-post
diff --git a/tools/glusterfind/src/Makefile.am b/tools/glusterfind/src/Makefile.am
index 541ff946c04..e4469c1c0cf 100644
--- a/tools/glusterfind/src/Makefile.am
+++ b/tools/glusterfind/src/Makefile.am
@@ -1,4 +1,4 @@
-glusterfinddir = $(libexecdir)/glusterfs/glusterfind
+glusterfinddir = $(GLUSTERFS_LIBEXECDIR)/glusterfind
glusterfind_PYTHON = conf.py utils.py __init__.py \
main.py libgfchangelog.py changelogdata.py
diff --git a/xlators/features/ganesha/src/Makefile.am b/xlators/features/ganesha/src/Makefile.am
index 54cfcb3ad4d..78715d682e5 100644
--- a/xlators/features/ganesha/src/Makefile.am
+++ b/xlators/features/ganesha/src/Makefile.am
@@ -12,7 +12,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\
-I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-DGANESHA_DIR=\"$(sysconfdir)/ganesha\" \
- -DGYSNCD_PREFIX=\"$(libexecdir)/glusterfs\"
+ -DGYSNCD_PREFIX=\"$(GLUSTERFS_LIBEXECDIR)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 4f2fffdf252..23ebf379091 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -47,7 +47,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/rpc/rpc-lib/src \
-I$(CONTRIBDIR)/mount -I$(CONTRIBDIR)/userspace-rcu \
-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
- -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" \
+ -DGSYNCD_PREFIX=\"$(GLUSTERFS_LIBEXECDIR)\" \
-DCONFDIR=\"$(localstatedir)/run/gluster/shared_storage/nfs-ganesha\" \
-DGANESHA_PREFIX=\"$(libexecdir)/ganesha\" \
-DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) $(XML_CPPFLAGS)