6661928
Name:           pnp4nagios
Jan ONDREJ (SAL) 56dbda1
Version:        0.6.22
Jan ONDREJ (SAL) 130e25c
Release:        2%{?dist}
6661928
Summary:        Nagios performance data analysis tool
6661928
6661928
Group:          Applications/System
6661928
License:        GPLv2
6661928
URL:            http://www.pnp4nagios.org/
Jan ONDREJ (SAL) 0cd17e2
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
6661928
Source1:        pnp4nagios.logrotate.conf
6661928
Source2:        pnp4nagios-npcd.sysvinit
6661928
Source3:        pnp4nagios-README.fedora
Jan ONDREJ (SAL) c2dfa15
Patch1:         pnp4nagios-httpd24.patch
Jan ONDREJ (SAL) 130e25c
Patch10:        pnp4nagios-cb925073edeeb97eb4ce61a86cdafccc9b87f9bb.patch
Jan ONDREJ (SAL) 130e25c
Patch11:        pnp4nagios-e4a19768a5c5e5b1276caf3dd5bb721a540ec014.patch
6661928
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6661928
Jan ONDREJ (SAL) 18e8b71
BuildRequires:  autoconf, automake, libtool
7fcedaf
BuildRequires:  rrdtool-perl
Jan ONDREJ (SAL) cc05f15
BuildRequires:  perl(Time::HiRes)
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
%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
Jan ONDREJ (SAL) 0cd17e2
%setup -q
Jan ONDREJ (SAL) c2dfa15
%patch1 -p1
Jan ONDREJ (SAL) 130e25c
%patch10 -p1
Jan ONDREJ (SAL) 130e25c
%patch11 -p1
Jan ONDREJ (SAL) 18e8b71
autoreconf
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
Jan ONDREJ (SAL) 6b53da8
%configure --bindir=%{_sbindir} \
Jan ONDREJ (SAL) 6b53da8
           --libexecdir=%{_libexecdir}/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --sysconfdir=%{_sysconfdir}/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --localstatedir=%{_localstatedir}/log/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --datadir=%{_datadir}/nagios/html/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --datarootdir=%{_datadir}/nagios/html/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --with-perfdata-dir=%{_localstatedir}/lib/%{name} \
Jan ONDREJ (SAL) 6b53da8
           --with-perfdata-spool-dir=%{_localstatedir}/spool/%{name}
6661928
make %{?_smp_mflags} all
6661928
6661928
6661928
%install
6661928
rm -rf $RPM_BUILD_ROOT
6661928
make install DESTDIR=$RPM_BUILD_ROOT 
6661928
make install-config DESTDIR=$RPM_BUILD_ROOT 
Jan ONDREJ (SAL) 6fb8293
# remove -sample from filename suffix
Jan ONDREJ (SAL) bd96175
for i in $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample \
Jan ONDREJ (SAL) bd96175
         $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*/*-sample
Jan ONDREJ (SAL) bd96175
do
Jan ONDREJ (SAL) 18d361a
  mv ${i} ${i%%-sample}
Jan ONDREJ (SAL) 6fb8293
done
Jan ONDREJ (SAL) bd96175
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php.*
Jan ONDREJ (SAL) bd96175
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config_local.php
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
Jan ONDREJ (SAL) bd96175
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
Jan ONDREJ (SAL) bd96175
sed 's|/usr/local/nagios/etc/htpasswd.users|/etc/nagios/passwd|' \
Jan ONDREJ (SAL) bd96175
   sample-config/httpd.conf \
Jan ONDREJ (SAL) bd96175
   > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
Jan ONDREJ (SAL) 0cd17e2
mkdir -p $RPM_BUILD_ROOT%{_libdir}/nagios/brokers
Jan ONDREJ (SAL) bd96175
mv $RPM_BUILD_ROOT%{_libdir}/npcdmod.o \
Jan ONDREJ (SAL) 0cd17e2
   $RPM_BUILD_ROOT%{_libdir}/nagios/brokers/npcdmod.o
Jan ONDREJ (SAL) bd96175
mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}/
Jan ONDREJ (SAL) 0ae1546
Jan ONDREJ (SAL) 0ae1546
# Move kohana to pnp4nagios, there is another kohana in fedore/EPEL,
Jan ONDREJ (SAL) 0ae1546
# which can be installed.
Jan ONDREJ (SAL) 0ae1546
mv $RPM_BUILD_ROOT%{_libdir}/kohana \
Jan ONDREJ (SAL) 0ae1546
  $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/kohana
Jan ONDREJ (SAL) 0ae1546
sed -i 's|%{_libdir}/kohana|%{_datadir}/nagios/html/%{name}/kohana|' \
Jan ONDREJ (SAL) 0ae1546
  $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/index.php
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)
Jan ONDREJ (SAL) 0cd17e2
%doc AUTHORS ChangeLog COPYING INSTALL README README.fedora
Jan ONDREJ (SAL) 0cd17e2
%doc THANKS contrib/
6661928
%dir %{_sysconfdir}/pnp4nagios
Jan ONDREJ (SAL) c734c44
%config(noreplace) %attr(0640,root,nagios) %{_sysconfdir}/pnp4nagios/process_perfdata.cfg
6661928
%config(noreplace) %{_sysconfdir}/pnp4nagios/*
Jan ONDREJ (SAL) bd96175
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
Jan ONDREJ (SAL) bd96175
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
6661928
%attr(755,root,root) %{_initrddir}/npcd
6661928
%attr(755,root,root) %{_sbindir}/npcd
7fcedaf
%{_libdir}/nagios/brokers/npcdmod.o
Jan ONDREJ (SAL) bd96175
%dir %{_libexecdir}/%{name}
Jan ONDREJ (SAL) bd96175
%attr(755,root,root) %{_libexecdir}/%{name}/*
6661928
%attr(755,nagios,nagios) %{_localstatedir}/lib/%{name}
6661928
%attr(755,nagios,nagios) %{_localstatedir}/log/%{name}
6661928
%attr(755,nagios,nagios) %{_localstatedir}/spool/%{name}
Jan ONDREJ (SAL) bd96175
%{_datadir}/nagios/html/%{name}
Jan ONDREJ (SAL) 0ae1546
# Remove install check script
Jan ONDREJ (SAL) 0ae1546
# as it is not required if all dependencies are met.
Jan ONDREJ (SAL) 0ae1546
%exclude %{_datadir}/nagios/html/%{name}/install.php
Jan ONDREJ (SAL) bd96175
%{_mandir}/man8/*
Jan ONDREJ (SAL) 0ae1546
# This is a different version of Kohana like in Fedora/EPEL.
Jan ONDREJ (SAL) 0ae1546
# Needed for pnp4nagios web interface to work.
Jan ONDREJ (SAL) 0ae1546
%{_datadir}/nagios/html/%{name}/kohana
6661928
6661928
%changelog
Jan ONDREJ (SAL) 130e25c
* Fri Jul 04 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-2
Jan ONDREJ (SAL) 130e25c
- Fix two URL Cross-Site Scripting Vulnerabilities (bz#1115983)
Jan ONDREJ (SAL) 130e25c
Jan ONDREJ (SAL) 56dbda1
* Thu Jul 03 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-1
Jan ONDREJ (SAL) 130e25c
- Update to upstream (fixes XSS flaw in an error page - bz#1115770)
Jan ONDREJ (SAL) 56dbda1
3ecea7e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-5
3ecea7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3ecea7e
6660e8a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-4
6660e8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
6660e8a
ddd93a3
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.6.21-3
ddd93a3
- Perl 5.18 rebuild
ddd93a3
Jan ONDREJ (SAL) c2dfa15
* Wed Jul 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-2
Jan ONDREJ (SAL) c2dfa15
- Broken configuration for httpd 2.4 fixed (bz#871465)
Jan ONDREJ (SAL) c2dfa15
- fixed dates in changelog items
Jan ONDREJ (SAL) c2dfa15
Jan ONDREJ (SAL) 80adc07
* Tue Jun 04 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-1
Jan ONDREJ (SAL) 80adc07
- update to upstream
Jan ONDREJ (SAL) 80adc07
Jan ONDREJ (SAL) 18e8b71
* Sat Mar 23 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-2
Jan ONDREJ (SAL) 18e8b71
- added autoreconf to prep section (bz#926359)
Jan ONDREJ (SAL) 18e8b71
Jan ONDREJ (SAL) 0850017
* Sun Mar 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-1
Jan ONDREJ (SAL) 0850017
- update to upstream
Jan ONDREJ (SAL) 0850017
Jan ONDREJ (SAL) 0850017
* Sun Feb 17 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-2
Jan ONDREJ (SAL) 0850017
- updated hostextinfo URL for pnp4nagios 0.6
Jan ONDREJ (SAL) 0850017
- spec file cleanup
Jan ONDREJ (SAL) 0850017
Jan ONDREJ (SAL) 9a96ca8
* Sat Feb 16 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-1
Jan ONDREJ (SAL) 54af6ae
- update to upstream
Jan ONDREJ (SAL) 54af6ae
Jan ONDREJ (SAL) c734c44
* Mon Sep 03 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-4
Jan ONDREJ (SAL) c734c44
- CVE-2012-3457 - process_perfdata.cfg world readable
Jan ONDREJ (SAL) c734c44
Jan ONDREJ (SAL) 6b53da8
* Thu Apr 05 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-2
Jan ONDREJ (SAL) 6b53da8
- Removed double slashes fro directories (BZ#810212).
Jan ONDREJ (SAL) 6b53da8
Jan ONDREJ (SAL) a5bb012
* Thu Nov 24 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-1
Jan ONDREJ (SAL) a5bb012
- update to upstream
Jan ONDREJ (SAL) a5bb012
Jan ONDREJ (SAL) cc05f15
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-4
Jan ONDREJ (SAL) 0ae1546
- add back kohana, it's a different version
Jan ONDREJ (SAL) cc05f15
- added BR: perl(Time::HiRes)
Jan ONDREJ (SAL) 0ae1546
Jan ONDREJ (SAL) 0ae1546
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-2
Jan ONDREJ (SAL) 0ae1546
- exclude kohana sources and require php-Kohana package
Jan ONDREJ (SAL) 0ae1546
Jan ONDREJ (SAL) bd96175
* Wed Nov 16 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-1
Jan ONDREJ (SAL) bd96175
- update to upstream
Jan ONDREJ (SAL) bd96175
- remove /usr/share/nagios/html/pnp4nagios/install.php
Jan ONDREJ (SAL) bd96175
- added /etc/httpd/conf.d/pnp4nagios.conf
Jan ONDREJ (SAL) bd96175
- removed -sample suffix from rest of sample files
Jan ONDREJ (SAL) bd96175
Jan ONDREJ (SAL) 18d361a
* Tue Oct 11 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-3
Jan ONDREJ (SAL) 18d361a
- Updated renaming of "-sample" config files.
Jan ONDREJ (SAL) 6fb8293
Jan ONDREJ (SAL) 0cd17e2
* Wed Sep 14 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-1
Jan ONDREJ (SAL) 0cd17e2
- Update to 0.6.1.
Jan ONDREJ (SAL) 0cd17e2
Jan ONDREJ (SAL) 313c57f
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-7
Jan ONDREJ (SAL) 313c57f
- added perl-Time-HiRes to build requires
Jan ONDREJ (SAL) 313c57f
Jan ONDREJ (SAL) 02ba063
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-6
Jan ONDREJ (SAL) 02ba063
- rebuilt for EPEL-6
Jan ONDREJ (SAL) 02ba063
1c3d641
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.14-5
1c3d641
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1c3d641
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
Jan ONDREJ (SAL) c2dfa15
* Thu Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-2
c53df6c
- Ship contrib directory as doc.
c53df6c
Jan ONDREJ (SAL) c2dfa15
* Thu 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
Jan ONDREJ (SAL) c2dfa15
* Tue 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.