From: Andreas Stieger <andreas.stieger@gmx.de>
Date: Mon, 17 Feb 2014 00:15:35 +0000
Subject: disable automatic version check for all tools
References: https://bugzilla.novell.com/show_bug.cgi?id=864194 https://bugs.launchpad.net/percona-toolkit/+bug/1279502
Upstream: no

Prevents transmission of version information to an external host
in the default configuration.
Can be used by owner of a Percona Server (or an attacker who can
control this destination for the client) to collect arbitrary
MySQL configuration parameters and execute commands (with -v).
Now the version check needs to be requested via command line or
global/tool specific/user configuration. (--version-check)

Note that the doc is parsed into a Perl Getopt::Long spec at runtime.
Setting "default: no" does not work, "default: 0" would work.
The spec file contains a %check section that tests this.
Patching the source was chosen over supplying default configuration
files in /etc/percona-toolkit/percona-toolkit.conf because not all
tools actually support the version check and would throw warnings.

---
 bin/pt-archiver              |    2 --
 bin/pt-config-diff           |    2 --
 bin/pt-deadlock-logger       |    2 --
 bin/pt-diskstats             |    2 --
 bin/pt-duplicate-key-checker |    2 --
 bin/pt-find                  |    2 --
 bin/pt-fk-error-logger       |    2 --
 bin/pt-heartbeat             |    2 --
 bin/pt-index-usage           |    2 --
 bin/pt-kill                  |    2 --
 bin/pt-online-schema-change  |    2 --
 bin/pt-query-digest          |    2 --
 bin/pt-slave-delay           |    2 --
 bin/pt-slave-restart         |    2 --
 bin/pt-table-checksum        |    2 --
 bin/pt-table-sync            |    2 --
 bin/pt-upgrade               |    2 --
 bin/pt-variable-advisor      |    2 --
 18 files changed, 36 deletions(-)

Index: percona-toolkit-2.2.10/bin/pt-archiver
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-archiver	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-archiver	2014-08-10 15:15:27.000000000 +0100
@@ -7465,8 +7465,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-config-diff
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-config-diff	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-config-diff	2014-08-10 15:15:27.000000000 +0100
@@ -5563,8 +5563,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-deadlock-logger
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-deadlock-logger	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-deadlock-logger	2014-08-10 15:15:27.000000000 +0100
@@ -5348,8 +5348,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-diskstats
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-diskstats	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-diskstats	2014-08-10 15:15:27.000000000 +0100
@@ -5468,8 +5468,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-duplicate-key-checker
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-duplicate-key-checker	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-duplicate-key-checker	2014-08-10 15:15:27.000000000 +0100
@@ -5429,8 +5429,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-find
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-find	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-find	2014-08-10 15:15:27.000000000 +0100
@@ -4440,8 +4440,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-fk-error-logger
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-fk-error-logger	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-fk-error-logger	2014-08-10 15:15:27.000000000 +0100
@@ -4335,8 +4335,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-heartbeat
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-heartbeat	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-heartbeat	2014-08-10 15:15:27.000000000 +0100
@@ -6019,8 +6019,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-index-usage
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-index-usage	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-index-usage	2014-08-10 15:15:27.000000000 +0100
@@ -7375,8 +7375,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-kill
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-kill	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-kill	2014-08-10 15:15:27.000000000 +0100
@@ -7640,8 +7640,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-online-schema-change
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-online-schema-change	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-online-schema-change	2014-08-10 15:15:27.000000000 +0100
@@ -11328,8 +11328,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-query-digest
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-query-digest	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-query-digest	2014-08-10 15:15:27.000000000 +0100
@@ -16273,8 +16273,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-slave-delay
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-slave-delay	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-slave-delay	2014-08-10 15:15:27.000000000 +0100
@@ -4698,8 +4698,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-slave-restart
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-slave-restart	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-slave-restart	2014-08-10 15:15:27.000000000 +0100
@@ -5764,8 +5764,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-table-checksum
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-table-checksum	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-table-checksum	2014-08-10 15:15:27.000000000 +0100
@@ -12415,8 +12415,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-table-sync
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-table-sync	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-table-sync	2014-08-10 15:15:27.000000000 +0100
@@ -12500,8 +12500,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-upgrade
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-upgrade	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-upgrade	2014-08-10 15:15:27.000000000 +0100
@@ -11031,8 +11031,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two
Index: percona-toolkit-2.2.10/bin/pt-variable-advisor
===================================================================
--- percona-toolkit-2.2.10.orig/bin/pt-variable-advisor	2014-08-06 20:57:30.000000000 +0100
+++ percona-toolkit-2.2.10/bin/pt-variable-advisor	2014-08-10 15:15:27.000000000 +0100
@@ -5968,8 +5968,6 @@ Show version and exit.
 
 =item --[no]version-check
 
-default: yes
-
 Check for the latest version of Percona Toolkit, MySQL, and other programs.
 
 This is a standard "check for updates automatically" feature, with two