diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-23 21:27:08 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-23 21:27:08 +0000 |
commit | b562bfcc80663f61bde0a0f83a90b0303ebb27f5 (patch) | |
tree | de32c1d7884f1a68658f3e7e8a5ad5255069ca24 /net-analyzer/nsca | |
parent | Move nagios-nsca to just nsca. (diff) | |
download | gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.tar.gz gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.tar.bz2 gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.zip |
Move from net-analyzer/nagios-nsca to net-analyzer/nsca, as the package work with Icinga just fine.
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'net-analyzer/nsca')
-rw-r--r-- | net-analyzer/nsca/ChangeLog | 185 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca-nagios3 | 36 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.conf | 5 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.init | 35 | ||||
-rw-r--r-- | net-analyzer/nsca/metadata.xml | 35 | ||||
-rw-r--r-- | net-analyzer/nsca/nsca-2.7.2-r100.ebuild | 53 | ||||
-rw-r--r-- | net-analyzer/nsca/nsca-2.7.2-r102.ebuild | 63 | ||||
-rw-r--r-- | net-analyzer/nsca/nsca-2.7.2-r103.ebuild | 90 |
8 files changed, 502 insertions, 0 deletions
diff --git a/net-analyzer/nsca/ChangeLog b/net-analyzer/nsca/ChangeLog new file mode 100644 index 000000000000..959de3b72c40 --- /dev/null +++ b/net-analyzer/nsca/ChangeLog @@ -0,0 +1,185 @@ +# ChangeLog for net-analyzer/nagios-nsca +# Copyright 2002-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nsca/ChangeLog,v 1.1 2012/08/23 21:27:08 flameeyes Exp $ + +*nagios-nsca-2.7.2-r103 (23 Aug 2012) + + 23 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/nsca.conf, + +nagios-nsca-2.7.2-r103.ebuild, files/nsca.init, metadata.xml: + Revision bump: add a minimal USE flag to only build send_nsca instead of the + daemon; add a dependency on either nagios or icinga for the non-minimal + install; install a configuration file with icinga defaults (user/group and + paths); allow changing the configuration file for the init script (install + conf.d file for that) and depend properly on icinga/nagios. + +*nagios-nsca-2.7.2-r102 (21 Aug 2012) + + 21 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +nagios-nsca-2.7.2-r102.ebuild, -nagios-nsca-2.7.2-r101.ebuild, + files/nsca.init, metadata.xml: + Revision bump: inherit user eclass for creating the nagios user and group; + don't drop to nagios:nagios through s-s-d, leave it to the daemon to do that, + otherwise we don't get a pid_file; make sure that nsca is queued after icinga + or nagios when starting the init script; add a crypt USE flag to depend on + libmcrypt so that you can disable it. + + 19 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> metadata.xml: + Re-assign to sysadmin herd. + +*nagios-nsca-2.7.2-r101 (18 Aug 2012) + + 18 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/nsca.init, + +nagios-nsca-2.7.2-r101.ebuild, -files/nsca, -files/nsca.cfg, + -files/send_nsca.cfg, -nagios-nsca-2.7.2.ebuild: + Remove old; revbump and cleanup ebuild: use EAPI 4, use econf, set up the + nagios user correctly, instead of depending on nagios-plugins for that; make + tcpd dependency non-automagic; fix install path of send_ncsa; don't chown + files that are world-executable; init script is cleaned up, uses the new + runscript syntax and is safe to run on LXC hosts as well. + + 09 Feb 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml: + Drop maintainer due retirement, bug #85926 + + 18 Mar 2009; Brent Baude <ranger@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + Marking nagios-nsca-2.7.2-r100 ppc stable for bug 256177 + + 07 Mar 2009; Markus Meier <maekke@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + amd64/x86 stable, bug #256177 + + 07 Mar 2009; Markus Meier <maekke@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + correct fowners of the nsca binary + + 04 Mar 2009; Ferris McCormick <fmccor@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + Sparc stable, part of Bug #256177. + + 01 Feb 2009; Tobias Klausmann <klausman@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + Stable on alpha, bug #256177 + + 26 Jan 2009; Brent Baude <ranger@gentoo.org> + nagios-nsca-2.7.2-r100.ebuild: + Marking nagios-nsca-2.7.2-r100 ppc64 stable for bug 256177 + +*nagios-nsca-2.7.2-r100 (27 Apr 2008) + + 27 Apr 2008; Tobias Scherbaum <dertobi123@gentoo.org> +files/nsca-nagios3, + -nagios-nsca-2.6.ebuild, +nagios-nsca-2.7.2-r100.ebuild: + bump for nagios-3 + + 14 Mar 2008; Caleb Tennis <caleb@gentoo.org> nagios-nsca-2.7.2.ebuild: + amd64 stable, per bug #205335 + + 05 Feb 2008; Markus Rothe <corsair@gentoo.org> nagios-nsca-2.7.2.ebuild: + Stable on ppc64 + + 21 Jan 2008; Raúl Porcel <armin76@gentoo.org> nagios-nsca-2.7.2.ebuild: + sparc stable wrt #205335 + + 12 Jan 2008; Dawid Węgliński <cla@gentoo.org> nagios-nsca-2.7.2.ebuild: + Stable on x86 (bug #205335) + +*nagios-nsca-2.7.2 (17 Aug 2007) + + 17 Aug 2007; Tobias Scherbaum <dertobi123@gentoo.org> -files/nsca-2.3, + -files/nsca-2.6, files/nsca, -nagios-nsca-2.4.ebuild, + -nagios-nsca-2.5.ebuild, nagios-nsca-2.6.ebuild, + -nagios-nsca-2.7.1.ebuild, +nagios-nsca-2.7.2.ebuild: + Version bump, Cleanup + + 28 Apr 2007; Sven Wegener <swegener@gentoo.org> nagios-nsca-2.4.ebuild, + nagios-nsca-2.5.ebuild: + Fix *initd, *confd and *envd calls (#173884, #174266) + + 28 Apr 2007; Torsten Veller <tove@gentoo.org> nagios-nsca-2.6.ebuild, + nagios-nsca-2.7.1.ebuild: + Use newinitd + +*nagios-nsca-2.7.1 (12 Mar 2007) + + 12 Mar 2007; Martin Jackson <mjolnir@gentoo.org> + +nagios-nsca-2.7.1.ebuild: + Version bump to 2.7.1 for #169434 + + 21 Oct 2006; Thomas Cort <tcort@gentoo.org> nagios-nsca-2.6.ebuild: + Added ~alpha keyword wrt Bug #110130. + + 17 Aug 2006; Gustavo Zacarias <gustavoz@gentoo.org> + nagios-nsca-2.6.ebuild: + Stable on sparc + + 06 Jul 2006; Markus Rothe <corsair@gentoo.org> nagios-nsca-2.6.ebuild: + Stable on ppc64 + + 04 Jul 2006; Lance Albertson <ramereth@gentoo.org> nagios-nsca-2.6.ebuild: + * Marked 2.6 stable + + 07 May 2006; Markus Rothe <corsair@gentoo.org> nagios-nsca-2.5.ebuild: + Stable on ppc64 + + 05 May 2006; Gustavo Zacarias <gustavoz@gentoo.org> + nagios-nsca-2.5.ebuild: + Stable on sparc wrt security #132159 + +*nagios-nsca-2.6 (27 Apr 2006) + + 27 Apr 2006; Lance Albertson <ramereth@gentoo.org> +files/nsca-2.6, + nagios-nsca-2.5.ebuild, +nagios-nsca-2.6.ebuild: + * Version bump + * Added reload to init script (2.6) + * Stable on x86 (2.5) + +*nagios-nsca-2.5 (04 Feb 2006) + + 04 Feb 2006; Lance Albertson <ramereth@gentoo.org> metadata.xml, + +nagios-nsca-2.5.ebuild: + * Version bump + + 17 Dec 2005; Markus Rothe <corsair@gentoo.org> nagios-nsca-2.4.ebuild: + Added ~ppc64 + + 24 Oct 2004; Jason Wever <weeve@gentoo.org> nagios-nsca-2.4.ebuild: + Stable on sparc. + + 13 Jul 2004; Eldad Zack <eldad@gentoo.org> +metadata.xml, + nagios-nsca-2.4.ebuild: + Added metadata + + 19 Mar 2004; Michael Sterrett <mr_bones_@gentoo.org> nagios-nsca-2.4.ebuild: + fix depend (bug #45110); tidy + + 15 Dec 2003; Martin Holzer <mholzer@gentoo.org> nagios-nsca-2.4.ebuild: + x86 stable. + +*nagios-nsca-2.4 (26 Nov 2003) + + 26 Nov 2003; Martin Holzer <mholzer@gentoo.org> nagios-nsca-2.4.ebuild: + Version bumped. + + 26 Nov 2003; Martin Holzer <mholzer@gentoo.org> nagios-nsca-2.3-r1.ebuild: + Added RESTRICT="nomirror" + +*nagios-nsca-2.3-r1 + 17 Jun 2003; Dean Bailey <alron@gentoo.org> nagios-nsca-2.3-r1 : + Bug fix for bug #22498 + + 28 Feb 2003; Dean Bailey <alron@gentoo.org> nagios-nsca-2.3 : + Moved to x86 stable. + +*nagios-nsca-2.3 (09 Feb 2003) + 09 Feb 2003; Dean Bailey <alron@gentoo.org> nagios-nsca-2.3 : + Version bump + + 15 Jan 2003; Dean Bailey <alron@gentoo.org> nagios-nsca-2.2 : + Changed ~x86 to x86 and added sparc and ppc keywords + +*nagios-nsca-2.2 (13 Jan 2003) + 13 Jan 2002; Dean Bailey <alron@gentoo.org> nagios-nsca-2.2 : + Updated to version 2.2 + +*nagios-nsca-2.1 (1 Nov 2002) + 1 Nov 2002; Dean Bailey <alron@gentoo.org> nagios-nsca-2.1 : + Initial import. Ebuild submitted by Dean Bailey <alron@gentoo.org>. diff --git a/net-analyzer/nsca/files/nsca-nagios3 b/net-analyzer/nsca/files/nsca-nagios3 new file mode 100644 index 000000000000..bef0cb7db976 --- /dev/null +++ b/net-analyzer/nsca/files/nsca-nagios3 @@ -0,0 +1,36 @@ +#!/sbin/runscript + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting nsca" + start-stop-daemon --start --quiet --name nsca \ + --startas /usr/bin/nsca \ + -c nagios:nagios \ + -- -c /etc/nagios/nsca.cfg \ + --daemon + eend $? "Failed to Start nsca" +} + +stop() { + ebegin "Stopping nsca" + start-stop-daemon --stop --quiet -n nsca + eend $? "Failed to Stop nsca" +} + +reload() { + ebegin "Reloading nsca" + kill -HUP `pgrep nsca` + eend $? "Failed to reload nsca" +} + +restart() { + ebegin "Restarting nsca" + svc_stop + svc_start + eend $? "Failed to Restart nsca" +} diff --git a/net-analyzer/nsca/files/nsca.conf b/net-analyzer/nsca/files/nsca.conf new file mode 100644 index 000000000000..987cd10ebf58 --- /dev/null +++ b/net-analyzer/nsca/files/nsca.conf @@ -0,0 +1,5 @@ +# Choose the configuration file to use; the pre-defined configurations +# for Nagios and Icinga are available in their respective directories: +# /etc/nagios/nsca.cfg +# /etc/icinga/nsca.cfg +CFGFILE=/etc/nagios/nsca.cfg diff --git a/net-analyzer/nsca/files/nsca.init b/net-analyzer/nsca/files/nsca.init new file mode 100644 index 000000000000..3c156aa965d4 --- /dev/null +++ b/net-analyzer/nsca/files/nsca.init @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nsca/files/nsca.init,v 1.1 2012/08/23 21:27:08 flameeyes Exp $ + +: ${CFGFILE:=/etc/nagios/nsca.cfg} + +get_config() { + [ -f ${CFGFILE} ] || return 1 + + sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \ + ${CFGFILE} +} + +extra_started_commands="reload" + +command=/usr/libexec/${SVCNAME} +command_args="-c ${CFGFILE} --daemon" +pidfile=$(get_config pid_file) + +depend() { + config ${CFGFILE} + + need net + case $(get_config nsca_user) in + icinga) need icinga ;; + nagios) need nagios ;; + esac +} + +reload() { + ebegin "Reloading nsca" + kill -HUP `cat $(get_config pid_file)` + eend $? "Failed to reload nsca" +} diff --git a/net-analyzer/nsca/metadata.xml b/net-analyzer/nsca/metadata.xml new file mode 100644 index 000000000000..be5f7d8397fe --- /dev/null +++ b/net-analyzer/nsca/metadata.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sysadmin</herd> + <longdescription lang="en"> + This program is designed to accept passive service check results + from clients that use the send_nsca utility (which is included in + this package) and pass them along to the Nagios process by using + the external command interface. The program can either be run as a + standalone daemon or as a service under inetd. If you have + libmcrypt installed on your systems, you can choose from multiple + crypto algorithms (DES, 3DES, CAST, xTEA, Twofish, LOKI97, + RJINDAEL, SERPENT, GOST, SAFER/SAFER+, etc.) for encrypting the + traffic between the client and the server. Encryption is + important in this addon, as it prevents unauthorized users from + sending bogus check results to Nagios. Read the included SECURITY + document for more information. + + This package provides the send_nsca utility running on the client. + </longdescription> + <use> + <flag name='crypt'> + Build support for crypted communication with nsca, through + <pkg>dev-libs/mcrypt</pkg>. It's recommended not to disable this + flag unless all the communication will be handled in an + absolutely safe environment. + </flag> + <flag name='minimal'> + Only build and install the send_nsca command and not the + daemon. This allows a very minimal install with no overhead when + setting up a node. + </flag> + </use> +</pkgmetadata> + diff --git a/net-analyzer/nsca/nsca-2.7.2-r100.ebuild b/net-analyzer/nsca/nsca-2.7.2-r100.ebuild new file mode 100644 index 000000000000..8c4e3fabc230 --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r100.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nsca/nsca-2.7.2-r100.ebuild,v 1.1 2012/08/23 21:27:08 flameeyes Exp $ + +inherit multilib + +DESCRIPTION="Nagios NSCA - Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/nsca-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ppc ppc64 sparc x86" +IUSE="" + +DEPEND=">=net-analyzer/nagios-plugins-1.3.1 + >=dev-libs/libmcrypt-2.5.1-r4" +S="${WORKDIR}/nsca-${PV}" + +src_compile() { + ./configure \ + --host=${CHOST} \ + --prefix=/usr \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man || die "./configure failed" + emake all || die "emake failed" +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + doins "${S}"/sample-config/send_nsca.cfg + + exeinto /usr/bin + doexe src/nsca + fowners nagios:nagios /usr/bin/nsca + + exeinto /usr/$(get_libdir)/nagios/plugins + doexe src/send_nsca + fowners nagios:nagios /usr/$(get_libdir)/nagios/plugins/send_nsca + newinitd "${FILESDIR}"/nsca-nagios3 nsca +} +pkg_postinst() { + einfo + einfo "If you are using the nsca daemon, remember to edit" + einfo "the config file /etc/nagios/nsca.cfg" + einfo +} diff --git a/net-analyzer/nsca/nsca-2.7.2-r102.ebuild b/net-analyzer/nsca/nsca-2.7.2-r102.ebuild new file mode 100644 index 000000000000..2d919a04ca14 --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r102.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nsca/nsca-2.7.2-r102.ebuild,v 1.1 2012/08/23 21:27:08 flameeyes Exp $ + +EAPI=4 + +inherit multilib user + +DESCRIPTION="Nagios NSCA - Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/nsca-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="tcpd +crypt" + +DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 ) + tcpd? ( sys-apps/tcp-wrappers )" + +RDEPEND="${DEPEND} + sys-apps/openrc" + +S="${WORKDIR}/nsca-${PV}" + +pkg_setup() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +src_configure() { + use tcpd || export ac_cv_lib_wrap_main=no + use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false + + econf + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + doins "${S}"/sample-config/send_nsca.cfg + + dobin src/send_nsca + + exeinto /usr/libexec + doexe src/nsca + + newinitd "${FILESDIR}"/nsca.init nsca +} + +pkg_postinst() { + elog "If you are using the nsca daemon, remember to edit" + elog "the config file /etc/nagios/nsca.cfg" + elog "" + elog "If you intend to use nsca with Icinga, make sure you" + elog "change the value of command_file in nsca.cfg." +} diff --git a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild new file mode 100644 index 000000000000..1880d143b597 --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nsca/nsca-2.7.2-r103.ebuild,v 1.1 2012/08/23 21:27:08 flameeyes Exp $ + +EAPI=4 + +inherit multilib user eutils + +DESCRIPTION="Nagios NSCA - Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/nsca-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="tcpd +crypt minimal" + +DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 ) + !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" + +RDEPEND="${DEPEND} + !minimal? ( || ( net-analyzer/icinga net-analyzer/nagios ) ) + sys-apps/openrc" + +S="${WORKDIR}/nsca-${PV}" + +pkg_setup() { + if ! use minimal; then + enewgroup nagios + enewgroup icinga + enewuser nagios -1 /bin/bash /var/nagios/home nagios + enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" + fi +} + +src_configure() { + use tcpd || export ac_cv_lib_wrap_main=no + use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false + + econf \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios +} + +src_compile() { + emake -C src send_nsca $(usex !minimal nsca) + + # prepare the alternative configuration file + sed \ + -e '/ncsa_\(user\|group\)/s:nagios:icinga:' \ + -e '/ncsa_chroot/s:=.*:=/var/lib/icinga/rw:' \ + -e '/\(command\|alternate_dump\)_file/s:/var/nagios:/var/lib/icinga:' \ + "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + + dobin src/send_nsca + + insinto /etc/nagios + doins "${S}"/sample-config/send_nsca.cfg + + if ! use minimal; then + exeinto /usr/libexec + doexe src/nsca + + newinitd "${FILESDIR}"/nsca.init nsca + newconfd "${FILESDIR}"/nsca.conf nsca + + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + + insinto /etc/icinga + newins "${T}"/nsca.icinga.cfg nsca.cfg + fi +} + +pkg_postinst() { + if ! use minimal; then + elog "If you are using the nsca daemon, remember to edit" + elog "the config file /etc/nagios/nsca.cfg" + elog "" + elog "If you intend to use nsca with Icinga, change the" + elog "configuration file path in /etc/conf.d/nsca so that" + elog "it will default to the correct paths and users." + fi +} |