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