From 53948195238776377fb5b3cae97247944ec3907a Mon Sep 17 00:00:00 2001 From: sthen Date: Thu, 21 Apr 2011 11:23:38 +0000 Subject: [PATCH] - switch to Icinga's fork of nrpe (it hasn't changed much; mostly auto* changes and v6 support) - remove unnecessary /dev/*random patch - force libwrap detection via autoconf variables, it's less intrusive than patching configure --- net/nagios/nrpe/Makefile | 22 ++++++++------ net/nagios/nrpe/distinfo | 10 +++---- net/nagios/nrpe/patches/patch-configure | 35 ----------------------- net/nagios/nrpe/patches/patch-src_nrpe_c | 14 ++++----- net/nagios/nrpe/patches/patch-src_utils_c | 14 --------- 5 files changed, 25 insertions(+), 70 deletions(-) delete mode 100644 net/nagios/nrpe/patches/patch-configure delete mode 100644 net/nagios/nrpe/patches/patch-src_utils_c diff --git a/net/nagios/nrpe/Makefile b/net/nagios/nrpe/Makefile index 0aa5f899722..f7a76b90fa4 100644 --- a/net/nagios/nrpe/Makefile +++ b/net/nagios/nrpe/Makefile @@ -1,9 +1,11 @@ -# $OpenBSD: Makefile,v 1.13 2011/01/20 14:04:42 sthen Exp $ +# $OpenBSD: Makefile,v 1.14 2011/04/21 11:23:38 sthen Exp $ COMMENT= Nagios Remote Plugin Executor -DISTNAME= nrpe-2.12 -REVISION= 2 +# packaged from Icinga git repo. +DISTNAME= icinga-nrpe-2.12.20100914 +PKGNAME= ${DISTNAME:S/icinga-//} +WRKDIST= ${WRKDIR}/icinga-nrpe CATEGORIES= net MAINTAINER= Stuart Henderson @@ -14,18 +16,20 @@ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes + WANTLIB= c crypto ssl wrap -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} +MASTER_SITES= http://spacehopper.org/mirrors/ RUN_DEPENDS= net/nagios/plugins CONFIGURE_STYLE= gnu -CONFIGURE_ARGS+=--enable-command-args -CONFIGURE_ARGS+=--libexecdir=${LOCALBASE}/libexec/nagios -CONFIGURE_ARGS+=--with-nrpe-user=_nrpe -CONFIGURE_ARGS+=--with-nrpe-group=_nrpe -CONFIGURE_ARGS+=--with-kerberos-inc=/usr/include/kerberosV/ +CONFIGURE_ARGS+=--enable-command-args \ + --libexecdir=${LOCALBASE}/libexec/nagios \ + --with-nrpe-user=_nrpe \ + --with-nrpe-group=_nrpe \ + --with-kerberos-inc=/usr/include/kerberosV/ \ + ac_cv_lib_wrap_main=yes pre-configure: @${SUBST_CMD} ${WRKSRC}/src/nrpe.c diff --git a/net/nagios/nrpe/distinfo b/net/nagios/nrpe/distinfo index 0c7ae4e7c52..e2db69cf6c3 100644 --- a/net/nagios/nrpe/distinfo +++ b/net/nagios/nrpe/distinfo @@ -1,5 +1,5 @@ -MD5 (nrpe-2.12.tar.gz) = stdeKWLx4xUe9YeU1gyelw== -RMD160 (nrpe-2.12.tar.gz) = NBP4TJu5JqTdVcwC17CgG9f8me4= -SHA1 (nrpe-2.12.tar.gz) = IIWVwXXXJujjd9VlshiX9N4WSMw= -SHA256 (nrpe-2.12.tar.gz) = fo0JOr731//HIZrTNII722EhId9A3i267JxtCt6wTPw= -SIZE (nrpe-2.12.tar.gz) = 405725 +MD5 (icinga-nrpe-2.12.20100914.tar.gz) = S3fFevjHWdmnhNeon59FSg== +RMD160 (icinga-nrpe-2.12.20100914.tar.gz) = DmFg7tP0zQmaHgTXAE+Fr/1brko= +SHA1 (icinga-nrpe-2.12.20100914.tar.gz) = IGpeK2Xnqs9+xust0aWKrJXlwG4= +SHA256 (icinga-nrpe-2.12.20100914.tar.gz) = fEEX3He6VPrC4XFGmpD7+dFdT6Gy9oL2bmwazKMO34I= +SIZE (icinga-nrpe-2.12.20100914.tar.gz) = 410907 diff --git a/net/nagios/nrpe/patches/patch-configure b/net/nagios/nrpe/patches/patch-configure deleted file mode 100644 index 16c8a39818f..00000000000 --- a/net/nagios/nrpe/patches/patch-configure +++ /dev/null @@ -1,35 +0,0 @@ -$OpenBSD: patch-configure,v 1.2 2008/11/13 08:33:16 sthen Exp $ ---- configure.orig Mon Mar 10 21:04:41 2008 -+++ configure Tue Nov 4 10:35:59 2008 -@@ -6055,6 +6055,8 @@ _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+int allow_severity; -+int deny_severity; - - - int -@@ -6187,6 +6189,8 @@ cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - -+extern int allow_severity=0; -+extern int deny_severity=0; - - int - main () -@@ -6670,10 +6674,12 @@ echo $ECHO_N "checking for SSL libraries... $ECHO_C" > - found_ssl=no - for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib /usr/freeware/lib/openssl; do - ssllibdir="$dir" -- if test -f "$dir/libssl.so"; then -+ for i in $dir/libssl.so*; do -+ if test -f "$i"; then - found_ssl=yes - break - fi -+ done - done - - if test x_$found_ssl != x_yes; then diff --git a/net/nagios/nrpe/patches/patch-src_nrpe_c b/net/nagios/nrpe/patches/patch-src_nrpe_c index 08b7bd6aad6..4cd7197eeac 100644 --- a/net/nagios/nrpe/patches/patch-src_nrpe_c +++ b/net/nagios/nrpe/patches/patch-src_nrpe_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-src_nrpe_c,v 1.4 2009/01/10 16:56:42 sturm Exp $ ---- src/nrpe.c.orig Mon Mar 10 22:04:43 2008 -+++ src/nrpe.c Fri Jan 9 18:12:19 2009 +$OpenBSD: patch-src_nrpe_c,v 1.5 2011/04/21 11:23:38 sthen Exp $ +--- src/nrpe.c.orig Tue Sep 14 16:51:48 2010 ++++ src/nrpe.c Thu Apr 21 10:56:51 2011 @@ -23,6 +23,8 @@ #include "../include/nrpe.h" #include "../include/utils.h" @@ -10,16 +10,16 @@ $OpenBSD: patch-src_nrpe_c,v 1.4 2009/01/10 16:56:42 sturm Exp $ #ifdef HAVE_SSL #include "../include/dh.h" #endif -@@ -47,7 +49,7 @@ int use_ssl=FALSE; +@@ -54,7 +56,7 @@ int num_listen_socks = 0; char *command_name=NULL; char *macro_argv[MAX_COMMAND_ARGUMENTS]; -char config_file[MAX_INPUT_BUFFER]="nrpe.cfg"; +char config_file[MAX_INPUT_BUFFER]="${SYSCONFDIR}/nrpe.cfg"; int log_facility=LOG_DAEMON; - int server_port=DEFAULT_SERVER_PORT; - char server_address[16]="0.0.0.0"; -@@ -800,8 +802,14 @@ void wait_for_connections(void){ + + char *server_port=DEFAULT_SERVER_PORT; +@@ -836,8 +838,14 @@ void wait_for_connections(void){ continue; /* socket is nonblocking and we don't have a connection yet */ diff --git a/net/nagios/nrpe/patches/patch-src_utils_c b/net/nagios/nrpe/patches/patch-src_utils_c deleted file mode 100644 index 1f0ddd827af..00000000000 --- a/net/nagios/nrpe/patches/patch-src_utils_c +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_utils_c,v 1.2 2007/09/06 19:09:11 sturm Exp $ ---- src/utils.c.orig Tue Dec 12 03:04:01 2006 -+++ src/utils.c Sat Sep 1 09:04:39 2007 -@@ -90,8 +90,8 @@ void randomize_buffer(char *buffer,int buffer_size){ - ends and the rest of the buffer (padded randomly) starts. - ***************************************************************/ - -- /* try to get seed value from /dev/urandom, as its a better source of entropy */ -- fp=fopen("/dev/urandom","r"); -+ /* try to get seed value from /dev/arandom, as its a better source of entropy */ -+ fp=fopen("/dev/arandom","r"); - if(fp!=NULL){ - seed=fgetc(fp); - fclose(fp);