Fix PHP requirements
This commit is contained in:
parent
09b1618631
commit
3adda01f08
16
cacti-fix-php7-db-access.patch
Normal file
16
cacti-fix-php7-db-access.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
From f76503b790d059c59070c69e07a1ebe882aff30f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick <patrick@patrickrademaker.nl>
|
||||||
|
Date: Sat, 13 May 2017 00:01:13 +0200
|
||||||
|
Subject: [PATCH] Bugfix for issue#687
|
||||||
|
|
||||||
|
--- a/lib/data_query.php
|
||||||
|
+++ b/lib/data_query.php
|
||||||
|
@@ -762,7 +762,7 @@ function data_query_rewrite_indexes(&$errmsg, $host_id, $snmp_query_id, $rewrite
|
||||||
|
foreach($oid_items as $item){
|
||||||
|
$matches = array();
|
||||||
|
if(preg_match('/^\|query_([^|]+)\|$/', $item, $matches)){
|
||||||
|
- $iv = mysql_real_escape_string($matches[1]);
|
||||||
|
+ $iv = db_qstr($matches[1]);
|
||||||
|
if(is_array($fields_processed) && !in_array($iv, $fields_processed)){
|
||||||
|
$errmsg[] = "rewrite_index='$rewrite_index': '$iv' is not processed yet, could not use it as index source";
|
||||||
|
continue;
|
42
cacti.spec
42
cacti.spec
@ -1,6 +1,6 @@
|
|||||||
Name: cacti
|
Name: cacti
|
||||||
Version: 1.1.6
|
Version: 1.1.6
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: An rrd based graphing tool
|
Summary: An rrd based graphing tool
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.cacti.net/
|
URL: http://www.cacti.net/
|
||||||
@ -9,13 +9,46 @@ Source1: cacti-httpd.conf
|
|||||||
Source2: cacti.logrotate
|
Source2: cacti.logrotate
|
||||||
Source3: cacti.README.fedora
|
Source3: cacti.README.fedora
|
||||||
Source4: %{name}.cron
|
Source4: %{name}.cron
|
||||||
|
Patch0: cacti-fix-php7-db-access.patch
|
||||||
|
|
||||||
Requires: php, php-gd, php-ldap, php-mbstring, php-mysqlnd, php-pdo, php-process, php-snmp, php-xml
|
# Requires PHP 5.3+
|
||||||
|
Requires: php(language) >= 5.3
|
||||||
|
|
||||||
|
# DB access is managed via pdo_mysql
|
||||||
|
Requires: php-pdo_mysql
|
||||||
|
|
||||||
|
# Core PHP libs/extensions required by Cacti
|
||||||
|
Requires: php-pdo
|
||||||
|
Requires: php-reflection
|
||||||
|
Requires: php-simplexml
|
||||||
|
Requires: php-ctype
|
||||||
|
Requires: php-date
|
||||||
|
Requires: php-dom
|
||||||
|
Requires: php-filter
|
||||||
|
Requires: php-gd
|
||||||
|
Requires: php-iconv
|
||||||
|
Requires: php-imap
|
||||||
|
Requires: php-intl
|
||||||
|
Requires: php-json
|
||||||
|
Requires: php-ldap
|
||||||
|
Requires: php-mbstring
|
||||||
|
Requires: php-openssl
|
||||||
|
Requires: php-pcntl
|
||||||
|
Requires: php-posix
|
||||||
|
Requires: php-session
|
||||||
|
Requires: php-snmp
|
||||||
|
Requires: php-sockets
|
||||||
|
Requires: php-spl
|
||||||
|
Requires: php-xml
|
||||||
|
Requires: php-zlib
|
||||||
|
|
||||||
|
# Cacti Requirements
|
||||||
Requires: mysql
|
Requires: mysql
|
||||||
Requires: httpd
|
Requires: httpd
|
||||||
Requires: rrdtool
|
Requires: rrdtool
|
||||||
Requires: net-snmp, net-snmp-utils
|
Requires: net-snmp, net-snmp-utils
|
||||||
Requires: crontabs
|
Requires: crontabs
|
||||||
|
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -37,6 +70,7 @@ driven.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# cacti's build is a noop
|
# cacti's build is a noop
|
||||||
@ -130,6 +164,10 @@ fi
|
|||||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/lib
|
%attr(-,root,root) %{_localstatedir}/lib/%{name}/lib
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 13 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.1.6-2
|
||||||
|
- Fix PHP requirements
|
||||||
|
- Cacti db access not compatible with PHP 7 (#1450578)
|
||||||
|
|
||||||
* Mon May 08 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.1.6-1
|
* Mon May 08 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.1.6-1
|
||||||
- Update to 1.1.6
|
- Update to 1.1.6
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user