summaryrefslogtreecommitdiff
path: root/net-analyzer/nrpe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /net-analyzer/nrpe
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'net-analyzer/nrpe')
-rw-r--r--net-analyzer/nrpe/Manifest3
-rw-r--r--net-analyzer/nrpe/files/nrpe-4.0.2-disable-tcpd.patch62
-rw-r--r--net-analyzer/nrpe/nrpe-4.0.3.ebuild101
3 files changed, 166 insertions, 0 deletions
diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest
index 442444f4c49b..0bdc23c754f3 100644
--- a/net-analyzer/nrpe/Manifest
+++ b/net-analyzer/nrpe/Manifest
@@ -1,7 +1,10 @@
AUX nrpe-3.2.1-eliminate-systemd-pid.patch 1264 BLAKE2B e0fb75dcc231881fd02fba73de02b983098d7762852d5dea497e717e0c978d773c871d35ba8671a4d292896aa276703ea9d2450e053add1ff3f2d6d9f1c53bf1 SHA512 9e8d58dee6c60b48e209a69eaab10abcc5eccfc28edf073240afba3d3e70a36ead4a568fe6589dd8578d11f0149c968c5977742e9905fa0a407b120c6d168570
+AUX nrpe-4.0.2-disable-tcpd.patch 2027 BLAKE2B b5824787353940757e0f2fe270b65debfe0ff9ec757c8066ee99aa8c7c6e3b580cdcb7658b8c11bd337b982209978675f82171945ff1a5ef0591c8480b7f2762 SHA512 0efb848184b33f56db00f8b9ed475558f0987ca7d25447557d88a0af5c529b3c18f3dec5ab7c0197a51d35b143bb563c0dd2d00e12009d666dca4bc804e4b837
AUX nrpe.xinetd.2 245 BLAKE2B 3e9db31c7d5b28dab18d2f5855d0465f25fc9cf4a70deac9a5d0c87c7cc546a33b432dbca172a49addadc0bd6583d870ec0fe350bf60e015e325d8bb923aca47 SHA512 d687cb2a5babfd28a97d3a5f1ac665758341ecc37fdd0193dbf0df4cba68c88aa24776a33a706989843fa5356b2e3e995662a823ceb2b86ba8f846f8c47e18fb
DIST nrpe-4.0.0.tar.gz 523846 BLAKE2B 850a420f0550e1dfe6b0ea98a9d9cafec0ec583c115be89b3ba8e88a309c40226c87f6ae880d12c582822e492c5991e3d2444b68f5644750fc74ad75596c96fd SHA512 8773102f28f3e7e96f3637e77489eb12ffe88fe839abfe3f150d2eb3d2efe05f7f812ab4d52a64cbd8d0a5e491aed93d5300b7ce9a8dd072b3a00d885b91276b
DIST nrpe-4.0.2.tar.gz 524146 BLAKE2B dc100579420eeccaaa2a913f56c76b86b6ebdce8d1afdddcc428bfd4a8c12ad19050ab0395e7a109d4e8b43ca7d6a11e13ec4a4250a91483e37725c184382ca2 SHA512 4d7cf6abc974bc79df54afc42644418e3f086a279c8c17d0fd104f19e3c21c0f3dae4fb4268dd134446ff9fe505159b0446372c5cac71cfe03a97479ed41c09b
+DIST nrpe-4.0.3.tar.gz 524160 BLAKE2B d2c99cadf718e7049c911388b105fb4f5248307c733d94a73fd02ac69c49be230dad58be0a182af9c8d7e0d1f34e8dba6b8fc46a7c01eb15d845f2b3a54499ed SHA512 31d932c481c8a53bd0f8865fb3cfeeb1466b9b05fa89382aa056aa9343a09843b51fe5398fd0388e6bba99e9c3d8093f6033799fd83afd43012bfe8fdc5a33e3
EBUILD nrpe-4.0.0.ebuild 2818 BLAKE2B bb9f9c1d2a73a0209c56dc419f4683036b0abaf6770e9a39be95ed1c7bd59820b978f501d97c5b067fce393f811e73fd4f3478bc9bda723be42ce2712bb46270 SHA512 9251a9b424567a23ef301bdbc3e6f4edcaf57b2e138beca8cf2f9ac4a46f177ce9c361df677a926767ee63c025bad7ab5ab5bf42bd9744e05e9594f32fbe854c
EBUILD nrpe-4.0.2.ebuild 2874 BLAKE2B 0a3135a0421456de630405025c0b8f23f377f1998cf0f74cc44e456ed115fdcfa0642babf3f69815d1406ddb103383ecb985caf028b1fe6e46c68dea85bfb0df SHA512 554ca7a50f3fbe1b51d46df5c502a9282e7edca1001fd88f138827df6acf5e09ef885b81ba650d5d26bdd1ed5e6a62c5edc407521ba054a3be74c56123b868aa
+EBUILD nrpe-4.0.3.ebuild 2770 BLAKE2B 807189a2b10ce8efee80dd4131b115fddf0d538fc5cda633d738b2286cf64e6e1d7cdd121e84d05f059ba95bcc768eae82cf96394ac619627c8dc8399b1ed100 SHA512 3d8cb1bbc09241e6ff7480ce7d03181896dce8a8df8491ec041d71d9b66e33df5bd69bf7aa4c6abdfe2e79788d36cb729240586669333135064faa488b95a19e
MISC metadata.xml 770 BLAKE2B 93991f7ee4c1b6c26b67e873fae0cdb66170cd93ba6b79d6e798cb2605126888a996f633eccd038ece2a822d1b92498c2036746bb3a1add2e336c6026c2db86d SHA512 48693abab21581eff977b8deaa5fabc5d388960c9cd090b590a1f6d3c8d37b63fe33ec86d6f95d7435404314b84053f8c2ca84b0f33c6c7241ea7260f82a3a27
diff --git a/net-analyzer/nrpe/files/nrpe-4.0.2-disable-tcpd.patch b/net-analyzer/nrpe/files/nrpe-4.0.2-disable-tcpd.patch
new file mode 100644
index 000000000000..7140c43d7e8c
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-4.0.2-disable-tcpd.patch
@@ -0,0 +1,62 @@
+Stripped ./configure portion for Gentoo, instead relying on eautoreconf.
+
+From 8bce40cff68c0a7d88b465eb345267ad5176461a Mon Sep 17 00:00:00 2001
+From: Jaco Kroon <jaco@iewc.co.za>
+Date: Mon, 8 Feb 2021 17:07:30 +0200
+Subject: [PATCH] Patch to allow passing --enable-tcpd or --disable-tcpd.
+
+If passing --enable-tcpd and libwrap is not available, ./configure will
+fail.
+
+If passing --disable-tcpd, libwrap will be completely ignore.
+
+If not passed, current behaviour still applies.
+
+Signed-off-by: Jaco Kroon <jaco@iewc.co.za>
+---
+ configure.ac | 28 +++++++++++++++++++++++-----
+ 2 files changed, 52 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3981bb0..e3c1a15 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -237,12 +237,30 @@ AC_CHECK_FUNCS([getopt_long],,AC_CHECK_LIB([iberty],[getopt_long],OTHERLIBS="$OT
+ dnl Checks for library functions.
+ AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
+ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
+-AC_CHECK_LIB(wrap,main,[
+- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+- AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library])
+- AC_TRY_LINK([#include <tcpd.h>
+- ],[int a = rfc931_timeout;],AC_DEFINE(HAVE_RFC931_TIMEOUT))
++
++AC_ARG_ENABLE([tcpd],
++ AS_HELP_STRING([--disable-tcpd],[disables support for tcpd even if present]),[
++ if test x$enableval = xyes; then
++ check_for_tcpd=yes
++ else
++ check_for_tcpd=no
++ fi
++ ],check_for_tcpd=optional)
++
++AC_MSG_CHECKING(check_for_tcpd=$check_for_tcpd)
++if test x$check_for_tcpd != xno; then
++ AC_CHECK_LIB(wrap,main,[
++ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
++ AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library])
++ AC_TRY_LINK([#include <tcpd.h>
++ ],[int a = rfc931_timeout;],AC_DEFINE(HAVE_RFC931_TIMEOUT))
++ ],[
++ if test x$check_for_tcpd = xyes; then
++ AC_MSG_ERROR(--enable-tcpd specified but unable to locate libwrap.)
++ fi
+ ])
++fi
++
+ AC_CHECK_FUNCS(strdup strstr strtoul strtok_r initgroups closesocket sigaction scandir)
+
+ dnl socklen_t check - from curl
+--
+2.26.2
+
diff --git a/net-analyzer/nrpe/nrpe-4.0.3.ebuild b/net-analyzer/nrpe/nrpe-4.0.3.ebuild
new file mode 100644
index 000000000000..5cbe3d9a63b6
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-4.0.3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools systemd
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="https://github.com/NagiosEnterprises/nrpe"
+SRC_URI="https://github.com/NagiosEnterprises/nrpe/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="command-args selinux ssl tcpd"
+
+DEPEND="acct-group/nagios
+ acct-user/nagios
+ tcpd? (
+ sys-apps/tcp-wrappers
+ )
+ ssl? (
+ dev-libs/openssl:=
+ )"
+RDEPEND="${DEPEND}
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
+ selinux? ( sec-policy/selinux-nagios )"
+
+PATCHES=(
+ "${FILESDIR}/nrpe-3.2.1-eliminate-systemd-pid.patch"
+ "${FILESDIR}/nrpe-4.0.2-disable-tcpd.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # The configure script tries to detect what OS, distribution, and
+ # init system you're running and changes the build/install process
+ # depending on what it comes up with. We specify fixed values
+ # because we don't want it guessing, for example, whether or not
+ # to install the tmpfiles.d entry based on whether or not systemd
+ # is currently running (OpenRC uses them too).
+ #
+ # Note: upstream defaults to using "nagios" as the default NRPE
+ # user and group. I have a feeling that this isn't quite correct
+ # on a system where "nagios" is also the user running the nagios
+ # server daemon. In the future, it would be nice if someone who
+ # actually uses NRPE could test with an unprivileged "nrpe" as
+ # the user and group.
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/lib/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ --with-piddir=/run \
+ --with-opsys=unknown \
+ --with-dist-type=unknown \
+ --with-init-type=unknown \
+ --with-inetd-type=unknown \
+ $(use_enable command-args) \
+ $(use_enable ssl) \
+ $(use_enable tcpd)
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ default
+
+ dodoc CHANGELOG.md SECURITY.md
+ insinto /etc/nagios
+ newins sample-config/nrpe.cfg nrpe.cfg
+ fowners root:nagios /etc/nagios/nrpe.cfg
+ fperms 0640 /etc/nagios/nrpe.cfg
+
+ newinitd "startup/openrc-init" nrpe
+ newconfd "startup/openrc-conf" nrpe
+ systemd_newunit "startup/default-service" "${PN}.service"
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ rm "${ED}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool'
+ rm -r "${ED}/run" || die 'failed to remove /run'
+}
+
+pkg_postinst() {
+ if use command-args ; then
+ ewarn ''
+ ewarn 'You have enabled command-args for NRPE. That lets clients'
+ ewarn 'supply arguments to the commands that are run, and IS A'
+ ewarn 'SECURITY RISK!'
+ ewarn ''
+ fi
+}