From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4BA7A138334 for ; Wed, 20 Nov 2019 10:15:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9691DE0863; Wed, 20 Nov 2019 10:15:18 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BA77E0863 for ; Wed, 20 Nov 2019 10:15:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7F22534D10A for ; Wed, 20 Nov 2019 10:15:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C978D8A9 for ; Wed, 20 Nov 2019 10:15:14 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1574244515.0d4daf7b471424a0ef04c3fd66901c606aa2337c.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/sysklogd/files/, app-admin/sysklogd/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/sysklogd/files/sysklogd.confd2 app-admin/sysklogd/sysklogd-2.0.ebuild X-VCS-Directories: app-admin/sysklogd/files/ app-admin/sysklogd/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 0d4daf7b471424a0ef04c3fd66901c606aa2337c X-VCS-Branch: master Date: Wed, 20 Nov 2019 10:15:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f875cb6-4255-4813-a97e-28125176a045 X-Archives-Hash: 0324255367696fcc7fda8ed6eba40e4a commit: 0d4daf7b471424a0ef04c3fd66901c606aa2337c Author: Lars Wendler gentoo org> AuthorDate: Wed Nov 20 09:55:27 2019 +0000 Commit: Lars Wendler gentoo 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 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 }