[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Mon Oct 4 06:33:50 MDT 2010
The branch, master has been updated
via 587315f land-remote: Force running in foreground when pushing to master.
via f1b62ea land-remote: Announce what address email is going to be sent to.
via 20d3969 tdb: Only use system pytdb when using system tdb.
via e805bf5 tdb: Support using system pytdb.
via e604532 waf: Add function for checking for system python modules.
via 6cd722d pytdb: Add __version__ attribute.
via 8cec67f registry: Make a two more functions static.
from 515c8f0 s3: Fix a pointer error
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 587315f75ddfd56f2b98a8dd886fff1c6730ca0d
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:53:02 2010 +0200
land-remote: Force running in foreground when pushing to master.
commit f1b62eaa2cda7c92897ca9239573c67798a41f1a
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:51:34 2010 +0200
land-remote: Announce what address email is going to be sent to.
commit 20d39691a8eecd57b27cb709a70c50bf572b8114
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:39:32 2010 +0200
tdb: Only use system pytdb when using system tdb.
commit e805bf52c9ed32bd53759996b5700c5d582a2a58
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:38:39 2010 +0200
tdb: Support using system pytdb.
commit e604532b495a82da09f3a5dea5fc2a0aa59590f7
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:38:25 2010 +0200
waf: Add function for checking for system python modules.
commit 6cd722d9507200a90b7c99dcb6749187aa757f87
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 13:17:25 2010 +0200
pytdb: Add __version__ attribute.
commit 8cec67fe61b1e6e64cab968ee43be424a91e56cd
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Oct 4 01:35:36 2010 +0200
registry: Make a two more functions static.
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_bundled.py | 32 +++++++++++++++++++++++++++++++
lib/tdb/pytdb.c | 2 +
lib/tdb/python/tests/simple.py | 6 +++++
lib/tdb/wscript | 16 ++++++++------
script/land-remote.py | 7 ++++-
source4/lib/registry/patchfile_dotreg.c | 4 +-
6 files changed, 56 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index c8d4967..27e5409 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -139,6 +139,38 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
sys.exit(1)
return False
+
+ at runonce
+ at conf
+def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+ '''check if a python module is available on the system and
+ has the specified minimum version.
+ '''
+ if conf.LIB_MUST_BE_BUNDLED(libname):
+ return False
+
+ # see if the library should only use a system version if another dependent
+ # system version is found. That prevents possible use of mixed library
+ # versions
+ minversion = minimum_library_version(conf, libname, minversion)
+
+ try:
+ m = __import__(modulename)
+ except ImportError:
+ found = False
+ else:
+ try:
+ version = m.__version__
+ except AttributeError:
+ found = False
+ else:
+ found = tuple(minversion.split(".")) >= tuple(version.split("."))
+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
+ Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
+ sys.exit(1)
+ return found
+
+
def NONSHARED_BINARY(bld, name):
'''return True if a binary should be built without non-system shared libs'''
if bld.env.DISABLE_SHARED:
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index 15fec21..b857438 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -592,6 +592,8 @@ void inittdb(void)
PyModule_AddObject(m, "__docformat__", PyString_FromString("restructuredText"));
+ PyModule_AddObject(m, "__version__", PyString_FromString(PACKAGE_VERSION));
+
Py_INCREF(&PyTdb);
PyModule_AddObject(m, "Tdb", (PyObject *)&PyTdb);
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index 6386a28..f5484a0 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -165,6 +165,12 @@ class SimpleTdbTests(TestCase):
self.tdb.remove_flags(tdb.NOMMAP)
+class VersionTests(TestCase):
+
+ def test_present(self):
+ self.assertTrue(isinstance(tdb.__version__, str))
+
+
if __name__ == '__main__':
import unittest
unittest.TestProgram()
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 94f85cd..53f81fe 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -36,6 +36,8 @@ def configure(conf):
if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
implied_deps='replace'):
conf.define('USING_SYSTEM_TDB', 1)
+ if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION):
+ conf.define('USING_SYSTEM_PYTDB', 1)
conf.env.disable_python = getattr(Options.options, 'disable_python', False)
@@ -92,13 +94,13 @@ def build(bld):
'tools/tdbtool.c',
'tdb', manpages='manpages/tdbtool.8')
- s4_build = getattr(bld.env, '_SAMBA_BUILD_', 0) == 4
-
- bld.SAMBA_PYTHON('pytdb',
- 'pytdb.c',
- deps='tdb',
- enabled=not bld.env.disable_python,
- realname='tdb.so')
+ if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'):
+ bld.SAMBA_PYTHON('pytdb',
+ 'pytdb.c',
+ deps='tdb',
+ enabled=not bld.env.disable_python,
+ realname='tdb.so',
+ cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
if bld.env.standalone_tdb:
bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
diff --git a/script/land-remote.py b/script/land-remote.py
index 4a9c3fa..93178b5 100755
--- a/script/land-remote.py
+++ b/script/land-remote.py
@@ -37,13 +37,16 @@ parser.add_option("--fail-slowly", help="continue running tests even after one h
if opts.email is None and os.getenv("EMAIL") is not None:
opts.email = os.getenv("EMAIL")
+if opts.email:
+ print "Sending email to %s" % opts.email
+
if not opts.foreground and not opts.email:
print "Not running in foreground and --email not specified."
sys.exit(1)
if not opts.foreground and opts.push_master:
- print "Unable to push to master when not running in foreground."
- sys.exit(1)
+ print "Pushing to master, forcing run in foreground."
+ opts.foreground = True
if not opts.remote_repo:
print "%s$ mktemp -d" % opts.host
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 33fd6b6..8fac00b 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -44,7 +44,7 @@ struct dotreg_data {
* This is basically a copy of data_blob_hex_string_upper, but with comma's
* between the bytes in hex.
*/
-_PUBLIC_ char *dotreg_data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
+static char *dotreg_data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
{
size_t i;
char *hex_string;
@@ -67,7 +67,7 @@ _PUBLIC_ char *dotreg_data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB
* has no 0x for dwords, everything else is regarded as binary, and binary
* strings are represented with bytes comma-separated.
*/
-_PUBLIC_ char *reg_val_dotreg_string(TALLOC_CTX *mem_ctx, uint32_t type,
+static char *reg_val_dotreg_string(TALLOC_CTX *mem_ctx, uint32_t type,
const DATA_BLOB data)
{
char *ret = NULL;
--
Samba Shared Repository
More information about the samba-cvs
mailing list