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