summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-09 00:57:28 +0000
committerSam James <sam@gentoo.org>2022-01-09 01:06:31 +0000
commit6024c1700b7d273c4777218d1d43b771702319c2 (patch)
tree99e6ece34419ed25baf97ea8628864063931f9aa /app-admin/logrotate
parentsys-fs/mtools: add 4.0.37 (diff)
downloadgentoo-6024c1700b7d273c4777218d1d43b771702319c2.tar.gz
gentoo-6024c1700b7d273c4777218d1d43b771702319c2.tar.bz2
gentoo-6024c1700b7d273c4777218d1d43b771702319c2.zip
app-admin/logrotate: add 3.19.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/Manifest1
-rw-r--r--app-admin/logrotate/logrotate-3.19.0.ebuild96
2 files changed, 97 insertions, 0 deletions
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
+}