1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

48 Commits

Author SHA1 Message Date
Amitay Isaacs
7a10e07770 ctdb-build: Specify absolute path to libsocket-wrapper.so
Specifying a relative path to LD_PRELOAD can fail if any of the test
scripts uses cd to change directory and execute commands.

Adding statd-callout tests breaks autotest since statd-callout does "cd".

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Mar  4 13:11:53 CET 2015 on sn-devel-104
2015-03-04 13:11:53 +01:00
Martin Schwenke
22602f76bc ctdb-tests: Unit tests for statd-callout
With improvements to unit test infrastructure to support.  This
includes linking the real statd-callout into etc-ctdb/ in place of the
placeholder script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-04 10:42:27 +01:00
Björn Baumbach
8d5f58120b ctdb-build: fix build without xsltproc
Check for XSLTPROC_MANPAGES before trying to build the docs.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-12-15 13:53:08 +01:00
Amitay Isaacs
be241207c2 ctdb-build: Fix the installation of config files for top-level build
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-15 13:53:08 +01:00
Amitay Isaacs
641bb5eab3 ctdb-build: Fix the indentation
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-15 13:53:08 +01:00
Martin Schwenke
739324eead ctdb-logging: Separate out syslog and file logging backends
This makes the code cleaner and allows the syslog backend to be easily
modified without affecting other code.  Also do some extra clean-up,
including whitespace fixups.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-10-28 05:42:04 +01:00
Martin Schwenke
d568be6989 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@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-08 07:19:04 +02:00
Martin Schwenke
6b98ddc54f 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@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-08 07:19:04 +02:00
Martin Schwenke
88b24858d8 ctdb-build: Fix handling of public headers
Add the header munging, add/package ctdb_version.h, create
directory include/public.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Oct  6 14:56:07 CEST 2014 on sn-devel-104
2014-10-06 14:56:06 +02:00
Martin Schwenke
59c3025706 ctdb-build: Change from ctdb-util to samba-util
Remove local lib/util and lib/tdb-wrap. Update wscript, packaging and
includes.h.

The only potentially surprising thing here is a fake samba-util
subsystem that just depends on samba-util-core.  As explained in a
comment:

  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.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-10-06 12:34:33 +02:00
Martin Schwenke
43266be945 ctdb-build: Add generation of Samba-style version.h
This is needed by fault.c.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-10-06 12:34:33 +02:00
Martin Schwenke
ba3e2ecf67 ctdb-build: Move generation of ctdb_version.h earlier
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-10-06 12:34:33 +02:00
Amitay Isaacs
5d1aecf12e ctdb-build: Add missing configure checks for backtrace
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Sep 19 06:06:31 CEST 2014 on sn-devel-104
2014-09-19 06:06:31 +02:00
Amitay Isaacs
d1ea95e3c3 ctdb-build: Check for libpcap
AIX and FreeBSD do not support raw sockets.  So use libpcap interface
to watch for specific TCP messages.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-17 07:29:10 +02:00
Amitay Isaacs
e4b9beb2d8 ctdb-build: Check for ETIME in errno.h
ETIME is not defined on freebsd.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-17 07:29:10 +02:00
Martin Schwenke
a0a21af918 ctdb-build: Add some missing configure checks
Fail configure if thread_setsched() is unavailable on AIX or if
sched_setscheduler() is unavailable on other platforms.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-17 07:29:10 +02:00
Amitay Isaacs
d692be0363 ctdb-build: Improve platform check
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-17 07:29:10 +02:00
Amitay Isaacs
efd34bb274 ctdb-doc: Add ctdb-statistics manual page
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-12 08:46:15 +02:00
Martin Schwenke
1c00533bc0 ctdb-build: Remove unnecessary lib/util include path from tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Sep 11 06:22:33 CEST 2014 on sn-devel-104
2014-09-11 06:22:33 +02:00
Martin Schwenke
86430d528b ctdb-build: Tests don't include lib/util/*.c, link ctdb-util instead
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:15 +02:00
Martin Schwenke
9c69a71740 ctdb-build: Drop lib/util from includes
In is unnecessary and can accidentally cause lib/util/time.h to be
found instead of /usr/include/time.h.  The only things depending on it
were bare includes of db_wrap.h and a bare include of dlinklist.h,
which are both gone now.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:15 +02:00
Martin Schwenke
acf26089f1 ctdb-util: Rename db_wrap to tdb_wrap and make it a build subsystem
This makes it consistent with Samba, to ease transition.

Update unit test code to link to with tdb_wrap instead of including
db_wrap.c.

There are some potential whitespace fixes in this commit that have
been ignored.  CTDB's lib/tdb_wrap will be deleted after the
transition to Samba's lib/tdb_wrap, so there's no point polishing it
too much.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:15 +02:00
Martin Schwenke
088e4ab3ac ctdb-build: Make ctdb-util a wscript build subsystem
This makes it look similar to samba-util, easing the transition.

Fold ctdb-util-misc into ctdb-util, since Samba doesn't separate them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:15 +02:00
Martin Schwenke
01598ce18d ctdb-build: Add extra includes to help recursive utility compilation
Subsequent commits will introduce recursive compilation of utilities.
Unfortunately the include file structure requires some global includes
to be found, so make this work.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:15 +02:00
Martin Schwenke
f031d5b43f ctdb-build: Fix includes for SAMBA_BINARY()s
No need for "..", since the correct thing is generated.  Add "include"
and "include/internal" where missing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
05f08d5148 ctdb-build: Don't try to set lib64 directory automatically in build
Just install into lib/ and let packagers decide on this policy, since
it can vary between distributions.  Update our packaging files
accordingly.

A secondary matter is that things are incorrectly installed into
lib64/ when building with 32-bit userspace on a 64-bit kernel.  If
this is done then it should depend on the architecture of the
compiler.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
4cb92e42f2 ctdb-build: Make ctdb-client depend on ctdb-util and ctdb-util-misc
The client code uses both of these, so might as well depend on it.
That way code that depends on ctdb-client transitively get the
dependencies.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
5de4a97fe9 ctdb-util: Remove util/strlist.c and references to str_util_*()
They're not used in CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Stefan Metzmacher
bab349c2a1 ctdb/wscript: pass dep_vars=['VERSION'] to SAMBA_GENERATOR()
This avoid the use of always=True.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Amitay Isaacs
80f00eaf51 ctdb-build: SAMBA_BINARY targets should not include bin/ prefix
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Sep  3 06:26:16 CEST 2014 on sn-devel-104
2014-09-03 06:26:16 +02:00
Amitay Isaacs
9b720ab139 ctdb-build: Add missing dependency on popt
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-08-21 09:11:06 +02:00
Martin Schwenke
e4118730d1 ctdb-build: Avoid unused variable warning in output from rpcgen
default/ctdb/utils/smnotify/gen_xdr.c: In function ‘xdr_status’:
  default/ctdb/utils/smnotify/gen_xdr.c:11:20: warning: unused variable ‘buf’ [-Wunused-variable]
    register int32_t *buf;
                      ^

When generating the code, change it to assign the variable to itself.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Aug 21 07:11:02 CEST 2014 on sn-devel-104
2014-08-21 07:11:01 +02:00
Amitay Isaacs
21974a99b0 ctdb-build: popt has moved from lib/ to third_party/
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Aug 11 10:58:43 CEST 2014 on sn-devel-104
2014-08-11 10:58:43 +02:00
Amitay Isaacs
976f4790cf ctdb-build: Replace indentation tabs with spaces
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-08-11 08:33:10 +02:00
Ira Cooper
38de110b02 third_party/popt: Initial support for popt.
ctdb, ldb, and samba are supported builds for third_party popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-09 18:26:17 +02:00
Amitay Isaacs
34be43d201 ctdb-build: fix wscript formatting as per PEP8
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-07-08 10:17:54 +02:00
Amitay Isaacs
9163037923 ctdb-build: Create ctdb only ctags
CTDB does not use auto-generated files, there is no need to configure
to generate ctags.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-07-08 10:17:54 +02:00
Amitay Isaacs
34b4857231 ctdb-build: Replace os.system with samba_utils.RUN_COMMAND
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-07-08 10:17:54 +02:00
Amitay Isaacs
dd1f23dc68 ctdb-build: Check the return value of RUN_COMMAND
RUN_COMMAND does not raise exceptions if the command fails, but returns
non-zero status.  Ensure that make terminates with non-zero status if
RUN_COMMAND fails.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-07-08 10:17:54 +02:00
Amitay Isaacs
d097898020 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@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jun 24 09:37:39 CEST 2014 on sn-devel-104
2014-06-24 09:37:39 +02:00
Amitay Isaacs
e9006db3eb ctdb-build: Fix sed expression to protect '\'
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-24 07:23:13 +02:00
Amitay Isaacs
a0d207001a ctdb-build: Use correct path variables for ctdb_run_tests.sh
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-24 07:23:13 +02:00
Amitay Isaacs
4f6d668cfa ctdb-build: Use CTDB_ETCDIR instead of ETCDIR/ctdb
This avoids hardcoding path components in source.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-24 07:23:13 +02:00
Amitay Isaacs
7793aa5617 ctdb-build: Use CTDB_RUNDIR instead of VARDIR/run/ctdb
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-24 07:23:13 +02:00
Amitay Isaacs
8cd48c6b1c 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@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-24 07:23:13 +02:00
Amitay Isaacs
46924f68c1 autobuild: Remove unsupported --enable-socket-wrapper option from the "ctdb" target.
Socket wrapper now works with LD_PRELOAD.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
a39a5f4c06 ctdb-build: Add target to build RPMs
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
43c10db3a2 ctdb-build: Add waf build for CTDB
Note that in contrast to the original autoconf build,
the ctdb.spec file which is created from packaging/RPM/ctdb.spec,
is put into the top level directory, where it will be picked
up by rpmbuild -ta <tarball>".

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:09 +02:00