rpms/cacti/devel graph_debug_lockup_fix.patch, NONE, 1.1 ping_php_version4_snmpgetnext.patch, NONE, 1.1 snmpwalk_fix.patch, NONE, 1.1 thumbnail_graphs_not_working.patch, NONE, 1.1 tree_console_missing_hosts.patch, NONE, 1.1 cacti.spec, 1.13, 1.14 dec06-vulnerability-poller-0.8.6i.patch, 1.1, NONE dec06-vulnerability-scripts-0.8.6i.patch, 1.1, NONE fix_search_session_clear_issue.patch, 1.1, NONE fix_sql_syntax_related_to_default_rra_id.patch, 1.1, NONE import_template_argument_space_removal.patch, 1.1, NONE mysql_5x_strict.patch, 1.1, NONE nth_percentile_empty_return_set_issue.patch, 1.1, NONE poller_output_remainder.patch, 1.1, NONE

Michael Patrick McGrath (mmcgrath) fedora-extras-commits at redhat.com
Fri Sep 21 14:57:41 UTC 2007


Author: mmcgrath

Update of /cvs/extras/rpms/cacti/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4812/devel

Modified Files:
	cacti.spec 
Added Files:
	graph_debug_lockup_fix.patch 
	ping_php_version4_snmpgetnext.patch snmpwalk_fix.patch 
	thumbnail_graphs_not_working.patch 
	tree_console_missing_hosts.patch 
Removed Files:
	dec06-vulnerability-poller-0.8.6i.patch 
	dec06-vulnerability-scripts-0.8.6i.patch 
	fix_search_session_clear_issue.patch 
	fix_sql_syntax_related_to_default_rra_id.patch 
	import_template_argument_space_removal.patch 
	mysql_5x_strict.patch 
	nth_percentile_empty_return_set_issue.patch 
	poller_output_remainder.patch 
Log Message:
Added official patches from the cacti site

graph_debug_lockup_fix.patch:

--- NEW FILE graph_debug_lockup_fix.patch ---
--- cacti-0.8.6j/lib/rrd.php	2007-01-17 19:23:10.000000000 -0500
+++ cacti-0.8.6j-patch/lib/rrd.php	2007-03-01 15:32:18.609375000 -0500
@@ -83,6 +83,7 @@
 	if ($config["cacti_server_os"] == "unix") {
 		/* an empty $rrd_struc array means no fp is available */
 		if (sizeof($rrd_struc) == 0) {
+			session_write_close();
 			$fp = popen(read_config_option("path_rrdtool") . escape_command(" $command_line"), "r");
 		}else{
 			fwrite(rrd_get_fd($rrd_struc, RRDTOOL_PIPE_CHILD_READ), escape_command(" $command_line") . "\r\n");
@@ -91,6 +92,7 @@
 	}elseif ($config["cacti_server_os"] == "win32") {
 		/* an empty $rrd_struc array means no fp is available */
 		if (sizeof($rrd_struc) == 0) {
+			session_write_close();
 			$fp = popen(read_config_option("path_rrdtool") . escape_command(" $command_line"), "rb");
 		}else{
 			fwrite(rrd_get_fd($rrd_struc, RRDTOOL_PIPE_CHILD_READ), escape_command(" $command_line") . "\r\n");

ping_php_version4_snmpgetnext.patch:

--- NEW FILE ping_php_version4_snmpgetnext.patch ---
--- cacti-0.8.6j/lib/ping.php	2007-01-17 19:23:10.000000000 -0500
+++ cacti-0.8.6j-patch/lib/ping.php	2007-01-20 19:45:55.015625000 -0500
@@ -281,7 +281,13 @@
 
 		/* poll sysUptime for status */
 		$retry_count = 0;
+
+		/* getnext does not work in php versions less than 5 */
+		if (version_compare("5", phpversion(), "<")) {
 		$oid = ".1";
+		}else{
			$oid = ".1.3.6.1.2.1.1.3.0";
+		}
+
 		while (1) {
 			if ($retry_count >= $this->retries) {
 				$this->snmp_status   = "down";
@@ -289,6 +295,8 @@
 				return false;
 			}
 
+			/* getnext does not work in php versions less than 5 */
+			if (version_compare("5", phpversion(), "<")) {
 			$output = cacti_snmp_getnext($this->host["hostname"],
 				$this->host["snmp_community"],
 				$oid,
@@ -298,6 +306,16 @@
 				$this->host["snmp_port"],
 				$this->host["snmp_timeout"],
 				SNMP_CMDPHP);
+			}else{
				$output = cacti_snmp_get($this->host["hostname"],
+					$this->host["snmp_community"],
+					$oid,
+					$this->host["snmp_version"],
+					$this->host["snmp_username"],
+					$this->host["snmp_password"],
+					$this->host["snmp_port"],
+					$this->host["snmp_timeout"],
+					SNMP_CMDPHP);
+			}
 
 			/* determine total time +- ~10% */
 			$this->time = $this->get_time($this->precision);

snmpwalk_fix.patch:

--- NEW FILE snmpwalk_fix.patch ---
diff -ruBbd cacti-0.8.6j/lib/snmp.php cacti-0.8.6j-patched/lib/snmp.php
--- cacti-0.8.6j/lib/snmp.php	2007-01-17 19:23:10.000000000 -0500
+++ cacti-0.8.6j-patched/lib/snmp.php	2007-05-15 21:26:14.000000000 -0400
@@ -221,9 +219,9 @@
 			$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -v$version -t $timeout -r $retries $hostname:$port $snmp_auth $oid");
 		}else {
 			if (file_exists($path_snmpbulkwalk) && ($version > 1)) {
-				$temp_array = exec_into_array($path_snmpbulkwalk . " -O n $snmp_auth -v $version -t $timeout -r $retries -Cr50 $hostname:$port $oid");
+				$temp_array = exec_into_array($path_snmpbulkwalk . " -O Qn $snmp_auth -v $version -t $timeout -r $retries -Cr50 $hostname:$port $oid");
 			}else{
-				$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -O n $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid");
+				$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -O Qn $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid");
 			}
 		}
 

thumbnail_graphs_not_working.patch:

--- NEW FILE thumbnail_graphs_not_working.patch ---
--- cacti-0.8.6j/lib/rrd.php	2007-01-17 19:23:10.000000000 -0500
+++ cacti-0.8.6j-patch/lib/rrd.php	2007-02-01 20:29:59.687500000 -0500
@@ -1080,9 +1080,15 @@
 
 		if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") {
 			if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
-				$txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]) . $hardreturn[$graph_item_id] . "\" ";
+				$comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]) . $hardreturn[$graph_item_id] . "\" ";
+				if (trim($comment_string) != "COMMENT:\"\"") {
+					$txt_graph_items .= $comment_string;
+				}
 			}else {
-				$txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\" ";
+				$comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\" ";
+				if (trim($comment_string) != "COMMENT:\"\"") {
+					$txt_graph_items .= $comment_string;
+				}
 			}
 		}elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) {
 			$graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */

tree_console_missing_hosts.patch:

--- NEW FILE tree_console_missing_hosts.patch ---
--- cacti-0.8.6j/lib/html_tree.php	2007-01-17 19:23:10.000000000 -0500
+++ cacti-0.8.6j-patch/lib/html_tree.php	2007-01-27 15:48:50.390625000 -0500
@@ -328,7 +328,7 @@
 	while ($i > 1) {
 		$i--;
 
-		$parent_tier = substr($tier_string, 0, $i * CHARS_PER_TIER);
+		$parent_tier = tree_tier_string(substr($tier_string, 0, $i * CHARS_PER_TIER));
 		$parent_variable = "sess_tree_leaf_expand_" . $leaf["graph_tree_id"] . "_" . $parent_tier;
 
 		$effective = @$_SESSION[$parent_variable];
@@ -365,8 +365,6 @@
    @returns - the string representing the leaf position
 */
 function tree_tier_string($order_key, $chars_per_tier = CHARS_PER_TIER) {
-	$root_test = str_pad('', $chars_per_tier, '0');
-
 	$new_string = preg_replace("/0+$/",'',$order_key);
 
 	return $new_string;


Index: cacti.spec
===================================================================
RCS file: /cvs/extras/rpms/cacti/devel/cacti.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cacti.spec	14 Sep 2007 21:30:22 -0000	1.13
+++ cacti.spec	21 Sep 2007 14:57:08 -0000	1.14
@@ -1,6 +1,6 @@
 Name: cacti
 Version: 0.8.6j
-Release: 8%{?dist}
+Release: 9%{?dist}
 Summary: An rrd based graphing tool
 
 Group: Applications/System
@@ -13,6 +13,11 @@
 
 Patch1: cacti-0.8.6h-dbcfg.patch
 Patch2: CVE-2007-3112.patch
+Patch3: ping_php_version4_snmpgetnext.patch
+Patch4: tree_console_missing_hosts.patch
+Patch5: thumbnail_graphs_not_working.patch
+Patch6: graph_debug_lockup_fix.patch
+Patch7: snmpwalk_fix.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -34,6 +39,11 @@
 %setup -q
 %patch1 -p0
 %patch2 -p3
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 echo "#*/5 * * * *	cacti	%{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron
 
@@ -105,6 +115,9 @@
 %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib
 
 %changelog
+* Fri Sep 21 2007 Mike McGrath <mmcgrath at redhat.com> - 0.8.6j-9
+- Added rest of official patches
+
 * Fri Sep 14 2007 Mike McGrath <mmcgrath at redhat.com> - 0.8.6j-8
 - Fix for CVE-2007-3112 bz#243592
 


--- dec06-vulnerability-poller-0.8.6i.patch DELETED ---


--- dec06-vulnerability-scripts-0.8.6i.patch DELETED ---


--- fix_search_session_clear_issue.patch DELETED ---


--- fix_sql_syntax_related_to_default_rra_id.patch DELETED ---


--- import_template_argument_space_removal.patch DELETED ---


--- mysql_5x_strict.patch DELETED ---


--- nth_percentile_empty_return_set_issue.patch DELETED ---


--- poller_output_remainder.patch DELETED ---




More information about the fedora-extras-commits mailing list