The branch, master has been updated via b03637c... dsdb: Fix includes when building against system ldb. via f370bd4... wafsamba: Allow manually specifying cflags/ldflags for system libraries. via 7646eb6... wafsamba: Use convenience function to find out if bundling is necessary. via ccaf0c6... dsdb: Use Samba includes so _PUBLIC_ is defined. via a8aaf3d... wafsamba: Factor out functions to determine if a bundled library should not or must be used. via 238e89f... dsdb: Make module ops struct for each module public. via f36a9af... s4-python: Use sys.prefix rather than guessing prefix from current file path. via bd1786f... wafsamba: Fix typo: noextenion -> noextension. from bf80450... waf: Add missing dependency (so header paths are inherited) on talloc to internal python lib.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit b03637cb9e1690f7c571186456229ad7c40b3740 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 14:46:22 2010 +0200 dsdb: Fix includes when building against system ldb. commit f370bd47b058677ffa108d7312bb6ff2609ac4e3 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 14:45:35 2010 +0200 wafsamba: Allow manually specifying cflags/ldflags for system libraries. commit 7646eb6a0fe9c28cdd006493502bd4b36ccfd2bc Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 14:02:18 2010 +0200 wafsamba: Use convenience function to find out if bundling is necessary. commit ccaf0c60380b80ade3b1ac6085518218d236c281 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 13:55:41 2010 +0200 dsdb: Use Samba includes so _PUBLIC_ is defined. commit a8aaf3d4be4e835fc32bca46dbc4667bf265e1ef Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 13:47:11 2010 +0200 wafsamba: Factor out functions to determine if a bundled library should not or must be used. commit 238e89f7b0c3f35578105329578685a187209f83 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 13:46:39 2010 +0200 dsdb: Make module ops struct for each module public. commit f36a9afc2f62827700e4b8b441448aef00439f7d Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 13:41:48 2010 +0200 s4-python: Use sys.prefix rather than guessing prefix from current file path. commit bd1786f7f15d9fd6382979ff753fefc7a9cd0024 Author: Jelmer Vernooij <jel...@samba.org> Date: Sat Jun 19 12:10:29 2010 +0200 wafsamba: Fix typo: noextenion -> noextension. ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_autoconf.py | 11 ++++++----- buildtools/wafsamba/samba_bundled.py | 22 +++++++++++++++++----- lib/talloc/wscript | 2 +- lib/tdb/wscript | 2 +- lib/tevent/wscript | 2 +- source4/dsdb/samdb/ldb_modules/descriptor.c | 2 -- source4/dsdb/samdb/ldb_modules/operational.c | 2 +- source4/dsdb/samdb/ldb_modules/ranged_results.c | 2 +- source4/dsdb/samdb/ldb_modules/samba_dsdb.c | 2 +- source4/dsdb/samdb/ldb_modules/samba_secrets.c | 2 +- source4/dsdb/samdb/ldb_modules/subtree_delete.c | 6 ++++-- source4/dsdb/samdb/ldb_modules/subtree_rename.c | 6 ++++-- source4/lib/ldb/wscript | 2 +- source4/scripting/python/samba/provision.py | 13 ++++++------- 14 files changed, 45 insertions(+), 31 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 3551e02..3f9aa3a 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -449,13 +449,14 @@ def library_flags(conf, libs): ccflags = [] ldflags = [] for lib in TO_LIST(libs): - inc_path = None inc_path = getattr(conf.env, 'CPPPATH_%s' % lib.upper(), []) lib_path = getattr(conf.env, 'LIBPATH_%s' % lib.upper(), []) - for i in inc_path: - ccflags.append('-I%s' % i) - for l in lib_path: - ldflags.append('-L%s' % l) + ccflags.extend(['-I%s' % i for i in inc_path]) + ldflags.extend(['-L%s' % l for l in lib_path]) + extra_ccflags = TO_LIST(getattr(conf.env, 'CCFLAGS_%s' % lib.upper(), [])) + extra_ldflags = TO_LIST(getattr(conf.env, 'LDFLAGS_%s' % lib.upper(), [])) + ccflags.extend(extra_ccflags) + ldflags.extend(extra_ldflags) return (ccflags, ldflags) diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index f105a2d..c8d4967 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -46,12 +46,12 @@ def BUILTIN_DEFAULT(opt, builtins): Options.Handler.BUILTIN_DEFAULT = BUILTIN_DEFAULT -def BUNDLED_EXTENSION_DEFAULT(opt, extension, noextenion=''): +def BUNDLED_EXTENSION_DEFAULT(opt, extension, noextension=''): '''set a default bundled library extension''' if 'BUNDLED_EXTENSION_DEFAULT' in Options.options: return Options.options['BUNDLED_EXTENSION_DEFAULT'] = extension - Options.options['BUNDLED_EXTENSION_EXCEPTION'] = noextenion + Options.options['BUNDLED_EXTENSION_EXCEPTION'] = noextension Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT @@ -72,6 +72,18 @@ def minimum_library_version(conf, libname, default): return default +...@conf +def LIB_MAY_BE_BUNDLED(conf, libname): + return ('NONE' not in conf.env.BUNDLED_LIBS and + '!%s' % libname not in conf.env.BUNDLED_LIBS) + + +...@conf +def LIB_MUST_BE_BUNDLED(conf, libname): + return ('ALL' in conf.env.BUNDLED_LIBS or + libname in conf.env.BUNDLED_LIBS) + + @runonce @conf def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', @@ -82,7 +94,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', this first tries via pkg-config, then if that fails tries by testing for a specified function in the specified lib ''' - if 'ALL' in conf.env.BUNDLED_LIBS or libname in conf.env.BUNDLED_LIBS: + if conf.LIB_MUST_BE_BUNDLED(libname): return False found = 'FOUND_SYSTEMLIB_%s' % libname if found in conf.env: @@ -95,7 +107,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', for syslib in TO_LIST(onlyif): f = 'FOUND_SYSTEMLIB_%s' % syslib if not f in conf.env: - if 'NONE' in conf.env.BUNDLED_LIBS or '!'+libname in conf.env.BUNDLED_LIBS: + if not conf.LIB_MAY_BE_BUNDLED(libname): Logs.error('ERROR: Use of system library %s depends on missing system library %s' % (libname, syslib)) sys.exit(1) conf.env[found] = False @@ -122,7 +134,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', conf.SET_SYSLIB_DEPS(libname, implied_deps) return True conf.env[found] = False - if 'NONE' in conf.env.BUNDLED_LIBS or '!'+libname in conf.env.BUNDLED_LIBS: + if not conf.LIB_MAY_BE_BUNDLED(libname): Logs.error('ERROR: System library %s of version %s not found, and bundling disabled' % (libname, minversion)) sys.exit(1) return False diff --git a/lib/talloc/wscript b/lib/talloc/wscript index be80b27..4f95da7 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -24,7 +24,7 @@ samba_dist.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools def set_options(opt): opt.BUILTIN_DEFAULT('replace') - opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc') + opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextension='talloc') opt.RECURSE('lib/replace') opt.add_option('--enable-talloc-compat1', help=("Build talloc 1.x.x compat library [False]"), diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 6af3897..a1776e5 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -19,7 +19,7 @@ samba_dist.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools') def set_options(opt): opt.BUILTIN_DEFAULT('replace') - opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion='tdb') + opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextension='tdb') opt.RECURSE('lib/replace') if opt.IN_LAUNCH_DIR(): opt.add_option('--disable-python', diff --git a/lib/tevent/wscript b/lib/tevent/wscript index 46ac620..aae0d1e 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -19,7 +19,7 @@ samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc def set_options(opt): opt.BUILTIN_DEFAULT('replace') - opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextenion='tevent') + opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextension='tevent') opt.RECURSE('lib/replace') opt.RECURSE('lib/talloc') diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index ba60682..0e95582 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -898,5 +898,3 @@ _PUBLIC_ const struct ldb_module_ops ldb_descriptor_module_ops = { .rename = descriptor_rename, .init_context = descriptor_init }; - - diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index a4cf49d..e967f8a 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -806,7 +806,7 @@ static int operational_init(struct ldb_module *ctx) return LDB_SUCCESS; } -const struct ldb_module_ops ldb_operational_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_operational_module_ops = { .name = "operational", .search = operational_search, .init_context = operational_init diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c index 7639aef..0c992e0 100644 --- a/source4/dsdb/samdb/ldb_modules/ranged_results.c +++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c @@ -246,7 +246,7 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); } -const struct ldb_module_ops ldb_ranged_results_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_ranged_results_module_ops = { .name = "ranged_results", .search = rr_search, }; diff --git a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c index 137de73..b12d25a 100644 --- a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c +++ b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c @@ -354,7 +354,7 @@ static int samba_dsdb_init(struct ldb_module *module) return ldb_next_init(module); } -const struct ldb_module_ops ldb_samba_dsdb_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_samba_dsdb_module_ops = { .name = "samba_dsdb", .init_context = samba_dsdb_init, }; diff --git a/source4/dsdb/samdb/ldb_modules/samba_secrets.c b/source4/dsdb/samdb/ldb_modules/samba_secrets.c index 1045bb9..dbf4d11 100644 --- a/source4/dsdb/samdb/ldb_modules/samba_secrets.c +++ b/source4/dsdb/samdb/ldb_modules/samba_secrets.c @@ -94,7 +94,7 @@ static int samba_secrets_init(struct ldb_module *module) return ldb_next_init(module); } -const struct ldb_module_ops ldb_samba_secrets_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_samba_secrets_module_ops = { .name = "samba_secrets", .init_context = samba_secrets_init, }; diff --git a/source4/dsdb/samdb/ldb_modules/subtree_delete.c b/source4/dsdb/samdb/ldb_modules/subtree_delete.c index 9ed44be..a273437 100644 --- a/source4/dsdb/samdb/ldb_modules/subtree_delete.c +++ b/source4/dsdb/samdb/ldb_modules/subtree_delete.c @@ -30,7 +30,9 @@ * Author: Andrew Bartlett */ -#include "ldb_module.h" +#include "includes.h" +#include <ldb.h> +#include <ldb_module.h> #include "dsdb/samdb/ldb_modules/util.h" @@ -67,7 +69,7 @@ static int subtree_delete(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); } -const struct ldb_module_ops ldb_subtree_delete_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_subtree_delete_module_ops = { .name = "subtree_delete", .del = subtree_delete, }; diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c index df211e5..350496a 100644 --- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c +++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c @@ -28,7 +28,9 @@ * Author: Andrew Bartlett */ -#include "ldb_module.h" +#include "includes.h" +#include <ldb.h> +#include <ldb_module.h> struct subren_msg_store { struct subren_msg_store *next; @@ -266,7 +268,7 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, search_req); } -const struct ldb_module_ops ldb_subtree_rename_module_ops = { +_PUBLIC_ const struct ldb_module_ops ldb_subtree_rename_module_ops = { .name = "subtree_rename", .rename = subtree_rename, }; diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index 8b04354..6f6c9a1 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -22,7 +22,7 @@ samba_dist.DIST_DIRS('''source4/lib/ldb:. lib/replace:lib/replace lib/talloc:lib def set_options(opt): opt.BUILTIN_DEFAULT('replace') - opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextenion='ldb') + opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextension='ldb') opt.RECURSE('lib/tdb') opt.RECURSE('lib/tevent') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 7fa5dbb..bfa1b95 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -64,14 +64,13 @@ __docformat__ = "restructuredText" def find_setup_dir(): """Find the setup directory used by provision.""" - dirname = os.path.dirname(__file__) - if "/site-packages/" in dirname: - prefix = "/".join(dirname[:dirname.index("/site-packages/")].split("/")[:-2]) - for suffix in ["share/setup", "share/samba/setup", "setup"]: - ret = os.path.join(prefix, suffix) - if os.path.isdir(ret): - return ret + import sys + for suffix in ["share/setup", "share/samba/setup", "setup"]: + ret = os.path.join(sys.prefix, suffix) + if os.path.isdir(ret): + return ret # In source tree + dirname = os.path.dirname(__file__) ret = os.path.join(dirname, "../../../setup") if os.path.isdir(ret): return ret -- Samba Shared Repository