forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 $? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.' | ||
} |