15813089 SUNBT7195032 mrtg 2.16.2 from Solaris repository is too old and does not work
--- a/components/mrtg/Makefile Tue Jan 19 14:00:51 2016 -0800
+++ b/components/mrtg/Makefile Fri Jan 15 01:22:16 2016 -0800
@@ -18,21 +18,21 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= mrtg
-COMPONENT_VERSION= 2.16.2
+COMPONENT_VERSION= 2.17.4
COMPONENT_PROJECT_URL= http://oss.oetiker.ch/mrtg
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:ce9ec97bb6c8f94a8d8bb2d3cfa7e72b73754ed7a1081e7aca1c8cece5ce3385
+ sha256:5efa7fae8040159208472e5f889be5b41d8c8a2ea6b31616f0f75cc7f48d2365
COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/pub/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= utility/mrtg
-TPNO= 9225
+TPNO= 25709
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure-64.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mrtg/TESTING Fri Jan 15 01:22:16 2016 -0800
@@ -0,0 +1,19 @@
+Install snmp:
+$ pkg install system/management/snmp/net-snmp
+
+Enable snmp:
+$ svcadm enable svc:/application/management/net-snmp:default
+
+Make sure snmp works:
+$ snmpget -v2c -c public localhost sysUpTime.0
+
+Do some networking traffic:
+$ while : ; do rm -f /home/vmarek/tmp/gs ; cp /usr/bin/gs /home/vmarek/tmp; done &
+
+Test mrtg:
+$ rm -rf /var/tmp/mrtg && mkdir -p /var/tmp/mrtg
+$ cfgmaker --global "workdir: /var/tmp/mrtg" public@localhost > /var/tmp/mrtg.cfg
+$ set -x; for i in 1 2 3 4 5 6 ; do env LANG=C /usr/bin/mrtg /var/tmp/mrtg.cfg; sleep 600; done
+
+After 30 minutes display the generated html in /var/tmp/mrtg. You should see
+some data.
--- a/components/mrtg/patches/mrtg-2.16.2-cfgmaker-ifhighspeed.patch Tue Jan 19 14:00:51 2016 -0800
+++ b/components/mrtg/patches/mrtg-2.16.2-cfgmaker-ifhighspeed.patch Fri Jan 15 01:22:16 2016 -0800
@@ -1,15 +1,14 @@
Upstream patches:
https://bugzilla.redhat.com/show_bug.cgi?id=836197
-diff -up mrtg-2.16.2/bin/cfgmaker.orig mrtg-2.16.2/bin/cfgmaker
---- mrtg-2.16.2/bin/cfgmaker.orig 2012-10-03 10:55:34.175356756 +0200
-+++ mrtg-2.16.2/bin/cfgmaker 2012-10-03 10:56:20.213543149 +0200
-@@ -220,7 +220,7 @@ sub InterfaceInfo($$$$$) {
+--- mrtg-2.17.4/bin/cfgmaker 2016-01-07 06:23:10.755091799 -0800
++++ mrtg-2.17.4/bin/cfgmaker 2016-01-07 06:22:46.534894374 -0800
+@@ -224,7 +224,7 @@ sub InterfaceInfo($$$$$) {
# maximum value (4,294,967,295) and ifHighSpeed must be used
# to report the interace's speed. For a sub-layer which has
# no concept of bandwidth, this object should be zero."
-- if ( (not defined $value) || ($value == 2**32-1)) {
-+ if ( (not defined $value) || ($value == 2**32-1) || ($value == 2**32-2)) {
+- if ( (not defined $value) || ($value == 2**32-1) ) {
++ if ( (not defined $value) || ($value == 2**32-1) || ($value == 2**32-2) ) {
($if, $value) = split /:/, $ifHighSpeed[$i], 2;
$value = $value * 1000000; # highSpeed = contador * 10^6
- #debug('base',"Speed: $if - $value");
+ debug('base',"Speed: $if - $value");
--- a/components/mrtg/patches/mrtg-2.16.2-kMG.patch Tue Jan 19 14:00:51 2016 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-Upstream patches:
-https://bugzilla.redhat.com/show_bug.cgi?id=707188
-http://oss.oetiker.ch/mrtg-trac/changeset/359/trunk/src/src/rateup.c
-
-diff -up mrtg-2.16.2/src/rateup.c.orig mrtg-2.16.2/src/rateup.c
---- mrtg-2.16.2/src/rateup.c.orig 2008-05-16 16:45:41.000000000 +0200
-+++ mrtg-2.16.2/src/rateup.c 2012-10-01 13:22:28.064000017 +0200
-@@ -481,12 +481,20 @@ image (file, maxvi, maxvo, maxx, maxy, x
- {
- short_si_out = kMG;
- kMGnumber = 0;
-- short_si[0] = kMG;
- while ((short_si_out = strchr (short_si_out, ',')) != NULL)
- {
-+ short_si_out++;
-+ kMGnumber++;
-+ }
-+ short_si = calloc(kMGnumber + 1, sizeof(*short_si));
-+ short_si_out = kMG;
-+ for (kMGnumber = 0; ; kMGnumber++)
-+ {
-+ short_si[kMGnumber] = short_si_out;
-+ short_si_out = strchr(short_si_out, ',');
-+ if (short_si_out == NULL) break;
- short_si_out[0] = '\0';
- short_si_out++;
-- short_si[++kMGnumber] = short_si_out;
- }
- }
- }
-@@ -1145,6 +1153,8 @@ image (file, maxvi, maxvo, maxx, maxy, x
- gdImageDestroy (brush_outp);
- free (lhist);
- free (graph_label);
-+ if (kMG)
-+ free(short_si);
-
- }
-
--- a/components/mrtg/patches/mrtg-2.16.4-Socket6-fix.patch Tue Jan 19 14:00:51 2016 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-Upstream patch:
-https://bugzilla.redhat.com/show_bug.cgi?id=706519
-
-diff -up mrtg-2.16.4/bin/mrtg.orig mrtg-2.16.4/bin/mrtg
---- mrtg-2.16.4/bin/mrtg.orig 2010-12-13 14:26:25.000000000 +0100
-+++ mrtg-2.16.4/bin/mrtg 2010-12-13 14:31:30.168311050 +0100
-@@ -98,6 +98,7 @@ use locales_mrtg "0.07";
- BEGIN {
- if (eval {local $SIG{__DIE__};require Socket6;}) {
- import Socket;
-+ use Socket();
- import Socket6
- }
- }
-diff -up mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm
---- mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig 2010-05-17 15:59:20.000000000 +0200
-+++ mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm 2010-12-13 14:26:25.366152933 +0100
-@@ -146,7 +146,7 @@ BEGIN {
-
- if (eval {local $SIG{__DIE__};require Socket6;} &&
- eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
-- import Socket6;
-+ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
- $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
- $SNMP_Session::ipv6available = 1;
- }
-@@ -601,7 +601,7 @@ use Carp;
- BEGIN {
- if($SNMP_Session::ipv6available) {
- import IO::Socket::INET6;
-- import Socket6;
-+ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
- }
- }
-