Hello community, here is the log from the commit of package monitoring-plugins-zypper for openSUSE:Factory checked in at 2015-08-28 08:27:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-zypper (Old) and /work/SRC/openSUSE:Factory/.monitoring-plugins-zypper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins-zypper" Changes: -------- --- /work/SRC/openSUSE:Factory/monitoring-plugins-zypper/monitoring-plugins-zypper.changes 2015-03-11 09:58:58.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.monitoring-plugins-zypper.new/monitoring-plugins-zypper.changes 2015-08-28 08:27:52.000000000 +0200 @@ -1,0 +2,11 @@ +Thu Aug 20 12:20:47 UTC 2015 - l...@linux-schulserver.de + +- also include the local changes file in some subprofiles, so people + can overwrite the settings there (bnc #914493) +- Update to 1.83: + + Tumbleweed is a rolling release - so asume it is not outdated + at any time. Need to be clarified if we should check actively if + the installed Tumbleweed is outdated or not. Maybe we can use + /etc/products.d/baseproduct to check for end-of-life information? + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ check_zypper.pl ++++++ --- /var/tmp/diff_new_pack.cpDlsM/_old 2015-08-28 08:27:52.000000000 +0200 +++ /var/tmp/diff_new_pack.cpDlsM/_new 2015-08-28 08:27:52.000000000 +0200 @@ -4,7 +4,8 @@ # check_zypper - nagios plugin # # Copyright (C) 2008-2010, Novell, Inc. -# Copyright (C) 2011-2013, SUSE Linux Products GmbH +# Copyright (C) 2011-2014, SUSE Linux Products GmbH +# Copyright (C) 2015, SUSE Linux GmbH # Author: Lars Vogdt # # All rights reserved. @@ -35,8 +36,6 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -# $Id$ -# use strict; use warnings; @@ -50,7 +49,7 @@ # constants $PROGNAME = "check_zypper"; -$VERSION = '1.82'; +$VERSION = '1.83'; $DEBUG = 0; # variables @@ -62,6 +61,7 @@ our $refresh_wrapper = '/usr/sbin/zypp-refresh-wrapper'; our $use_sudo = 'unset LANG; '; our $releasefile = '/etc/SuSE-release'; +our $productfile = '/etc/products.d/baseproduct'; our $rpm = '/bin/rpm'; our $awk = '/bin/awk'; our $grep = '/bin/grep'; @@ -89,6 +89,7 @@ our %supported_release = ( 'openSUSE' => [ '12.3', '13.1', '13.2', '13.3' ], 'SLE' => [ '10.4', '11.3', '11.4', '12.0', '12.1' ], + 'Tumbleweed' => [ '2015*' ], ); $opt_w = 'recommended,optional,unsupported,local_package'; $opt_c = 'security'; @@ -136,6 +137,9 @@ elsif (/^openSUSE/){ $dist{'name'} = 'openSUSE'; } + elsif (/^CODENAME\s+=\s+Tumbleweed/){ + $dist{'name'} = 'Tumbleweed'; + } if (/^VERSION/) { my ($version) = $_ =~ m/VERSION = (.*)/; $dist{'version'}=trim($version); @@ -149,6 +153,23 @@ return ( \%dist ); } +sub endoflife($){ + my ($file) = @_; + my $eol='1970-01-01'; + if (-r "$file"){ + open(PRODFILE, "<$file") || warn("Could not open $file\n"); + while (<PRODFILE>){ + chomp; + if (/<endoflife>(.*)<\/endoflife>/){ + $eol=$1; + } + } + } + my ($d, $m, $y) = (localtime(time()))[3,4,5]; + my $year=1900+$y; + print STDERR "INFO: Current: $year-$m-$d; End of life: $eol\n" if ($DEBUG); +} + sub print_usage () { print "This plugin checks for software updates on systems that use package\n"; print "management systems based on the zypper command found in openSUSE.\n\n"; @@ -733,7 +754,12 @@ } else { my ( $ret_str, $error ) = check($dist); - if ( grep {/\Q$dist->{'name'}\E/} keys %supported_release ) { + if ($dist->{'name'} eq "Tumbleweed"){ + print STDERR "INFO: found Tumbleweed $version_release in \%supported_release\n"; + print STDERR "INFO: without parsing http://download.opensuse.org/tumbleweed/repo/oss/media.1/media I can not say more\n"; + print STDERR "INFO: at the moment. So a FIXME for the script - but until then, don't be evil and say OK.\n"; + } + elsif ( grep {/\Q$dist->{'name'}\E/} keys %supported_release ) { print STDERR "INFO: found $dist->{'name'} - checking supportstatus\n" if ($DEBUG); if ( grep {/\Q$version_release\E/} @{ $supported_release{$dist->{'name'}} } ) { print STDERR "INFO: found $version_release for $dist->{'name'} in \%supported_release - OK\n" if ($DEBUG); ++++++ usr.lib.nagios.plugins.check_zypper ++++++ --- /var/tmp/diff_new_pack.cpDlsM/_old 2015-08-28 08:27:52.000000000 +0200 +++ /var/tmp/diff_new_pack.cpDlsM/_new 2015-08-28 08:27:52.000000000 +0200 @@ -28,6 +28,9 @@ profile zypp-refresh-wrapper { #include <abstractions/base> #include <abstractions/nameservice> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> capability setuid, capability setgid, /usr/sbin/zypp-refresh-wrapper rmix, @@ -39,13 +42,13 @@ #include <abstractions/consoles> #include <abstractions/user-tmp> #include <abstractions/zypp> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> /var/log/zypp-refresh.log w, /usr/sbin/zypp-refresh rmix, - # if you have a local repository mirrored, please add the path to the direcory in the file - # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper - /bin/cp rix, /bin/bash rix, /usr/bin/rpmdb2solv rix, @@ -60,6 +63,9 @@ #include <abstractions/consoles> #include <abstractions/user-tmp> #include <abstractions/nameservice> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> /usr/bin/repo2solv.sh rmix, /usr/bin/repomdxml2solv rix, @@ -90,6 +96,9 @@ } profile gpg { #include <abstractions/base> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> capability ipc_lock, /usr/bin/gpg2 rmix, /proc/sys/crypto/fips_enabled r, @@ -105,6 +114,9 @@ #include <abstractions/zypp> #include <abstractions/consoles> #include <abstractions/nameservice> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> /bin/bash rix, /usr/bin/rpmdb2solv rix, @@ -121,6 +133,9 @@ #include <abstractions/base> #include <abstractions/rpm> #include <abstractions/nameservice> + # if you have additional changes, please add them in the file + # /etc/apparmor.d/local/usr.lib.nagios.plugins.check_zypper + #include <local/usr.lib.nagios.plugins.check_zypper.zypp_refresh> /bin/rpm rmix, }