aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2018-07-09 14:53:00 +0200
committerKarolin Seeger <kseeger@samba.org>2018-08-23 10:38:27 +0200
commit30c37fcacc212c9eb38746727a85e250d9448769 (patch)
tree04cd8398f6f44099b34cfcc35f2ed295ab33709e
parent0a49817dd4216978dc34f7a381a2c35b01cc77f9 (diff)
downloadsamba-30c37fcacc212c9eb38746727a85e250d9448769.tar.gz
samba-30c37fcacc212c9eb38746727a85e250d9448769.tar.xz
samba-30c37fcacc212c9eb38746727a85e250d9448769.zip
ctdb/build: link ctdb_mutex_ceph_rados_helper against ceph-common
ceph-common linkage is needed with new versions of Ceph. Also respect the --libcephfs_dir=<path> parameter when provided. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit bd64af6b8861f892e6ae2840a493f037d1e0a06c)
-rw-r--r--ctdb/wscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index 1ca90a4d5b0..f8259c7c1d6 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -83,6 +83,10 @@ def set_options(opt):
opt.add_option('--enable-etcd-reclock',
help=("Enable etcd recovery lock helper (default=no)"),
action="store_true", dest='ctdb_etcd_reclock', default=False)
+
+ opt.add_option('--with-libcephfs',
+ help=("Directory under which libcephfs is installed"),
+ action="store", dest='libcephfs_dir', default=None)
opt.add_option('--enable-ceph-reclock',
help=("Enable Ceph CTDB recovery lock helper (default=no)"),
action="store_true", dest='ctdb_ceph_reclock', default=False)
@@ -219,8 +223,16 @@ def configure(conf):
conf.env.etcd_reclock = have_etcd_reclock
if Options.options.ctdb_ceph_reclock:
+ # Use custom libcephfs library path if provided. XXX The top level build
+ # explicitly sets LIBPATH_CEPH-COMMON when libcephfs_dir isn't provided.
+ if Options.options.libcephfs_dir:
+ conf.env['CPPPATH_RADOS'] = Options.options.libcephfs_dir + '/include'
+ conf.env['LIBPATH_RADOS'] = Options.options.libcephfs_dir + '/lib'
+ conf.env['LIBPATH_CEPH-COMMON'] = conf.env['LIBPATH_RADOS'] + '/ceph'
+
if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
conf.CHECK_LIB('rados', shlib=True)):
+ conf.CHECK_LIB('ceph-common', shlib=True)
Logs.info('Building with Ceph librados recovery lock support')
conf.define('HAVE_LIBRADOS', 1)
else:
@@ -593,7 +605,7 @@ def build(bld):
if bld.env.HAVE_LIBRADOS:
bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
- deps='talloc tevent rados',
+ deps='talloc tevent rados ceph-common',
includes='include',
install_path='${CTDB_HELPER_BINDIR}')