summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2015-10-26 17:08:17 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2015-10-26 17:08:17 +0000
commit8850ceb9875c22f8e2c833f82ffa34663cb88346 (patch)
treebbef1a650ae867be2cabbdee54ea468dd43bcd8f
parentfactory-default/app-admin/syslog-ng: Update to 3.7 (diff)
downloadportage-8850ceb9875c22f8e2c833f82ffa34663cb88346.tar.xz
net-analyzer/ndoutils: Import + fix for bug #564194
Package-Manager: portage-2.2.20.1
-rw-r--r--metadata/md5-cache/net-analyzer/ndoutils-2.0.012
-rw-r--r--net-analyzer/ndoutils/ChangeLog6
-rw-r--r--net-analyzer/ndoutils/Manifest7
-rw-r--r--net-analyzer/ndoutils/files/ndo2db.init-nagios325
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch10
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch10
-rw-r--r--net-analyzer/ndoutils/metadata.xml8
-rw-r--r--net-analyzer/ndoutils/ndoutils-2.0.0.ebuild77
8 files changed, 155 insertions, 0 deletions
diff --git a/metadata/md5-cache/net-analyzer/ndoutils-2.0.0 b/metadata/md5-cache/net-analyzer/ndoutils-2.0.0
new file mode 100644
index 00000000..f1b585a4
--- /dev/null
+++ b/metadata/md5-cache/net-analyzer/ndoutils-2.0.0
@@ -0,0 +1,12 @@
+DEFINED_PHASES=configure install postinst prepare setup
+DEPEND=dev-perl/DBD-mysql dev-perl/DBI virtual/mysql
+DESCRIPTION=Nagios addon to store Nagios data in a MySQL database
+EAPI=5
+HOMEPAGE=http://www.nagios.org
+KEYWORDS=~amd64 ~x86 ~ppc
+LICENSE=GPL-2
+RDEPEND=dev-perl/DBD-mysql dev-perl/DBI virtual/mysql >=net-analyzer/nagios-core-3.0
+SLOT=0
+SRC_URI=mirror://sourceforge/nagios/ndoutils-2.0.0.tar.gz
+_eclasses_=eutils 43da5163ba106e87d22d2e7d6d67537f multilib df4e4d5cfd3d137d0c248e1991c0e4d6 toolchain-funcs 7a212e5e01adfa4805c9978366e6ee85 user 906f3c8eb3a2350a4f1191a89baa3e46
+_md5_=2f948c23d02ef71c2347c6b814188fbf
diff --git a/net-analyzer/ndoutils/ChangeLog b/net-analyzer/ndoutils/ChangeLog
new file mode 100644
index 00000000..8150c002
--- /dev/null
+++ b/net-analyzer/ndoutils/ChangeLog
@@ -0,0 +1,6 @@
+*ndoutils-2.0.0 (26 Oct 2015)
+
+ 26 Oct 2015; Bertrand Jacquin <bertrand@jacquin.bzh>
+ +files/ndo2db.init-nagios3, +files/ndoutils-2.0.0-asprintf.patch,
+ +files/ndoutils-2.0.0-sleep.patch, +metadata.xml, +ndoutils-2.0.0.ebuild:
+ net-analyzer/ndoutils: Import + fix for bug #564194
diff --git a/net-analyzer/ndoutils/Manifest b/net-analyzer/ndoutils/Manifest
new file mode 100644
index 00000000..08e1be18
--- /dev/null
+++ b/net-analyzer/ndoutils/Manifest
@@ -0,0 +1,7 @@
+AUX ndo2db.init-nagios3 488 SHA256 18c190deab5c28e6da02b971bd1b835d40b758badad98851173c7d38d0a489cb WHIRLPOOL 8b706e1cfb7e12f72174ccd148e8aa6142166cd018608ef5d382369742dee941d9bb67b0647df40dfbcacc2e1051f97345d03e4c17eefc94085f26f73986e4cd
+AUX ndoutils-2.0.0-asprintf.patch 172 SHA256 c7db1469e5be1aeeffb03541dcc851094a8c212d6ad2caae3a37776bdb62ee6b WHIRLPOOL 0100d63a892308766ab7922a5bf92ea4e7c4238b383c0ab50eb52f176207df6e4e934b60929f9ca00367c833eebc74d1b1c84162223e78c4f35debabcb39aab5
+AUX ndoutils-2.0.0-sleep.patch 284 SHA256 b89fdf0f7ff20068e04ccec1411e24c76f7ae85350fd11ee7485bd426e4d9702 WHIRLPOOL c2f09b6ec089fe25eb78a90dd33a2f467dc3d5c33a7a3848d50c547f2c4c47479b0262d55535d4b5cffebe564ebe4aa5291089f2719a576628dd2940c61f1486
+DIST ndoutils-2.0.0.tar.gz 2207263 SHA256 b95047c812fb61465e66a9e1a6d4a42bf00620f334f08a6faf5afe20bdd43ba1 SHA512 c899c9f9d0a14995ae7e3fc9f8566891acef9186cc53f05e4f509e9dd01a19a17d32c746a4a1c125342ebffad65946c7a3ea11da68ce0ff240bd37e85334545c WHIRLPOOL d3e41eb5e2a3ea9a5ca0d24fc8319beaa914d2bcb16c187ab6c5f5a3f133c27756ecdc2b6302a75c015294a1b2c3cc48d3c87a540ae1b9b07a21eb427b45d181
+EBUILD ndoutils-2.0.0.ebuild 1410 SHA256 429ebab26c82dc03e89bdc66df0e0bd29a8e23b22918954284e6f230462fb50c WHIRLPOOL b3866c363db56d2f73f3f45aeb54b1cbc8b0fd7a97c3aa9f6a44dbb749c203dd3ccc298b103fbc081c73d1a6585e524e95fdf365e4642767f8a511f9408cdee3
+MISC ChangeLog 284 SHA256 2405a6e6c2a3fa637750a6bee319c8648ea6470db170bcefd2366a9deffaa654 WHIRLPOOL 6f11ee29ccf845aaf9f51be674153257126fd981e3fb8ac73b41ade51b13f51e0a25d1577eef6daa33a1beaf9a172edf349ed6adf623e764108b7bf4083e4bf9
+MISC metadata.xml 236 SHA256 6bf7d7f7fe4077e400b6940bf10a7f3ad8f0c2f195e1aeb7738ecfb852a2df3f WHIRLPOOL afb921da87500ce3dcc5f496ccf7e8a805c5c7124ab020e0633cb6de97b78f2f5645f7d701f9048f256d2f5107a240098ce48284503dd96fd2f3e28a95ad3fad
diff --git a/net-analyzer/ndoutils/files/ndo2db.init-nagios3 b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
new file mode 100644
index 00000000..bd175cf6
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depends() {
+ before nagios
+ need mysql
+}
+
+start() {
+ ebegin "Starting ndo2db"
+ if [ -S /var/nagios/ndo.sock ] ; then
+ rm -f /var/nagios/ndo.sock
+ fi
+ start-stop-daemon --start --quiet --exec /usr/bin/ndo2db \
+ -- -c /etc/nagios/ndo2db.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ndo2db"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ndo2db
+ eend $?
+}
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch
new file mode 100644
index 00000000..146132c2
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch
@@ -0,0 +1,10 @@
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -9,6 +9,7 @@
+ #ifndef _CONFIG_H
+ #define _CONFIG_H
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch b/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch
new file mode 100644
index 00000000..61694bae
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch
@@ -0,0 +1,10 @@
+--- a/src/queue.c
++++ b/src/queue.c
+@@ -8,6 +8,7 @@
+ #include "../include/queue.h"
+ #include <errno.h>
+ #include <time.h>
++#include <unistd.h> /* sleep() */
+
+ #define RETRY_LOG_INTERVAL 600 /* Seconds */
+ #define MAX_RETRIES 20 /* Max number of times to retry sending message */
diff --git a/net-analyzer/ndoutils/metadata.xml b/net-analyzer/ndoutils/metadata.xml
new file mode 100644
index 00000000..c8b1c872
--- /dev/null
+++ b/net-analyzer/ndoutils/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>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild b/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild
new file mode 100644
index 00000000..703f3e9c
--- /dev/null
+++ b/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="Nagios addon to store Nagios data in a MySQL database"
+HOMEPAGE="http://www.nagios.org"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+
+DEPEND="
+ dev-perl/DBD-mysql
+ dev-perl/DBI
+ virtual/mysql
+"
+RDEPEND="
+ ${DEPEND}
+ >=net-analyzer/nagios-core-3.0
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-asprintf.patch \
+ "${FILESDIR}"/${P}-sleep.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --enable-mysql
+}
+
+DOCS=(
+ 'docs/NDOUTILS DB Model.pdf'
+ 'docs/NDOUtils Documentation.pdf'
+ Changelog
+ README
+ REQUIREMENTS
+ TODO
+ UPGRADING
+)
+
+src_install() {
+ default
+
+ local itarget
+ if has_version ">=net-analyzer/nagios-core-4.0" ; then
+ itarget="install-4x"
+ else
+ itarget="install-3x"
+ fi
+
+ emake -C src DESTDIR="${D}" "${itarget}"
+ emake DESTDIR="${D}" install-config
+
+ newinitd "${FILESDIR}"/ndo2db.init-nagios3 ndo2db
+}
+
+pkg_postinst() {
+ elog "To include NDO in your Nagios setup you'll need to activate the NDO broker module"
+ elog "in /etc/nagios/nagios.cfg:"
+ elog "\tbroker_module=/usr/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg"
+}