summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-24 03:35:50 +0100
committerSam James <sam@gentoo.org>2024-06-24 03:53:36 +0100
commite04ca13b79c8da0b16bf8f181224141979bf9d64 (patch)
treead545fd0f17c1ee3bf36817ff073e9d94680c051 /app-admin
parentsec-keys/openpgp-keys-cgzones: new package, add 20240624 (diff)
downloadgentoo-e04ca13b79c8da0b16bf8f181224141979bf9d64.tar.gz
gentoo-e04ca13b79c8da0b16bf8f181224141979bf9d64.tar.bz2
gentoo-e04ca13b79c8da0b16bf8f181224141979bf9d64.zip
app-admin/logrotate: add 3.22.0
Bug: https://github.com/logrotate/logrotate/issues/576 Bug: https://github.com/logrotate/logrotate/issues/611 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/logrotate/Manifest2
-rw-r--r--app-admin/logrotate/logrotate-3.22.0.ebuild99
2 files changed, 101 insertions, 0 deletions
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 82484df4b0c6..889283fbcb4e 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,2 +1,4 @@
DIST logrotate-3.21.0.tar.xz 168532 BLAKE2B f7fa0050bde51e2517eac8456ecf87648bc8423621830894ceb2a3ff6b9dfe32c5b53df6a4ee59aa91bd563ed94376a635159535f4fdc170fbc673354bcef508 SHA512 c576df7d2bc1a1db2f99befdd0ea627aef2d97bdcd4a7cdea76870623ba92fb1f04f1af6d15b75e4a9085f4aef2ae5e9843c4094cdd01e24d89872ccaf9c0d4a
DIST logrotate-3.21.0.tar.xz.asc 833 BLAKE2B b2099a0b8c15d1ea7f7325884027dff08dcc8305113411448797b8089d17026242a3f10bd6d7f3d865e3e339ec6fb5faf4ff48f8fd65bca3af4da8b335c3b5f1 SHA512 8f4c1853cd84f85c796b72b43048f4cf04e3409703e7669ee91e1d1aa5e9e5c04261fac1cdf85ec303508d5b6dbf126a44eb9ec819bcc772c664830d39e1068c
+DIST logrotate-3.22.0.tar.xz 172108 BLAKE2B c1c9f1ff792905d2917e9ba3cee360c50259e1520e04073cb69abe475499adcf01aeb3cb4c6933af61255fbb5978577c4fdf9d6ab6ebf9568358d2446791c7f3 SHA512 16fd95b4daef779212008c4a968c7a7130be8d550f58531d24fc04599cb9adff6323a745725b3b14d7312ad36cb6646fe33a3defdb5b70cda2cec9646aab066a
+DIST logrotate-3.22.0.tar.xz.asc 833 BLAKE2B 379d4fd71c6161211234903560770cf14a7ddf769b83e76ef27ad96d1204e2f4dc73d1e44aa69401db87c252c4471d5bdbace0555dfbb66c8751c20131a7751f SHA512 93664c45bfe9ea20aedc54fe216825db38eaf81d43b238cd7bf8ea3e03f7d282f53743fb6d914766a9ed0cb5b33376435d253db5b9ec7039facd66e25d349dd4
diff --git a/app-admin/logrotate/logrotate-3.22.0.ebuild b/app-admin/logrotate/logrotate-3.22.0.ebuild
new file mode 100644
index 000000000000..9426d975db21
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.22.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/cgzones.asc
+inherit systemd tmpfiles verify-sig
+
+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.xz"
+SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"
+
+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 )
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-cgzones )"
+
+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_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
+}