diff options
author | Rodrigo Osorio <rodrigo@FreeBSD.org> | 2014-12-10 13:32:30 +0000 |
---|---|---|
committer | Rodrigo Osorio <rodrigo@FreeBSD.org> | 2014-12-10 13:32:30 +0000 |
commit | 7856fdbef36868c2fc98bbc31f75b04df0ba73d7 (patch) | |
tree | dd6c4fc0dc9f00a3b43cf4b1d954092d09c68f9b | |
parent | - Don't run STRIP_CMD on scripts (diff) |
Fix warnings when run check_mysql_health with perl >= 5.16
Remove unnecessary dirs from plist
PR: ports/189370
Submitted by: rodrigo
4 files changed, 38 insertions, 3 deletions
diff --git a/net-mgmt/check_mysql_health/Makefile b/net-mgmt/check_mysql_health/Makefile index da86ca5b7bca..3a542c730feb 100644 --- a/net-mgmt/check_mysql_health/Makefile +++ b/net-mgmt/check_mysql_health/Makefile @@ -2,16 +2,17 @@ PORTNAME= check_mysql_health PORTVERSION= 2.1.5.1 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://labs.consol.de/wp-content/uploads/2011/04/ MAINTAINER= ssanders@taximagic.com COMMENT= Nagios plugin to check various parameters of a MySQL database -RUN_DEPENDS= p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql - LICENSE= GPLv2 +RUN_DEPENDS= p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql + GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-statefiles-dir=${NAGIOSDIR} \ --with-nagios-user=${NAGIOSUSER} \ @@ -28,6 +29,5 @@ NAGIOSGROUP?= nagios NAGIOSDIR?= /var/spool/nagios PLIST_FILES= libexec/nagios/check_mysql_health -PLIST_DIRS= libexec/nagios .include <bsd.port.mk> diff --git a/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Cluster.pm b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Cluster.pm new file mode 100644 index 000000000000..7a37177d0103 --- /dev/null +++ b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Cluster.pm @@ -0,0 +1,11 @@ +--- plugins-scripts/Nagios/DBD/MySQL/Cluster.pm.orig 2014-12-07 18:40:22.318185465 +0000 ++++ plugins-scripts/Nagios/DBD/MySQL/Cluster.pm 2014-12-07 18:41:15.780179599 +0000 +@@ -192,7 +192,7 @@ + my $message = shift; + push(@{$self->{nagios}->{messages}->{$level}}, $message); + # recalc current level +- foreach my $llevel qw(CRITICAL WARNING UNKNOWN OK) { ++ foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) { + if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) { + $self->{nagios_level} = $ERRORS{$llevel}; + } diff --git a/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Server.pm b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Server.pm new file mode 100644 index 000000000000..932bb90ed2b4 --- /dev/null +++ b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_Nagios_DBD_MySQL_Server.pm @@ -0,0 +1,11 @@ +--- plugins-scripts/Nagios/DBD/MySQL/Server.pm.orig 2014-12-07 18:56:47.435107795 +0000 ++++ plugins-scripts/Nagios/DBD/MySQL/Server.pm 2014-12-07 18:57:22.394116542 +0000 +@@ -310,7 +310,7 @@ + my $message = shift; + push(@{$self->{nagios}->{messages}->{$level}}, $message); + # recalc current level +- foreach my $llevel qw(CRITICAL WARNING UNKNOWN OK) { ++ foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) { + if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) { + $self->{nagios_level} = $ERRORS{$llevel}; + } diff --git a/net-mgmt/check_mysql_health/files/patch-plugins-scripts_check_mysql_health.pl b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_check_mysql_health.pl new file mode 100644 index 000000000000..3d8a91cd8354 --- /dev/null +++ b/net-mgmt/check_mysql_health/files/patch-plugins-scripts_check_mysql_health.pl @@ -0,0 +1,13 @@ +--- plugins-scripts/check_mysql_health.pl.orig 2014-12-07 18:44:47.220159275 +0000 ++++ plugins-scripts/check_mysql_health.pl 2014-12-07 18:51:34.356136684 +0000 +@@ -353,8 +353,8 @@ + $needs_restart = 1; + # if the calling script has a path for shared libs and there is no --environment + # parameter then the called script surely needs the variable too. +- foreach my $important_env qw(LD_LIBRARY_PATH SHLIB_PATH +- ORACLE_HOME TNS_ADMIN ORA_NLS ORA_NLS33 ORA_NLS10) { ++ foreach my $important_env (qw(LD_LIBRARY_PATH SHLIB_PATH ++ ORACLE_HOME TNS_ADMIN ORA_NLS ORA_NLS33 ORA_NLS10)) { + if ($ENV{$important_env} && ! scalar(grep { /^$important_env=/ } + keys %{$commandline{environment}})) { + $commandline{environment}->{$important_env} = $ENV{$important_env}; |