Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (83f66833bf43aeae016b4deba0b4a1a95ab8c504)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (83f66833bf43aeae016b4deba0b4a1a95ab8c504)
  • Date: Sat, 26 Sep 2009 11:45:22 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

ChangeLog | 5 +
net/spine/DEPENDS | 2
net/spine/DETAILS | 17 ++++
net/spine/HISTORY | 2
net/spine/PRE_BUILD | 6 +
net/spine/patches/mysql_client_reconnect.patch | 15 ++++
net/spine/patches/ping_reliability.patch | 45 ++++++++++++
net/spine/patches/snmp_v3_fix.patch | 88
+++++++++++++++++++++++++
8 files changed, 179 insertions(+), 1 deletion(-)

New commits:
commit 83f66833bf43aeae016b4deba0b4a1a95ab8c504
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

spine: new spell, poller for Cacti

diff --git a/ChangeLog b/ChangeLog
index 70e8ceb..8c82efb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,10 @@
+2009-09-26 Vlad Glagolev <stealth AT sourcemage.org>
+ * net/spine: new spell, poller for Cacti
+
2009-09-25 David Kowis <dkowis AT shlrm.org>
* libs/tbb: Intel thread building blocks!
* archive/par2cmdline-tbb: par2cmdline, but using intel's Thread
Building
- Blocks for multi-core par2
+ Blocks for multi-core par2

2009-09-25 Bor Kraljič <pyrobor AT ver.si>
* gurus.gpg: added my signing key
diff --git a/net/spine/DEPENDS b/net/spine/DEPENDS
new file mode 100755
index 0000000..e238d7f
--- /dev/null
+++ b/net/spine/DEPENDS
@@ -0,0 +1,2 @@
+depends net-snmp &&
+depends mysql
diff --git a/net/spine/DETAILS b/net/spine/DETAILS
new file mode 100755
index 0000000..0b83afb
--- /dev/null
+++ b/net/spine/DETAILS
@@ -0,0 +1,17 @@
+ SPELL=spine
+ VERSION=0.8.7e
+ SOURCE=cacti-$SPELL-$VERSION.tar.gz
+ SOURCE_URL[0]=http://www.cacti.net/downloads/$SPELL/$SOURCE
+
SOURCE_HASH=sha512:7ec964922770f7db89fdf62dff74fdd98397a045239e9e776efd8f07791d243125211d660acc54060cb7e386d8d9997e6cef2c4fc1364e7076f8e3c6ddd90536
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/cacti-$SPELL-$VERSION"
+ WEB_SITE=http://www.cacti.net/spine_info.php
+ LICENSE[0]=LGPL
+ ENTERED=20090926
+ SHORT="poller for Cacti"
+cat << EOF
+Spine, formally Cactid, is a poller for Cacti that primarily strives to be
+as fast as possible. For this reason it is written in native C, makes use
+of POSIX threads, and is linked directly against the net-snmp library for
+minmumal SNMP polling overhead. Spine is a replacement for the default
cmd.php
+poller so you must decide if using Spine makes sense for your installation.
+EOF
diff --git a/net/spine/HISTORY b/net/spine/HISTORY
new file mode 100644
index 0000000..63f1531
--- /dev/null
+++ b/net/spine/HISTORY
@@ -0,0 +1,2 @@
+2009-09-26 Vlad Glagolev <stealth AT sourcemage.org>
+ * DEPENDS, DETAILS, HISTORY, patches/*: spell created
diff --git a/net/spine/PRE_BUILD b/net/spine/PRE_BUILD
new file mode 100755
index 0000000..66c1eb8
--- /dev/null
+++ b/net/spine/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+for patch in "$SPELL_DIRECTORY/patches"/*.patch; do
+ patch -p1 < $patch
+done
diff --git a/net/spine/patches/mysql_client_reconnect.patch
b/net/spine/patches/mysql_client_reconnect.patch
new file mode 100644
index 0000000..5880915
--- /dev/null
+++ b/net/spine/patches/mysql_client_reconnect.patch
@@ -0,0 +1,15 @@
+--- 0.8.7e/sql.c 2009-06-28 21:45:02.000000000 -0400
++++ ../branches/0.8.7/sql.c 2009-08-18 20:51:30.000000000 -0400
+@@ -186,6 +186,12 @@
+ die("FATAL: MySQL options unable to set timeout value");
+ }
+
++ my_bool reconnect = 1;
++ options_error = mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect);
++ if (options_error < 0) {
++ die("FATAL: MySQL options unable to set reconnect option\n");
++ }
++
+ while (tries > 0) {
+ tries--;
+
diff --git a/net/spine/patches/ping_reliability.patch
b/net/spine/patches/ping_reliability.patch
new file mode 100644
index 0000000..0535fa5
--- /dev/null
+++ b/net/spine/patches/ping_reliability.patch
@@ -0,0 +1,45 @@
+--- 0.8.7e/ping.c 2009-06-28 21:45:02.000000000 -0400
++++ ../branches/0.8.7/ping.c 2009-08-18 20:51:30.000000000 -0400
+@@ -890,7 +890,7 @@
+ return(cleaned_hostname);
+ }
+
+-/*! \fn unsigned short get_checksum(void* buf, int len)
++/*! \fn unsigned short int get_checksum(void* buf, int len)
+ * \brief calculates a 16bit checksum of a packet buffer
+ * \param buf the input buffer to calculate the checksum of
+ * \param len the size of the input buffer
+@@ -898,11 +898,12 @@
+ * \return 16bit checksum of an input buffer of size len.
+ *
+ */
+-unsigned short get_checksum(void* buf, int len) {
++unsigned short int get_checksum(void* buf, int len) {
+ int nleft = len;
+ int32_t sum = 0;
+- unsigned short answer;
+- unsigned short* w = (unsigned short*)buf;
++ unsigned short int answer;
++ unsigned short int* w = (unsigned short int*)buf;
++ unsigned short int odd_byte = 0;
+
+ while (nleft > 1) {
+ sum += *w++;
+@@ -910,7 +911,8 @@
+ }
+
+ if (nleft == 1) {
+- sum += *(unsigned char*)w;
++ *(unsigned char*)(&odd_byte) = *(unsigned char*)w;
++ sum += odd_byte;
+ }
+
+ sum = (sum >> 16) + (sum & 0xffff);
+--- 0.8.7e/ping.h 2009-06-28 21:45:02.000000000 -0400
++++ ../branches/0.8.7/ping.h 2009-08-18 20:51:30.000000000 -0400
+@@ -142,4 +142,4 @@
+ extern char *remove_tcp_udp_from_hostname(char *hostname);
+ extern void update_host_status(int status, host_t *host, ping_t *ping, int
availability_method);
+ extern int init_sockaddr(struct sockaddr_in *name, const char *hostname,
unsigned short int port);
+-extern unsigned short get_checksum(void* buf, int len);
++extern unsigned short int get_checksum(void* buf, int len);
diff --git a/net/spine/patches/snmp_v3_fix.patch
b/net/spine/patches/snmp_v3_fix.patch
new file mode 100644
index 0000000..6efe173
--- /dev/null
+++ b/net/spine/patches/snmp_v3_fix.patch
@@ -0,0 +1,88 @@
+--- 0.8.7e/configure.ac 2009-06-28 21:45:02.000000000 -0400
++++ ../branches/0.8.7/configure.ac 2009-08-18 20:51:30.000000000 -0400
+@@ -351,6 +351,21 @@
+ AC_MSG_RESULT([no])
+ fi
+
++# ****************** Force Net-SNMP Version Checks ***********************
++# If we should use the system popen or nifty popen
++AC_MSG_CHECKING(whether to verify net-snmp library vs header versions)
++AC_ARG_ENABLE(strict-snmp,
++ [ --enable-strict-snmp Enable checking of Net-SNMP library vs
header versions (default: disabled)],
++ [ ENABLED_SNMP_VERSION=$enableval ],
++ [ ENABLED_SNMP_VERSION=no ]
++ )
++if test "$ENABLED_SNMP_VERSION" = "yes"; then
++ AC_MSG_RESULT([yes])
++ AC_DEFINE(VERIFY_PACKAGE_VERSION, 1, If we are going to force Net-SNMP
library and header versons to be the same)
++else
++ AC_MSG_RESULT([no])
++fi
++
+ # ****************** gethostbyname_r Check ***********************
+ # Linux Variant
+ AC_MSG_CHECKING([for glibc gethostbyname_r])
+--- 0.8.7e/snmp.c 2009-06-28 21:45:02.000000000 -0400
++++ ../branches/0.8.7/snmp.c 2009-08-18 20:51:30.000000000 -0400
+@@ -91,7 +91,7 @@
+ netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_PRINT_BARE_VALUE, 1);
+ netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_NUMERIC_TIMETICKS, 1);
+
+- #ifdef PACKAGE_VERSION
++ #if defined(VERIFY_PACKAGE_VERSION) && defined(PACKAGE_VERSION)
+ /* check that the headers we compiled with match the library
we linked with -
+ apparently not defined in UCD-SNMP...
+ */
+@@ -215,24 +215,22 @@
+ session.securityName = snmp_username;
+ session.securityNameLen = strlen(session.securityName);
+
++ if (snmp_context && strlen(snmp_context)) {
+ session.contextName = snmp_context;
+ session.contextNameLen = strlen(session.contextName);
++ }
+
+ session.securityAuthKeyLen = USM_AUTH_KU_LEN;
+
+- /* set the engineBoots and engineTime to null so that they
are discovered */
+- session.engineBoots = 0;
+- session.engineTime = 0;
+-
+ /* set the authentication protocol */
+ if (strcmp(snmp_auth_protocol, "MD5") == 0) {
+ /* set the authentication method to MD5 */
+- session.securityAuthProto =
snmp_duplicate_objid(usmHMACMD5AuthProtocol, OIDSIZE(usmHMACMD5AuthProtocol));
+- session.securityAuthProtoLen =
OIDSIZE(usmHMACMD5AuthProtocol);
++ session.securityAuthProto =
snmp_duplicate_objid(usmHMACMD5AuthProtocol, USM_AUTH_PROTO_MD5_LEN);
++ session.securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN;
+ }else{
+ /* set the authentication method to SHA1 */
+- session.securityAuthProto =
snmp_duplicate_objid(usmHMACSHA1AuthProtocol,
OIDSIZE(usmHMACSHA1AuthProtocol));
+- session.securityAuthProtoLen =
OIDSIZE(usmHMACSHA1AuthProtocol);
++ session.securityAuthProto =
snmp_duplicate_objid(usmHMACSHA1AuthProtocol, USM_AUTH_PROTO_SHA_LEN);
++ session.securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
+ }
+
+ /* set the authentication key to the hashed version. The
password must me at least 8 char */
+@@ -255,16 +253,16 @@
+ session.securityLevel =
SNMP_SEC_LEVEL_AUTHNOPRIV;
+ }else{
+ if (strcmp(snmp_priv_protocol, "DES") == 0) {
+- session.securityPrivProto =
snmp_duplicate_objid(usmDESPrivProtocol, OIDSIZE(usmDESPrivProtocol));
+- session.securityPrivProtoLen =
OIDSIZE(usmDESPrivProtocol);
++ session.securityPrivProto =
snmp_duplicate_objid(usmDESPrivProtocol, USM_PRIV_PROTO_DES_LEN);
++ session.securityPrivProtoLen =
USM_PRIV_PROTO_DES_LEN;
+ session.securityPrivKeyLen =
USM_PRIV_KU_LEN;
+
+ /* set the security level to authenticate,
and encrypted */
+ session.securityLevel =
SNMP_SEC_LEVEL_AUTHPRIV;
+ }else{
+- #if defined(usmAESPrivProtocol) &&
SNMP_DEFAULT_PRIV_PROTO == usmAESPrivProtocol
+- session.securityPrivProto =
snmp_duplicate_objid(usmAESPrivProtocol, OIDSIZE(usmAESPrivProtocol));
+- session.securityPrivProtoLen =
OIDSIZE(usmAESPrivProtocol);
++ #if defined(USM_PRIV_PROTO_AES_LEN)
++ session.securityPrivProto =
snmp_duplicate_objid(usmAESPrivProtocol, USM_PRIV_PROTO_AES_LEN);
++ session.securityPrivProtoLen =
USM_PRIV_PROTO_AES_LEN;
+ session.securityPrivKeyLen =
USM_PRIV_KU_LEN;
+ #else
+ session.securityPrivProto =
snmp_duplicate_objid(usmAES128PrivProtocol, OIDSIZE(usmAES128PrivProtocol));



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (83f66833bf43aeae016b4deba0b4a1a95ab8c504), Vlad Glagolev, 09/26/2009

Archive powered by MHonArc 2.6.24.

Top of Page