[arch-commits] Commit in cacti/repos/community-any (6 files)
Sergej Pupykin
spupykin at archlinux.org
Mon Jan 30 11:19:38 UTC 2017
Date: Monday, January 30, 2017 @ 11:19:38
Author: spupykin
Revision: 209467
archrelease: copy trunk to community-any
Added:
cacti/repos/community-any/PKGBUILD
(from rev 209466, cacti/trunk/PKGBUILD)
cacti/repos/community-any/cacti.install
(from rev 209466, cacti/trunk/cacti.install)
Deleted:
cacti/repos/community-any/PKGBUILD
cacti/repos/community-any/cacti-php7.patch
cacti/repos/community-any/cacti-php7_2.patch
cacti/repos/community-any/cacti.install
--------------------+
PKGBUILD | 78 ++++++++++--------------
cacti-php7.patch | 163 ---------------------------------------------------
cacti-php7_2.patch | 11 ---
cacti.install | 14 ++--
4 files changed, 41 insertions(+), 225 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2017-01-30 11:19:27 UTC (rev 209466)
+++ PKGBUILD 2017-01-30 11:19:38 UTC (rev 209467)
@@ -1,44 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: tuxbubling <tuxbubling at jabber.fr>
-
-pkgname=cacti
-pkgver=0.8.8_h
-pkgrel=1
-pkgdesc="complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality"
-arch=(any)
-url="http://www.cacti.net"
-license=('GPL')
-depends=('rrdtool' 'mariadb' 'php' 'php-gd' 'net-snmp' 'xorg-fonts-100dpi')
-backup=('etc/webapps/cacti/.htaccess'
- 'etc/webapps/cacti/config.php')
-install=cacti.install
-source=("http://www.cacti.net/downloads/$pkgname-${pkgver/_/}.tar.gz"
- "cacti-php7.patch"
- "cacti-php7_2.patch")
-md5sums=('e5a2eb9e1b187a92284f46e7d4cd6505'
- 'f8bc449356b00a5a697522e1e0ca4c54'
- '7c20c6dfee134849ecfa60b5e99b9b9e')
-
-prepare() {
- cd $srcdir/$pkgname-${pkgver/_/}
- patch -p1 -i $srcdir/cacti-php7.patch
- patch -p1 -i $srcdir/cacti-php7_2.patch
-}
-
-package() {
- mkdir -p $pkgdir/usr/share/webapps/cacti $pkgdir/etc/webapps/cacti
- mv $srcdir/$pkgname-${pkgver/_/}/* $pkgdir/usr/share/webapps/cacti
- echo "Require all denied" >> $pkgdir/etc/webapps/cacti/.htaccess
- mv $pkgdir/usr/share/webapps/cacti/include/config.php $pkgdir/etc/webapps/cacti
- ln -s /etc/webapps/cacti/.htaccess $pkgdir/usr/share/webapps/cacti/.htaccess
- ln -s /etc/webapps/cacti/config.php $pkgdir/usr/share/webapps/cacti/include/config.php
-
- install -dm0755 $pkgdir/var/log/ $pkgdir/var/lib/cacti/
-
- mv $pkgdir/usr/share/webapps/cacti/rra $pkgdir/var/lib/cacti/rra
- ln -s /var/lib/cacti/rra $pkgdir/usr/share/webapps/cacti/rra
-
- mv $pkgdir/usr/share/webapps/cacti/log $pkgdir/var/log/cacti
- ln -s /var/log/cacti $pkgdir/usr/share/webapps/cacti/log
-}
Copied: cacti/repos/community-any/PKGBUILD (from rev 209466, cacti/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2017-01-30 11:19:38 UTC (rev 209467)
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: tuxbubling <tuxbubling at jabber.fr>
+
+pkgname=cacti
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality"
+arch=(any)
+url="http://www.cacti.net"
+license=('GPL')
+depends=('rrdtool' 'mariadb' 'php' 'php-gd' 'net-snmp' 'xorg-fonts-100dpi')
+backup=('etc/webapps/cacti/.htaccess'
+ 'etc/webapps/cacti/config.php')
+install=cacti.install
+source=("http://www.cacti.net/downloads/$pkgname-${pkgver/_/}.tar.gz")
+sha256sums=('180a23102af0415b961ef4d4181f93f49d40ebed36c5392ac988650d3753e693')
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/webapps/cacti "$pkgdir"/etc/webapps/cacti
+ mv "$srcdir"/$pkgname-${pkgver/_/}/* "$pkgdir"/usr/share/webapps/cacti
+ echo "Require all denied" >> "$pkgdir"/etc/webapps/cacti/.htaccess
+ mv "$pkgdir"/usr/share/webapps/cacti/include/config.php "$pkgdir"/etc/webapps/cacti
+ ln -s /etc/webapps/cacti/.htaccess "$pkgdir"/usr/share/webapps/cacti/.htaccess
+ ln -s /etc/webapps/cacti/config.php "$pkgdir"/usr/share/webapps/cacti/include/config.php
+
+ install -dm0755 "$pkgdir"/var/log/ "$pkgdir"/var/lib/cacti/
+
+ mv "$pkgdir"/usr/share/webapps/cacti/rra "$pkgdir"/var/lib/cacti/rra
+ ln -s /var/lib/cacti/rra "$pkgdir"/usr/share/webapps/cacti/rra
+
+ mv "$pkgdir"/usr/share/webapps/cacti/log "$pkgdir"/var/log/cacti
+ ln -s /var/log/cacti "$pkgdir"/usr/share/webapps/cacti/log
+}
Deleted: cacti-php7.patch
===================================================================
--- cacti-php7.patch 2017-01-30 11:19:27 UTC (rev 209466)
+++ cacti-php7.patch 2017-01-30 11:19:38 UTC (rev 209467)
@@ -1,163 +0,0 @@
-diff -aur cacti/install/index.php cacti-PHP7/install/index.php
---- cacti/install/index.php 2016-02-07 20:26:54.000000000 +0100
-+++ cacti-PHP7/install/index.php 2016-02-24 22:33:10.713574142 +0100
-@@ -63,7 +63,7 @@
- }
-
- function verify_php_extensions() {
-- $extensions = array("session", "sockets", "mysql", "xml");
-+ $extensions = array("session", "sockets", "pdo_mysql", "xml");
- $ok = true;
- $missing_extension = " <p style='font-family: Verdana, Arial; font-size: 16px; font-weight: bold; color: red;'>Error</p>
- <p style='font-family: Verdana, Arial; font-size: 12px;'>The following PHP extensions are missing:</p><ul>";
-diff -aur cacti/lib/adodb/adodb.inc.php cacti-PHP7/lib/adodb/adodb.inc.php
---- cacti/lib/adodb/adodb.inc.php 2010-08-21 17:03:22.000000000 +0200
-+++ cacti-PHP7/lib/adodb/adodb.inc.php 2016-02-24 22:19:33.915880478 +0100
-@@ -863,13 +863,13 @@
- }
-
- if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead
-- $rs =& new ADORecordSet_empty();
-+ $rs = new ADORecordSet_empty();
- return $rs;
- }
-
- // return real recordset from select statement
- $rsclass = $this->rsPrefix.$this->databaseType;
-- $rs =& new $rsclass($this->_queryID,$this->fetchMode);
-+ $rs = new $rsclass($this->_queryID,$this->fetchMode);
- $rs->connection = &$this; // Pablo suggestion
- $rs->Init();
- if (is_array($sql)) $rs->sql = $sql[0];
-@@ -1180,7 +1180,7 @@
-
- $arrayClass = $this->arrayClass;
-
-- $rs2 =& new $arrayClass();
-+ $rs2 = new $arrayClass();
- $rs2->connection = &$this;
- $rs2->sql = $rs->sql;
- $rs2->dataProvider = $this->dataProvider;
-@@ -1958,7 +1958,7 @@
-
- $retarr = array();
- while (!$rs->EOF) { //print_r($rs->fields);
-- $fld =& new ADOFieldObject();
-+ $fld = new ADOFieldObject();
- $fld->name = $rs->fields[0];
- $fld->type = $rs->fields[1];
- if (isset($rs->fields[3]) && $rs->fields[3]) {
-@@ -3024,7 +3024,7 @@
- function &FetchObject($isupper=true)
- {
- if (empty($this->_obj)) {
-- $this->_obj =& new ADOFetchObj();
-+ $this->_obj = new ADOFetchObj();
- $this->_names = array();
- for ($i=0; $i <$this->_numOfFields; $i++) {
- $f = $this->FetchField($i);
-@@ -3589,7 +3589,7 @@
- return $false;
- }
-
-- $obj =& new $cls();
-+ $obj = new $cls();
- }
-
- # constructor should not fail
-@@ -3664,7 +3664,7 @@
- @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php");
- $class = "Perf_$drivername";
- if (!class_exists($class)) return $false;
-- $perf =& new $class($conn);
-+ $perf = new $class($conn);
-
- return $perf;
- }
-@@ -3684,7 +3684,7 @@
- }
- include_once($path);
- $class = "ADODB2_$drivername";
-- $dict =& new $class();
-+ $dict = new $class();
- $dict->dataProvider = $conn->dataProvider;
- $dict->connection = &$conn;
- $dict->upperName = strtoupper($drivername);
-diff -aur cacti/lib/adodb/drivers/adodb-pdo.inc.php cacti-PHP7/lib/adodb/drivers/adodb-pdo.inc.php
---- cacti/lib/adodb/drivers/adodb-pdo.inc.php 2010-08-21 17:03:22.000000000 +0200
-+++ cacti-PHP7/lib/adodb/drivers/adodb-pdo.inc.php 2016-02-24 22:20:42.780689777 +0100
-@@ -43,16 +43,16 @@
- $this->_connectionID = new PDO($argDSN, $argUsername, $argPassword);
- if ($this->_connectionID) {
- switch(ADODB_ASSOC_CASE){
-- case 0: $m = PDO_CASE_LOWER; break;
-- case 1: $m = PDO_CASE_UPPER; break;
-+ case 0: $m = PDO::CASE_LOWER; break;
-+ case 1: $m = PDO::CASE_UPPER; break;
- default:
-- case 2: $m = PDO_CASE_NATURAL; break;
-+ case 2: $m = PDO::CASE_NATURAL; break;
- }
-
-- //$this->_connectionID->setAttribute(PDO_ATTR_ERRMODE,PDO_ERRMODE_SILENT );
-- $this->_connectionID->setAttribute(PDO_ATTR_CASE,$m);
-+ //$this->_connectionID->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_SILENT );
-+ $this->_connectionID->setAttribute(PDO::ATTR_CASE,$m);
-
-- //$this->_connectionID->setAttribute(PDO_ATTR_AUTOCOMMIT,true);
-+ //$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
-
- return true;
- }
-@@ -96,7 +96,7 @@
- if ($this->transOff) return true;
- $this->transCnt += 1;
- $this->_autocommit = false;
-- $this->_connectionID->setAttribute(PDO_ATTR_AUTOCOMMIT,false);
-+ $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,false);
- return $this->_connectionID->beginTransaction();
- }
-
-@@ -108,7 +108,7 @@
- $this->_autocommit = true;
-
- $ret = $this->_connectionID->commit();
-- $this->_connectionID->setAttribute(PDO_ATTR_AUTOCOMMIT,true);
-+ $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
- return $ret;
- }
-
-@@ -119,7 +119,7 @@
- $this->_autocommit = true;
-
- $ret = $this->_connectionID->rollback();
-- $this->_connectionID->setAttribute(PDO_ATTR_AUTOCOMMIT,true);
-+ $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
- return $ret;
- }
-
-@@ -242,9 +242,9 @@
- }
- switch($mode) {
- default:
-- case ADODB_FETCH_BOTH: $mode = PDO_FETCH_BOTH; break;
-- case ADODB_FETCH_NUM: $mode = PDO_FETCH_NUM; break;
-- case ADODB_FETCH_ASSOC: $mode = PDO_FETCH_ASSOC; break;
-+ case ADODB_FETCH_BOTH: $mode = PDO::FETCH_BOTH; break;
-+ case ADODB_FETCH_NUM: $mode = PDO::FETCH_NUM; break;
-+ case ADODB_FETCH_ASSOC: $mode = PDO::FETCH_ASSOC; break;
- }
- $this->fetchMode = $mode;
-
-diff -aur cacti/lib/html_tree.php cacti-PHP7/lib/html_tree.php
---- cacti/lib/html_tree.php 2015-11-17 02:39:54.000000000 +0100
-+++ cacti-PHP7/lib/html_tree.php 2016-02-24 22:24:00.738287850 +0100
-@@ -510,7 +510,7 @@
-
- $default_tree_id = read_graph_config_option('default_tree_id');
-
-- if (empty($default_tree_id)) {
-+ if (empty($default_tree_id) && isset($_SESSION['sess_user_id'])) {
- $user = db_fetch_row('SELECT * FROM user_auth WHERE id=' . $_SESSION['sess_user_id']);
-
- if ($user['policy_trees'] == 1) {
Deleted: cacti-php7_2.patch
===================================================================
--- cacti-php7_2.patch 2017-01-30 11:19:27 UTC (rev 209466)
+++ cacti-php7_2.patch 2017-01-30 11:19:38 UTC (rev 209467)
@@ -1,11 +0,0 @@
---- cacti-0.8.8g/lib/adodb/adodb-lib.inc.php 2010-08-21 17:03:22.000000000 +0200
-+++ cacti-0.8.8g-php7/lib/adodb/adodb-lib.inc.php 2016-04-21 12:30:45.707940772 +0200
-@@ -534,7 +534,7 @@
- //because we have to call MetaType.
- //php can't do a $rsclass::MetaType()
- $rsclass = $zthis->rsPrefix.$zthis->databaseType;
-- $recordSet =& new $rsclass(-1,$zthis->fetchMode);
-+ $recordSet = new $rsclass(-1,$zthis->fetchMode);
- $recordSet->connection = &$zthis;
-
- if (is_string($cacheRS) && $cacheRS == $rs) {
Deleted: cacti.install
===================================================================
--- cacti.install 2017-01-30 11:19:27 UTC (rev 209466)
+++ cacti.install 2017-01-30 11:19:38 UTC (rev 209467)
@@ -1,7 +0,0 @@
-post_upgrade() {
- post_install
-}
-
-post_install() {
- chown -R http:http var/log/cacti var/lib/cacti/rra
-}
Copied: cacti/repos/community-any/cacti.install (from rev 209466, cacti/trunk/cacti.install)
===================================================================
--- cacti.install (rev 0)
+++ cacti.install 2017-01-30 11:19:38 UTC (rev 209467)
@@ -0,0 +1,7 @@
+post_upgrade() {
+ post_install
+}
+
+post_install() {
+ chown -R http:http var/log/cacti var/lib/cacti/rra
+}
More information about the arch-commits
mailing list