From cacf648cf49de34c17321ac86cd8f0e965f9e2fd Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 11 Apr 2015 03:25:37 +0000 Subject: [PATCH] Accept net-analyzer/monitoring-plugins for non-minimal install, bug #540956. Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0x6F48D3DA05C2DADB! --- net-analyzer/nrpe/ChangeLog | 9 +- net-analyzer/nrpe/Manifest | 23 ++++- net-analyzer/nrpe/nrpe-2.15-r2.ebuild | 129 ++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 net-analyzer/nrpe/nrpe-2.15-r2.ebuild diff --git a/net-analyzer/nrpe/ChangeLog b/net-analyzer/nrpe/ChangeLog index 1079016b3a4c..a360b74fdc31 100644 --- a/net-analyzer/nrpe/ChangeLog +++ b/net-analyzer/nrpe/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/nrpe -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.33 2014/07/08 15:59:26 pacho Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.34 2015/04/11 03:25:15 mjo Exp $ + +*nrpe-2.15-r2 (11 Apr 2015) + + 11 Apr 2015; Michael Orlitzky +nrpe-2.15-r2.ebuild: + Accept net-analyzer/monitoring-plugins for non-minimal install, bug #540956. *nrpe-2.15-r1 (08 Jul 2014) diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest index 2e7340639c63..d5c9f564c68b 100644 --- a/net-analyzer/nrpe/Manifest +++ b/net-analyzer/nrpe/Manifest @@ -14,13 +14,26 @@ AUX nrpe.service 242 SHA256 20ecfad6b5e9010de3e2b80e3e6eb035ceb54febe0745f75874c AUX nrpe.xinetd.2 245 SHA256 9b58e79ec14f538a2750875a49fdbc153c5919b2b97cdc9380ae9d11dbf65c28 SHA512 d687cb2a5babfd28a97d3a5f1ac665758341ecc37fdd0193dbf0df4cba68c88aa24776a33a706989843fa5356b2e3e995662a823ceb2b86ba8f846f8c47e18fb WHIRLPOOL 60a96b00f18dd3305794f81288ed781b19b471e1838243970672762682d56e34ff4d325a62a77178d229ff67b9b39c9a9da7ef0dd78b8fbdb541b2e983d4f9d4 DIST nrpe-2.15.tar.gz 419695 SHA256 66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072 SHA512 03ce9774b5112d03235dc9da075770d89d1bcc5ffa5faf221ff7ea8ec5c92ded1e1ae9222581a87cf53736d190ac047e1acce7edc2f31f26c432d786cdef0e73 WHIRLPOOL f97ad7431138fd96588bb4e9d13404a0425bbdb8582c7c472cb20621bb77a9e9ecdeed88b9247ea20815da33c5b123368a540c5a0a058921e59367c2ce2a2b10 EBUILD nrpe-2.15-r1.ebuild 3896 SHA256 b6ea0662fd43a3afcc61b5df3e5b4da6c06484c25728db05aaad264edbe7c54f SHA512 675f73d75dd9f936f904a459da9e98d9468fafe75afc0bbe823b673294f8735f60216b78caee935bc8e24f77584314ad74a781874b06c2c02ff1e57fb20c7dc5 WHIRLPOOL 384dc175923ae863b2f2a2c8a480f72ef62de4d2c3afa02ca2c0707d4ffdaacf9f26d0feac92f14fea41fb4aef8fecddbf7a0ae5d3f521f270ca57a5ec9c7d7d +EBUILD nrpe-2.15-r2.ebuild 3928 SHA256 28e318c88d486118c0545e87cfbdd8da318730aa53c1f71fa021f8162d9884d8 SHA512 836ffa651f5794995b80f58dddd532a1d8bbd51aa42936897f3f357770090858e5588ecb51c8920e8d88408ee70ac07647d17da3b0df51c59dbb61aca6268b2c WHIRLPOOL 8971db8b12c24a331e1d5371b0bf52793f460d77370f50b184b9cfde0f7313e82d62eee95a7a24c5d69065a4994f62db7e6404afa432f97919307f649bde8c19 EBUILD nrpe-2.15.ebuild 3833 SHA256 774f3ff393a7aeccca2419f8988493f58dcdc831b2e75879ff06a8b6f7fc3c67 SHA512 71057608a41137aa02beeb11ea9c7302200b8ec1d0894d48ed1bbef50f1625d2c4e4673263bb69ff6a47f5f3abeaff785c0ff9e537138f00e8d59c9e1ac7e3d4 WHIRLPOOL 51820ac5295bcb9fa2795b2f71dc88ccd48f6c8ee8f3a6a0bf7a05765bdbe08018cb377975c10c353485fe7c8a2a32ca47b801572850f7f883bff90bef5d3645 -MISC ChangeLog 16142 SHA256 866f5968a21e1849002c09307dbb9809574143c75acdeed3b949095f018ad1e0 SHA512 dadef0fb87b8f6ab2e2b9731f36563af2af0a7579e43a15dd159dde93e67b1112659fad193b1aa83531b7b0fd58bc385d596ac8d1a79340e13df0cf682bc0a08 WHIRLPOOL bbe10df4479984303447520d35f61b69de0601ccffe2d8fbbd723205edd512fff04df62efa539b377fde9898ee3a5b33838b3bf6363771a6ea53310c847f1ca3 +MISC ChangeLog 16320 SHA256 35b5656263959631d428e338aa29c5d65c26024e59b09ec245abc1d2257ffc79 SHA512 e56f6cdbcd09211d70f33383b218f823ad7ae7ce77e9fe46229232863ce93e759b51366a6a1fef1f91fe36974d2c06d1fda0abddde94386fe7a6233250892a7b WHIRLPOOL 2a87509a653f30bb99f919c8f88426afac888ebdd38a96c0af63b10bbb0748f2f51ce0ae710e583e123be7e5bcac1c16d6a2898e22a34ed5f2fcf90ff9ecd36a MISC metadata.xml 701 SHA256 8eb0b66c24ed523dcf32aaa5d0782a3a59377c744a944caf35d5ef80bfacf480 SHA512 4dd2ff64151d8aac7cc0dfa995f8f561791e5df6dcaaeb527ef14c3dfc6e0ee379d09dcd0151957bcdebd5849475c8dd88b0f041c1e2fcd7d3f0e6394f9c756d WHIRLPOOL c89442259d16a1ad23429cfcfbbcf566d1d1f7e90e31ee3cf7450ba600e477e28e18aaf9b0250667cab6ffd7909d53599f6b27a49565510d95677fcadeede2c4 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (GNU/Linux) +Version: GnuPG v2.0 -iEYEAREIAAYFAlO8FV8ACgkQCaWpQKGI+9Q69ACfYRlCir9QxOLI+1QFlkvVWj/q -Ij8An0ud11QVEUaxs4LpY7XMP3fJWCJk -=Od5M +iQJ8BAEBCABmBQJVKJQgXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxNEU5RDcyRDdCMUFGREVGQzBCNDFDMUY2 +RjQ4RDNEQTA1QzJEQURCAAoJEG9I09oFwtrbwWkP/3MzLVVi9+Kl9KTIQB/eooep +DOPDKBNuq7q9SilFzintQGr6cwcbYOVkL9CRsHujMciNhUHdMzGNwAmUgkgIGZrw +ALTdZMwQwMtUgiie/p3oGOk8MQNBL5CK4KXajUqC8t7izQ+a1sNBkQ6gFJw6eP4g +wuPs9Q8KomHIpBHFJJdArKq9+1fRa1v6++8jBUMJKVSNLjfB3uzFE270XhngIpMn +564TpM7CgOIJ6GTxIN5wC6T67RenU1/7uZ3dFpLgoIFlmOexUe5KWEJqU3XtteKm +WlUy9BPMD1oXvfj5MwKqrGmrGT9KVRM1yH6HjlPm04zbvUkXVy+wjaEBxtolcVJf +FXg1gEg05JkIdAN1lFgan8G93LIvMLKVixIkDOFhETc39XJJD4TICddffl63/Axw +5dX7dlsP1UGgc1NJB2W2y6Gni8InA+rMRUvBUJzhcUSEnuAjbXp4Da5aOUpJ+23N +Su6mEQpymbK/65qeFzosFCwReru/3YvB0EoxKnyPu0ia8dN8vVcy4Nch68I38To4 +DjNQk6W5E/oqp8Y/CHNRgFNY0Flz5iTxnSX+rg8uKNQFn8nhnRrny+xritaUxfZS +LDcFP8wn/Dae7ownPY/2S4EbK61dkl8uOQdMPyUukrTw1a2N3jWXdiYA1SSJeqx6 +wRk4ls8E1Hg2L7ZEm+Ri +=ettR -----END PGP SIGNATURE----- diff --git a/net-analyzer/nrpe/nrpe-2.15-r2.ebuild b/net-analyzer/nrpe/nrpe-2.15-r2.ebuild new file mode 100644 index 000000000000..2e3aa3cc8096 --- /dev/null +++ b/net-analyzer/nrpe/nrpe-2.15-r2.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/nrpe-2.15-r2.ebuild,v 1.1 2015/04/11 03:25:15 mjo Exp $ + +EAPI=5 +inherit eutils systemd toolchain-funcs multilib user autotools + +DESCRIPTION="Nagios Remote Plugin Executor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="command-args ssl tcpd minimal" + +DEPEND="ssl? ( dev-libs/openssl ) + !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" +RDEPEND="${DEPEND} + !minimal? ( + || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins ) + )" + +pkg_setup() { + enewgroup nagios + enewuser nagios -1 /bin/bash /dev/null nagios + + elog "If you plan to use \"nrpe_check_control\" then you may want to specify" + elog "different command and services files. You can override the defaults" + elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables." + elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}" + elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}" +} + +src_prepare() { + # Add support for large output, + # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html + epatch "${FILESDIR}"/${PN}-2.14-multiline.patch + # fix configure, among others #326367, #397603 + epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch + # otherwise autoconf will overwrite the custom include/config.h.in + epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch + # improve handling of metachars for security + epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch + + sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die + + # change the default location of the pid file + sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die + + # fix TFU handling of autoheader + sed -i -e '/#undef/d' include/config.h.in || die + + eautoreconf +} + +src_configure() { + local myconf + if use minimal; then + myconf="--disable-tcp-wrapper --disable-command-args" + else + myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)" + fi + + econf \ + --libexecdir=/usr/$(get_libdir)/nagios/plugins \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nrpe-user=nagios \ + --with-nrpe-group=nagios \ + $(use_enable ssl) \ + ${myconf} +} + +src_compile() { + emake -C src check_nrpe $(use minimal || echo nrpe) + + # Add nifty nrpe check tool + $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \ + -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \ + -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \ + ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die +} + +src_install() { + dodoc LEGAL Changelog README SECURITY \ + contrib/README.nrpe_check_control \ + $(use ssl && echo README.SSL) + + exeinto /usr/$(get_libdir)/nagios/plugins + doexe src/check_nrpe nrpe_check_control + + use minimal && return 0 + + ## NON-MINIMAL INSTALL FOLLOWS ## + + insinto /etc/nagios + newins sample-config/nrpe.cfg nrpe.cfg + fowners root:nagios /etc/nagios/nrpe.cfg + fperms 0640 /etc/nagios/nrpe.cfg + + exeinto /usr/libexec + doexe src/nrpe + + newinitd "${FILESDIR}"/nrpe.init nrpe + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/xinetd.d/ + newins "${FILESDIR}/nrpe.xinetd.2" nrpe + + if use tcpd; then + sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \ + "${D}"/etc/init.d/nrpe + fi +} + +pkg_postinst() { + elog "If you are using the nrpe daemon, remember to edit" + elog "the config file /etc/nagios/nrpe.cfg" + + if use command-args ; then + ewarn "" + ewarn "You have enabled command-args for NRPE. This enables" + ewarn "the ability for clients to supply arguments to commands" + ewarn "which should be run. " + ewarn "THIS IS CONSIDERED A SECURITY RISK!" + ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info" + fi +} -- 2.26.2