svn commit: r490477 - in head/net-mgmt/cacti: . files

Steve Wills swills at FreeBSD.org
Wed Jan 16 12:59:38 UTC 2019


Author: swills
Date: Wed Jan 16 12:59:37 2019
New Revision: 490477
URL: https://svnweb.freebsd.org/changeset/ports/490477

Log:
  net-mgmt/cacti: fix issues with graphs
  
  PR:		234952
  Submitted by:	Daniel Austin <freebsd-ports at dan.me.uk> (maintainer)

Added:
  head/net-mgmt/cacti/files/extra-patch-lib_snmp.php   (contents, props changed)
Modified:
  head/net-mgmt/cacti/Makefile   (contents, props changed)

Modified: head/net-mgmt/cacti/Makefile
==============================================================================
--- head/net-mgmt/cacti/Makefile	Wed Jan 16 12:06:25 2019	(r490476)
+++ head/net-mgmt/cacti/Makefile	Wed Jan 16 12:59:37 2019	(r490477)
@@ -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/
@@ -46,6 +46,11 @@ SUB_LIST+=	CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER}
 		CACTIGROUP=${CACTIGROUP}
 
 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; \

Added: head/net-mgmt/cacti/files/extra-patch-lib_snmp.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/cacti/files/extra-patch-lib_snmp.php	Wed Jan 16 12:59:37 2019	(r490477)
@@ -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 != '') {


More information about the svn-ports-all mailing list