Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
Date: Sun, 02 Jul 2017 14:09:23
Message-Id: 1499004553.f902818573513baad78ba32fb46ca7946ffd8d03.nimiux@gentoo
1 commit: f902818573513baad78ba32fb46ca7946ffd8d03
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 2 14:08:26 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 2 14:09:13 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9028185
7
8 app-admin/logrotate: Bumps version to 3.12.3 and fixes some bugs.
9
10 Bug: https://bugs.gentoo.org/show_bug.cgi?id=525418
11 Bug: https://bugs.gentoo.org/show_bug.cgi?id=621850
12 Closes: https://github.com/gentoo/gentoo/pull/4994
13
14 Package-Manager: Portage-2.3.6, Repoman-2.3.1
15
16 app-admin/logrotate/Manifest | 1 +
17 .../logrotate/files/logrotate-3.12.3-fbsd.patch | 36 +++++++++
18 .../files/logrotate-3.12.3-ignore-hidden.patch | 14 ++++
19 app-admin/logrotate/logrotate-3.12.3.ebuild | 88 ++++++++++++++++++++++
20 app-admin/logrotate/metadata.xml | 1 +
21 5 files changed, 140 insertions(+)
22
23 diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
24 index 071199755e3..ff140485d8e 100644
25 --- a/app-admin/logrotate/Manifest
26 +++ b/app-admin/logrotate/Manifest
27 @@ -1,4 +1,5 @@
28 DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
29 DIST logrotate-3.12.1.tar.gz 202420 SHA256 2f439241355cab306ed6b2e6c9450347a35806ee0377d86ef0eb1048ab3969a2 SHA512 3d84c835be9b3a394f5c0e6abd2519d572e4e2c49f807a31f94894adc0908457cdb3e33cb832f34febc25ce8e34be1e7091b489c14e84c59d58ad42787f91b16 WHIRLPOOL 282c98e66d5a723dcdbbf1ec20b0196e56523a7f3a05a9071ac56c841e88f1745fa35af78f43171e3e1de4c76566537a844e05f305373b5da28f83099ff4e27b
30 DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
31 +DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77
32 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17
33
34 diff --git a/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
35 new file mode 100644
36 index 00000000000..67a60e3af17
37 --- /dev/null
38 +++ b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
39 @@ -0,0 +1,36 @@
40 +diff -Nuar a/config.c b/config.c
41 +--- a/config.c 2017-04-22 23:46:08.201991730 +0200
42 ++++ b/config.c 2017-04-22 23:49:43.021996055 +0200
43 +@@ -25,6 +25,10 @@
44 + #include <sys/mman.h>
45 + #include <libgen.h>
46 +
47 ++#if !defined(PATH_MAX) && defined(__FreeBSD__)
48 ++#include <sys/param.h>
49 ++#endif
50 ++
51 + #include "log.h"
52 + #include "logrotate.h"
53 +
54 +diff -Nuar a/logrotate.c b/logrotate.c
55 +--- a/logrotate.c 2017-04-21 10:52:10.000000000 +0200
56 ++++ b/logrotate.c 2017-04-22 23:50:20.691996814 +0200
57 +@@ -1,6 +1,6 @@
58 + #include "queue.h"
59 + /* alloca() is defined in stdlib.h in NetBSD */
60 +-#ifndef __NetBSD__
61 ++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
62 + #include <alloca.h>
63 + #endif
64 + #include <limits.h>
65 +@@ -27,6 +27,10 @@
66 + #include <limits.h>
67 + #endif
68 +
69 ++#if !defined(PATH_MAX) && defined(__FreeBSD__)
70 ++#include <sys/param.h>
71 ++#endif
72 ++
73 + #include "log.h"
74 + #include "logrotate.h"
75 +
76
77 diff --git a/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
78 new file mode 100644
79 index 00000000000..0bbb91dcb4f
80 --- /dev/null
81 +++ b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
82 @@ -0,0 +1,14 @@
83 +diff -Nuar a/config.c b/config.c
84 +--- a/config.c 2017-04-18 14:57:02.000000000 +0200
85 ++++ b/config.c 2017-04-22 23:46:08.201991730 +0200
86 +@@ -389,7 +389,9 @@
87 + int i;
88 +
89 + /* Check if fname is '.' or '..'; if so, return false */
90 +- if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
91 ++ /* Don't include 'hidden' files either; this breaks Gentoo
92 ++ portage config file management http://bugs.gentoo.org/87683 */
93 ++ if (fname[0] == '.')
94 + return 0;
95 +
96 + /* Check if fname is ending in a taboo-extension; if so, return false */
97
98 diff --git a/app-admin/logrotate/logrotate-3.12.3.ebuild b/app-admin/logrotate/logrotate-3.12.3.ebuild
99 new file mode 100644
100 index 00000000000..d455e749b40
101 --- /dev/null
102 +++ b/app-admin/logrotate/logrotate-3.12.3.ebuild
103 @@ -0,0 +1,88 @@
104 +# Copyright 1999-2017 Gentoo Foundation
105 +# Distributed under the terms of the GNU General Public License v2
106 +
107 +EAPI=6
108 +
109 +inherit systemd
110 +
111 +DESCRIPTION="Rotates, compresses, and mails system logs"
112 +HOMEPAGE="https://github.com/logrotate/logrotate"
113 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
114 +
115 +LICENSE="GPL-2"
116 +SLOT="0"
117 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
118 +IUSE="acl +cron selinux bzip2"
119 +
120 +CDEPEND="
121 + >=dev-libs/popt-1.5
122 + selinux? ( sys-libs/libselinux )
123 + acl? ( virtual/acl )"
124 +
125 +DEPEND="${CDEPEND}
126 + >=sys-apps/sed-4"
127 +
128 +RDEPEND="${CDEPEND}
129 + selinux? ( sec-policy/selinux-logrotate )
130 + cron? ( virtual/cron )
131 + bzip2? ( app-arch/bzip2 )"
132 +
133 +install_cron_file() {
134 + exeinto /etc/cron.daily
135 + newexe "${S}"/examples/logrotate.cron "${PN}"
136 +}
137 +
138 +PATCHES=(
139 + "${FILESDIR}/${P}-ignore-hidden.patch"
140 + "${FILESDIR}/${P}-fbsd.patch"
141 +)
142 +
143 +src_prepare() {
144 + default
145 + sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
146 +}
147 +
148 +src_configure() {
149 + if use bzip2 ; then
150 + compressconf="--with-compress-command=/bin/bzip2 --with-uncompress-command=/bin/bunzip2 --with-compress-extension=.bz2"
151 + fi
152 + econf $(use_with acl) $(use_with selinux) ${compressconf}
153 +}
154 +
155 +src_compile() {
156 + emake RPM_OPT_FLAGS="${CFLAGS}"
157 +}
158 +
159 +src_test() {
160 + emake test
161 +}
162 +
163 +src_install() {
164 + insinto /usr
165 + dobin logrotate
166 + doman logrotate.8
167 + dodoc ChangeLog.md examples/logrotate-default
168 +
169 + insinto /etc
170 + doins "${FILESDIR}"/logrotate.conf
171 +
172 + use cron && install_cron_file
173 +
174 + systemd_dounit examples/logrotate.{service,timer}
175 +
176 + keepdir /etc/logrotate.d
177 +}
178 +
179 +pkg_postinst() {
180 + elog "The ${PN} binary is now installed under /usr/bin. Please"
181 + elog "update your links"
182 + elog
183 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
184 + elog "If you wish to have logrotate e-mail you updates, please"
185 + elog "emerge virtual/mailx and configure logrotate in"
186 + elog "/etc/logrotate.conf appropriately"
187 + elog
188 + elog "Additionally, /etc/logrotate.conf may need to be modified"
189 + elog "for your particular needs. See man logrotate for details."
190 + fi
191 +}
192
193 diff --git a/app-admin/logrotate/metadata.xml b/app-admin/logrotate/metadata.xml
194 index e5648d41d70..de61486807a 100644
195 --- a/app-admin/logrotate/metadata.xml
196 +++ b/app-admin/logrotate/metadata.xml
197 @@ -22,6 +22,7 @@
198 <flag name="acl">Installs acl support</flag>
199 <flag name="cron">Installs cron file</flag>
200 <flag name="selinux">Installs Security Enhanced Linux support</flag>
201 + <flag name="bzip2">Compresses rotated log files with bzip2 instead of gzip</flag>
202 </use>
203 <upstream>
204 <remote-id type="github">logrotate/logrotate</remote-id>