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