[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Fri Mar 1 03:46:02 UTC 2024


The branch, master has been updated
       via  9f167b9b772 WHATSNEW: Add information on LDB no longer available standalone
       via  81994b85adf build: Allow --with-ldbmodulesdir to override location of LDB modules
       via  5af23f1b585 ldb: Unconditionally set LDB_PACKAGE_VERSION
       via  625fb48326e ldb: Remove "private_library" variable with just one user
       via  07cc744effe ldb: Rename VERSION to LDB_VERSION to avoid confusion
       via  d163518e2ff lib/ldb: Remove duplicate aspects of build system
       via  ef7e9566bf5 ldb: Remove remaining components of independent ldb build system
       via  7c860d79d3c lib/ldb: Remove references to conf.env.standalone_ldb
       via  c1125a316fc lib/ldb: bld.CONFIG_SET(USING_SYSTEM_LDB) is now never set
       via  1edd8c066c2 lib/ldb: Adapt pkg-config files to being build from the main build.
       via  de1ab855ee2 lib/ldb: Always build standalone
       via  b83614144b7 build: Move --with-ldap/--without-ldap from source3 build to top level
       via  1f50febc99f ldb: Remove the ability for Samba to compile against a system LDB
       via  e10932577bb build: Remove duplicated check for -Wl,-no-undefined on OpenBSD
       via  9fe559ecea4 build: Call conf.CHECK_XSLTPROC_MANPAGES() directly in wscript
       via  3b80c7f4ac1 autobuild: Move autobuild to expecting ldb to build as part of Samba
       via  9b5d226a5ae ldb: Honour --private-library=!ldb as meaning build as a public library
       via  1f41997b4c6 build: Allow --private-libraries to include a default
       via  7d1bc4fa902 build: Ensure that a forced-private library has no public headers
       via  2471a0037e2 ldb: Make pyldb-util always a private library
       via  a4afb2eeade selftest: Bring ldb test defintions into one place in selftest/tests.py
       via  05ce3810e39 selftest: Always and only run ldb test-tdb test in Samba selftest
       via  b98e05aec81 selftest: Move LDB cmocka based unit tests to Samba testsuite
       via  4c16618ee3c ldb: Prepare ldb tests for subunit output
       via  b76516d5155 sefltest: Remove duplicate run of ldb.python.crash and ldb.python.repack
       via  8af7867505e ldb: Move tests to selftest/tests.py and out of standlone build
      from  d6bfd26049b pytests: samba-tool domain kds root_key

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9f167b9b772214e76e75213711952ec6f9c9620e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 19 11:01:30 2024 +1300

    WHATSNEW: Add information on LDB no longer available standalone
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Mar  1 03:45:21 UTC 2024 on atb-devel-224

commit 81994b85adf21cce128c23ad1863e9b45717ecec
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 14 11:54:54 2024 +1300

    build: Allow --with-ldbmodulesdir to override location of LDB modules
    
    This will allow some packagers to set this to a directory that does
    not mention Samba, or to put a version string in to avoid loading
    old modules.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 5af23f1b5850df2285986a279c3911724eaa4660
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 15:00:30 2024 +1300

    ldb: Unconditionally set LDB_PACKAGE_VERSION
    
    This is only parsed once now and there is no confusion with the main build, so we can set it without checking.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 625fb48326ec62a33ce0abdbfb0f6f3d33d7cc64
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 15:26:14 2024 +1300

    ldb: Remove "private_library" variable with just one user
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 07cc744effeff5e359010674a31dd8e16d75d6fc
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 14:06:12 2024 +1300

    ldb: Rename VERSION to LDB_VERSION to avoid confusion
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit d163518e2ff7d7bef79e6948462e65cec40976c7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 11:16:28 2024 +1300

    lib/ldb: Remove duplicate aspects of build system
    
    We no longer need aspects of our build that made sense for the standalone
    operation of LDB now that ldb is only provided as part of Samba.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit ef7e9566bf55033ebbc75c115213de7ae04cfe44
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 14:05:17 2024 +1300

    ldb: Remove remaining components of independent ldb build system
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 7c860d79d3c2337d174a1f908b03c25af8ec2c02
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 12:41:02 2024 +1300

    lib/ldb: Remove references to conf.env.standalone_ldb
    
    This is not a simple replacement as we are merging the standalone build features with
    the main Samba build features.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit c1125a316fcb07ad3d91756f06031768d633a1b0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Feb 13 09:52:44 2024 +1300

    lib/ldb: bld.CONFIG_SET(USING_SYSTEM_LDB) is now never set
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 1edd8c066c2a09ebfd9dad94a2fc289d7ee3b6c4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 22:32:16 2024 +1300

    lib/ldb: Adapt pkg-config files to being build from the main build.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit de1ab855ee267a60c5f7f4747cfb83e2671b891b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 22:33:22 2024 +1300

    lib/ldb: Always build standalone
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit b83614144b707d787ed5f3ff643787a915d72701
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Feb 13 13:52:41 2024 +1300

    build: Move --with-ldap/--without-ldap from source3 build to top level
    
    This code impacts on LDB, which is now built from the main build
    so we need to combined this with the check that was in lib/ldb
    or else we get conflicts.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 1f50febc99f29d6cd47da86144851aa60bb131a2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 22:24:38 2024 +1300

    ldb: Remove the ability for Samba to compile against a system LDB
    
    Samba will either provide the LDB to the system, or use a
    private ldb, we will not use any other LDB from the system.
    
    This is essentially equilvilant to the patch Debian has used
    for Samba 4.17 and later, named "Force-LDB-as-standalone.patch"
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit e10932577bb27710053d3fa7c39686f93370812a
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 21:21:45 2024 +1300

    build: Remove duplicated check for -Wl,-no-undefined on OpenBSD
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 9fe559ecea4796c0185edae6f0b2d17b746eecc5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 20:25:59 2024 +1300

    build: Call conf.CHECK_XSLTPROC_MANPAGES() directly in wscript
    
    This avoids relying on the indirect call via wscript in lib/{talloc,tdb,ldb}
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 3b80c7f4ac13f4672d7a3edcb645683f174861a4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 14 15:38:28 2024 +1300

    autobuild: Move autobuild to expecting ldb to build as part of Samba
    
    We retain a test to confirm we can build ldb as a public lib in the samba-libs
    target.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 9b5d226a5ae79ca9455c5377299334550b0ec968
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 22:15:30 2024 +1300

    ldb: Honour --private-library=!ldb as meaning build as a public library
    
    Likewise, let the SAMBA_LIBRARY code handle being a private library
    rather than in the library declaration.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 1f41997b4c673caeaa60ab7b3a5bb6e806deedc0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 19:47:11 2024 +1300

    build: Allow --private-libraries to include a default
    
    This will in the future allow ldb to be declared public in the
    build system, and so have all the attributes set for that, but
    be actually built as a private Samba library by default.
    
    No change in behavour currently.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 7d1bc4fa9022b48d39c07d740cd69592d58c5110
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 9 22:10:10 2024 +1300

    build: Ensure that a forced-private library has no public headers
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 2471a0037e20ce74b34f9d9b3649f886ab5dc4dc
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 12 17:11:53 2024 +1300

    ldb: Make pyldb-util always a private library
    
    Only Samba has ever used these utility functions, other applications can
    still use our ldb python bindings, they just can not provide ldb
    C bindings.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit a4afb2eeade7136092668c2a67c51c41b64e6147
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 17:18:10 2024 +1300

    selftest: Bring ldb test defintions into one place in selftest/tests.py
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 05ce3810e3962c00751e0e039ba991c63aaa9c1e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 17:01:54 2024 +1300

    selftest: Always and only run ldb test-tdb test in Samba selftest
    
    This is the last test left in the independent ldb testsuite,
    removing this from there allows the test target to be removed.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit b98e05aec81e046defdc9c965cd8215b6b138043
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 15:29:51 2024 +1300

    selftest: Move LDB cmocka based unit tests to Samba testsuite
    
    This allows skip and knownfail entries to be honoured, as well
    as enabling the removal of the standalone LDB build system.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 4c16618ee3c4905df7554144f40a87edb89246db
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 15:28:50 2024 +1300

    ldb: Prepare ldb tests for subunit output
    
    These tests now print subunit rather than the default output
    as this is what the Samba selftest system needs.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit b76516d5155f1833426133bcc91d10d394045c6d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 13:08:02 2024 +1300

    sefltest: Remove duplicate run of ldb.python.crash and ldb.python.repack
    
    These tests are not impacted by the dot-less i issue.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

commit 8af7867505ee7dc61914cbce4e534d3f71f838ab
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Feb 5 12:34:42 2024 +1300

    ldb: Move tests to selftest/tests.py and out of standlone build
    
    Tests that are declared in the tests.py files in the main Samba build
    are able to use the common knownfail, flapping and skip systems.
    
    This will also allow the independent ldb build to be removed without
    loss of the tests.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

-----------------------------------------------------------------------

Summary of changes:
 .gitlab-ci-main.yml                            |   1 -
 WHATSNEW.txt                                   |  20 +
 buildtools/wafsamba/samba_bundled.py           |  13 +-
 buildtools/wafsamba/wafsamba.py                |  12 +-
 buildtools/wafsamba/wscript                    |  11 +-
 dynconfig/wscript                              |   7 +
 lib/ldb/Makefile                               |  53 --
 lib/ldb/configure                              |  28 -
 lib/ldb/ldb.pc.in                              |   2 +-
 lib/ldb/pyldb-util.pc.in                       |   2 +-
 lib/ldb/tests/ldb_filter_attrs_in_place_test.c |   2 +
 lib/ldb/tests/ldb_filter_attrs_test.c          |   2 +
 lib/ldb/tests/ldb_key_value_sub_txn_test.c     |   2 +
 lib/ldb/tests/ldb_key_value_test.c             |   2 +
 lib/ldb/tests/ldb_kv_ops_test.c                |   2 +
 lib/ldb/tests/ldb_lmdb_free_list_test.c        |   2 +
 lib/ldb/tests/ldb_lmdb_test.c                  |   2 +
 lib/ldb/tests/ldb_match_test.c                 |   2 +
 lib/ldb/tests/ldb_mod_op_test.c                |   2 +
 lib/ldb/tests/ldb_msg.c                        |   2 +
 lib/ldb/tests/ldb_no_lmdb_test.c               |   2 +
 lib/ldb/tests/ldb_tdb_test.c                   |   2 +
 lib/ldb/tests/lldb_ldap.c                      |   2 +
 lib/ldb/tests/test_ldb_dn.c                    |   4 +-
 lib/ldb/tests/test_ldb_qsort.c                 |   1 +
 lib/ldb/wscript                                | 864 +++++++++----------------
 script/autobuild.py                            |  38 +-
 selftest/slow-none                             |   2 +-
 selftest/tests.py                              |  84 ++-
 source3/wscript                                |  48 --
 source4/selftest/tests.py                      |   7 -
 wscript                                        |  56 +-
 wscript_build                                  |   1 +
 33 files changed, 549 insertions(+), 731 deletions(-)
 delete mode 100644 lib/ldb/Makefile
 delete mode 100755 lib/ldb/configure


Changeset truncated at 500 lines:

diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index add5f323ec4..71b3c3f861a 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -179,7 +179,6 @@ include:
 others:
   extends: .shared_template
   script:
-    - script/autobuild.py ldb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/ldb
     - script/autobuild.py pidl     $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/pidl
     - script/autobuild.py replace  $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/replace
     - script/autobuild.py talloc   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/talloc
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ba3b739709f..cad6e08815a 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -16,6 +16,26 @@ UPGRADING
 NEW FEATURES/CHANGES
 ====================
 
+LDB no longer a standalone tarball
+----------------------------------
+
+LDB, Samba's LDAP-like local database and the power behind the Samba
+AD DC, is no longer available to build as a distinct tarball, but is
+instead provided as an optional public library.
+
+If you need ldb as a public library, say to build sssd, then use
+ ./configure --private-libraries='!ldb'
+
+This re-integration allows LDB tests to use the Samba's full selftest
+system, including our knownfail infrastructure, and decreases the work
+required during security releases as a coordinated release of the ldb
+tarball is not also required.
+
+This approach has been demonstrated already in Debian, which is already
+building Samba and LDB is this way.
+
+As part of this work, the pyldb-util public library, not known to be
+used by any other software, is made private to Samba.
 
 REMOVED FEATURES
 ================
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 029be159b62..b9960f1cbb1 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -88,7 +88,14 @@ def LIB_MAY_BE_BUNDLED(conf, libname):
         return False
     return True
 
-def __LIB_MUST_BE(liblist, libname):
+def __LIB_MUST_BE(liblist_in, defaults, libname):
+    liblist = []
+    for lib in liblist_in:
+        if lib == "DEFAULT":
+            liblist += defaults
+        else:
+            liblist += [lib]
+
     if libname in liblist:
         return True
     if '!%s' % libname in liblist:
@@ -99,11 +106,11 @@ def __LIB_MUST_BE(liblist, libname):
 
 @conf
 def LIB_MUST_BE_BUNDLED(conf, libname):
-    return __LIB_MUST_BE(conf.env.BUNDLED_LIBS, libname)
+    return __LIB_MUST_BE(conf.env.BUNDLED_LIBS, [], libname)
 
 @conf
 def LIB_MUST_BE_PRIVATE(conf, libname):
-    return __LIB_MUST_BE(conf.env.PRIVATE_LIBS, libname)
+    return __LIB_MUST_BE(conf.env.PRIVATE_LIBS, conf.env.DEFAULT_PRIVATE_LIBS, libname)
 
 @conf
 def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0',
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index e1c2877e630..250da072c50 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -33,6 +33,7 @@ import symbols
 import pkgconfig
 import configure_file
 import samba_waf18
+import samba_bundled
 
 LIB_PATH="shared"
 
@@ -182,6 +183,7 @@ def SAMBA_LIBRARY(bld, libname, source,
 
     if LIB_MUST_BE_PRIVATE(bld, libname) and target_type not in ['PLUGIN']:
         private_library = True
+        public_headers_install = False
 
     if force_unversioned:
         private_library = False
@@ -571,8 +573,7 @@ def SAMBA_MODULE(bld, modname, source,
                  manpages=None,
                  allow_undefined_symbols=False,
                  allow_warnings=False,
-                 install=True
-                 ):
+                 install=True):
     '''define a Samba module.'''
 
     bld.ASSERT(subsystem, "You must specify a subsystem for SAMBA_MODULE(%s)" % modname)
@@ -623,6 +624,11 @@ def SAMBA_MODULE(bld, modname, source,
 
     build_link_name = "modules/%s/%s" % (subsystem, realname)
 
+    if f'{subsystem}_modules_install_dir' in bld.env:
+        install_path = bld.env[f'{subsystem}_modules_install_dir']
+    else:
+        install_path = "${MODULESDIR}/%s" % subsystem
+
     if init_function:
         cflags += " -D%s=%s" % (init_function, module_init_name)
 
@@ -639,7 +645,7 @@ def SAMBA_MODULE(bld, modname, source,
                       vars=vars,
                       bundled_name=build_name,
                       link_name=build_link_name,
-                      install_path="${MODULESDIR}/%s" % subsystem,
+                      install_path=install_path,
                       pyembed=pyembed,
                       manpages=manpages,
                       allow_undefined_symbols=allow_undefined_symbols,
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 99a623737f1..e18bc4fd741 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -63,9 +63,12 @@ This allows that to be disabled, to ensure that other software does
 not use these libraries and they are placed in a private filesystem
 prefix.
 
+Likewise, it allows the value of DEFAULT (currently {','.join(Context.g_module.DEFAULT_PRIVATE_LIBS) if getattr(Context.g_module, 'DEFAULT_PRIVATE_LIBS', False) else "''"})
+to be overridden, allowing a private-by-default library to be exposed.
+
 May include !LIBNAME to disable making a library private in order to
-limit the effect of 'ALL' '''),
-                   action="store", dest='PRIVATE_LIBS', default='')
+limit the effect of 'ALL' and 'DEFAULT'.'''),
+                   action="store", dest='PRIVATE_LIBS', default='DEFAULT')
 
     extension_default = default_value('PRIVATE_EXTENSION_DEFAULT')
     gr.add_option('--private-library-extension',
@@ -325,6 +328,10 @@ def configure(conf):
     conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR
     conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
     conf.env.SYSTEM_LIBS = ()
+
+    if getattr(Context.g_module, 'DEFAULT_PRIVATE_LIBS', False):
+        conf.env.DEFAULT_PRIVATE_LIBS = Context.g_module.DEFAULT_PRIVATE_LIBS
+
     conf.env.PRIVATE_LIBS = Options.options.PRIVATE_LIBS.split(',')
     conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
     conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')
diff --git a/dynconfig/wscript b/dynconfig/wscript
index 347e5ddbabc..2041d881546 100644
--- a/dynconfig/wscript
+++ b/dynconfig/wscript
@@ -170,6 +170,13 @@ dynconfig = {
          'HELPTEXT':  'Which directory to use for Samba modules',
          'OVERWRITE': True,
     },
+    'LDBMODULESDIR' : {
+         'STD-PATH':  '${MODULESDIR}/ldb',
+         'FHS-PATH':  '${MODULESDIR}/ldb',
+         'OPTION':    '--with-ldbmodulesdir',
+         'HELPTEXT':  'Which directory to use for LDB modules',
+         'DELAY': True,
+    },
     'PAMMODULESDIR' : {
          'STD-PATH':  '${LIBDIR}/security',
          'FHS-PATH':  '${LIBDIR}/security',
diff --git a/lib/ldb/Makefile b/lib/ldb/Makefile
deleted file mode 100644
index b82723f35ed..00000000000
--- a/lib/ldb/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# simple makefile wrapper to run waf
-
-WAF_BIN=`PATH=buildtools/bin:../../buildtools/bin:$$PATH which waf`
-WAF_BINARY=$(PYTHON) $(WAF_BIN)
-WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY)
-
-all:
-	$(WAF) build
-
-install:
-	$(WAF) install
-
-uninstall:
-	$(WAF) uninstall
-
-test:
-	$(WAF) test $(TEST_OPTIONS)
-
-dist:
-	touch .tmplock
-	WAFLOCK=.tmplock $(WAF) dist
-
-distcheck:
-	touch .tmplock
-	WAFLOCK=.tmplock $(WAF) distcheck
-
-clean:
-	$(WAF) clean
-
-distclean:
-	$(WAF) distclean
-
-reconfigure: configure
-	$(WAF) reconfigure
-
-show_waf_options:
-	$(WAF) --help
-
-# some compatibility make targets
-everything: all
-
-testsuite: all
-
-check: test
-
-# this should do an install as well, once install is finished
-installcheck: test
-
-etags:
-	$(WAF) etags
-
-ctags:
-	$(WAF) ctags
diff --git a/lib/ldb/configure b/lib/ldb/configure
deleted file mode 100755
index 2ed32403fd7..00000000000
--- a/lib/ldb/configure
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-PREVPATH=$(dirname $0)
-
-if [ -f $PREVPATH/../../buildtools/bin/waf ]; then
-	WAF=../../buildtools/bin/waf
-elif [ -f $PREVPATH/buildtools/bin/waf ]; then
-	WAF=./buildtools/bin/waf
-else
-	echo "ldb: Unable to find waf"
-	exit 1
-fi
-
-# using JOBS=1 gives maximum compatibility with
-# systems like AIX which have broken threading in python
-JOBS=1
-export JOBS
-
-# Make sure we don't have any library preloaded.
-unset LD_PRELOAD
-
-# Make sure we get stable hashes
-PYTHONHASHSEED=1
-export PYTHONHASHSEED
-
-cd . || exit 1
-$PYTHON $WAF configure "$@" || exit 1
-cd $PREVPATH
diff --git a/lib/ldb/ldb.pc.in b/lib/ldb/ldb.pc.in
index aeba17a6775..1a1be6440a1 100644
--- a/lib/ldb/ldb.pc.in
+++ b/lib/ldb/ldb.pc.in
@@ -6,7 +6,7 @@ modulesdir=@LDB_MODULESDIR@
 
 Name: ldb
 Description: An LDAP-like embedded database
-Version: @PACKAGE_VERSION@
+Version: @LDB_PACKAGE_VERSION@
 Requires.private: tdb
 Requires: talloc 
 Libs: @LIB_RPATH@ -L${libdir} -lldb
diff --git a/lib/ldb/pyldb-util.pc.in b/lib/ldb/pyldb-util.pc.in
index 60ec7029260..7593e4210fe 100644
--- a/lib/ldb/pyldb-util.pc.in
+++ b/lib/ldb/pyldb-util.pc.in
@@ -6,7 +6,7 @@ modulesdir=@LDB_MODULESDIR@
 
 Name: pyldb-util at PYTHON_SO_ABI_FLAG@
 Description: Python bindings for LDB
-Version: @PACKAGE_VERSION@
+Version: @LDB_PACKAGE_VERSION@
 Requires: ldb
 Libs: @LIB_RPATH@ -L${libdir} -lpyldb-util at PYTHON_LIBNAME_SO_ABI_FLAG@
 Cflags: -I${includedir}
diff --git a/lib/ldb/tests/ldb_filter_attrs_in_place_test.c b/lib/ldb/tests/ldb_filter_attrs_in_place_test.c
index bf370164191..d3da29f4e9f 100644
--- a/lib/ldb/tests/ldb_filter_attrs_in_place_test.c
+++ b/lib/ldb/tests/ldb_filter_attrs_in_place_test.c
@@ -936,5 +936,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_filter_attrs_test.c b/lib/ldb/tests/ldb_filter_attrs_test.c
index 291350afa6e..da3acd3fb5e 100644
--- a/lib/ldb/tests/ldb_filter_attrs_test.c
+++ b/lib/ldb/tests/ldb_filter_attrs_test.c
@@ -985,5 +985,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_key_value_sub_txn_test.c b/lib/ldb/tests/ldb_key_value_sub_txn_test.c
index 1eafd2d79e9..0b7c0240ec9 100644
--- a/lib/ldb/tests/ldb_key_value_sub_txn_test.c
+++ b/lib/ldb/tests/ldb_key_value_sub_txn_test.c
@@ -840,5 +840,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_key_value_test.c b/lib/ldb/tests/ldb_key_value_test.c
index 97f717b5ee0..7bbfc7925bf 100644
--- a/lib/ldb/tests/ldb_key_value_test.c
+++ b/lib/ldb/tests/ldb_key_value_test.c
@@ -384,5 +384,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c
index b84ed0c146f..6badff98cfb 100644
--- a/lib/ldb/tests/ldb_kv_ops_test.c
+++ b/lib/ldb/tests/ldb_kv_ops_test.c
@@ -1815,5 +1815,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_lmdb_free_list_test.c b/lib/ldb/tests/ldb_lmdb_free_list_test.c
index 246fdc71e6b..99505ce7b55 100644
--- a/lib/ldb/tests/ldb_lmdb_free_list_test.c
+++ b/lib/ldb/tests/ldb_lmdb_free_list_test.c
@@ -657,5 +657,7 @@ int main(int argc, const char **argv)
 		test_free_list_stale_reader, setup, teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_lmdb_test.c b/lib/ldb/tests/ldb_lmdb_test.c
index 798a1916281..5fa4fbb5587 100644
--- a/lib/ldb/tests/ldb_lmdb_test.c
+++ b/lib/ldb/tests/ldb_lmdb_test.c
@@ -586,5 +586,7 @@ int main(int argc, const char **argv)
 			ldbtest_teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_match_test.c b/lib/ldb/tests/ldb_match_test.c
index 1bb56d072d9..ad00457aa65 100644
--- a/lib/ldb/tests/ldb_match_test.c
+++ b/lib/ldb/tests/ldb_match_test.c
@@ -309,5 +309,7 @@ int main(int argc, const char **argv)
 			teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
index f620fc1357b..be4f458d27f 100644
--- a/lib/ldb/tests/ldb_mod_op_test.c
+++ b/lib/ldb/tests/ldb_mod_op_test.c
@@ -4720,5 +4720,7 @@ int main(int argc, const char **argv)
 		cmocka_set_test_filter(argv[1]);
 	}
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_msg.c b/lib/ldb/tests/ldb_msg.c
index 31786a9a318..207c01a3051 100644
--- a/lib/ldb/tests/ldb_msg.c
+++ b/lib/ldb/tests/ldb_msg.c
@@ -376,5 +376,7 @@ int main(int argc, const char **argv)
 			ldb_msg_teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_no_lmdb_test.c b/lib/ldb/tests/ldb_no_lmdb_test.c
index be23d744004..4fca6634d59 100644
--- a/lib/ldb/tests/ldb_no_lmdb_test.c
+++ b/lib/ldb/tests/ldb_no_lmdb_test.c
@@ -155,5 +155,7 @@ int main(int argc, const char **argv)
 			ldbtest_teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/ldb_tdb_test.c b/lib/ldb/tests/ldb_tdb_test.c
index 64e5983e2be..c7968e50e2e 100644
--- a/lib/ldb/tests/ldb_tdb_test.c
+++ b/lib/ldb/tests/ldb_tdb_test.c
@@ -385,5 +385,7 @@ int main(int argc, const char **argv)
 			ldbtest_teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/lldb_ldap.c b/lib/ldb/tests/lldb_ldap.c
index eea9f22f6b9..c5404f189b3 100644
--- a/lib/ldb/tests/lldb_ldap.c
+++ b/lib/ldb/tests/lldb_ldap.c
@@ -101,5 +101,7 @@ int main(int argc, const char **argv)
 						lldb_msg_teardown),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/test_ldb_dn.c b/lib/ldb/tests/test_ldb_dn.c
index 6bf621a1d45..61c0e825390 100644
--- a/lib/ldb/tests/test_ldb_dn.c
+++ b/lib/ldb/tests/test_ldb_dn.c
@@ -208,7 +208,7 @@ static void test_ldb_dn_explode(void **state)
 
 		/* comp nums are set by explode */
 		result = ldb_dn_validate(dn);
-		print_error("test %zu «%s»: res %i lin «%s» ext «%s»\n",
+		print_error("string under test (%zu) «%s»: res %i lin «%s» ext «%s»\n",
 			    i, tests[i].strdn, result, linear, ext_linear);
 		
 		assert_true(result == tests[i].explode_result);
@@ -228,5 +228,7 @@ int main(void) {
 		cmocka_unit_test(test_ldb_dn_explode),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/tests/test_ldb_qsort.c b/lib/ldb/tests/test_ldb_qsort.c
index 663cf0e7564..baaad7afe92 100644
--- a/lib/ldb/tests/test_ldb_qsort.c
+++ b/lib/ldb/tests/test_ldb_qsort.c
@@ -61,5 +61,6 @@ int main(void) {
 		cmocka_unit_test(test_ldb_qsort),
 	};
 
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
 	return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 67cc576d39e..6ac15f253a9 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -1,105 +1,25 @@
 #!/usr/bin/env python
 
-APPNAME = 'ldb'
 # For Samba 4.21.x
-VERSION = '2.10.0'
+LDB_VERSION = '2.10.0'
 
 import sys, os
 
-# find the buildtools directory
-top = '.'
-while not os.path.exists(top+'/buildtools') and len(top.split('/')) < 5:


-- 
Samba Shared Repository



More information about the samba-cvs mailing list