aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/clamav
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/clamav
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
openembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.bz2
openembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.zip
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/clamav')
-rw-r--r--recipes/clamav/clamav.inc121
-rw-r--r--recipes/clamav/clamav_0.90.2.bb3
-rw-r--r--recipes/clamav/clamav_0.90.3.bb3
-rw-r--r--recipes/clamav/clamav_0.91.1.bb3
-rw-r--r--recipes/clamav/files/clamav-daemon.init44
-rw-r--r--recipes/clamav/files/clamav-freshclam.init51
-rw-r--r--recipes/clamav/files/clamd.conf27
-rw-r--r--recipes/clamav/files/cross-compile-fix.patch133
-rw-r--r--recipes/clamav/files/freshclam.conf21
-rw-r--r--recipes/clamav/files/volatiles.03_clamav-daemon4
-rw-r--r--recipes/clamav/files/volatiles.03_clamav-data4
-rw-r--r--recipes/clamav/files/volatiles.03_clamav-freshclam4
12 files changed, 418 insertions, 0 deletions
diff --git a/recipes/clamav/clamav.inc b/recipes/clamav/clamav.inc
new file mode 100644
index 0000000000..49b8023a53
--- /dev/null
+++ b/recipes/clamav/clamav.inc
@@ -0,0 +1,121 @@
+DESCRIPTION = "Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main \
+purpose of this software is the integration with mail servers (attachment \
+scanning)."
+DESCRIPTION_${PN}-lib = "The dynamic library that is shared between all of \
+the Clam AntiVirus components"
+DESCRIPTION_${PN}-freshclam = "An automatic virus signature update \
+application for Clam AntiVirus"
+DESCRIPTION_${PN}-data = "Static antivirus signature database for Clam AntiVirus"
+DESCRIPTION_${PN}-daemon = "An on-demand file scanning service for Clam AntiVirus"
+HOMEPAGE = "http://www.clamav.net/"
+SECTION = "network"
+LICENSE = "GPL"
+DEPENDS = "zlib bzip2 gmp curl virtual/libintl"
+RDEPENDS_${PN} = "${PN}-data"
+RDEPENDS_${PN}-daemon = "${PN}-data ${PN}-conf"
+RDEPENDS_${PN}-freshclam = "${PN}-conf"
+RRECOMMENDS_${PN} = "${PN}-freshclam"
+RRECOMMENDS_${PN}-daemon = "${PN}-freshclam"
+RPROVIDES_${PN}-freshclam = "${PN}-data"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/clamav/clamav-${PV}.tar.gz \
+ file://cross-compile-fix.patch;patch=1 \
+ file://clamav-daemon.init \
+ file://clamav-freshclam.init \
+ file://clamd.conf \
+ file://freshclam.conf \
+ file://volatiles.03_clamav-data \
+ file://volatiles.03_clamav-daemon \
+ file://volatiles.03_clamav-freshclam"
+
+inherit autotools update-rc.d binconfig
+
+# Don't check for clamav uid/gid - they don't exist on the host
+# Put virus definitions in /var/lib not /usr/lib
+EXTRA_OECONF = "--disable-clamav \
+ --with-zlib=${STAGING_DIR_HOST}${layout_prefix} \
+ --with-libcurl \
+ --with-dbdir=${localstatedir}/lib/clamav"
+
+do_install_append() {
+ install -m 0755 -d ${D}${sysconfdir}/default/volatiles \
+ ${D}${sysconfdir}/init.d ${D}${docdir}/clamav
+
+ # Save the installed clamd.conf in the doc dir and then install our new one
+ install -m 0755 ${D}${sysconfdir}/clamd.conf ${D}${docdir}/clamav/clamd.conf.example
+ install -m 0755 ${WORKDIR}/clamd.conf ${D}${sysconfdir}/clamd.conf
+
+ # Save the installed freshclam.conf in the doc dir and then install our new one
+ install -m 0755 ${D}${sysconfdir}/freshclam.conf ${D}${docdir}/clamav/freshclam.conf.example
+
+ # Install our config files and init scripts
+ install -m 0755 ${WORKDIR}/freshclam.conf ${D}${sysconfdir}/freshclam.conf
+ install -m 0755 ${WORKDIR}/clamav-daemon.init ${D}${sysconfdir}/init.d/clamav-daemon
+ install -m 0755 ${WORKDIR}/clamav-freshclam.init ${D}${sysconfdir}/init.d/clamav-freshclam
+
+ # We need some /var directories
+ for i in 03_clamav-daemon 03_clamav-freshclam 03_clamav-data; do
+ install -m 0644 ${WORKDIR}/volatiles.$i ${D}${sysconfdir}/default/volatiles/$i
+ done
+}
+do_stage () {
+ oe_libinstall -a -so libclamav ${STAGING_LIBDIR}
+ rm -f ${STAGING_LIBDIR}/libclamav.la
+ install -m 0644 libclamav/clamav.h ${STAGING_INCDIR}
+}
+
+PACKAGES += "${PN}-freshclam ${PN}-daemon ${PN}-conf ${PN}-data ${PN}-lib \
+ ${PN}-clamconf"
+
+FILES_${PN} = "${bindir}/clamscan \
+ ${bindir}/sigtool \
+ ${bindir}/clamdscan"
+FILES_${PN}-lib = "${libdir}/libclamav.so.*"
+FILES_${PN}-conf = "${sysconfdir}/clamd.conf"
+FILES_${PN}-clamconf = "${bindir}/clamconf"
+FILES_${PN}-freshclam = "${bindir}/freshclam \
+ ${sysconfdir}/freshclam.conf \
+ ${sysconfdir}/init.d/clamav-freshclam \
+ ${sysconfdir}/default/volatiles/03_clamav-freshclam"
+FILES_${PN}-daemon = "${sbindir}/clamd \
+ ${sysconfdir}/init.d/clamav-daemon \
+ ${sysconfdir}/default/volatiles/03_clamav-daemon"
+FILES_${PN}-data = "${localstatedir}/lib/clamav/main.cvd \
+ ${localstatedir}/lib/clamav/daily.cvd \
+ ${sysconfdir}/default/volatiles/03_clamav-data"
+FILES_${PN}-dev += "${bindir}/clamav-config"
+
+# Add clamav's user and groups
+pkg_postinst_${PN}-freshclam () {
+ grep -q clamav: /etc/group || addgroup clamav
+ grep -q clamav: /etc/passwd || \
+ adduser --disabled-password --home=/var/lib/clamav/ --system \
+ --ingroup clamav --no-create-home -g "ClamAV" clamav
+ /etc/init.d/populate-volatile.sh update
+}
+pkg_postinst_${PN}-daemon () {
+ grep -q clamav: /etc/group || addgroup clamav
+ grep -q clamav: /etc/passwd || \
+ adduser --disabled-password --home=/var/lib/clamav/ --system \
+ --ingroup clamav --no-create-home -g "ClamAV" clamav
+ /etc/init.d/populate-volatile.sh update
+}
+pkg_postinst_${PN}-data () {
+ grep -q clamav: /etc/group || addgroup clamav
+ grep -q clamav: /etc/passwd || \
+ adduser --disabled-password --home=/var/lib/clamav/ --system \
+ --ingroup clamav --no-create-home -g "ClamAV" clamav
+ /etc/init.d/populate-volatile.sh update
+}
+
+# Indicate that the default files are configuration files
+CONFFILES_${PN}-conf = "${sysconfdir}/clamd.conf"
+CONFFILES_${PN}-freshclam = "${sysconfdir}/freshclam.conf"
+CONFFILES_${PN}-data = "${localstatedir}/lib/clamav/main.cvd \
+ ${localstatedir}/lib/clamav/daily.cvd"
+
+INITSCRIPT_PACKAGES = "${PN}-daemon ${PN}-freshclam"
+INITSCRIPT_NAME_${PN}-daemon = "clamav-daemon"
+INITSCRIPT_NAME_${PN}-freshclam = "clamav-freshclam"
+INITSCRIPT_PARAMS_${PN}-daemon = "defaults 50 50"
+INITSCRIPT_PARAMS_${PN}-freshclam = "defaults 50 50"
diff --git a/recipes/clamav/clamav_0.90.2.bb b/recipes/clamav/clamav_0.90.2.bb
new file mode 100644
index 0000000000..9592adf914
--- /dev/null
+++ b/recipes/clamav/clamav_0.90.2.bb
@@ -0,0 +1,3 @@
+require clamav.inc
+
+PR = "r2"
diff --git a/recipes/clamav/clamav_0.90.3.bb b/recipes/clamav/clamav_0.90.3.bb
new file mode 100644
index 0000000000..e721558efe
--- /dev/null
+++ b/recipes/clamav/clamav_0.90.3.bb
@@ -0,0 +1,3 @@
+require clamav.inc
+
+PR = "r1"
diff --git a/recipes/clamav/clamav_0.91.1.bb b/recipes/clamav/clamav_0.91.1.bb
new file mode 100644
index 0000000000..e721558efe
--- /dev/null
+++ b/recipes/clamav/clamav_0.91.1.bb
@@ -0,0 +1,3 @@
+require clamav.inc
+
+PR = "r1"
diff --git a/recipes/clamav/files/clamav-daemon.init b/recipes/clamav/files/clamav-daemon.init
new file mode 100644
index 0000000000..6fd07146ea
--- /dev/null
+++ b/recipes/clamav/files/clamav-daemon.init
@@ -0,0 +1,44 @@
+#! /bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/clamd
+NAME="clamd"
+DESC="ClamAV daemon"
+CLAMAV_CONF=/etc/clamd.conf
+PID=/var/run/clamav/clamd.pid
+
+set -e
+
+test -x "$DAEMON" || exit 0
+if [ ! -r "$CLAMAV_CONF" ]; then
+ echo "ClamAV configuration file $CLAMAV_CONF not found. Exiting"
+ exit 0
+fi
+if [ `grep -q "^Example" $CLAMAV_CONF` ]; then
+ echo "$DESC is not configured."
+ exit 0
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --oknodo -S -x $DAEMON
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon -K -p $PID
+ ;;
+
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/clamav/files/clamav-freshclam.init b/recipes/clamav/files/clamav-freshclam.init
new file mode 100644
index 0000000000..21f02008f5
--- /dev/null
+++ b/recipes/clamav/files/clamav-freshclam.init
@@ -0,0 +1,51 @@
+#!/bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/freshclam
+NAME=freshclam
+DESC="ClamAV virus database updater"
+FRESHCLAM_CONF=/etc/freshclam.conf
+CLAMAV_CONF=/etc/clamd.conf
+PID=/var/run/clamav/freshclam.pid
+
+set -e
+
+test -x "$DAEMON" || exit 0
+if [ ! -r "$CLAMAV_CONF" ]; then
+ echo "ClamAV configuration file $CLAMAV_CONF not found. Exiting"
+ exit 0
+fi
+if [ ! -r "$FRESHCLAM_CONF" ]; then
+ echo "Freshclam configuration file $FRESHCLAM_CONF not found. Exiting"
+ exit 0
+fi
+
+
+case "$1" in
+ no-daemon)
+ echo "It takes freshclam ~3min to timeout and try the next mirror in the list"
+ freshclam
+ ;;
+
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon -S -x $DAEMON -- -d --quiet -p $PID
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon -K -p $PID
+ ;;
+
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 {no-daemon|start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/clamav/files/clamd.conf b/recipes/clamav/files/clamd.conf
new file mode 100644
index 0000000000..74ebcf5c3f
--- /dev/null
+++ b/recipes/clamav/files/clamd.conf
@@ -0,0 +1,27 @@
+## Please read the clamd.conf(5) manual before editing this file.
+LogFile /var/log/clamav/clamav.log
+LogFileMaxSize 0
+LogTime yes
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket yes
+MaxConnectionQueueLength 15
+MaxThreads 10
+ReadTimeout 180
+SelfCheck 1800
+User clamav
+AllowSupplementaryGroups yes
+ScanPE yes
+ScanELF yes
+DetectBrokenExecutables yes
+ScanOLE2 yes
+ScanMail yes
+PhishingSignatures yes
+ScanHTML yes
+ScanArchive yes
+ArchiveMaxRecursion 8
+ArchiveMaxFiles 1000
+ArchiveMaxFileSize 10M
+ArchiveMaxCompressionRatio 250
+ArchiveBlockMax yes
diff --git a/recipes/clamav/files/cross-compile-fix.patch b/recipes/clamav/files/cross-compile-fix.patch
new file mode 100644
index 0000000000..f7ab4aa69f
--- /dev/null
+++ b/recipes/clamav/files/cross-compile-fix.patch
@@ -0,0 +1,133 @@
+Add some caching of values which can't be determined when
+cross-compiling. This lets us define the values via the site files.
+
+Also check for libintl and add it to ldflags if required.
+
+Index: clamav-0.90.2/configure.in
+===================================================================
+--- clamav-0.90.2.orig/configure.in 2007-04-13 09:10:37.000000000 +1000
++++ clamav-0.90.2/configure.in 2007-05-16 14:19:01.000000000 +1000
+@@ -60,19 +60,21 @@
+
+ dnl Check for broken snprintf (code by Phil Oleson <oz*nixil.net>)
+ if test "x$ac_cv_func_snprintf" = "xyes" ; then
+- AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
++ AC_CACHE_CHECK([whether snprintf correctly terminates long strings],
++ [ac_cv_have_broken_snprintf], [
+ AC_TRY_RUN(
+ [
+ #include <stdio.h>
+ int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
+ ],
+- [AC_MSG_RESULT(yes)],
+- [
+- AC_MSG_RESULT(no)
+- AC_DEFINE(BROKEN_SNPRINTF,1,[Define if your snprintf is busted])
+- AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
+- ]
+- )
++ [ ac_cv_have_broken_snprintf="no" ],
++ [ ac_cv_have_broken_snprintf="yes" ]
++ )
++ ])
++ if test "$ac_cv_have_broken_snprintf" = "yes"; then
++ AC_DEFINE(BROKEN_SNPRINTF,1,[Define if your snprintf is busted])
++ AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
++ fi
+ fi
+
+ have_pthreads=no
+@@ -370,18 +372,28 @@
+ AC_DEFINE_UNQUOTED(CONFDIR,"$cfg_dir",[where to look for the config file])
+
+ dnl check for in_port_t definition
++AC_CACHE_CHECK([for in_port_t], [clamav_av_have_in_port_t], [
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ int main(int argc, char **argv) { in_port_t pt; pt = 0; return pt; }
+-], AC_DEFINE(HAVE_IN_PORT_T,1,[in_port_t is defined]), AC_MSG_RESULT(in_port_t is not defined))
++], [ clamav_av_have_in_port_t="yes" ], [ clamav_av_have_in_port_t="no" ])
++])
++if test "$clamav_av_have_in_port_t" = "yes"; then
++ AC_DEFINE(HAVE_IN_PORT_T,1,[in_port_t is defined])
++fi
+
+ dnl check for in_addr_t definition
++AC_CACHE_CHECK([for in_addr_t], [clamav_av_have_in_addr_t], [
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ int main(int argc, char **argv) { in_addr_t pt; pt = 0; return pt; }
+-], AC_DEFINE(HAVE_IN_ADDR_T,1,[in_addr_t is defined]), AC_MSG_RESULT(in_addr_t is not defined))
++], [ clamav_av_have_in_addr_t="yes" ], [ clamav_av_have_in_addr_t="no" ])
++])
++if test "$clamav_av_have_in_addr_t" = "yes"; then
++ AC_DEFINE(HAVE_IN_ADDR_T,1,[in_addr_t is defined])
++fi
+
+ case "$target_os" in
+ linux*)
+@@ -1100,6 +1112,10 @@
+ AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
+ AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, "default FD_SETSIZE value")
+
++dnl Do we need to link with -lintl?
++AM_GNU_GETTEXT([external])
++AM_GNU_GETTEXT_VERSION([0.14.1])
++
+ AC_OUTPUT([
+ libclamav/Makefile
+ clamscan/Makefile
+Index: clamav-0.90.2/clamd/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamd/Makefile.am 2007-05-16 14:22:46.000000000 +1000
++++ clamav-0.90.2/clamd/Makefile.am 2007-05-16 14:23:08.000000000 +1000
+@@ -60,5 +60,5 @@
+
+ endif
+
+-LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@ @LIBINTL@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+Index: clamav-0.90.2/clamdscan/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamdscan/Makefile.am 2007-05-16 14:24:02.000000000 +1000
++++ clamav-0.90.2/clamdscan/Makefile.am 2007-05-16 14:24:18.000000000 +1000
+@@ -40,4 +40,4 @@
+
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
+Index: clamav-0.90.2/clamscan/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamscan/Makefile.am 2007-05-16 14:20:23.000000000 +1000
++++ clamav-0.90.2/clamscan/Makefile.am 2007-05-16 14:20:39.000000000 +1000
+@@ -41,5 +41,5 @@
+ treewalk.h
+
+ DEFS = @DEFS@ -DCL_NOTHREADS
+-LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @LIBINTL@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+Index: clamav-0.90.2/freshclam/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/freshclam/Makefile.am 2007-05-16 14:25:10.000000000 +1000
++++ clamav-0.90.2/freshclam/Makefile.am 2007-05-16 14:25:25.000000000 +1000
+@@ -48,4 +48,4 @@
+
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
+Index: clamav-0.90.2/sigtool/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/sigtool/Makefile.am 2007-05-16 14:26:18.000000000 +1000
++++ clamav-0.90.2/sigtool/Makefile.am 2007-05-16 14:26:29.000000000 +1000
+@@ -39,4 +39,4 @@
+
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
diff --git a/recipes/clamav/files/freshclam.conf b/recipes/clamav/files/freshclam.conf
new file mode 100644
index 0000000000..fd45b0dd85
--- /dev/null
+++ b/recipes/clamav/files/freshclam.conf
@@ -0,0 +1,21 @@
+## Please read the freshclam.conf(5) manual before editing this file.
+
+# Comment or remove the line below.
+Example
+
+# Uncomment the following line and replace XY with your country
+# code. See http://www.iana.org/cctld/cctld-whois.htm for the full list.
+# Default: There is no default, which results in an error when running freshclam
+#DatabaseMirror db.XY.clamav.net
+
+DatabaseMirror database.clamav.net
+
+DatabaseDirectory /var/lib/clamav/
+UpdateLogFile /var/log/clamav/freshclam.log
+PidFile /var/run/clamav/freshclam.pid
+DatabaseOwner clamav
+AllowSupplementaryGroups yes
+DNSDatabaseInfo current.cvd.clamav.net
+MaxAttempts 5
+Checks 24
+NotifyClamd /etc/clamd.conf
diff --git a/recipes/clamav/files/volatiles.03_clamav-daemon b/recipes/clamav/files/volatiles.03_clamav-daemon
new file mode 100644
index 0000000000..c5f68e3511
--- /dev/null
+++ b/recipes/clamav/files/volatiles.03_clamav-daemon
@@ -0,0 +1,4 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d clamav clamav 0775 /var/log/clamav none
+d clamav clamav 0755 /var/lib/clamav none
+d clamav clamav 0755 /var/run/clamav none \ No newline at end of file
diff --git a/recipes/clamav/files/volatiles.03_clamav-data b/recipes/clamav/files/volatiles.03_clamav-data
new file mode 100644
index 0000000000..8fdb0a742a
--- /dev/null
+++ b/recipes/clamav/files/volatiles.03_clamav-data
@@ -0,0 +1,4 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d clamav clamav 0755 /var/lib/clamav none
+f clamav clamav 0644 /var/lib/clamav/main.cvd none
+f clamav clamav 0644 /var/lib/clamav/daily.cvd none
diff --git a/recipes/clamav/files/volatiles.03_clamav-freshclam b/recipes/clamav/files/volatiles.03_clamav-freshclam
new file mode 100644
index 0000000000..db78e3a0d4
--- /dev/null
+++ b/recipes/clamav/files/volatiles.03_clamav-freshclam
@@ -0,0 +1,4 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d clamav clamav 0775 /var/log/clamav none
+d clamav clamav 0755 /var/lib/clamav none
+d clamav clamav 0755 /var/run/clamav none