summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-05-12 17:56:12 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-05-12 17:56:29 -0400
commit1aa4d1f895af173e41d53f5d811a62788a68d7f2 (patch)
tree6b6455c1f95266843eb7d35e83ac6e7e338497af /net-analyzer/nrpe
parentdev-python/python-magic: Version Bump, Bug 612056 (diff)
downloadgentoo-1aa4d1f895af173e41d53f5d811a62788a68d7f2.tar.gz
gentoo-1aa4d1f895af173e41d53f5d811a62788a68d7f2.tar.bz2
gentoo-1aa4d1f895af173e41d53f5d811a62788a68d7f2.zip
net-analyzer/nrpe: new version 3.1.0.
This new ebuild is missing a lot of the custom patching of the 2.x series, ultimately because I just don't have time to forward-port a bunch of patches. Here's a quick summary of the changes: * Command arguments are unconditionally disabled, because they're a security risk. This flag would be easy to bring back, but it should be masked if we do. * The daemon and tcp wrappers are no longer optional. While I admit that having them be optional is useful, a giant patch to the build system is not the way to go about it. Send that mess upstream! * The nrpe_check_control tool is not installed. This is "contrib" upstream, and doesn't use the correct paths from the build system. Needs to be fixed upstream. Thanks to Tomáš Mózes for the heads-up about the new version, and for testing the ebuild and init script. It looks like our nrpe-2.x and nrpe-3.x have some incompatibilities, possibly due to our patches against the 2.x series. I've added an elog recommending that users not mix major versions on the client/server. Gentoo-Bug: 616092 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-analyzer/nrpe')
-rw-r--r--net-analyzer/nrpe/Manifest1
-rw-r--r--net-analyzer/nrpe/files/nrpe-3.1.0.init16
-rw-r--r--net-analyzer/nrpe/nrpe-3.1.0.ebuild64
3 files changed, 81 insertions, 0 deletions
diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest
index 51876a8e1c1..9dbbbda4871 100644
--- a/net-analyzer/nrpe/Manifest
+++ b/net-analyzer/nrpe/Manifest
@@ -1 +1,2 @@
DIST nrpe-2.15.tar.gz 419695 SHA256 66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072 SHA512 03ce9774b5112d03235dc9da075770d89d1bcc5ffa5faf221ff7ea8ec5c92ded1e1ae9222581a87cf53736d190ac047e1acce7edc2f31f26c432d786cdef0e73 WHIRLPOOL f97ad7431138fd96588bb4e9d13404a0425bbdb8582c7c472cb20621bb77a9e9ecdeed88b9247ea20815da33c5b123368a540c5a0a058921e59367c2ce2a2b10
+DIST nrpe-3.1.0.tar.gz 501028 SHA256 22942b546f1af9b3f277daa68742b7f72a53145079adf0f086e4554e1482f24a SHA512 d67ae7cbd7f72fccc341e7da6d8774ee28da93dd14a18e6c6fbce6c9ba3fab19451ededea3cff0945ec1569026ee10f12a44bebbeac12a3b8210ed9aec4b39b8 WHIRLPOOL ecb41098e5bc87a8eaa0af8853fbe48b85a1c84a01ad5484f89aa231bb99a7604e4d67aa495651487577e3c85471bc274123809b40d791ade2c55d46d37b3e1b
diff --git a/net-analyzer/nrpe/files/nrpe-3.1.0.init b/net-analyzer/nrpe/files/nrpe-3.1.0.init
new file mode 100644
index 00000000000..acf8b549ee7
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-3.1.0.init
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${CFGFILE:=/etc/nagios/nrpe.cfg}
+
+extra_started_commands="reload"
+command="/usr/bin/${SVCNAME}"
+command_args="-c ${CFGFILE} --daemon"
+pidfile=/run/nrpe.pid
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --exec $command --pidfile $pidfile --signal HUP
+ eend $?
+}
diff --git a/net-analyzer/nrpe/nrpe-3.1.0.ebuild b/net-analyzer/nrpe/nrpe-3.1.0.ebuild
new file mode 100644
index 00000000000..e6ed550c91c
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-3.1.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit systemd user
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="https://github.com/NagiosEnterprises/nrpe"
+SRC_URI="${HOMEPAGE}/releases/download/release-${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="selinux ssl"
+
+DEPEND="sys-apps/tcp-wrappers
+ ssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
+ selinux? ( sec-policy/selinux-nagios )"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_configure() {
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ --with-piddir=/run \
+ $(use_enable ssl)
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ default
+
+ dodoc Changelog 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 "${FILESDIR}/nrpe-${PV}.init" nrpe
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ rm "${D}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool'
+}
+
+pkg_postinst(){
+ elog 'Some users have reported incompatibilities between nrpe-2.x and'
+ elog 'nrpe-3.x. We recommend that you use the same major version for'
+ elog 'both your server and clients.'
+}