summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/pnp4nagios
downloadgentoo-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/pnp4nagios')
-rw-r--r--net-analyzer/pnp4nagios/Manifest2
-rw-r--r--net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf29
-rw-r--r--net-analyzer/pnp4nagios/files/98_pnp4nagios.conf22
-rw-r--r--net-analyzer/pnp4nagios/files/npcd37
-rw-r--r--net-analyzer/pnp4nagios/files/npcd.initd19
-rw-r--r--net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch32
-rw-r--r--net-analyzer/pnp4nagios/metadata.xml8
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild85
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild106
9 files changed, 340 insertions, 0 deletions
diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest
new file mode 100644
index 000000000000..8f1c42a86f9d
--- /dev/null
+++ b/net-analyzer/pnp4nagios/Manifest
@@ -0,0 +1,2 @@
+DIST pnp4nagios-0.6.24.tar.gz 2919182 SHA256 87412ef01257c6096aa5c84fdb47db950b851c596e1306180be8ba45401793cf SHA512 7e8c32e0ac69ab747a57e8ab6cc59fddfb63e16598fda9c1e6270d6309ff0885cd1bd0876d05aa1d30bffa76b281d41dc8fbe59e430778bf4d3bdddc4a7bee9f WHIRLPOOL 4f48b406a7d82a4370701ede2625ed2c247bb933a9197d3417c4eb18f18b879465aeb4775e9a0f0300ac1140159df6c6130466b5434c0b33bccb7fff04de86f8
+DIST pnp4nagios-0.6.25.tar.gz 2921068 SHA256 62d9cdcb132326753373b18fafebd716ec27dc5cbe1ef42204440fca21ca7a0c SHA512 e561fcac8243e6b1ab401312b4a05a6c752e2869da7366a22e4e48d54ae1e9c17c52cb2dffb1ca5748179f3bc856f779317196992643e9862eb09c4debf277c8 WHIRLPOOL 9267bbb04b3cdfdd4d12601508a6d602aa9513a096aac06adf4631fcb1218d2e24fef7a6be1defd8a3ac87106a9cdf6b689b50c432fe0f07ca45d7fbf665d810
diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf
new file mode 100644
index 000000000000..5944a2e2f70f
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf
@@ -0,0 +1,29 @@
+<IfDefine PNP>
+
+ Alias /pnp4nagios /usr/share/pnp/
+
+ <Directory /usr/share/pnp>
+ AllowOverride AuthConfig
+ Require all granted
+
+ <IfModule rewrite_module>
+ # Turn on URL rewriting
+ RewriteEngine On
+ Options +FollowSymLinks
+
+ # Installation directory
+ RewriteBase /pnp4nagios
+
+ # Protect application and system files from being viewed
+ RewriteRule ^(application|modules|system) - [F,L]
+
+ # Allow any files or directories that exist to be displayed directly
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+
+ # Rewrite all other URLs to index.php/URL
+ RewriteRule .* index.php/$0 [PT,L]
+ </IfModule>
+ </Directory>
+
+</IfDefine>
diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf
new file mode 100644
index 000000000000..4879779a8f93
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf
@@ -0,0 +1,22 @@
+<IfDefine PNP>
+ Alias /pnp4nagios /usr/share/pnp/
+ <Directory /usr/share/pnp>
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+ <IfModule mod_rewrite.c>
+ # Turn on URL rewriting
+ RewriteEngine On
+ Options FollowSymLinks
+ # Installation directory
+ RewriteBase /pnp4nagios
+ # Protect application and system files from being viewed
+ RewriteRule ^(application|modules|system) - [F,L]
+ # Allow any files or directories that exist to be displayed directly
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ # Rewrite all other URLs to index.php/URL
+ RewriteRule .* index.php/$0 [PT,L]
+ </IfModule>
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/pnp4nagios/files/npcd b/net-analyzer/pnp4nagios/files/npcd
new file mode 100644
index 000000000000..3f0704043b39
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/npcd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="${opts} reload"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting npcd"
+ start-stop-daemon --start --exec /usr/bin/npcd \
+ -- -f /etc/pnp/npcd.cfg \
+ -d
+ eend $? "Failed to Start npcd"
+}
+
+stop() {
+ ebegin "Stopping npcd"
+ start-stop-daemon --stop --quiet -n npcd
+ eend $? "Failed to Stop npcd"
+}
+
+reload() {
+ ebegin "Reloading npcd"
+ kill -HUP `pgrep npcd`
+ eend $? "Failed to reload npcd"
+}
+
+restart() {
+ ebegin "Restarting npcd"
+ svc_stop
+ svc_start
+ eend $? "Failed to Restart npcd"
+}
diff --git a/net-analyzer/pnp4nagios/files/npcd.initd b/net-analyzer/pnp4nagios/files/npcd.initd
new file mode 100644
index 000000000000..2c71ada44870
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/npcd.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+command="/usr/bin/npcd"
+command_args="-f /etc/pnp/npcd.cfg -d"
+
+depend() {
+ need net
+}
+
+reload() {
+ ebegin "Reloading npcd"
+ kill -HUP `pgrep npcd`
+ eend $? "Failed to reload npcd"
+}
diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch
new file mode 100644
index 000000000000..469389d3ee31
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch
@@ -0,0 +1,32 @@
+diff -Naur pnp4nagios-0.6.14.orig/src/Makefile.in pnp4nagios-0.6.14/src/Makefile.in
+--- pnp4nagios-0.6.14.orig/src/Makefile.in 2011-08-10 17:18:46.000000000 +0200
++++ pnp4nagios-0.6.14/src/Makefile.in 2011-08-10 17:19:51.000000000 +0200
+@@ -83,7 +83,7 @@
+ #
+ ###############################
+ npcd: npcd.c $(NPCDOBJS) $(NPCDHEAD)
+- $(CC) $(CFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread
+
+ ###############################
+ #
+@@ -118,7 +118,6 @@
+
+ install:
+ $(MAKE) install-basic
+- $(MAKE) strip-post-install
+
+ install-unstripped:
+ $(MAKE) install-basic
+diff -Naur pnp4nagios-0.6.14.orig/configure pnp4nagios-0.6.14/configure
+--- pnp4nagios-0.6.14.orig/configure 2011-08-12 09:01:12.000000000 +0200
++++ pnp4nagios-0.6.14/configure 2011-08-12 09:03:32.000000000 +0200
+@@ -5565,7 +5565,7 @@
+ PERFDATA_LOG="${localstatedir}/perfdata.log"
+ PERFDATA_DIR="${localstatedir}/perfdata"
+ PERFDATA_SPOOL_DIR="${localstatedir}/spool"
+- mandir="\${prefix}/man"
++ mandir="/usr/share/man"
+ ;;
+ esac
+
diff --git a/net-analyzer/pnp4nagios/metadata.xml b/net-analyzer/pnp4nagios/metadata.xml
new file mode 100644
index 000000000000..36a72c70d317
--- /dev/null
+++ b/net-analyzer/pnp4nagios/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <upstream>
+ <remote-id type="sourceforge">pnp4nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild
new file mode 100644
index 000000000000..e59c11902445
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+
+DEPEND="
+ dev-lang/php[json,simplexml,zlib,xml,filter]
+ >=dev-lang/php-5.3
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ || ( net-analyzer/nagios-core net-analyzer/icinga net-analyzer/icinga2 )"
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( www-servers/apache[apache2_modules_rewrite] )"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.6.14-makefile.patch
+}
+
+src_configure() {
+ local var_dir=
+ local user_group=
+
+ if has_version net-analyzer/nagios-core; then
+ var_dir=/var/nagios/
+ user_group=nagios
+ else
+ var_dir=/var/lib/icinga/
+ user_group=icinga
+ fi
+
+ econf \
+ --sysconfdir=/etc/pnp \
+ --datarootdir=/usr/share/pnp \
+ --mandir=/usr/share/man \
+ --with-perfdata-dir=${var_dir}/perfdata \
+ --with-nagios-user=${user_group} \
+ --with-nagios-group=${user_group} \
+ --with-perfdata-logfile=${var_dir}/perfdata.log \
+ --with-perfdata-spool-dir=/var/spool/pnp
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-config
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${D}"/usr/share/pnp/install.php || die
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/98_pnp4nagios.conf
+ fi
+
+ # Bug 430358 - CVE-2012-3457
+ find "${D}/etc/pnp" -type f -exec chmod 0640 {} \; || die
+ find "${D}/etc/pnp" -type d -exec chmod 0750 {} \; || die
+}
+
+pkg_postinst() {
+ elog "Please make sure to enable URL rewriting in Apache or any other"
+ elog "webserver you're using, to get pnp4nagios running!"
+}
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild
new file mode 100644
index 000000000000..20346d15c7be
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org/"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+# A lot of things (sync mode, for one) are broken with nagios-4.x.
+DEPEND="
+ >=dev-lang/php-5.3:*[json,simplexml,zlib,xml,filter]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ || ( <net-analyzer/nagios-core-4 net-analyzer/icinga net-analyzer/icinga2 )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core," # "Require" directive
+APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends
+
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )"
+
+# There is no want_apache2_4, but we needed to specify that manually
+# anyway to be able to include the list of modules.
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.6.14-makefile.patch"
+}
+
+src_configure() {
+ local var_dir=
+ local user_group=
+
+ if has_version net-analyzer/nagios-core; then
+ var_dir=/var/nagios/
+ user_group=nagios
+ else
+ var_dir=/var/lib/icinga/
+ user_group=icinga
+ fi
+
+ econf \
+ --sysconfdir=/etc/pnp \
+ --datarootdir=/usr/share/pnp \
+ --mandir=/usr/share/man \
+ --with-perfdata-dir=${var_dir}/perfdata \
+ --with-nagios-user=${user_group} \
+ --with-nagios-group=${user_group} \
+ --with-perfdata-logfile=${var_dir}/perfdata.log \
+ --with-perfdata-spool-dir=/var/spool/pnp
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-config
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${D}/usr/share/pnp/install.php" || \
+ die "unable to remove ${D}/usr/share/pnp/install.php"
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
+
+ # Allow the apache user to read our config files. This same
+ # approach is used in net-analyzer/nagios-core.
+ chgrp -R apache "${D}/etc/pnp" \
+ || die "failed to change group of ${ROOT}etc/pnp"
+ fi
+
+ # Bug 430358 - CVE-2012-3457
+ find "${D}/etc/pnp" -type f -exec chmod 0640 '{}' + || \
+ die "unable to set file permissions under ${D}/etc/pnp"
+
+ find "${D}/etc/pnp" -type d -exec chmod 0750 '{}' + || \
+ die "unable to set directory permissions under ${D}/etc/pnp"
+}
+
+pkg_postinst() {
+ elog "To enable the pnp4nagios web front-end, please visit"
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D PNP -D PHP5\""
+ elog "to APACHE2_OPTS. Then pnp4nagios will be available at,"
+ elog
+ elog " http://localhost/pnp4nagios"
+ elog
+}