if conf.env.standalone_ctdb:
conf.SAMBA_CHECK_PERL(mandatory=True)
- conf.SAMBA_CHECK_PYTHON(mandatory=True, version=(2,5,0))
- conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
+ conf.SAMBA_CHECK_PYTHON(mandatory=False, version=(2,5,0))
+ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False)
if conf.CHECK_FOR_THIRD_PARTY():
conf.RECURSE('third_party/popt')
bld.SAMBA_BINARY('ctdb_lock_helper',
source='server/ctdb_lock_helper.c',
- deps='samba-util sys_rw ctdb-system talloc tdb',
+ deps='''samba-util sys_rw ctdb-system tevent-util
+ talloc tevent tdb''',
includes='include',
install_path='${CTDB_HELPER_BINDIR}')
ib_deps,
install_path='${CTDB_TEST_LIBEXECDIR}')
+ if bld.env.HAVE_ROBUST_MUTEXES and sys.platform.startswith('linux'):
+ bld.SAMBA_BINARY('test_mutex_raw',
+ source='tests/src/test_mutex_raw.c',
+ deps='pthread',
+ install_path='${CTDB_TEST_LIBEXECDIR}')
+
test_subdirs = [
'complex',
'cunit',
'tool'
]
+ if bld.env.standalone_ctdb:
+ testdir = 'tests'
+ else:
+ testdir = 'ctdb/tests'
+
for t in test_subdirs:
- files = SUBDIR_MODE('tests/%s' % t, trim_path='tests')
+ files = SUBDIR_MODE('%s/%s' % (testdir, t), trim_path=testdir)
for fmode in files:
bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR, 'tests/%s' % fmode[0],
destname=fmode[0], chmod=fmode[1])
print VERSION
-def dist():
+def manpages(ctx):
+ BASE_URL = 'http://docbook.sourceforge.net/release/xsl/current'
+ MAN_XSL = '%s/manpages/docbook.xsl' % BASE_URL
+ HTML_XSL = '%s/html/docbook.xsl' % BASE_URL
+ CMD_TEMPLATE = 'xsltproc --xinclude -o %s --nonet %s %s'
+ manpages = manpages_binary + manpages_misc + manpages_etcd + manpages_ceph
+ for t in manpages:
+ cmd = CMD_TEMPLATE % ('doc/%s' % t, MAN_XSL, 'doc/%s.xml' % t)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('Command %s failed with exit status %d' % (cmd, ret))
+ sys.exit(ret)
+
+ cmd = CMD_TEMPLATE % ('doc/%s.html' % t, HTML_XSL, 'doc/%s.xml' % t)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('Command %s failed with exit status %d' % (cmd, ret))
+ sys.exit(ret)
+
+
+def distonly(ctx):
samba_dist.DIST_FILES('VERSION:VERSION', extend=True)
t = 'include/ctdb_version.h'
sys.exit(ret)
samba_dist.DIST_FILES('ctdb/%s:%s' % (t, t), extend=True)
- BASE_URL = 'http://docbook.sourceforge.net/release/xsl/current'
- MAN_XSL = '%s/manpages/docbook.xsl' % BASE_URL
- HTML_XSL = '%s/html/docbook.xsl' % BASE_URL
- CMD_TEMPLATE = 'xsltproc --xinclude -o %s --nonet %s %s'
manpages = manpages_binary + manpages_misc + manpages_etcd + manpages_ceph
for t in manpages:
- cmd = CMD_TEMPLATE % ('doc/%s' % t, MAN_XSL, 'doc/%s.xml' % t)
- ret = samba_utils.RUN_COMMAND(cmd)
- if ret != 0:
- print('Command %s failed with exit status %d' % (cmd, ret))
- sys.exit(ret)
-
- cmd = CMD_TEMPLATE % ('doc/%s.html' % t, HTML_XSL, 'doc/%s.xml' % t)
- ret = samba_utils.RUN_COMMAND(cmd)
- if ret != 0:
- print('Command %s failed with exit status %d' % (cmd, ret))
- sys.exit(ret)
-
samba_dist.DIST_FILES('ctdb/doc/%s:doc/%s' % (t, t), extend=True)
samba_dist.DIST_FILES('ctdb/doc/%s.html:doc/%s.html' % (t, t),
extend=True)
samba_dist.dist()
+def dist():
+ import Scripting
+ Scripting.commands.append('manpages')
+ Scripting.commands.append('distonly')
+
+
def rpmonly(ctx):
opts = os.getenv('RPM_OPTIONS') or ''
cmd = 'rpmbuild -ta --clean --rmsource %s ctdb-%s.tar.gz' % (opts, VERSION)
def rpm(ctx):
import Scripting
- Scripting.commands.append('dist')
+ Scripting.commands.append('manpages')
+ Scripting.commands.append('distonly')
Scripting.commands.append('rpmonly')