1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- update nrpe to version 2.15

- add stage support
- move from net-mgmt/nrpe2 -> net-mgmt/nrpe
  to reflect the port and package name

Changes:
2.15 - 09/06/2013
-----------------
- Now compiles on HP-UX (Grant Byers)
- Added support for IPv6 (Leo Baltus, Eric Stanley)
This commit is contained in:
Olli Hauer 2013-10-04 19:44:10 +00:00
parent 756402b281
commit 0f0fe7b6fc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329368
15 changed files with 100 additions and 136 deletions

1
MOVED
View File

@ -4981,3 +4981,4 @@ www/py-beautifulsoup30||2013-10-03|Outdated, consider using a newer version
comms/umcs784||2013-10-03|Outdated, included in base system as umcs(4)
graphics/libwpg01|graphics/libwpg|2013-10-04|Outdated, consider using a new version
textproc/libwpd08|textproc/libwpd|2013-10-04|Outdated, consider using a new version
net-mgmt/nrpe2|net-mgmt/nrpe|2013-10-04|Reflect the real portname

View File

@ -5,6 +5,18 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20131004:
AFFECTS: users of net-mgmt/nrpe2
AUTHOR: ohauer@FreeBSD.org
The port nrpe2 was updated and moved to nrpe
# portmaster -o net-mgmt/nrpe net-mgmt/nrpe2
or
# portupgrade -fo net-mgmt/nrpe net-mgmt/nrpe2
or
# pkg set -o net-mgmt/nrpe2:net-mgmt/nrpe
20131003:
AFFECTS: users of lang/python* and ports
AUTHOR: mva@FreeBSD.org
@ -18,7 +30,6 @@ you update your ports collection, before attempting any port upgrades.
DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.3
20130929:
AFFECTS: users of x11/pixman
AUTHOR: zeising@FreeBSD.org

74
net-mgmt/nrpe/Makefile Normal file
View File

@ -0,0 +1,74 @@
# Created by: Paul Dlug<paul@nerdlabs.com>
# $FreeBSD$
PORTNAME= nrpe
DISTVERSION= 2.15
CATEGORIES= net-mgmt
MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Nagios Remote Plugin Executor
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
LATEST_LINK= nrpe2
USES= perl5
USE_PERL5= build
USE_RC_SUBR= nrpe2
GNU_CONFIGURE= yes
OPTIONS_DEFINE= SSL ARGS
SSL_DESC= Enable SSL support (disables plain-text server)
ARGS_DESC= Enable command argument processing **Security Risk**
SSL_USE= OPENSSL=yes
SSL_CONFIGURE_ON= --enable-ssl --with-ssl=${OPENSSLDIR} \
--with-ssl-inc=${OPENSSLINC} \
--with-ssl-lib=${OPENSSLLIB}
SSL_CONFIGURE_OFF= --disable-ssl
SSL_CFLAGS= -I${OPENSSLINC}
ARGS_CONFIGURE_ON= --enable-command-args
ARGS_CONFIGURE_OFF= --disable-command-args
.include <bsd.port.options.mk>
NAGIOSUSER?= nagios
NAGIOSGROUP?= nagios
NAGIOSDIR?= /var/spool/nagios
USERS= ${NAGIOSUSER}
GROUPS= ${NAGIOSGROUP}
NAGIOSUID= 181
NAGIOSGID= ${NAGIOSUID}
NRPE_PIDDIR?= /var/run/nrpe2
CONFIGURE_ARGS+=--bindir=${PREFIX}/sbin \
--libexecdir=${PREFIX}/libexec/nagios \
--sysconfdir=${PREFIX}/etc \
--localstatedir=${NAGIOSDIR} \
--with-nrpe-user=${NAGIOSUSER} \
--with-nrpe-group=${NAGIOSGROUP}
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
NAGIOSUID=${NAGIOSUID} \
NRPE_PIDDIR=${NRPE_PIDDIR}
SUB_FILES= pkg-message
post-patch:
@${REINPLACE_CMD} -e 's|/var/run/nrpe.pid|${NRPE_PIDDIR}/nrpe2.pid|g' \
-e 's|/usr/lib/nagios/plugins/|${LOCALBASE}/libexec/nagios/|g' \
-e 's|/usr/bin/sudo|${LOCALBASE}/bin/sudo|g' \
${WRKSRC}/sample-config/nrpe.cfg.in
do-install:
${INSTALL} -d ${STAGEDIR}${NRPE_PIDDIR}
${INSTALL} -m 750 -d ${STAGEDIR}${NAGIOSDIR}
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${STAGEDIR}${PREFIX}/sbin/nrpe2
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${STAGEDIR}${PREFIX}/libexec/nagios/check_nrpe2
${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${STAGEDIR}${PREFIX}/etc/nrpe.cfg.sample
.include <bsd.port.mk>

2
net-mgmt/nrpe/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (nrpe-2.15.tar.gz) = 66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072
SIZE (nrpe-2.15.tar.gz) = 419695

View File

@ -40,7 +40,7 @@ find_pidfile()
if get_pidfile_from_conf pid_file %%PREFIX%%/etc/nrpe.cfg; then
pidfile="$_pidfile_from_conf"
else
pidfile='/var/run/nrpe2/nrpe2.pid'
pidfile='%%PIDDIR%%/nrpe2.pid'
fi
}

View File

@ -4,7 +4,7 @@
nrpe2_enable="YES"
A sample configuration is available in %%PREFIX%%/etc/nrpe.cfg-sample.
A sample configuration is available in %%PREFIX%%/etc/nrpe.cfg.sample.
Copy to nrpe.cfg where required and edit to suit your needs.
**********************************************************************

9
net-mgmt/nrpe/pkg-plist Normal file
View File

@ -0,0 +1,9 @@
@unexec cmp -s %D/etc/nrpe.cfg.sample %D/etc/nrpe.cfg && rm %D/etc/nrpe.cfg || true
etc/nrpe.cfg.sample
@exec test -f %B/nrpe.cfg || install -m 644 %D/%F %B/nrpe.cfg
libexec/nagios/check_nrpe2
sbin/nrpe2
@dirrmtry libexec/nagios
@exec install -m 755 -o %%NAGIOSUID%% -d %%NRPE_PIDDIR%%
@dirrmtry %%NAGIOSDIR%%
@dirrmtry %%NRPE_PIDDIR%%

View File

@ -1,94 +0,0 @@
# Created by: Paul Dlug<paul@nerdlabs.com>
# $FreeBSD$
PORTNAME= nrpe
DISTVERSION= 2.14
CATEGORIES= net-mgmt
MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Nagios Remote Plugin Executor
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
LATEST_LINK= nrpe2
USES= perl5
USE_PERL5= build
USE_RC_SUBR= nrpe2
CONFLICTS= nrpe-1.*
OPTIONS_DEFINE= SSL ARGS
SSL_DESC= Enable SSL support (disables plain-text server)
ARGS_DESC= Enable command argument processing **Security Risk**
GNU_CONFIGURE= yes
NAGIOSUSER?= nagios
NAGIOSGROUP?= nagios
NAGIOSDIR?= /var/spool/nagios
USERS= ${NAGIOSUSER}
GROUPS= ${NAGIOSGROUP}
NAGIOSUID= 181
NAGIOSGID= ${NAGIOSUID}
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
--libexecdir=${PREFIX}/libexec/nagios \
--sysconfdir=${PREFIX}/etc \
--localstatedir=${NAGIOSDIR} \
--with-nrpe-user=${NAGIOSUSER} \
--with-nrpe-group=${NAGIOSGROUP}
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
NAGIOSUSER=${NAGIOSUSER} \
NAGIOSGROUP=${NAGIOSGROUP} \
NAGIOSUID=${NAGIOSUID} \
NAGIOSGID=${NAGIOSGID}
SUB_FILES= pkg-install \
pkg-deinstall \
pkg-message
SUB_LIST= PREFIX=${PREFIX} \
${PLIST_SUB}
NO_STAGE= yes
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MSSL}
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+= --enable-ssl
.else
CONFIGURE_ARGS+= --disable-ssl
.endif
.if ${PORT_OPTIONS:MARGS}
CONFIGURE_ARGS+= --enable-command-args
.else
CONFIGURE_ARGS+= --disable-command-args
.endif
post-patch:
@${REINPLACE_CMD} -e 's#/var/run/nrpe.pid#/var/run/nrpe2/nrpe2.pid#g' \
-e 's#/usr/lib/nagios/plugins/#${LOCALBASE}/libexec/nagios/#g' \
-e 's#/usr/bin/sudo#${LOCALBASE}/bin/sudo#g' \
${WRKSRC}/sample-config/nrpe.cfg.in
pre-install:
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe2
${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
${MKDIR} ${NAGIOSDIR}
post-install:
@${SH} ${PKGINSTALL} ${DISTNAME} POST-INSTALL
@[ -f ${PREFIX}/etc/nrpe.cfg ] || \
${CP} -p ${PREFIX}/etc/nrpe.cfg-sample ${PREFIX}/etc/nrpe.cfg
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,2 +0,0 @@
SHA256 (nrpe-2.14.tar.gz) = 808c7c4a82d0addf15449663e4712b5018c8bbd668e46723139f731f1ac44431
SIZE (nrpe-2.14.tar.gz) = 421635

View File

@ -1,12 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
NAGIOSDIR=%%NAGIOSDIR%%
if [ "$2" = "POST-DEINSTALL" ]; then
if [ -e "${NAGIOSDIR}" ]; then
echo "You should manually remove the \"${NAGIOSDIR}\" directory."
fi
fi

View File

@ -1,18 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
NAGIOSDIR=%%NAGIOSDIR%%
NAGIOSUSER=%%NAGIOSUSER%%
NAGIOSGROUP=%%NAGIOSGROUP%%
NAGIOSUID=%%NAGIOSUID%%
NAGIOSGID=%%NAGIOSGID%%
if [ "$2" = "POST-INSTALL" ]; then
if [ ! -e "${NAGIOSDIR}" ]; then
/bin/mkdir -p "${NAGIOSDIR}"
/bin/chmod 775 "${NAGIOSDIR}"
/usr/sbin/chown "${NAGIOSUSER}":"${NAGIOSGROUP}" "${NAGIOSDIR}"
fi
fi

View File

@ -1,7 +0,0 @@
@unexec cmp -s %D/etc/nrpe.cfg-sample %D/etc/nrpe.cfg && rm %D/etc/nrpe.cfg || true
etc/nrpe.cfg-sample
@exec test -f %B/nrpe.cfg || cp -p %D/%F %B/nrpe.cfg
libexec/nagios/check_nrpe2
@dirrmtry libexec/nagios
sbin/nrpe2
@unexec rmdir %%NAGIOSDIR%% 2>/dev/null || true