Summary: Cacti RRD File Cleaner
Name: cacti-plugin-%{plugin}
Version: 0.40
-Release: 0.3
+Release: 0.4
License: GPL v2
Group: Applications/WWW
Source0: http://docs.cacti.net/_media/plugin:rrdclean-v%{version}.tgz
# Source0-md5: afd7ae246482fbee883485e0430041e8
Patch0: paths.patch
+Patch1: fix-paths-handling.patch
URL: http://docs.cacti.net/plugin:rrdclean
Requires: cacti >= 0.8.6j
Requires: php-common >= 3:4.3.0
%setup -qc
mv %{plugin}/* .; rmdir %{plugin}
%patch0 -p1
+%patch1 -p1
%install
rm -rf $RPM_BUILD_ROOT
--- /dev/null
+--- cacti-plugin-rrdclean-0.40/rrdmove.php 2010-06-19 17:24:22.000000000 +0300
++++ cacti-plugin-rrdclean-0.40/rrdmove.php 2010-12-14 09:28:27.185477958 +0200
+@@ -117,7 +116,7 @@
+ cacti_log("RRDClean is now running on " . sizeof($file_array) . " items", true, "RRDCLEAN");
+
+ /* determine the location of the RRA files */
+- if (isset ($config["path_rra"])) {
++ if (isset($config["rra_path"])) {
+ $rra_path = $config["rra_path"];
+ } else {
+ $rra_path = $config["base_path"] . "/rra";
+@@ -128,12 +127,12 @@
+ $rrd_archive = read_config_option("rrd_archive", TRUE);
+
+ if ($rrd_backup == "")
+- $rrd_backup = $rra_path . "/backup/";
++ $rrd_backup = $rra_path . "/backup";
+ if ($rrd_archive == "")
+- $rrd_archive = $rra_path . "/archive/";
++ $rrd_archive = $rra_path . "/archive";
+
+- rrdclean_create_path($rra_path . "/backup/");
+- rrdclean_create_path($rra_path . "/archive/");
++ rrdclean_create_path($rrd_backup);
++ rrdclean_create_path($rrd_archive);
+
+ /* now scan the files */
+ foreach ($file_array as $file) {