The current ebuild for : clamav0.80rc3 does not make it possible to run clamd out of the box. It also misses some dedicated log directory and pid directory. I don't also see a need for clamuko so I propose we disable it (BTW the TODO file is 0 zero size and creates a warning from portage) Reproducible: Always Steps to Reproduce: 1. 2. 3. Here's a proposal diff : + >=sys-apps/sed-4 crypt? ( >=dev-libs/gmp-4.1.2 )" PROVIDE="virtual/antivirus" @@ -32,16 +33,33 @@ local myconf use milter && myconf="--enable-milter" - econf ${myconf} --with-dbdir=/var/lib/clamav || die + econf ${myconf} --with-dbdir=/var/lib/clamav --disable-clamuko || die emake || die } src_install() { make DESTDIR=${D} install || die - dodoc AUTHORS BUGS NEWS README ChangeLog TODO FAQ INSTALL + dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL TODO exeinto /etc/init.d ; newexe ${FILESDIR}/clamd.rc clamd insinto /etc/conf.d ; newins ${FILESDIR}/clamd.conf clamd dodoc ${FILESDIR}/clamav-milter.README.gentoo + dodir /var/run/clamav + dodir /var/log/clamav + fowners clamav:clamav /var/run/clamav + fowners clamav:clamav /var/log/clamav + # configure /etc/clamd.conf + sed -i -e 's|^\(Example\)$|\#\1|' \ + -e 's|^\#\(LogFile\) .*$|\1 /var/log/clamav/clamd.log|' \ + -e 's|^\#\(PidFile\) .*$|\1 /var/run/clamav/clamd.pid|' \ + -e 's|^\#\(User\) .*$|\1 clamav|' \ + -e 's|^\(LocalSocket\) .*$|\1 /var/run/clamav/clamd.sock|' \ + -e 's|^\#\(AllowSupplementaryGroups\)$|\1|' \ + -e 's|^\#\(ScanMail\)$|\1|' \ + -e 's|^\#\(DatabaseDirectory\) .*$|\1 /var/lib/clamav|' \ + -e 's|^\#\(DatabaseOwner\) .*$|\1 clamav|' \ + -e 's|^\#\(UpdateLogFile\) .*$|\1 /var/log/clamav/freshclam.log|' \ + -e 's|^\#\(FixStaleSocket\)$|\1|' /etc/clamd.conf + } /etc/conf.d/clamd should disappear or be changed to : FRESHCLAM_LOG="/var/log/clamav/clam-update.log"
please put patches as attachments. The initscript socket dir also needs to be changed accordingly.
Actually, I just did similar improvements to the current ebuild, and as I was looking for further possible trivial clamav bugs to fix along the way, I found this one. :) Look out for clamav-0.85-r1, and thanks for suggestions!