diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.conf b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.conf index d25e023858..3f123ecf45 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.conf +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.conf @@ -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. diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.service b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.service new file mode 100644 index 0000000000..bea4790950 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.service @@ -0,0 +1,5 @@ +[Unit] +Description=Rotate and Compress System Logs + +[Service] +ExecStart=/usr/sbin/logrotate /usr/share/logrotate/logrotate.conf diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.tmpfiles b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.tmpfiles index dfb4ab66c1..e0c2f7c293 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.tmpfiles +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.tmpfiles @@ -1 +1,2 @@ d /var/lib/misc +d /etc/logrotate.d - - - - - diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/logrotate-3.18.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/logrotate-3.18.1-r1.ebuild index 2d5867e5be..2eaed6ffe8 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/logrotate-3.18.1-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/logrotate-3.18.1-r1.ebuild @@ -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