mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- Grab the port
- Apply all vendor's patches - Remove redundant macro in Makefile - Add www as second category - Fix log file owner - Don't destroy user config on updating Approved by: maintainer (silence for 2+ monthes, no submits for 6 monthes)
This commit is contained in:
parent
1e1e63b224
commit
ccd92e3fa2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133737
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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/
|
||||
;;
|
||||
*)
|
||||
|
@ -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!
|
||||
==========================================================
|
||||
==================================================================
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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/
|
||||
;;
|
||||
*)
|
||||
|
@ -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!
|
||||
==========================================================
|
||||
==================================================================
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user