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