app-admin/rsyslog: fix logrotate for systemd users
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 14 Jul 2018 13:51:52 +0000 (15:51 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 14 Jul 2018 13:52:13 +0000 (15:52 +0200)
Closes: https://bugs.gentoo.org/658842
Package-Manager: Portage-2.3.42, Repoman-2.3.9
RepoMan-Options: --force

app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate [new file with mode: 0644]
app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild [moved from app-admin/rsyslog/rsyslog-8.35.0.ebuild with 99% similarity]
app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild [moved from app-admin/rsyslog/rsyslog-8.36.0.ebuild with 99% similarity]

diff --git a/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate b/app-admin/rsyslog/files/8-stable/rsyslog-r1.logrotate
new file mode 100644 (file)
index 0000000..3a92ba3
--- /dev/null
@@ -0,0 +1,45 @@
+# Uncomment the following directive if you have re-enabled
+# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
+#/var/log/syslog
+#{
+#      rotate 7
+#      daily
+#      missingok
+#      notifempty
+#      delaycompress
+#      compress
+#      postrotate
+#              if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+#                      systemctl kill -s HUP rsyslog.service
+#              else
+#                      test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
+#              fi
+#      endscript
+#}
+
+/var/log/auth.log
+/var/log/cron.log
+/var/log/daemon.log
+/var/log/kern.log
+/var/log/lpr.log
+/var/log/mail.log
+/var/log/news.log
+/var/log/user.log
+/var/log/debug.log
+/var/log/messages
+{
+       rotate 4
+       weekly
+       missingok
+       notifempty
+       compress
+       delaycompress
+       sharedscripts
+       postrotate
+               if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+                       systemctl kill -s HUP rsyslog.service
+               else
+                       test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) 2>&1 1>/dev/null
+               fi
+       endscript
+}
similarity index 99%
rename from app-admin/rsyslog/rsyslog-8.35.0.ebuild
rename to app-admin/rsyslog/rsyslog-8.35.0-r1.ebuild
index c11a69c68deead2365e9b49faed18f6622dd8965..88d35b15d8406876e0eab7d52245832aabffac08 100644 (file)
@@ -320,7 +320,7 @@ src_install() {
        newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
 
        insinto /etc/logrotate.d/
-       newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
+       newins "${FILESDIR}/${BRANCH}/${PN}-r1.logrotate" ${PN}
 
        if use mysql; then
                insinto /usr/share/doc/${PF}/scripts/mysql
similarity index 99%
rename from app-admin/rsyslog/rsyslog-8.36.0.ebuild
rename to app-admin/rsyslog/rsyslog-8.36.0-r1.ebuild
index 023b88252ce1c1e95765acec6d0c1457ee4ca61c..cf864d50b49b359dca8da5988771726d5aa40447 100644 (file)
@@ -329,7 +329,7 @@ src_install() {
        newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
 
        insinto /etc/logrotate.d/
-       newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
+       newins "${FILESDIR}/${BRANCH}/${PN}-r1.logrotate" ${PN}
 
        if use mysql; then
                insinto /usr/share/doc/${PF}/scripts/mysql