Your message dated Thu, 11 Aug 2016 08:33:49 +0200
with message-id
<caatjj0l-wrc4irstr7zj7a6h1bvai9zsbsw8apdoh6hmqrv...@mail.gmail.com>
and subject line Re: Bug#827909: [Pkg-clamav-devel] Bug#827909:
clamav-freshclam and clamav-daemon not starting after install
has caused the Debian Bug report #827909,
regarding clamav-freshclam and clamav-daemon not starting after install
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
827909: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827909
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: clamav
Version: 0.99.2+dfsg-2
Hi,
we've got a bug reported to Ubuntu (pad.lv/1590688) that I looked into.
All issues apply to sid as well, so I wanted to provide my fix for your
review, discussion and inclusion.
## The case ##
1. "sudo apt-get install clamav-daemon clamav-freshclam"
2. ClamAV doesn't start even though it should.
$ systemctl status clamav-daemon
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled;
vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Thu 2016-06-09 11:58:19 EEST; 7min ago
Docs: man:clamd(8)
man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
$ systemctl status clamav-freshclam.service
● clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled;
vendor preset: enabled)
Active: inactive (dead)
Docs: man:freshclam(1)
man:freshclam.conf(5)
http://www.clamav.net/lang/en/doc/
## The issues ##
#1 - freshclam not starting after install anymore (works in jessie)
=> That part is a regression.
#2 - clamav-daemon is blocked on the condition of having the db available,
but after it is available doesn't get started
=> That part (more or less) always behaved that way
Eventually the user needs to manually start freshclam to get it working.
Then wait a while until the db is available and then (re-)start the
clamav-daemon to pick up it is available.
## Solutions ##
1. get freshclam started on install by moving some sections in the postinst
(should be fixed as it is a regression)
For this I have a debdiff provided to ease your work (and it was also
the way I built and tested it).
2. let clamav-daemon start automatically after the files are made available.
This could be done by path based activation, but since these files are
actually part of clamav upstream it is probably just here for discussion
for now.
It might look like:
[Unit]
Description=Path Activation for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5)
http://www.clamav.net/lang/en/doc/
[Path]
# Check and wait for database existence before starting up
PathExistsGlob=@DBDIR@/main.{c[vl]d,inc}
PathExistsGlob=@DBDIR@/daily.{c[vl]d,inc}
[Install]
WantedBy=sockets.target
I also experimented with converting the ConditionPathExists to Assert, to
get some user notification of the fact that it is not running right after
install.
But that is "too" noisy, especially as it can render the install to report
as failed when the postinst starts the service and the assert fails.
So I dropped it - If you'd like to add some output again please feel free -
I posted the (very) old output in the linked Ubuntu bug.
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
fix-freshclam-not-starting-after-install.debdiff
Description: Binary data
--- End Message ---
--- Begin Message ---
On Wed, Aug 10, 2016 at 11:56 PM, Sebastian Andrzej Siewior <
sebast...@breakpoint.cc> wrote:
> why did freshclam not start? An up to date sid:
TL;DR it was because the invoke-rc and update-rc bits had to be after
#DEBHELPER to work reliably.
But you are right, something recently must have changed - I'm sure I was
able to reproduce on sid back then, but now I agree to you:
$ lxc launch images:debian/sid/amd64 debian-sid-clamav
$ lxc exec debian-sid-clamav apt-get install clamav-freshclam
[...]
$ lxc exec debian-sid-clamav systemctl status clamav-freshclam.service
● clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled;
vendor preset: enabled)
Active: active (running) since Thu 2016-08-11 06:21:18 UTC; 11s ago
IIRC back then there was a discussion that this might be dependent on the
exact details of debhelpers and such - maybe something there resolved now.
But yeah, for latest sid it seems we can close this.
Sorry for the noise.
--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
--- End Message ---
_______________________________________________
Pkg-clamav-devel mailing list
Pkg-clamav-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-clamav-devel