2013-07-16 12:41:22 +02:00
|
|
|
%define debug_package %{nil}
|
2013-07-16 16:34:04 +02:00
|
|
|
%define plugin check_package_updates
|
2013-07-16 12:41:22 +02:00
|
|
|
|
|
|
|
Summary: A Nagios plugin to check operating system updates
|
|
|
|
Name: nagios-okplugin-%{plugin}
|
2013-09-13 15:27:49 +02:00
|
|
|
Version: 0.0.7
|
2013-07-16 12:41:22 +02:00
|
|
|
Release: 1%{?dist}
|
|
|
|
License: GPLv3+
|
|
|
|
Group: Applications/System
|
|
|
|
URL: https://github.com/opinkerfi/nagios-plugins/tree/master/%{plugin}
|
|
|
|
Source0: https://github.com/opinkerfi/nagios-plugins/tree/master/%{plugin}/releases/%{name}-%{version}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
Packager: Tomas Edwardsson <tommi@opensource.is>
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: nrpe
|
|
|
|
Requires: pynag
|
|
|
|
Requires: PackageKit
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
Checks updates via PackageKit and can notify on various different situations
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
install -D -p -m 0755 %{plugin} %{buildroot}%{_libdir}/nagios/plugins/%{plugin}
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/nrpe.d
|
|
|
|
sed "s^/usr/lib64^%{_libdir}^g" nrpe.d/%{plugin}.cfg > %{buildroot}%{_sysconfdir}/nrpe.d/%{plugin}.cfg
|
2013-09-13 12:48:02 +02:00
|
|
|
# Temporary fix for selinux
|
|
|
|
chcon system_u:object_r:nagios_unconfined_plugin_exec_t:s0 %{plugin} %{buildroot}%{_libdir}/nagios/plugins/%{plugin}
|
2013-07-16 12:41:22 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
2013-07-17 00:24:47 +02:00
|
|
|
%post
|
|
|
|
/sbin/service nrpe status &> /dev/null && /sbin/service nrpe reload || :
|
|
|
|
|
2013-07-16 12:41:22 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README.md
|
|
|
|
%{_libdir}/nagios/plugins/*
|
|
|
|
%config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg
|
|
|
|
|
|
|
|
%changelog
|
2013-09-13 15:27:49 +02:00
|
|
|
* Fri Sep 13 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.7-1
|
|
|
|
- check_package_updates - minor refactor (palli@opensource.is)
|
|
|
|
- check_package_updates - fix inconsistent tab/space (palli@opensource.is)
|
|
|
|
- Removed obsoletes and thresholds (tommi@tommi.org)
|
|
|
|
- Removed Draft, should be working pretty good (tommi@tommi.org)
|
|
|
|
- Added --legacy to default since that is the default format (tommi@tommi.org)
|
|
|
|
- Added nrpe reload since moving from check_yum needs it (tommi@tommi.org)
|
|
|
|
- Added obsolete for okplugin check_updates (tommi@tommi.org)
|
|
|
|
|
2013-07-17 00:09:50 +02:00
|
|
|
* Tue Jul 16 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.6-1
|
|
|
|
- Fix failure on a fully patched system (tommi@tommi.org)
|
|
|
|
|
2013-07-16 21:43:19 +02:00
|
|
|
* Tue Jul 16 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.5-1
|
|
|
|
- Known types always have a metric, even if 0 (tommi@tommi.org)
|
|
|
|
|
2013-07-16 19:43:28 +02:00
|
|
|
* Tue Jul 16 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.4-1
|
|
|
|
- new package built with tito
|
|
|
|
|
2013-07-16 14:14:07 +02:00
|
|
|
* Tue Jul 16 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.3-1
|
|
|
|
- Plugin should conflict with check_yum (tommi@tommi.org)
|
|
|
|
- No obsolete (tommi@tommi.org)
|
|
|
|
- Obsolete nagios-okplugin-check_yum (tommi@tommi.org)
|
|
|
|
|
2013-07-16 12:44:20 +02:00
|
|
|
* Tue Jul 16 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.2-1
|
|
|
|
- new package built with tito
|
|
|
|
|
2013-07-16 12:41:22 +02:00
|
|
|
* Wed Jul 16 2013 Tomas Edwardsson <tommi@opensource.is> 0.0.1-1
|
|
|
|
- Initial Packaging
|