Hello community, here is the log from the commit of package monitoring-plugins-repomd for openSUSE:Factory checked in at 2019-04-30 13:05:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-repomd (Old) and /work/SRC/openSUSE:Factory/.monitoring-plugins-repomd.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins-repomd" Tue Apr 30 13:05:21 2019 rev:5 rq:698934 version:2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/monitoring-plugins-repomd/monitoring-plugins-repomd.changes 2019-04-22 12:26:47.392952478 +0200 +++ /work/SRC/openSUSE:Factory/.monitoring-plugins-repomd.new.5536/monitoring-plugins-repomd.changes 2019-04-30 13:05:23.429935115 +0200 @@ -1,0 +2,10 @@ +Sun Apr 28 15:27:58 UTC 2019 - l...@linux-schulserver.de - 2.1 + +- update to 2.1: + + be a bit more robust if curl fails or produces unknown output +- include abstractions/bash and abstractions/openssl in the apparmor + profile to avoid misleading DENIED messages in audit log +- path for grep, cat and mktemp were moved to /usr/bin - use sed + to adjust the script in spec + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ monitoring-plugins-repomd.spec ++++++ --- /var/tmp/diff_new_pack.SrLvqG/_old 2019-04-30 13:05:24.105934503 +0200 +++ /var/tmp/diff_new_pack.SrLvqG/_new 2019-04-30 13:05:24.109934500 +0200 @@ -20,7 +20,7 @@ Summary: Plugin to check freshness of repomd.xml file License: BSD-3-Clause Group: System/Monitoring -Version: 2.0 +Version: 2.1 Release: 0 Url: http://en.opensuse.org/%{name} Source0: check_repomd @@ -32,6 +32,9 @@ Recommends: apparmor-parser BuildRequires: monitoring-plugins-common BuildRequires: nagios-rpm-macros +%if 0%{?suse_version} >= 1500 +BuildRequires: sed +%endif Provides: nagios-plugins-repomd = %{version}-%{release} Obsoletes: nagios-plugins-repomd < %{version}-%{release} BuildArch: noarch @@ -52,6 +55,11 @@ %install install -D -m755 %{SOURCE0} %buildroot/%{nagios_plugindir}/check_repomd install -D -m644 %{SOURCE1} %buildroot/%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_repomd +%if 0%{?suse_version} >= 1500 +sed -i "s|/bin/grep|%{_bindir}/grep|; \ + s|/bin/cat|%{_bindir}/cat|; \ + s|/bin/mktemp|%{_bindir}/mktemp|" %buildroot/%{nagios_plugindir}/check_repomd +%endif %clean rm -rf %buildroot ++++++ check_repomd ++++++ --- /var/tmp/diff_new_pack.SrLvqG/_old 2019-04-30 13:05:24.137934475 +0200 +++ /var/tmp/diff_new_pack.SrLvqG/_new 2019-04-30 13:05:24.137934475 +0200 @@ -31,7 +31,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -VERSION="2.0" +VERSION="2.1" DEBUG=0 DAYS=30 @@ -40,11 +40,12 @@ CAT='/bin/cat' CUT='/usr/bin/cut' MKTEMP='/bin/mktemp' +UTILS='/usr/lib/nagios/plugins/utils.sh' -if [ -r '/usr/lib/nagios/plugins/utils.sh' ]; then -. /usr/lib/nagios/plugins/utils.sh +if [ -r "$UTILS" ]; then +. "$UTILS" else - cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: could not read /usr/lib/nagios/plugins/utils.sh" + cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: could not read $UTILS" fi function print_help(){ @@ -104,9 +105,14 @@ RESULTFILE=$($MKTEMP /tmp/check_repomd-XXXXXX) $CURL -s $URL -o "$RESULTFILE" 2>&1 +CURL_EXIT="$?" -if $GREP -q "Error 404" "$RESULTFILE" ; then - cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: $URL not found" +if [ x"$CURL_EXIT" != "x0" ]; then + cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: curl returned with error code: $CURL_EXIT" +fi + +if ! $GREP -q "revision" "$RESULTFILE"; then + cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: needed tag 'revision' not found in output of $URL" fi REVISION=$($GREP revision "$RESULTFILE" | $CUT -d "<" -f2 | $CUT -d ">" -f2) ++++++ usr.lib.nagios.plugins.check_repomd ++++++ --- /var/tmp/diff_new_pack.SrLvqG/_old 2019-04-30 13:05:24.157934456 +0200 +++ /var/tmp/diff_new_pack.SrLvqG/_new 2019-04-30 13:05:24.157934456 +0200 @@ -2,8 +2,10 @@ /usr/lib/nagios/plugins/check_repomd { #include <abstractions/base> + #include <abstractions/bash> #include <abstractions/consoles> #include <abstractions/nameservice> + #include <abstractions/openssl> network inet,