Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package monitoring-plugins-rsync for
openSUSE:Factory checked in at 2022-12-20 20:20:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-rsync (Old)
and /work/SRC/openSUSE:Factory/.monitoring-plugins-rsync.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins-rsync"
Tue Dec 20 20:20:31 2022 rev:3 rq:1043787 version:1.02
Changes:
--------
---
/work/SRC/openSUSE:Factory/monitoring-plugins-rsync/monitoring-plugins-rsync.changes
2014-08-01 14:34:37.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.monitoring-plugins-rsync.new.1835/monitoring-plugins-rsync.changes
2022-12-20 20:21:11.790111542 +0100
@@ -1,0 +2,8 @@
+Thu Dec 1 17:28:14 CET 2022 - [email protected]
+
+- add patch monitoring-plugins-rsync-option_binary.patch
+ allow to specify path to rsync via option -b or -binary
+ to be able to use the /usr/bin/rsync-ssl wrapper
+ (leave PATH variable alone to not break the wrapper)
+
+-------------------------------------------------------------------
New:
----
monitoring-plugins-rsync-option_binary.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ monitoring-plugins-rsync.spec ++++++
--- /var/tmp/diff_new_pack.lvfOzZ/_old 2022-12-20 20:21:12.254114085 +0100
+++ /var/tmp/diff_new_pack.lvfOzZ/_new 2022-12-20 20:21:12.266114150 +0100
@@ -1,7 +1,7 @@
#
# spec file for package monitoring-plugins-rsync
#
-# Copyright (c) 2012-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,22 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: monitoring-plugins-rsync
Summary: Check rsync servers availability
-License: GPL-2.0+
+License: GPL-2.0-or-later
Group: System/Monitoring
Version: 1.02
Release: 0
-Url:
https://www.monitoringexchange.org/inventory/Check-Plugins/Network/check_rsync
+URL:
https://www.monitoringexchange.org/inventory/Check-Plugins/Network/check_rsync
Source0: check_rsync
Source1: COPYING
Patch1: monitoring-plugins-rsync-timeout.patch
Patch2: monitoring-plugins-rsync-hidden_modules.patch
+Patch3: monitoring-plugins-rsync-option_binary.patch
BuildRequires: nagios-rpm-macros
%if 0%{?suse_version} > 1010
# nagios can execute the script with embedded perl
@@ -53,6 +54,7 @@
install -m644 %{SOURCE0} .
%patch1 -p0
%patch2 -p0
+%patch3 -p0
%build
++++++ monitoring-plugins-rsync-option_binary.patch ++++++
--- ./check_rsync 2022/12/01 15:42:58 1.1
+++ ./check_rsync 2022/12/01 15:51:40
@@ -24,7 +24,7 @@
use strict;
use Getopt::Long;
-use vars qw($opt_H $opt_p $opt_m);
+use vars qw($opt_H $opt_p $opt_b $opt_m);
use vars qw($PROGNAME %RSYNCMSG $cpid);
use lib "/usr/local/nagios/libexec";
use utils qw($TIMEOUT %ERRORS);
@@ -30,7 +30,7 @@
use utils qw($TIMEOUT %ERRORS);
$PROGNAME = "check_rsync";
-$ENV{'PATH'}='';
+# $ENV{'PATH'}='';
$ENV{'BASH_ENV'}='';
$ENV{'ENV'}='';
%RSYNCMSG = (
@@ -60,15 +60,17 @@
GetOptions (
"H=s" => \$opt_H, "hostname=s" => \$opt_H,
"p=s" => \$opt_p, "port=s" => \$opt_p,
- "m=s@" => \$opt_m, "module=s@" => \$opt_m );
+ "b=s" => \$opt_b, "binary=s" => \$opt_b,
+ "m=s@" => \$opt_m, "module=s@" => \$opt_m);
unless (defined($opt_H)){
- print "Usage: $PROGNAME -H <host> [-p <port>] [-m
<module>[,<user>,<password>] [-m <module>[,<user>,<password>]...]]\n";
+ print "Usage: $PROGNAME -H <host> [-p <port>] [ -b <path_to_rsync> ] [-m
<module>[,<user>,<password>] [-m <module>[,<user>,<password>]...]]\n";
exit $ERRORS{'UNKNOWN'};
}
my $host = $opt_H;
my $port = defined($opt_p) ? $opt_p : 873;
+my $binary = defined($opt_b) ? $opt_b : '/usr/bin/rsync';
my $verbose = 0; # Not implemented as argument yet
# Create an array for each -m arguments and store them in @modules
@@ -100,8 +102,15 @@
alarm($TIMEOUT);
+my $option_cont = "--contimeout=$TIMEOUT";
+my $option_port = "--port=$port";
+if ($binary =~ /rsync-ssl/) {
+ $option_cont = '';
+ $option_port = '' if $port eq 873;
+}
+
# Get a list of modules to see if rsync is up
-my $command = "/usr/bin/rsync --timeout=$TIMEOUT --contimeout=$TIMEOUT
--port=$port $source";
+my $command = "$binary --timeout=$TIMEOUT $option_cont $option_port $source";
# Workaround to kill stale rsync processes
$cpid = open(RSYNC, "$command|") or report_error("Unable to execute rsync:
$!");
@@ -142,7 +151,7 @@
undef $error_code;
undef $result;
# Get a file listing of the root of the module
- $command = "/usr/bin/rsync --port=$port $source";
+ $command = "$binary $option_port $source";
# Workaround to kill stale rsync processes
$cpid = open(RSYNC, "$command|") or report_error("Unable to execute rsync:
$!");