1 |
commit: 6024c1700b7d273c4777218d1d43b771702319c2 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 9 00:57:28 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 9 01:06:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6024c170 |
7 |
|
8 |
app-admin/logrotate: add 3.19.0 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
app-admin/logrotate/Manifest | 1 + |
13 |
app-admin/logrotate/logrotate-3.19.0.ebuild | 96 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 97 insertions(+) |
15 |
|
16 |
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest |
17 |
index 0d34971c6277..467344c959b2 100644 |
18 |
--- a/app-admin/logrotate/Manifest |
19 |
+++ b/app-admin/logrotate/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST logrotate-3.18.1.tar.gz 225226 BLAKE2B 6f40dfe89f9c6202263f16204a9cff07b921abc9a298b58649bb4968c9f498626741be334c47d4092da564ed75642b687ff6ef8781f69f5e25364f8635646d9d SHA512 c40f920686aee014c652f087c64f2a85e9e866a8717d1bd3f32a9dd7959a02962e6174de28ae685428b442e12079d0c8d91485611ca34a873ffae872a54ec9fe |
22 |
+DIST logrotate-3.19.0.tar.gz 228089 BLAKE2B aa5e932fe2056d150cc632134d80e160883b62e9f92a010bd5f5cded40a0362e28b966d006305b07030a8b07eb35a8e0c5b65b8d4bc87c278286b326cced1c46 SHA512 68bca961608565687a9ccb18e72f0627b405aff95286e508fdc78926d2cc172c56e1523a24ca81a161f683c2d568312984e2757edd291d144e0e4b982433e119 |
23 |
|
24 |
diff --git a/app-admin/logrotate/logrotate-3.19.0.ebuild b/app-admin/logrotate/logrotate-3.19.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..00e473b5ae60 |
27 |
--- /dev/null |
28 |
+++ b/app-admin/logrotate/logrotate-3.19.0.ebuild |
29 |
@@ -0,0 +1,96 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+inherit systemd tmpfiles |
36 |
+ |
37 |
+DESCRIPTION="Rotates, compresses, and mails system logs" |
38 |
+HOMEPAGE="https://github.com/logrotate/logrotate" |
39 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
44 |
+IUSE="acl +cron selinux" |
45 |
+ |
46 |
+DEPEND=">=dev-libs/popt-1.5 |
47 |
+ selinux? ( sys-libs/libselinux ) |
48 |
+ acl? ( virtual/acl )" |
49 |
+RDEPEND="${DEPEND} |
50 |
+ selinux? ( sec-policy/selinux-logrotate ) |
51 |
+ cron? ( virtual/cron )" |
52 |
+ |
53 |
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status" |
54 |
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status" |
55 |
+ |
56 |
+PATCHES=( |
57 |
+ "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch" |
58 |
+) |
59 |
+ |
60 |
+move_old_state_file() { |
61 |
+ elog "logrotate state file is now located at ${STATEFILE}" |
62 |
+ elog "See bug #357275" |
63 |
+ if [[ -e "${OLDSTATEFILE}" ]] ; then |
64 |
+ elog "Moving your current state file to new location: ${STATEFILE}" |
65 |
+ mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die |
66 |
+ fi |
67 |
+} |
68 |
+ |
69 |
+install_cron_file() { |
70 |
+ exeinto /etc/cron.daily |
71 |
+ newexe "${S}"/examples/logrotate.cron "${PN}" |
72 |
+} |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ default |
76 |
+ |
77 |
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die |
78 |
+} |
79 |
+ |
80 |
+src_configure() { |
81 |
+ econf \ |
82 |
+ $(use_with acl) \ |
83 |
+ $(use_with selinux) \ |
84 |
+ --with-state-file-path="${STATEFILE}" |
85 |
+} |
86 |
+ |
87 |
+src_test() { |
88 |
+ emake test |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ dobin logrotate |
93 |
+ doman logrotate.8 |
94 |
+ dodoc ChangeLog.md |
95 |
+ |
96 |
+ insinto /etc |
97 |
+ doins "${FILESDIR}"/logrotate.conf |
98 |
+ |
99 |
+ use cron && install_cron_file |
100 |
+ |
101 |
+ systemd_dounit examples/logrotate.{service,timer} |
102 |
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf |
103 |
+ |
104 |
+ keepdir /etc/logrotate.d |
105 |
+} |
106 |
+ |
107 |
+pkg_postinst() { |
108 |
+ elog |
109 |
+ elog "The ${PN} binary is now installed under /usr/bin. Please" |
110 |
+ elog "update your links" |
111 |
+ elog |
112 |
+ |
113 |
+ move_old_state_file |
114 |
+ |
115 |
+ tmpfiles_process ${PN}.conf |
116 |
+ |
117 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
118 |
+ elog "If you wish to have logrotate e-mail you updates, please" |
119 |
+ elog "emerge virtual/mailx and configure logrotate in" |
120 |
+ elog "/etc/logrotate.conf appropriately" |
121 |
+ elog |
122 |
+ elog "Additionally, /etc/logrotate.conf may need to be modified" |
123 |
+ elog "for your particular needs. See man logrotate for details." |
124 |
+ fi |
125 |
+} |