return conf.CHECK_BUNDLED_SYSTEM_PKG('cmocka', minversion='1.1.1')
Build.BuildContext.CHECK_CMOCKA = CHECK_CMOCKA
+
+@conf
+def CHECK_SOCKET_WRAPPER(conf):
+ return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.1.7')
+Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
samba_dist.DIST_DIRS('''ctdb:. lib/replace:lib/replace lib/talloc:lib/talloc
lib/tevent:lib/tevent lib/tdb:lib/tdb
- lib/socket_wrapper:lib/socket_wrapper
+ third_party/socket_wrapper:third_party/socket_wrapper
third_party/popt:third_party/popt
lib/util:lib/util lib/tdb_wrap:lib/tdb_wrap
lib/ccan:lib/ccan libcli/util:libcli/util
if conf.CHECK_FOR_THIRD_PARTY():
conf.RECURSE('third_party/popt')
+ if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
+ conf.RECURSE('third_party/socket_wrapper')
+ conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
else:
if not conf.CHECK_POPT():
raise Utils.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
else:
conf.define('USING_SYSTEM_POPT', 1)
+ conf.env.SOCKET_WRAPPER_SO_PATH = ''
+
+
+ if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
+ if not conf.CHECK_SOCKET_WRAPPER():
+ raise Utils.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_SOCKET_WRAPPER', 1)
+ conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
conf.RECURSE('lib/util')
conf.RECURSE('lib/talloc')
conf.RECURSE('lib/tevent')
conf.RECURSE('lib/tdb')
- if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
- conf.RECURSE('lib/socket_wrapper')
- conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
conf.CHECK_HEADERS('sched.h')
conf.CHECK_HEADERS('procinfo.h')
bld.RECURSE('lib/replace')
if bld.CHECK_FOR_THIRD_PARTY():
bld.RECURSE('third_party/popt')
+ if bld.env.standalone_ctdb or bld.CONFIG_GET('SOCKET_WRAPPER'):
+ bld.RECURSE('third_party/socket_wrapper')
bld.RECURSE('lib/tdb_wrap')
bld.RECURSE('lib/util')
bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/tdb')
- if bld.env.standalone_ctdb or bld.CONFIG_GET('SOCKET_WRAPPER'):
- bld.RECURSE('lib/socket_wrapper')
if bld.env.standalone_ctdb:
# If a combined build is implemented, CTDB will want to
popt - Command-line option parsing library
replace - Provides replacements for standard (POSIX, C99) functions
not provided by the host platform.
-socket_wrapper - Wrapper library allowing TCP/IP traffic to be redirected
- over Unix domain sockets.
subunit - Utilities and bindings for working with the Subunit test result
reporting protocol.
talloc - Hierarchical pool based memory allocator
if (addr == 0) {
/* 0.0.0.0 */
- is_bcast = 0;
+ is_bcast = 0;
type = d_type;
iface = socket_wrapper_default_iface();
} else if (a_type && addr == 0xFFFFFFFF) {
if (fd != -1) {
struct swrap_file_hdr file_hdr;
file_hdr.magic = 0xA1B2C3D4;
- file_hdr.version_major = 0x0002;
+ file_hdr.version_major = 0x0002;
file_hdr.version_minor = 0x0004;
file_hdr.timezone = 0x00000000;
file_hdr.sigfigs = 0x00000000;
VERSION="1.1.7"
def configure(conf):
- if conf.CHECK_BUNDLED_SYSTEM('socket_wrapper', minversion=VERSION, set_target=False):
+ if conf.CHECK_SOCKET_WRAPPER():
conf.DEFINE('USING_SYSTEM_SOCKET_WRAPPER', 1)
libsocket_wrapper_so_path = 'libsocket_wrapper.so'
else:
# Create full path to socket_wrapper
blddir = os.path.realpath(conf.blddir)
- libsocket_wrapper_so_path = blddir + '/default/lib/socket_wrapper/libsocket-wrapper.so'
+ libsocket_wrapper_so_path = blddir + '/default/third_party/socket_wrapper/libsocket-wrapper.so'
conf.DEFINE('LIBSOCKET_WRAPPER_SO_PATH', libsocket_wrapper_so_path)
conf.DEFINE('SOCKET_WRAPPER', 1)
conf.RECURSE('popt')
conf.RECURSE('zlib')
conf.RECURSE('aesni-intel')
+ if conf.CONFIG_GET('ENABLE_SELFTEST'):
+ conf.RECURSE('socket_wrapper')
def build(bld):
bld.RECURSE('zlib')
bld.RECURSE('popt')
bld.RECURSE('aesni-intel')
+ if bld.CONFIG_GET('SOCKET_WRAPPER'):
+ bld.RECURSE('socket_wrapper')
raise Utils.WafError('Python version 3.x is not supported by Samba yet')
conf.RECURSE('dynconfig')
+ conf.RECURSE('selftest')
if conf.CHECK_FOR_THIRD_PARTY():
conf.RECURSE('third_party')
else:
conf.define('USING_SYSTEM_CMOCKA', 1)
+ if conf.CONFIG_GET('ENABLE_SELFTEST'):
+ if not conf.CHECK_SOCKET_WRAPPER():
+ raise Utils.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_SOCKET_WRAPPER', 1)
conf.RECURSE('lib/ldb')
conf.RECURSE('libcli/smbreadline')
conf.RECURSE('lib/crypto')
conf.RECURSE('pidl')
- conf.RECURSE('selftest')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('lib/nss_wrapper')
conf.RECURSE('lib/resolv_wrapper')
- conf.RECURSE('lib/socket_wrapper')
conf.RECURSE('lib/uid_wrapper')
if Options.options.with_pam:
conf.RECURSE('lib/pam_wrapper')
bld.RECURSE('lib/nss_wrapper')
if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
bld.RECURSE('lib/pam_wrapper')
-if bld.CONFIG_GET('SOCKET_WRAPPER'):
- bld.RECURSE('lib/socket_wrapper')
if bld.CONFIG_GET('RESOLV_WRAPPER'):
bld.RECURSE('lib/resolv_wrapper')
if bld.CONFIG_GET('UID_WRAPPER'):