1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-04 11:23:46 +00:00

net-mgmt/cacti: fix issues with graphs

PR:		234952
Submitted by:	Daniel Austin <freebsd-ports@dan.me.uk> (maintainer)
This commit is contained in:
Steve Wills 2019-01-16 12:59:37 +00:00
parent 7b52ba0fdd
commit c2caa12887
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=490477
2 changed files with 18 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= cacti
PORTVERSION= 1.2.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt www
MASTER_SITES= http://www.cacti.net/downloads/ \
ftp://ftpmirror.uk/freebsd-ports/cacti/
@ -47,6 +47,11 @@ SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \
CONFLICTS_INSTALL= cacti88
OPTIONS_DEFINE= SNMPBIN
OPTIONS_DEFAULT= SNMPBIN
SNMPBIN_DESC= Force use of SNMP binary instead of phpXX-snmp functions
SNMPBIN_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-lib_snmp.php
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -delete; \
${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample

View File

@ -0,0 +1,12 @@
--- lib/snmp.php.orig 2019-01-14 19:28:50 UTC
+++ lib/snmp.php
@@ -870,6 +870,9 @@ function snmp_escape_string($string) {
function snmp_get_method($type = 'walk', $version = 1, $context = '', $engineid = '',
$value_output_format = SNMP_STRING_OUTPUT_GUESS) {
+ /* override PHP SNMP calls and use the binary instead, fixes some broken graph issues */
+ return SNMP_METHOD_BINARY;
+
if ($value_output_format == SNMP_STRING_OUTPUT_HEX) {
return SNMP_METHOD_BINARY;
} elseif ($version == 3 && $context != '') {