1 |
commit: f56ca9245195c4370eb715639a9e412e272d1d39 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 18 23:39:42 2019 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 18 23:52:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f56ca924 |
7 |
|
8 |
net-analyzer/nagios-core: new version 4.4.3. |
9 |
|
10 |
This is a standard version bump, but also fixes a dependency on |
11 |
sys-devel/libtool that should have been dev-libs/libltdl all |
12 |
along. Since "--enable-event-broker" is enabled by default, the |
13 |
configure script looks for and links against libltdl. Thanks are due |
14 |
to SÅ‚awomir Nizio for noticing the bug. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/675226 |
17 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
18 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
19 |
|
20 |
net-analyzer/nagios-core/Manifest | 1 + |
21 |
net-analyzer/nagios-core/nagios-core-4.4.3.ebuild | 213 ++++++++++++++++++++++ |
22 |
2 files changed, 214 insertions(+) |
23 |
|
24 |
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest |
25 |
index 1aee223909c..7e5e635dd9f 100644 |
26 |
--- a/net-analyzer/nagios-core/Manifest |
27 |
+++ b/net-analyzer/nagios-core/Manifest |
28 |
@@ -1,3 +1,4 @@ |
29 |
DIST nagios-4.3.4.tar.gz 11101966 BLAKE2B 6cb8182f40a4f83875c94df040bb1c62ce078d4130e10fa8595ea0b14cf715fc2a237ffb34199da9c1528e4789f3ce8deae3d993b5b795ad712d48b1e5fdb820 SHA512 f4e92aa98151739442a225a245871d93b5560d89510bdacb1a615959b9687f7a92675f10fcba71078b104ca8f237b0155a9261d67ec66f80aec7f033b4b3e316 |
30 |
DIST nagios-4.4.2.tar.gz 11301454 BLAKE2B 1b5ffa775bbf147e96d07edd36a387db271802d58cc1a1d1eb867645955aec0044e757785578a60c12549bd4e66e4c95ef06dd0f3f8be3599187d0ef0bcc8a4b SHA512 a6ddb2d8ca1c523d02659a2af0b9c67a3802893c946279bb15be53645dc64c997cd5562b77eab9dae03e756ec6622a9a641f7bd68269aba4ddd56ee21f50959e |
31 |
+DIST nagios-4.4.3.tar.gz 11302228 BLAKE2B d22ab64268832897dfa67d805a5d74656f7aa96ce1427c7326b632060d8c1ea0fbd07564f3c7a978bb5e2c0cba0c06290e7b0d579017fe73b900eb290c7853ae SHA512 07c91a796d634ffda73305edb54e01e46cb4fc9dc996c937e657c18f8067d7e2d31421b058a04b7395ef739962445ea149c486caaac94b7d422b4032bdaa07d4 |
32 |
DIST nagios-core-gentoo-icons-20141125.tar 40960 BLAKE2B 31c1953e1160c7c7b89606b72b1a80407e4c1b7a7938b40bd1c577cd0c309dd88ca6b775d692a9b846dbf67736537fa9c91e56aa15fdd447769608ca525bff09 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 |
33 |
|
34 |
diff --git a/net-analyzer/nagios-core/nagios-core-4.4.3.ebuild b/net-analyzer/nagios-core/nagios-core-4.4.3.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..d568d350d58 |
37 |
--- /dev/null |
38 |
+++ b/net-analyzer/nagios-core/nagios-core-4.4.3.ebuild |
39 |
@@ -0,0 +1,213 @@ |
40 |
+# Copyright 1999-2019 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=6 |
44 |
+ |
45 |
+inherit toolchain-funcs user |
46 |
+ |
47 |
+MY_P=${PN/-core}-${PV} |
48 |
+DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" |
49 |
+HOMEPAGE="https://www.nagios.org/" |
50 |
+ |
51 |
+# The name of the directory into which our Gentoo icons will be |
52 |
+# extracted, and also the basename of the archive containing it. |
53 |
+GENTOO_ICONS="${PN}-gentoo-icons-20141125" |
54 |
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz |
55 |
+ web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" |
56 |
+ |
57 |
+LICENSE="GPL-2" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" |
60 |
+IUSE="apache2 classicui lighttpd perl +web vim-syntax" |
61 |
+ |
62 |
+# In pkg_postinst(), we change the group of the Nagios configuration |
63 |
+# directory to that of the web server user. It can't belong to both |
64 |
+# apache/lighttpd groups at the same time, so we block this combination |
65 |
+# for our own sanity. |
66 |
+# |
67 |
+# This could be made to work, but we would need a better way to allow |
68 |
+# the web user read-only access to Nagios's configuration directory. |
69 |
+# |
70 |
+REQUIRED_USE="apache2? ( !lighttpd )" |
71 |
+ |
72 |
+# |
73 |
+# Note, we require one of the apache2 CGI modules: |
74 |
+# |
75 |
+# * mod_cgi |
76 |
+# * mod_cgid |
77 |
+# * mod_fcgid |
78 |
+# |
79 |
+# We just don't care /which/ one. And of course PHP supports both CGI |
80 |
+# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the |
81 |
+# dependencies, and expect the user not to do anything /too/ |
82 |
+# stupid. (For example, installing Apache with only FastCGI support, and |
83 |
+# PHP with only CGI support.) |
84 |
+# |
85 |
+# Another annoyance is that the upstream Makefile uses app-arch/unzip to |
86 |
+# extract a snapshot of AngularJS, but that's only needed when USE=web. |
87 |
+# |
88 |
+MOD_ALIAS=apache2_modules_alias |
89 |
+DEPEND="dev-libs/libltdl:0 |
90 |
+ virtual/mailx |
91 |
+ perl? ( dev-lang/perl:= ) |
92 |
+ web? ( |
93 |
+ app-arch/unzip |
94 |
+ media-libs/gd[jpeg,png] |
95 |
+ lighttpd? ( www-servers/lighttpd[php] ) |
96 |
+ apache2? ( |
97 |
+ || ( |
98 |
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgi] |
99 |
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgid] |
100 |
+ >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_fcgid] ) |
101 |
+ || ( |
102 |
+ dev-lang/php:*[apache2] |
103 |
+ dev-lang/php:*[cgi] |
104 |
+ dev-lang/php:*[fpm] ) |
105 |
+ ) |
106 |
+ )" |
107 |
+RDEPEND="${DEPEND} |
108 |
+ vim-syntax? ( app-vim/nagios-syntax )" |
109 |
+ |
110 |
+S="${WORKDIR}/${MY_P}" |
111 |
+ |
112 |
+pkg_setup() { |
113 |
+ enewgroup nagios |
114 |
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ local myconf |
119 |
+ |
120 |
+ if use perl; then |
121 |
+ myconf="${myconf} --enable-embedded-perl --with-perlcache" |
122 |
+ fi |
123 |
+ |
124 |
+ if use !apache2 && use !lighttpd ; then |
125 |
+ myconf="${myconf} --with-command-group=nagios" |
126 |
+ else |
127 |
+ if use apache2 ; then |
128 |
+ myconf="${myconf} --with-command-group=apache" |
129 |
+ myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
130 |
+ elif use lighttpd ; then |
131 |
+ myconf="${myconf} --with-command-group=lighttpd" |
132 |
+ fi |
133 |
+ fi |
134 |
+ |
135 |
+ econf ${myconf} \ |
136 |
+ --prefix=/usr \ |
137 |
+ --bindir=/usr/sbin \ |
138 |
+ --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
139 |
+ --datadir=/usr/share/nagios/htdocs \ |
140 |
+ --localstatedir=/var/nagios \ |
141 |
+ --sysconfdir=/etc/nagios \ |
142 |
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins |
143 |
+} |
144 |
+ |
145 |
+src_compile() { |
146 |
+ emake CC=$(tc-getCC) nagios |
147 |
+ |
148 |
+ if use web; then |
149 |
+ # Only compile the CGIs/HTML when USE=web is set. |
150 |
+ emake CC=$(tc-getCC) DESTDIR="${D}" cgis html |
151 |
+ fi |
152 |
+} |
153 |
+ |
154 |
+src_install() { |
155 |
+ dodoc Changelog CONTRIBUTING.md README.md THANKS UPGRADING |
156 |
+ |
157 |
+ # There is no way to install the CGIs unstripped from the top-level |
158 |
+ # makefile, so descend into base/ here. The empty INSTALL_OPTS |
159 |
+ # ensures that root:root: owns the nagios executables. |
160 |
+ cd "${S}/base" || die |
161 |
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped |
162 |
+ cd "${S}" || die |
163 |
+ |
164 |
+ # Otherwise this gets installed as 770 and you get "access denied" |
165 |
+ # for some reason or other when starting nagios. The permissions |
166 |
+ # on nagiostats are just for consistency (these should both get |
167 |
+ # fixed upstream). |
168 |
+ fperms 775 /usr/sbin/nagios /usr/sbin/nagiostats |
169 |
+ |
170 |
+ # INSTALL_OPTS are needed for most of install-basic, but we don't |
171 |
+ # want them on the LIBEXECDIR, argh. |
172 |
+ emake DESTDIR="${D}" install-basic |
173 |
+ fowners root:root /usr/$(get_libdir)/nagios/plugins |
174 |
+ |
175 |
+ # Don't make the configuration owned by the nagios user, because |
176 |
+ # then he can edit nagios.cfg and trick nagios into running as root |
177 |
+ # and doing his bidding. |
178 |
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-config |
179 |
+ |
180 |
+ # No INSTALL_OPTS used in install-commandmode, thankfully. |
181 |
+ emake DESTDIR="${D}" install-commandmode |
182 |
+ |
183 |
+ if use web; then |
184 |
+ # There is no way to install the CGIs unstripped from the |
185 |
+ # top-level makefile, so descend into cgi/ here. The empty |
186 |
+ # INSTALL_OPTS ensures that root:root: owns the CGI executables. |
187 |
+ cd "${S}/cgi" || die |
188 |
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped |
189 |
+ cd "${S}" || die |
190 |
+ |
191 |
+ # install-html installs the new exfoliation theme |
192 |
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-html |
193 |
+ |
194 |
+ if use classicui; then |
195 |
+ # This overwrites the already-installed exfoliation theme |
196 |
+ emake INSTALL_OPTS="" DESTDIR="${D}" install-classicui |
197 |
+ fi |
198 |
+ |
199 |
+ # Install cute Gentoo icons (bug #388323), setting their |
200 |
+ # owner, group, and mode to match those of the rest of Nagios's |
201 |
+ # images. |
202 |
+ insinto /usr/share/nagios/htdocs/images/logos |
203 |
+ doins "${WORKDIR}/${GENTOO_ICONS}"/*.* |
204 |
+ fi |
205 |
+ |
206 |
+ newinitd startup/openrc-init nagios |
207 |
+ |
208 |
+ if use web ; then |
209 |
+ if use apache2 ; then |
210 |
+ # Install the Nagios configuration file for Apache. |
211 |
+ insinto "/etc/apache2/modules.d" |
212 |
+ doins "${FILESDIR}"/99_nagios4.conf |
213 |
+ elif use lighttpd ; then |
214 |
+ # Install the Nagios configuration file for Lighttpd. |
215 |
+ insinto /etc/lighttpd |
216 |
+ newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf |
217 |
+ else |
218 |
+ ewarn "${CATEGORY}/${PF} only supports apache or lighttpd" |
219 |
+ ewarn "out of the box. Since you are not using one of them, you" |
220 |
+ ewarn "will have to configure your webserver yourself." |
221 |
+ fi |
222 |
+ fi |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst() { |
226 |
+ |
227 |
+ if use web; then |
228 |
+ if use apache2 || use lighttpd ; then |
229 |
+ if use apache2; then |
230 |
+ elog "To enable the Nagios web front-end, please edit" |
231 |
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP\"" |
232 |
+ elog "to APACHE2_OPTS. Then Nagios will be available at," |
233 |
+ elog |
234 |
+ elif use lighttpd; then |
235 |
+ elog "To enable the Nagios web front-end, please add" |
236 |
+ elog "'include \"nagios.conf\"' to the lighttpd configuration" |
237 |
+ elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios" |
238 |
+ elog "will be available at," |
239 |
+ elog |
240 |
+ fi |
241 |
+ |
242 |
+ elog " http://localhost/nagios/" |
243 |
+ fi |
244 |
+ fi |
245 |
+ |
246 |
+ elog |
247 |
+ elog "If your kernel has /proc protection, nagios" |
248 |
+ elog "will not be happy as it relies on accessing the proc" |
249 |
+ elog "filesystem. You can fix this by adding nagios into" |
250 |
+ elog "the group wheel, but this is not recomended." |
251 |
+ elog |
252 |
+} |