fe32fcf
Name: cacti
2cbd9a5
Version: 1.1.1
c0e9da5
Release: 1%{?dist}
fe32fcf
Summary: An rrd based graphing tool
fe32fcf
License: GPLv2+
fe32fcf
URL: http://www.cacti.net/
fe32fcf
Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
fe32fcf
Source1: cacti-httpd.conf
fe32fcf
Source2: cacti.logrotate
fe32fcf
Source3: cacti.README.fedora
2cc8ad8
Source4: %{name}.cron
fe32fcf
7e5b074
Requires: php, php-gd, php-ldap, php-mbstring, php-mysql, php-pdo, php-process, php-snmp, php-xml
c0e9da5
Requires: mysql 
c0e9da5
Requires: httpd
c0e9da5
Requires: rrdtool
c0e9da5
Requires: net-snmp, net-snmp-utils
fe32fcf
Requires: crontabs
bd9af1c
Requires(pre): %{_sbindir}/useradd
bd9af1c
Requires(postun): /sbin/service
7e5b074
Provides: bundled(js-jquery) = 3.1.0
fe32fcf
BuildArch: noarch
fe32fcf
fe32fcf
# This macro was added in Fedora 20. Use the old version if it's undefined
fe32fcf
# on older Fedoras and RHELs.
fe32fcf
# https://fedoraproject.org/wiki/Changes/UnversionedDocdirs
fe32fcf
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
fe32fcf
fe32fcf
%description
fe32fcf
Cacti is a complete frontend to RRDTool. It stores all of the
fe32fcf
necessary information to create graphs and populate them with
fe32fcf
data in a MySQL database. The frontend is completely PHP
fe32fcf
driven.
fe32fcf
fe32fcf
%prep
2cc8ad8
%setup -q
fe32fcf
fe32fcf
%build
fe32fcf
# cacti's build is a noop
fe32fcf
fe32fcf
%install
2cc8ad8
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}
2cc8ad8
%{__install} -d -m 0755 %{buildroot}/%{_pkgdocdir}
2cc8ad8
%{__install} -d -m 0755 %{buildroot}/%{_datadir}/%{name}/
2cc8ad8
%{__install} -d -m 0755 cache/ %{buildroot}/%{_localstatedir}/lib/%{name}/cache
2cc8ad8
%{__install} -d -m 0755 cli/ %{buildroot}/%{_localstatedir}/lib/%{name}/cli
2cc8ad8
%{__install} -d -m 0775 log/ %{buildroot}/%{_localstatedir}/log/%{name}/
2cc8ad8
%{__install} -d -m 0755 rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/rra/
2cc8ad8
%{__install} -d -m 0755 scripts/ %{buildroot}/%{_localstatedir}/lib/%{name}/scripts/
2cc8ad8
%{__mv} *.php %{buildroot}/%{_datadir}/%{name}/
2cc8ad8
%{__mv} cache/ %{buildroot}/%{_localstatedir}/lib/%{name}/
2cc8ad8
%{__mv} cli/ %{buildroot}/%{_localstatedir}/lib/%{name}/
7e5b074
%{__mv} log/%{name}.log %{buildroot}/%{_localstatedir}/log/%{name}/%{name}.log
2cc8ad8
%{__mv} rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/
2cc8ad8
%{__mv} scripts/ %{buildroot}/%{_localstatedir}/lib/%{name}/
2cc8ad8
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
2cc8ad8
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/cacti.conf
2cc8ad8
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/cacti
fe32fcf
fe32fcf
# The su parameter will trip up older logrotate versions.
fe32fcf
# Conditionally remove it here.
fe32fcf
%if 0%{?rhel} && 0%{?rhel} <= 6
fe32fcf
  sed -i %{buildroot}/%{_sysconfdir}/logrotate.d/cacti -e '/^[ \t]*su /d'
fe32fcf
%endif
fe32fcf
2cc8ad8
%{__cp} -ar formats/ images/ include/ install/ lib/ locales/ mibs/ plugins/ resource/ %{buildroot}%{_datadir}/%{name}
2cc8ad8
%{__cp} %{SOURCE3} ./docs/README.fedora
2cc8ad8
%{__cp} -a docs/ %{buildroot}/%{_pkgdocdir}
2cc8ad8
%{__mv} %{buildroot}/%{_datadir}/%{name}/include/config.php %{buildroot}/%{_sysconfdir}/%{name}/db.php
2cc8ad8
%{__chmod} +x %{buildroot}/%{_datadir}/%{name}/cmd.php %{buildroot}/%{_datadir}/%{name}/poller.php
2cc8ad8
ln -s %{_localstatedir}/lib/%{name}/cache %{buildroot}/%{_datadir}/%{name}/
2cc8ad8
ln -s %{_localstatedir}/lib/%{name}/cli %{buildroot}/%{_datadir}/%{name}/
fe32fcf
ln -s %{_sysconfdir}/%{name}/db.php %{buildroot}/%{_datadir}/%{name}/include/config.php
fe32fcf
ln -s %{_localstatedir}/lib/%{name}/rra %{buildroot}/%{_datadir}/%{name}/
fe32fcf
ln -s %{_localstatedir}/lib/%{name}/scripts %{buildroot}/%{_datadir}/%{name}/
fe32fcf
ln -s %{_localstatedir}/log/%{name}/ %{buildroot}/%{_datadir}/%{name}/log
fe32fcf
ln -s %{_datadir}/%{name}/lib %{buildroot}/%{_localstatedir}/lib/%{name}/
fe32fcf
ln -s %{_datadir}/%{name}/include %{buildroot}/%{_localstatedir}/lib/%{name}/
fe32fcf
fe32fcf
%pre
fe32fcf
useradd -d %{_datadir}/%{name} -r -s /sbin/nologin cacti 2> /dev/null || :
fe32fcf
fe32fcf
%post
bd9af1c
if [ $1 == 1 ]; then
bd9af1c
	/sbin/service httpd condrestart > /dev/null 2>&1 || :
fe32fcf
fi
fe32fcf
fe32fcf
%postun
bd9af1c
/sbin/service httpd condrestart > /dev/null 2>&1 || :
fe32fcf
fe32fcf
%files
2cc8ad8
%doc docs/ README.md cacti.sql
2cc8ad8
%license LICENSE
fe32fcf
%dir %{_sysconfdir}/%{name}
fe32fcf
%dir %{_datadir}/%{name}
fe32fcf
%dir %{_localstatedir}/lib/%{name}
fe32fcf
%dir %{_localstatedir}/lib/%{name}/cli
2cc8ad8
%dir %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/scripts
2cc8ad8
%dir %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/
7e5b074
%config(noreplace) %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/%{name}.log
fe32fcf
%config(noreplace) %{_sysconfdir}/cron.d/cacti
fe32fcf
%config(noreplace) %{_sysconfdir}/httpd/conf.d/cacti.conf
fe32fcf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
fe32fcf
%attr(0640,cacti,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.php
fe32fcf
%{_datadir}/%{name}/*.php
2cc8ad8
%{_datadir}/%{name}/cache
2cc8ad8
%{_datadir}/%{name}/cli
2cc8ad8
%{_datadir}/%{name}/formats/
fe32fcf
%{_datadir}/%{name}/images/
fe32fcf
%{_datadir}/%{name}/include/
fe32fcf
%{_datadir}/%{name}/install/
fe32fcf
%{_datadir}/%{name}/lib/
2cc8ad8
%{_datadir}/%{name}/locales/*
fe32fcf
%{_datadir}/%{name}/log
2cc8ad8
%{_datadir}/%{name}/mibs
fe32fcf
%{_datadir}/%{name}/plugins/
fe32fcf
%{_datadir}/%{name}/rra
fe32fcf
%{_datadir}/%{name}/scripts
fe32fcf
%{_localstatedir}/lib/%{name}/scripts/*[^p]
2cc8ad8
%attr(-,root,root) %{_localstatedir}/lib/%{name}/scripts/*.php
2cc8ad8
%attr(-,apache,apache) %{_datadir}/%{name}/resource/
fe32fcf
%attr(-,cacti,root) %{_localstatedir}/lib/%{name}/rra/
2cc8ad8
%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/cache/
2cc8ad8
%attr(-,root,root) %{_localstatedir}/lib/%{name}/cli/*php
2cc8ad8
%attr(-,root,root) %{_localstatedir}/lib/%{name}/cli/.htaccess
2cc8ad8
%attr(-,root,root) %{_localstatedir}/lib/%{name}/include
2cc8ad8
%attr(-,root,root) %{_localstatedir}/lib/%{name}/lib
fe32fcf
fe32fcf
%changelog
2cbd9a5
* Tue Mar 28 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.1.1-1
2cbd9a5
- Update to 1.1.1
2cbd9a5
9e5c69c
* Mon Mar 20 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.1.0-1
9e5c69c
- Update to 1.1.0
9e5c69c
c0ba0b4
* Wed Mar 15 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.6-1
c0ba0b4
- Update to 1.0.6
c0ba0b4
7e5b074
* Mon Mar 13 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.5-1
7e5b074
- Update to 1.0.5
7e5b074
- Logfile improvements
7e5b074
- Added php-gd and php-process as dependency (#1430893)
7e5b074
c0e9da5
* Mon Feb 27 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.4-1
c0e9da5
- Update to 1.0.4
c0e9da5
2cc8ad8
* Sat Feb 18 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.3-2
2cc8ad8
- Cacti 1.0.x spec file improvements
2cc8ad8
2cc8ad8
* Thu Feb 16 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.3-1
2cc8ad8
- Update to 1.0.3
2cc8ad8
2cc8ad8
* Sun Feb 12 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.2-1
2cc8ad8
- Update to 1.0.2
2cc8ad8
2cc8ad8
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.8h-4
2cc8ad8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2cc8ad8
2cc8ad8
* Wed Jan 18 2017 Morten Stevens <mstevens@fedoraproject.org> - 0.8.8h-3
2cc8ad8
- Fixes for PHP7 backported from Arch Linux (#1390770)
2cc8ad8
2cc8ad8
* Tue Jun 28 2016 Jon Ciesla <limburgher@gmail.com> - 0.8.8h-2
2cc8ad8
- php7 Requires fix.
2cc8ad8
ce2832f
* Mon May 09 2016 Morten Stevens <mstevens@fedoraproject.org> - 0.8.8h-1
ce2832f
- Update to 0.8.8h
ce2832f
- CVE-2016-3659
ce2832f
fe32fcf
* Fri Apr 15 2016 Morten Stevens <mstevens@fedoraproject.org> - 0.8.8g-1
fe32fcf
- Update to 0.8.8g
fe32fcf
- Improve spec file (#1302904)
fe32fcf
fe32fcf
* Fri Jan 29 2016 Morten Stevens <mstevens@fedoraproject.org> - 0.8.8f-2
fe32fcf
- CVE-2015-8369: SQL Injection vulnerability in graph.php
fe32fcf
- CVE-2015-8377: Fix SQL Injection vulnerability in graphs_new.php
fe32fcf
- CVE-2015-8604: Fix SQL Injection vulnerability in graphs_new.php
fe32fcf
fe32fcf
* Fri Jan 29 2016 Morten Stevens <mstevens@fedoraproject.org> - 0.8.8f-1
fe32fcf
- Update to 0.8.8f
fe32fcf
fe32fcf
* Fri Jun 27 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-7
fe32fcf
- Patches for CVE-2014-4002 Cross-site scripting vulnerability
fe32fcf
  (RHBZ #1113035)
fe32fcf
fe32fcf
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.8b-6
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
fe32fcf
fe32fcf
* Mon Apr 07 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-5
fe32fcf
- Patch for CVE-2014-2708 SQL injection issues in graph_xport.php
fe32fcf
  (RHBZ #1084258)
fe32fcf
- Patch for CVE-2014-2709 shell escaping issues in lib/rrd.php
fe32fcf
  (RHBZ #1084258)
fe32fcf
- Patch for CVE-2014-2326 stored XSS attack (RHBZ #1082122)
fe32fcf
- Patch for CVE-2014-2328 use of exec-like function calls without safety
fe32fcf
  checks allow arbitrary command execution (RHBZ #1082122)
fe32fcf
fe32fcf
* Fri Feb 07 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-4
fe32fcf
- Move cron to a separate file and require crontabs (RHBZ #947047). Thanks
fe32fcf
  Jóhann B. Guðmundsson.
fe32fcf
- Update for systemd (RHBZ #947047). Thanks Jóhann B. Guðmundsson.
fe32fcf
- Fix rpmlint warning about spaces-to-tabs
fe32fcf
fe32fcf
* Wed Sep 04 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-3
fe32fcf
- Fix comments in thumbnails (BZ #1004550)
fe32fcf
fe32fcf
* Mon Aug 26 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-2
fe32fcf
- Patch for CVE-2013-5588 and CVE-2013-5589 (BZ #1000860)
fe32fcf
fe32fcf
* Wed Aug 07 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8b-1
fe32fcf
- New upstream release (BZ #993042)
fe32fcf
fe32fcf
* Mon Jul 29 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-9
fe32fcf
- Use %%{_pkgdocdir}, per
fe32fcf
  https://fedoraproject.org/wiki/Changes/UnversionedDocdirs
fe32fcf
fe32fcf
* Sun Jul 14 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-8
fe32fcf
- Improve security description in cacti's httpd conf (RHBZ #895823)
fe32fcf
- Use improved treeview replacement patch (RHBZ #888207)
fe32fcf
- rpmlint fixes
fe32fcf
- trim RPM changelog
fe32fcf
fe32fcf
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.8a-7
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fe32fcf
fe32fcf
* Tue Jan 08 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-6
fe32fcf
- Add note to README.fedora about the default MySQL password
fe32fcf
- Remove reference to "docs/INSTALL" in README.fedora (RHBZ #893122)
fe32fcf
- Add dependency on net-snmp-utils (RHBZ #893150)
fe32fcf
fe32fcf
* Fri Jan 04 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-5
fe32fcf
- Install our README file as README.fedora
fe32fcf
fe32fcf
* Fri Jan  4 2013 Tom Callaway <spot@fedoraproject.org> - 0.8.8a-4
fe32fcf
- remove non-free treeview bits (replace with jquery future code from 0.8.9 trunk)
fe32fcf
fe32fcf
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.8a-3
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fe32fcf
fe32fcf
* Thu Jun 28 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-2
fe32fcf
- Add plugins directory (BZ #834355)
fe32fcf
- Drop Fedora 15 (EOL) from logrotate syntax adjustment
fe32fcf
fe32fcf
* Mon Apr 30 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8a-1
fe32fcf
- New upstream release (BZ #817506)
fe32fcf
- Drop upstreamed $url_path patch
fe32fcf
fe32fcf
* Wed Apr 11 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8-3
fe32fcf
- Patch $url_path to default to "/cacti/" (upstream bug 2217)
fe32fcf
fe32fcf
* Fri Apr 06 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8-2
fe32fcf
- Adjust httpd ACL conditionals to test the presence of mod_authz_core
fe32fcf
  (as discussed on fedora-devel)
fe32fcf
fe32fcf
* Wed Apr 04 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.8-1
fe32fcf
- New upstream release (BZ #809753).
fe32fcf
fe32fcf
* Mon Mar 26 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.7i-4
fe32fcf
- Adjust ACLs to support httpd 2.4.
fe32fcf
fe32fcf
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7i-3
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fe32fcf
fe32fcf
* Tue Dec 13 2011 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.7i-2
fe32fcf
- Only set "su" logrotate parameter for F16 and above.
fe32fcf
- Tweak mod_security rules.
fe32fcf
fe32fcf
* Mon Dec 12 2011 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.7i-1
fe32fcf
- New upstream release (BZ #766573).
fe32fcf
fe32fcf
* Fri Nov 11 2011 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.7h-2
fe32fcf
- block HTTP access to log and rra directories (#609856)
fe32fcf
- overrides for mod_security
fe32fcf
- set logrotate to su to cacti apache when rotating (#753079)
fe32fcf
fe32fcf
* Thu Oct 27 2011 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.8.7h-1
fe32fcf
- New upstream release.
fe32fcf
- Remove upstream'd mysql patch.
fe32fcf
fe32fcf
* Mon Aug 08 2011 Jon Ciesla <limb@jcomserv.net> - 0.8.7g-3
fe32fcf
- Patch for MySQL 5.5, BZ 728513.
fe32fcf
fe32fcf
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7g-2
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
fe32fcf
fe32fcf
* Mon Jul 12 2010 Mike McGrath <mmcgrath@redhat.com> 0.8.7g-1
fe32fcf
- Upstream released new version
fe32fcf
fe32fcf
* Mon May 24 2010 Mike McGrath <mmcgrath@redhat.com> - 0.8.7f-1
fe32fcf
- Upstream released new version
fe32fcf
- Contains security updates #595289
fe32fcf
fe32fcf
* Fri Apr 23 2010 Mike McGrath <mmcgrath@redhat.com> - 0.8.7e-4
fe32fcf
- Pulling in patches from upstream
fe32fcf
- SQL injection fix
fe32fcf
- BZ #541279
fe32fcf
fe32fcf
* Tue Dec  1 2009 Mike McGrath <mmcgrath@redhat.com> - 0.8.7e-3
fe32fcf
- Pulling in some official patches
fe32fcf
- #541279
fe32fcf
- #541962
fe32fcf
fe32fcf
* Sun Aug 16 2009 Mike McGrath <mmcgrath@redhat.com> - 0.8.7e-1
fe32fcf
- Upstream released new version
fe32fcf
fe32fcf
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7d-4
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fe32fcf
fe32fcf
* Tue Mar 31 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.8.7d-3
fe32fcf
- Fix unowned cli directory (#473631)
fe32fcf
fe32fcf
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7d-2
fe32fcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
fe32fcf
fe32fcf
* Sat Feb 21 2009 Mike McGrath <mmcgrath@redhat.com> - 0.8.7d-1
fe32fcf
- Upstream released new version
fe32fcf
fe32fcf
* Mon Jul 28 2008 Mike McGrath <mmcgrath@redhat.com> - 0.8.7b-4
fe32fcf
- Added cli directory
fe32fcf
fe32fcf
* Fri Jul 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.8.7b-3
fe32fcf
- fix my own mistake in the license tag
fe32fcf
fe32fcf
* Tue Jul 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.8.7b-2
fe32fcf
- fix license tag
fe32fcf
fe32fcf
* Thu Feb 14 2008 Mike McGrath <mmcgrath@redhat.com> - 0.8.7b-1
fe32fcf
- Upstream released new version
fe32fcf
fe32fcf
* Fri Nov 23 2007 Mike McGrath <mmcgrath@redhat.com> - 0.8.7a-2
fe32fcf
- db.php is now 640 instead of 660 - #396331
fe32fcf
fe32fcf
* Tue Nov 20 2007 Mike McGrath <mmcgrath@redhat.com> - 0.8.7a-1
fe32fcf
- Upstream released new version
fe32fcf
- Fixes for bug #391691 - CVE-2007-6035