[Pkg-clamav-devel] Bug#816272: Bug#816272: clamav-freshclam: logrotate errors out with "gzip: stdin: file size changed while zipping"

Christian Pernegger pernegger at gmail.com
Sun Mar 6 11:30:59 UTC 2016


2016-03-05 23:07 GMT+01:00 Sebastian Andrzej Siewior <sebastian at breakpoint.cc>:
> every other? I assumed twice a day.
That's correct, of course, my mistake.

> Btw: is this the cron/ anacron package or systemd's cron stuff?
just plain cron (3.0pl1-127+deb8u1)

> When you select `cron' in debconf then it will roll the big dice
Tried that yesterday, result:
18 */12 * * *    clamav [ -x /usr/bin/freshclam ] &&
/usr/bin/freshclam --quiet >/dev/null

It now runs at 18 past noon and midnight, but I still got a
(different) error e-mail this morning:
/etc/cron.daily/logrotate:
error: error running non-shared postrotate script for
/var/log/clamav/freshclam.log of '/var/log/clamav/freshclam.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

Maybe that's just an artefact of the recent debconf run, we'll see in a week.

> So *I* really think just adding the extra option to lograte is the simplest
> thing to do.

I'd love to but it is already in there as standard:
/var/log/clamav/freshclam.log {
     rotate 12
     weekly
     compress
     delaycompress
     missingok
     create 640  clamav adm
     postrotate
     if [ -d /run/systemd/system ]; then
         systemctl -q is-active clamav-freshclam && systemctl kill
--signal=SIGHUP clamav-freshclam
     else
         /etc/init.d/clamav-freshclam reload-log > /dev/null
     fi
     endscript
     }

Christian



More information about the Pkg-clamav-devel mailing list