Gentoo Archives: gentoo-commits

From: "Matt Thode (prometheanfire)" <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/icinga: metadata.xml icinga-1.9.1.ebuild ChangeLog icinga-1.8.4.ebuild icinga-1.9.0.ebuild
Date: Tue, 28 May 2013 08:32:54
Message-Id: 20130528083250.E666C2171D@flycatcher.gentoo.org
1 prometheanfire 13/05/28 08:32:50
2
3 Modified: metadata.xml ChangeLog
4 Added: icinga-1.9.1.ebuild
5 Removed: icinga-1.8.4.ebuild icinga-1.9.0.ebuild
6 Log:
7 updating icinga to 1.9.1 and adding a contrib flag for bug 471174
8
9 (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
10
11 Revision Changes Path
12 1.5 net-analyzer/icinga/metadata.xml
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/metadata.xml?rev=1.5&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/metadata.xml?rev=1.5&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/metadata.xml?r1=1.4&r2=1.5
17
18 Index: metadata.xml
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga/metadata.xml,v
21 retrieving revision 1.4
22 retrieving revision 1.5
23 diff -u -r1.4 -r1.5
24 --- metadata.xml 15 May 2012 22:09:09 -0000 1.4
25 +++ metadata.xml 28 May 2013 08:32:50 -0000 1.5
26 @@ -3,6 +3,7 @@
27 <pkgmetadata>
28 <longdescription lang="en">A rebuild of nagios from the ground up</longdescription>
29 <use>
30 + <flag name="contrib">additional scripts</flag>
31 <flag name="idoutils">Adds DB support</flag>
32 <flag name="lighttpd">Adds Lighttpd support</flag>
33 <flag name="plugins">Adds support for nagios plugins</flag>
34
35
36
37 1.39 net-analyzer/icinga/ChangeLog
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?rev=1.39&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?rev=1.39&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?r1=1.38&r2=1.39
42
43 Index: ChangeLog
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v
46 retrieving revision 1.38
47 retrieving revision 1.39
48 diff -u -r1.38 -r1.39
49 --- ChangeLog 9 May 2013 21:21:49 -0000 1.38
50 +++ ChangeLog 28 May 2013 08:32:50 -0000 1.39
51 @@ -1,6 +1,12 @@
52 # ChangeLog for net-analyzer/icinga
53 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
54 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.38 2013/05/09 21:21:49 prometheanfire Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.39 2013/05/28 08:32:50 prometheanfire Exp $
56 +
57 +*icinga-1.9.1 (28 May 2013)
58 +
59 + 28 May 2013; Matthew Thode <prometheanfire@g.o> +icinga-1.9.1.ebuild,
60 + -icinga-1.8.4.ebuild, -icinga-1.9.0.ebuild, metadata.xml:
61 + updating icinga to 1.9.1 and adding a contrib flag for bug 471174
62
63 *icinga-1.9.0 (09 May 2013)
64
65
66
67
68 1.1 net-analyzer/icinga/icinga-1.9.1.ebuild
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/icinga-1.9.1.ebuild?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/icinga-1.9.1.ebuild?rev=1.1&content-type=text/plain
72
73 Index: icinga-1.9.1.ebuild
74 ===================================================================
75 # Copyright 1999-2013 Gentoo Foundation
76 # Distributed under the terms of the GNU General Public License v2
77 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/icinga-1.9.1.ebuild,v 1.1 2013/05/28 08:32:50 prometheanfire Exp $
78
79 EAPI=2
80
81 inherit depend.apache eutils multilib toolchain-funcs user versionator
82
83 DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
84 HOMEPAGE="http://www.icinga.org/"
85 #MY_PV=$(delete_version_separator 3)
86 #SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
87 #S=${WORKDIR}/${PN}-${MY_PV}
88 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
89
90 LICENSE="GPL-2"
91 SLOT="0"
92 KEYWORDS="~amd64 ~hppa ~x86"
93 IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
94 DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
95 perl? ( dev-lang/perl )
96 virtual/mailx
97 web? (
98 media-libs/gd[jpeg,png]
99 lighttpd? ( www-servers/lighttpd )
100 )
101 !net-analyzer/nagios-core"
102 RDEPEND="${DEPEND}
103 plugins? ( net-analyzer/nagios-plugins )"
104 RESTRICT="test"
105
106 want_apache2
107
108 pkg_setup() {
109 depend.apache_pkg_setup
110 enewgroup icinga
111 enewgroup nagios
112 enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
113 }
114
115 src_prepare() {
116 epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
117 }
118
119 src_configure() {
120 local myconf
121
122 myconf="$(use_enable perl embedded-perl)
123 $(use_with perl perlcache)
124 $(use_enable idoutils)
125 $(use_enable ssl)
126 --disable-statusurl
127 --with-cgiurl=/icinga/cgi-bin
128 --with-log-dir=/var/log/icinga
129 --libdir=/usr/$(get_libdir)
130 --bindir=/usr/sbin
131 --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
132 --datarootdir=/usr/share/icinga/htdocs
133 --localstatedir=/var/lib/icinga
134 --sysconfdir=/etc/icinga
135 --with-lockfile=/var/run/icinga/icinga.lock
136 --with-temp-dir=/tmp/icinga
137 --with-temp-file=/tmp/icinga/icinga.tmp"
138
139 if use idoutils ; then
140 myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
141 --with-icinga-chkfile=/var/lib/icinga/icinga.chk
142 --with-ido-sockfile=/var/lib/icinga/ido.sock
143 --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
144 fi
145
146 if use eventhandler ; then
147 myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
148 fi
149
150 if use plugins ; then
151 myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
152 else
153 myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
154 fi
155
156 if use !apache2 && use !lighttpd ; then
157 myconf+=" --with-command-group=icinga"
158 else
159 if use apache2 ; then
160 myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
161 myconf+=" --with-command-group=apache"
162 elif use lighttpd ; then
163 myconf+=" --with-command-group=lighttpd"
164 fi
165 fi
166
167 econf ${myconf}
168 }
169
170 src_compile() {
171 tc-export CC
172
173 emake icinga || die "make failed"
174
175 if use web ; then
176 emake DESTDIR="${D}" cgis || die
177 fi
178
179 if use contrib ; then
180 emake DESTDIR="${D}" -C contrib || die
181 fi
182
183 if use idoutils ; then
184 emake DESTDIR="${D}" idoutils || die
185 fi
186 }
187
188 src_install() {
189 dodoc Changelog README UPGRADING || die
190
191 if ! use web ; then
192 sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
193 fi
194
195 emake DESTDIR="${D}" install{,-config,-commandmode} || die
196
197 if use idoutils ; then
198 emake DESTDIR="${D}" install-idoutils || die
199 fi
200
201 if use contrib ; then
202 emake DESTDIR="${D}" -C contrib install || die
203 fi
204
205 if use eventhandler ; then
206 emake DESTDIR="${D}" install-eventhandlers || die
207 fi
208
209 newinitd "${FILESDIR}"/icinga-init.d icinga || die
210 newconfd "${FILESDIR}"/icinga-conf.d icinga || die
211 if use idoutils ; then
212 newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
213 newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
214 insinto /usr/share/icinga/contrib/db
215 doins -r module/idoutils/db/* || die
216 fi
217 # Apache Module
218 if use web ; then
219 if use apache2 ; then
220 insinto "${APACHE_MODULES_CONFDIR}"
221 newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
222 elif use lighttpd ; then
223 insinto /etc/lighttpd
224 newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
225 else
226 ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
227 ewarn "out-of-the-box. Since you are not using one of them, you"
228 ewarn "have to configure your webserver accordingly yourself."
229 fi
230 fowners -R root:root /usr/$(get_libdir)/icinga || die
231 cd "${D}" || die
232 find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
233 find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
234 fi
235
236 if use eventhandler ; then
237 dodir /etc/icinga/eventhandlers || die
238 fowners icinga:icinga /etc/icinga/eventhandlers || die
239 fi
240
241 keepdir /etc/icinga
242 keepdir /var/lib/icinga
243 keepdir /var/lib/icinga/archives
244 keepdir /var/lib/icinga/rw
245 keepdir /var/lib/icinga/spool/checkresults
246
247 if use apache2 ; then
248 webserver=apache
249 elif use lighttpd ; then
250 webserver=lighttpd
251 else
252 webserver=icinga
253 fi
254
255 fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
256 fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
257
258 fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
259 fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
260 }
261
262 pkg_postinst() {
263 if use web ; then
264 elog "This does not include cgis that are perl-dependent"
265 elog "Currently traceroute.cgi is perl-dependent"
266 elog "Note that the user your webserver is running as needs"
267 elog "read-access to /etc/icinga."
268 elog
269 if use apache2 || use lighttpd ; then
270 elog "There are several possible solutions to accomplish this,"
271 elog "choose the one you are most comfortable with:"
272 elog
273 if use apache2 ; then
274 elog " usermod -G icinga apache"
275 elog "or"
276 elog " chown icinga:apache /etc/icinga"
277 elog
278 elog "Also edit /etc/conf.d/apache2 and add a line like"
279 elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
280 elog
281 elog "Icinga web service needs user authentication. If you"
282 elog "use the base configuration, you need a password file"
283 elog "with a password for user \"icingaadmin\""
284 elog "You can create this file by executing:"
285 elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
286 elog
287 elog "you may want to also add apache to the icinga group"
288 elog "to allow it access to the AuthUserFile"
289 elog
290 elif use lighttpd ; then
291 elog " usermod -G icinga lighttpd "
292 elog "or"
293 elog " chown icinga:lighttpd /etc/icinga"
294 elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
295 fi
296 elog
297 elog "That will make icinga's web front end visable via"
298 elog "http://localhost/icinga/"
299 elog
300 else
301 elog "IMPORTANT: Do not forget to add the user your webserver"
302 elog "is running as to the icinga group!"
303 fi
304 else
305 ewarn "Please note that you have installed Icinga without web interface."
306 ewarn "Please don't file any bugs about having no web interface when you do this."
307 ewarn "Thank you!"
308 fi
309 elog
310 elog "If you want icinga to start at boot time"
311 elog "remember to execute:"
312 elog " rc-update add icinga default"
313 elog
314 elog "If your kernel has /proc protection, icinga"
315 elog "will not be happy as it relies on accessing the proc"
316 elog "filesystem. You can fix this by adding icinga into"
317 elog "the group wheel, but this is not recomended."
318 elog
319 if [ -d "${ROOT}"/var/icinga ] ; then
320 ewarn
321 ewarn "/var/icinga was moved to /var/lib/icinga"
322 ewarn "please move the files if this was an upgrade"
323 if use idoutils ; then
324 ewarn "and edit /etc/ido2db.cfg to change the location of the files"
325 ewarn "it accesses"
326 ewarn "update your db with the scripts under the directory"
327 ewarn "/usr/share/icinga/contrib/db/"
328 fi
329 ewarn
330 ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
331 ewarn "remove /var/icinga afterwards to make this warning disappear"
332 fi
333 }