sous-chefs / logrotate

Development repository for the logrotate cookbook

Home Page:https://supermarket.chef.io/cookbooks/logrotate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EL 8 /etc/logrotate.d/wtmp and btmp conflict with defaults from cookbook

jblaine opened this issue · comments

EL 8 comes with an /etc/logrotate.d/wtmp and /etc/logrotate.d/btmp. The default global logrotate.conf includes stanzas for wtmp and btmp. The 2 conflict and result in the following error which did not exist on EL 7 or EL 6:

/etc/cron.daily/logrotate:

error: /etc/logrotate.conf:12 duplicate log entry for /var/log/wtmp
error: /etc/logrotate.conf:19 duplicate log entry for /var/log/btmp

In short, the /etc/logrotate.conf on EL 8 should probably look like this:

weekly
rotate 4
create
include /etc/logrotate.d

I intend to fix this and make a PR. The offending generic code is in attributes/default.rb. I intend to case that out so that something appropriate is done for platform_family 'rhel' && platform_version.to_i >= 8. How do you want that implemented? A case block?