Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/
Date: Fri, 31 Jul 2020 16:07:07
Message-Id: 1596211620.879cf325b6a906fafbf03040cd64de59c727095e.zlogene@gentoo
1 commit: 879cf325b6a906fafbf03040cd64de59c727095e
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 31 16:06:31 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 31 16:07:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=879cf325
7
8 app-admin/logrotate: Version bump (v3.17.0)
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 app-admin/logrotate/Manifest | 1 +
14 app-admin/logrotate/logrotate-3.17.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 95a51dd7fef..5526a34ad4f 100644
19 --- a/app-admin/logrotate/Manifest
20 +++ b/app-admin/logrotate/Manifest
21 @@ -1,3 +1,4 @@
22 DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9e65ebfcb190ebb4287c875af53204cbecb51c2731a3dc57530a30c685c3a626074265d9a2462714ff6ff077ea5ca SHA512 5f584d9be01737960eaffcf43746270a5395486d2161577a9ee3e757cb4dfe5a207c8b1d097181dd413560d76ecc0e3d526f87d1b123a52dc3e5e49d529a5fb5
23 DIST logrotate-3.15.1.tar.gz 220263 BLAKE2B c164c542a0770965f5193f5816509f566b9afeb82ce8388a184d16c2b3e79aa0ef93be10d477c85f62037f01b3e626ea56d3173ca8cf017b8aa315f2e23b1a2b SHA512 72294607762751fb1aaaca1d62ebd87d109d837d50606176159a5e74782a993123321967b7a6185df6ca9c87a54febb832ac7537ceaa580a895901a995570cd5
24 DIST logrotate-3.16.0.tar.gz 221904 BLAKE2B 38bfde57e9e055b86d6f25f0dd7c49b5d35865671926b1f8a2bd703ac8b8b2252d40cc29b0e1440309ecf224c747a99a2eab0ea99c86782559bef797f61fadb8 SHA512 2f2e8ebf9349424f529e4cf35e75036dadb00df84feac6b421b5a558ce015c9b1a22586463cba95a0265c104a559dd236764f7e37707975e626e69cc87e963e2
25 +DIST logrotate-3.17.0.tar.gz 224559 BLAKE2B 6d019bafad6986a0b6264893d36a515db75d746dd590afd26825c01c68e9ccf3c260502a29912d75c069ece8715ae14d3c13d4030f6222187be0e1ca05d60e49 SHA512 ada4415ef68ad97c1415fa0c1ba7bf108621777cd91599bf4f999dea1c1025596543aa00fd579cae4d39315b71c4d8f96a9c9d1178f78be7c523470588ab1d31
26
27 diff --git a/app-admin/logrotate/logrotate-3.17.0.ebuild b/app-admin/logrotate/logrotate-3.17.0.ebuild
28 new file mode 100644
29 index 00000000000..b63b513c2ef
30 --- /dev/null
31 +++ b/app-admin/logrotate/logrotate-3.17.0.ebuild
32 @@ -0,0 +1,101 @@
33 +# Copyright 1999-2020 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 +}