summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2007-08-15 00:10:36 +0200
committerBertrand Jacquin <beber@meleeweb.net>2007-08-15 00:10:36 +0200
commite8d7d03ca255f128c2b59790e0acd5cf8114571d (patch)
tree88d37dc103b73de4fc0c3b939142ce2200f30e0a /net-analyzer
parentssl & ssh padlocked (diff)
downloadportage-e8d7d03ca255f128c2b59790e0acd5cf8114571d.tar.xz
patch for cactid to make it work with socket unix
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/cacti-cactid/Manifest12
-rw-r--r--net-analyzer/cacti-cactid/cacti-cactid-0.8.6i-r1.ebuild59
-rw-r--r--net-analyzer/cacti-cactid/files/cactid-socket-unix.patch34
-rw-r--r--net-analyzer/cacti-cactid/files/digest-cacti-cactid-0.8.6i-r13
4 files changed, 108 insertions, 0 deletions
diff --git a/net-analyzer/cacti-cactid/Manifest b/net-analyzer/cacti-cactid/Manifest
new file mode 100644
index 00000000..80b08509
--- /dev/null
+++ b/net-analyzer/cacti-cactid/Manifest
@@ -0,0 +1,12 @@
+AUX cactid-socket-unix.patch 852 RMD160 3c0dadd3464e8ca0a27e7851f3cb8fc33ac2fd43 SHA1 e2f7e6ed52156462b3ecf35ea44334e494ab1038 SHA256 5b90def11a2b2c224079d52643b794f7849d5f316f9b5ad1facc2d5ea1571f24
+MD5 3452be800798df961bb169303e16c356 files/cactid-socket-unix.patch 852
+RMD160 3c0dadd3464e8ca0a27e7851f3cb8fc33ac2fd43 files/cactid-socket-unix.patch 852
+SHA256 5b90def11a2b2c224079d52643b794f7849d5f316f9b5ad1facc2d5ea1571f24 files/cactid-socket-unix.patch 852
+DIST cacti-cactid-0.8.6i.tar.gz 153534 RMD160 40975765cf5f4543ceb85a35c8ae905064c7f4d9 SHA1 82a14128780216ab8ae2a46f45fdecc9210b00f2 SHA256 6024ee5083a296ef3815ffa2294a9d0c1605aa8501e7114716675101db8bd841
+EBUILD cacti-cactid-0.8.6i-r1.ebuild 1681 RMD160 fade6b1a1651c7d59e414afe848f78ee0a549602 SHA1 76c86aa79d26620ee64da1d44be40fe7b6f68a68 SHA256 285e1981bb7968e9395ee1cbad8fe954aa1e23ae2e92a11c6899a270b3ba8a2b
+MD5 3f34081a4eb4af84821875e0f40222bc cacti-cactid-0.8.6i-r1.ebuild 1681
+RMD160 fade6b1a1651c7d59e414afe848f78ee0a549602 cacti-cactid-0.8.6i-r1.ebuild 1681
+SHA256 285e1981bb7968e9395ee1cbad8fe954aa1e23ae2e92a11c6899a270b3ba8a2b cacti-cactid-0.8.6i-r1.ebuild 1681
+MD5 d198e4485c523736100c656b2e9f8f92 files/digest-cacti-cactid-0.8.6i-r1 259
+RMD160 c45337ad94a42fd381dc38c9f44f5200860f4ef6 files/digest-cacti-cactid-0.8.6i-r1 259
+SHA256 3ff9004d6b265b75d02404b502ff2040bc2f00fbd0075b66b9e7f9d6661dc880 files/digest-cacti-cactid-0.8.6i-r1 259
diff --git a/net-analyzer/cacti-cactid/cacti-cactid-0.8.6i-r1.ebuild b/net-analyzer/cacti-cactid/cacti-cactid-0.8.6i-r1.ebuild
new file mode 100644
index 00000000..6767af73
--- /dev/null
+++ b/net-analyzer/cacti-cactid/cacti-cactid-0.8.6i-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti-cactid/cacti-cactid-0.8.6i-r1.ebuild,v 1.8 2007/07/19 13:27:10 angelos Exp $
+
+WANT_AUTOCONF="latest"
+inherit autotools
+
+MY_PV=${PV/_p/-}
+DESCRIPTION="Cactid is a poller for Cacti that primarily strives to be as fast
+as possible"
+HOMEPAGE="http://cacti.net/cactid_info.php"
+SRC_URI="http://www.cacti.net/downloads/cactid/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+DEPEND="net-analyzer/net-snmp
+ virtual/mysql"
+RDEPEND="${DEPEND}
+ net-analyzer/cacti"
+
+src_unpack() {
+ unpack ${A} ; cd "${S}"
+ sed -i -e 's/^bin_PROGRAMS/sbin_PROGRAMS/' Makefile.am
+ sed -i -e 's/mysqlclient/mysqlclient_r/g' configure.ac
+ sed -i -e 's/wwwroot\/cacti\/log/var\/log/g' cactid.h
+
+ epatch ${FILESDIR}/cactid-socket-unix.patch
+}
+
+src_compile() {
+ eaclocal
+ eautoconf
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ exeinto usr/sbin ; doexe "${S}"/cactid
+ insinto etc/ ; insopts -m0640 -o root ; doins "${S}"/cactid.conf
+ dodoc ChangeLog INSTALL README
+}
+
+pkg_postinst() {
+ elog "Please see cacti's site for installation instructions."
+ elog "Theres no need to change the crontab for this, just"
+ elog "read the instructions on how to implement it"
+ elog
+ elog "http://cacti.net/cactid_install.php"
+ echo
+ ewarn "/etc/cactid.conf should be readable by webserver, thus after you"
+ ewarn "decide on webserver/webserver group do not forgive to change it's"
+ ewarn "group with the following command:"
+ ewarn
+ ewarn " # chown root:wwwgroup /etc/cactid.conf"
+ echo
+}
diff --git a/net-analyzer/cacti-cactid/files/cactid-socket-unix.patch b/net-analyzer/cacti-cactid/files/cactid-socket-unix.patch
new file mode 100644
index 00000000..6e5aba7d
--- /dev/null
+++ b/net-analyzer/cacti-cactid/files/cactid-socket-unix.patch
@@ -0,0 +1,34 @@
+--- sql.c 2006-10-23 03:31:41.000000000 +0200
++++ sql.c.my 2007-08-14 23:57:57.000000000 +0200
+@@ -33,6 +33,10 @@
+ #include "common.h"
+ #include "cactid.h"
+
++#include <sys/stat.h>
++#include <unistd.h>
++#include <sys/types.h>
++
+ /*! \fn int db_insert(MYSQL *mysql, const char *query)
+ * \brief inserts a row or rows in a database table.
+ * \param mysql the database connection object
+@@ -133,12 +137,19 @@
+ int success;
+ char *hostname;
+ char *socket;
++ struct stat socket_stat;
+
+ if ((hostname = strdup(set.dbhost)) == NULL) {
+ die("ERROR: malloc(): strdup() failed\n");
+ }
+
+- if ((socket = strstr(hostname,":"))) {
++ if (stat (hostname, &socket_stat) == 0) {
++ if (socket_stat.st_mode && S_IFSOCK) {
++ socket = strdup (set.dbhost);
++ hostname = NULL;
++ }
++ }
++ else if ((socket = strstr(hostname,":"))) {
+ *socket++ = 0x0;
+ }
+
diff --git a/net-analyzer/cacti-cactid/files/digest-cacti-cactid-0.8.6i-r1 b/net-analyzer/cacti-cactid/files/digest-cacti-cactid-0.8.6i-r1
new file mode 100644
index 00000000..587f6566
--- /dev/null
+++ b/net-analyzer/cacti-cactid/files/digest-cacti-cactid-0.8.6i-r1
@@ -0,0 +1,3 @@
+MD5 303c7533656c075cb695a1a8c54537b6 cacti-cactid-0.8.6i.tar.gz 153534
+RMD160 40975765cf5f4543ceb85a35c8ae905064c7f4d9 cacti-cactid-0.8.6i.tar.gz 153534
+SHA256 6024ee5083a296ef3815ffa2294a9d0c1605aa8501e7114716675101db8bd841 cacti-cactid-0.8.6i.tar.gz 153534