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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1D155158088 for ; Sun, 9 Jan 2022 01:06:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8B922BC04E; Sun, 9 Jan 2022 01:06:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D6A52BC051 for ; Sun, 9 Jan 2022 01:06:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E19DA342BE2 for ; Sun, 9 Jan 2022 01:06:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D327287 for ; Sun, 9 Jan 2022 01:06:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1641690391.6024c1700b7d273c4777218d1d43b771702319c2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/logrotate/Manifest app-admin/logrotate/logrotate-3.19.0.ebuild X-VCS-Directories: app-admin/logrotate/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6024c1700b7d273c4777218d1d43b771702319c2 X-VCS-Branch: master Date: Sun, 9 Jan 2022 01:06:43 +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: 82e173b4-c3d1-4016-b997-95788c3d08c3 X-Archives-Hash: eed794a7dcc3fe0bc5a7819778f13aa6 commit: 6024c1700b7d273c4777218d1d43b771702319c2 Author: Sam James gentoo org> AuthorDate: Sun Jan 9 00:57:28 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jan 9 01:06:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6024c170 app-admin/logrotate: add 3.19.0 Signed-off-by: Sam James gentoo.org> app-admin/logrotate/Manifest | 1 + app-admin/logrotate/logrotate-3.19.0.ebuild | 96 +++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest index 0d34971c6277..467344c959b2 100644 --- a/app-admin/logrotate/Manifest +++ b/app-admin/logrotate/Manifest @@ -1 +1,2 @@ DIST logrotate-3.18.1.tar.gz 225226 BLAKE2B 6f40dfe89f9c6202263f16204a9cff07b921abc9a298b58649bb4968c9f498626741be334c47d4092da564ed75642b687ff6ef8781f69f5e25364f8635646d9d SHA512 c40f920686aee014c652f087c64f2a85e9e866a8717d1bd3f32a9dd7959a02962e6174de28ae685428b442e12079d0c8d91485611ca34a873ffae872a54ec9fe +DIST logrotate-3.19.0.tar.gz 228089 BLAKE2B aa5e932fe2056d150cc632134d80e160883b62e9f92a010bd5f5cded40a0362e28b966d006305b07030a8b07eb35a8e0c5b65b8d4bc87c278286b326cced1c46 SHA512 68bca961608565687a9ccb18e72f0627b405aff95286e508fdc78926d2cc172c56e1523a24ca81a161f683c2d568312984e2757edd291d144e0e4b982433e119 diff --git a/app-admin/logrotate/logrotate-3.19.0.ebuild b/app-admin/logrotate/logrotate-3.19.0.ebuild new file mode 100644 index 000000000000..00e473b5ae60 --- /dev/null +++ b/app-admin/logrotate/logrotate-3.19.0.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd tmpfiles + +DESCRIPTION="Rotates, compresses, and mails system logs" +HOMEPAGE="https://github.com/logrotate/logrotate" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl +cron selinux" + +DEPEND=">=dev-libs/popt-1.5 + selinux? ( sys-libs/libselinux ) + acl? ( virtual/acl )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-logrotate ) + cron? ( virtual/cron )" + +STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status" +OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status" + +PATCHES=( + "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch" +) + +move_old_state_file() { + elog "logrotate state file is now located at ${STATEFILE}" + elog "See bug #357275" + if [[ -e "${OLDSTATEFILE}" ]] ; then + elog "Moving your current state file to new location: ${STATEFILE}" + mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die + fi +} + +install_cron_file() { + exeinto /etc/cron.daily + newexe "${S}"/examples/logrotate.cron "${PN}" +} + +src_prepare() { + default + + sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die +} + +src_configure() { + econf \ + $(use_with acl) \ + $(use_with selinux) \ + --with-state-file-path="${STATEFILE}" +} + +src_test() { + emake test +} + +src_install() { + dobin logrotate + doman logrotate.8 + dodoc ChangeLog.md + + insinto /etc + doins "${FILESDIR}"/logrotate.conf + + use cron && install_cron_file + + systemd_dounit examples/logrotate.{service,timer} + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf + + keepdir /etc/logrotate.d +} + +pkg_postinst() { + elog + elog "The ${PN} binary is now installed under /usr/bin. Please" + elog "update your links" + elog + + move_old_state_file + + tmpfiles_process ${PN}.conf + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "If you wish to have logrotate e-mail you updates, please" + elog "emerge virtual/mailx and configure logrotate in" + elog "/etc/logrotate.conf appropriately" + elog + elog "Additionally, /etc/logrotate.conf may need to be modified" + elog "for your particular needs. See man logrotate for details." + fi +}