[Pkg-samba-maint] ldb merge

Michael Tokarev mjt at tls.msk.ru
Mon Mar 28 17:34:56 BST 2022


28.03.2022 12:32, Michael Tokarev wrote:
> There are a few interesting surprises here.
> 
> The first one is:
> 
> $ ldd libldb2/usr/lib/x86_64-linux-gnu/libldb.so.2
>      libreplace-samba4.so.0 => not found
> 
> oops.
> 
> When building libldb separately, this libreplace
> library is linked directly into libldb.so.

The only symbol libldb uses from libreplace is
rep_memset_s() which comes from the ZERO_STRUCT
macro in lib/replace/replace.h, which uses memset_s().
I created a simple patch to replace memset_s()
here with bzero() (which is available in glibc), -
with that, libldb.so does not depend on libreplace
anymore and becomes more or less independent.
At least not dependent from samba-libs.

Maybe it's better to link libreplace statically,
let's see.

...libldb modules...
> all the actual modules went to samba-dsdb-modules package,
> since they were in usr/lib/x86_64-linux-gnu/samba/ldb/.
> Having some more understanding of waf-the-buildsystem
> I probably can make it put stuff into separate dir.
> Because else we'll have to expand the wildcard in
> debian/samba-dsdb-modules.install.

So I ended up explicitly listing all modules in both
samba-dsdb-modules.install and in libldb2.install


> The include files are in /usr/include/samba-4.0/ldb.h etc.
> Maybe this is right.

Thinking about this, it should be okay, since libldb is
very tightly tied with samba. The include path is in
pkg-config so should be easy to have it.

> Next we have lintian warnings:
> 
> W: ldb-tools: package-relation-with-self
>    Depends: ldb-tools (= 2:4.16.0+dfsg-1)
> This is due to libldb-cmdline-samba4.so.0 which
> is packaged in the same binary package.
> And it is here because of private-libraries-have-0-vnum ;)

This turned out to be more problematic.

libldb2 : Depends: libldb2 (= 2:4.16.0+dfsg-1) but 2:2.5.0+samba4.16.0+dfsg-1 is installed

It looks like we have to specify explicit version directly
in d/control instead of using variables in d/rules.
Looking at it now...

/mjt



More information about the Pkg-samba-maint mailing list