[Pkg-dns-devel] Bug#853751: unbound: FTBFS[!linux]: missing getentropy implementations

Steven Chamberlain steven at pyro.eu.org
Tue Jan 31 17:12:17 UTC 2017


tags 853751 + patch
user helmutg at debian.org
usertags 853751 + rebootstrap
thanks

Hi,

This bug has become important, since src:unbound became part of the
build-essential closure (due to Build-Depends of gnutls28).  So this is
now a blocking issue for rebootstrapping kfreebsd and hurd.

Andreas Beckmann wrote:
> unbound FTBFS on hurd-i386 and kfreebsd-* due to usage of linux specific
> headers linux/types.h and sys/mount.h:

This is still the case in sid:
https://buildd.debian.org/status/fetch.php?pkg=unbound&arch=hurd-i386&ver=1.6.0-2&stamp=1482097724&raw=0
https://buildd.debian.org/status/fetch.php?pkg=unbound&arch=kfreebsd-amd64&ver=1.6.0-2&stamp=1482453042&raw=0
https://buildd.debian.org/status/fetch.php?pkg=unbound&arch=kfreebsd-i386&ver=1.6.0-2&stamp=1482578818&raw=0

| compat/getentropy_linux.c:56:25: fatal error: linux/types.h: No such file or directory

The reason is, unbound requires an arc4random(3) implementation.  For
platforms not having that in their libc, it bundles its own embedded
code copy (in compat/) but that only supports Linux, OS/X and Solaris.

We have in Debian a good arc4random(3) implementation provided by
libbsd, which is already ported to all architectures.  Please use it on
kfreebsd and hurd, at least.  I've attached a patch to do exactly that,
and fixes the current FTBFS there.

(It was necessary that the LDFLAGS of libbsd-overlay.pc come *before*
-Wl,--as-needed, or else the AC_REPLACE_FUNCS configure checks fail --
I'm not sure what is the reason for that?)

You could perhaps use libbsd unconditionally - on linux arches too - and
then the copy in compat/ would no longer be used.

There is a long history of software embedding copies of arc4random, and
then forgetting to maintain them.  There is a longer discussion of that
here:  https://wiki.debian.org/arc4random

I hold the opinion that packages should use the libbsd implementation
whereever possible, and then in Debian we would only need to maintain it
in one place, to the benefit of all reverse-deps.

Many thanks,
Regards,
-- 
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unbound.diff
Type: text/x-diff
Size: 3093 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dns-devel/attachments/20170131/2d743479/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 648 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dns-devel/attachments/20170131/2d743479/attachment.sig>


More information about the pkg-dns-devel mailing list