Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477540 - app-antivirus/clamav-0.97.8-r1 - systemd unit files do not handle freshclam or clmilter
Summary: app-antivirus/clamav-0.97.8-r1 - systemd unit files do not handle freshclam o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks: 480038
  Show dependency tree
 
Reported: 2013-07-21 00:49 UTC by Harris Landgarten
Modified: 2013-09-08 10:52 UTC (History)
2 users (show)

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


Attachments
Freshclam unit files from fedora (freshclam.f16.integration.tar,10.00 KB, application/x-tar)
2013-08-08 17:16 UTC, Harris Landgarten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2013-07-21 00:49:29 UTC
the openrc based /etc/init.d/clamd script checks the /etc/conf.d/clamd and starts freshclam and clmilter as daemons if the options are set in the config file.

The systemd unit files shipped with clamav only start clamd but not freshclam or clmilter and never references the /etc/conf.d/clamd config file.

I assume these unit files were copied from upstream. I have seen discussion on Fedora about the freshclam issue and it appears they handle it with a cron job.

I think a better solution would be to make clamav.target read the /etc/conf.d/clamd file and start the appropriate services with separate service files for clamd.service, freshclam.service and clmilter.service if the milter use flag is on when installed.

Any comments are appreciated.
Comment 1 Pacho Ramos gentoo-dev 2013-08-08 15:47:46 UTC
We need a patch here (maybe looking to other distributions like Arch or Mageia could help, but I don't have time just now for doing it myself)
Comment 2 Harris Landgarten 2013-08-08 17:16:45 UTC
Created attachment 355430 [details]
Freshclam unit files from fedora

I am using this now with a few path fixes. I creates a separate freshclam.service
Comment 3 Pacho Ramos gentoo-dev 2013-08-26 09:27:42 UTC
Will try to review them when I have time
Comment 4 Pacho Ramos gentoo-dev 2013-09-08 10:51:16 UTC
+*clamav-0.97.8-r2 (08 Sep 2013)
+
+  08 Sep 2013; Pacho Ramos <pacho@gentoo.org> +clamav-0.97.8-r2.ebuild,
+  +files/freshclamd.service, -clamav-0.97.8-r1.ebuild:
+  Install a service for freshclamd (#477540 by Harris Landgarten)
+

But you will need to manually add it at startup, we generally won't like to rely on conf.d files neither to to "automatic" launching of other services. From what I have seen in Arch and Fedora, I think this can be handled simply adding the desired units to be started at boot
Comment 5 Pacho Ramos gentoo-dev 2013-09-08 10:52:16 UTC
And clamav-milter.service was already installed when build with milter USE flag enabled