Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2019 12:59:37 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r490477 - in head/net-mgmt/cacti: . files
Message-ID:  <201901161259.x0GCxbHv045341@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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 != '') {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901161259.x0GCxbHv045341>