[PATCH] Just another round of random cleanups

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Sep 19 08:09:57 MDT 2014

On Fri, Sep 19, 2014 at 06:53:26PM +1000, Martin Schwenke wrote:
> Having had 24 hours to think about this, I'm not convinced that having
> a dependency on samba-debug is necessarily better than having a
> dependency on samba-util.  The dependency tells us what to link against,
> and libsamba-util.so will already be loaded on the system.  It also
> says where to find includes.

Okay, true. From a pure memory perspective in practice it
might not be relevant. With that in mind I have problems
finding technical arguments for minimal dependencies except
for theoretical flexibility to combine things in new and
possibly better ways. Pulling in all of samba-util might
cause conflicts in other areas that you would not get when
you just had samba-debug.

My recent work on samba-debug was really focused on finding
the minimal necessary code to fully support the DEBUG()
macro. I was afraid to put any DEBUG into lowlevel code,
because it did pull in a lot of stuff. Now that is not that
bad anymore for me, and DEBUG with its debug classes
actually is a useful thing to me.

> Going finer grained depends on your motivations.  My current motivation
> is to be able to define a subset of samba-util to link against when
> doing a standalone CTDB build.  So, I'd prefer not to have to build
> everything that samba-util currently depends on.  I have a WIP patch in
> my samba-build branch that pulls the subsystem that I need out of
> samba-util (I'm currently calling it samba-util-core) and then only
> builds samba-util (and a bunch of other things) if SAMBA_UTIL_CORE_ONLY
> is *unset*.  It seems backward compatible.
> This works fine as long as nothing else I need depends on samba-util.
> If something does, then I cheat by defining a samba-util subsystem in
> ctdb/wscript that just depends on samba-util-core.  This would only be
> done for a standalone build.  It would also be unnecessary if samba-util
> wasn't public...

Does "public" here mean that we adhere to some API/ABI like
we do with libwbclient for example? This would severely
limit our ability to improve, much of the code in samba-util
is not at the point to be a stable API.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list