1 |
commit: c22c0e7bd0e788740a49a9777e8d2f5cb1007cd6 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 28 15:01:34 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 28 15:14:51 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c22c0e7b |
7 |
|
8 |
net-analyzer/nagios-core: remove older versions not stabilized anywhere. |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
net-analyzer/nagios-core/Manifest | 2 - |
13 |
.../nagios-core/nagios-core-4.1.1-r1.ebuild | 268 --------------------- |
14 |
net-analyzer/nagios-core/nagios-core-4.2.1.ebuild | 248 ------------------- |
15 |
3 files changed, 518 deletions(-) |
16 |
|
17 |
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest |
18 |
index 289fc3c..466b834 100644 |
19 |
--- a/net-analyzer/nagios-core/Manifest |
20 |
+++ b/net-analyzer/nagios-core/Manifest |
21 |
@@ -1,6 +1,4 @@ |
22 |
DIST nagios-3.5.1.tar.gz 1763584 SHA256 ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 SHA512 48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d WHIRLPOOL 2c02584702c64dbb0e353e34b758fab079eee0dc7a401e7b5947a21733758d3596401e5519e2dd7f05c89ee4835c21965d2718157fd9d6d3d20af9c853d688ca |
23 |
DIST nagios-4.0.8.tar.gz 1805059 SHA256 8b268d250c97851775abe162f46f64724f95f367d752ae4630280cc5d368ca4b SHA512 d72fdbcc0beb2de72e5aa788b4ccc83aa30c7f4a4460edaa831f012db04647e4836b876bb7dc235e2a1b525827e9a2a0f4d348919f69fbfbfdaa4d13e968e18c WHIRLPOOL bdd9c63e0e495073b7b046952baa50b9e448fa56cda167806546a3b58fdd8fad328c9285ebb6d07da81786676d805671cad7295be389c4b8a4f3971264c97f74 |
24 |
-DIST nagios-4.1.1.tar.gz 11142182 SHA256 58218e5e66c8078fc578a60db33b5c3da10fc6a793e97d2b00780517e3efa0a7 SHA512 09e7c335666efd7180dcc8766abfdc6482f9ef4dceb4bee076b99652c04cb2e04555a1afeec2e6ef8c5556f7ae8fb684e17db0aa5e869915e4684af2c2183565 WHIRLPOOL 4b03cb5193284a32a6b0dc979849b7ab31f903f628b449953807b18401307cd7290b91296407d5ce21ebdcd8d7f4d8ed047ea99e0c307327f41fe6b3a69a5b46 |
25 |
-DIST nagios-4.2.1.tar.gz 11155576 SHA256 cb62c5c16964cfc143b126a576a7f8130e634cb9dda4dd3bd3632598d7855a87 SHA512 9d68c18fe272e9b6fc131c686ee031c115ee2916af1c112f73744bc73202d0d6799aa30828db701e78b1c62013b9f871083c004c8317942df239afe6c6a72a36 WHIRLPOOL 389293718261097af480325075aa03e2348f109261ff63c6df66a3104ebd36b1161250150e8518b51ed29892e8b14892a7ba54ba41a6ddbdf51d626d5fccbeef |
26 |
DIST nagios-4.2.2.tar.gz 11086388 SHA256 3e82795d75e475b03e76cb18c0e009b5ddce7306ca9c54dbcf16003a5e4f49ea SHA512 f89ca1e7c6aa47141dc79208d4ca095a2aecac064999641f663bd0ec86117e2223f8654e0203a7c549d511832a0c152ce0bf3b75d8dcd524d8046bec05e2cbe1 WHIRLPOOL bd533c6b2ee34a1eaa57cb19448e06299d3439ea8bbd2621fe0e3d21234af30fd6aa337e0993fff97f300b2617b9a7dc26bc277018be2976fad09abf83f6624c |
27 |
DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 WHIRLPOOL 7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d |
28 |
|
29 |
diff --git a/net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild b/net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild |
30 |
deleted file mode 100644 |
31 |
index 748ef0e..00000000 |
32 |
--- a/net-analyzer/nagios-core/nagios-core-4.1.1-r1.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,268 +0,0 @@ |
35 |
-# Copyright 1999-2016 Gentoo Foundation |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
-# $Id$ |
38 |
- |
39 |
-EAPI=5 |
40 |
- |
41 |
-inherit depend.apache eutils multilib toolchain-funcs user |
42 |
- |
43 |
-MY_P=${PN/-core}-${PV} |
44 |
-DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" |
45 |
-HOMEPAGE="http://www.nagios.org/" |
46 |
- |
47 |
-# The name of the directory into which our Gentoo icons will be |
48 |
-# extracted, and also the basename of the archive containing it. |
49 |
-GENTOO_ICONS="${PN}-gentoo-icons-20141125" |
50 |
-SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz |
51 |
- web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" |
52 |
- |
53 |
-LICENSE="GPL-2" |
54 |
-SLOT="0" |
55 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
56 |
-IUSE="classicui lighttpd perl +web vim-syntax" |
57 |
- |
58 |
-# In pkg_postinst(), we change the group of the Nagios configuration |
59 |
-# directory to that of the web server user. It can't belong to both |
60 |
-# apache/lighttpd groups at the same time, so we block this combination |
61 |
-# for our own sanity. |
62 |
-# |
63 |
-# This could be made to work, but we would need a better way to allow |
64 |
-# the web user read-only access to Nagios's configuration directory. |
65 |
-# |
66 |
-REQUIRED_USE="apache2? ( !lighttpd )" |
67 |
- |
68 |
-# sys-devel/libtool dependency is bug #401237. |
69 |
-# |
70 |
-# Note, we require one of the apache2 CGI modules: |
71 |
-# |
72 |
-# * mod_cgi |
73 |
-# * mod_cgid |
74 |
-# * mod_fcgid |
75 |
-# |
76 |
-# We just don't care /which/ one. And of course PHP supports both CGI |
77 |
-# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the |
78 |
-# dependencies, and expect the user not to do anything /too/ |
79 |
-# stupid. (For example, installing Apache with only FastCGI support, and |
80 |
-# PHP with only CGI support.) |
81 |
-# |
82 |
-# Another annoyance is that the upstream Makefile uses app-arch/unzip to |
83 |
-# extract a snapshot of AngularJS, but that's only needed when USE=web. |
84 |
-# |
85 |
-MOD_ALIAS=apache2_modules_alias |
86 |
-DEPEND="sys-devel/libtool |
87 |
- virtual/mailx |
88 |
- perl? ( dev-lang/perl ) |
89 |
- web? ( |
90 |
- app-arch/unzip |
91 |
- media-libs/gd[jpeg,png] |
92 |
- lighttpd? ( www-servers/lighttpd[php] ) |
93 |
- apache2? ( |
94 |
- || ( |
95 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgi] |
96 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgid] |
97 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_fcgid] ) |
98 |
- || ( |
99 |
- dev-lang/php:*[apache2] |
100 |
- dev-lang/php:*[cgi] |
101 |
- dev-lang/php:*[fpm] ) |
102 |
- ) |
103 |
- )" |
104 |
-RDEPEND="${DEPEND} |
105 |
- vim-syntax? ( app-vim/nagios-syntax )" |
106 |
- |
107 |
-want_apache2 |
108 |
- |
109 |
-S="${WORKDIR}/${MY_P}" |
110 |
- |
111 |
-pkg_setup() { |
112 |
- depend.apache_pkg_setup |
113 |
- |
114 |
- enewgroup nagios |
115 |
- enewuser nagios -1 /bin/bash /var/nagios/home nagios |
116 |
-} |
117 |
- |
118 |
-src_prepare(){ |
119 |
- # Upstream bug, fixes a QA warning: |
120 |
- # |
121 |
- # http://tracker.nagios.org/view.php?id=650 |
122 |
- # |
123 |
- epatch "${FILESDIR}"/use-MAKE-instead-of-bare-make.patch |
124 |
- |
125 |
- # Upstream bug: |
126 |
- # |
127 |
- # http://tracker.nagios.org/view.php?id=651 |
128 |
- # |
129 |
- # Gentoo bugs #388321 and #581148. |
130 |
- # |
131 |
- epatch "${FILESDIR}"/use-INSTALL-to-install-themes-r1.patch |
132 |
-} |
133 |
- |
134 |
-src_configure() { |
135 |
- local myconf |
136 |
- |
137 |
- if use perl; then |
138 |
- myconf="${myconf} --enable-embedded-perl --with-perlcache" |
139 |
- fi |
140 |
- |
141 |
- if use !apache2 && use !lighttpd ; then |
142 |
- myconf="${myconf} --with-command-group=nagios" |
143 |
- else |
144 |
- if use apache2 ; then |
145 |
- myconf="${myconf} --with-command-group=apache" |
146 |
- myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
147 |
- elif use lighttpd ; then |
148 |
- myconf="${myconf} --with-command-group=lighttpd" |
149 |
- fi |
150 |
- fi |
151 |
- |
152 |
- econf ${myconf} \ |
153 |
- --prefix=/usr \ |
154 |
- --bindir=/usr/sbin \ |
155 |
- --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
156 |
- --datadir=/usr/share/nagios/htdocs \ |
157 |
- --localstatedir=/var/nagios \ |
158 |
- --sysconfdir=/etc/nagios \ |
159 |
- --libexecdir=/usr/$(get_libdir)/nagios/plugins |
160 |
-} |
161 |
- |
162 |
-src_compile() { |
163 |
- emake CC=$(tc-getCC) nagios |
164 |
- |
165 |
- if use web; then |
166 |
- # Only compile the CGIs/HTML when USE=web is set. |
167 |
- emake CC=$(tc-getCC) DESTDIR="${D}" cgis html |
168 |
- fi |
169 |
-} |
170 |
- |
171 |
-src_install() { |
172 |
- dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING |
173 |
- |
174 |
- emake DESTDIR="${D}" install-base |
175 |
- emake DESTDIR="${D}" install-basic |
176 |
- emake DESTDIR="${D}" install-config |
177 |
- emake DESTDIR="${D}" install-commandmode |
178 |
- |
179 |
- if use web; then |
180 |
- emake DESTDIR="${D}" install-cgis |
181 |
- |
182 |
- # install-html installs the new exfoliation theme |
183 |
- emake DESTDIR="${D}" install-html |
184 |
- |
185 |
- if use classicui; then |
186 |
- # This overwrites the already-installed exfoliation theme |
187 |
- emake DESTDIR="${D}" install-classicui |
188 |
- fi |
189 |
- |
190 |
- # Install cute Gentoo icons (bug #388323), setting their |
191 |
- # owner, group, and mode to match those of the rest of Nagios's |
192 |
- # images. |
193 |
- insopts --group=nagios --owner=nagios --mode=0664 |
194 |
- insinto /usr/share/nagios/htdocs/images/logos |
195 |
- doins "${WORKDIR}/${GENTOO_ICONS}"/*.* |
196 |
- insopts --mode=0644 # Back to the default... |
197 |
- fi |
198 |
- |
199 |
- newinitd "${FILESDIR}"/nagios4 nagios |
200 |
- newconfd "${FILESDIR}"/conf.d nagios |
201 |
- |
202 |
- if use web ; then |
203 |
- if use apache2 ; then |
204 |
- # Install the Nagios configuration file for Apache. |
205 |
- insinto "${APACHE_MODULES_CONFDIR}" |
206 |
- doins "${FILESDIR}"/99_nagios4.conf |
207 |
- elif use lighttpd ; then |
208 |
- # Install the Nagios configuration file for Lighttpd. |
209 |
- insinto /etc/lighttpd |
210 |
- newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf |
211 |
- else |
212 |
- ewarn "${CATEGORY}/${PF} only supports apache or lighttpd" |
213 |
- ewarn "out of the box. Since you are not using one of them, you" |
214 |
- ewarn "will have to configure your webserver yourself." |
215 |
- fi |
216 |
- fi |
217 |
- |
218 |
- for dir in etc/nagios var/nagios ; do |
219 |
- chown -R nagios:nagios "${D}/${dir}" \ |
220 |
- || die "failed chown of ${D}/${dir}" |
221 |
- done |
222 |
- |
223 |
- chown -R root:root "${D}/usr/$(get_libdir)/nagios" \ |
224 |
- || die "failed chown of ${D}/usr/$(get_libdir)/nagios" |
225 |
- |
226 |
- # The following two find...exec statements will die properly as long |
227 |
- # as chmod is only called once (that is, as long as the argument |
228 |
- # list is small enough). |
229 |
- find "${D}/usr/$(get_libdir)/nagios" -type d \ |
230 |
- -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable' |
231 |
- |
232 |
- if use web; then |
233 |
- find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \ |
234 |
- -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable' |
235 |
- fi |
236 |
- |
237 |
- keepdir /etc/nagios |
238 |
- keepdir /var/nagios |
239 |
- keepdir /var/nagios/archives |
240 |
- keepdir /var/nagios/rw |
241 |
- keepdir /var/nagios/spool/checkresults |
242 |
- |
243 |
- if use !apache2 && use !lighttpd; then |
244 |
- chown -R nagios:nagios "${D}"/var/nagios/rw \ |
245 |
- || die "failed chown of ${D}/var/nagios/rw" |
246 |
- else |
247 |
- if use apache2 ; then |
248 |
- chown -R nagios:apache "${D}"/var/nagios/rw \ |
249 |
- || die "failed chown of ${D}/var/nagios/rw" |
250 |
- elif use lighttpd ; then |
251 |
- chown -R nagios:lighttpd "${D}"/var/nagios/rw \ |
252 |
- || die "failed chown of ${D}/var/nagios/rw" |
253 |
- fi |
254 |
- fi |
255 |
- |
256 |
- chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw" |
257 |
- chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios" |
258 |
-} |
259 |
- |
260 |
-pkg_postinst() { |
261 |
- |
262 |
- if use web; then |
263 |
- elog "Note that your web server user requires read-only access to" |
264 |
- elog "${ROOT}etc/nagios." |
265 |
- |
266 |
- if use apache2 || use lighttpd ; then |
267 |
- elog |
268 |
- elog "To that end, we have changed the group of ${ROOT}etc/nagios" |
269 |
- elog "to that of your web server user." |
270 |
- elog |
271 |
- if use apache2; then |
272 |
- chown nagios:apache "${ROOT}etc/nagios" \ |
273 |
- || die "failed to change group of ${ROOT}etc/nagios" |
274 |
- |
275 |
- elog "To enable the Nagios web front-end, please edit" |
276 |
- elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\"" |
277 |
- elog "to APACHE2_OPTS. Then Nagios will be available at," |
278 |
- elog |
279 |
- elif use lighttpd; then |
280 |
- chown nagios:lighttpd "${ROOT}etc/nagios" \ |
281 |
- || die "failed to change group of ${ROOT}etc/nagios" |
282 |
- elog "To enable the Nagios web front-end, please add" |
283 |
- elog "'include \"nagios.conf\"' to the lighttpd configuration" |
284 |
- elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios" |
285 |
- elog "will be available at," |
286 |
- elog |
287 |
- fi |
288 |
- |
289 |
- elog " http://localhost/nagios/" |
290 |
- else |
291 |
- elog "Since you're not using either Apache or Lighttpd, you" |
292 |
- elog "will have to grant the necessary permissions yourself." |
293 |
- fi |
294 |
- fi |
295 |
- |
296 |
- elog |
297 |
- elog "If your kernel has /proc protection, nagios" |
298 |
- elog "will not be happy as it relies on accessing the proc" |
299 |
- elog "filesystem. You can fix this by adding nagios into" |
300 |
- elog "the group wheel, but this is not recomended." |
301 |
- elog |
302 |
-} |
303 |
|
304 |
diff --git a/net-analyzer/nagios-core/nagios-core-4.2.1.ebuild b/net-analyzer/nagios-core/nagios-core-4.2.1.ebuild |
305 |
deleted file mode 100644 |
306 |
index f3d1d3e..00000000 |
307 |
--- a/net-analyzer/nagios-core/nagios-core-4.2.1.ebuild |
308 |
+++ /dev/null |
309 |
@@ -1,248 +0,0 @@ |
310 |
-# Copyright 1999-2016 Gentoo Foundation |
311 |
-# Distributed under the terms of the GNU General Public License v2 |
312 |
-# $Id$ |
313 |
- |
314 |
-EAPI=6 |
315 |
- |
316 |
-inherit toolchain-funcs user |
317 |
- |
318 |
-MY_P=${PN/-core}-${PV} |
319 |
-DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" |
320 |
-HOMEPAGE="http://www.nagios.org/" |
321 |
- |
322 |
-# The name of the directory into which our Gentoo icons will be |
323 |
-# extracted, and also the basename of the archive containing it. |
324 |
-GENTOO_ICONS="${PN}-gentoo-icons-20141125" |
325 |
-SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz |
326 |
- web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" |
327 |
- |
328 |
-LICENSE="GPL-2" |
329 |
-SLOT="0" |
330 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
331 |
-IUSE="apache2 classicui lighttpd perl +web vim-syntax" |
332 |
- |
333 |
-# In pkg_postinst(), we change the group of the Nagios configuration |
334 |
-# directory to that of the web server user. It can't belong to both |
335 |
-# apache/lighttpd groups at the same time, so we block this combination |
336 |
-# for our own sanity. |
337 |
-# |
338 |
-# This could be made to work, but we would need a better way to allow |
339 |
-# the web user read-only access to Nagios's configuration directory. |
340 |
-# |
341 |
-REQUIRED_USE="apache2? ( !lighttpd )" |
342 |
- |
343 |
-# sys-devel/libtool dependency is bug #401237. |
344 |
-# |
345 |
-# Note, we require one of the apache2 CGI modules: |
346 |
-# |
347 |
-# * mod_cgi |
348 |
-# * mod_cgid |
349 |
-# * mod_fcgid |
350 |
-# |
351 |
-# We just don't care /which/ one. And of course PHP supports both CGI |
352 |
-# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the |
353 |
-# dependencies, and expect the user not to do anything /too/ |
354 |
-# stupid. (For example, installing Apache with only FastCGI support, and |
355 |
-# PHP with only CGI support.) |
356 |
-# |
357 |
-# Another annoyance is that the upstream Makefile uses app-arch/unzip to |
358 |
-# extract a snapshot of AngularJS, but that's only needed when USE=web. |
359 |
-# |
360 |
-MOD_ALIAS=apache2_modules_alias |
361 |
-DEPEND="sys-devel/libtool |
362 |
- virtual/mailx |
363 |
- perl? ( dev-lang/perl ) |
364 |
- web? ( |
365 |
- app-arch/unzip |
366 |
- media-libs/gd[jpeg,png] |
367 |
- lighttpd? ( www-servers/lighttpd[php] ) |
368 |
- apache2? ( |
369 |
- || ( |
370 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgi] |
371 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgid] |
372 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_fcgid] ) |
373 |
- || ( |
374 |
- dev-lang/php:*[apache2] |
375 |
- dev-lang/php:*[cgi] |
376 |
- dev-lang/php:*[fpm] ) |
377 |
- ) |
378 |
- )" |
379 |
-RDEPEND="${DEPEND} |
380 |
- vim-syntax? ( app-vim/nagios-syntax )" |
381 |
- |
382 |
-S="${WORKDIR}/${MY_P}" |
383 |
- |
384 |
-pkg_setup() { |
385 |
- enewgroup nagios |
386 |
- enewuser nagios -1 /bin/bash /var/nagios/home nagios |
387 |
-} |
388 |
- |
389 |
-src_configure() { |
390 |
- local myconf |
391 |
- |
392 |
- if use perl; then |
393 |
- myconf="${myconf} --enable-embedded-perl --with-perlcache" |
394 |
- fi |
395 |
- |
396 |
- if use !apache2 && use !lighttpd ; then |
397 |
- myconf="${myconf} --with-command-group=nagios" |
398 |
- else |
399 |
- if use apache2 ; then |
400 |
- myconf="${myconf} --with-command-group=apache" |
401 |
- myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
402 |
- elif use lighttpd ; then |
403 |
- myconf="${myconf} --with-command-group=lighttpd" |
404 |
- fi |
405 |
- fi |
406 |
- |
407 |
- econf ${myconf} \ |
408 |
- --prefix=/usr \ |
409 |
- --bindir=/usr/sbin \ |
410 |
- --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
411 |
- --datadir=/usr/share/nagios/htdocs \ |
412 |
- --localstatedir=/var/nagios \ |
413 |
- --sysconfdir=/etc/nagios \ |
414 |
- --libexecdir=/usr/$(get_libdir)/nagios/plugins |
415 |
-} |
416 |
- |
417 |
-src_compile() { |
418 |
- emake CC=$(tc-getCC) nagios |
419 |
- |
420 |
- if use web; then |
421 |
- # Only compile the CGIs/HTML when USE=web is set. |
422 |
- emake CC=$(tc-getCC) DESTDIR="${D}" cgis html |
423 |
- fi |
424 |
-} |
425 |
- |
426 |
-src_install() { |
427 |
- dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING |
428 |
- |
429 |
- emake DESTDIR="${D}" install-base |
430 |
- emake DESTDIR="${D}" install-basic |
431 |
- emake DESTDIR="${D}" install-config |
432 |
- emake DESTDIR="${D}" install-commandmode |
433 |
- |
434 |
- if use web; then |
435 |
- emake DESTDIR="${D}" install-cgis |
436 |
- |
437 |
- # install-html installs the new exfoliation theme |
438 |
- emake DESTDIR="${D}" install-html |
439 |
- |
440 |
- if use classicui; then |
441 |
- # This overwrites the already-installed exfoliation theme |
442 |
- emake DESTDIR="${D}" install-classicui |
443 |
- fi |
444 |
- |
445 |
- # Install cute Gentoo icons (bug #388323), setting their |
446 |
- # owner, group, and mode to match those of the rest of Nagios's |
447 |
- # images. |
448 |
- insopts --group=nagios --owner=nagios --mode=0664 |
449 |
- insinto /usr/share/nagios/htdocs/images/logos |
450 |
- doins "${WORKDIR}/${GENTOO_ICONS}"/*.* |
451 |
- insopts --mode=0644 # Back to the default... |
452 |
- fi |
453 |
- |
454 |
- newinitd "${FILESDIR}"/nagios4 nagios |
455 |
- newconfd "${FILESDIR}"/conf.d nagios |
456 |
- |
457 |
- if use web ; then |
458 |
- if use apache2 ; then |
459 |
- # Install the Nagios configuration file for Apache. |
460 |
- insinto "/etc/apache2/modules.d" |
461 |
- doins "${FILESDIR}"/99_nagios4.conf |
462 |
- elif use lighttpd ; then |
463 |
- # Install the Nagios configuration file for Lighttpd. |
464 |
- insinto /etc/lighttpd |
465 |
- newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf |
466 |
- else |
467 |
- ewarn "${CATEGORY}/${PF} only supports apache or lighttpd" |
468 |
- ewarn "out of the box. Since you are not using one of them, you" |
469 |
- ewarn "will have to configure your webserver yourself." |
470 |
- fi |
471 |
- fi |
472 |
- |
473 |
- for dir in etc/nagios var/nagios ; do |
474 |
- chown -R nagios:nagios "${D}/${dir}" \ |
475 |
- || die "failed chown of ${D}/${dir}" |
476 |
- done |
477 |
- |
478 |
- chown -R root:root "${D}/usr/$(get_libdir)/nagios" \ |
479 |
- || die "failed chown of ${D}/usr/$(get_libdir)/nagios" |
480 |
- |
481 |
- # The following two find...exec statements will die properly as long |
482 |
- # as chmod is only called once (that is, as long as the argument |
483 |
- # list is small enough). |
484 |
- find "${D}/usr/$(get_libdir)/nagios" -type d \ |
485 |
- -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable' |
486 |
- |
487 |
- if use web; then |
488 |
- find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \ |
489 |
- -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable' |
490 |
- fi |
491 |
- |
492 |
- keepdir /etc/nagios |
493 |
- keepdir /var/nagios |
494 |
- keepdir /var/nagios/archives |
495 |
- keepdir /var/nagios/rw |
496 |
- keepdir /var/nagios/spool/checkresults |
497 |
- |
498 |
- if use !apache2 && use !lighttpd; then |
499 |
- chown -R nagios:nagios "${D}"/var/nagios/rw \ |
500 |
- || die "failed chown of ${D}/var/nagios/rw" |
501 |
- else |
502 |
- if use apache2 ; then |
503 |
- chown -R nagios:apache "${D}"/var/nagios/rw \ |
504 |
- || die "failed chown of ${D}/var/nagios/rw" |
505 |
- elif use lighttpd ; then |
506 |
- chown -R nagios:lighttpd "${D}"/var/nagios/rw \ |
507 |
- || die "failed chown of ${D}/var/nagios/rw" |
508 |
- fi |
509 |
- fi |
510 |
- |
511 |
- chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw" |
512 |
- chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios" |
513 |
-} |
514 |
- |
515 |
-pkg_postinst() { |
516 |
- |
517 |
- if use web; then |
518 |
- elog "Note that your web server user requires read-only access to" |
519 |
- elog "${ROOT}etc/nagios." |
520 |
- |
521 |
- if use apache2 || use lighttpd ; then |
522 |
- elog |
523 |
- elog "To that end, we have changed the group of ${ROOT}etc/nagios" |
524 |
- elog "to that of your web server user." |
525 |
- elog |
526 |
- if use apache2; then |
527 |
- chown nagios:apache "${ROOT}etc/nagios" \ |
528 |
- || die "failed to change group of ${ROOT}etc/nagios" |
529 |
- |
530 |
- elog "To enable the Nagios web front-end, please edit" |
531 |
- elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\"" |
532 |
- elog "to APACHE2_OPTS. Then Nagios will be available at," |
533 |
- elog |
534 |
- elif use lighttpd; then |
535 |
- chown nagios:lighttpd "${ROOT}etc/nagios" \ |
536 |
- || die "failed to change group of ${ROOT}etc/nagios" |
537 |
- elog "To enable the Nagios web front-end, please add" |
538 |
- elog "'include \"nagios.conf\"' to the lighttpd configuration" |
539 |
- elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios" |
540 |
- elog "will be available at," |
541 |
- elog |
542 |
- fi |
543 |
- |
544 |
- elog " http://localhost/nagios/" |
545 |
- else |
546 |
- elog "Since you're not using either Apache or Lighttpd, you" |
547 |
- elog "will have to grant the necessary permissions yourself." |
548 |
- fi |
549 |
- fi |
550 |
- |
551 |
- elog |
552 |
- elog "If your kernel has /proc protection, nagios" |
553 |
- elog "will not be happy as it relies on accessing the proc" |
554 |
- elog "filesystem. You can fix this by adding nagios into" |
555 |
- elog "the group wheel, but this is not recomended." |
556 |
- elog |
557 |
-} |