Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66905 - enhancements for clamav 0.80rc3 ebuild
Summary: enhancements for clamav 0.80rc3 ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-09 10:48 UTC by Steph L
Modified: 2005-05-14 14:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steph L 2004-10-09 10:48:11 UTC
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"
Comment 1 Daniel Black (RETIRED) gentoo-dev 2005-02-08 01:41:42 UTC
please put patches as attachments.

The initscript socket dir also needs to be changed accordingly.
Comment 2 Andrej Kacian (RETIRED) gentoo-dev 2005-05-14 14:38:43 UTC
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!