|
|
6661928 |
Name: pnp4nagios
|
|
|
7fcedaf |
Version: 0.4.14
|
|
|
2123454 |
Release: 4%{?dist}
|
|
|
6661928 |
Summary: Nagios performance data analysis tool
|
|
|
6661928 |
|
|
|
6661928 |
Group: Applications/System
|
|
|
6661928 |
License: GPLv2
|
|
|
6661928 |
URL: http://www.pnp4nagios.org/
|
|
|
6661928 |
Source0: http://downloads.sourceforge.net/%{name}/pnp-%{version}.tar.gz
|
|
|
6661928 |
Source1: pnp4nagios.logrotate.conf
|
|
|
6661928 |
Source2: pnp4nagios-npcd.sysvinit
|
|
|
6661928 |
Source3: pnp4nagios-README.fedora
|
|
|
7fcedaf |
Patch1: pnp4nagios-0.4.14-change_broker_install_location.patch
|
|
|
c53df6c |
Patch2: pnp4nagios-0.4.14-verify_pnp_config.in_rev654.patch
|
|
|
859d468 |
Patch3: pnp4nagios-php53.patch
|
|
|
6661928 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
6661928 |
|
|
|
7fcedaf |
BuildRequires: rrdtool-perl
|
|
|
6661928 |
Requires: nagios
|
|
|
7fcedaf |
Requires: rrdtool-perl
|
|
|
6661928 |
Requires: php-gd
|
|
|
6661928 |
Requires(post): chkconfig
|
|
|
6661928 |
Requires(preun): chkconfig
|
|
|
6661928 |
Requires(preun): initscripts
|
|
|
6661928 |
Requires(postun): initscripts
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%description
|
|
|
6661928 |
PNP is an addon to nagios which analyzes performance data provided by plugins
|
|
|
6661928 |
and stores them automatically into RRD-databases.
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%prep
|
|
|
6661928 |
%setup -q -n pnp-%{version}
|
|
|
c53df6c |
|
|
|
c53df6c |
# Move broker to a better location
|
|
|
7fcedaf |
%patch1 -p0
|
|
|
c53df6c |
|
|
|
c53df6c |
# Update verify_pnp_config script for bugfixes
|
|
|
c53df6c |
%patch2 -p1
|
|
|
c53df6c |
|
|
|
859d468 |
# Fix PHP deprecated warnings with php 5.3
|
|
|
859d468 |
%patch3 -p0
|
|
|
859d468 |
|
|
|
c53df6c |
# Fix file encoding and end of line
|
|
|
c53df6c |
pushd contrib
|
|
|
c53df6c |
iconv -f iso8859-1 -t utf-8 verify_pnp_config.txt > verify_pnp_config.txt.utf8
|
|
|
c53df6c |
touch -r verify_pnp_config.txt verify_pnp_config.txt.utf8
|
|
|
c53df6c |
mv -f verify_pnp_config.txt.utf8 verify_pnp_config.txt
|
|
|
c53df6c |
sed -i -e "s/\r//" verify_pnp_config.txt
|
|
|
c53df6c |
popd
|
|
|
c53df6c |
|
|
|
6661928 |
cp -p %{SOURCE3} README.fedora
|
|
|
6661928 |
sed -i -e 's/^INSTALL_OPTS="-o $nagios_user -g $nagios_grp"/INSTALL_OPTS=""/' \
|
|
|
6661928 |
configure
|
|
|
6661928 |
sed -i -e '/^\t$(MAKE) strip-post-install$/d' src/Makefile.in
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%build
|
|
|
6661928 |
%configure --bindir=%{_sbindir}/ \
|
|
|
6661928 |
--libexecdir=%{_libexecdir}/%{name}/ \
|
|
|
6661928 |
--sysconfdir=%{_sysconfdir}/%{name}/ \
|
|
|
6661928 |
--localstatedir=%{_localstatedir}/log/%{name}/ \
|
|
|
6661928 |
--datadir=%{_datadir}/nagios/html/%{name}/ \
|
|
|
6661928 |
--datarootdir=%{_datadir}/nagios/html/%{name}/ \
|
|
|
6661928 |
--with-perfdata-dir=%{_localstatedir}/lib/%{name}/ \
|
|
|
6661928 |
--with-perfdata-spool-dir=%{_localstatedir}/spool/%{name}/
|
|
|
6661928 |
make %{?_smp_mflags} all
|
|
|
6661928 |
|
|
|
c53df6c |
# Remove unwanted file from the contrib directory
|
|
|
c53df6c |
rm contrib/verify_pnp_config.in
|
|
|
c53df6c |
|
|
|
6661928 |
|
|
|
6661928 |
%install
|
|
|
6661928 |
rm -rf $RPM_BUILD_ROOT
|
|
|
6661928 |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
6661928 |
make install-config DESTDIR=$RPM_BUILD_ROOT
|
|
|
6661928 |
find $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios -name *-sample -exec rename "-sample" "" {} ';'
|
|
|
6661928 |
sed -i -e 's|/usr/libexec/process_perfdata.pl|/usr/libexec/pnp4nagios/process_perfdata.pl|' \
|
|
|
6661928 |
-e 's|^log_type = syslog|log_type = file|' \
|
|
|
6661928 |
$RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/npcd.cfg
|
|
|
6661928 |
|
|
|
6661928 |
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
|
|
6661928 |
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
|
|
|
6661928 |
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
|
|
|
6661928 |
install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pnp4nagios
|
|
|
6661928 |
install -Dp -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/npcd
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%clean
|
|
|
6661928 |
rm -rf $RPM_BUILD_ROOT
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%post
|
|
|
6661928 |
/sbin/chkconfig --add npcd
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%preun
|
|
|
6661928 |
if [ $1 = 0 ]; then
|
|
|
6661928 |
/sbin/service npcd stop >/dev/null 2>&1
|
|
|
6661928 |
/sbin/chkconfig --del npcd
|
|
|
6661928 |
fi
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%postun
|
|
|
6661928 |
if [ "$1" -ge "1" ]; then
|
|
|
6661928 |
/sbin/service npcd condrestart >/dev/null 2>&1 || :
|
|
|
6661928 |
fi
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%files
|
|
|
6661928 |
%defattr(644,root,root,755)
|
|
|
6661928 |
%doc AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README README.fedora
|
|
|
c53df6c |
%doc README.npcd THANKS TODO contrib/
|
|
|
6661928 |
%dir %{_sysconfdir}/pnp4nagios
|
|
|
6661928 |
%config(noreplace) %{_sysconfdir}/pnp4nagios/*
|
|
|
6661928 |
%config(noreplace) %{_sysconfdir}/logrotate.d/pnp4nagios
|
|
|
6661928 |
%attr(755,root,root) %{_initrddir}/npcd
|
|
|
6661928 |
%attr(755,root,root) %{_sbindir}/npcd
|
|
|
7fcedaf |
%{_libdir}/nagios/brokers/npcdmod.o
|
|
|
715f8b8 |
%dir %{_libexecdir}/pnp4nagios
|
|
|
6661928 |
%attr(755,root,root) %{_libexecdir}/pnp4nagios/process_perfdata.pl
|
|
Robert M. Albrecht |
91b507e |
%attr(755,root,root) %{_libexecdir}/pnp4nagios/check_pnp_rrds.pl
|
|
|
6661928 |
%attr(755,nagios,nagios) %{_localstatedir}/lib/%{name}
|
|
|
6661928 |
%attr(755,nagios,nagios) %{_localstatedir}/log/%{name}
|
|
|
6661928 |
%attr(755,nagios,nagios) %{_localstatedir}/spool/%{name}
|
|
|
6661928 |
%{_datadir}/nagios/html/pnp4nagios
|
|
|
6661928 |
|
|
|
6661928 |
|
|
|
6661928 |
%changelog
|
|
|
2123454 |
* Mon Sep 27 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-4
|
|
|
2123454 |
- Bump release for rebuild.
|
|
|
2123454 |
|
|
|
859d468 |
* Sun Jul 18 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-3
|
|
|
859d468 |
- Add patch to fix PHP deprecated warnings with PHP 5.3.
|
|
|
859d468 |
(Patch from Jan Ondrej - RHBZ#572851)
|
|
|
859d468 |
|
|
|
c53df6c |
* Tue Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-2
|
|
|
c53df6c |
- Ship contrib directory as doc.
|
|
|
c53df6c |
|
|
|
7fcedaf |
* Tue Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-1
|
|
|
c53df6c |
- Update to 0.4.14 (RHBZ#518069).
|
|
|
7fcedaf |
- Fix typo in README.fedora (RHBZ#490664).
|
|
|
7fcedaf |
- Move npcdmod.o to a better place.
|
|
|
7fcedaf |
- BR: rrdtool-perl
|
|
|
7fcedaf |
|
|
|
afe0ebb |
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-4
|
|
|
afe0ebb |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
afe0ebb |
|
|
|
9a6fbb2 |
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-3
|
|
|
9a6fbb2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
9a6fbb2 |
|
|
|
715f8b8 |
* Thu Dec 4 2008 Michael Schwendt <mschwendt@fedoraproject.org> 0.4.12-2
|
|
|
715f8b8 |
- Include /usr/libexec/pnp4nagios directory.
|
|
|
715f8b8 |
|
|
Robert M. Albrecht |
91b507e |
* Mon Oct 21 2008 Robert M. Albrecht <romal@gmx.de> 0.4.12-1
|
|
Robert M. Albrecht |
91b507e |
- Upstream released 0.4.12
|
|
Robert M. Albrecht |
91b507e |
|
|
|
f193ee1 |
* Tue Sep 02 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-3
|
|
|
f193ee1 |
- Fix logrotate conf (RHBZ#460861).
|
|
|
f193ee1 |
|
|
|
428d7af |
* Fri Jul 18 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-2
|
|
|
428d7af |
- Fix typo in logrotate conf.
|
|
|
428d7af |
|
|
|
6661928 |
* Wed Jul 09 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-1
|
|
|
6661928 |
- Update to 0.4.10.
|
|
|
6661928 |
|
|
|
6661928 |
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-3
|
|
|
6661928 |
- Fix npcd init script to use /etc/pnp4nagios.
|
|
|
6661928 |
|
|
|
6661928 |
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-2
|
|
|
6661928 |
- Install npcd unstripped to let rpm do it.
|
|
|
6661928 |
|
|
|
6661928 |
* Sat May 24 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-1
|
|
|
6661928 |
- Update to 0.4.9.
|
|
|
6661928 |
- Rename to pnp4nagios to match other distros packages.
|
|
|
6661928 |
|
|
|
6661928 |
* Mon Apr 14 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-5
|
|
|
6661928 |
- Log to file by default.
|
|
|
6661928 |
- Kill pnpsender man page.
|
|
|
6661928 |
|
|
|
6661928 |
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-4
|
|
|
6661928 |
- Install inside of nagios html dir.
|
|
|
6661928 |
|
|
|
6661928 |
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-3
|
|
|
6661928 |
- Provide properly named config files.
|
|
|
6661928 |
- Add missing Requires:.
|
|
|
6661928 |
- Add a logrotate conf file.
|
|
|
6661928 |
|
|
|
6661928 |
* Fri Apr 04 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-2
|
|
|
6661928 |
- Add an initscript for npcd.
|
|
|
6661928 |
|
|
|
6661928 |
* Wed Mar 19 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-1
|
|
|
6661928 |
- Initial build.
|