From 0d1151be29944b12e61f1b71efb90bef63cb6c58 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Thu, 21 Dec 2023 12:22:26 -0500 Subject: [PATCH] fixes for re-review --- cacti-httpd.conf | 14 ------------- cacti.spec | 53 ++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/cacti-httpd.conf b/cacti-httpd.conf index c687845..412a80d 100644 --- a/cacti-httpd.conf +++ b/cacti-httpd.conf @@ -16,12 +16,6 @@ Alias /cacti /usr/share/cacti # httpd 2.4 Require host localhost - - # httpd 2.2 - Order deny,allow - Deny from all - Allow from localhost - @@ -41,17 +35,9 @@ Alias /cacti /usr/share/cacti Require all denied - - Order deny,allow - Deny from all - Require all denied - - Order deny,allow - Deny from all - diff --git a/cacti.spec b/cacti.spec index 62c2e97..fbcd6c8 100644 --- a/cacti.spec +++ b/cacti.spec @@ -2,9 +2,9 @@ Name: cacti Version: 1.2.25 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An rrd based graphing tool -License: GPLv2+ +License: GPL-2.0-or-later URL: https://www.cacti.net/ Source0: https://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: cacti-httpd.conf @@ -17,6 +17,8 @@ Patch1: cacti-1.2.x-csrf-secret.patch BuildArch: noarch +BuildRequires: fdupes + Requires: httpd-filesystem Requires: nginx-filesystem Requires: php(httpd) @@ -63,6 +65,7 @@ Requires: rrdtool Requires: net-snmp Requires: net-snmp-utils Requires: crontabs +Requires: logrotate # Bundled JS library Provides: bundled(js-jquery) = 3.4.1 @@ -72,12 +75,24 @@ Provides: bundled(js-tree) = 3.3.8 %description Cacti is a complete frontend to RRDTool. It stores all of the necessary information to create graphs and populate them with -data in a MySQL database. The frontend is completely PHP +data in a MySQL database. The front-end is completely PHP driven. +%package doc +Summary: Cacti documentation +%description doc +Documentation package for Cacti. Includes documentation and database seed file + %prep %autosetup -p1 +# rpmlint(E: git): remove source tree files +rm include/vendor/cldr-to-gettext-plural-rules/.gitignore +rm include/vendor/cldr-to-gettext-plural-rules/.gitattributes + +# rpmlint(E: htaccess-files) - this is covered by supplemental webserver config +find . -name '.htaccess' -delete + %build # Nothing to build @@ -122,6 +137,10 @@ touch %{buildroot}/%{_localstatedir}/log/%{name}/%{name}_stderr.log # Create csrf-secret.php touch %{buildroot}/%{_localstatedir}/lib/%{name}/csrf/csrf-secret.php +# hardlink duplicate files +%fdupes %{buildroot}/%{_localstatedir}/lib/%{name} +%fdupes %{buildroot}/%{_localstatedir}/share/%{name} + # Migrate /usr/share/cacti/resource to /var/cacti/resource %pretrans -p path = "/usr/share/cacti/resource" @@ -175,7 +194,14 @@ fi %files %doc docs/ README.md cacti.sql -%license LICENSE +%license LICENSE LICENSE.txt +%license include/fa/LICENSE.txt +%license include/vendor/cldr-to-gettext-plural-rules/LICENSE +%license include/vendor/csrf/LICENSE.txt +%license include/vendor/gettext/LICENSE +%license include/vendor/flag-icon-css/LICENSE +%license include/vendor/phpmailer/LICENSE + %dir %{_sysconfdir}/%{name} %dir %{_datadir}/%{name} %dir %{_localstatedir}/lib/%{name} @@ -183,8 +209,8 @@ fi %dir %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/csrf %dir %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/scripts %dir %attr(-,apache,apache) %{_localstatedir}/log/%{name}/ -%config(noreplace) %attr(-,apache,apache) %{_localstatedir}/log/%{name}/%{name}.log -%config(noreplace) %attr(-,apache,apache) %{_localstatedir}/log/%{name}/%{name}_stderr.log +%ghost %attr(-,apache,apache) %{_localstatedir}/log/%{name}/%{name}.log +%ghost %attr(-,apache,apache) %{_localstatedir}/log/%{name}/%{name}_stderr.log %config(noreplace) %{_sysconfdir}/cron.d/cacti %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %config(noreplace) %{_sysconfdir}/nginx/default.d/%{name}.conf @@ -207,19 +233,24 @@ fi %{_datadir}/%{name}/scripts %{_localstatedir}/lib/%{name}/scripts/*[^p] %{_pkgdocdir}/cacti.README.fedora -%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/scripts/*.php -%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/scripts/.htaccess +%attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/scripts/*.php +%attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/scripts/*.pl %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/resource/ %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/rra/ %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/cache/ -%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/cli/*php -%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/cli/.htaccess -%attr(0770,apache,apache) %{_localstatedir}/lib/%{name}/csrf/csrf-secret.php +%attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/cli/*php +%ghost %attr(0770,apache,apache) %{_localstatedir}/lib/%{name}/csrf/csrf-secret.php %attr(-,root,root) %{_localstatedir}/lib/%{name}/include %attr(-,root,root) %{_localstatedir}/lib/%{name}/lib %ghost %{_datadir}/%{name}/resource.rpmmoved +%files doc +%{_docdir} + %changelog +* Thu Dec 21 2023 Neil Hanlon - 1.2.25-2 +- Modernize and fix rpmlint errors for re-review of orphan/retired package + * Wed Oct 04 2023 Carl George - 1.2.25-1 - Update to version 1.2.25