97f04d
Name: cacti
24951d
Version: 0.8.6i
b958e1
Release: 5%{?dist}
97f04d
Summary: An rrd based graphing tool
97f04d
97f04d
Group: Applications/System
97f04d
License: GPL
97f04d
URL: http://www.cacti.net/
97f04d
Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
97f04d
Source1: cacti-httpd.conf
97f04d
Source2: cacti.logrotate
97f04d
Source3: cacti.README.Fedora
24951d
24951d
Patch1: cacti-0.8.6h-dbcfg.patch
b958e1
Patch2: http://www.cacti.net/downloads/patches/0.8.6i/import_template_argument_space_removal.patch
b958e1
Patch3: http://www.cacti.net/downloads/patches/0.8.6i/dec06-vulnerability-scripts-0.8.6i.patch
b958e1
Patch4: http://www.cacti.net/downloads/patches/0.8.6i/dec06-vulnerability-poller-0.8.6i.patch
b958e1
Patch5: http://www.cacti.net/downloads/patches/0.8.6i/poller_output_remainder.patch
24951d
97f04d
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
97f04d
97f04d
Requires: php, php-mysql, mysql, httpd, rrdtool, net-snmp, php-snmp
97f04d
Requires(pre): %{_sbindir}/useradd
97f04d
Requires(postun): /sbin/service 
97f04d
BuildArch: noarch
97f04d
97f04d
%description
97f04d
Cacti is a complete frontend to RRDTool. It stores all of the
97f04d
necessary information to create graphs and populate them with
97f04d
data in a MySQL database. The frontend is completely PHP
97f04d
driven. Along with being able to maintain graphs, data
97f04d
sources, and round robin archives in a database, Cacti also
97f04d
handles the data gathering. There is SNMP support for those
97f04d
used to creating traffic graphs with MRTG.
97f04d
97f04d
%prep
97f04d
%setup -q
97f04d
%patch1 -p0
b958e1
%patch2 -p1
b958e1
%patch3 -p1
b958e1
%patch4 -p1
b958e1
%patch5 -p1
97f04d
b0aa1d
echo "#*/5 * * * *	cacti	%{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron
97f04d
97f04d
%install
97f04d
rm -rf %{buildroot}
97f04d
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}
97f04d
%{__install} -d -m 0755 %{buildroot}/%{_docdir}/%{name}-%{version}
97f04d
%{__install} -d -m 0755 %{buildroot}/%{_datadir}/%{name}/
97f04d
%{__install} -m 0644 *.php %{buildroot}/%{_datadir}/%{name}/
97f04d
%{__install} -d -m 0775 log/ %{buildroot}/%{_localstatedir}/log/%{name}/
97f04d
%{__install} -m 0664 log/* %{buildroot}/%{_localstatedir}/log/%{name}/
97f04d
%{__install} -d -m 0755 rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/rra/
24951d
%{__install} -d -m 0755 scripts/ %{buildroot}/%{_localstatedir}/lib//%{name}/scripts/
97f04d
%{__install} -m 0755 scripts/* %{buildroot}/%{_localstatedir}/lib/%{name}/scripts/
97f04d
%{__install} -D -m 0644 cacti.cron %{buildroot}/%{_sysconfdir}/cron.d/cacti
97f04d
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/cacti.conf
97f04d
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/cacti
97f04d
%{__cp} -a images/ include/ install/ lib/ resource/ %{buildroot}%{_datadir}/%{name}
97f04d
%{__cp} %{SOURCE3} ./docs/README.cacti
97f04d
%{__cp} -a docs/ %{buildroot}/%{_docdir}/%{name}-%{version}
97f04d
%{__mv} %{buildroot}/%{_datadir}/%{name}/include/db.php %{buildroot}/%{_sysconfdir}/%{name}/db.php
97f04d
%{__chmod} +x %{buildroot}/%{_datadir}/%{name}/cmd.php %{buildroot}/%{_datadir}/%{name}/poller.php
97f04d
ln -s %{_sysconfdir}/%{name}/db.php %{buildroot}/%{_datadir}/%{name}/include/db.php
97f04d
ln -s %{_localstatedir}/lib/%{name}/rra %{buildroot}/%{_datadir}/%{name}/
97f04d
ln -s %{_localstatedir}/lib/%{name}/scripts %{buildroot}/%{_datadir}/%{name}/
97f04d
ln -s %{_localstatedir}/log/%{name}/ %{buildroot}/%{_datadir}/%{name}/log
24951d
ln -s %{_datadir}/%{name}/lib %{buildroot}/%{_localstatedir}/lib/%{name}/
24951d
ln -s %{_datadir}/%{name}/include %{buildroot}/%{_localstatedir}/lib/%{name}/
97f04d
97f04d
%clean
97f04d
rm -rf %{buildroot}
97f04d
97f04d
%pre
97f04d
%{_sbindir}/useradd -d %{_datadir}/%{name} -r -s /sbin/nologin cacti 2> /dev/null || :
97f04d
97f04d
%post
97f04d
if [ $1 == 1 ]; then
97f04d
	/sbin/service httpd condrestart > /dev/null 2>&1 || :
97f04d
fi
97f04d
97f04d
%postun
97f04d
/sbin/service httpd condrestart > /dev/null 2>&1 || :
97f04d
97f04d
%files
97f04d
%defattr(-,root,root,-)
97f04d
%dir %{_sysconfdir}/%{name}
97f04d
%dir %{_datadir}/%{name}
97f04d
%dir %{_localstatedir}/lib/%{name}
97f04d
%dir %{_localstatedir}/lib/%{name}/scripts
97f04d
%doc docs/ README LICENSE cacti.sql
97f04d
%config(noreplace) %{_sysconfdir}/cron.d/cacti
97f04d
%config(noreplace) %{_sysconfdir}/httpd/conf.d/cacti.conf
97f04d
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
97f04d
%attr(0660,cacti,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.php
97f04d
%{_datadir}/%{name}/*.php
97f04d
%{_datadir}/%{name}/images/
97f04d
%{_datadir}/%{name}/include/
97f04d
%{_datadir}/%{name}/install/
97f04d
%{_datadir}/%{name}/lib/
97f04d
%{_datadir}/%{name}/log
97f04d
%{_datadir}/%{name}/resource/
97f04d
%{_datadir}/%{name}/rra
97f04d
%{_datadir}/%{name}/scripts
97f04d
%{_localstatedir}/lib/%{name}/scripts/*[^p]
97f04d
%attr(-,cacti,apache) %{_localstatedir}/log/%{name}/
97f04d
%attr(-,cacti,root) %{_localstatedir}/lib/%{name}/rra/
97f04d
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/scripts/*php
24951d
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/include
24951d
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib
97f04d
97f04d
%changelog
b958e1
* Fri Jan 12 2007 Mike McGrath <imlinux@gmail.com> - 0.8.6i-5
b958e1
- Added 4 upstream patches
b958e1
- Fix for BZ 222410
b958e1
5bec4d
* Thu Nov 09 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6i-4
5bec4d
- Patch now includes 
5bec4d
105d9c
* Thu Sep 07 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6i-3
105d9c
- Upstream released new version
105d9c
24951d
* Thu Sep 07 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6i-2
24951d
- Upstream released new version
24951d
6c1de9
* Thu Sep 07 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-7
6c1de9
- Mass rebuild
6c1de9
b0aa1d
* Wed Feb 22 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-6
b0aa1d
- Disabled Cron job by default
b0aa1d
ed5236
* Tue Feb 14 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-5
ed5236
- Rebuild for Fedora Extras 5
ed5236
97f04d
* Mon Feb 6 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-4
97f04d
- Fixed some scriptlets to always return 0
97f04d
- Fixed extra '/' in logrotate
97f04d
- Added README.Fedora
97f04d
97f04d
* Wed Jan 14 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-3
97f04d
- Fixed device filter clear issue
97f04d
- Fixed invalid SQL graph generation statement
97f04d
- Fixed php warning for empty set non-existant rrd file
97f04d
- Added MySQL 5.x 'strict mode' compatibility
97f04d
97f04d
* Mon Jan 09 2006 Mike McGrath <imlinux@gmail.com> - 0.8.6h-1
97f04d
- MySQL 5.x support
97f04d
- IPv6 support to lib/ping.php
97f04d
- Command line scripts for copying users, reindxing and rebuilding cache
97f04d
- Many Bug fixes
97f04d
97f04d
* Tue Dec 18 2005 Mike McGrath <imlinux@gmail.com> - 0.8.6g-7
97f04d
- Separated database configs from config.php
97f04d
- Fixed the 'short_open_tag" syntax error
97f04d
- Fixed graph zoom graph bug
97f04d
- Fixed SNMP auth bug
97f04d
- Re-enables MIB file parsing in poller
97f04d
- Created a Fedora frendly version of the RPM
97f04d
97f04d
* Wed Sep 7 2005 Ian Berry <iberry@raxnet.net> - 0.8.6g-1
97f04d
- Updated to release 0.8.6g.
97f04d
97f04d
* Mon Jul 1 2005 Ian Berry <iberry@raxnet.net> - 0.8.6f-1
97f04d
- Updated to release 0.8.6f.
97f04d
97f04d
* Mon Jun 20 2005 Ian Berry <iberry@raxnet.net> - 0.8.6e-1
97f04d
- Updated to release 0.8.6e.
97f04d
97f04d
* Wed Apr 26 2005 Ian Berry <iberry@raxnet.net> - 0.8.6d-1
97f04d
- Updated to release 0.8.6d.
97f04d
97f04d
* Wed Dec 12 2004 Ian Berry <iberry@raxnet.net> - 0.8.6c-1
97f04d
- Updated to release 0.8.6c.
97f04d
97f04d
* Wed Oct 5 2004 Ian Berry <iberry@raxnet.net> - 0.8.6b-1
97f04d
- Updated to release 0.8.6b.
97f04d
97f04d
* Sun Oct 3 2004 Ian Berry <iberry@raxnet.net> - 0.8.6a-1
97f04d
- Updated to release 0.8.6a.
97f04d
97f04d
* Sat Sep 11 2004 Ian Berry <iberry@raxnet.net> - 0.8.6-1
97f04d
- Updated to release 0.8.6.
97f04d
- Broke cactid into its own package.
97f04d
97f04d
* Thu Apr 4 2004 Ian Berry <iberry@raxnet.net> - 0.8.5a-1
97f04d
- Initial package.
97f04d