File nagios-plugins-zypper.spec of Package nagios-plugins-zypper

#
# spec file for package nagios-plugins-zypper (Version 0.9)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           nagios-plugins-zypper
Summary:        Nagios plugin for checking software updates
Version:        0.9
Release:        1
Url:            http://en.opensuse.org/nagios-plugins-zypper
License:        BSD 4-Clause
Group:          System/Monitoring
Source0:        check_zypper.pl
%if 0%{?suse_version} > 1010
# nagios can execute the script with embedded perl
Recommends:     perl 
%endif
Requires:       zypper
# nagios-plugins is needed to get Utils.pm
Requires:       nagios-plugins
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define		    libexecdir %_prefix/lib/nagios/plugins

%description
This plugin checks for software updates on systems that use package
management systems based on the zypper command found in openSUSE.

It checks for security, recommended and optional patches and also for
optional package updates.

You can define the status by patch category. Use a commata to list more
than one category to a state.

If you like to know the names of available patches and packages, use
the "-v" option.



Authors:
--------
    Lars Vogdt

%prep

%build

%install
install -D -m755 %{SOURCE0} %buildroot/%libexecdir/check_zypper

%clean
rm -rf %buildroot

%files 
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %_prefix/lib/nagios
%dir %libexecdir
%libexecdir/check_zypper

%changelog
* Thu Nov 27 2008 lrupp@suse.de
- update to 0.9:
  - better whitespace handling for SLE10 based products
* Thu Oct 23 2008 lrupp@suse.de
- update to 0.8.1:
  + enhance the documentation (help text)
* Wed Oct 22 2008 lrupp@suse.de
- update to 0.8:
  + return UNKNOWN if zypper prints "Error message"
  + return UNKNOWN if zypper is already running
* Mon Sep 29 2008 lrupp@suse.de
- update to 0.7:
  + enable verbose output for SLE10 based hosts
* Wed Sep 17 2008 lrupp@suse.de
- update to 0.6:
  + added error handling if update source is not available
  + switch to BSD License
* Thu Sep 11 2008 lrupp@suse.de
- fix stupid variable clash
* Wed Sep 10 2008 lrupp@suse.de
- update to 0.5:
  + code cleanup
  + return UNKNOWN state if system doesn't support check without
  sudo rights
  + allow user to specify the release file with '-r'
* Wed Sep 03 2008 lrupp@suse.de
- update to 0.4:
  + added sudo option to call zypper via sudo
  + don't print packagelist if packagelist is empty
* Tue Sep 02 2008 lrupp@suse.de
- update to 0.3:
  + now outputs also the names of patches and packages, if selected
  + improved help output
- truncate the trailing .pl so the script follows the nagios
  plugins scheme
* Mon Jul 28 2008 lrupp@suse.de
- ignore error messages: they bother the nagios parser
* Tue May 06 2008 lrupp@suse.de
- ignore host variable for now: this check only works local
* Tue Apr 15 2008 lrupp@suse.de
- work also with 10.2 and (not tested:) SLES10-SP1
- accept arguments -w and -c
* Mon Apr 14 2008 lrupp@suse.de
- initial version 0.1
openSUSE Build Service is sponsored by