[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Wed Oct 8 01:43:01 MDT 2014
The branch, master has been updated
via e94422a build: Hook CTDB into top level build using --with-cluster-support
via d568be6 ctdb-build: Make some steps conditional on standalone build
via 6b98ddc ctdb-build: Rename define BINDIR to CTDB_HELPER_BINDIR
from 6f97237 s3-rpc_client: Migrate to cli_rpc_pipe_open_generic_auth and remove cli_rpc_pipe_open_spnego
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e94422a8acf4a812ed19ddd63b42789df49a3f00
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Aug 25 14:05:48 2014 +1000
build: Hook CTDB into top level build using --with-cluster-support
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Wed Oct 8 09:42:08 CEST 2014 on sn-devel-104
commit d568be69891da3944df2de8629e7e64bc480ad86
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Aug 25 13:46:00 2014 +1000
ctdb-build: Make some steps conditional on standalone build
CTDB's current wscript assumes that it is only used as part of a
standalone build. However, it will soon be part of a unified build so
make some steps conditional.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 6b98ddc54fe20367a60601c4b430c73408e7e1c5
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Sep 26 15:42:34 2014 +1000
ctdb-build: Rename define BINDIR to CTDB_HELPER_BINDIR
This avoids a clash with Samba's BINDIR and also makes it easier to
move the helpers to somewhere else (e.g. libexec) in the future.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
ctdb/server/ctdb_lock.c | 2 +-
ctdb/server/eventscript.c | 2 +-
ctdb/wscript | 88 +++++++++++++++++++++++++-------------------
wscript | 4 ++
wscript_build | 2 +
5 files changed, 58 insertions(+), 40 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 3a9b327..22a88b3 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -724,7 +724,7 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
struct lock_context *lock_ctx;
int ret, argc;
TALLOC_CTX *tmp_ctx;
- const char *helper = BINDIR "/ctdb_lock_helper";
+ const char *helper = CTDB_HELPER_BINDIR "/ctdb_lock_helper";
static const char *prog = NULL;
const char **args;
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c
index 447a83c..28bbb54 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -271,7 +271,7 @@ static int fork_child_for_script(struct ctdb_context *ctdb,
struct ctdb_script_wire *current = get_current_script(state);
int argc;
const char **argv;
- static const char *helper = BINDIR "/ctdb_event_helper";
+ static const char *helper = CTDB_HELPER_BINDIR "/ctdb_event_helper";
if (helper_prog == NULL) {
const char *t = getenv("CTDB_EVENT_HELPER");
diff --git a/ctdb/wscript b/ctdb/wscript
index 2802b78..788aa5e 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -70,14 +70,16 @@ def configure(conf):
# No need to build python bindings for talloc/tevent/tdb
if conf.IN_LAUNCH_DIR():
+ conf.env.standalone_ctdb = True
Options.options.disable_python = True
conf.RECURSE('lib/replace')
- conf.SAMBA_CHECK_PERL(mandatory=True)
+ 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=True, version=(2,5,0))
+ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
if conf.CHECK_FOR_THIRD_PARTY():
conf.RECURSE('third_party/popt')
@@ -177,7 +179,7 @@ def configure(conf):
conf.env.CTDB_SOCKPATH = os.path.join(conf.env.CTDB_RUNDIR,
'ctdbd.socket')
- conf.ADD_CFLAGS('''-DBINDIR=\"%s\"
+ conf.ADD_CFLAGS('''-DCTDB_HELPER_BINDIR=\"%s\"
-DLOGDIR=\"%s\"
-DSOCKPATH=\"%s\"
-DCTDB_ETCDIR=\"%s\"
@@ -196,45 +198,54 @@ def configure(conf):
# Allow unified compilation and separate compilation of utilities
# to find includes
- if srcdir == '.':
- # Building from tarball
- conf.ADD_EXTRA_INCLUDES('#include')
- conf.ADD_EXTRA_INCLUDES('#include/internal')
- else:
- # Building standalone CTDB from within Samba tree
+ if not conf.env.standalone_ctdb:
conf.ADD_EXTRA_INCLUDES('#ctdb/include')
- conf.ADD_EXTRA_INCLUDES('#ctdb/include/internal')
- conf.ADD_EXTRA_INCLUDES('#ctdb')
- conf.ADD_EXTRA_INCLUDES('#lib #lib/replace')
+ else:
+ if srcdir == '.':
+ # Building from tarball
+ conf.ADD_EXTRA_INCLUDES('#include')
+ conf.ADD_EXTRA_INCLUDES('#include/internal')
+ else:
+ # Building standalone CTDB from within Samba tree
+ conf.ADD_EXTRA_INCLUDES('#ctdb/include')
+ conf.ADD_EXTRA_INCLUDES('#ctdb/include/internal')
+ conf.ADD_EXTRA_INCLUDES('#ctdb')
+ conf.ADD_EXTRA_INCLUDES('#lib #lib/replace')
- conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY')
+ conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY')
- del(conf.env.defines['PYTHONDIR'])
- del(conf.env.defines['PYTHONARCHDIR'])
+ del(conf.env.defines['PYTHONDIR'])
+ del(conf.env.defines['PYTHONARCHDIR'])
- conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
- conf.DEFINE('SAMBA_UTIL_CORE_ONLY', 1, add_to_cflags=True)
- conf.SAMBA_CONFIG_H()
+ conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
+ conf.DEFINE('SAMBA_UTIL_CORE_ONLY', 1, add_to_cflags=True)
+ conf.SAMBA_CONFIG_H()
def build(bld):
- # enable building of public headers in the build tree
- bld.env.build_public_headers = 'include/public'
+ if bld.env.standalone_ctdb:
+ # enable building of public headers in the build tree
+ bld.env.build_public_headers = 'include/public'
+ if bld.env.standalone_ctdb:
+ ctdb_mkversion = '../packaging/mkversion.sh'
+ else:
+ ctdb_mkversion = '../ctdb/packaging/mkversion.sh'
t = bld.SAMBA_GENERATOR('ctdb-version-header',
target='include/ctdb_version.h',
- rule='../packaging/mkversion.sh ${TGT} %s' % (VERSION),
+ rule='%s ${TGT} %s' % (ctdb_mkversion, VERSION),
dep_vars=['VERSION'])
t.env.VERSION = VERSION
- version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
- "version.h"),
- bld.curdir)
- t.bld.SAMBA_GENERATOR('ctdb-samba-version-header',
- target=version_h,
- rule='printf "#include \\"ctdb_version.h\\" \\n#define SAMBA_VERSION_STRING CTDB_VERSION_STRING\\n" > ${TGT}',
- dep_vars=['VERSION'])
- t.env.VERSION = VERSION
+ if bld.env.standalone_ctdb:
+ version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
+ "version.h"),
+ bld.curdir)
+ t.bld.SAMBA_GENERATOR('ctdb-samba-version-header',
+ target=version_h,
+ rule='printf "#include \\"ctdb_version.h\\" \\n#define SAMBA_VERSION_STRING CTDB_VERSION_STRING\\n" > ${TGT}',
+ dep_vars=['VERSION'])
+ t.env.VERSION = VERSION
bld.RECURSE('lib/replace')
if bld.CHECK_FOR_THIRD_PARTY():
@@ -248,14 +259,15 @@ def build(bld):
bld.RECURSE('lib/tdb')
bld.RECURSE('lib/socket_wrapper')
- # When a combined build is implemented, CTDB will wanted to build
- # against samba-util rather than samba-util-core. Similarly,
- # other Samba subsystems expect samba-util. So, for a standalone
- # build, just define a fake samba-util subsystem that pulls in
- # samba-util-core.
- bld.SAMBA_SUBSYSTEM('samba-util',
- source='',
- deps='samba-util-core')
+ if bld.env.standalone_ctdb:
+ # In a combined build is implemented, CTDB will wanted to
+ # build against samba-util rather than samba-util-core.
+ # Similarly, other Samba subsystems expect samba-util. So,
+ # for a standalone build, just define a fake samba-util
+ # subsystem that pulls in samba-util-core.
+ bld.SAMBA_SUBSYSTEM('samba-util',
+ source='',
+ deps='samba-util-core')
bld.SAMBA_SUBSYSTEM('ctdb-tcp',
source=bld.SUBDIR('tcp',
diff --git a/wscript b/wscript
index 73c113c..7124e57 100644
--- a/wscript
+++ b/wscript
@@ -43,6 +43,7 @@ def set_options(opt):
opt.RECURSE('pidl')
opt.RECURSE('source3')
opt.RECURSE('lib/util')
+ opt.RECURSE('ctdb')
opt.add_option('--with-system-mitkrb5',
help='enable system MIT krb5 build (includes Samba 4 client and Samba 3 code base).'+
@@ -166,6 +167,9 @@ def configure(conf):
conf.RECURSE('selftest')
conf.RECURSE('source3')
conf.RECURSE('lib/texpect')
+ if Options.options.with_cluster_support:
+ conf.env.with_ctdb = True
+ conf.RECURSE('ctdb')
conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
diff --git a/wscript_build b/wscript_build
index 48cb71d..d7dea54 100644
--- a/wscript_build
+++ b/wscript_build
@@ -139,6 +139,8 @@ bld.RECURSE('libcli/smbreadline')
bld.RECURSE('codepages')
if bld.AD_DC_BUILD_IS_ENABLED():
bld.RECURSE('source4/setup')
+if bld.env.with_ctdb:
+ bld.RECURSE('ctdb')
bld.RECURSE('source4/scripting')
bld.RECURSE('pidl')
bld.RECURSE('lib')
--
Samba Shared Repository
More information about the samba-cvs
mailing list