commit nagios-plugins-zypper for openSUSE:12.3
Hello community, here is the log from the commit of package nagios-plugins-zypper for openSUSE:12.3 checked in at 2013-02-26 15:11:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.3/nagios-plugins-zypper (Old) and /work/SRC/openSUSE:12.3/.nagios-plugins-zypper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nagios-plugins-zypper", Maintainer is "lrupp@suse.com" Changes: -------- --- /work/SRC/openSUSE:12.3/nagios-plugins-zypper/nagios-plugins-zypper.changes 2013-01-31 01:27:58.000000000 +0100 +++ /work/SRC/openSUSE:12.3/.nagios-plugins-zypper.new/nagios-plugins-zypper.changes 2013-02-26 15:11:17.000000000 +0100 @@ -1,0 +2,16 @@ +Sat Feb 23 11:43:30 UTC 2013 - lars@linux-schulserver.de + +- fix path names to grep, awk and gawk for distributions > 12.1 + +------------------------------------------------------------------- +Fri Feb 1 16:18:24 UTC 2013 - lars@linux-schulserver.de + +- update to 1.45: + + use /usr/sbin/zypp-refresh if it exists + +------------------------------------------------------------------- +Thu Jan 24 11:53:47 UTC 2013 - lars@linux-schulserver.de + +- include abstractions for rpm and ssl + +------------------------------------------------------------------- New: ---- apparmor-abstractions-rpm apparmor-abstractions-ssl ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios-plugins-zypper.spec ++++++ --- /var/tmp/diff_new_pack.c9Hcb7/_old 2013-02-26 15:11:17.000000000 +0100 +++ /var/tmp/diff_new_pack.c9Hcb7/_new 2013-02-26 15:11:17.000000000 +0100 @@ -20,12 +20,14 @@ Summary: Nagios plugin for checking software updates License: BSD-4-Clause Group: System/Monitoring -Version: 1.44 +Version: 1.45 Release: 0 Url: http://en.opensuse.org/Nagios-plugins-zypper Source0: check_zypper.pl Source1: usr.lib.nagios.plugins.check_zypper Source2: apparmor-abstractions-zypp +Source3: apparmor-abstractions-ssl +Source4: apparmor-abstractions-rpm Requires: gawk Requires: grep Requires: rpm @@ -61,10 +63,18 @@ install -D -m755 %{SOURCE0} %buildroot/%{nagios_plugindir}/check_zypper %if 0%{?suse_version} > 01100 install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_zypper +install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/apparmor.d/abstractions/rpm +install -D -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/apparmor.d/abstractions/ssl install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/apparmor.d/abstractions/zypp %else install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor/profiles/extras/usr.lib.nagios.plugins.check_zypper %endif +echo 0%{?suse_version} +%if 0%{?suse_version} > 01210 +sed -i "s|/bin/grep|%{_bindir}/grep|g; \ + s|/bin/gawk|%{_bindir}/gawk|g; \ + s|/bin/awk|%{_bindir}/awk|g;" %buildroot/%{nagios_plugindir}/check_zypper %{buildroot}%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_zypper +%endif %clean rm -rf %buildroot @@ -76,6 +86,8 @@ %dir %{nagios_plugindir} %dir %{_sysconfdir}/apparmor.d %dir %{_sysconfdir}/apparmor.d/abstractions +%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/rpm +%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/ssl %config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/zypp %if 0%{?suse_version} > 01100 %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_zypper ++++++ apparmor-abstractions-rpm ++++++ /proc/filesystems r, /etc/rpm/ r, /etc/rpm/macros* r, /var/lib/rpm/** rlk, ++++++ apparmor-abstractions-ssl ++++++ /etc/ssl/openssl.cnf r, /etc/ssl/certs/ r, /etc/ssl/certs/* r, /proc/sys/crypto/fips_enabled r, ++++++ check_zypper.pl ++++++ --- /var/tmp/diff_new_pack.c9Hcb7/_old 2013-02-26 15:11:17.000000000 +0100 +++ /var/tmp/diff_new_pack.c9Hcb7/_new 2013-02-26 15:11:17.000000000 +0100 @@ -50,7 +50,7 @@ # constants $PROGNAME = "check_zypper"; -$VERSION = '1.44'; +$VERSION = '1.45'; $DEBUG = 0; # variables @@ -58,6 +58,7 @@ our $zypper = '/usr/bin/zypper'; our $zypperopt = '--non-interactive --no-gpg-checks xml-updates'; our $sudo = '/usr/bin/sudo'; +our $zypp_refresh = '/usr/sbin/zypp-refresh'; our $refresh_wrapper = '/usr/sbin/zypp-refresh-wrapper'; our $use_sudo = 'unset LANG; '; our $releasefile = '/etc/SuSE-release'; @@ -234,8 +235,25 @@ sub refresh_zypper($) { my ($dist) = @_; - if ( -x "$refresh_wrapper" ) { - print STDERR "Trying: $refresh_wrapper 2>/dev/null 1>&2\n" if ($DEBUG); + if ( -x "$zypp_refresh" ) { + print STDERR "INFO: Trying $zypp_refresh 2>&1\n" if ($DEBUG); + if ( open( WRAPPER, "$refresh_wrapper 2>&1 |" ) ) { + my @wrapper_out = <WRAPPER>; + close(WRAPPER); + foreach my $line (@wrapper_out) { + chomp $line; + print STDERR "LINE: $line\n" if ($DEBUG); + # error handling + return ( "ERROR: " . xml_re_escape($line), $ERRORS{'CRITICAL'} ) if ( $line =~ /Could not refresh repository.*/ ); + return ( "ERROR: " . xml_re_escape($line), $ERRORS{'CRITICAL'} ) if ( $line =~ /There are no enabled repositories defined.*/ ); + return ( "ERROR: " . xml_re_escape($line), $ERRORS{'CRITICAL'} ) if ( $line =~ /Digest verification failed.*/ ); + return ( "ERROR: " . xml_re_escape($line), $ERRORS{'CRITICAL'} ) if ( $line =~ /refusing file.*wrong digest.*/ ); + } + return ( "Refresh OK", $ERRORS{'OK'} ); + } + } + elsif ( -x "$refresh_wrapper" ) { + print STDERR "INFO: Trying $refresh_wrapper 2>/dev/null 1>&2\n" if ($DEBUG); if ( open( WRAPPER, "$refresh_wrapper 2>&1 |" ) ) { my @wrapper_out = <WRAPPER>; close(WRAPPER); @@ -252,7 +270,7 @@ } } elsif ( -x "$zypper" ) { - print STDERR "Trying: $sudo $zypper ref 2>/dev/null 1>&2\n" if ($DEBUG); + print STDERR "INFO: Trying $sudo $zypper ref 2>/dev/null 1>&2\n" if ($DEBUG); if ( ( ( "$dist->{'name'}" eq "openSUSE" ) && ( "$dist->{'version'}" eq "10.2" ) ) || ( ( "$dist->{'name'}" eq "SLE" ) && ( "$dist->{'version'}" eq "10" ) ) ) { my $res = system("$sudo $zypper ref 2>/dev/null 1>&2"); -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de