Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: I am not sure if this is a bug, but according to the man page for logrotate, pre/post scripts should only be run for log files that WILL be rotated. If you use wildcards (or list multiple files) the scripts are run even if the log is not rotated. Version-Release number of selected component (if applicable): 3.8.1 How reproducible: Always Steps to Reproduce: 1. Create logrotate configuration with pre/post script(s), that uses a wildcard (or multiple file listings) to match file names. 2. Run logrotate with the configuration. Actual results: Pre/Post scripts are executed for ALL files. Expected results: Pre/Post scripts only executed on files that are rotated. Additional info: Example: /tmp/logs/test*.log { rotate 2 daily size=4k copytruncate missingok compress nosharedscripts prerotate echo $1 endscript postrotate echo $1 endscript } /tmp/logs contains 4 files: test1.log = 2K test2.log = 3K test3.log = 4K test4.log = 5K Executing `logrotate test.cfg`, pre and post scripts will be run for ALL test*.log, not just test3 and test4.
I think this is bug in logrotate, I have fixed it upstream in this commit: https://fedorahosted.org/logrotate/changeset/403 However, I don't presume to fix this in Fedora 17. I will probably fix it in F19.
logrotate-3.8.4-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/logrotate-3.8.4-1.fc19
Package logrotate-3.8.4-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing logrotate-3.8.4-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-7029/logrotate-3.8.4-1.fc19 then log in and leave karma (feedback).
logrotate-3.8.4-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.