Bug 1376815 - Update logrotate script for clamav
Summary: Update logrotate script for clamav
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: clamav
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Bebout
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1381211
TreeView+ depends on / blocked
 
Reported: 2016-09-16 13:20 UTC by Nicolas Chauvet (kwizart)
Modified: 2017-03-03 11:35 UTC (History)
7 users (show)

Fixed In Version: clamav-0.99.2-2
Clone Of:
: 1381211 (view as bug list)
Environment:
Last Closed: 2017-03-03 11:35:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Update logrotate script (571 bytes, application/mbox)
2016-09-16 13:20 UTC, Nicolas Chauvet (kwizart)
no flags Details

Description Nicolas Chauvet (kwizart) 2016-09-16 13:20:45 UTC
Created attachment 1201642 [details]
Update logrotate script

Description of problem:
On every logrotate (monthly) run for clamav, the following message can be seen under certain configuration:
error: running non-shared postrotate script for /var/log/clamd.smtpd.log of '/var/log/clamd.smtpd.log'

Version-Release number of selected component (if applicable):
Current clamav in EPEL6 and later.

How reproducible:
Every month as seen in logwatch

Steps to Reproduce:
1. install clamav 
2. enable smtpd
3.

Actual results:
The error is seen in the log

Expected results:
We should see no error

Additional info:
As seen in rhbz#1249725 the fix is about to redirect the standard output.
Patch attached

Comment 1 Orion Poplawski 2016-09-16 18:06:19 UTC
I don't quite follow.  The clamd package's logrotate script does not deal with /var/log/clamd.smtpd.log, but with /var/log/clamav/clamd.log.  You must have a custom logrotate script.

Comment 2 Nicolas Chauvet (kwizart) 2016-09-16 19:28:48 UTC
(In reply to Orion Poplawski from comment #1)
> I don't quite follow.  The clamd package's logrotate script does not deal
> with /var/log/clamd.smtpd.log, but with /var/log/clamav/clamd.log.  You must
> have a custom logrotate script.
wrong paste then

Comment 3 Orion Poplawski 2016-09-16 20:01:16 UTC
So you also get error messages about /var/log/clamav/clamd.log?  So there is no "clamd" process?

Comment 4 Nicolas Chauvet (kwizart) 2016-10-03 13:11:43 UTC
(In reply to Orion Poplawski from comment #3)
> So you also get error messages about /var/log/clamav/clamd.log?  So there is
> no "clamd" process?

Thx for your notice. Actually I've reported it on the wrong component.
There is indeed a /var/log/clamd.clamsmtp/clamsmtpd.log that comes from a separate clamsmtp package. (filled a separate issue about this).

Now both the clamd and clamd.clamsmtp logrotate files should be derived from this clamd.logrotate file (as it's also provided in clamav-devel as template for other services based on clamd).

Comment 5 Nicolas Chauvet (kwizart) 2016-10-03 13:29:21 UTC
(In reply to Orion Poplawski from comment #3)
> So you also get error messages about /var/log/clamav/clamd.log?  So there is
> no "clamd" process?

I think it's easily reproducible if clamav got installed, but the service isn't started. That's the reason the logrotate postrotate command should be standardized to not report error code and even any output.


Note You need to log in before you can comment on or make changes to this bug.