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 :/)
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.
This seems to work, indeed. Much better alternative. One thing: 'complaining' has a typo :)
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 ...
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 +
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.