Bug 723547 - ROT_SIZE criterion is broking
Summary: ROT_SIZE criterion is broking
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-20 14:38 UTC by Michael Schwendt
Modified: 2011-07-26 03:36 UTC (History)
3 users (show)

Fixed In Version: logrotate-3.7.9-13.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-26 03:36:12 UTC
Type: ---


Attachments (Terms of Use)

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.


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