summaryrefslogtreecommitdiffstats
path: root/geo-replication/src
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-08-14 13:06:26 -0700
committerHarshavardhana <harsha@harshavardhana.net>2014-09-03 11:01:45 -0700
commit025ae07850375cbf981ed335a4ddf702d54be6e3 (patch)
treea119246764dc98f0d0c7fb87572cd1b01bc18684 /geo-replication/src
parent845d6c76701a3de6a11b76b004176971411c714e (diff)
build: make GLUSTERD_WORKDIR rely on localstatedir
Backport from master branch - http://review.gluster.org/#/c/8246/ - Break-way from '/var/lib/glusterd' hard-coded previously, instead rely on 'configure' value from 'localstatedir' - Provide 's/lib/db' as default working directory for gluster management daemon for BSD and Darwin based installations - loff_t is really off_t on Darwin - fix-off the warnings generated by clang on FreeBSD/Darwin - Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all platforms. - Define proper environment for running tests, define correct PATH and LD_LIBRARY_PATH when running tests, so that the desired version of glusterfs is used, regardless where it is installed. (Thanks to manu@netbsd.org for this additional work) Change-Id: I06e684ac4c26d1e74c9daf76753403ad15f79276 BUG: 1130308 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8486 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'geo-replication/src')
-rw-r--r--geo-replication/src/Makefile.am4
-rw-r--r--geo-replication/src/peer_add_secret_pub.in2
-rwxr-xr-xgeo-replication/src/peer_gsec_create.in16
-rwxr-xr-xgeo-replication/src/set_geo_rep_pem_keys.sh4
4 files changed, 12 insertions, 14 deletions
diff --git a/geo-replication/src/Makefile.am b/geo-replication/src/Makefile.am
index 20b5b6bde6b..68b18c66e88 100644
--- a/geo-replication/src/Makefile.am
+++ b/geo-replication/src/Makefile.am
@@ -1,4 +1,3 @@
-
gsyncddir = $(libexecdir)/glusterfs
gsyncd_SCRIPTS = gverify.sh peer_add_secret_pub peer_gsec_create set_geo_rep_pem_keys.sh
@@ -11,8 +10,7 @@ gsyncd_PROGRAMS = gsyncd
gsyncd_SOURCES = gsyncd.c procdiggy.c
-gsyncd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(GF_GLUSTERFS_LIBS)
+gsyncd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
gsyncd_LDFLAGS = $(GF_LDFLAGS)
diff --git a/geo-replication/src/peer_add_secret_pub.in b/geo-replication/src/peer_add_secret_pub.in
index 122e577b446..97011f204d2 100644
--- a/geo-replication/src/peer_add_secret_pub.in
+++ b/geo-replication/src/peer_add_secret_pub.in
@@ -30,4 +30,4 @@ if [ ! -d $home_dir/.ssh/authorized_keys ]; then
chown $user: $home_dir/.ssh/authorized_keys;
fi
-cat "$GLUSTERD_WORKING_DIR"/geo-replication/common_secret.pem.pub >> $home_dir/.ssh/authorized_keys;
+cat "$GLUSTERD_WORKDIR"/geo-replication/common_secret.pem.pub >> $home_dir/.ssh/authorized_keys;
diff --git a/geo-replication/src/peer_gsec_create.in b/geo-replication/src/peer_gsec_create.in
index a39fdbfb5f7..9cadce56453 100755
--- a/geo-replication/src/peer_gsec_create.in
+++ b/geo-replication/src/peer_gsec_create.in
@@ -3,16 +3,16 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-if [ ! -f "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem.pub ]; then
- \rm -rf "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem*
- ssh-keygen -N '' -f "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem > /dev/null
+if [ ! -f "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub ]; then
+ \rm -rf "$GLUSTERD_WORKDIR"/geo-replication/secret.pem*
+ ssh-keygen -N '' -f "$GLUSTERD_WORKDIR"/geo-replication/secret.pem > /dev/null
fi
-if [ ! -f "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem.pub ]; then
- \rm -rf "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem*
- ssh-keygen -N '' -f "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem > /dev/null
+if [ ! -f "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub ]; then
+ \rm -rf "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem*
+ ssh-keygen -N '' -f "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem > /dev/null
fi
-output1=`echo command=\"${exec_prefix}/libexec/glusterfs/gsyncd\" " "``cat "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem.pub`
-output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" " "``cat "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem.pub`
+output1=`echo command=\"${exec_prefix}/libexec/glusterfs/gsyncd\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub`
+output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub`
echo -e "$output1\n$output2"
diff --git a/geo-replication/src/set_geo_rep_pem_keys.sh b/geo-replication/src/set_geo_rep_pem_keys.sh
index 7a7bcad25c2..7b825693fad 100755
--- a/geo-replication/src/set_geo_rep_pem_keys.sh
+++ b/geo-replication/src/set_geo_rep_pem_keys.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Script to copy the pem keys from the user's home directory
-# to $GLUSTERD_WORKING_DIR/geo-replication/ and then copy
+# to $GLUSTERD_WORKDIR/geo-replication and then copy
# the keys to other nodes in the cluster and add them to the
# respective authorized keys. The script takes as argument the
# user name and assumes that the user will be present in all
@@ -28,7 +28,7 @@ function main()
fi
if [ -f $home_dir/common_secret.pem.pub ]; then
- cp $home_dir/common_secret.pem.pub /var/lib/glusterd/geo-replication/
+ cp $home_dir/common_secret.pem.pub ${GLUSTERD_WORKDIR}/geo-replication/
gluster system:: copy file /geo-replication/common_secret.pem.pub
gluster system:: execute add_secret_pub $user
else