Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/
Date: Fri, 08 Jan 2021 14:22:38
Message-Id: 1610115752.74e161f5526f91781854cd508ee274420f53f0bc.polynomial-c@gentoo
1 commit: 74e161f5526f91781854cd508ee274420f53f0bc
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 8 14:21:17 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 8 14:22:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74e161f5
7
8 app-admin/logrotate: Bump to version 3.18.0
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-admin/logrotate/Manifest | 1 +
14 app-admin/logrotate/logrotate-3.18.0.ebuild | 101 ++++++++++++++++++++++++++++
15 2 files changed, 102 insertions(+)
16
17 diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
18 index 5526a34ad4f..4fd48997cd0 100644
19 --- a/app-admin/logrotate/Manifest
20 +++ b/app-admin/logrotate/Manifest
21 @@ -2,3 +2,4 @@ DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9
22 DIST logrotate-3.15.1.tar.gz 220263 BLAKE2B c164c542a0770965f5193f5816509f566b9afeb82ce8388a184d16c2b3e79aa0ef93be10d477c85f62037f01b3e626ea56d3173ca8cf017b8aa315f2e23b1a2b SHA512 72294607762751fb1aaaca1d62ebd87d109d837d50606176159a5e74782a993123321967b7a6185df6ca9c87a54febb832ac7537ceaa580a895901a995570cd5
23 DIST logrotate-3.16.0.tar.gz 221904 BLAKE2B 38bfde57e9e055b86d6f25f0dd7c49b5d35865671926b1f8a2bd703ac8b8b2252d40cc29b0e1440309ecf224c747a99a2eab0ea99c86782559bef797f61fadb8 SHA512 2f2e8ebf9349424f529e4cf35e75036dadb00df84feac6b421b5a558ce015c9b1a22586463cba95a0265c104a559dd236764f7e37707975e626e69cc87e963e2
24 DIST logrotate-3.17.0.tar.gz 224559 BLAKE2B 6d019bafad6986a0b6264893d36a515db75d746dd590afd26825c01c68e9ccf3c260502a29912d75c069ece8715ae14d3c13d4030f6222187be0e1ca05d60e49 SHA512 ada4415ef68ad97c1415fa0c1ba7bf108621777cd91599bf4f999dea1c1025596543aa00fd579cae4d39315b71c4d8f96a9c9d1178f78be7c523470588ab1d31
25 +DIST logrotate-3.18.0.tar.gz 224873 BLAKE2B f73ffa2d58a5125393e6c96e158e39e0b4cadef01e6eebd172220227a7e1363e6731bc2ac511fa028078054b55d42b131cdc30232ac5762ce4c6cbff79c19681 SHA512 d1bca267fbec4acbb83ffba4d3ac4c864f4269d8513e5614e7dbe6f3b1f176685218bffdb5d62f559ee73f84cf9a8a257c9f63e30af058d12d0034240f247586
26
27 diff --git a/app-admin/logrotate/logrotate-3.18.0.ebuild b/app-admin/logrotate/logrotate-3.18.0.ebuild
28 new file mode 100644
29 index 00000000000..8d3aed775a3
30 --- /dev/null
31 +++ b/app-admin/logrotate/logrotate-3.18.0.ebuild
32 @@ -0,0 +1,101 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit systemd
39 +
40 +DESCRIPTION="Rotates, compresses, and mails system logs"
41 +HOMEPAGE="https://github.com/logrotate/logrotate"
42 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
47 +IUSE="acl +cron selinux"
48 +
49 +COMMON_DEPEND="
50 + >=dev-libs/popt-1.5
51 + selinux? ( sys-libs/libselinux )
52 + acl? ( virtual/acl )"
53 +
54 +DEPEND="${COMMON_DEPEND}
55 + >=sys-apps/sed-4"
56 +
57 +RDEPEND="${COMMON_DEPEND}
58 + selinux? ( sec-policy/selinux-logrotate )
59 + cron? ( virtual/cron )"
60 +
61 +STATEFILE="/var/lib/misc/logrotate.status"
62 +OLDSTATEFILE="/var/lib/logrotate.status"
63 +
64 +move_old_state_file() {
65 + elog "logrotate state file is now located at ${STATEFILE}"
66 + elog "See bug #357275"
67 + if [[ -e "${OLDSTATEFILE}" ]] ; then
68 + elog "Moving your current state file to new location: ${STATEFILE}"
69 + mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
70 + fi
71 +}
72 +
73 +install_cron_file() {
74 + exeinto /etc/cron.daily
75 + newexe "${S}"/examples/logrotate.cron "${PN}"
76 +}
77 +
78 +PATCHES=(
79 + "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
80 +)
81 +
82 +src_prepare() {
83 + sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
84 + default
85 +}
86 +
87 +src_configure() {
88 + econf \
89 + $(use_with acl) \
90 + $(use_with selinux) \
91 + --with-state-file-path="${STATEFILE}"
92 +}
93 +
94 +src_test() {
95 + emake test
96 +}
97 +
98 +src_install() {
99 + insinto /usr
100 + dobin logrotate
101 + doman logrotate.8
102 + dodoc ChangeLog.md
103 +
104 + insinto /etc
105 + doins "${FILESDIR}"/logrotate.conf
106 +
107 + use cron && install_cron_file
108 +
109 + systemd_dounit examples/logrotate.{service,timer}
110 + systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
111 +
112 + keepdir /etc/logrotate.d
113 +}
114 +
115 +pkg_postinst() {
116 + elog
117 + elog "The ${PN} binary is now installed under /usr/bin. Please"
118 + elog "update your links"
119 + elog
120 + move_old_state_file
121 + elog "If you are running systemd you might need to run:"
122 + elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
123 + elog "in order to create the new location of the logrotate state file"
124 + elog
125 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
126 + elog "If you wish to have logrotate e-mail you updates, please"
127 + elog "emerge virtual/mailx and configure logrotate in"
128 + elog "/etc/logrotate.conf appropriately"
129 + elog
130 + elog "Additionally, /etc/logrotate.conf may need to be modified"
131 + elog "for your particular needs. See man logrotate for details."
132 + fi
133 +}