From a4288afb182d0b3a7d163fcc52248a00d12ccc2c Mon Sep 17 00:00:00 2001 From: Randy McCaskill Date: Sat, 6 Oct 2018 23:03:15 -0400 Subject: [PATCH] New package: nrpe-3.2.1 --- srcpkgs/nrpe/files/nrpe/run | 2 ++ .../nrpe/patches/nrpe-3.2.1-libressl.patch | 29 +++++++++++++++++++ srcpkgs/nrpe/template | 29 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 srcpkgs/nrpe/files/nrpe/run create mode 100644 srcpkgs/nrpe/patches/nrpe-3.2.1-libressl.patch create mode 100644 srcpkgs/nrpe/template diff --git a/srcpkgs/nrpe/files/nrpe/run b/srcpkgs/nrpe/files/nrpe/run new file mode 100644 index 00000000000..72612cf68aa --- /dev/null +++ b/srcpkgs/nrpe/files/nrpe/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec nrpe --no-forking --config=/etc/nagios/nrpe.cfg 2>&1 diff --git a/srcpkgs/nrpe/patches/nrpe-3.2.1-libressl.patch b/srcpkgs/nrpe/patches/nrpe-3.2.1-libressl.patch new file mode 100644 index 00000000000..192de9868a2 --- /dev/null +++ b/srcpkgs/nrpe/patches/nrpe-3.2.1-libressl.patch @@ -0,0 +1,29 @@ +--- src/nrpe.c 2017-09-01 09:59:54.000000000 -0400 ++++ src/nrpe.c.new 2018-10-06 20:05:28.068549927 -0400 +@@ -147,7 +147,7 @@ + ClntCerts client_certs; + SslLogging log_opts; + } sslprm = { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + NULL, NULL, NULL, "ALL:!MD5:@STRENGTH:@SECLEVEL=0", TLSv1_plus, TRUE, 0, SSL_NoLogging}; + #else + NULL, NULL, NULL, "ALL:!MD5:@STRENGTH", TLSv1_plus, TRUE, 0, SSL_NoLogging}; +@@ -344,7 +344,7 @@ + exit(STATE_CRITICAL); + } + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + + SSL_CTX_set_max_proto_version(ctx, 0); + +@@ -445,7 +445,7 @@ + } else { + /* use anonymous DH ciphers */ + if (sslprm.allowDH == 2) { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + strncpy(sslprm.cipher_list, "ADH@SECLEVEL=0", MAX_FILENAME_LENGTH - 1); + #else + strncpy(sslprm.cipher_list, "ADH", MAX_FILENAME_LENGTH - 1); diff --git a/srcpkgs/nrpe/template b/srcpkgs/nrpe/template new file mode 100644 index 00000000000..f6bab5105d4 --- /dev/null +++ b/srcpkgs/nrpe/template @@ -0,0 +1,29 @@ +# Template file for 'nrpe' +pkgname=nrpe +version=3.2.1 +revision=1 +build_style=gnu-configure +configure_args="--with-pkgsysconfdir=/etc/nagios + --with-pluginsdir=/usr/lib/monitoring-plugins --with-nagios-user=_nagios + --with-nagios-group=_nagios --with-nrpe-user=_nagios --with-nrpe-group=_nagios + --with-ssl-inc=${XBPS_CROSS_BASE}/usr/include" +make_build_args="nrpe" +make_install_args="install-daemon install-config" +makedepends="libressl-devel" +depends="monitoring-plugins" +make_dirs="/etc/nagios 0775 _nagios _nagios" +conf_files="/etc/nagios/nrpe.cfg" +system_accounts="_nagios" +short_desc="Nagios Remote Plugin Executor" +maintainer="Randy McCaskill " +license="GPL-2.0-or-later" +homepage="https://github.com/NagiosEnterprises/nrpe" +distfiles="https://github.com/NagiosEnterprises/${pkgname}/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.gz" +checksum=8ad2d1846ab9011fdd2942b8fc0c99dfad9a97e57f4a3e6e394a4ead99c0f1f0 + +post_install() { + vsv nrpe + # remove useless files + rm -f ${DESTDIR}/usr/bin/nrpe-uninstall + rm -f ${DESTDIR}/usr/libexec/check_nrpe +}