The branch, master has been updated via 7903839 s3:wscript: change --with-dmapi to default=auto to match the autoconf build via 81cc940 wafsamba: display the default value in help for SAMBA3_ADD_OPTION via 0d75c90 s3:modules: fix the build of vfs_notify_fam (bug #9545) via 821171e s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST via 54529fd s3:lib/gencache: place gencache.tdb into /var/cache/samba from b986a3a Ensure EA value is allocated on the right context.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 79038397aa8786c92401312973185c7b14e8fa66 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Mar 22 09:39:42 2013 +0100 s3:wscript: change --with-dmapi to default=auto to match the autoconf build Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Volker Lendecke <v...@samba.org> Autobuild-Date(master): Wed Apr 3 11:45:12 CEST 2013 on sn-devel-104 commit 81cc940c994424d351ac282383df4d1a57d6b614 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Mar 22 09:37:09 2013 +0100 wafsamba: display the default value in help for SAMBA3_ADD_OPTION Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 0d75c902254c6e27964c631459ef8e9b379b77fc Author: Stefan Metzmacher <me...@samba.org> Date: Fri Mar 22 09:30:05 2013 +0100 s3:modules: fix the build of vfs_notify_fam (bug #9545) This adds the --with-fam option and configure checks. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 821171e422133d64e7c07b4d610984c33cd23244 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Mar 28 11:04:31 2013 +0100 s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST /var/lock/samba is typically on tpmfs. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 54529fd354275cfb4ece407f95ef34675b202ea3 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Mar 28 11:00:27 2013 +0100 s3:lib/gencache: place gencache.tdb into /var/cache/samba /var/lock/samba is located on tmpfs on newer systems, but we want to keep things like the server affinity cache across reboots. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba3.py | 11 ++++++++++- source3/lib/gencache.c | 2 +- source3/lib/server_mutex.c | 5 ++++- source3/modules/wscript_build | 4 ++++ source3/wscript | 32 +++++++++++++++++++++++++++++++- 5 files changed, 50 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py index 476d8fc..fd063ad 100644 --- a/buildtools/wafsamba/samba3.py +++ b/buildtools/wafsamba/samba3.py @@ -8,8 +8,17 @@ from samba_autoconf import library_flags def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True, with_name="with", without_name="without"): + if default is None: + default_str="auto" + elif default == True: + default_str="yes" + elif default == False: + default_str="no" + else: + default_str=str(default) + if help == (): - help = ("Build with %s support" % option) + help = ("Build with %s support (default=%s)" % (option, default_str)) if dest is None: dest = "with_%s" % option.replace('-', '_') diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 18bfc7c..8ace4d9 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -63,7 +63,7 @@ static bool gencache_init(void) /* skip file open if it's already opened */ if (cache) return True; - cache_fname = lock_path("gencache.tdb"); + cache_fname = cache_path("gencache.tdb"); DEBUG(5, ("Opening cache file at %s\n", cache_fname)); diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 41da0a1..c86047b 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -69,7 +69,10 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name, } result->tdb = tdb_wrap_open(result, lock_path("mutex.tdb"), 0, - TDB_DEFAULT, O_RDWR|O_CREAT, 0600, lp_ctx); + TDB_DEFAULT | + TDB_CLEAR_IF_FIRST | + TDB_INCOMPATIBLE_HASH, + O_RDWR|O_CREAT, 0600, lp_ctx); talloc_unlink(result, lp_ctx); if (result->tdb == NULL) { DEBUG(1, ("Could not open mutex.tdb: %s\n", diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build index 8f08d52..6726ac3 100644 --- a/source3/modules/wscript_build +++ b/source3/modules/wscript_build @@ -316,9 +316,13 @@ bld.SAMBA3_MODULE('vfs_gpfs', internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs')) +vfs_notify_fam_deps='samba-util ' +if bld.CONFIG_SET('SAMBA_FAM_LIBS'): + vfs_notify_fam_deps += bld.CONFIG_GET('SAMBA_FAM_LIBS') bld.SAMBA3_MODULE('vfs_notify_fam', subsystem='vfs', source=VFS_NOTIFY_FAM_SRC, + deps=vfs_notify_fam_deps, init_function='', internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_notify_fam'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_notify_fam')) diff --git a/source3/wscript b/source3/wscript index 2cf71f0..568f736 100644 --- a/source3/wscript +++ b/source3/wscript @@ -41,7 +41,8 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('syslog') opt.SAMBA3_ADD_OPTION('automount') opt.SAMBA3_ADD_OPTION('aio-support') - opt.SAMBA3_ADD_OPTION('dmapi', default=False, help="build with DMAPI support") + opt.SAMBA3_ADD_OPTION('dmapi', default=None) # None means autodetection + opt.SAMBA3_ADD_OPTION('fam', default=None) # None means autodetection opt.SAMBA3_ADD_OPTION('profiling-data', default=False) opt.SAMBA3_ADD_OPTION('cluster-support', default=None) @@ -163,6 +164,32 @@ main() { }''', 'HAVE_KERNEL_SHARE_MODES', addmain=False, execute=True, msg="Checking for kernel share modes") + # check for fam libs + samba_fam_libs=None + check_for_fam=False + if Options.options.with_fam is None: + check_for_fam=True + elif Options.options.with_fam == True: + check_for_fam=True + + if check_for_fam and conf.CHECK_HEADERS('fam.h'): + if conf.CHECK_FUNCS_IN('FAMOpen2', 'fam'): + samba_fam_libs='fam' + elif conf.CHECK_FUNCS_IN('FAMOpen2', 'fam C'): + samba_fam_libs='fam C' + conf.CHECK_TYPE('enum FAMCodes', headers='fam.h', + define='HAVE_FAM_H_FAMCODES_TYPEDEF', + msg='Checking whether enum FAMCodes is available') + conf.CHECK_FUNCS_IN('FAMNoExists', 'fam') + + if samba_fam_libs is not None: + conf.DEFINE('SAMBA_FAM_LIBS', samba_fam_libs) + else: + if Options.options.with_fam == True: + conf.fatal('FAM support requested, but no suitable FAM library found') + elif check_for_fam: + Logs.warn('no suitable FAM library found') + # check for DMAPI libs Logs.info("Checking for DMAPI library existence") conf.env['dmapi_lib'] = '' @@ -1736,6 +1763,9 @@ main() { if conf.CONFIG_SET('HAVE_LINUX_IOCTL'): default_shared_modules.extend(TO_LIST('vfs_btrfs')) + if conf.CONFIG_SET('SAMBA_FAM_LIBS'): + default_shared_modules.extend(TO_LIST('vfs_notify_fam')) + explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') -- Samba Shared Repository