[Libguestfs] [PATCH v6 2/7] appliance: add yara dependency
Richard W.M. Jones
rjones at redhat.com
Tue Apr 18 07:54:02 UTC 2017
On Thu, Apr 06, 2017 at 11:41:02PM +0300, Matteo Cafasso wrote:
> libyara3 on Debian/Ubuntu
> yara on SUSE/RedHat
This commit needs to also document the new dependency in
docs/guestfs-building.pod
Rich.
> Signed-off-by: Matteo Cafasso <noxdafox at gmail.com>
> ---
> appliance/packagelist.in | 4 ++++
> daemon/Makefile.am | 3 ++-
> m4/guestfs_daemon.m4 | 14 ++++++++++++++
> 3 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/appliance/packagelist.in b/appliance/packagelist.in
> index 5cf22768a..8846ce846 100644
> --- a/appliance/packagelist.in
> +++ b/appliance/packagelist.in
> @@ -52,6 +52,7 @@ ifelse(REDHAT,1,
> vim-minimal
> xz
> yajl
> + yara
> zfs-fuse
> )
>
> @@ -86,6 +87,7 @@ dnl iproute has been renamed to iproute2
> libsystemd-journal0
> libtirpc1
> libyajl2
> + libyara3
> linux-image
> dnl syslinux 'suggests' mtools, but in reality it's a hard dependency:
> mtools
> @@ -129,6 +131,7 @@ ifelse(ARCHLINUX,1,
> vim
> xz
> yajl
> + yara
> )
>
> ifelse(SUSE,1,
> @@ -159,6 +162,7 @@ ifelse(SUSE,1,
> systemd
> vim
> xz
> + yara
> )
>
> ifelse(FRUGALWARE,1,
> diff --git a/daemon/Makefile.am b/daemon/Makefile.am
> index 8632c3768..af4430f20 100644
> --- a/daemon/Makefile.am
> +++ b/daemon/Makefile.am
> @@ -191,7 +191,8 @@ guestfsd_LDADD = \
> $(SERVENT_LIB) \
> $(PCRE_LIBS) \
> $(TSK_LIBS) \
> - $(RPC_LIBS)
> + $(RPC_LIBS) \
> + $(YARA_LIBS)
>
> guestfsd_CPPFLAGS = \
> -I$(top_srcdir)/gnulib/lib \
> diff --git a/m4/guestfs_daemon.m4 b/m4/guestfs_daemon.m4
> index eb5a6d5cf..522cd5f0e 100644
> --- a/m4/guestfs_daemon.m4
> +++ b/m4/guestfs_daemon.m4
> @@ -126,3 +126,17 @@ AC_CHECK_LIB([tsk],[tsk_version_print],[
> AC_DEFINE([HAVE_LIBTSK], [1], [Define to 1 if The Sleuth Kit library (libtsk) is available.])
> ], [])
> ],[AC_MSG_WARN([The Sleuth Kit library (libtsk) not found])])
> +
> +dnl yara library (optional)
> +PKG_CHECK_MODULES([YARA], [libyara],[
> + AC_SUBST([YARA_CFLAGS])
> + AC_SUBST([YARA_LIBS])
> + AC_DEFINE([HAVE_YARA],[1],[yara library found at compile time.])
> +],[
> + AC_CHECK_LIB([yara],[yr_initialize],[
> + AC_CHECK_HEADER([yara.h],[
> + AC_SUBST([YARA_LIBS], [-lyara])
> + AC_DEFINE([HAVE_YARA], [1], [Define to 1 if Yara library is available.])
> + ], [])
> + ],[AC_MSG_WARN([Yara library not found])])
> +])
> --
> 2.11.0
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list