diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-06-29 18:56:44 -0700 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-08-07 01:17:29 -0700 |
commit | 2ec6ea43f2ddc6c00a030be6d04c00f0924277b7 (patch) | |
tree | b2d98cd8c4760c1af44c8b6a70661fe5566ce6da /xlators/mgmt/glusterd | |
parent | f29da9bcc812e3d0711005ce86051d70c277a165 (diff) |
build: make GLUSTERD_WORKDIR rely on localstatedir
- 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: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/Makefile.am | 11 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-hooks.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 1 |
4 files changed, 7 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am index d8a1e257c4e..913a2a70729 100644 --- a/xlators/mgmt/glusterd/src/Makefile.am +++ b/xlators/mgmt/glusterd/src/Makefile.am @@ -41,10 +41,9 @@ AM_LDFLAGS = -L$(xlatordir) CLEANFILES = install-data-hook: - -if GF_INSTALL_VAR_LIB_GLUSTERD - $(mkdir_p) $(localstatedir)/lib/ - (stat $(sysconfdir)/glusterd && \ - mv $(sysconfdir)/glusterd $(localstatedir)/lib/) || true; - (ln -sf $(localstatedir)/lib/glusterd $(sysconfdir)/glusterd) || true; +if GF_INSTALL_GLUSTERD_WORKDIR + $(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR) + (stat $(DESTDIR)$(sysconfdir)/glusterd && \ + mv $(DESTDIR)$(sysconfdir)/glusterd $(DESTDIR)$(GLUSTERD_WORKDIR)) || true; + (ln -sf $(DESTDIR)$(GLUSTERD_WORKDIR) $(sysconfdir)/glusterd) || true; endif diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c index 2d402b0dd56..f36764e4832 100644 --- a/xlators/mgmt/glusterd/src/glusterd-hooks.c +++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c @@ -260,6 +260,7 @@ glusterd_hooks_add_op_args (runner_t *runner, glusterd_op_t op, case GD_OP_SET_VOLUME: ret = glusterd_hooks_set_volume_args (op_ctx, runner); + glusterd_hooks_add_working_dir (runner, priv); break; case GD_OP_GSYNC_CREATE: diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index c5fa245dbd8..b59353566a7 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1199,7 +1199,7 @@ init (xlator_t *this) first_time = 1; } - setenv ("GLUSTERD_WORKING_DIR", workdir, 1); + setenv ("GLUSTERD_WORKDIR", workdir, 1); gf_log (this->name, GF_LOG_INFO, "Using %s as working directory", workdir); diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index f7b4f012e03..f1139ad027d 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -464,7 +464,6 @@ enum glusterd_vol_comp_status_ { GLUSTERD_VOL_COMP_RJT, }; -#define GLUSTERD_DEFAULT_WORKDIR "/var/lib/glusterd" #define GLUSTERD_DEFAULT_PORT GF_DEFAULT_BASE_PORT #define GLUSTERD_INFO_FILE "glusterd.info" #define GLUSTERD_VOLUME_QUOTA_CONFIG "quota.conf" |