On Mon, May 23, 2016 at 04:42:43PM +0200, Michal Privoznik wrote:
On 23.05.2016 10:18, Pavel Hrdina wrote:
> We need to append GNUTLS_CFLAGS while building utils because virtcrypto
> is using it. This fixes build on freebsd where gnutuls is in
> /usr/local/include.
>
> Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
> ---
> src/Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 314f6df..12b66c2 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1106,7 +1106,7 @@ libvirt_util_la_SOURCES = \
> libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
> $(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
> $(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
> - $(SYSTEMD_DAEMON_CFLAGS) $(POLKIT_CFLAGS) \
> + $(SYSTEMD_DAEMON_CFLAGS) $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) \
> -I$(srcdir)/conf
> libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
> $(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
>
I think we need to update _LIBADD too so that it contains GNUTLS_LIBS
because now libvirt_uitls lib is depending on gnutls lib. This, however,
Yes, I've realized that too few minutes ago.
make commandtest fail as gnutls upon its init opens /dev/urandom and
keeps it opened for the rest of binary runtime which makes commandhelper
report the FD and in turn commandtest sad.
I'm not sure I have proper solution for that - other than what you did
in 1/2.
We could wrap all gnutls functions and for tests mock those wrapper functions.