[Bug 831072] New: logrotate config files with inconsistent plus signs
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c0 Summary: logrotate config files with inconsistent plus signs Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: All OS/Version: openSUSE 12.3 Status: NEW Severity: Minor Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: wiethoff@tfh-bochum.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0 This is just a cosmetic bug, but might be confusing for some people: Within the /etc/logrotate.d/ are some values declared as: size =+2048k This is kind of misleading because the man page don't know the "=+"-operator and even the source code just parses the value. Reproducible: Always Steps to Reproduce: Install openSUSE and check the config file /etc/logrotate.d/wtmp for example -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c Ye Yuan <yyuan@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yyuan@suse.com AssignedTo|bnc-team-screening@forge.pr |vcizek@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c1 Vitezslav Cizek <vcizek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |vcizek@suse.com --- Comment #1 from Vitezslav Cizek <vcizek@suse.com> 2013-07-30 10:19:40 CEST --- That line gets parsed like this: First the whitespace at the beginning is eaten, then the directive name is read (alphanumeric characters only), then the optional '=' character (again possibly surrounded by whitespace) gets eaten, next the end of the line is found ('\n'), and all the whitespace backwards from the end of the line is eaten. Now only "+2048" string remains. It gets passed to strtoul(3), which accepts number with an optional sign prefix, so the string gets successfully parsed to the number 2048. I think that the '+' sign is there to visually indicate being 2048 or bigger. Someone probably wrote that in the past and it's been carried over ever since. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c2 --- Comment #2 from Helge Wiethoff <wiethoff@tfh-bochum.de> 2013-07-30 08:33:31 UTC --- Hi Vitezslav, yes, i know that this is just a cosmetic thing. But the man-page is very clear in this point: "Log files are rotated only if they grow bigger then _size_ bytes." Im my opinion there is absolutely no need for "=+" and is just confusing a few people... Best regards, Helge -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c3 --- Comment #3 from Vitezslav Cizek <vcizek@suse.com> 2013-07-30 11:05:26 CEST --- There are many other configs in /etc/logrotate.d. On my computer:
grep -l "[ ]*=[ ]*+" /etc/logrotate.d/* /etc/logrotate.d/atftp /etc/logrotate.d/fetchmail /etc/logrotate.d/mcelog /etc/logrotate.d/ntp /etc/logrotate.d/radiusd /etc/logrotate.d/rsync /etc/logrotate.d/samba /etc/logrotate.d/xdm /etc/logrotate.d/xinetd
These files don't belong to logrotate rpm, they are installed by other packages. I suppose there are many others I don't have currently installed. This has to be fixed in all these different packages. So perhaps it would be easier to just mention the '=' and '+' in the manpage, when it's so broadly used. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c4 --- Comment #4 from Helge Wiethoff <wiethoff@tfh-bochum.de> 2013-07-30 09:12:57 UTC --- That would be fine to me ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c5 --- Comment #5 from Vitezslav Cizek <vcizek@suse.com> 2013-07-31 16:09:56 CEST --- I'll add this to the manpage: "Values are separated from directives by whitespace and/or an optional =. Numbers must be specified in a format understood by strtoul(3)." -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c6 Vitezslav Cizek <vcizek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #6 from Vitezslav Cizek <vcizek@suse.com> 2013-08-01 16:00:19 CEST --- Submitted to Factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=831072 https://bugzilla.novell.com/show_bug.cgi?id=831072#c7 --- Comment #7 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-08-02 17:00:41 CEST --- This is an autogenerated message for OBS integration: This bug (831072) was mentioned in https://build.opensuse.org/request/show/185648 Factory / logrotate -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com