Author: glen                         Date: Wed Feb 16 11:19:11 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use own cachedir; rel 3

---- Files affected:
packages/cacti-template-mysql:
   cacti-template-mysql.spec (1.2 -> 1.3) , paths.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/cacti-template-mysql/cacti-template-mysql.spec
diff -u packages/cacti-template-mysql/cacti-template-mysql.spec:1.2 
packages/cacti-template-mysql/cacti-template-mysql.spec:1.3
--- packages/cacti-template-mysql/cacti-template-mysql.spec:1.2 Tue Dec 14 
00:28:43 2010
+++ packages/cacti-template-mysql/cacti-template-mysql.spec     Wed Feb 16 
12:19:05 2011
@@ -3,7 +3,7 @@
 Summary:       MySQL cacti templates
 Name:          cacti-template-%{template}
 Version:       1.1.7
-Release:       2
+Release:       3
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       
http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-%{version}.tar.gz
@@ -22,6 +22,7 @@
 %define                cactidir                /usr/share/cacti
 %define                resourcedir             %{cactidir}/resource
 %define                scriptsdir              %{cactidir}/scripts
+%define                cachedir                /var/cache/cacti/mysql_stats
 
 %description
 This is a set of templates for monitoring MySQL servers with Cacti.
@@ -33,7 +34,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{resourcedir},%{scriptsdir}}
+install -d 
$RPM_BUILD_ROOT{%{_sysconfdir},%{resourcedir},%{scriptsdir},%{cachedir}}
 
 # we deliberately are not packaging other templates this project offers:
 # - it's idiotic to graph network services over ssh
@@ -47,6 +48,11 @@
 %post
 %cacti_import_template %{resourcedir}/cacti_host_template_x_mysql_server.xml
 
+%preun
+if [ "$1" = 0 ]; then
+       echo %{cachedir}/* | xargs rm -f
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -56,6 +62,7 @@
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/ss_get_mysql_stats.php
 %attr(755,root,root) %{scriptsdir}/ss_get_mysql_stats.php
 %{resourcedir}/*.xml
+%attr(770,root,http) %dir %{cachedir}
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -63,6 +70,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2011/02/16 11:19:05  glen
+- use own cachedir; rel 3
+
 Revision 1.2  2010/12/13 23:28:43  glen
 - use /var/cache/cacti for caching instead of /tmp
 

================================================================
Index: packages/cacti-template-mysql/paths.patch
diff -u packages/cacti-template-mysql/paths.patch:1.1 
packages/cacti-template-mysql/paths.patch:1.2
--- packages/cacti-template-mysql/paths.patch:1.1       Tue Dec 14 00:28:44 2010
+++ packages/cacti-template-mysql/paths.patch   Wed Feb 16 12:19:05 2011
@@ -19,7 +19,7 @@
 +$ssh_iden   = '-i /var/lib/cacti/.ssh/id_rsa';  # SSH identity
  $ssh_tout   = 10;                               # SSH connect timeout
 -$cache_dir  = '/tmp';  # If set, this uses caching to avoid multiple calls.
-+$cache_dir  = '/var/cache/cacti';  # If set, this uses caching to avoid 
multiple calls.
++$cache_dir  = '/var/cache/cacti/mysql_stats';  # If set, this uses caching to 
avoid multiple calls.
  $poll_time  = 300; # Adjust to match your polling interval.
  $use_ss     = FALSE; # Whether to use the script server or not
  $use_ssh    = TRUE;  # Whether to connect via SSH or not (default yes).
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti-template-mysql/cacti-template-mysql.spec?r1=1.2&r2=1.3&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti-template-mysql/paths.patch?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to