Bug 723547

Summary: ROT_SIZE criterion is broking
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: goeran, jkaluza, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: logrotate-3.7.9-13.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-26 03:36:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Schwendt 2011-07-20 14:38:18 UTC
In reply to bug 722794 comment 2, where dracut's log file only rotates "yearly" and not for "size 30k".

Please proofread the source code, file config.c method readConfigFile(..) where it parses size and minsize options. It overwrites the "key" variable with the option's value (!) and then still tries to compare the value with the "size" string to enable the ROT_SIZE rotation criterium.

$ rpm -q logrotate
logrotate-3.7.9-12.fc15.x86_64

Comment 1 Michael Schwendt 2011-07-20 14:46:30 UTC
Example: For dracut's logrotate config file and

   size 30k

the code overwrites "key" with "30" and then does

   if (!strncmp(key, "size", 4)) {

which fails.

Comment 2 Michael Schwendt 2011-07-20 21:52:15 UTC
Introduced in 3.7.9.

Comment 3 Jan Kaluža 2011-07-21 05:09:37 UTC
Thanks, I will fix it upstream and backport the fix to F15

Comment 4 Michael Schwendt 2011-07-21 09:04:08 UTC
The spelling in the source code is "criterium", that's why I had used that in the bug summary, too.

Comment 5 Fedora Update System 2011-07-22 09:04:19 UTC
logrotate-3.7.9-13.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/logrotate-3.7.9-13.fc15

Comment 6 Fedora Update System 2011-07-23 02:06:33 UTC
Package logrotate-3.7.9-13.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing logrotate-3.7.9-13.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/logrotate-3.7.9-13.fc15
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-07-26 03:36:01 UTC
logrotate-3.7.9-13.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.