From f013a0e0bf0577ad6adbc71ae74b5151bfa6ddd0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:47:28 +0000 Subject: [PATCH 01/12] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38a8b2e..e8315b1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := cacti SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 58f490ff91c6beebf4bd674627b614ad132a281e Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Tue, 1 Dec 2009 14:59:05 +0000 Subject: [PATCH 02/12] Applying upstream patches --- cacti.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cacti.spec b/cacti.spec index 69195f6..f9ea08c 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.7e -Release: 1%{?dist} +Release: 2%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -11,6 +11,11 @@ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: cacti-httpd.conf Source2: cacti.logrotate Source3: cacti.README.Fedora +Patch0: cli_add_graph.patch +Patch1: snmp_invalid_response.patch +Patch2: template_duplication.patch +Patch3: cross_site_fix.patchcross_site_fix.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -30,6 +35,10 @@ used to creating traffic graphs with MRTG. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron @@ -105,6 +114,11 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Tue Dec 1 2009 Mike McGrath - 0.8.7e-2 +- Pulling in some official patches +- #541279 +- #541962 + * Sun Aug 16 2009 Mike McGrath - 0.8.7e-1 - Upstream released new version From 13672f07ef98253854376aa3707ce90e6038177c Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Tue, 1 Dec 2009 14:59:24 +0000 Subject: [PATCH 03/12] Adding upstream patches --- cli_add_graph.patch | 11 ++ cross_site_fix.patch | 175 +++++++++++++++++++++++++++ snmp_invalid_response.patch | 25 ++++ template_duplication.patch | 234 ++++++++++++++++++++++++++++++++++++ 4 files changed, 445 insertions(+) create mode 100644 cli_add_graph.patch create mode 100644 cross_site_fix.patch create mode 100644 snmp_invalid_response.patch create mode 100644 template_duplication.patch diff --git a/cli_add_graph.patch b/cli_add_graph.patch new file mode 100644 index 0000000..b82d21a --- /dev/null +++ b/cli_add_graph.patch @@ -0,0 +1,11 @@ +--- ../tags/0.8.7e/cli/add_graphs.php 2009-06-28 12:34:31.000000000 -0400 ++++ 0.8.7/cli/add_graphs.php 2009-08-18 20:04:44.000000000 -0400 +@@ -570,7 +570,7 @@ + echo " 3|Fields = Verify all Fields\n"; + echo "List Options:\n"; + echo " --list-hosts\n"; +- echo " --list-graph-templates [--host_template=[ID]]\n"; ++ echo " --list-graph-templates [--host-template-id=[ID]]\n"; + echo " --list-input-fields --graph-template-id=[ID]\n"; + echo " --list-snmp-queries\n"; + echo " --list-query-types --snmp-query-id [ID]\n"; diff --git a/cross_site_fix.patch b/cross_site_fix.patch new file mode 100644 index 0000000..ddc9e2e --- /dev/null +++ b/cross_site_fix.patch @@ -0,0 +1,175 @@ +--- cacti-0.8.7e/graph.php 2009-06-28 12:07:11.000000000 -0400 ++++ cacti-0.8.7e-patched/graph.php 2009-11-21 23:10:16.000000000 -0500 +@@ -35,6 +35,8 @@ + /* ================= input validation ================= */ + input_validate_input_regex(get_request_var_request("rra_id"), "^([0-9]+|all)$"); + input_validate_input_number(get_request_var("local_graph_id")); ++input_validate_input_number(get_request_var("graph_end")); ++input_validate_input_number(get_request_var("graph_start")); + input_validate_input_regex(get_request_var_request("view_type"), "^([a-zA-Z0-9]+)$"); + /* ==================================================== */ + +--- cacti-0.8.7e/include/top_graph_header.php 2009-06-28 12:07:11.000000000 -0400 ++++ cacti-0.8.7e-patched/include/top_graph_header.php 2009-11-21 23:15:27.000000000 -0500 +@@ -58,7 +58,7 @@ + if ($_SESSION["custom"]) { + print "\r\n"; + }else{ +- print "\r\n"; ++ print "\r\n"; + } + } + ?> +@@ -113,7 +113,7 @@ + + + +- " height="2" border="0">
++ " height="2" border="0">
+ + + +@@ -144,7 +144,7 @@ + + + +- ++ +
+ + +--- cacti-0.8.7e/lib/html_form.php 2009-06-28 12:07:11.000000000 -0400 ++++ cacti-0.8.7e-patched/lib/html_form.php 2009-11-21 23:15:40.000000000 -0500 +@@ -235,13 +235,21 @@ + + if (sizeof($items) > 0) { + foreach ($items as $item) { +- print $item["name"] . "
"; ++ print htmlspecialchars($item["name"],ENT_QUOTES) . "
"; + } + } + + break; ++ case 'font': ++ form_font_box($field_name, $field_array["value"], ++ ((isset($field_array["default"])) ? $field_array["default"] : ""), ++ $field_array["max_length"], ++ ((isset($field_array["size"])) ? $field_array["size"] : "40"), "text", ++ ((isset($field_array["form_id"])) ? $field_array["form_id"] : "")); ++ ++ break; + default: +- print "" . $field_array["value"] . ""; ++ print "" . htmlspecialchars($field_array["value"],ENT_QUOTES) . ""; + + form_hidden_box($field_name, $field_array["value"], ""); + +@@ -384,7 +392,7 @@ + $form_previous_value = $form_default_value; + } + +- print "\n"; ++ print "\n"; + } + + /* form_dropdown - draws a standard html dropdown box +@@ -568,7 +576,7 @@ + } + } + +- print ">". $array_display[$id]; ++ print ">". htmlspecialchars($array_display[$id],ENT_QUOTES); + print "\n"; + } + +@@ -627,6 +635,65 @@ + print "\n"; + } + ++/* form_font_box - draws a standard html textbox and provides status of a fonts existence ++ @arg $form_name - the name of this form element ++ @arg $form_previous_value - the current value of this form element ++ @arg $form_default_value - the value of this form element to use if there is ++ no current value available ++ @arg $form_max_length - the maximum number of characters that can be entered ++ into this textbox ++ @arg $form_size - the size (width) of the textbox ++ @arg $type - the type of textbox, either 'text' or 'password' ++ @arg $current_id - used to determine if a current value for this form element ++ exists or not. a $current_id of '0' indicates that no current value exists, ++ a non-zero value indicates that a current value does exist */ ++function form_font_box($form_name, $form_previous_value, $form_default_value, $form_max_length, $form_size = 30, $type = "text", $current_id = 0) { ++ if (($form_previous_value == "") && (empty($current_id))) { ++ $form_previous_value = $form_default_value; ++ } ++ ++ print ""; ++ } else { ++ $extra_data = "
[" . "OK: FONT FOUND" . "]
"; ++ } ++ } elseif (read_config_option("rrdtool_version") == "rrd-1.0.x" || ++ read_config_option("rrdtool_version") == "rrd-1.2.x") { # rrdtool 1.0 and 1.2 use font files ++ if (is_file($form_previous_value)) { ++ $extra_data = "
[" . "OK: FILE FOUND" . "]
"; ++ }else if (is_dir($form_previous_value)) { ++ $extra_data = "
[" . "ERROR: IS DIR" . "]
"; ++ }else{ ++ $extra_data = "
[" . "ERROR: FILE NOT FOUND" . "]
"; ++ } ++ } # will be used for future versions of rrdtool ++ } ++ ++ print " id='$form_name' name='$form_name' size='$form_size'" . (!empty($form_max_length) ? " maxlength='$form_max_length'" : "") . " value='" . htmlspecialchars($form_previous_value, ENT_QUOTES) . "'>" . $extra_data; ++} ++ + /* form_confirm - draws a table presenting the user with some choice and allowing + them to either proceed (delete) or cancel + @arg $body_text - the text to prompt the user with on this form +--- cacti-0.8.7e/lib/timespan_settings.php 2009-06-28 12:07:11.000000000 -0400 ++++ cacti-0.8.7e-patched/lib/timespan_settings.php 2009-11-21 23:15:49.000000000 -0500 +@@ -125,9 +125,9 @@ + if (isset($_POST["date1"])) { + /* the dates have changed, therefore, I am now custom */ + if (($_SESSION["sess_current_date1"] != $_POST["date1"]) || ($_SESSION["sess_current_date2"] != $_POST["date2"])) { +- $timespan["current_value_date1"] = $_POST["date1"]; ++ $timespan["current_value_date1"] = sanitize_search_string($_POST["date1"]); + $timespan["begin_now"] =strtotime($timespan["current_value_date1"]); +- $timespan["current_value_date2"] = $_POST["date2"]; ++ $timespan["current_value_date2"] = sanitize_search_string($_POST["date2"]); + $timespan["end_now"]=strtotime($timespan["current_value_date2"]); + $_SESSION["sess_current_timespan"] = GT_CUSTOM; + $_SESSION["custom"] = 1; +@@ -135,8 +135,8 @@ + }else { + /* the default button wasn't pushed */ + if (!isset($_POST["button_clear_x"])) { +- $timespan["current_value_date1"] = $_POST["date1"]; +- $timespan["current_value_date2"] = $_POST["date2"]; ++ $timespan["current_value_date1"] = sanitize_search_string($_POST["date1"]); ++ $timespan["current_value_date2"] = sanitize_search_string($_POST["date2"]); + $timespan["begin_now"] = $_SESSION["sess_current_timespan_begin_now"]; + $timespan["end_now"] = $_SESSION["sess_current_timespan_end_now"]; + diff --git a/snmp_invalid_response.patch b/snmp_invalid_response.patch new file mode 100644 index 0000000..5b2dd20 --- /dev/null +++ b/snmp_invalid_response.patch @@ -0,0 +1,25 @@ +--- ../tags/0.8.7e/include/global_arrays.php 2009-06-28 12:34:31.000000000 -0400 ++++ 0.8.7/include/global_arrays.php 2009-08-18 20:04:44.000000000 -0400 +@@ -174,6 +174,10 @@ + "DES" => "DES (default)", + "AES128" => "AES"); + ++$banned_snmp_strings = array( ++ "End of MIB", ++ "No Such"); ++ + $logfile_options = array(1 => + "Logfile Only", + "Logfile and Syslog/Eventlog", +--- ../tags/0.8.7e/lib/snmp.php 2009-06-28 12:34:30.000000000 -0400 ++++ 0.8.7/lib/snmp.php 2009-08-18 20:04:44.000000000 -0400 +@@ -27,9 +27,6 @@ + define("SNMP_METHOD_PHP", 1); + define("SNMP_METHOD_BINARY", 2); + +-/* declare once, use many times */ +-$banned_snmp_strings = array("End of MIB", "No Such"); +- + /* we must use an apostrophe to escape community names under Unix in case the user uses + characters that the shell might interpret. the ucd-snmp binaries on Windows flip out when + you do this, but are perfectly happy with a quotation mark. */ diff --git a/template_duplication.patch b/template_duplication.patch new file mode 100644 index 0000000..cd6ff4b --- /dev/null +++ b/template_duplication.patch @@ -0,0 +1,234 @@ +diff -ruBbd 0.8.7e/cli/repair_templates.php 0.8.7/cli/repair_templates.php +--- 0.8.7e/cli/repair_templates.php 2009-08-18 22:03:22.000000000 -0400 ++++ 0.8.7/cli/repair_templates.php 2009-08-20 07:43:54.000000000 -0400 +@@ -0,0 +1,135 @@ ++This script is only meant to run at the command line."); ++} ++ ++$no_http_headers = true; ++ ++include(dirname(__FILE__) . "/../include/global.php"); ++include_once("../lib/utility.php"); ++include_once("../lib/template.php"); ++ ++/* process calling arguments */ ++$parms = $_SERVER["argv"]; ++array_shift($parms); ++ ++$execute = FALSE; ++ ++foreach($parms as $parameter) { ++ @list($arg, $value) = @explode("=", $parameter); ++ ++ switch ($arg) { ++ case "--execute": ++ $execute = TRUE; ++ break; ++ case "-h": ++ case "-v": ++ case "-V": ++ case "--version": ++ case "--help": ++ display_help(); ++ exit; ++ default: ++ print "ERROR: Invalid Parameter " . $parameter . "\n\n"; ++ display_help(); ++ exit; ++ } ++} ++ ++if ($execute) { ++ echo "NOTE: Repairing All Duplicated Templates\n"; ++} else { ++ echo "NOTE: Performing Check of Templates\n"; ++} ++ ++/* repair data templates first */ ++if ($execute) { ++ echo "NOTE: Repairing Data Templates\n"; ++} else { ++ echo "NOTE: Performing Check of Data Templates\n"; ++} ++ ++$damaged_template_ids = db_fetch_assoc("SELECT DISTINCT data_template_id FROM data_template_rrd WHERE hash='' AND local_data_id=0"); ++if (sizeof($damaged_template_ids)) { ++ foreach($damaged_template_ids as $id) { $template_name = db_fetch_cell("SELECT name FROM data_template WHERE id=" . $id["data_template_id"]); ++ echo "NOTE: Data Template '$template_name' is Damaged and can be repaired\n"; ++ } ++ ++ $damaged_templates = db_fetch_assoc("SELECT * FROM data_template_rrd WHERE hash='' AND local_data_id=0"); ++ if (sizeof($damaged_templates)) { ++ echo "NOTE: -- Damaged Data Templates Objects Found is '" . sizeof($damaged_templates) . "'\n"; ++ if ($execute) { ++ foreach($damaged_templates as $template) { ++ $hash = get_hash_data_template($template["local_data_template_rrd_id"], "data_template_item"); ++ db_execute("UPDATE data_template_rrd SET hash='$hash' WHERE id=" . $template["id"]); ++ } ++ } ++ } ++} else { ++ echo "NOTE: No Damaged Data Templates Found\n"; ++} ++ ++/* reset the array */ ++$damaged_templates = array(); ++ ++/* repair graph templates */ ++if ($execute) { ++ echo "NOTE: Repairing Graph Templates\n"; ++} else { ++ echo "NOTE: Performing Check of Graph Templates\n"; ++} ++ ++$damaged_template_ids = db_fetch_assoc("SELECT DISTINCT graph_template_id FROM graph_template_input WHERE hash=''"); ++if (sizeof($damaged_template_ids)) { ++ foreach($damaged_template_ids as $id) { ++ $template_name = db_fetch_cell("SELECT name FROM graph_templates WHERE id=" . $id["graph_template_id"]); ++ echo "NOTE: Graph Template '$template_name' is Damaged and can be repaired\n"; ++ } ++ ++ $damaged_templates = db_fetch_assoc("SELECT * FROM graph_template_input WHERE hash=''"); ++ if (sizeof($damaged_templates)) { ++ echo "NOTE: -- Damaged Graph Templates Objects Found is '" . sizeof($damaged_templates) . "'\n"; ++ if ($execute) { ++ foreach($damaged_templates as $template) { ++ $hash = get_hash_graph_template(0, "graph_template_input"); ++ db_execute("UPDATE graph_template_input SET hash='$hash' WHERE id=" . $template["id"]); ++ } ++ } ++ } ++} else { ++ echo "NOTE: No Damaged Graph Templates Found\n"; ++} ++ ++ ++/* display_help - displays the usage of the function */ ++function display_help () { ++ print "Cacti Database Template Repair Tool v1.0, Copyright 2004-2009 - The Cacti Group\n\n"; ++ print "usage: repair_templates.php --execute [--help]\n\n"; ++ print "--execute - Perform the repair\n"; ++ print "--help - display this help message\n"; ++} ++?> +diff -ruBbd 0.8.7e/docs/README 0.8.7/docs/README +--- 0.8.7e/docs/README 2009-08-18 21:57:30.000000000 -0400 ++++ 0.8.7/docs/README 2009-08-18 21:58:09.000000000 -0400 +@@ -90,6 +90,9 @@ + table + poller_reindex_hosts.php - Cause data query reindex on hosts + rebuild_poller_cache.php - Rebuilds the poller cache ++ repair_templates.php - Certain templates, when created using the "duplicate" ++ function in Cacti, do not import/export well. This utility repairs ++ those templates. + + + +diff -ruBbd 0.8.7e/lib/export.php 0.8.7/lib/export.php +--- 0.8.7e/lib/export.php 2009-08-18 21:56:47.000000000 -0400 ++++ 0.8.7/lib/export.php 2009-08-18 21:57:50.000000000 -0400 +@@ -811,7 +811,9 @@ + } + + function xml_character_encode($text) { +- ++ if (function_exists("htmlspecialchars")) { ++ return htmlspecialchars($text, ENT_QUOTES, "UTF-8"); ++ } else { + $text = str_replace("&", "&", $text); + $text = str_replace(">", ">", $text); + $text = str_replace("<", "<", $text); +@@ -819,6 +821,7 @@ + $text = str_replace("\'", "'", $text); + + return $text; ++ } + } + + ?> +diff -ruBbd 0.8.7e/lib/import.php 0.8.7/lib/import.php +--- 0.8.7e/lib/import.php 2009-08-18 21:56:59.000000000 -0400 ++++ 0.8.7/lib/import.php 2009-08-18 21:57:55.000000000 -0400 +@@ -36,10 +36,6 @@ + return $info_array; + } + +- if (isset($xml_array["name"])) { +- $xml_array["name"] = htmlspecialchars($xml_array["name"]); +- } +- + while (list($hash, $hash_array) = each($xml_array)) { + /* parse information from the hash */ + $parsed_hash = parse_xml_hash($hash); +@@ -115,7 +111,7 @@ + $_graph_template_id = db_fetch_cell("select id from graph_templates where hash='$hash'"); + $save["id"] = (empty($_graph_template_id) ? "0" : $_graph_template_id); + $save["hash"] = $hash; +- $save["name"] = htmlspecialchars($xml_array["name"]); ++ $save["name"] = $xml_array["name"]; + $graph_template_id = sql_save($save, "graph_templates"); + + $hash_cache["graph_template"][$hash] = $graph_template_id; +@@ -914,9 +910,13 @@ + } + + function xml_character_decode($text) { ++ if (function_exists("html_entity_decode")) { ++ return html_entity_decode($text, ENT_QUOTES, "UTF-8"); ++ } else { + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + return strtr($text, $trans_tbl); ++ } + } + + ?> +diff -ruBbd 0.8.7e/lib/utility.php 0.8.7/lib/utility.php +--- 0.8.7e/lib/utility.php 2009-08-18 21:57:08.000000000 -0400 ++++ 0.8.7/lib/utility.php 2009-08-18 21:58:00.000000000 -0400 +@@ -346,6 +346,7 @@ + $save["name"] = $graph_template_input["name"]; + $save["description"] = $graph_template_input["description"]; + $save["column_name"] = $graph_template_input["column_name"]; ++ $save["hash"] = get_hash_graph_template(0, "graph_template_input"); + + $graph_template_input_id = sql_save($save, "graph_template_input"); + +@@ -436,6 +437,11 @@ + $save["local_data_id"] = (isset($local_data_id) ? $local_data_id : 0); + $save["local_data_template_rrd_id"] = (isset($data_template_rrd["local_data_template_rrd_id"]) ? $data_template_rrd["local_data_template_rrd_id"] : 0); + $save["data_template_id"] = (!empty($_local_data_id) ? $data_template_rrd["data_template_id"] : $data_template_id); ++ if ($save["local_data_id"] == 0) { ++ $save["hash"] = get_hash_data_template($data_template_rrd["local_data_template_rrd_id"], "data_template_item"); ++ } else { ++ $save["hash"] = ''; ++ } + + while (list($field, $array) = each($struct_data_source_item)) { + $save{$field} = $data_template_rrd{$field}; From 5fdbec404eedf51a9e5f85dbabe374ebc39c4b99 Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Tue, 1 Dec 2009 15:03:27 +0000 Subject: [PATCH 04/12] fixing patch name --- cacti.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cacti.spec b/cacti.spec index f9ea08c..dd0d502 100644 --- a/cacti.spec +++ b/cacti.spec @@ -14,8 +14,7 @@ Source3: cacti.README.Fedora Patch0: cli_add_graph.patch Patch1: snmp_invalid_response.patch Patch2: template_duplication.patch -Patch3: cross_site_fix.patchcross_site_fix.patch - +Patch3: cross_site_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From d1905afb1b69ad960d2c78446fde7db2c42560f0 Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Tue, 1 Dec 2009 15:07:10 +0000 Subject: [PATCH 05/12] release bump --- cacti.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cacti.spec b/cacti.spec index dd0d502..1be25b8 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.7e -Release: 2%{?dist} +Release: 3%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -113,7 +113,7 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog -* Tue Dec 1 2009 Mike McGrath - 0.8.7e-2 +* Tue Dec 1 2009 Mike McGrath - 0.8.7e-3 - Pulling in some official patches - #541279 - #541962 From 6bb9be2c27ef5f87c00d9b20be2f9a540b828c38 Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Fri, 23 Apr 2010 13:43:21 +0000 Subject: [PATCH 06/12] Adding official patch to fix sql vulnerability --- cacti.spec | 9 ++++++++- sql_injection_template_export.patch | 13 +++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sql_injection_template_export.patch diff --git a/cacti.spec b/cacti.spec index 1be25b8..f4efec6 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.7e -Release: 3%{?dist} +Release: 4%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -15,6 +15,7 @@ Patch0: cli_add_graph.patch Patch1: snmp_invalid_response.patch Patch2: template_duplication.patch Patch3: cross_site_fix.patch +Patch4: sql_injection_template_export.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -38,6 +39,7 @@ used to creating traffic graphs with MRTG. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron @@ -113,6 +115,11 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Fri Apr 23 2010 Mike McGrath - 0.8.7e-4 +- Pulling in patches from upstream +- SQL injection fix +- BZ #541279 + * Tue Dec 1 2009 Mike McGrath - 0.8.7e-3 - Pulling in some official patches - #541279 diff --git a/sql_injection_template_export.patch b/sql_injection_template_export.patch new file mode 100644 index 0000000..397990c --- /dev/null +++ b/sql_injection_template_export.patch @@ -0,0 +1,13 @@ +--- cacti-0.8.7e/templates_export.php 2009-06-28 12:07:11.000000000 -0400 ++++ cacti-fixed/templates_export.php 2010-04-17 14:08:42.000000000 -0400 +@@ -49,6 +49,10 @@ + function form_save() { + global $export_types; + ++ /* ================= input validation ================= */ ++ input_validate_input_number(get_request_var_post("export_item_id")); ++ /* ==================================================== */ ++ + if (isset($_POST["save_component_export"])) { + $xml_data = get_item_xml($_POST["export_type"], $_POST["export_item_id"], (((isset($_POST["include_deps"]) ? $_POST["include_deps"] : "") == "") ? false : true)); + From 5bb5c03660a8dca6e6a4f6c4908d0184df59ec01 Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Mon, 24 May 2010 14:33:00 +0000 Subject: [PATCH 07/12] upstream released new version --- .cvsignore | 2 +- cacti.spec | 18 +-- cli_add_graph.patch | 11 -- cross_site_fix.patch | 175 --------------------- snmp_invalid_response.patch | 25 --- sources | 2 +- sql_injection_template_export.patch | 13 -- template_duplication.patch | 234 ---------------------------- 8 files changed, 8 insertions(+), 472 deletions(-) delete mode 100644 cli_add_graph.patch delete mode 100644 cross_site_fix.patch delete mode 100644 snmp_invalid_response.patch delete mode 100644 sql_injection_template_export.patch delete mode 100644 template_duplication.patch diff --git a/.cvsignore b/.cvsignore index 3231818..80dd1a5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -cacti-0.8.7e.tar.gz +cacti-0.8.7f.tar.gz diff --git a/cacti.spec b/cacti.spec index f4efec6..eb3a56b 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti -Version: 0.8.7e -Release: 4%{?dist} +Version: 0.8.7f +Release: 1%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -11,11 +11,6 @@ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: cacti-httpd.conf Source2: cacti.logrotate Source3: cacti.README.Fedora -Patch0: cli_add_graph.patch -Patch1: snmp_invalid_response.patch -Patch2: template_duplication.patch -Patch3: cross_site_fix.patch -Patch4: sql_injection_template_export.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -35,11 +30,6 @@ used to creating traffic graphs with MRTG. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron @@ -115,6 +105,10 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Mon May 24 2010 Mike McGrath - 0.8.7f-1 +- Upstream released new version +- Contains security updates #595289 + * Fri Apr 23 2010 Mike McGrath - 0.8.7e-4 - Pulling in patches from upstream - SQL injection fix diff --git a/cli_add_graph.patch b/cli_add_graph.patch deleted file mode 100644 index b82d21a..0000000 --- a/cli_add_graph.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../tags/0.8.7e/cli/add_graphs.php 2009-06-28 12:34:31.000000000 -0400 -+++ 0.8.7/cli/add_graphs.php 2009-08-18 20:04:44.000000000 -0400 -@@ -570,7 +570,7 @@ - echo " 3|Fields = Verify all Fields\n"; - echo "List Options:\n"; - echo " --list-hosts\n"; -- echo " --list-graph-templates [--host_template=[ID]]\n"; -+ echo " --list-graph-templates [--host-template-id=[ID]]\n"; - echo " --list-input-fields --graph-template-id=[ID]\n"; - echo " --list-snmp-queries\n"; - echo " --list-query-types --snmp-query-id [ID]\n"; diff --git a/cross_site_fix.patch b/cross_site_fix.patch deleted file mode 100644 index ddc9e2e..0000000 --- a/cross_site_fix.patch +++ /dev/null @@ -1,175 +0,0 @@ ---- cacti-0.8.7e/graph.php 2009-06-28 12:07:11.000000000 -0400 -+++ cacti-0.8.7e-patched/graph.php 2009-11-21 23:10:16.000000000 -0500 -@@ -35,6 +35,8 @@ - /* ================= input validation ================= */ - input_validate_input_regex(get_request_var_request("rra_id"), "^([0-9]+|all)$"); - input_validate_input_number(get_request_var("local_graph_id")); -+input_validate_input_number(get_request_var("graph_end")); -+input_validate_input_number(get_request_var("graph_start")); - input_validate_input_regex(get_request_var_request("view_type"), "^([a-zA-Z0-9]+)$"); - /* ==================================================== */ - ---- cacti-0.8.7e/include/top_graph_header.php 2009-06-28 12:07:11.000000000 -0400 -+++ cacti-0.8.7e-patched/include/top_graph_header.php 2009-11-21 23:15:27.000000000 -0500 -@@ -58,7 +58,7 @@ - if ($_SESSION["custom"]) { - print "\r\n"; - }else{ -- print "\r\n"; -+ print "\r\n"; - } - } - ?> -@@ -113,7 +113,7 @@ - - - -- " height="2" border="0">
-+ " height="2" border="0">
- - - -@@ -144,7 +144,7 @@ - - - -- -+ -
- - ---- cacti-0.8.7e/lib/html_form.php 2009-06-28 12:07:11.000000000 -0400 -+++ cacti-0.8.7e-patched/lib/html_form.php 2009-11-21 23:15:40.000000000 -0500 -@@ -235,13 +235,21 @@ - - if (sizeof($items) > 0) { - foreach ($items as $item) { -- print $item["name"] . "
"; -+ print htmlspecialchars($item["name"],ENT_QUOTES) . "
"; - } - } - - break; -+ case 'font': -+ form_font_box($field_name, $field_array["value"], -+ ((isset($field_array["default"])) ? $field_array["default"] : ""), -+ $field_array["max_length"], -+ ((isset($field_array["size"])) ? $field_array["size"] : "40"), "text", -+ ((isset($field_array["form_id"])) ? $field_array["form_id"] : "")); -+ -+ break; - default: -- print "" . $field_array["value"] . ""; -+ print "" . htmlspecialchars($field_array["value"],ENT_QUOTES) . ""; - - form_hidden_box($field_name, $field_array["value"], ""); - -@@ -384,7 +392,7 @@ - $form_previous_value = $form_default_value; - } - -- print "\n"; -+ print "\n"; - } - - /* form_dropdown - draws a standard html dropdown box -@@ -568,7 +576,7 @@ - } - } - -- print ">". $array_display[$id]; -+ print ">". htmlspecialchars($array_display[$id],ENT_QUOTES); - print "\n"; - } - -@@ -627,6 +635,65 @@ - print "\n"; - } - -+/* form_font_box - draws a standard html textbox and provides status of a fonts existence -+ @arg $form_name - the name of this form element -+ @arg $form_previous_value - the current value of this form element -+ @arg $form_default_value - the value of this form element to use if there is -+ no current value available -+ @arg $form_max_length - the maximum number of characters that can be entered -+ into this textbox -+ @arg $form_size - the size (width) of the textbox -+ @arg $type - the type of textbox, either 'text' or 'password' -+ @arg $current_id - used to determine if a current value for this form element -+ exists or not. a $current_id of '0' indicates that no current value exists, -+ a non-zero value indicates that a current value does exist */ -+function form_font_box($form_name, $form_previous_value, $form_default_value, $form_max_length, $form_size = 30, $type = "text", $current_id = 0) { -+ if (($form_previous_value == "") && (empty($current_id))) { -+ $form_previous_value = $form_default_value; -+ } -+ -+ print ""; -+ } else { -+ $extra_data = "
[" . "OK: FONT FOUND" . "]
"; -+ } -+ } elseif (read_config_option("rrdtool_version") == "rrd-1.0.x" || -+ read_config_option("rrdtool_version") == "rrd-1.2.x") { # rrdtool 1.0 and 1.2 use font files -+ if (is_file($form_previous_value)) { -+ $extra_data = "
[" . "OK: FILE FOUND" . "]
"; -+ }else if (is_dir($form_previous_value)) { -+ $extra_data = "
[" . "ERROR: IS DIR" . "]
"; -+ }else{ -+ $extra_data = "
[" . "ERROR: FILE NOT FOUND" . "]
"; -+ } -+ } # will be used for future versions of rrdtool -+ } -+ -+ print " id='$form_name' name='$form_name' size='$form_size'" . (!empty($form_max_length) ? " maxlength='$form_max_length'" : "") . " value='" . htmlspecialchars($form_previous_value, ENT_QUOTES) . "'>" . $extra_data; -+} -+ - /* form_confirm - draws a table presenting the user with some choice and allowing - them to either proceed (delete) or cancel - @arg $body_text - the text to prompt the user with on this form ---- cacti-0.8.7e/lib/timespan_settings.php 2009-06-28 12:07:11.000000000 -0400 -+++ cacti-0.8.7e-patched/lib/timespan_settings.php 2009-11-21 23:15:49.000000000 -0500 -@@ -125,9 +125,9 @@ - if (isset($_POST["date1"])) { - /* the dates have changed, therefore, I am now custom */ - if (($_SESSION["sess_current_date1"] != $_POST["date1"]) || ($_SESSION["sess_current_date2"] != $_POST["date2"])) { -- $timespan["current_value_date1"] = $_POST["date1"]; -+ $timespan["current_value_date1"] = sanitize_search_string($_POST["date1"]); - $timespan["begin_now"] =strtotime($timespan["current_value_date1"]); -- $timespan["current_value_date2"] = $_POST["date2"]; -+ $timespan["current_value_date2"] = sanitize_search_string($_POST["date2"]); - $timespan["end_now"]=strtotime($timespan["current_value_date2"]); - $_SESSION["sess_current_timespan"] = GT_CUSTOM; - $_SESSION["custom"] = 1; -@@ -135,8 +135,8 @@ - }else { - /* the default button wasn't pushed */ - if (!isset($_POST["button_clear_x"])) { -- $timespan["current_value_date1"] = $_POST["date1"]; -- $timespan["current_value_date2"] = $_POST["date2"]; -+ $timespan["current_value_date1"] = sanitize_search_string($_POST["date1"]); -+ $timespan["current_value_date2"] = sanitize_search_string($_POST["date2"]); - $timespan["begin_now"] = $_SESSION["sess_current_timespan_begin_now"]; - $timespan["end_now"] = $_SESSION["sess_current_timespan_end_now"]; - diff --git a/snmp_invalid_response.patch b/snmp_invalid_response.patch deleted file mode 100644 index 5b2dd20..0000000 --- a/snmp_invalid_response.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ../tags/0.8.7e/include/global_arrays.php 2009-06-28 12:34:31.000000000 -0400 -+++ 0.8.7/include/global_arrays.php 2009-08-18 20:04:44.000000000 -0400 -@@ -174,6 +174,10 @@ - "DES" => "DES (default)", - "AES128" => "AES"); - -+$banned_snmp_strings = array( -+ "End of MIB", -+ "No Such"); -+ - $logfile_options = array(1 => - "Logfile Only", - "Logfile and Syslog/Eventlog", ---- ../tags/0.8.7e/lib/snmp.php 2009-06-28 12:34:30.000000000 -0400 -+++ 0.8.7/lib/snmp.php 2009-08-18 20:04:44.000000000 -0400 -@@ -27,9 +27,6 @@ - define("SNMP_METHOD_PHP", 1); - define("SNMP_METHOD_BINARY", 2); - --/* declare once, use many times */ --$banned_snmp_strings = array("End of MIB", "No Such"); -- - /* we must use an apostrophe to escape community names under Unix in case the user uses - characters that the shell might interpret. the ucd-snmp binaries on Windows flip out when - you do this, but are perfectly happy with a quotation mark. */ diff --git a/sources b/sources index c43e0c1..918e8cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7563a58a57d2c6cc0da28cc341a30969 cacti-0.8.7e.tar.gz +c50a49e3b439dba1fd44ddc34276d4df cacti-0.8.7f.tar.gz diff --git a/sql_injection_template_export.patch b/sql_injection_template_export.patch deleted file mode 100644 index 397990c..0000000 --- a/sql_injection_template_export.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cacti-0.8.7e/templates_export.php 2009-06-28 12:07:11.000000000 -0400 -+++ cacti-fixed/templates_export.php 2010-04-17 14:08:42.000000000 -0400 -@@ -49,6 +49,10 @@ - function form_save() { - global $export_types; - -+ /* ================= input validation ================= */ -+ input_validate_input_number(get_request_var_post("export_item_id")); -+ /* ==================================================== */ -+ - if (isset($_POST["save_component_export"])) { - $xml_data = get_item_xml($_POST["export_type"], $_POST["export_item_id"], (((isset($_POST["include_deps"]) ? $_POST["include_deps"] : "") == "") ? false : true)); - diff --git a/template_duplication.patch b/template_duplication.patch deleted file mode 100644 index cd6ff4b..0000000 --- a/template_duplication.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff -ruBbd 0.8.7e/cli/repair_templates.php 0.8.7/cli/repair_templates.php ---- 0.8.7e/cli/repair_templates.php 2009-08-18 22:03:22.000000000 -0400 -+++ 0.8.7/cli/repair_templates.php 2009-08-20 07:43:54.000000000 -0400 -@@ -0,0 +1,135 @@ -+This script is only meant to run at the command line."); -+} -+ -+$no_http_headers = true; -+ -+include(dirname(__FILE__) . "/../include/global.php"); -+include_once("../lib/utility.php"); -+include_once("../lib/template.php"); -+ -+/* process calling arguments */ -+$parms = $_SERVER["argv"]; -+array_shift($parms); -+ -+$execute = FALSE; -+ -+foreach($parms as $parameter) { -+ @list($arg, $value) = @explode("=", $parameter); -+ -+ switch ($arg) { -+ case "--execute": -+ $execute = TRUE; -+ break; -+ case "-h": -+ case "-v": -+ case "-V": -+ case "--version": -+ case "--help": -+ display_help(); -+ exit; -+ default: -+ print "ERROR: Invalid Parameter " . $parameter . "\n\n"; -+ display_help(); -+ exit; -+ } -+} -+ -+if ($execute) { -+ echo "NOTE: Repairing All Duplicated Templates\n"; -+} else { -+ echo "NOTE: Performing Check of Templates\n"; -+} -+ -+/* repair data templates first */ -+if ($execute) { -+ echo "NOTE: Repairing Data Templates\n"; -+} else { -+ echo "NOTE: Performing Check of Data Templates\n"; -+} -+ -+$damaged_template_ids = db_fetch_assoc("SELECT DISTINCT data_template_id FROM data_template_rrd WHERE hash='' AND local_data_id=0"); -+if (sizeof($damaged_template_ids)) { -+ foreach($damaged_template_ids as $id) { $template_name = db_fetch_cell("SELECT name FROM data_template WHERE id=" . $id["data_template_id"]); -+ echo "NOTE: Data Template '$template_name' is Damaged and can be repaired\n"; -+ } -+ -+ $damaged_templates = db_fetch_assoc("SELECT * FROM data_template_rrd WHERE hash='' AND local_data_id=0"); -+ if (sizeof($damaged_templates)) { -+ echo "NOTE: -- Damaged Data Templates Objects Found is '" . sizeof($damaged_templates) . "'\n"; -+ if ($execute) { -+ foreach($damaged_templates as $template) { -+ $hash = get_hash_data_template($template["local_data_template_rrd_id"], "data_template_item"); -+ db_execute("UPDATE data_template_rrd SET hash='$hash' WHERE id=" . $template["id"]); -+ } -+ } -+ } -+} else { -+ echo "NOTE: No Damaged Data Templates Found\n"; -+} -+ -+/* reset the array */ -+$damaged_templates = array(); -+ -+/* repair graph templates */ -+if ($execute) { -+ echo "NOTE: Repairing Graph Templates\n"; -+} else { -+ echo "NOTE: Performing Check of Graph Templates\n"; -+} -+ -+$damaged_template_ids = db_fetch_assoc("SELECT DISTINCT graph_template_id FROM graph_template_input WHERE hash=''"); -+if (sizeof($damaged_template_ids)) { -+ foreach($damaged_template_ids as $id) { -+ $template_name = db_fetch_cell("SELECT name FROM graph_templates WHERE id=" . $id["graph_template_id"]); -+ echo "NOTE: Graph Template '$template_name' is Damaged and can be repaired\n"; -+ } -+ -+ $damaged_templates = db_fetch_assoc("SELECT * FROM graph_template_input WHERE hash=''"); -+ if (sizeof($damaged_templates)) { -+ echo "NOTE: -- Damaged Graph Templates Objects Found is '" . sizeof($damaged_templates) . "'\n"; -+ if ($execute) { -+ foreach($damaged_templates as $template) { -+ $hash = get_hash_graph_template(0, "graph_template_input"); -+ db_execute("UPDATE graph_template_input SET hash='$hash' WHERE id=" . $template["id"]); -+ } -+ } -+ } -+} else { -+ echo "NOTE: No Damaged Graph Templates Found\n"; -+} -+ -+ -+/* display_help - displays the usage of the function */ -+function display_help () { -+ print "Cacti Database Template Repair Tool v1.0, Copyright 2004-2009 - The Cacti Group\n\n"; -+ print "usage: repair_templates.php --execute [--help]\n\n"; -+ print "--execute - Perform the repair\n"; -+ print "--help - display this help message\n"; -+} -+?> -diff -ruBbd 0.8.7e/docs/README 0.8.7/docs/README ---- 0.8.7e/docs/README 2009-08-18 21:57:30.000000000 -0400 -+++ 0.8.7/docs/README 2009-08-18 21:58:09.000000000 -0400 -@@ -90,6 +90,9 @@ - table - poller_reindex_hosts.php - Cause data query reindex on hosts - rebuild_poller_cache.php - Rebuilds the poller cache -+ repair_templates.php - Certain templates, when created using the "duplicate" -+ function in Cacti, do not import/export well. This utility repairs -+ those templates. - - - -diff -ruBbd 0.8.7e/lib/export.php 0.8.7/lib/export.php ---- 0.8.7e/lib/export.php 2009-08-18 21:56:47.000000000 -0400 -+++ 0.8.7/lib/export.php 2009-08-18 21:57:50.000000000 -0400 -@@ -811,7 +811,9 @@ - } - - function xml_character_encode($text) { -- -+ if (function_exists("htmlspecialchars")) { -+ return htmlspecialchars($text, ENT_QUOTES, "UTF-8"); -+ } else { - $text = str_replace("&", "&", $text); - $text = str_replace(">", ">", $text); - $text = str_replace("<", "<", $text); -@@ -819,6 +821,7 @@ - $text = str_replace("\'", "'", $text); - - return $text; -+ } - } - - ?> -diff -ruBbd 0.8.7e/lib/import.php 0.8.7/lib/import.php ---- 0.8.7e/lib/import.php 2009-08-18 21:56:59.000000000 -0400 -+++ 0.8.7/lib/import.php 2009-08-18 21:57:55.000000000 -0400 -@@ -36,10 +36,6 @@ - return $info_array; - } - -- if (isset($xml_array["name"])) { -- $xml_array["name"] = htmlspecialchars($xml_array["name"]); -- } -- - while (list($hash, $hash_array) = each($xml_array)) { - /* parse information from the hash */ - $parsed_hash = parse_xml_hash($hash); -@@ -115,7 +111,7 @@ - $_graph_template_id = db_fetch_cell("select id from graph_templates where hash='$hash'"); - $save["id"] = (empty($_graph_template_id) ? "0" : $_graph_template_id); - $save["hash"] = $hash; -- $save["name"] = htmlspecialchars($xml_array["name"]); -+ $save["name"] = $xml_array["name"]; - $graph_template_id = sql_save($save, "graph_templates"); - - $hash_cache["graph_template"][$hash] = $graph_template_id; -@@ -914,9 +910,13 @@ - } - - function xml_character_decode($text) { -+ if (function_exists("html_entity_decode")) { -+ return html_entity_decode($text, ENT_QUOTES, "UTF-8"); -+ } else { - $trans_tbl = get_html_translation_table(HTML_ENTITIES); - $trans_tbl = array_flip($trans_tbl); - return strtr($text, $trans_tbl); -+ } - } - - ?> -diff -ruBbd 0.8.7e/lib/utility.php 0.8.7/lib/utility.php ---- 0.8.7e/lib/utility.php 2009-08-18 21:57:08.000000000 -0400 -+++ 0.8.7/lib/utility.php 2009-08-18 21:58:00.000000000 -0400 -@@ -346,6 +346,7 @@ - $save["name"] = $graph_template_input["name"]; - $save["description"] = $graph_template_input["description"]; - $save["column_name"] = $graph_template_input["column_name"]; -+ $save["hash"] = get_hash_graph_template(0, "graph_template_input"); - - $graph_template_input_id = sql_save($save, "graph_template_input"); - -@@ -436,6 +437,11 @@ - $save["local_data_id"] = (isset($local_data_id) ? $local_data_id : 0); - $save["local_data_template_rrd_id"] = (isset($data_template_rrd["local_data_template_rrd_id"]) ? $data_template_rrd["local_data_template_rrd_id"] : 0); - $save["data_template_id"] = (!empty($_local_data_id) ? $data_template_rrd["data_template_id"] : $data_template_id); -+ if ($save["local_data_id"] == 0) { -+ $save["hash"] = get_hash_data_template($data_template_rrd["local_data_template_rrd_id"], "data_template_item"); -+ } else { -+ $save["hash"] = ''; -+ } - - while (list($field, $array) = each($struct_data_source_item)) { - $save{$field} = $data_template_rrd{$field}; From c7b26ec5991aead26fd9758e8768f2057d1ff3e0 Mon Sep 17 00:00:00 2001 From: Mike McGrath Date: Mon, 12 Jul 2010 15:12:37 +0000 Subject: [PATCH 08/12] Upstream released new version --- .cvsignore | 2 +- cacti.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 80dd1a5..c274c8f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -cacti-0.8.7f.tar.gz +cacti-0.8.7g.tar.gz diff --git a/cacti.spec b/cacti.spec index eb3a56b..30f1951 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,5 +1,5 @@ Name: cacti -Version: 0.8.7f +Version: 0.8.7g Release: 1%{?dist} Summary: An rrd based graphing tool @@ -105,6 +105,9 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Mon Jul 12 2010 Mike McGrath 0.8.7g-1 +- Upstream released new version + * Mon May 24 2010 Mike McGrath - 0.8.7f-1 - Upstream released new version - Contains security updates #595289 diff --git a/sources b/sources index 918e8cf..a5cc6f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c50a49e3b439dba1fd44ddc34276d4df cacti-0.8.7f.tar.gz +268421cb1a58d3444f7ecbddb4c4b016 cacti-0.8.7g.tar.gz From dd986b676819c8dfff25ca747c4a0df633c9ac44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 11:25:17 +0000 Subject: [PATCH 09/12] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index e8315b1..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: cacti -# $Id$ -NAME := cacti -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From b91eebdb1f4429a8c9889782fc018f7fd20e9dab Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 00:18:33 -0600 Subject: [PATCH 10/12] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- cacti.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cacti.spec b/cacti.spec index 30f1951..b68ee0e 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.7g -Release: 1%{?dist} +Release: 2%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -105,6 +105,9 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.7g-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Mon Jul 12 2010 Mike McGrath 0.8.7g-1 - Upstream released new version From 95142bf2bb8e7384a8b64011c48f2034ce1b4a9f Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mon, 8 Aug 2011 11:41:48 -0500 Subject: [PATCH 11/12] MySQL 5.5 fix. --- cacti-0.8.7g-mysql55-type.patch | 434 ++++++++++++++++++++++++++++++++ cacti.spec | 8 +- 2 files changed, 441 insertions(+), 1 deletion(-) create mode 100644 cacti-0.8.7g-mysql55-type.patch diff --git a/cacti-0.8.7g-mysql55-type.patch b/cacti-0.8.7g-mysql55-type.patch new file mode 100644 index 0000000..a072820 --- /dev/null +++ b/cacti-0.8.7g-mysql55-type.patch @@ -0,0 +1,434 @@ +--- cacti.sql.orig 2011-08-05 11:47:34.989751169 +0200 ++++ cacti.sql 2011-08-05 11:48:09.725480526 +0200 +@@ -7,7 +7,7 @@ + hash varchar(32) NOT NULL default '', + name varchar(255) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `cdef` +@@ -33,7 +33,7 @@ + value varchar(150) NOT NULL default '', + PRIMARY KEY (id), + KEY cdef_id (cdef_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `cdef_items` +@@ -64,7 +64,7 @@ + id mediumint(8) unsigned NOT NULL auto_increment, + hex varchar(6) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `colors` +@@ -184,7 +184,7 @@ + type_id tinyint(2) NOT NULL default '0', + PRIMARY KEY (id), + KEY name (name) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_input` +@@ -214,7 +214,7 @@ + value text, + PRIMARY KEY (data_input_field_id,data_template_data_id), + KEY t_value (t_value) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_input_data` +@@ -418,7 +418,7 @@ + PRIMARY KEY (id), + KEY data_input_id (data_input_id), + KEY type_code (type_code) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_input_fields` +@@ -482,7 +482,7 @@ + snmp_query_id mediumint(8) NOT NULL default '0', + snmp_index varchar(255) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_local` +@@ -503,7 +503,7 @@ + hash varchar(32) NOT NULL default '', + name varchar(150) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_template` +@@ -573,7 +573,7 @@ + PRIMARY KEY (id), + KEY local_data_id (local_data_id), + KEY data_template_id (data_template_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_template_data` +@@ -635,7 +635,7 @@ + rra_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (data_template_data_id,rra_id), + KEY data_template_data_id (data_template_data_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_template_data_rra` +@@ -852,7 +852,7 @@ + KEY local_data_id (local_data_id), + KEY data_template_id (data_template_id), + KEY local_data_template_rrd_id (local_data_template_rrd_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `data_template_rrd` +@@ -936,7 +936,7 @@ + KEY graph_template_id (graph_template_id), + KEY snmp_query_id (snmp_query_id), + KEY snmp_index (snmp_index) +-) TYPE=MyISAM COMMENT='Creates a relationship for each item in a custom graph.'; ++) ENGINE=MyISAM COMMENT='Creates a relationship for each item in a custom graph.'; + + -- + -- Dumping data for table `graph_local` +@@ -959,7 +959,7 @@ + description text, + column_name varchar(50) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM COMMENT='Stores the names for graph item input groups.'; ++) ENGINE=MyISAM COMMENT='Stores the names for graph item input groups.'; + + -- + -- Dumping data for table `graph_template_input` +@@ -1052,7 +1052,7 @@ + graph_template_item_id int(12) unsigned NOT NULL default '0', + PRIMARY KEY (graph_template_input_id,graph_template_item_id), + KEY graph_template_input_id (graph_template_input_id) +-) TYPE=MyISAM COMMENT='Stores the relationship for what graph iitems are associated'; ++) ENGINE=MyISAM COMMENT='Stores the relationship for what graph iitems are associated'; + + -- + -- Dumping data for table `graph_template_input_defs` +@@ -1326,7 +1326,7 @@ + name char(255) NOT NULL default '', + PRIMARY KEY (id), + KEY name (name) +-) TYPE=MyISAM COMMENT='Contains each graph template name.'; ++) ENGINE=MyISAM COMMENT='Contains each graph template name.'; + + -- + -- Dumping data for table `graph_templates` +@@ -1376,7 +1376,7 @@ + name varchar(100) NOT NULL default '', + gprint_text varchar(255) default NULL, + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `graph_templates_gprint` +@@ -1438,7 +1438,7 @@ + KEY local_graph_id (local_graph_id), + KEY graph_template_id (graph_template_id), + KEY title_cache (title_cache) +-) TYPE=MyISAM COMMENT='Stores the actual graph data.'; ++) ENGINE=MyISAM COMMENT='Stores the actual graph data.'; + + -- + -- Dumping data for table `graph_templates_graph` +@@ -1507,7 +1507,7 @@ + KEY graph_template_id (graph_template_id), + KEY local_graph_id (local_graph_id), + KEY task_item_id (task_item_id) +-) TYPE=MyISAM COMMENT='Stores the actual graph item data.'; ++) ENGINE=MyISAM COMMENT='Stores the actual graph item data.'; + + -- + -- Dumping data for table `graph_templates_item` +@@ -1803,7 +1803,7 @@ + sort_type tinyint(3) unsigned NOT NULL default '1', + name varchar(255) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `graph_tree` +@@ -1830,7 +1830,7 @@ + KEY host_id (host_id), + KEY local_graph_id (local_graph_id), + KEY order_key (order_key) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `graph_tree_items` +@@ -1879,7 +1879,7 @@ + availability decimal(8,5) NOT NULL default '100.00000', + PRIMARY KEY (id), + KEY disabled (disabled) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host` +@@ -1895,7 +1895,7 @@ + host_id mediumint(8) unsigned NOT NULL default '0', + graph_template_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (host_id,graph_template_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_graph` +@@ -1923,7 +1923,7 @@ + KEY field_name (field_name), + KEY field_value (field_value), + KEY snmp_query_id (snmp_query_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_snmp_cache` +@@ -1942,7 +1942,7 @@ + reindex_method tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (host_id,snmp_query_id), + KEY host_id (host_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_snmp_query` +@@ -1959,7 +1959,7 @@ + hash varchar(32) NOT NULL default '', + name varchar(100) NOT NULL default '', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_template` +@@ -1982,7 +1982,7 @@ + graph_template_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (host_template_id,graph_template_id), + KEY host_template_id (host_template_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_template_graph` +@@ -2012,7 +2012,7 @@ + snmp_query_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (host_template_id,snmp_query_id), + KEY host_template_id (host_template_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `host_template_snmp_query` +@@ -2042,7 +2042,7 @@ + ip_address int(11) unsigned NOT NULL default '0', + last_update datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller` +@@ -2059,7 +2059,7 @@ + action tinyint(3) unsigned NOT NULL default '0', + command varchar(200) NOT NULL default '', + PRIMARY KEY (poller_id,action,command) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller_command` +@@ -2099,7 +2099,7 @@ + KEY host_id (host_id), + KEY rrd_next_step (rrd_next_step), + KEY action (action) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller_item` +@@ -2116,7 +2116,7 @@ + time datetime NOT NULL default '0000-00-00 00:00:00', + output text NOT NULL, + PRIMARY KEY (local_data_id,rrd_name,time) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller_output` +@@ -2135,7 +2135,7 @@ + assert_value varchar(100) NOT NULL default '', + arg1 varchar(255) NOT NULL default '', + PRIMARY KEY (host_id,data_query_id,arg1) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller_reindex` +@@ -2153,7 +2153,7 @@ + start_time datetime NOT NULL default '0000-00-00 00:00:00', + end_time datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `poller_time` +@@ -2173,7 +2173,7 @@ + rows int(12) NOT NULL default '600', + timespan int(12) unsigned NOT NULL default '0', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `rra` +@@ -2194,7 +2194,7 @@ + consolidation_function_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (rra_id,consolidation_function_id), + KEY rra_id (rra_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `rra_cf` +@@ -2219,7 +2219,7 @@ + name varchar(50) NOT NULL default '', + value varchar(255) NOT NULL default '', + PRIMARY KEY (name) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `settings` +@@ -2235,7 +2235,7 @@ + name varchar(50) NOT NULL default '', + value varchar(255) NOT NULL default '', + PRIMARY KEY (user_id,name) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `settings_graphs` +@@ -2251,7 +2251,7 @@ + graph_tree_item_id mediumint(8) unsigned NOT NULL default '0', + status tinyint(1) NOT NULL default '0', + PRIMARY KEY (user_id,graph_tree_item_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `settings_tree` +@@ -2272,7 +2272,7 @@ + data_input_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (id), + KEY name (name) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `snmp_query` +@@ -2298,7 +2298,7 @@ + name varchar(100) NOT NULL default '', + graph_template_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `snmp_query_graph` +@@ -2336,7 +2336,7 @@ + PRIMARY KEY (snmp_query_graph_id,data_template_id,data_template_rrd_id), + KEY data_template_rrd_id (data_template_rrd_id), + KEY snmp_query_graph_id (snmp_query_graph_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `snmp_query_graph_rrd` +@@ -2397,7 +2397,7 @@ + PRIMARY KEY (id), + KEY snmp_query_graph_id (snmp_query_graph_id), + KEY data_template_id (data_template_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `snmp_query_graph_rrd_sv` +@@ -2476,7 +2476,7 @@ + text varchar(255) NOT NULL default '', + PRIMARY KEY (id), + KEY snmp_query_graph_id (snmp_query_graph_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `snmp_query_graph_sv` +@@ -2548,7 +2548,7 @@ + KEY username (username), + KEY realm (realm), + KEY enabled (enabled) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `user_auth` +@@ -2567,7 +2567,7 @@ + type tinyint(2) unsigned NOT NULL default '0', + PRIMARY KEY (user_id,item_id,type), + KEY user_id (user_id,type) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `user_auth_perms` +@@ -2583,7 +2583,7 @@ + user_id mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (realm_id,user_id), + KEY user_id (user_id) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `user_auth_realm` +@@ -2619,7 +2619,7 @@ + ip varchar(40) NOT NULL default '', + PRIMARY KEY (username,user_id,time), + KEY username (username) +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `user_log` +@@ -2632,7 +2632,7 @@ + + CREATE TABLE version ( + cacti char(20) default NULL +-) TYPE=MyISAM; ++) ENGINE=MyISAM; + + -- + -- Dumping data for table `version` diff --git a/cacti.spec b/cacti.spec index b68ee0e..2700368 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.7g -Release: 2%{?dist} +Release: 3%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -11,6 +11,7 @@ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: cacti-httpd.conf Source2: cacti.logrotate Source3: cacti.README.Fedora +Patch0: cacti-0.8.7g-mysql55-type.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -31,6 +32,8 @@ used to creating traffic graphs with MRTG. %prep %setup -q +%patch0 -p0 + echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron %install @@ -105,6 +108,9 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Mon Aug 08 2011 Jon Ciesla - 0.8.7g-3 +- Patch for MySQL 5.5, BZ 728513. + * Tue Feb 08 2011 Fedora Release Engineering - 0.8.7g-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 355ddffde4c2a3a0314d7806a01f0bd0d54971cf Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Thu, 27 Oct 2011 12:17:56 -0600 Subject: [PATCH 12/12] update to 0.8.7h --- .gitignore | 1 + cacti-0.8.7g-mysql55-type.patch | 434 -------------------------------- cacti.spec | 11 +- sources | 2 +- 4 files changed, 8 insertions(+), 440 deletions(-) delete mode 100644 cacti-0.8.7g-mysql55-type.patch diff --git a/.gitignore b/.gitignore index c274c8f..8a26c73 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ cacti-0.8.7g.tar.gz +/cacti-0.8.7h.tar.gz diff --git a/cacti-0.8.7g-mysql55-type.patch b/cacti-0.8.7g-mysql55-type.patch deleted file mode 100644 index a072820..0000000 --- a/cacti-0.8.7g-mysql55-type.patch +++ /dev/null @@ -1,434 +0,0 @@ ---- cacti.sql.orig 2011-08-05 11:47:34.989751169 +0200 -+++ cacti.sql 2011-08-05 11:48:09.725480526 +0200 -@@ -7,7 +7,7 @@ - hash varchar(32) NOT NULL default '', - name varchar(255) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `cdef` -@@ -33,7 +33,7 @@ - value varchar(150) NOT NULL default '', - PRIMARY KEY (id), - KEY cdef_id (cdef_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `cdef_items` -@@ -64,7 +64,7 @@ - id mediumint(8) unsigned NOT NULL auto_increment, - hex varchar(6) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `colors` -@@ -184,7 +184,7 @@ - type_id tinyint(2) NOT NULL default '0', - PRIMARY KEY (id), - KEY name (name) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_input` -@@ -214,7 +214,7 @@ - value text, - PRIMARY KEY (data_input_field_id,data_template_data_id), - KEY t_value (t_value) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_input_data` -@@ -418,7 +418,7 @@ - PRIMARY KEY (id), - KEY data_input_id (data_input_id), - KEY type_code (type_code) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_input_fields` -@@ -482,7 +482,7 @@ - snmp_query_id mediumint(8) NOT NULL default '0', - snmp_index varchar(255) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_local` -@@ -503,7 +503,7 @@ - hash varchar(32) NOT NULL default '', - name varchar(150) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_template` -@@ -573,7 +573,7 @@ - PRIMARY KEY (id), - KEY local_data_id (local_data_id), - KEY data_template_id (data_template_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_template_data` -@@ -635,7 +635,7 @@ - rra_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (data_template_data_id,rra_id), - KEY data_template_data_id (data_template_data_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_template_data_rra` -@@ -852,7 +852,7 @@ - KEY local_data_id (local_data_id), - KEY data_template_id (data_template_id), - KEY local_data_template_rrd_id (local_data_template_rrd_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `data_template_rrd` -@@ -936,7 +936,7 @@ - KEY graph_template_id (graph_template_id), - KEY snmp_query_id (snmp_query_id), - KEY snmp_index (snmp_index) --) TYPE=MyISAM COMMENT='Creates a relationship for each item in a custom graph.'; -+) ENGINE=MyISAM COMMENT='Creates a relationship for each item in a custom graph.'; - - -- - -- Dumping data for table `graph_local` -@@ -959,7 +959,7 @@ - description text, - column_name varchar(50) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM COMMENT='Stores the names for graph item input groups.'; -+) ENGINE=MyISAM COMMENT='Stores the names for graph item input groups.'; - - -- - -- Dumping data for table `graph_template_input` -@@ -1052,7 +1052,7 @@ - graph_template_item_id int(12) unsigned NOT NULL default '0', - PRIMARY KEY (graph_template_input_id,graph_template_item_id), - KEY graph_template_input_id (graph_template_input_id) --) TYPE=MyISAM COMMENT='Stores the relationship for what graph iitems are associated'; -+) ENGINE=MyISAM COMMENT='Stores the relationship for what graph iitems are associated'; - - -- - -- Dumping data for table `graph_template_input_defs` -@@ -1326,7 +1326,7 @@ - name char(255) NOT NULL default '', - PRIMARY KEY (id), - KEY name (name) --) TYPE=MyISAM COMMENT='Contains each graph template name.'; -+) ENGINE=MyISAM COMMENT='Contains each graph template name.'; - - -- - -- Dumping data for table `graph_templates` -@@ -1376,7 +1376,7 @@ - name varchar(100) NOT NULL default '', - gprint_text varchar(255) default NULL, - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `graph_templates_gprint` -@@ -1438,7 +1438,7 @@ - KEY local_graph_id (local_graph_id), - KEY graph_template_id (graph_template_id), - KEY title_cache (title_cache) --) TYPE=MyISAM COMMENT='Stores the actual graph data.'; -+) ENGINE=MyISAM COMMENT='Stores the actual graph data.'; - - -- - -- Dumping data for table `graph_templates_graph` -@@ -1507,7 +1507,7 @@ - KEY graph_template_id (graph_template_id), - KEY local_graph_id (local_graph_id), - KEY task_item_id (task_item_id) --) TYPE=MyISAM COMMENT='Stores the actual graph item data.'; -+) ENGINE=MyISAM COMMENT='Stores the actual graph item data.'; - - -- - -- Dumping data for table `graph_templates_item` -@@ -1803,7 +1803,7 @@ - sort_type tinyint(3) unsigned NOT NULL default '1', - name varchar(255) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `graph_tree` -@@ -1830,7 +1830,7 @@ - KEY host_id (host_id), - KEY local_graph_id (local_graph_id), - KEY order_key (order_key) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `graph_tree_items` -@@ -1879,7 +1879,7 @@ - availability decimal(8,5) NOT NULL default '100.00000', - PRIMARY KEY (id), - KEY disabled (disabled) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host` -@@ -1895,7 +1895,7 @@ - host_id mediumint(8) unsigned NOT NULL default '0', - graph_template_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (host_id,graph_template_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_graph` -@@ -1923,7 +1923,7 @@ - KEY field_name (field_name), - KEY field_value (field_value), - KEY snmp_query_id (snmp_query_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_snmp_cache` -@@ -1942,7 +1942,7 @@ - reindex_method tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (host_id,snmp_query_id), - KEY host_id (host_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_snmp_query` -@@ -1959,7 +1959,7 @@ - hash varchar(32) NOT NULL default '', - name varchar(100) NOT NULL default '', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_template` -@@ -1982,7 +1982,7 @@ - graph_template_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (host_template_id,graph_template_id), - KEY host_template_id (host_template_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_template_graph` -@@ -2012,7 +2012,7 @@ - snmp_query_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (host_template_id,snmp_query_id), - KEY host_template_id (host_template_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `host_template_snmp_query` -@@ -2042,7 +2042,7 @@ - ip_address int(11) unsigned NOT NULL default '0', - last_update datetime NOT NULL default '0000-00-00 00:00:00', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller` -@@ -2059,7 +2059,7 @@ - action tinyint(3) unsigned NOT NULL default '0', - command varchar(200) NOT NULL default '', - PRIMARY KEY (poller_id,action,command) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller_command` -@@ -2099,7 +2099,7 @@ - KEY host_id (host_id), - KEY rrd_next_step (rrd_next_step), - KEY action (action) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller_item` -@@ -2116,7 +2116,7 @@ - time datetime NOT NULL default '0000-00-00 00:00:00', - output text NOT NULL, - PRIMARY KEY (local_data_id,rrd_name,time) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller_output` -@@ -2135,7 +2135,7 @@ - assert_value varchar(100) NOT NULL default '', - arg1 varchar(255) NOT NULL default '', - PRIMARY KEY (host_id,data_query_id,arg1) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller_reindex` -@@ -2153,7 +2153,7 @@ - start_time datetime NOT NULL default '0000-00-00 00:00:00', - end_time datetime NOT NULL default '0000-00-00 00:00:00', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `poller_time` -@@ -2173,7 +2173,7 @@ - rows int(12) NOT NULL default '600', - timespan int(12) unsigned NOT NULL default '0', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `rra` -@@ -2194,7 +2194,7 @@ - consolidation_function_id smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (rra_id,consolidation_function_id), - KEY rra_id (rra_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `rra_cf` -@@ -2219,7 +2219,7 @@ - name varchar(50) NOT NULL default '', - value varchar(255) NOT NULL default '', - PRIMARY KEY (name) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `settings` -@@ -2235,7 +2235,7 @@ - name varchar(50) NOT NULL default '', - value varchar(255) NOT NULL default '', - PRIMARY KEY (user_id,name) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `settings_graphs` -@@ -2251,7 +2251,7 @@ - graph_tree_item_id mediumint(8) unsigned NOT NULL default '0', - status tinyint(1) NOT NULL default '0', - PRIMARY KEY (user_id,graph_tree_item_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `settings_tree` -@@ -2272,7 +2272,7 @@ - data_input_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (id), - KEY name (name) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `snmp_query` -@@ -2298,7 +2298,7 @@ - name varchar(100) NOT NULL default '', - graph_template_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `snmp_query_graph` -@@ -2336,7 +2336,7 @@ - PRIMARY KEY (snmp_query_graph_id,data_template_id,data_template_rrd_id), - KEY data_template_rrd_id (data_template_rrd_id), - KEY snmp_query_graph_id (snmp_query_graph_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `snmp_query_graph_rrd` -@@ -2397,7 +2397,7 @@ - PRIMARY KEY (id), - KEY snmp_query_graph_id (snmp_query_graph_id), - KEY data_template_id (data_template_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `snmp_query_graph_rrd_sv` -@@ -2476,7 +2476,7 @@ - text varchar(255) NOT NULL default '', - PRIMARY KEY (id), - KEY snmp_query_graph_id (snmp_query_graph_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `snmp_query_graph_sv` -@@ -2548,7 +2548,7 @@ - KEY username (username), - KEY realm (realm), - KEY enabled (enabled) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `user_auth` -@@ -2567,7 +2567,7 @@ - type tinyint(2) unsigned NOT NULL default '0', - PRIMARY KEY (user_id,item_id,type), - KEY user_id (user_id,type) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `user_auth_perms` -@@ -2583,7 +2583,7 @@ - user_id mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (realm_id,user_id), - KEY user_id (user_id) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `user_auth_realm` -@@ -2619,7 +2619,7 @@ - ip varchar(40) NOT NULL default '', - PRIMARY KEY (username,user_id,time), - KEY username (username) --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `user_log` -@@ -2632,7 +2632,7 @@ - - CREATE TABLE version ( - cacti char(20) default NULL --) TYPE=MyISAM; -+) ENGINE=MyISAM; - - -- - -- Dumping data for table `version` diff --git a/cacti.spec b/cacti.spec index 2700368..a84fd55 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti -Version: 0.8.7g -Release: 3%{?dist} +Version: 0.8.7h +Release: 1%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -11,7 +11,6 @@ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: cacti-httpd.conf Source2: cacti.logrotate Source3: cacti.README.Fedora -Patch0: cacti-0.8.7g-mysql55-type.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -32,8 +31,6 @@ used to creating traffic graphs with MRTG. %prep %setup -q -%patch0 -p0 - echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron %install @@ -108,6 +105,10 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Thu Oct 27 2011 Ken Dreyer - 0.8.7h-1 +- New upstream release. +- Remove upstream'd mysql patch. + * Mon Aug 08 2011 Jon Ciesla - 0.8.7g-3 - Patch for MySQL 5.5, BZ 728513. diff --git a/sources b/sources index a5cc6f8..eb40192 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -268421cb1a58d3444f7ecbddb4c4b016 cacti-0.8.7g.tar.gz +58c9371341f49a190ae11a85118e598d cacti-0.8.7h.tar.gz