Hello community,

here is the log from the commit of package nagios-plugins-zypper for 
openSUSE:Factory checked in at 2013-02-02 19:33:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nagios-plugins-zypper (Old)
 and      /work/SRC/openSUSE:Factory/.nagios-plugins-zypper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nagios-plugins-zypper", Maintainer is "[email protected]"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/nagios-plugins-zypper/nagios-plugins-zypper.changes  
    2013-01-20 08:05:53.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.nagios-plugins-zypper.new/nagios-plugins-zypper.changes
 2013-02-02 19:33:36.000000000 +0100
@@ -1,0 +2,11 @@
+Fri Feb  1 16:18:24 UTC 2013 - [email protected]
+
+- update to 1.45:
+  + use /usr/sbin/zypp-refresh if it exists 
+
+-------------------------------------------------------------------
+Thu Jan 24 11:53:47 UTC 2013 - [email protected]
+
+- include abstractions for rpm and ssl
+
+-------------------------------------------------------------------

New:
----
  apparmor-abstractions-rpm
  apparmor-abstractions-ssl

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nagios-plugins-zypper.spec ++++++
--- /var/tmp/diff_new_pack.R6rrkZ/_old  2013-02-02 19:33:37.000000000 +0100
+++ /var/tmp/diff_new_pack.R6rrkZ/_new  2013-02-02 19:33:37.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,6 +63,8 @@
 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
@@ -76,6 +80,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.R6rrkZ/_old  2013-02-02 19:33:37.000000000 +0100
+++ /var/tmp/diff_new_pack.R6rrkZ/_new  2013-02-02 19:33:37.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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to