packages: cacti-spine/cacti-spine.spec, cacti-spine/mysql_client_reconnect....
glen
glen at pld-linux.org
Wed Apr 14 23:13:43 CEST 2010
Author: glen Date: Wed Apr 14 21:13:43 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add 3 official patches
- increase result buffer to 4096 (for varnish template)
- rel 3
---- Files affected:
packages/cacti-spine:
cacti-spine.spec (1.28 -> 1.29) , mysql_client_reconnect.patch (NONE -> 1.1) (NEW), ping_reliability.patch (NONE -> 1.1) (NEW), snmp_v3_fix.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/cacti-spine/cacti-spine.spec
diff -u packages/cacti-spine/cacti-spine.spec:1.28 packages/cacti-spine/cacti-spine.spec:1.29
--- packages/cacti-spine/cacti-spine.spec:1.28 Thu Jul 16 10:50:16 2009
+++ packages/cacti-spine/cacti-spine.spec Wed Apr 14 23:13:37 2010
@@ -3,12 +3,15 @@
Summary(pl.UTF-8): Backend gromadzący dane dla cacti
Name: cacti-spine
Version: 0.8.7e
-Release: 2
+Release: 3
License: GPL
Group: Applications
Source0: http://www.cacti.net/downloads/spine/%{name}-%{version}.tar.gz
# Source0-md5: 99e5bde07fc31d1ed8aa23c59de00417
Patch0: %{name}-paths.patch
+Patch100: http://www.cacti.net/downloads/spine/patches/snmp_v3_fix.patch
+Patch101: http://www.cacti.net/downloads/spine/patches/mysql_client_reconnect.patch
+Patch102: http://www.cacti.net/downloads/spine/patches/ping_reliability.patch
URL: http://www.cacti.net/
BuildRequires: autoconf
BuildRequires: automake
@@ -39,6 +42,9 @@
%prep
%setup -q
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
%patch0 -p1
%build
@@ -48,18 +54,18 @@
%{__autoconf}
chmod +x ./configure
%configure \
+ --with-results-buffer=4096 \
--with-mysql \
--with-snmp=%{_prefix}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install spine.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a spine.conf $RPM_BUILD_ROOT%{_sysconfdir}
mv $RPM_BUILD_ROOT%{_sbindir}/{spine,cacti-poller-spine}
%clean
@@ -77,6 +83,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.29 2010/04/14 21:13:37 glen
+- add 3 official patches
+- increase result buffer to 4096 (for varnish template)
+- rel 3
+
Revision 1.28 2009/07/16 08:50:16 glen
- release 2
================================================================
Index: packages/cacti-spine/mysql_client_reconnect.patch
diff -u /dev/null packages/cacti-spine/mysql_client_reconnect.patch:1.1
--- /dev/null Wed Apr 14 23:13:43 2010
+++ packages/cacti-spine/mysql_client_reconnect.patch Wed Apr 14 23:13:37 2010
@@ -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--;
+
================================================================
Index: packages/cacti-spine/ping_reliability.patch
diff -u /dev/null packages/cacti-spine/ping_reliability.patch:1.1
--- /dev/null Wed Apr 14 23:13:43 2010
+++ packages/cacti-spine/ping_reliability.patch Wed Apr 14 23:13:37 2010
@@ -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);
================================================================
Index: packages/cacti-spine/snmp_v3_fix.patch
diff -u /dev/null packages/cacti-spine/snmp_v3_fix.patch:1.1
--- /dev/null Wed Apr 14 23:13:43 2010
+++ packages/cacti-spine/snmp_v3_fix.patch Wed Apr 14 23:13:37 2010
@@ -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));
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti-spine/cacti-spine.spec?r1=1.28&r2=1.29&f=u
More information about the pld-cvs-commit
mailing list