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