From 56f2f155baf000d95b58123006d63532da877a97d164779f2db67486c39c406e Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Thu, 13 Apr 2023 15:29:20 +0000 Subject: [PATCH] - added monitoring-plugins-2.3.3-check_icmp.patch Simple patch to avoid compiler errors with latest gcc - monitoring-plugins-2.1.1-check_log_-_quoting.patch renamed to monitoring-plugins-2.3.3-check_log_-_quoting.patch OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=104 --- ...ng-plugins-2.1.1-check_log_-_quoting.patch | 90 ------------------- monitoring-plugins-2.3.3-check_icmp.patch | 12 +++ monitoring-plugins.changes | 8 ++ monitoring-plugins.spec | 3 + 4 files changed, 23 insertions(+), 90 deletions(-) delete mode 100644 monitoring-plugins-2.1.1-check_log_-_quoting.patch create mode 100644 monitoring-plugins-2.3.3-check_icmp.patch diff --git a/monitoring-plugins-2.1.1-check_log_-_quoting.patch b/monitoring-plugins-2.1.1-check_log_-_quoting.patch deleted file mode 100644 index 1a8a8ba..0000000 --- a/monitoring-plugins-2.1.1-check_log_-_quoting.patch +++ /dev/null @@ -1,90 +0,0 @@ -Index: monitoring-plugins-2.3.1/plugins-scripts/check_log.sh -=================================================================== ---- monitoring-plugins-2.3.1.orig/plugins-scripts/check_log.sh -+++ monitoring-plugins-2.3.1/plugins-scripts/check_log.sh -@@ -115,27 +115,27 @@ while test -n "$1"; do - exit $STATE_OK - ;; - --filename) -- logfile=$2 -+ logfile="$2" - shift - ;; - -F) -- logfile=$2 -+ logfile="$2" - shift - ;; - --oldlog) -- oldlog=$2 -+ oldlog="$2" - shift - ;; - -O) -- oldlog=$2 -+ oldlog="$2" - shift - ;; - --query) -- query=$2 -+ query="$2" - shift - ;; - -q) -- query=$2 -+ query="$2" - shift - ;; - -x) -@@ -157,10 +157,10 @@ done - - # If the source log file doesn't exist, exit - --if [ ! -e $logfile ]; then -+if [ ! -e "$logfile" ]; then - echo "Log check error: Log file $logfile does not exist!" - exit $STATE_UNKNOWN --elif [ ! -r $logfile ] ; then -+elif [ ! -r "$logfile" ] ; then - echo "Log check error: Log file $logfile is not readable!" - exit $STATE_UNKNOWN - fi -@@ -169,8 +169,8 @@ fi - # we're running this test, so copy the original log file over to - # the old diff file and exit - --if [ ! -e $oldlog ]; then -- cat $logfile > $oldlog -+if [ ! -e "$oldlog" ]; then -+ cat "$logfile" > "$oldlog" - echo "Log check data initialized..." - exit $STATE_OK - fi -@@ -184,20 +184,20 @@ if [ -x /bin/mktemp ]; then - else - tempdiff=`/bin/date '+%H%M%S'` - tempdiff="/tmp/check_log.${tempdiff}" -- touch $tempdiff -- chmod 600 $tempdiff -+ touch "$tempdiff" -+ chmod 600 "$tempdiff" - fi - --diff $logfile $oldlog | grep -v "^>" > $tempdiff -+diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff" - - # Count the number of matching log entries we have --count=`grep -c "$query" $tempdiff` -+count=`grep -c "$query" "$tempdiff"` - - # Get the last matching entry in the diff file --lastentry=`grep "$query" $tempdiff | tail -1` -+lastentry=`grep "$query" "$tempdiff" | tail -1` - --rm -f $tempdiff --cat $logfile > $oldlog -+rm -f "$tempdiff" -+cat "$logfile" > "$oldlog" - - if [ "$count" = "0" ]; then # no matches, exit with no error - echo "Log check ok - 0 pattern matches found" diff --git a/monitoring-plugins-2.3.3-check_icmp.patch b/monitoring-plugins-2.3.3-check_icmp.patch new file mode 100644 index 0000000..ba2c457 --- /dev/null +++ b/monitoring-plugins-2.3.3-check_icmp.patch @@ -0,0 +1,12 @@ +Index: monitoring-plugins-2.3.3/plugins-root/check_icmp.c +=================================================================== +--- monitoring-plugins-2.3.3.orig/plugins-root/check_icmp.c ++++ monitoring-plugins-2.3.3/plugins-root/check_icmp.c +@@ -1446,6 +1446,7 @@ get_ip_address(const char *ifname) + #else + errno = 0; + crash("Cannot get interface IP address on this platform."); ++ return INADDR_NONE; + #endif + } + diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes index 153400d..6358596 100644 --- a/monitoring-plugins.changes +++ b/monitoring-plugins.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 13 15:27:12 UTC 2023 - Lars Vogdt - 2.3.3 + +- added monitoring-plugins-2.3.3-check_icmp.patch + Simple patch to avoid compiler errors with latest gcc + ------------------------------------------------------------------- Wed Apr 12 20:54:19 UTC 2023 - Archie Cobbs @@ -10,6 +16,8 @@ Wed Apr 12 17:35:53 UTC 2023 - Lars Vogdt - 2.3.3 - finally remove monitoring-plugins-1.4.6-Makefile_-_no_chown.patch: obsoleted by monitoring-plugins-2.3.3-root-plugins-Makefile_-_no_chown.patch +- monitoring-plugins-2.1.1-check_log_-_quoting.patch renamed to + monitoring-plugins-2.3.3-check_log_-_quoting.patch ------------------------------------------------------------------- Thu Feb 2 17:11:00 UTC 2023 - Lars Vogdt - 2.3.3 diff --git a/monitoring-plugins.spec b/monitoring-plugins.spec index 32c4a0e..9743dc9 100644 --- a/monitoring-plugins.spec +++ b/monitoring-plugins.spec @@ -83,6 +83,8 @@ Patch128: monitoring-plugins-2.3.3-check_disk_on_btrfs.patch Patch129: monitoring-plugins-2.3.3-check_by_ssh.patch # PATCH-FIX-UPSTREAM - see https://github.com/monitoring-plugins/monitoring-plugins/pull/1862 Patch130: monitoring-plugins-2.3.3-check_http-proxy.patch +# PATCH-FIX-UPSTREAM - simple fix for compiler error regarding no return value in function get_ip_address +Patch 131: monitoring-plugins-2.3.3-check_icmp.patch BuildRequires: bind-utils BuildRequires: dhcp-devel BuildRequires: fping @@ -1135,6 +1137,7 @@ done %patch128 -p1 %patch129 -p1 %patch130 -p1 +%patch131 -p1 find -type f -exec chmod 644 {} + %build