[SCM] Samba Shared Repository - branch master updated

Martin Schwenke martins at samba.org
Tue Jun 24 01:38:03 MDT 2014


The branch, master has been updated
       via  d097898 ctdb-build: Instead of default test_wrap, install fixed test_wrap
       via  e9006db ctdb-build: Fix sed expression to protect '\'
       via  a0d2070 ctdb-build: Use correct path variables for ctdb_run_tests.sh
       via  4f6d668 ctdb-build: Use CTDB_ETCDIR instead of ETCDIR/ctdb
       via  7793aa5 ctdb-build: Use CTDB_RUNDIR instead of VARDIR/run/ctdb
       via  8cd48c6 ctdb-build: Add special target to get build version
       via  113c579 ctdb-build: Allow waf to build rpms without configure first
      from  f45f2d0 torture: Remove confusing reference to (1 sec == 0.25)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d097898020c77c34c99cda17f386d445c7980bed
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 16:31:25 2014 +1000

    ctdb-build: Instead of default test_wrap, install fixed test_wrap
    
    tests/scripts/test_wrap script is updated based on the configured paths.
    This should be installed instead of the stock version in the source.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Tue Jun 24 09:37:39 CEST 2014 on sn-devel-104

commit e9006db3eb49ea07bde58ae9f8c5d70b4816589f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 15:58:06 2014 +1000

    ctdb-build: Fix sed expression to protect '\'
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit a0d207001a8ddb077d0ec52d54a90efac652989d
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 15:48:37 2014 +1000

    ctdb-build: Use correct path variables for ctdb_run_tests.sh
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 4f6d668cfa7c34c10cf180f3cef84b151eba5ea1
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 18:03:17 2014 +1000

    ctdb-build: Use CTDB_ETCDIR instead of ETCDIR/ctdb
    
    This avoids hardcoding path components in source.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 7793aa56178ad16a6bbe60d8781928cfc7feea38
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 15:20:44 2014 +1000

    ctdb-build: Use CTDB_RUNDIR instead of VARDIR/run/ctdb
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 8cd48c6b1cbdc7b2d151985a044e0bff12269a1a
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 12:55:19 2014 +1000

    ctdb-build: Add special target to get build version
    
    This avoids the need to build a tarball to get version information.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 113c5799d4df69a95f37f23a374d9f313f57b5ec
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jun 23 12:24:38 2014 +1000

    ctdb-build: Allow waf to build rpms without configure first
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/Makefile             |    7 ++++++-
 ctdb/server/ctdbd.c       |    2 +-
 ctdb/server/eventscript.c |    2 +-
 ctdb/tcp/tcp_connect.c    |    2 +-
 ctdb/tools/ctdb.c         |    2 +-
 ctdb/wscript              |   38 ++++++++++++++++++++++++++++----------
 6 files changed, 38 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/Makefile b/ctdb/Makefile
index c2ee2dd..4d2f059 100644
--- a/ctdb/Makefile
+++ b/ctdb/Makefile
@@ -23,6 +23,10 @@ autotest:
 quicktest:
 	$(WAF) test --quick $(TEST_OPTIONS)
 
+show_version:
+	@touch .tmplock
+	@WAFLOCK=.tmplock $(WAF) show_version
+
 dist:
 	touch .tmplock
 	WAFLOCK=.tmplock $(WAF) dist
@@ -32,7 +36,8 @@ distcheck:
 	WAFLOCK=.tmplock $(WAF) distcheck
 
 rpm:
-	$(WAF) rpm
+	touch .tmplock
+	WAFLOCK=.tmplock $(WAF) rpm
 
 clean:
 	$(WAF) clean
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 5cd0497..9cbdc26 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -240,7 +240,7 @@ int main(int argc, const char *argv[])
 	ctdb->pnn = -1;
 
 	/* Default value for CTDB_BASE - don't override */
-	setenv("CTDB_BASE", ETCDIR "/ctdb", 0);
+	setenv("CTDB_BASE", CTDB_ETCDIR, 0);
 
 	/* tell ctdb what nodes are available */
 	if (options.nlist != NULL) {
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c
index a108b78..604b8de 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -440,7 +440,7 @@ static void debug_hung_script_done(struct tevent_context *ev, struct tevent_fd *
 static void ctdb_run_debug_hung_script(struct ctdb_context *ctdb, struct debug_hung_script_state *state)
 {
 	pid_t pid;
-	const char * debug_hung_script = ETCDIR "/ctdb/debug-hung-script.sh";
+	const char * debug_hung_script = CTDB_ETCDIR "/debug-hung-script.sh";
 	int fd[2];
 	struct tevent_timer *ttimer;
 	struct tevent_fd *tfd;
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 8032662..8a112ff 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -293,7 +293,7 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
 						struct ctdb_tcp);
         ctdb_sock_addr sock;
 	int lock_fd, i;
-	const char *lock_path = VARDIR "/run/ctdb/.socket_lock";
+	const char *lock_path = CTDB_RUNDIR "/.socket_lock";
 	struct flock lock;
 	int one = 1;
 	int sock_size;
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 4704726..aa0e4e3 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -6536,7 +6536,7 @@ int main(int argc, const char *argv[])
 	control = extra_argv[0];
 
 	/* Default value for CTDB_BASE - don't override */
-	setenv("CTDB_BASE", ETCDIR "/ctdb", 0);
+	setenv("CTDB_BASE", CTDB_ETCDIR, 0);
 
 	ev = event_context_init(NULL);
 	if (!ev) {
diff --git a/ctdb/wscript b/ctdb/wscript
index f69bf58..df7ce98 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -130,15 +130,18 @@ def configure(conf):
         conf.env.CTDB_SOCKPATH = os.path.join(conf.env.CTDB_RUNDIR,
                                               'ctdbd.socket')
 
-    conf.ADD_CFLAGS('''-DBINDIR=\"%s\" -DETCDIR=\"%s\" -DVARDIR=\"%s\"
-                       -DLOGDIR=\"%s\" -DSOCKPATH=\"%s\"
-                       -DCTDB_VARDIR=\"%s\"''' % (
+    conf.ADD_CFLAGS('''-DBINDIR=\"%s\"
+                       -DLOGDIR=\"%s\"
+                       -DSOCKPATH=\"%s\"
+                       -DCTDB_ETCDIR=\"%s\"
+                       -DCTDB_VARDIR=\"%s\"
+                       -DCTDB_RUNDIR=\"%s\"''' % (
                     conf.env.CTDB_BINDIR,
-                    conf.env.CTDB_ETCDIR,
-                    conf.env.CTDB_VARDIR,
                     conf.env.CTDB_LOGDIR,
                     conf.env.CTDB_SOCKPATH,
-                    conf.env.CTDB_VARDIR))
+                    conf.env.CTDB_ETCDIR,
+                    conf.env.CTDB_VARDIR,
+                    conf.env.CTDB_RUNDIR))
 
     conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX,
                                               'share/ctdb-tests')
@@ -465,7 +468,6 @@ def build(bld):
         'events.d',
         'eventscripts',
         'onnode',
-        'scripts',
         'simple',
         'takeover',
         'tool'
@@ -477,16 +479,30 @@ def build(bld):
             bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR, 'tests/%s' % fmode[0],
                               destname=fmode[0], chmod=fmode[1])
 
+    # Install tests/scripts directory without test_wrap
+    test_scripts = [
+        'common.sh',
+        'integration.bash',
+        'unit.sh'
+    ]
+
+    for t in test_scripts:
+        bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR,
+                          os.path.join('tests/scripts', t),
+                          destname=os.path.join('scripts', t))
+
     sed_expr = 's@^TEST_SCRIPTS_DIR=.*@&\\nexport TEST_BIN_DIR=\"%s\"@' % (
                bld.env.CTDB_TEST_LIBDIR)
     bld.SAMBA_GENERATOR('ctdb-test-wrap',
                         source='tests/scripts/test_wrap',
                         target='test_wrap',
                         rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr)
+    bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR+"/scripts", 'test_wrap',
+                      destname='test_wrap', chmod=0755)
 
     sed_expr1 = 's@^test_dir=.*@test_dir=%s\\nexport TEST_BIN_DIR=\"%s\"@' % (
-                bld.env.CTDB_DATA_DIR, bld.env.CTDB_LIBDIR)
-    sed_expr2 = 's@^\(export CTDB_TESTS_ARE_INSTALLED\)=false@\1=true@'
+                bld.env.CTDB_TEST_DATADIR, bld.env.CTDB_TEST_LIBDIR)
+    sed_expr2 = 's@^\(export CTDB_TESTS_ARE_INSTALLED\)=false@\\1=true@'
     bld.SAMBA_GENERATOR('ctdb-test-runner',
                         source='tests/run_tests.sh',
                         target='ctdb_run_tests.sh',
@@ -523,8 +539,10 @@ def autotest(ctx):
     cmd = 'LD_PRELOAD=bin/shared/libsocket-wrapper.so tests/run_tests.sh -e -S -C'
     samba_utils.RUN_COMMAND(cmd)
 
-def dist():
+def show_version(ctx):
+    print VERSION
 
+def dist():
     samba_dist.DIST_FILES('VERSION:VERSION', extend=True)
 
     t = 'include/ctdb_version.h'


-- 
Samba Shared Repository


More information about the samba-cvs mailing list