tdb and ldb
abartlet at samba.org
Tue Jan 31 22:49:48 MST 2012
On Wed, 2012-02-01 at 13:32 +1030, Rusty Russell wrote:
> On Tue, 31 Jan 2012 09:54:27 +0100, Andreas Schneider <asn at samba.org> wrote:
> > On Tuesday 31 January 2012 10:37:03 you wrote:
> > > On Mon, 30 Jan 2012 18:39:13 +0100, Andreas Schneider <asn at samba.org> wrote:
> > > > Hi Rusty,
> > > >
> > > > today I've tried to package the latest master tree and it didn't work.
> > > > I've
> > > > built it so that Samba4 is using the system libraries of talloc, tevent,
> > > > tdb and ldb. This fails cause the ldb configure check doesn't find tdb.
> > > Yes, you need to --enable-tdb2=false if you want to use the system tdb.
> > The error message is:
> > ERROR: Use of system library ldb depends on missing system library talloc tdb
> > tevent
> > It says tdb and not tdb2, I think this confuses 99% of the people ... ;)
> Yeah :( Rather than chase up "tdb" everywhere in the tree, I make
> tdb_compat the only thing that knows whether it's tdb2 or tdb1. I'll
> see if I can make this better.
> > > > a) Take a look at lib/ldb/wscript, line 31 ff. you find the configure
> > > > checks for ldb. I can see tdb_compat twice.
> > > >
> > > > b) conf.CHECK_BUNDLED_SYSTEM_PKG() for ldb is looking for tdb but it
> > > > doesn't find it.
> > >
> > > Because it's looking for tdb2 now. Perhaps it's time to export tdb2 as
> > > a shared library as well?
> > Yes, or document that if you use system ldb you need to disable tdb2.
> That would be temporary though. It's useful to keep the --enable-tdb2
> option for now in case we get regressions, but I want to kill it: we
> have a nasty tdb_compat layer and other stuff which unneccessary with
> the tdb2 api (like tdb_wrap). Then there is some really nice stuff we
> could do (like an allocator attribute, so we can have a tallocized tdb).
> I guess it's time to make a TDB2 shared library, which means the API
> gets harder to change. But it'll keep us honest...
It would seem that the next logical step would be to have ldb move to
directly using only the TDB2 API and library. It isn't shared with the
autoconf build, so this restriction won't cause any issues. The
unshared code in source4 and the waf build in general could then move
We still need to work out the move to tdb2 format databases for LDB, as
I want to use that to help set up a flag for a future change in the
Is there anything I can do to help that?
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical