1 |
flameeyes 12/07/30 15:16:43 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: munin-2.0.4.ebuild |
5 |
Removed: munin-2.0.3-r1.ebuild munin-2.0.3.ebuild |
6 |
Log: |
7 |
Version bump; this version includes most of the previously applied patches, but gets rid of freeipmi_ as a separate plugin (now it takes the place of ipmi_ itself). |
8 |
|
9 |
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.87 net-analyzer/munin/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/ChangeLog?rev=1.87&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/ChangeLog?rev=1.87&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/ChangeLog?r1=1.86&r2=1.87 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v |
21 |
retrieving revision 1.86 |
22 |
retrieving revision 1.87 |
23 |
diff -u -r1.86 -r1.87 |
24 |
--- ChangeLog 29 Jul 2012 03:53:20 -0000 1.86 |
25 |
+++ ChangeLog 30 Jul 2012 15:16:43 -0000 1.87 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for net-analyzer/munin |
28 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.86 2012/07/29 03:53:20 flameeyes Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.87 2012/07/30 15:16:43 flameeyes Exp $ |
31 |
+ |
32 |
+*munin-2.0.4 (30 Jul 2012) |
33 |
+ |
34 |
+ 30 Jul 2012; Diego E. Pettenò <flameeyes@g.o> +munin-2.0.4.ebuild, |
35 |
+ -munin-2.0.3-r1.ebuild, -munin-2.0.3.ebuild: |
36 |
+ Version bump; this version includes most of the previously applied patches, |
37 |
+ but gets rid of freeipmi_ as a separate plugin (now it takes the place of |
38 |
+ ipmi_ itself). |
39 |
|
40 |
*munin-2.0.3-r1 (29 Jul 2012) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.1 net-analyzer/munin/munin-2.0.4.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/munin-2.0.4.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/munin/munin-2.0.4.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: munin-2.0.4.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2012 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.4.ebuild,v 1.1 2012/07/30 15:16:43 flameeyes Exp $ |
55 |
|
56 |
EAPI=4 |
57 |
|
58 |
PATCHSET=3 |
59 |
|
60 |
inherit eutils user java-pkg-opt-2 |
61 |
|
62 |
MY_P=${P/_/-} |
63 |
|
64 |
DESCRIPTION="Munin Server Monitoring Tool" |
65 |
HOMEPAGE="http://munin-monitoring.org/" |
66 |
SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz |
67 |
http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz" |
68 |
|
69 |
LICENSE="GPL-2" |
70 |
SLOT="0" |
71 |
KEYWORDS="~amd64 ~mips ~x86" |
72 |
IUSE="asterisk irc java memcached minimal mysql postgres ssl test +cgi ipv6 syslog ipmi http" |
73 |
REQUIRED_USE="cgi? ( !minimal )" |
74 |
|
75 |
# Upstream's listing of required modules is NOT correct! |
76 |
# Some of the postgres plugins use DBD::Pg, while others call psql directly. |
77 |
# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. |
78 |
# We replace the original ipmi plugisn with the freeipmi_ plugin which at least works. |
79 |
DEPEND_COM="dev-lang/perl |
80 |
sys-process/procps |
81 |
asterisk? ( dev-perl/Net-Telnet ) |
82 |
irc? ( dev-perl/Net-IRC ) |
83 |
mysql? ( virtual/mysql |
84 |
dev-perl/Cache-Cache |
85 |
dev-perl/DBD-mysql ) |
86 |
ssl? ( dev-perl/Net-SSLeay ) |
87 |
postgres? ( dev-perl/DBD-Pg dev-db/postgresql-base ) |
88 |
memcached? ( dev-perl/Cache-Memcached ) |
89 |
cgi? ( dev-perl/FCGI ) |
90 |
syslog? ( virtual/perl-Sys-Syslog ) |
91 |
ipmi? ( |
92 |
>=sys-libs/freeipmi-1.1.6-r1 |
93 |
virtual/awk |
94 |
) |
95 |
http? ( dev-perl/libwww-perl ) |
96 |
dev-perl/DBI |
97 |
dev-perl/DateManip |
98 |
dev-perl/File-Copy-Recursive |
99 |
dev-perl/Log-Log4perl |
100 |
dev-perl/Net-CIDR |
101 |
dev-perl/Net-Netmask |
102 |
dev-perl/Net-SNMP |
103 |
dev-perl/net-server[ipv6(-)?] |
104 |
virtual/perl-Digest-MD5 |
105 |
virtual/perl-Getopt-Long |
106 |
virtual/perl-MIME-Base64 |
107 |
virtual/perl-Storable |
108 |
virtual/perl-Text-Balanced |
109 |
virtual/perl-Time-HiRes |
110 |
!minimal? ( |
111 |
dev-perl/HTML-Template |
112 |
dev-perl/IO-Socket-INET6 |
113 |
>=net-analyzer/rrdtool-1.3[perl] |
114 |
)" |
115 |
|
116 |
# Keep this seperate, as previous versions have had other deps here |
117 |
DEPEND="${DEPEND_COM} |
118 |
virtual/perl-Module-Build |
119 |
java? ( >=virtual/jdk-1.5 ) |
120 |
test? ( |
121 |
dev-perl/Test-LongString |
122 |
dev-perl/Test-Differences |
123 |
dev-perl/Test-MockModule |
124 |
dev-perl/File-Slurp |
125 |
dev-perl/IO-stringy |
126 |
dev-perl/IO-Socket-INET6 |
127 |
)" |
128 |
RDEPEND="${DEPEND_COM} |
129 |
java? ( >=virtual/jre-1.5 ) |
130 |
!minimal? ( |
131 |
virtual/cron |
132 |
media-fonts/dejavu |
133 |
)" |
134 |
|
135 |
S="${WORKDIR}/${MY_P}" |
136 |
|
137 |
pkg_setup() { |
138 |
enewgroup munin |
139 |
enewuser munin 177 -1 /var/lib/munin munin |
140 |
java-pkg-opt-2_pkg_setup |
141 |
} |
142 |
|
143 |
src_prepare() { |
144 |
epatch "${WORKDIR}"/patches/*.patch |
145 |
|
146 |
java-pkg-opt-2_src_prepare |
147 |
} |
148 |
|
149 |
src_configure() { |
150 |
local cgidir='$(DESTDIR)/var/www/localhost/cgi-bin' |
151 |
use cgi || cgidir="${T}/useless/cgi-bin" |
152 |
|
153 |
cat - >> "${S}"/Makefile.config <<EOF |
154 |
PREFIX=\$(DESTDIR)/usr |
155 |
CONFDIR=\$(DESTDIR)/etc/munin |
156 |
DOCDIR=${T}/useless/doc |
157 |
MANDIR=\$(PREFIX)/share/man |
158 |
LIBDIR=\$(PREFIX)/libexec/munin |
159 |
HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin |
160 |
CGIDIR=${cgidir} |
161 |
DBDIR=\$(DESTDIR)/var/lib/munin |
162 |
LOGDIR=\$(DESTDIR)/var/log/munin |
163 |
PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2) |
164 |
JCVALID=$(usex java yes no) |
165 |
EOF |
166 |
} |
167 |
|
168 |
# parallel make and install need to be fixed before, and I haven't |
169 |
# gotten around to do so yet. |
170 |
src_compile() { |
171 |
emake -j1 |
172 |
} |
173 |
|
174 |
src_install() { |
175 |
local dirs=" |
176 |
/var/log/munin/ |
177 |
/var/lib/munin/plugin-state/ |
178 |
/etc/munin/plugin-conf.d/ |
179 |
/etc/munin/plugins/" |
180 |
keepdir ${dirs} |
181 |
fowners munin:munin ${dirs} |
182 |
use minimal || dirs+=" /etc/munin/munin-conf.d/" |
183 |
|
184 |
local install_targets="install-common-prime install-node-prime install-plugins-prime" |
185 |
use java && install_targets+=" install-plugins-java" |
186 |
use minimal || install_targets=install |
187 |
|
188 |
# parallel install doesn't work and it's also pointless to have this |
189 |
# run in parallel for now (because it uses internal loops). |
190 |
emake -j1 DESTDIR="${D}" ${install_targets} |
191 |
|
192 |
# remove the plugins for non-Gentoo package managers |
193 |
rm "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die |
194 |
|
195 |
insinto /etc/munin/plugin-conf.d/ |
196 |
newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node |
197 |
|
198 |
# make sure we've got everything in the correct directory |
199 |
newinitd "${FILESDIR}"/munin-node_init.d_2.0.2 munin-node |
200 |
newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node |
201 |
dodoc README ChangeLog INSTALL build/resources/apache* |
202 |
|
203 |
# bug 254968 |
204 |
insinto /etc/logrotate.d/ |
205 |
newins "${FILESDIR}"/logrotate.d-munin munin |
206 |
|
207 |
dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ |
208 |
|
209 |
if use syslog; then |
210 |
sed -i -e '/log_file/s| .*| Sys::Syslog|' \ |
211 |
"${D}"/etc/munin/munin-node.conf || die |
212 |
fi |
213 |
|
214 |
if ! use minimal; then |
215 |
exeinto /etc/local.d/ |
216 |
newexe "${FILESDIR}"/localstart-munin 50munin.start |
217 |
|
218 |
# remove font files so that we don't have to keep them around |
219 |
rm "${D}"/usr/libexec/${PN}/*.ttf || die |
220 |
|
221 |
if use cgi; then |
222 |
sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die |
223 |
else |
224 |
sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die |
225 |
fi |
226 |
|
227 |
dodir /usr/share/${PN} |
228 |
cat - >> "${D}"/usr/share/${PN}/crontab <<EOF |
229 |
# Force the shell to bash |
230 |
SHELL=/bin/bash |
231 |
# Mail reports to root@, not munin@ |
232 |
MAILTO=root |
233 |
|
234 |
# This runs the munin task every 5 minutes. |
235 |
*/5 * * * * /usr/bin/munin-cron |
236 |
|
237 |
# Alternatively, this route works differently |
238 |
# Update once a minute (for busy sites) |
239 |
#*/1 * * * * /usr/libexec/munin/munin-update |
240 |
## Check for limit excess every 2 minutes |
241 |
#*/2 * * * * /usr/libexec/munin/munin-limits |
242 |
## Update graphs every 5 minutes |
243 |
#*/5 * * * * nice /usr/libexec/munin/munin-graph |
244 |
## Update HTML pages every 15 minutes |
245 |
#*/15 * * * * nice /usr/libexec/munin/munin-html |
246 |
EOF |
247 |
|
248 |
cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF |
249 |
# Mail reports to root@, not munin@, only execute one at a time |
250 |
!mailto(root),serial(true) |
251 |
|
252 |
# This runs the munin task every 5 minutes. |
253 |
@ 5 /usr/bin/munin-cron |
254 |
|
255 |
# Alternatively, this route works differently |
256 |
# Update once a minute (for busy sites) |
257 |
#@ 1 /usr/libexec/munin/munin-update |
258 |
## Check for limit excess every 2 minutes |
259 |
#@ 2 /usr/libexec/munin/munin-limits |
260 |
## Update graphs every 5 minutes |
261 |
#@ 5 nice /usr/libexec/munin/munin-graph |
262 |
## Update HTML pages every 15 minutes |
263 |
#@ 15 nice /usr/libexec/munin/munin-html |
264 |
EOF |
265 |
|
266 |
# remove .htaccess file |
267 |
find "${D}" -name .htaccess -delete || die |
268 |
fi |
269 |
} |
270 |
|
271 |
pkg_config() { |
272 |
if use minimal; then |
273 |
einfo "Nothing to do." |
274 |
return 0 |
275 |
fi |
276 |
|
277 |
einfo "Press enter to install the default crontab for the munin master" |
278 |
einfo "installation from /usr/share/${PN}/f?crontab" |
279 |
einfo "If you have a large site, you may wish to customize it." |
280 |
read |
281 |
|
282 |
if has_version sys-process/fcron; then |
283 |
fcrontab - -u munin < /usr/share/${PN}/fcrontab |
284 |
else |
285 |
# dcron is very fussy about syntax |
286 |
# the following is the only form that works in BOTH dcron and vixie-cron |
287 |
crontab - -u munin < /usr/share/${PN}/crontab |
288 |
fi |
289 |
} |
290 |
|
291 |
pkg_postinst() { |
292 |
elog "Please follow the munin documentation to set up the plugins you" |
293 |
elog "need, afterwards start munin-node via /etc/init.d/munin-node." |
294 |
if ! use minimal; then |
295 |
elog "To have munin's cronjob automatically configured for you if this is" |
296 |
elog "your munin master installation, please:" |
297 |
elog "emerge --config net-analyzer/munin" |
298 |
fi |
299 |
elog "" |
300 |
elog "Further information about setting up Munin in Gentoo can be found" |
301 |
elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" |
302 |
} |