1 |
commit: 32aec47551db79340d234672d6ac6c33b870abba |
2 |
Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 14 17:02:45 2017 +0000 |
4 |
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 14 17:03:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32aec475 |
7 |
|
8 |
app-admin/logrotate: Bumps version to 3.13.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
app-admin/logrotate/Manifest | 1 + |
13 |
.../logrotate/files/logrotate-3.13.0-fbsd.patch | 36 ++++++++ |
14 |
.../files/logrotate-3.13.0-ignore-hidden.patch | 14 +++ |
15 |
app-admin/logrotate/logrotate-3.13.0.ebuild | 99 ++++++++++++++++++++++ |
16 |
4 files changed, 150 insertions(+) |
17 |
|
18 |
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest |
19 |
index 7878d432a5c..f43f755b54c 100644 |
20 |
--- a/app-admin/logrotate/Manifest |
21 |
+++ b/app-admin/logrotate/Manifest |
22 |
@@ -1,4 +1,5 @@ |
23 |
DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858 |
24 |
DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482 |
25 |
DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77 |
26 |
+DIST logrotate-3.13.0.tar.gz 213726 SHA256 2ea33f69176dd2668fb85307210d7ed0411ff2a0429e4a0a2d881e740160e4b0 SHA512 3dec2fcdd674d3337b71fd70339cb5e3dd06b4bc24bee191356a30c2a211a290ae7747e63b90581e32a6d6d1f73cf62d5b0ee5a91aa05bad4d6ee403a35d9e76 WHIRLPOOL 952c5eda18870876ea5109d4c5ae7ac1048d3ea07c89b4a0320a48baa8170fbc200f5b4a1cc193da0f6b0e1ef8dbdcdb82f74f23d4f12e5a19bb98650c1e7d5a |
27 |
DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17 |
28 |
|
29 |
diff --git a/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..028dc0551f1 |
32 |
--- /dev/null |
33 |
+++ b/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch |
34 |
@@ -0,0 +1,36 @@ |
35 |
+diff -Nuar a/config.c b/config.c |
36 |
+--- a/config.c 2017-10-14 18:52:56.829467653 +0200 |
37 |
++++ b/config.c 2017-10-14 18:54:57.049467139 +0200 |
38 |
+@@ -25,6 +25,10 @@ |
39 |
+ #include <sys/mman.h> |
40 |
+ #include <libgen.h> |
41 |
+ |
42 |
++#if !defined(PATH_MAX) && defined(__FreeBSD__) |
43 |
++#include <sys/param.h> |
44 |
++#endif |
45 |
++ |
46 |
+ #include "log.h" |
47 |
+ #include "logrotate.h" |
48 |
+ |
49 |
+diff -Nuar a/logrotate.c b/logrotate.c |
50 |
+--- a/logrotate.c 2017-10-12 17:19:41.000000000 +0200 |
51 |
++++ b/logrotate.c 2017-10-14 18:56:23.419466769 +0200 |
52 |
+@@ -1,6 +1,6 @@ |
53 |
+ #include "queue.h" |
54 |
+ /* alloca() is defined in stdlib.h in NetBSD */ |
55 |
+-#ifndef __NetBSD__ |
56 |
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) |
57 |
+ #include <alloca.h> |
58 |
+ #endif |
59 |
+ #include <limits.h> |
60 |
+@@ -27,6 +27,10 @@ |
61 |
+ #include <limits.h> |
62 |
+ #endif |
63 |
+ |
64 |
++#if !defined(PATH_MAX) && defined(__FreeBSD__) |
65 |
++#include <sys/param.h> |
66 |
++#endif |
67 |
++ |
68 |
+ #include "log.h" |
69 |
+ #include "logrotate.h" |
70 |
+ |
71 |
|
72 |
diff --git a/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..f3ade248d38 |
75 |
--- /dev/null |
76 |
+++ b/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch |
77 |
@@ -0,0 +1,14 @@ |
78 |
+diff -Nuar a/config.c b/config.c |
79 |
+--- a/config.c 2017-10-12 16:05:41.000000000 +0200 |
80 |
++++ b/config.c 2017-10-14 18:52:56.829467653 +0200 |
81 |
+@@ -432,7 +432,9 @@ |
82 |
+ int i; |
83 |
+ |
84 |
+ /* Check if fname is '.' or '..'; if so, return false */ |
85 |
+- if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) |
86 |
++ /* Don't include 'hidden' files either; this breaks Gentoo |
87 |
++ portage config file management http://bugs.gentoo.org/87683 */ |
88 |
++ if (fname[0] == '.') |
89 |
+ return 0; |
90 |
+ |
91 |
+ /* Check if fname is ending in a taboo-extension; if so, return false */ |
92 |
|
93 |
diff --git a/app-admin/logrotate/logrotate-3.13.0.ebuild b/app-admin/logrotate/logrotate-3.13.0.ebuild |
94 |
new file mode 100644 |
95 |
index 00000000000..f0661a39594 |
96 |
--- /dev/null |
97 |
+++ b/app-admin/logrotate/logrotate-3.13.0.ebuild |
98 |
@@ -0,0 +1,99 @@ |
99 |
+# Copyright 1999-2017 Gentoo Foundation |
100 |
+# Distributed under the terms of the GNU General Public License v2 |
101 |
+ |
102 |
+EAPI=6 |
103 |
+ |
104 |
+inherit systemd |
105 |
+ |
106 |
+DESCRIPTION="Rotates, compresses, and mails system logs" |
107 |
+HOMEPAGE="https://github.com/logrotate/logrotate" |
108 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz" |
109 |
+ |
110 |
+LICENSE="GPL-2" |
111 |
+SLOT="0" |
112 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
113 |
+IUSE="acl +cron selinux" |
114 |
+ |
115 |
+CDEPEND=" |
116 |
+ >=dev-libs/popt-1.5 |
117 |
+ selinux? ( sys-libs/libselinux ) |
118 |
+ acl? ( virtual/acl )" |
119 |
+ |
120 |
+DEPEND="${CDEPEND} |
121 |
+ >=sys-apps/sed-4" |
122 |
+ |
123 |
+RDEPEND="${CDEPEND} |
124 |
+ selinux? ( sec-policy/selinux-logrotate ) |
125 |
+ cron? ( virtual/cron )" |
126 |
+ |
127 |
+STATEFILE="/var/lib/misc/logrotate.status" |
128 |
+OLDSTATEFILE="/var/lib/logrotate.status" |
129 |
+ |
130 |
+move_old_state_file() { |
131 |
+ elog "logrotate state file is now located at ${STATEFILE}" |
132 |
+ elog "See bug #357275" |
133 |
+ if [[ -e "${OLDSTATEFILE}" ]] ; then |
134 |
+ elog "Moving your current state file to new location: ${STATEFILE}" |
135 |
+ mv -n "${OLDSTATEFILE}" "${STATEFILE}" |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+install_cron_file() { |
140 |
+ exeinto /etc/cron.daily |
141 |
+ newexe "${S}"/examples/logrotate.cron "${PN}" |
142 |
+} |
143 |
+ |
144 |
+PATCHES=( |
145 |
+ "${FILESDIR}/${P}-ignore-hidden.patch" |
146 |
+ "${FILESDIR}/${P}-fbsd.patch" |
147 |
+) |
148 |
+ |
149 |
+src_prepare() { |
150 |
+ default |
151 |
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die |
152 |
+} |
153 |
+ |
154 |
+src_configure() { |
155 |
+ econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}" |
156 |
+} |
157 |
+ |
158 |
+src_test() { |
159 |
+ emake test |
160 |
+} |
161 |
+ |
162 |
+src_install() { |
163 |
+ insinto /usr |
164 |
+ dobin logrotate |
165 |
+ doman logrotate.8 |
166 |
+ dodoc ChangeLog.md examples/logrotate-default |
167 |
+ |
168 |
+ insinto /etc |
169 |
+ doins "${FILESDIR}"/logrotate.conf |
170 |
+ |
171 |
+ use cron && install_cron_file |
172 |
+ |
173 |
+ systemd_dounit examples/logrotate.{service,timer} |
174 |
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf |
175 |
+ |
176 |
+ keepdir /etc/logrotate.d |
177 |
+} |
178 |
+ |
179 |
+pkg_postinst() { |
180 |
+ elog |
181 |
+ elog "The ${PN} binary is now installed under /usr/bin. Please" |
182 |
+ elog "update your links" |
183 |
+ elog |
184 |
+ move_old_state_file |
185 |
+ elog "If you are running systemd you might need to run:" |
186 |
+ elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf" |
187 |
+ elog "in order to create the new location of the logrotate state file" |
188 |
+ elog |
189 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
190 |
+ elog "If you wish to have logrotate e-mail you updates, please" |
191 |
+ elog "emerge virtual/mailx and configure logrotate in" |
192 |
+ elog "/etc/logrotate.conf appropriately" |
193 |
+ elog |
194 |
+ elog "Additionally, /etc/logrotate.conf may need to be modified" |
195 |
+ elog "for your particular needs. See man logrotate for details." |
196 |
+ fi |
197 |
+} |