[packages/percona-monitoring-plugins] up to 1.1.3, no epoch in base package

glen glen at pld-linux.org
Sat Mar 22 22:31:06 CET 2014


commit 51550667c4e01d168aec24dbcd134ef7c854822b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Mar 22 23:30:52 2014 +0200

    up to 1.1.3, no epoch in base package

 config.patch                    | 32 ++++++++++++++++++--------------
 paths.patch                     | 37 +++++++++++++++++++++----------------
 percona-monitoring-plugins.spec | 19 ++++++++++---------
 3 files changed, 49 insertions(+), 39 deletions(-)
---
diff --git a/percona-monitoring-plugins.spec b/percona-monitoring-plugins.spec
index 8d63187..409c46e 100644
--- a/percona-monitoring-plugins.spec
+++ b/percona-monitoring-plugins.spec
@@ -1,5 +1,6 @@
 # TODO
-# - how to package other templates:
+# - cacti: package other templates:
+#   http://www.percona.com/doc/percona-monitoring-plugins/1.1/#templates-for-cacti
 # - Apache
 # - JMX
 # - Memcached
@@ -7,18 +8,16 @@
 # - Nginx
 # - OpenVZ
 # - Unix
-# https://code.google.com/p/mysql-cacti-templates/wiki/TableOfContents>
 # - graceful migrate from cacti-template-mysql (use different paths so old pkg could be kept aside?)
 %define		template	mysql
 Summary:	MySQL cacti templates
 Name:		percona-monitoring-plugins
-Version:	1.0.2
-Release:	1
-Epoch:		1
+Version:	1.1.3
+Release:	0.1
 License:	GPL v2
 Group:		Applications/WWW
-Source0:	http://www.percona.com/downloads/percona-monitoring-plugins/%{name}-%{version}.tar.gz
-# Source0-md5:	93002ccba0d81692b326566ab71ea18d
+Source0:	http://www.percona.com/redir/downloads/percona-monitoring-plugins/LATEST/%{name}-%{version}.tar.gz
+# Source0-md5:	ef344e93adaeb1dd23be722daced9261
 Source1:	config.php
 Source2:	ssh_config.php
 Patch0:		config.patch
@@ -41,16 +40,18 @@ This is a set of templates for monitoring MySQL servers with Cacti.
 
 %package -n cacti-template-mysql
 Summary:	Cacti templates for graphing MySQL
+Epoch:		1
 Group:		Applications/WWW
-Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 
 %description -n cacti-template-mysql
 This is a set of templates for monitoring MySQL servers with Cacti.
 
 %package -n cacti-template-redis
 Summary:	Cacti templates for graphing Redis
+Epoch:		1
 Group:		Applications/WWW
-Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 # redis template uses nc
 Requires:	nc
 
diff --git a/config.patch b/config.patch
index 125a9e6..2cddfff 100644
--- a/config.patch
+++ b/config.patch
@@ -1,26 +1,30 @@
---- better-cacti-templates-1.1.8-orig/cacti/scripts/ss_get_mysql_stats.php	2011-05-25 12:17:25.659963610 +0200
-+++ better-cacti-templates-1.1.8/cacti/scripts/ss_get_mysql_stats.php	2011-05-25 12:19:29.509003208 +0200
-@@ -68,6 +68,10 @@
+--- percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_mysql_stats.php~	2014-03-20 11:14:27.000000000 +0200
++++ percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_mysql_stats.php	2014-03-22 23:20:47.136171213 +0200
+@@ -63,7 +63,11 @@
  # ============================================================================
- # Include settings from an external config file (issue 39).
+ # Include settings from an external config file.
  # ============================================================================
-+# prefer system location first
+-if ( file_exists('/etc/cacti/' . basename(__FILE__) . '.cnf' ) ) {
 +if ( file_exists('/etc/webapps/cacti/ss_get_mysql_stats.php') ) {
 +   require('/etc/webapps/cacti/ss_get_mysql_stats.php');
++   debug('Found configuration file /etc/webapps/cacti/ss_get_mysql_stats.php');
 +}
- if ( file_exists(__FILE__ . '.cnf' ) ) {
-    require(__FILE__ . '.cnf');
++elseif ( file_exists('/etc/cacti/' . basename(__FILE__) . '.cnf' ) ) {
+    require('/etc/cacti/' . basename(__FILE__) . '.cnf');
+    debug('Found configuration file /etc/cacti/' . basename(__FILE__) . '.cnf');
  }
---- better-cacti-templates-1.1.8/cacti/scripts/ss_get_by_ssh.php~	2011-12-21 18:26:28.000000000 +0200
-+++ better-cacti-templates-1.1.8/cacti/scripts/ss_get_by_ssh.php	2011-12-21 18:29:47.234354418 +0200
-@@ -66,6 +66,10 @@
+--- percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_by_ssh.php~	2014-03-20 11:14:27.000000000 +0200
++++ percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_by_ssh.php	2014-03-22 23:22:26.413872479 +0200
+@@ -61,7 +61,11 @@
  # ============================================================================
- # Include settings from an external config file (issue 39).
+ # Include settings from an external config file.
  # ============================================================================
-+# prefer system location first
+-if ( file_exists('/etc/cacti/' . basename(__FILE__) . '.cnf' ) ) {
 +if ( file_exists('/etc/webapps/cacti/ss_get_by_ssh.php') ) {
 +   require('/etc/webapps/cacti/ss_get_by_ssh.php');
++   debug('Found configuration file /etc/webapps/cacti/ss_get_by_ssh.php');
 +}
- if ( file_exists(__FILE__ . '.cnf' ) ) {
-    require(__FILE__ . '.cnf');
++elseif ( file_exists('/etc/cacti/' . basename(__FILE__) . '.cnf' ) ) {
+    require('/etc/cacti/' . basename(__FILE__) . '.cnf');
+    debug('Found configuration file /etc/cacti/' . basename(__FILE__) . '.cnf');
  }
diff --git a/paths.patch b/paths.patch
index dd28185..20a1c50 100644
--- a/paths.patch
+++ b/paths.patch
@@ -1,24 +1,29 @@
---- better-cacti-templates-1.1.8-orig/cacti/scripts/ss_get_by_ssh.php	2011-05-25 12:17:25.693298481 +0200
-+++ better-cacti-templates-1.1.8/cacti/scripts/ss_get_by_ssh.php	2011-05-25 12:23:51.021048978 +0200
-@@ -38,10 +38,10 @@
+--- percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_by_ssh.php~	2014-03-22 23:22:46.000000000 +0200
++++ percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_by_ssh.php	2014-03-22 23:23:34.063515968 +0200
+@@ -26,7 +26,7 @@
  # ============================================================================
- $ssh_user   = 'cacti';                          # SSH username
- $ssh_port   = 22;                               # SSH port
--$ssh_iden   = '-i /var/www/cacti/.ssh/id_rsa';  # SSH identity
-+$ssh_iden   = '-i /var/lib/cacti/.ssh/id_rsa';  # SSH identity
- $ssh_tout   = 10;                               # SSH connect timeout
- $nc_cmd     = 'nc -C -q1';                      # How to invoke netcat
+ $ssh_user   = 'cacti';                           # SSH username
+ $ssh_port   = 22;                                # SSH port
+-$ssh_iden   = '-i /usr/share/cacti/.ssh/id_rsa'; # SSH identity
++$ssh_iden   = '-i /var/lib/cacti/.ssh/id_rsa';   # SSH identity
+ $ssh_tout   = 10;                                # SSH connect timeout
+ # You can enable SSH remote command timeout by prepending 'timeout $cmd_tout'
+ # to the actual command, i.e. `ssh HOST timeout 10 CMD`
+@@ -34,7 +34,7 @@
+ $remote_cmd_tout = FALSE;
+ $cmd_tout   = 10;      # Command exec timeout (ssh itself or local cmd)
+ $nc_cmd     = 'nc -C'; # How to invoke netcat. NOTE, for Debian set 'nc -q1'.
 -$cache_dir  = '/tmp';  # 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.
+ $poll_time  = 300;     # Adjust to match your polling interval.
+ $timezone   = null;    # If not set, uses the system default.  Example: "UTC"
  $use_ss     = FALSE; # Whether to use the script server or not
- $use_ssh    = TRUE;  # Whether to connect via SSH or not (default yes).
---- percona-monitoring-plugins-1.0.1/cacti/scripts/ss_get_mysql_stats.php~	2012-10-28 22:08:12.000000000 +0200
-+++ percona-monitoring-plugins-1.0.1/cacti/scripts/ss_get_mysql_stats.php	2012-10-28 22:08:41.452510099 +0200
-@@ -33,7 +33,7 @@
- $mysql_ssl  = FALSE;   # Whether to use SSL to connect to MySQL.
+--- percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_mysql_stats.php~	2014-03-22 23:22:46.000000000 +0200
++++ percona-monitoring-plugins-1.1.3/cacti/scripts/ss_get_mysql_stats.php	2014-03-22 23:24:11.981851325 +0200
+@@ -40,7 +40,7 @@
+ $heartbeat_server_id = 0;  # Server id to associate with a heartbeat. Leave 0 if no preference.
+ $heartbeat_table = 'percona.heartbeat'; # db.tbl.
  
- $heartbeat  = '';      # db.tbl if you use pt-heartbeat from Percona Toolkit.
 -$cache_dir  = '/tmp';  # 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.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/percona-monitoring-plugins.git/commitdiff/51550667c4e01d168aec24dbcd134ef7c854822b



More information about the pld-cvs-commit mailing list