Laszlo Ersek
2021-Oct-13 13:36 UTC
[Libguestfs] [PATCH 3/3] build, docs: spell out minimum version (4.0.0) for the (optional) Yara lib
Commit e597fc5317e0 ("daemon/yara: fix undefined behavior due to Yara 4.0 API changes", 2021-10-12) prevents the daemon from using such a Yara version that precedes 4.0.0. If only yara < 4 is found, treat the library as absent, rather than attempting and failing to compile the yara module of the daemon. Note the version requirement in the documentation too. Suggested-by: Eric Blake <eblake at redhat.com> Suggested-by: Richard W.M. Jones <rjones at redhat.com> Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- docs/guestfs-building.pod | 2 +- m4/guestfs-daemon.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 1f872700e367..803b89fd5ea6 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -387,7 +387,7 @@ Optional. For tab-completion of commands in bash. Optional. Library for filesystem forensics analysis. -=item yara +=item yara E<ge> 4.0.0 Optional. Tool for categorizing files based on their content. diff --git a/m4/guestfs-daemon.m4 b/m4/guestfs-daemon.m4 index 316a811d30a9..4dec4fa67995 100644 --- a/m4/guestfs-daemon.m4 +++ b/m4/guestfs-daemon.m4 @@ -134,7 +134,7 @@ AC_CHECK_LIB([tsk],[tsk_version_print],[ ],[AC_MSG_WARN([The Sleuth Kit library (libtsk) not found])]) dnl yara library (optional) -PKG_CHECK_MODULES([YARA], [yara],[ +PKG_CHECK_MODULES([YARA], [yara >= 4.0.0],[ AC_SUBST([YARA_CFLAGS]) AC_SUBST([YARA_LIBS]) AC_DEFINE([HAVE_YARA],[1],[yara library found at compile time.]) -- 2.19.1.3.g30247aa5d201
Eric Blake
2021-Oct-13 14:52 UTC
[Libguestfs] [PATCH 3/3] build, docs: spell out minimum version (4.0.0) for the (optional) Yara lib
On Wed, Oct 13, 2021 at 03:36:11PM +0200, Laszlo Ersek wrote:> Commit e597fc5317e0 ("daemon/yara: fix undefined behavior due to Yara 4.0 > API changes", 2021-10-12) prevents the daemon from using such a Yara > version that precedes 4.0.0. > > If only yara < 4 is found, treat the library as absent, rather than > attempting and failing to compile the yara module of the daemon. Note the > version requirement in the documentation too. > > Suggested-by: Eric Blake <eblake at redhat.com> > Suggested-by: Richard W.M. Jones <rjones at redhat.com> > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > docs/guestfs-building.pod | 2 +- > m4/guestfs-daemon.m4 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod > index 1f872700e367..803b89fd5ea6 100644 > --- a/docs/guestfs-building.pod > +++ b/docs/guestfs-building.podAha, that's the file I missed in my earlier review when I checked only README and HACKING. And HACKING even mentions guestfs-building(1) (which is what gets compiled from this file). ACK series from my point of view. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2021-Oct-14 11:54 UTC
[Libguestfs] [PATCH 3/3] build, docs: spell out minimum version (4.0.0) for the (optional) Yara lib
Series looks good, thanks. ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top