public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/sysklogd/files/, app-admin/sysklogd/
Date: Wed, 20 Nov 2019 10:15:14 +0000 (UTC)	[thread overview]
Message-ID: <1574244515.0d4daf7b471424a0ef04c3fd66901c606aa2337c.polynomial-c@gentoo> (raw)

commit:     0d4daf7b471424a0ef04c3fd66901c606aa2337c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 09:55:27 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 20 10:08:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d4daf7b

app-admin/sysklogd: Use reasonable defaults for syslogd

Respect logrotate USE flag again and inform users about new
built-in log rotation functionality.

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-admin/sysklogd/files/sysklogd.confd2 |  6 ++++++
 app-admin/sysklogd/sysklogd-2.0.ebuild   | 19 ++++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/app-admin/sysklogd/files/sysklogd.confd2 b/app-admin/sysklogd/files/sysklogd.confd2
new file mode 100644
index 00000000000..077f36bf6b6
--- /dev/null
+++ b/app-admin/sysklogd/files/sysklogd.confd2
@@ -0,0 +1,6 @@
+# Config file for /etc/init.d/sysklogd
+
+SYSLOGD="-m 0 -s -s -r 10M:10"
+# send warnings and above to the console
+KLOGD="-c 3 -2"
+

diff --git a/app-admin/sysklogd/sysklogd-2.0.ebuild b/app-admin/sysklogd/sysklogd-2.0.ebuild
index b1caf749a27..cc3f3615e06 100644
--- a/app-admin/sysklogd/sysklogd-2.0.ebuild
+++ b/app-admin/sysklogd/sysklogd-2.0.ebuild
@@ -36,7 +36,6 @@ src_prepare() {
 
 src_configure() {
 	local myeconfargs=(
-		# we have logger from sys-apps/util-linux
 		$(use_with klogd)
 		$(use_with logger)
 		$(use_with systemd systemd $(systemd_get_systemunitdir))
@@ -51,8 +50,22 @@ src_install() {
 	doins syslog.conf
 	keepdir /etc/syslog.d
 
+	newinitd "${FILESDIR}"/sysklogd.rc8 sysklogd
+	newconfd "${FILESDIR}"/sysklogd.confd2 sysklogd
+
+	if use logrotate ; then
+		insinto /etc/logrotate.d
+		newins "${FILESDIR}"/sysklogd.logrotate sysklogd
+		sed 's@ -r 10M:10@@' -i "${ED}"/etc/conf.d/sysklogd || die
+	fi
+
 	find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+}
 
-	newinitd "${FILESDIR}"/sysklogd.rc8 sysklogd
-	newconfd "${FILESDIR}"/sysklogd.confd sysklogd
+pkg_postinst() {
+	if ! use logrotate && [[ -n ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.0 ; then
+		elog "Starting with version 2.0 syslogd has built in log rotation"
+		elog "functionality that does no longer require a running cron daemon."
+		elog "So we no longer install any log rotation cron files for sysklogd."
+	fi
 }


             reply	other threads:[~2019-11-20 10:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 10:15 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-20  7:49 [gentoo-commits] repo/gentoo:master commit in: app-admin/sysklogd/files/, app-admin/sysklogd/ Lars Wendler
2020-01-05 13:17 Lars Wendler
2019-12-09 10:56 Lars Wendler
2019-12-02  9:23 Lars Wendler
2019-11-24 13:25 Lars Wendler
2017-01-17 17:39 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574244515.0d4daf7b471424a0ef04c3fd66901c606aa2337c.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox