aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/cacti
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-04-20 10:49:03 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-04-20 10:49:03 +0000
commitccd92e3fa2658c347aaf395916cbd65b4d536ec7 (patch)
tree2d66cf9c1c59a1522f7ae9bec580453be2e0a6ad /net-mgmt/cacti
parent1e1e63b224f739e78908f26b35f0eb3577cb5075 (diff)
downloadports-ccd92e3fa2658c347aaf395916cbd65b4d536ec7.tar.gz
ports-ccd92e3fa2658c347aaf395916cbd65b4d536ec7.zip
Notes
Diffstat (limited to 'net-mgmt/cacti')
-rw-r--r--net-mgmt/cacti/Makefile40
-rw-r--r--net-mgmt/cacti/distinfo20
-rw-r--r--net-mgmt/cacti/pkg-descr12
-rw-r--r--net-mgmt/cacti/pkg-install1
-rw-r--r--net-mgmt/cacti/pkg-message11
-rw-r--r--net-mgmt/cacti/pkg-plist4
6 files changed, 66 insertions, 22 deletions
diff --git a/net-mgmt/cacti/Makefile b/net-mgmt/cacti/Makefile
index a21e9661ec7f..e8247a057587 100644
--- a/net-mgmt/cacti/Makefile
+++ b/net-mgmt/cacti/Makefile
@@ -7,19 +7,32 @@
PORTNAME= cacti
PORTVERSION= 0.8.6c
-CATEGORIES= net
+PORTREVISION= 1
+CATEGORIES= net www
MASTER_SITES= http://www.cacti.net/downloads/
-MAINTAINER= so14k@so14k.com
+MAINTAINER= sem@FreeBSD.org
COMMENT= Web-driven graphing interface for RRDTool
+PATCH_SITES= http://www.cacti.net/downloads/patches/0.8.6c/
+PATCHFILES= rrd_fetch_negative_numbers.patch \
+ no_auth_no_graphs_in_tree_bug.patch \
+ device_create_multiple_graphs.patch \
+ undefined_index_custom_problem_in_graph_view.patch \
+ poller_recache_timeout.patch \
+ output_field_name_period.patch \
+ ping_sysdescription_to_sysuptime.patch \
+ netsnmp_reduce_output_from_loaded_mibs.patch \
+ php_snmp_v2.patch \
+ config_php_include_order.patch
+PATCH_DIST_STRIP=-p1
+
RUN_DEPENDS= rrdtool:${PORTSDIR}/net/rrdtool \
net-snmp-config:${PORTSDIR}/net-mgmt/net-snmp
USE_MYSQL= yes
USE_PHP= mysql pcre session xml
WANT_PHP_WEB= yes
-WANT_PHP_CLI= yes
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
@@ -37,17 +50,26 @@ post-patch:
s|%%CACTIDIR%%|${CACTIDIR}| ; \
s|%%CACTIUSER%%|${CACTIUSER}|' > ${PKGMESSAGE}
+# Create cacti user/group and clean *.orig files
pre-install:
- @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
- ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
+ CACTIGROUP=${CACTIGROUP} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
+ cd ${WRKSRC}; \
+ ${FIND} . -name \*.orig -delete
do-install:
- @${MKDIR} ${PREFIX}/${CACTIDIR}/
- @${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/
+ @${MKDIR} ${PREFIX}/${CACTIDIR}; \
+ ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig; \
+ ${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/
+ if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \
+ ${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \
+ ${PREFIX}/${CACTIDIR}/include/config.php; \
+ fi; \
+# Fix permissions
post-install:
- @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
- ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
+ CACTIGROUP=${CACTIGROUP} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/net-mgmt/cacti/distinfo b/net-mgmt/cacti/distinfo
index 0abd7e961046..41a200eedab3 100644
--- a/net-mgmt/cacti/distinfo
+++ b/net-mgmt/cacti/distinfo
@@ -1,2 +1,22 @@
MD5 (cacti-0.8.6c.tar.gz) = f48b1cc12ebdf96358563760c812e227
SIZE (cacti-0.8.6c.tar.gz) = 1038183
+MD5 (rrd_fetch_negative_numbers.patch) = 768046e4089798cc9e40a9f4ccbee4f5
+SIZE (rrd_fetch_negative_numbers.patch) = 601
+MD5 (no_auth_no_graphs_in_tree_bug.patch) = bcdbcbda14b6f4d884384f1715b421c1
+SIZE (no_auth_no_graphs_in_tree_bug.patch) = 588
+MD5 (device_create_multiple_graphs.patch) = 3115b49bc17ee75bca18936e311d22d3
+SIZE (device_create_multiple_graphs.patch) = 1713
+MD5 (undefined_index_custom_problem_in_graph_view.patch) = a53c6c8c592a029d64a85ba64f39546e
+SIZE (undefined_index_custom_problem_in_graph_view.patch) = 763
+MD5 (poller_recache_timeout.patch) = 29759c5badd81a4427be26ce003319e1
+SIZE (poller_recache_timeout.patch) = 614
+MD5 (output_field_name_period.patch) = 500c585678d184c3ecde59dfd86cc42b
+SIZE (output_field_name_period.patch) = 772
+MD5 (ping_sysdescription_to_sysuptime.patch) = 82b2cc1f2aa35404effd70e8564882b8
+SIZE (ping_sysdescription_to_sysuptime.patch) = 630
+MD5 (netsnmp_reduce_output_from_loaded_mibs.patch) = b20f13d760830a1fb067e3364cac2d2b
+SIZE (netsnmp_reduce_output_from_loaded_mibs.patch) = 1335
+MD5 (php_snmp_v2.patch) = 5fd1f3a832740c4e0711cb5635df42d4
+SIZE (php_snmp_v2.patch) = 2762
+MD5 (config_php_include_order.patch) = 444863320b787346855a96db4982052a
+SIZE (config_php_include_order.patch) = 2190
diff --git a/net-mgmt/cacti/pkg-descr b/net-mgmt/cacti/pkg-descr
index b17fbc17b3d2..fe8fa4325341 100644
--- a/net-mgmt/cacti/pkg-descr
+++ b/net-mgmt/cacti/pkg-descr
@@ -1,6 +1,8 @@
-One drawback to RRDTool, is that by itself it is not a complete package for
-users wanting to graph their own networks. This is where cacti's job comes
-in. Cacti brings the power of RRDTool to a friendly web interface making it
-easy to graph anything using RRDTool.
+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 driven. Along with being able to maintain
+Graphs, Data Sources, and Round Robin Archives in a database, cacti handles
+the data gathering. There is also SNMP support for those used to creating
+traffic graphs with MRTG.
-WWW: http://www.raxnet.net/products/cacti/
+WWW: http://www.cacti.net
diff --git a/net-mgmt/cacti/pkg-install b/net-mgmt/cacti/pkg-install
index 9c6d7bb893ae..86d8f0d137ed 100644
--- a/net-mgmt/cacti/pkg-install
+++ b/net-mgmt/cacti/pkg-install
@@ -36,6 +36,7 @@ PRE-INSTALL)
POST-INSTALL)
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/
+ chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/*
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/rra/
;;
*)
diff --git a/net-mgmt/cacti/pkg-message b/net-mgmt/cacti/pkg-message
index aef3e932a4ae..9b37b13e9b41 100644
--- a/net-mgmt/cacti/pkg-message
+++ b/net-mgmt/cacti/pkg-message
@@ -1,21 +1,18 @@
-==========================================================
+==================================================================
Cacti is now installed. You may have to follow this steps
to make it work correctly.
1: Create the MySQL database
# mysqladmin --user=root create cacti
2: Create a mysql user/password for cacti
-# echo "CREATE DATABASE cacti;
-GRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser';
-FLUSH PRIVILEGES;" | mysql &&
+# echo "GRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql &&
3: Import the default cacti database
# mysql cacti < %%PREFIX%%/%%CACTIDIR%%/cacti.sql
4: Edit your config.php
-Specify the MySQL user, password and database for
-your cacti configuration.
+Specify the MySQL user, password and database for your cacti configuration.
5: Add a line to your /etc/crontab file similar to:
*/5 * * * * %%CACTIUSER%% %%LOCALBASE%%/bin/php %%PREFIX%%/%%CACTIDIR%%/poller.php > /dev/null 2>&1
6: Point your web browser to the cacti dir and login with admin/admin
Have fun!
-==========================================================
+==================================================================
diff --git a/net-mgmt/cacti/pkg-plist b/net-mgmt/cacti/pkg-plist
index d4d4aa9c47fe..6f01b6feb0a8 100644
--- a/net-mgmt/cacti/pkg-plist
+++ b/net-mgmt/cacti/pkg-plist
@@ -126,7 +126,9 @@
%%CACTIDIR%%/images/transparent_line.gif
%%CACTIDIR%%/include/auth.php
%%CACTIDIR%%/include/bottom_footer.php
-%%CACTIDIR%%/include/config.php
+%%CACTIDIR%%/include/config.php.orig
+@exec [ -f %D/%%CACTIDIR%%/include/config.php ] || cp %D/%%CACTIDIR%%/include/config.php.orig %D/%%CACTIDIR%%/include/config.php
+@unexec if cmp -s %D/%%CACTIDIR%%/include/config.php.orig %D/%%CACTIDIR%%/include/config.php; then rm -f %D/%%CACTIDIR%%/include/config.php; fi
%%CACTIDIR%%/include/config_arrays.php
%%CACTIDIR%%/include/config_constants.php
%%CACTIDIR%%/include/config_form.php