Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378877 - errors from dspam.logrotate after update to logrotate 3.8.0
Summary: errors from dspam.logrotate after update to logrotate 3.8.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-12 08:15 UTC by Tom Hendrikx
Modified: 2012-08-03 03:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dspam-3.10.1.ebuild (dspam-3.10.1.ebuild,5.89 KB, text/plain)
2011-08-12 15:23 UTC, Eray Aslan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hendrikx 2011-08-12 08:15:33 UTC
Cron mails errors since logrotate was updated to 3.8.0:

error: skipping "/var/log/dspam/bnr.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

Please add the following line to files/dspam.logrotate:

su dspam dspam

However, pre-3.8.0 logrotate barks on unknown config directives. Dependency on logrotate-3.8.0 is also needed, I think (actually, this logrotate version bump is quite ugly :/)
Comment 1 Eray Aslan gentoo-dev 2011-08-12 15:23:46 UTC
Created attachment 283043 [details]
dspam-3.10.1.ebuild

Putting logrotate in *DEPEND is not a good solution either.   Can you please check if the attached ebuild works?  Thank you.
Comment 2 Tom Hendrikx 2011-08-12 22:08:23 UTC
This seems to work, indeed. Much better alternative.
One thing: 'complaining' has a typo  :)
Comment 3 Tom Hendrikx 2011-08-12 22:12:20 UTC
I see one more nitpick on the ebuild (my own error): inside pkg_preinst, I would add the first ewarn about config directory that was moved, inside the first if statement. This hides the warning on cleaned up systems and new installs.

pkg_preinst() {
    # dspam-3.10.0: config dir change, should be removed at some later point
    if [ -d "${ROOT}/etc/mail/dspam" ]; then
        ewarn "The configuration directory of DSPAM has been relocated from ...
Comment 4 Eray Aslan gentoo-dev 2011-08-13 04:21:10 UTC
Both changes committed without a rev bump.  Thank you for testing.

+  13 Aug 2011; Eray Aslan <eras@gentoo.org> dspam-3.10.1.ebuild:
+  stop logwatch from complaining - bug #378877
+
Comment 5 Pavel Goran 2012-08-03 03:41:27 UTC
The implemented solution seems to work only for users that merge dspam for the first time.

For me /var/log/dspam is owned by root:dspam and the permissions are 770, and re-merging dspam doesn't change this. This results in logrotate errors. Maybe the owner and the permissions should be changed in pkg_postinst like it's done in tomcat ebuilds?

Also, now the tree doesn't contain pre-3.8 versions of logrotate, so the logrotate script itself can be modified without causing problems.