summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2014-02-20 23:03:09 +0100
committerBertrand Jacquin <beber@meleeweb.net>2014-02-20 23:03:09 +0100
commit2df60d6d57519bdfda9bf5fcc278f3422ce3d102 (patch)
tree2dda06bae8b1684bdb3a746b63dbd1c73ec297c0 /net-analyzer
parentmetadata: refresh cache (diff)
downloadportage-2df60d6d57519bdfda9bf5fcc278f3422ce3d102.tar.xz
net-analyzer/ndoutils: Convert to EAPI 5, applied patches
Package-Manager: portage-2.2.8-r1
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ndoutils/ChangeLog7
-rw-r--r--net-analyzer/ndoutils/Manifest7
-rw-r--r--net-analyzer/ndoutils/files/1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch130
-rw-r--r--net-analyzer/ndoutils/files/1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch54
-rwxr-xr-xnet-analyzer/ndoutils/files/ndo2db.init-nagios325
-rw-r--r--net-analyzer/ndoutils/metadata.xml5
-rw-r--r--net-analyzer/ndoutils/ndoutils-1.4_beta9.ebuild57
7 files changed, 285 insertions, 0 deletions
diff --git a/net-analyzer/ndoutils/ChangeLog b/net-analyzer/ndoutils/ChangeLog
new file mode 100644
index 00000000..bacfa17a
--- /dev/null
+++ b/net-analyzer/ndoutils/ChangeLog
@@ -0,0 +1,7 @@
+*ndoutils-1.4_beta9 (20 Feb 2014)
+
+ 20 Feb 2014; Bertrand Jacquin <beber@meleeweb.net>
+ +files/1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch,
+ +files/1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch,
+ +files/ndo2db.init-nagios3, +metadata.xml, +ndoutils-1.4_beta9.ebuild:
+ net-analyzer/ndoutils: Convert to EAPI 5, applied patches
diff --git a/net-analyzer/ndoutils/Manifest b/net-analyzer/ndoutils/Manifest
new file mode 100644
index 00000000..75e3e1c5
--- /dev/null
+++ b/net-analyzer/ndoutils/Manifest
@@ -0,0 +1,7 @@
+AUX 1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch 4865 SHA256 c22c69912c14b12ca7bad49b61f76c8ee271973c71274aabb6b050b09e604cd5 WHIRLPOOL e3ba7fe35cdcd7c582c29870f602dbcf031311137ab217260a679830ae4eff507629846f40f0336508cc3f1c2ccdd2fcfef1171b38b7b4543583f973ecf49813
+AUX 1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch 1175 SHA256 6d21b4f652abce4765ec40f45565898da9cb047f453d88a6c06c8c3cdbfff7c3 WHIRLPOOL d1c501a7c10ad6145c3c9ce43a38696938d1aeff4164f8ac1467e8a4a49800b9ac5b5c661d4045fe5eb5180a735305a74befb24af49129d2e3e89efa32b49e17
+AUX ndo2db.init-nagios3 607 SHA256 111d7079380cfc40a16efd0757fcc98a9e747d20c1a17feb4351222da203d94b WHIRLPOOL 7e7f6dc9beee4de161179dbbed0ce249118899be6de991f8801864dc44fb25db4dec58d80287036df4b95be4bc566ffa1a5bcbd6b21a011f3b64dfc898d22119
+DIST ndoutils-1.4b9.tar.gz 2135521 SHA256 9d85187ec41586e91dc89630a9332d53aa78efa8f2bd9be8019bd7a2558b9306 WHIRLPOOL 094dfa911c8f3a49720e9b3b0865273a0eeef0b02699eb7b9f41e306ad7defaa0f71e8855dc786c77a814cdaa4945f78aecdd6ffd505d5a4d3696d7c70cbc720
+EBUILD ndoutils-1.4_beta9.ebuild 1472 SHA256 9e44d7a287f5dc745448aaad4cbe4a460f2aeaf028f02738d91e1c62c916507b WHIRLPOOL 6f69954e6fb1d622a3733af58f940ed855f41a764f35a765ee7d641e645fd19da7dbed588fa09eaf9a75176cf3c14cd88481bb167f023c6e0ed232b8ccc54dcd
+MISC ChangeLog 364 SHA256 08d19210f93fc3423a550002a38c41c44d2d83aff094d8cbdd225fb1a10935bc WHIRLPOOL 9fe84a698da55595fb6d93bd6284d9e3259017f233f1e7ce27d320e7cb9ed8f7a241b4b57b35b733dd8405c231413b479cda47df8ebf1110c2d91d9ae7f8d764
+MISC metadata.xml 160 SHA256 39e232fc7ec88ca0b077cb3950cb39d15cd990842b88d5bfe14f02f34d72f37b WHIRLPOOL f7504ce9e3e8a58d19bba5448305f806c2ae01d0a8d2cf09d6bc6a089a6e1c28a1b12a80bb6020584b5ed21df94e4936b1695a54548704cb8679660b6b807955
diff --git a/net-analyzer/ndoutils/files/1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch b/net-analyzer/ndoutils/files/1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch
new file mode 100644
index 00000000..db2f0404
--- /dev/null
+++ b/net-analyzer/ndoutils/files/1.4_beta9-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch
@@ -0,0 +1,130 @@
+From 1f7c71717dc498bcedd2763ed0c0d955b9c791e0 Mon Sep 17 00:00:00 2001
+From: Eric Stanley <estanley375@users.sourceforge.net>
+Date: Fri, 11 May 2012 18:05:56 +0000
+Subject: [PATCH] Fixed off-by-one error in temporary array used in
+ ndomod_write_object_config()
+
+---
+ src/ndomod.c | 52 ++++++++++++++++++++++++++--------------------------
+ 1 file changed, 26 insertions(+), 26 deletions(-)
+
+diff --git a/src/ndomod.c b/src/ndomod.c
+index c266f03..84eaf96 100644
+--- a/src/ndomod.c
++++ b/src/ndomod.c
+@@ -3145,7 +3145,7 @@ int ndomod_write_config(int config_type){
+ }
+
+
+-#define OBJECTCONFIG_ES_ITEMS 15
++#define OBJECTCONFIG_ES_ITEMS 16
+
+ /* dumps object configuration data to sink */
+ int ndomod_write_object_config(int config_type){
+@@ -3560,13 +3560,13 @@ int ndomod_write_object_config(int config_type){
+ es[7]=ndo_escape_buffer(temp_host->failure_prediction_options);
+
+ #ifdef BUILD_NAGIOS_3X
+- es[7]=ndo_escape_buffer(temp_host->notes);
+- es[8]=ndo_escape_buffer(temp_host->notes_url);
+- es[9]=ndo_escape_buffer(temp_host->action_url);
+- es[10]=ndo_escape_buffer(temp_host->icon_image);
+- es[11]=ndo_escape_buffer(temp_host->icon_image_alt);
+- es[12]=ndo_escape_buffer(temp_host->vrml_image);
+- es[13]=ndo_escape_buffer(temp_host->statusmap_image);
++ es[8]=ndo_escape_buffer(temp_host->notes);
++ es[9]=ndo_escape_buffer(temp_host->notes_url);
++ es[10]=ndo_escape_buffer(temp_host->action_url);
++ es[11]=ndo_escape_buffer(temp_host->icon_image);
++ es[12]=ndo_escape_buffer(temp_host->icon_image_alt);
++ es[13]=ndo_escape_buffer(temp_host->vrml_image);
++ es[14]=ndo_escape_buffer(temp_host->statusmap_image);
+ have_2d_coords=temp_host->have_2d_coords;
+ x_2d=temp_host->x_2d;
+ y_2d=temp_host->y_2d;
+@@ -3581,17 +3581,17 @@ int ndomod_write_object_config(int config_type){
+ flap_detection_on_up=temp_host->flap_detection_on_up;
+ flap_detection_on_down=temp_host->flap_detection_on_down;
+ flap_detection_on_unreachable=temp_host->flap_detection_on_unreachable;
+- es[14]=ndo_escape_buffer(temp_host->display_name);
++ es[15]=ndo_escape_buffer(temp_host->display_name);
+ #endif
+ #ifdef BUILD_NAGIOS_2X
+ if((temp_hostextinfo=find_hostextinfo(temp_host->name))!=NULL){
+- es[7]=ndo_escape_buffer(temp_hostextinfo->notes);
+- es[8]=ndo_escape_buffer(temp_hostextinfo->notes_url);
+- es[9]=ndo_escape_buffer(temp_hostextinfo->action_url);
+- es[10]=ndo_escape_buffer(temp_hostextinfo->icon_image);
+- es[11]=ndo_escape_buffer(temp_hostextinfo->icon_image_alt);
+- es[12]=ndo_escape_buffer(temp_hostextinfo->vrml_image);
+- es[13]=ndo_escape_buffer(temp_hostextinfo->statusmap_image);
++ es[8]=ndo_escape_buffer(temp_hostextinfo->notes);
++ es[9]=ndo_escape_buffer(temp_hostextinfo->notes_url);
++ es[10]=ndo_escape_buffer(temp_hostextinfo->action_url);
++ es[11]=ndo_escape_buffer(temp_hostextinfo->icon_image);
++ es[12]=ndo_escape_buffer(temp_hostextinfo->icon_image_alt);
++ es[13]=ndo_escape_buffer(temp_hostextinfo->vrml_image);
++ es[14]=ndo_escape_buffer(temp_hostextinfo->statusmap_image);
+ have_2d_coords=temp_hostextinfo->have_2d_coords;
+ x_2d=temp_hostextinfo->x_2d;
+ y_2d=temp_hostextinfo->y_2d;
+@@ -3601,13 +3601,13 @@ int ndomod_write_object_config(int config_type){
+ z_3d=temp_hostextinfo->z_3d;
+ }
+ else{
+- es[7]=NULL;
+ es[8]=NULL;
+ es[9]=NULL;
+ es[10]=NULL;
+ es[11]=NULL;
+ es[12]=NULL;
+ es[13]=NULL;
++ es[14]=NULL;
+ have_2d_coords=FALSE;
+ x_2d=0;
+ y_2d=0;
+@@ -3623,7 +3623,7 @@ int ndomod_write_object_config(int config_type){
+ flap_detection_on_up=1;
+ flap_detection_on_down=1;
+ flap_detection_on_unreachable=1;
+- es[14]=ndo_escape_buffer(temp_host->name);
++ es[15]=ndo_escape_buffer(temp_host->name);
+ #endif
+
+ snprintf(temp_buffer,sizeof(temp_buffer)-1
+@@ -3635,7 +3635,7 @@ int ndomod_write_object_config(int config_type){
+ ,NDO_DATA_HOSTNAME
+ ,(es[0]==NULL)?"":es[0]
+ ,NDO_DATA_DISPLAYNAME
+- ,(es[14]==NULL)?"":es[14]
++ ,(es[15]==NULL)?"":es[15]
+ ,NDO_DATA_HOSTALIAS
+ ,(es[1]==NULL)?"":es[1]
+ ,NDO_DATA_HOSTADDRESS
+@@ -3711,19 +3711,19 @@ int ndomod_write_object_config(int config_type){
+ ,NDO_DATA_OBSESSOVERHOST
+ ,temp_host->obsess_over_host
+ ,NDO_DATA_NOTES
+- ,(es[7]==NULL)?"":es[7]
+- ,NDO_DATA_NOTESURL
+ ,(es[8]==NULL)?"":es[8]
+- ,NDO_DATA_ACTIONURL
++ ,NDO_DATA_NOTESURL
+ ,(es[9]==NULL)?"":es[9]
+- ,NDO_DATA_ICONIMAGE
++ ,NDO_DATA_ACTIONURL
+ ,(es[10]==NULL)?"":es[10]
+- ,NDO_DATA_ICONIMAGEALT
++ ,NDO_DATA_ICONIMAGE
+ ,(es[11]==NULL)?"":es[11]
++ ,NDO_DATA_ICONIMAGEALT
++ ,(es[12]==NULL)?"":es[12]
+ ,NDO_DATA_VRMLIMAGE
+- ,(es[12]==NULL)?"":es[12]
+- ,NDO_DATA_STATUSMAPIMAGE
+ ,(es[13]==NULL)?"":es[13]
++ ,NDO_DATA_STATUSMAPIMAGE
++ ,(es[14]==NULL)?"":es[14]
+ ,NDO_DATA_HAVE2DCOORDS
+ ,have_2d_coords
+ ,NDO_DATA_X2D
diff --git a/net-analyzer/ndoutils/files/1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch b/net-analyzer/ndoutils/files/1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch
new file mode 100644
index 00000000..965a6324
--- /dev/null
+++ b/net-analyzer/ndoutils/files/1.4_beta9-Patch-for-ndoutils-1.4b9-contact_name.patch
@@ -0,0 +1,54 @@
+From: Marius Hein
+Date: Thu, 18 Aug 2011 09:46:00 +0200
+Subject: [PATCH] Patch for ndoutils-1.4b9 contact_name
+
+Hi.
+
+This is my first post on the list so: Hello everybody!
+
+In ndoutils 1.4b9 the contact name for notifications is not provided.
+New entries for table nagios_contactnotifications and contact_object_id
+results into 0.
+
+The ndo dump looks like this (attribute 134 is empty):
+
+220:
+1=603
+2=0
+3=0
+4=1311855238.314743
+89=1
+117=1311855238.169753
+33=1311855238.314738
+53=YYYYYYYYY
+114=YYYYYYYYYY-XXXXXXXXXX
+134=
+87=0
+118=1
+95=test1
+125=test1
+95=test1
+5=
+6=
+999
+
+I attached a patch which changes the array keys used in
+ndomod_broker_data to resolve that issue. Maybe this helps.
+
+See Also: http://permalink.gmane.org/gmane.network.nagios.devel/8137
+
+---
+ ndomod.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- ndoutils-1.4b9/src/ndomod.c
++++ ndoutils-1.4b9/src/ndomod.c
+@@ -2803,7 +2803,7 @@ int ndomod_broker_data(int event_type, v
+ ,NDO_DATA_SERVICE
+ ,(es[1]==NULL)?"":es[1]
+ ,NDO_DATA_CONTACTNAME
+- ,(es[5]==NULL)?"":es[5]
++ ,(es[7]==NULL)?"":es[7]
+ ,NDO_DATA_NOTIFICATIONREASON
+ ,cnotdata->reason_type
+ ,NDO_DATA_STATE
diff --git a/net-analyzer/ndoutils/files/ndo2db.init-nagios3 b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
new file mode 100755
index 00000000..cd8be083
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndoutils/files/ndo2db.init-nagios3,v 1.3 2010/10/30 14:15:50 dertobi123 Exp $
+
+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/metadata.xml b/net-analyzer/ndoutils/metadata.xml
new file mode 100644
index 00000000..78692635
--- /dev/null
+++ b/net-analyzer/ndoutils/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ndoutils/ndoutils-1.4_beta9.ebuild b/net-analyzer/ndoutils/ndoutils-1.4_beta9.ebuild
new file mode 100644
index 00000000..6d4ef08e
--- /dev/null
+++ b/net-analyzer/ndoutils/ndoutils-1.4_beta9.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndoutils/ndoutils-1.4_beta9.ebuild,v 1.2 2012/06/12 02:48:43 zmedico Exp $
+
+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"
+IUSE=""
+
+DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ 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}/${PV}-Patch-for-ndoutils-1.4b9-contact_name.patch"
+ epatch "${FILESDIR}/${PV}-Fixed-off-by-one-error-in-temporary-array-used-in-nd.patch"
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --enable-mysql \
+ --disable-pgsql
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ emake install-config DESTDIR="${D}"
+
+ dodoc README REQUIREMENTS TODO UPGRADING Changelog "docs/NDOUTILS DB Model.pdf" "docs/NDOUtils Documentation.pdf"
+
+ 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-3x.o config_file=/etc/nagios/ndomod.cfg"
+}