diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/nsca | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/nsca')
-rw-r--r-- | net-analyzer/nsca/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.conf | 5 | ||||
-rw-r--r-- | net-analyzer/nsca/files/nsca.init | 34 | ||||
-rw-r--r-- | net-analyzer/nsca/metadata.xml | 37 | ||||
-rw-r--r-- | net-analyzer/nsca/nsca-2.7.2-r103.ebuild | 88 |
5 files changed, 165 insertions, 0 deletions
diff --git a/net-analyzer/nsca/Manifest b/net-analyzer/nsca/Manifest new file mode 100644 index 000000000000..8139411de286 --- /dev/null +++ b/net-analyzer/nsca/Manifest @@ -0,0 +1 @@ +DIST nsca-2.7.2.tar.gz 104953 SHA256 fb41e3b536735235056643fb12187355c6561b9148996c093e8faddd4fced571 SHA512 f84cac3613bbd0ded4ec700c1dadac71ed075544d0f48281a70946a67792b7f4bcdf6dc3bd5ccf1293cc6a0277638e0f034c33064bf9c05696b4f015e7f15010 WHIRLPOOL 77daad5cef0434e243fab3eff56b4df8b91abc15a166068f5398667483fb4de04ebdeeda6c340ef19ae17b5da5264e2b8cfe8e958866fc1f35ef504df2c4340c 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..4f81b9d27ac5 --- /dev/null +++ b/net-analyzer/nsca/files/nsca.init @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +: ${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} + + case $(get_config nsca_user) in + icinga) need icinga ;; + nagios) need nagios ;; + esac +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP `cat $(get_config pid_file)` + eend $? +} diff --git a/net-analyzer/nsca/metadata.xml b/net-analyzer/nsca/metadata.xml new file mode 100644 index 000000000000..6d4d98e4d903 --- /dev/null +++ b/net-analyzer/nsca/metadata.xml @@ -0,0 +1,37 @@ +<?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> + <upstream> + <remote-id type="sourceforge">nagios</remote-id> + </upstream> +</pkgmetadata> 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..9e34b12dd233 --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit multilib user eutils + +DESCRIPTION="Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/${P}.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" + +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 $(use minimal || echo nsca) + + # prepare the alternative configuration file + sed \ + -e '/nsca_\(user\|group\)/s:nagios:icinga:' \ + -e '/nsca_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 +} |