build, docs: spell out minimum version (4.0.0) for the (optional) Yara lib

Commit e597fc5317 ("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@redhat.com>
Suggested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211013133611.21599-4-lersek@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
Laszlo Ersek
2021-10-13 15:36:11 +02:00
committed by Richard W.M. Jones
parent 56172a193c
commit ecf4449762
2 changed files with 2 additions and 2 deletions

View File

@@ -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.

View File

@@ -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.])