diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-24 04:54:29 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-24 04:54:29 +0000 |
commit | e308a89cb27d7c4174ca3af0f61bb4373dff6748 (patch) | |
tree | 739ab64b9aad88c11e63aea1075455244b4faa0a /net-analyzer/nrpe | |
parent | Version bump. (diff) | |
download | gentoo-2-e308a89cb27d7c4174ca3af0f61bb4373dff6748.tar.gz gentoo-2-e308a89cb27d7c4174ca3af0f61bb4373dff6748.tar.bz2 gentoo-2-e308a89cb27d7c4174ca3af0f61bb4373dff6748.zip |
Fix xinetd install; remove reload function from init script when using tcpd, due to bug #289730; add minimal USE flag to not install the daemon at all.
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/nrpe')
-rw-r--r-- | net-analyzer/nrpe/ChangeLog | 11 | ||||
-rw-r--r-- | net-analyzer/nrpe/metadata.xml | 10 | ||||
-rw-r--r-- | net-analyzer/nrpe/nrpe-2.13-r4.ebuild (renamed from net-analyzer/nrpe/nrpe-2.13-r3.ebuild) | 55 |
3 files changed, 50 insertions, 26 deletions
diff --git a/net-analyzer/nrpe/ChangeLog b/net-analyzer/nrpe/ChangeLog index 06f421bc877c..e8754ef0f976 100644 --- a/net-analyzer/nrpe/ChangeLog +++ b/net-analyzer/nrpe/ChangeLog @@ -1,6 +1,13 @@ -# ChangeLog for net-analyzer/nagios-nrpe +# ChangeLog for net-analyzer/nrpe # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.1 2012/08/23 23:07:05 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.2 2012/08/24 04:54:29 flameeyes Exp $ + +*nrpe-2.13-r4 (24 Aug 2012) + + 24 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> +nrpe-2.13-r4.ebuild, + -nrpe-2.13-r3.ebuild, metadata.xml: + Fix xinetd install; remove reload function from init script when using tcpd, + due to bug #289730; add minimal USE flag to not install the daemon at all. *nagios-nrpe-2.13-r3 (23 Aug 2012) diff --git a/net-analyzer/nrpe/metadata.xml b/net-analyzer/nrpe/metadata.xml index 505d584563e0..36b9db86d375 100644 --- a/net-analyzer/nrpe/metadata.xml +++ b/net-analyzer/nrpe/metadata.xml @@ -7,6 +7,14 @@ execute commands defined in a centralized configuration file. </longdescription> <use> - <flag name='command-args'>allow clients to specify command arguments</flag> + <flag name='command-args'> + Build support for specifying the command-line arguments from the + Nagios/Icinga master. Make sure you understand the implications + of this flag as it can be a security risk. + </flag> + + <flag name='minimal'> + Only build the check plugins for Nagios/Icinga, and not the daemon. + </flag> </use> </pkgmetadata> diff --git a/net-analyzer/nrpe/nrpe-2.13-r3.ebuild b/net-analyzer/nrpe/nrpe-2.13-r4.ebuild index 41987c1a0274..099222bd2e10 100644 --- a/net-analyzer/nrpe/nrpe-2.13-r3.ebuild +++ b/net-analyzer/nrpe/nrpe-2.13-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/nrpe-2.13-r3.ebuild,v 1.1 2012/08/23 23:07:05 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/nrpe-2.13-r4.ebuild,v 1.1 2012/08/24 04:54:29 flameeyes Exp $ EAPI=4 @@ -8,19 +8,17 @@ inherit eutils toolchain-funcs multilib user autotools DESCRIPTION="Nagios Remote Plugin Executor" HOMEPAGE="http://www.nagios.org/" -SRC_URI="mirror://sourceforge/nagios/nrpe-${PV}.tar.gz" +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" +IUSE="command-args ssl tcpd minimal" -DEPEND=">=net-analyzer/nagios-plugins-1.3.0 - ssl? ( dev-libs/openssl ) - tcpd? ( sys-apps/tcp-wrappers )" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/nrpe-${PV}" +DEPEND="ssl? ( dev-libs/openssl ) + !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" +RDEPEND="${DEPEND} + !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )" pkg_setup() { enewgroup nagios @@ -45,14 +43,17 @@ src_prepare() { sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die - sed -i -e \ - "s#pid_file=/var/run/nrpe.pid#pid_file=/var/run/nrpe/nrpe.pid#" \ - sample-config//nrpe.cfg.in || die "sed failed" - 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 \ @@ -60,12 +61,11 @@ src_configure() { --with-nrpe-user=nagios \ --with-nrpe-group=nagios \ $(use_enable ssl) \ - $(use_enable tcpd tcp-wrapper) \ - $(use_enable command-args) + ${myconf} } src_compile() { - emake all + emake -C src check_nrpe $(usex !minimal nrpe) # Add nifty nrpe check tool $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \ @@ -75,6 +75,17 @@ src_compile() { } src_install() { + dodoc LEGAL Changelog README SECURITY \ + contrib/README.nrpe_check_control \ + $(usex ssl 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 @@ -85,15 +96,13 @@ src_install() { newinitd "${FILESDIR}"/nrpe.init nrpe - dodoc LEGAL Changelog README SECURITY \ - contrib/README.nrpe_check_control \ - $(usex ssl README.SSL) - insinto /etc/xinetd.d/ - doins "${FILESDIR}/nrpe.xinetd.2" + newins "${FILESDIR}/nrpe.xinetd.2" nrpe - exeinto /usr/$(get_libdir)/nagios/plugins - doexe src/check_nrpe nrpe_check_control + if use tcpd; then + sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \ + "${D}"/etc/init.d/nrpe + fi } pkg_postinst() { |