Is libbsd worth the pain?

Andrew Bartlett abartlet at samba.org
Fri Feb 3 06:25:53 MST 2012


On Fri, 2012-02-03 at 14:21 +0100, Jelmer Vernooij wrote:
> On 02/03/2012 04:28 AM, Andrew Bartlett wrote:
> > Regarding the recently introduced dependency on libbsd, I am wondering
> > if optionally depending on another unix portability lib is really worth
> > the pain.
> (for those reading along, it's not a hard dependency but a soft
> dependency.. only used when libbsd is present)
> > The issue I have with libbsd is that we gain so little from using it -
> > we cannot depend on it strictly existing, so we must provide our own
> > replacement functions anyway, and we need extra code to optionally use
> > it.
> This is true for pretty much everything in libreplace. MD5Init is
> apparently part of libc on OpenBSD (and that's why it's in libbsd), so
> we would hit issues on OpenBSD anyway (but apparently nobody builds
> Samba4 with gdb installed on OpenBSD).

> I agree there is some sort of cost/benefit balance here. If we hit too
> many issues I'm happy to talk about dropping this optional dependency.
> The MD5Init name clash seems like a genuine issue though.

Given we have at least a nominal issue on BSD anyway, it does indeed
seem that the correct approach it to figure out where MD5Init is (be it
libbsd or libc), and use that.

Explaining it in terms of avoiding packaging libreplace makes a lot of
sense. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list