Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 309849

Summary: app-admin/logrotate-3.7.8 ignores comments in blocks
Product: Gentoo Linux Reporter: ta2002 <throw_away_2002>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED UPSTREAM    
Severity: minor CC: pchrist
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description ta2002 2010-03-16 20:37:02 UTC
Another bug that falls into the "I can't believe it" category.

From /usr/share/man/man8/logrotate.8.bz2:

"Note that comments may appear anywhere in the config file as long as the first non-whitespace character on the line is a #."

So I have a block:

/var/log/cron {
#    create 0640 cron cron
    create 0640 root cron
    postrotate
        /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
    endscript
}

The purpose of this is a temporary workaround for the syslog bug that will not allow root to write to files owned by other users.

That produces (in /root/dead.letter since I don't have any mailer active) each time logrotate is run:

error: /etc/logrotate.conf:47 duplicate log entry for /var/log/cron
error: found error in /var/log/cron , skipping

Line 47 is the first line of the block.
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-03-23 22:17:47 UTC
I believe that this is an upstream bug, and not something of gentoo's side. I will resolve the bug as UPSTREAM. If you still believe that it's gentoo's specific, reopen the bug, but please apply your emerge --info and emerge -pv logrotate output. Thank you for your report.