Description of problem: The log rotation of freshclam's log is incorrect. Logrotate rotates the file but freshclam keeps writing to the old (now rotated and renamed) file. -rw-rw-r-- 1 root clamupdate 0 Apr 1 00:00 /var/log/freshclam.log -rw-rw-r-- 1 root clamupdate 123116 Apr 2 02:51 /var/log/freshclam.log-20200401 The logrotate setup: #cat logrotate.d/clamav-update /var/log/freshclam.log { monthly notifempty missingok } Used to work fine for the previous way freshclam worked, but now it obviously needs to notify the daemon or restart it in order for the daemon to use the newly logrotate-created log file. Version-Release number of selected component (if applicable): clamav-update-0.102.2-3.fc30.x86_64 How reproducible: always; many machines Steps to Reproduce: 1. install clamav and clamav-update 2. wait until the rotation should occur 3. watch freshclam continue to write to the old file Actual results: writes to the old, renamed file Expected results: should write to the newly created empty file
we changed clamav-update , On dnf update you should can read this message [1] Please run 'systemctl enable clamav-freshclam --now' [1] Warning: clamav-update package changed Now we provide clamav-freshclam.service systemd unit instead old scripts and the cron.d entry. Unfortunately this may break existing unattended installations. Please run 'systemctl enable clamav-freshclam --now' to enable freshclam updates again.
You misunderstand. I've already done: systemctl enable clamav-freshclam --now Freshclam is running just fine for week under systemd. That's the not the problem. The problem is the logrotate script has not been updated to reflect the newer behavior of freshclam. #rpm -ql clamav-update |grep rotat /etc/logrotate.d/clamav-update Note especially the dates of the two /var/log/freshclam.log* files I listed above. The mtime on the rotated file is later than the date the rotated file is named for! And it's still at this very moment being written to by my freshclam, whilst the new /var/log/freshclam.log file is 0 bytes.
ok , thanks for the quick reply we need a `systemctl try-restart clamav-freshclam.service` after rotate or we should remove /etc/logrotate.d/clamav-update , because now you have the logs in journalctl -u clamav-freshclam
and we may comment UpdateLogFile [1] on /etc/freshclam.conf as is default [1] #UpdateLogFile /var/log/freshclam.log
I use rsyslog for freshclam, as I'm sure many do, so keeping the logrotate rule makes sense (as with other daemons). Looks like your additional line idea is all that is needed. It doesn't look like freshclam has any other way to kick it to reopen the log. Thanks!
I propose https://src.fedoraproject.org/rpms/clamav/pull-request/12
Looks good, but to be more like most of the other daemon out there (I checked their logrotate files), how about beefing it up to: /usr/bin/systemctl try-restart clamav-freshclam.service > /dev/null 2>&1 || true Not sure if the full path, the redirects, or the true bit are really important in the case of freshclam, but that's what most daemons are using. Thanks!
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
FEDORA-2020-449ef64b54 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-449ef64b54
FEDORA-2020-dcb7a1f57b has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-dcb7a1f57b
FEDORA-2020-6ffef7e6a4 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-6ffef7e6a4
FEDORA-2020-449ef64b54 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-449ef64b54` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-449ef64b54 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-6ffef7e6a4 has been pushed to the Fedora 30 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-6ffef7e6a4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-6ffef7e6a4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-dcb7a1f57b has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-dcb7a1f57b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-dcb7a1f57b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-6d1d2497d0 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-6d1d2497d0
FEDORA-EPEL-2020-2692293800 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-2692293800
FEDORA-EPEL-2020-2692293800 has been pushed to the Fedora EPEL 8 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-2692293800 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-6d1d2497d0 has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-6d1d2497d0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-bca44487a1 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-bca44487a1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bca44487a1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-765ceaa306 has been pushed to the Fedora EPEL 8 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-765ceaa306 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-235a51a239 has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-235a51a239 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-b0acd7b66e has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b0acd7b66e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b0acd7b66e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-d98d2cbae1 has been pushed to the Fedora 30 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-d98d2cbae1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d98d2cbae1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-bca44487a1 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-b0acd7b66e has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-d98d2cbae1 has been pushed to the Fedora 30 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-765ceaa306 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-235a51a239 has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report.