app-admin/logrotate: Apply Flatcar modifications

This commit is contained in:
Aniruddha Basak 2021-10-28 16:03:42 +00:00
parent 49bcee9ae7
commit 770a3a48d4
4 changed files with 14 additions and 20 deletions

View File

@ -1,13 +1,5 @@
#
# Default logrotate(8) configuration file for Gentoo Linux.
# See "man logrotate" for details.
# rotate log files weekly.
weekly
#daily
# keep 4 weeks worth of backlogs.
rotate 4
# keep only the most recent old log.
rotate 1
# create new (empty) log files after rotating old ones.
create
@ -18,25 +10,20 @@ dateext
# compress rotated log files.
compress
missingok
notifempty
nomail
noolddir
# packages can drop log rotation information into this directory.
# accept user provided configuration files in /etc.
include /etc/logrotate.d
# no packages own wtmp and btmp -- we'll rotate them here.
# must match creation rules in /usr/lib/tmpfiles.d/var.conf
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
size 1M
}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
size 1M
}
# system-specific logs may also be configured here.

View File

@ -0,0 +1,5 @@
[Unit]
Description=Rotate and Compress System Logs
[Service]
ExecStart=/usr/sbin/logrotate /usr/share/logrotate/logrotate.conf

View File

@ -1 +1,2 @@
d /var/lib/misc
d /etc/logrotate.d - - - - -

View File

@ -70,6 +70,7 @@ src_install() {
use cron && install_cron_file
systemd_dounit examples/logrotate.{service,timer}
systemd_enable_service multi-user.target logrotate.timer
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
keepdir /etc/logrotate.d