1 |
commit: 9dc0aa1615c187829e2d3c1f9019a72559ee185f |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 31 15:43:48 2015 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 31 15:44:05 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dc0aa16 |
7 |
|
8 |
net-analyzer/nrpe: remove old ebuilds and patches. |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
.../nrpe/files/nagios-nrpe-2.13-command-args.patch | 15 -- |
13 |
.../nrpe/files/nagios-nrpe-2.13-multiline.patch | 200 --------------------- |
14 |
.../nrpe/files/nagios-nrpe-2.13-tcpd.patch | 33 ---- |
15 |
net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch | 74 -------- |
16 |
net-analyzer/nrpe/nrpe-2.15-r1.ebuild | 127 ------------- |
17 |
net-analyzer/nrpe/nrpe-2.15.ebuild | 127 ------------- |
18 |
6 files changed, 576 deletions(-) |
19 |
|
20 |
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch |
21 |
deleted file mode 100644 |
22 |
index fe6751a..0000000 |
23 |
--- a/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch |
24 |
+++ /dev/null |
25 |
@@ -1,15 +0,0 @@ |
26 |
---- configure.old 2008-03-10 22:04:41.000000000 +0100 |
27 |
-+++ configure.in 2012-01-04 09:46:38.000000000 +0100 |
28 |
-@@ -362,7 +362,11 @@ |
29 |
- AC_SUBST(NAGIOS_INSTALL_OPTS) |
30 |
- |
31 |
- |
32 |
--AC_ARG_ENABLE(command-args,--enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!,AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS)) |
33 |
-+AC_ARG_ENABLE(command-args,--enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!,[ |
34 |
-+ if test x$enableval = xyes; then |
35 |
-+ AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS) |
36 |
-+ fi |
37 |
-+ ]) |
38 |
- |
39 |
- |
40 |
- AC_PATH_PROG(PERL,perl) |
41 |
|
42 |
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch |
43 |
deleted file mode 100644 |
44 |
index 8d96149..0000000 |
45 |
--- a/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch |
46 |
+++ /dev/null |
47 |
@@ -1,200 +0,0 @@ |
48 |
-diff --git a/include/common.h b/include/common.h |
49 |
-index 202dec4..86f8e32 100755 |
50 |
---- a/include/common.h |
51 |
-+++ b/include/common.h |
52 |
-@@ -41,7 +41,7 @@ |
53 |
- #define DEFAULT_SOCKET_TIMEOUT 10 /* timeout after 10 seconds */ |
54 |
- #define DEFAULT_CONNECTION_TIMEOUT 300 /* timeout if daemon is waiting for connection more than this time */ |
55 |
- |
56 |
--#define MAX_INPUT_BUFFER 2048 /* max size of most buffers we use */ |
57 |
-+#define MAX_INPUT_BUFFER 16384 /* max size of most buffers we use */ |
58 |
- #define MAX_FILENAME_LENGTH 256 |
59 |
- |
60 |
- #define MAX_HOST_ADDRESS_LENGTH 256 /* max size of a host address */ |
61 |
-@@ -55,12 +55,14 @@ |
62 |
- |
63 |
- #define QUERY_PACKET 1 /* id code for a packet containing a query */ |
64 |
- #define RESPONSE_PACKET 2 /* id code for a packet containing a response */ |
65 |
-+#define RESPONSE_PACKET_WITH_MORE 3 /* id code for a packet containing a response, with more data to follow */ |
66 |
- |
67 |
- #define NRPE_PACKET_VERSION_3 3 /* packet version identifier */ |
68 |
- #define NRPE_PACKET_VERSION_2 2 |
69 |
- #define NRPE_PACKET_VERSION_1 1 /* older packet version identifiers (no longer supported) */ |
70 |
- |
71 |
- #define MAX_PACKETBUFFER_LENGTH 1024 /* max amount of data we'll send in one query/response */ |
72 |
-+ /* WARNING - do not change this as older clients/servers will not work */ |
73 |
- |
74 |
- typedef struct packet_struct{ |
75 |
- int16_t packet_version; |
76 |
-diff --git a/src/check_nrpe.c b/src/check_nrpe.c |
77 |
-index 0adced1..ff4b920 100755 |
78 |
---- a/src/check_nrpe.c |
79 |
-+++ b/src/check_nrpe.c |
80 |
-@@ -221,6 +221,11 @@ int main(int argc, char **argv){ |
81 |
- return STATE_UNKNOWN; |
82 |
- } |
83 |
- |
84 |
-+ /* Altinity patch: Allow multiple packets to be received */ |
85 |
-+ /* Indentation not corrected to allow simpler patching */ |
86 |
-+ /* START MULTI_PACKET LOOP */ |
87 |
-+ do { |
88 |
-+ |
89 |
- /* wait for the response packet */ |
90 |
- bytes_to_recv=sizeof(receive_packet); |
91 |
- if(use_ssl==FALSE) |
92 |
-@@ -233,31 +238,24 @@ int main(int argc, char **argv){ |
93 |
- /* reset timeout */ |
94 |
- alarm(0); |
95 |
- |
96 |
-- /* close the connection */ |
97 |
--#ifdef HAVE_SSL |
98 |
-- if(use_ssl==TRUE){ |
99 |
-- SSL_shutdown(ssl); |
100 |
-- SSL_free(ssl); |
101 |
-- SSL_CTX_free(ctx); |
102 |
-- } |
103 |
--#endif |
104 |
-- graceful_close(sd,1000); |
105 |
-- |
106 |
- /* recv() error */ |
107 |
- if(rc<0){ |
108 |
- printf("CHECK_NRPE: Error receiving data from daemon.\n"); |
109 |
-+ graceful_close(sd,1000); |
110 |
- return STATE_UNKNOWN; |
111 |
- } |
112 |
- |
113 |
- /* server disconnected */ |
114 |
- else if(rc==0){ |
115 |
- printf("CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.\n"); |
116 |
-+ graceful_close(sd,1000); |
117 |
- return STATE_UNKNOWN; |
118 |
- } |
119 |
- |
120 |
- /* receive underflow */ |
121 |
- else if(bytes_to_recv<sizeof(receive_packet)){ |
122 |
- printf("CHECK_NRPE: Receive underflow - only %d bytes received (%d expected).\n",bytes_to_recv,sizeof(receive_packet)); |
123 |
-+ graceful_close(sd,1000); |
124 |
- return STATE_UNKNOWN; |
125 |
- } |
126 |
- |
127 |
-@@ -271,21 +269,21 @@ int main(int argc, char **argv){ |
128 |
- calculated_crc32=calculate_crc32((char *)&receive_packet,sizeof(receive_packet)); |
129 |
- if(packet_crc32!=calculated_crc32){ |
130 |
- printf("CHECK_NRPE: Response packet had invalid CRC32.\n"); |
131 |
-- close(sd); |
132 |
-+ graceful_close(sd,1000); |
133 |
- return STATE_UNKNOWN; |
134 |
- } |
135 |
- |
136 |
- /* check packet version */ |
137 |
- if(ntohs(receive_packet.packet_version)!=NRPE_PACKET_VERSION_2){ |
138 |
- printf("CHECK_NRPE: Invalid packet version received from server.\n"); |
139 |
-- close(sd); |
140 |
-+ graceful_close(sd,1000); |
141 |
- return STATE_UNKNOWN; |
142 |
- } |
143 |
- |
144 |
- /* check packet type */ |
145 |
-- if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET){ |
146 |
-+ if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET && ntohs(receive_packet.packet_type)!=RESPONSE_PACKET_WITH_MORE){ |
147 |
- printf("CHECK_NRPE: Invalid packet type received from server.\n"); |
148 |
-- close(sd); |
149 |
-+ graceful_close(sd,1000); |
150 |
- return STATE_UNKNOWN; |
151 |
- } |
152 |
- |
153 |
-@@ -297,8 +295,18 @@ int main(int argc, char **argv){ |
154 |
- if(!strcmp(receive_packet.buffer,"")) |
155 |
- printf("CHECK_NRPE: No output returned from daemon.\n"); |
156 |
- else |
157 |
-- printf("%s\n",receive_packet.buffer); |
158 |
-- } |
159 |
-+ printf("%s",receive_packet.buffer); |
160 |
-+ |
161 |
-+ } while (ntohs(receive_packet.packet_type)==RESPONSE_PACKET_WITH_MORE); |
162 |
-+ /* END MULTI_PACKET LOOP */ |
163 |
-+ |
164 |
-+ /* Finish output with newline */ |
165 |
-+ printf("\n"); |
166 |
-+ |
167 |
-+ /* close the connection */ |
168 |
-+ graceful_close(sd,1000); |
169 |
-+ |
170 |
-+ } |
171 |
- |
172 |
- /* reset the alarm */ |
173 |
- else |
174 |
-@@ -434,6 +442,14 @@ int graceful_close(int sd, int timeout){ |
175 |
- struct timeval tv; |
176 |
- char buf[1000]; |
177 |
- |
178 |
-+#ifdef HAVE_SSL |
179 |
-+ if(use_ssl==TRUE){ |
180 |
-+ SSL_shutdown(ssl); |
181 |
-+ SSL_free(ssl); |
182 |
-+ SSL_CTX_free(ctx); |
183 |
-+ } |
184 |
-+#endif |
185 |
-+ |
186 |
- /* send FIN packet */ |
187 |
- shutdown(sd,SHUT_WR); |
188 |
- for(;;){ |
189 |
-diff --git a/src/nrpe.c b/src/nrpe.c |
190 |
-index f2b0164..dfa8262 100755 |
191 |
---- a/src/nrpe.c |
192 |
-+++ b/src/nrpe.c |
193 |
-@@ -972,6 +972,8 @@ void handle_connection(int sock){ |
194 |
- char processed_command[MAX_INPUT_BUFFER]; |
195 |
- int result=STATE_OK; |
196 |
- int early_timeout=FALSE; |
197 |
-+ int bytes_copied=0; |
198 |
-+ char *pbuffer=&buffer[0]; |
199 |
- int rc; |
200 |
- int x; |
201 |
- #ifdef DEBUG |
202 |
-@@ -1188,6 +1190,14 @@ void handle_connection(int sock){ |
203 |
- if(buffer[strlen(buffer)-1]=='\n') |
204 |
- buffer[strlen(buffer)-1]='\x0'; |
205 |
- |
206 |
-+ /* Altinity patch to allow multi packet responses */ |
207 |
-+ /* Loop not indented to allow easier patching */ |
208 |
-+ /* START MULTI_PACKET LOOP */ |
209 |
-+ do { |
210 |
-+ |
211 |
-+ if(debug==TRUE) |
212 |
-+ syslog(LOG_DEBUG,"Sending response - bytes left: %d", strlen(pbuffer)); |
213 |
-+ |
214 |
- /* clear the response packet buffer */ |
215 |
- bzero(&send_packet,sizeof(send_packet)); |
216 |
- |
217 |
-@@ -1196,11 +1206,17 @@ void handle_connection(int sock){ |
218 |
- |
219 |
- /* initialize response packet data */ |
220 |
- send_packet.packet_version=(int16_t)htons(NRPE_PACKET_VERSION_2); |
221 |
-- send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET); |
222 |
- send_packet.result_code=(int16_t)htons(result); |
223 |
-- strncpy(&send_packet.buffer[0],buffer,MAX_PACKETBUFFER_LENGTH); |
224 |
-+ strncpy(&send_packet.buffer[0],pbuffer,MAX_PACKETBUFFER_LENGTH); |
225 |
- send_packet.buffer[MAX_PACKETBUFFER_LENGTH-1]='\x0'; |
226 |
-- |
227 |
-+ |
228 |
-+ bytes_copied = strlen(&send_packet.buffer[0]); |
229 |
-+ pbuffer = pbuffer+bytes_copied; |
230 |
-+ if(strlen(pbuffer)>0) |
231 |
-+ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET_WITH_MORE); |
232 |
-+ else |
233 |
-+ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET); |
234 |
-+ |
235 |
- /* calculate the crc 32 value of the packet */ |
236 |
- send_packet.crc32_value=(u_int32_t)0L; |
237 |
- calculated_crc32=calculate_crc32((char *)&send_packet,sizeof(send_packet)); |
238 |
-@@ -1219,6 +1235,9 @@ void handle_connection(int sock){ |
239 |
- SSL_write(ssl,&send_packet,bytes_to_send); |
240 |
- #endif |
241 |
- |
242 |
-+ } while (strlen(pbuffer) > 0); |
243 |
-+ /* END MULTI_PACKET LOOP */ |
244 |
-+ |
245 |
- #ifdef HAVE_SSL |
246 |
- if(ssl){ |
247 |
- SSL_shutdown(ssl); |
248 |
|
249 |
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch |
250 |
deleted file mode 100644 |
251 |
index 67dd22e..0000000 |
252 |
--- a/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch |
253 |
+++ /dev/null |
254 |
@@ -1,33 +0,0 @@ |
255 |
---- configure.in.orig 2008-03-10 22:04:41.000000000 +0100 |
256 |
-+++ configure.in 2012-01-08 17:59:49.804613011 +0100 |
257 |
-@@ -147,11 +147,27 @@ |
258 |
- AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") |
259 |
- AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") |
260 |
- AC_SUBST(SOCKETLIBS) |
261 |
--AC_CHECK_LIB(wrap,main,[ |
262 |
-- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" |
263 |
-+ |
264 |
-+AC_ARG_ENABLE(tcp-wrapper,--enable-tcp-wrapper enables support for TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! (default: auto),[ |
265 |
-+ if test x$enableval = xyes; then |
266 |
-+ enable_tcp_wrapper=yes |
267 |
-+ else |
268 |
-+ enable_tcp_wrapper=no |
269 |
-+ fi |
270 |
-+ ],enable_tcp_wrapper="auto") |
271 |
-+ |
272 |
-+LIBWRAPLIBS="" |
273 |
-+if test "x$enable_tcp_wrapper" = "xauto"; then |
274 |
-+ AC_CHECK_LIB(wrap,main,[ |
275 |
-+ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" |
276 |
-+ AC_DEFINE(HAVE_LIBWRAP) |
277 |
-+ ]) |
278 |
-+elif test "x$enable_tcp_wrapper" = "xyes"; then |
279 |
-+ AC_CHECK_LIB(wrap,main,LIBWRAPLIBS="$LIBWRAPLIBS -lwrap",[AC_MSG_ERROR([TCP wrapper library not found])]) |
280 |
- AC_DEFINE(HAVE_LIBWRAP) |
281 |
-- ]) |
282 |
-+fi |
283 |
- AC_SUBST(LIBWRAPLIBS) |
284 |
-+ |
285 |
- AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket) |
286 |
- |
287 |
- dnl socklen_t check - from curl |
288 |
|
289 |
diff --git a/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch b/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch |
290 |
deleted file mode 100644 |
291 |
index f18bc31..0000000 |
292 |
--- a/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch |
293 |
+++ /dev/null |
294 |
@@ -1,74 +0,0 @@ |
295 |
---- nrpe-2.14.orig/configure.in |
296 |
-+++ nrpe-2.14/configure.in |
297 |
-@@ -1,12 +1,8 @@ |
298 |
- dnl Process this -*-m4-*- file with autoconf to produce a configure script. |
299 |
- |
300 |
--dnl Disable caching |
301 |
--define([AC_CACHE_LOAD],) |
302 |
--define([AC_CACHE_SAVE],) |
303 |
-- |
304 |
--2.14([nrpe],[2.13],[nagios-users@×××××××××××××××××.net],[nrpe],[http://www.nagios.org]) |
305 |
-+AC_INIT([nrpe],[2.14],[nagios-users@×××××××××××××××××.net],[nrpe],[http://www.nagios.org]) |
306 |
- AC_CONFIG_SRCDIR([src/nrpe.c]) |
307 |
--AC_CONFIG_HEADERS([include/config.h]) |
308 |
-+ |
309 |
- AC_CONFIG_FILES([Makefile |
310 |
- subst |
311 |
- src/Makefile |
312 |
-@@ -16,7 +12,8 @@ |
313 |
- init-script.suse |
314 |
- nrpe.spec |
315 |
- sample-config/nrpe.cfg |
316 |
-- sample-config/nrpe.xinetd]) |
317 |
-+ sample-config/nrpe.xinetd |
318 |
-+ include/config.h]) |
319 |
- AC_PREFIX_DEFAULT(/usr/local/nagios) |
320 |
- |
321 |
- PKG_NAME=nrpe |
322 |
-@@ -45,7 +42,7 @@ |
323 |
- AC_HEADER_STDC |
324 |
- AC_HEADER_TIME |
325 |
- AC_HEADER_SYS_WAIT |
326 |
--AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h) |
327 |
-+AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h) |
328 |
- |
329 |
- dnl Checks for typedefs, structures, and compiler characteristics. |
330 |
- AC_C_CONST |
331 |
-@@ -164,11 +161,20 @@ |
332 |
- AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") |
333 |
- AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") |
334 |
- AC_SUBST(SOCKETLIBS) |
335 |
--AC_CHECK_LIB(wrap,main,[ |
336 |
-- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" |
337 |
-+ |
338 |
-+AC_ARG_ENABLE([tcp-wrapper], |
339 |
-+ AS_HELP_STRING([--disable-tcp-wrapper], [Disable building with TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! @<:@default=enable@:>@])) |
340 |
-+ |
341 |
-+LIBWRAPLIBS="" |
342 |
-+AS_IF([test "x$enable_tcp_wrapper" != "xno"], [ |
343 |
-+ AC_CHECK_LIB([wrap],[hosts_access],[ |
344 |
-+ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" |
345 |
- AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library]) |
346 |
-- ]) |
347 |
-+ AC_DEFINE(HAVE_TCPD_H,[1],[Have the TCP wrappers library]) |
348 |
-+ ]) |
349 |
-+]) |
350 |
- AC_SUBST(LIBWRAPLIBS) |
351 |
-+ |
352 |
- AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket) |
353 |
- |
354 |
- dnl socklen_t check - from curl |
355 |
-@@ -438,8 +444,11 @@ |
356 |
- AC_SUBST(TARGET_PLATFORM) |
357 |
- |
358 |
- AC_ARG_ENABLE([command-args], |
359 |
-- AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]), |
360 |
-- AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments])) |
361 |
-+ AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!])) |
362 |
-+ |
363 |
-+AS_IF([test "x$enable_command_args" = "xyes"], [ |
364 |
-+ AC_DEFINE(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments]) |
365 |
-+]) |
366 |
- |
367 |
- AC_ARG_ENABLE([bash-command-substitution], |
368 |
- AS_HELP_STRING([--enable-bash-command-substitution],[allows clients to pass bash command substitutions of the form $(command). *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option!]), |
369 |
|
370 |
diff --git a/net-analyzer/nrpe/nrpe-2.15-r1.ebuild b/net-analyzer/nrpe/nrpe-2.15-r1.ebuild |
371 |
deleted file mode 100644 |
372 |
index 4da6838..0000000 |
373 |
--- a/net-analyzer/nrpe/nrpe-2.15-r1.ebuild |
374 |
+++ /dev/null |
375 |
@@ -1,127 +0,0 @@ |
376 |
-# Copyright 1999-2014 Gentoo Foundation |
377 |
-# Distributed under the terms of the GNU General Public License v2 |
378 |
-# $Id$ |
379 |
- |
380 |
-EAPI=5 |
381 |
-inherit eutils systemd toolchain-funcs multilib user autotools |
382 |
- |
383 |
-DESCRIPTION="Nagios Remote Plugin Executor" |
384 |
-HOMEPAGE="http://www.nagios.org/" |
385 |
-SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz" |
386 |
- |
387 |
-LICENSE="GPL-2+" |
388 |
-SLOT="0" |
389 |
-KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
390 |
-IUSE="command-args ssl tcpd minimal" |
391 |
- |
392 |
-DEPEND="ssl? ( dev-libs/openssl ) |
393 |
- !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" |
394 |
-RDEPEND="${DEPEND} |
395 |
- !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )" |
396 |
- |
397 |
-pkg_setup() { |
398 |
- enewgroup nagios |
399 |
- enewuser nagios -1 /bin/bash /dev/null nagios |
400 |
- |
401 |
- elog "If you plan to use \"nrpe_check_control\" then you may want to specify" |
402 |
- elog "different command and services files. You can override the defaults" |
403 |
- elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables." |
404 |
- elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}" |
405 |
- elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}" |
406 |
-} |
407 |
- |
408 |
-src_prepare() { |
409 |
- # Add support for large output, |
410 |
- # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html |
411 |
- epatch "${FILESDIR}"/${PN}-2.14-multiline.patch |
412 |
- # fix configure, among others #326367, #397603 |
413 |
- epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch |
414 |
- # otherwise autoconf will overwrite the custom include/config.h.in |
415 |
- epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch |
416 |
- # improve handling of metachars for security |
417 |
- epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch |
418 |
- |
419 |
- sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die |
420 |
- |
421 |
- # change the default location of the pid file |
422 |
- sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die |
423 |
- |
424 |
- # fix TFU handling of autoheader |
425 |
- sed -i -e '/#undef/d' include/config.h.in || die |
426 |
- |
427 |
- eautoreconf |
428 |
-} |
429 |
- |
430 |
-src_configure() { |
431 |
- local myconf |
432 |
- if use minimal; then |
433 |
- myconf="--disable-tcp-wrapper --disable-command-args" |
434 |
- else |
435 |
- myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)" |
436 |
- fi |
437 |
- |
438 |
- econf \ |
439 |
- --libexecdir=/usr/$(get_libdir)/nagios/plugins \ |
440 |
- --localstatedir=/var/nagios \ |
441 |
- --sysconfdir=/etc/nagios \ |
442 |
- --with-nrpe-user=nagios \ |
443 |
- --with-nrpe-group=nagios \ |
444 |
- $(use_enable ssl) \ |
445 |
- ${myconf} |
446 |
-} |
447 |
- |
448 |
-src_compile() { |
449 |
- emake -C src check_nrpe $(use minimal || echo nrpe) |
450 |
- |
451 |
- # Add nifty nrpe check tool |
452 |
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \ |
453 |
- -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \ |
454 |
- -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \ |
455 |
- ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die |
456 |
-} |
457 |
- |
458 |
-src_install() { |
459 |
- dodoc LEGAL Changelog README SECURITY \ |
460 |
- contrib/README.nrpe_check_control \ |
461 |
- $(use ssl && echo README.SSL) |
462 |
- |
463 |
- exeinto /usr/$(get_libdir)/nagios/plugins |
464 |
- doexe src/check_nrpe nrpe_check_control |
465 |
- |
466 |
- use minimal && return 0 |
467 |
- |
468 |
- ## NON-MINIMAL INSTALL FOLLOWS ## |
469 |
- |
470 |
- insinto /etc/nagios |
471 |
- newins sample-config/nrpe.cfg nrpe.cfg |
472 |
- fowners root:nagios /etc/nagios/nrpe.cfg |
473 |
- fperms 0640 /etc/nagios/nrpe.cfg |
474 |
- |
475 |
- exeinto /usr/libexec |
476 |
- doexe src/nrpe |
477 |
- |
478 |
- newinitd "${FILESDIR}"/nrpe.init nrpe |
479 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
480 |
- |
481 |
- insinto /etc/xinetd.d/ |
482 |
- newins "${FILESDIR}/nrpe.xinetd.2" nrpe |
483 |
- |
484 |
- if use tcpd; then |
485 |
- sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \ |
486 |
- "${D}"/etc/init.d/nrpe |
487 |
- fi |
488 |
-} |
489 |
- |
490 |
-pkg_postinst() { |
491 |
- elog "If you are using the nrpe daemon, remember to edit" |
492 |
- elog "the config file /etc/nagios/nrpe.cfg" |
493 |
- |
494 |
- if use command-args ; then |
495 |
- ewarn "" |
496 |
- ewarn "You have enabled command-args for NRPE. This enables" |
497 |
- ewarn "the ability for clients to supply arguments to commands" |
498 |
- ewarn "which should be run. " |
499 |
- ewarn "THIS IS CONSIDERED A SECURITY RISK!" |
500 |
- ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info" |
501 |
- fi |
502 |
-} |
503 |
|
504 |
diff --git a/net-analyzer/nrpe/nrpe-2.15.ebuild b/net-analyzer/nrpe/nrpe-2.15.ebuild |
505 |
deleted file mode 100644 |
506 |
index 51046f6..0000000 |
507 |
--- a/net-analyzer/nrpe/nrpe-2.15.ebuild |
508 |
+++ /dev/null |
509 |
@@ -1,127 +0,0 @@ |
510 |
-# Copyright 1999-2014 Gentoo Foundation |
511 |
-# Distributed under the terms of the GNU General Public License v2 |
512 |
-# $Id$ |
513 |
- |
514 |
-EAPI=4 |
515 |
- |
516 |
-inherit eutils toolchain-funcs multilib user autotools |
517 |
- |
518 |
-DESCRIPTION="Nagios Remote Plugin Executor" |
519 |
-HOMEPAGE="http://www.nagios.org/" |
520 |
-SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz" |
521 |
- |
522 |
-LICENSE="GPL-2+" |
523 |
-SLOT="0" |
524 |
-KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86" |
525 |
-IUSE="command-args ssl tcpd minimal" |
526 |
- |
527 |
-DEPEND="ssl? ( dev-libs/openssl ) |
528 |
- !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" |
529 |
-RDEPEND="${DEPEND} |
530 |
- !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )" |
531 |
- |
532 |
-pkg_setup() { |
533 |
- enewgroup nagios |
534 |
- enewuser nagios -1 /bin/bash /dev/null nagios |
535 |
- |
536 |
- elog "If you plan to use \"nrpe_check_control\" then you may want to specify" |
537 |
- elog "different command and services files. You can override the defaults" |
538 |
- elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables." |
539 |
- elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}" |
540 |
- elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}" |
541 |
-} |
542 |
- |
543 |
-src_prepare() { |
544 |
- # Add support for large output, |
545 |
- # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html |
546 |
- epatch "${FILESDIR}"/${PN}-2.14-multiline.patch |
547 |
- # fix configure, among others #326367, #397603 |
548 |
- epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch |
549 |
- # otherwise autoconf will overwrite the custom include/config.h.in |
550 |
- epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch |
551 |
- # improve handling of metachars for security |
552 |
- epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch |
553 |
- |
554 |
- sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die |
555 |
- |
556 |
- # change the default location of the pid file |
557 |
- sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die |
558 |
- |
559 |
- # fix TFU handling of autoheader |
560 |
- sed -i -e '/#undef/d' include/config.h.in || die |
561 |
- |
562 |
- eautoreconf |
563 |
-} |
564 |
- |
565 |
-src_configure() { |
566 |
- local myconf |
567 |
- if use minimal; then |
568 |
- myconf="--disable-tcp-wrapper --disable-command-args" |
569 |
- else |
570 |
- myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)" |
571 |
- fi |
572 |
- |
573 |
- econf \ |
574 |
- --libexecdir=/usr/$(get_libdir)/nagios/plugins \ |
575 |
- --localstatedir=/var/nagios \ |
576 |
- --sysconfdir=/etc/nagios \ |
577 |
- --with-nrpe-user=nagios \ |
578 |
- --with-nrpe-group=nagios \ |
579 |
- $(use_enable ssl) \ |
580 |
- ${myconf} |
581 |
-} |
582 |
- |
583 |
-src_compile() { |
584 |
- emake -C src check_nrpe $(use minimal || echo nrpe) |
585 |
- |
586 |
- # Add nifty nrpe check tool |
587 |
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \ |
588 |
- -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \ |
589 |
- -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \ |
590 |
- ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die |
591 |
-} |
592 |
- |
593 |
-src_install() { |
594 |
- dodoc LEGAL Changelog README SECURITY \ |
595 |
- contrib/README.nrpe_check_control \ |
596 |
- $(use ssl && echo README.SSL) |
597 |
- |
598 |
- exeinto /usr/$(get_libdir)/nagios/plugins |
599 |
- doexe src/check_nrpe nrpe_check_control |
600 |
- |
601 |
- use minimal && return 0 |
602 |
- |
603 |
- ## NON-MINIMAL INSTALL FOLLOWS ## |
604 |
- |
605 |
- insinto /etc/nagios |
606 |
- newins sample-config/nrpe.cfg nrpe.cfg |
607 |
- fowners root:nagios /etc/nagios/nrpe.cfg |
608 |
- fperms 0640 /etc/nagios/nrpe.cfg |
609 |
- |
610 |
- exeinto /usr/libexec |
611 |
- doexe src/nrpe |
612 |
- |
613 |
- newinitd "${FILESDIR}"/nrpe.init nrpe |
614 |
- |
615 |
- insinto /etc/xinetd.d/ |
616 |
- newins "${FILESDIR}/nrpe.xinetd.2" nrpe |
617 |
- |
618 |
- if use tcpd; then |
619 |
- sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \ |
620 |
- "${D}"/etc/init.d/nrpe |
621 |
- fi |
622 |
-} |
623 |
- |
624 |
-pkg_postinst() { |
625 |
- elog "If you are using the nrpe daemon, remember to edit" |
626 |
- elog "the config file /etc/nagios/nrpe.cfg" |
627 |
- |
628 |
- if use command-args ; then |
629 |
- ewarn "" |
630 |
- ewarn "You have enabled command-args for NRPE. This enables" |
631 |
- ewarn "the ability for clients to supply arguments to commands" |
632 |
- ewarn "which should be run. " |
633 |
- ewarn "THIS IS CONSIDERED A SECURITY RISK!" |
634 |
- ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info" |
635 |
- fi |
636 |
-} |