From ecf444976221a67e4aa5dd0ff38361d71a191fa4 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 13 Oct 2021 15:36:11 +0200 Subject: [PATCH] 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 Suggested-by: Richard W.M. Jones Signed-off-by: Laszlo Ersek Message-Id: <20211013133611.21599-4-lersek@redhat.com> Acked-by: Eric Blake Acked-by: Richard W.M. Jones --- 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 1f872700e..803b89fd5 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 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 316a811d3..4dec4fa67 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.])