1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

net-mgmt/mrtg: update to 2.17.10 and make portlint happy

* Add missing LIB_DEPENDS

 * Reset maintainer.
   Has been inactive for a long time and has missed all of the latest releases.

PR:		271398
Reported by:	terry-freebsd@glaver.org
Approved by:	ports@subnets.ru (maintainer timeout)
This commit is contained in:
Terry Kennedy 2023-05-18 16:17:41 +02:00 committed by Fernando Apesteguía
parent db3b191f59
commit 4d72336a88
5 changed files with 17 additions and 107 deletions

View File

@ -1,6 +1,5 @@
PORTNAME= mrtg
PORTVERSION= 2.17.4
PORTREVISION= 8
PORTVERSION= 2.17.10
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \
@ -8,15 +7,17 @@ MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \
ftp://ftp.nstu.ru/pub/sources/nettools/monitoring/ \
ftp://ftp.chg.ru/pub/networking/monitoring/mrtg/
MAINTAINER= ports@subnets.ru
MAINTAINER= ports@FreeBSD.org
COMMENT= Multi-router traffic grapher
WWW= https://oss.oetiker.ch/mrtg/
LIB_DEPENDS= libgd.so:${GD_PORT}
LICENSE= GPLv2
LIB_DEPENDS= libgd.so:graphics/gd \
libpng16.so:graphics/png
RUN_DEPENDS= p5-SNMP_Session>=0:net-mgmt/p5-SNMP_Session
# slave ports override with languages specific gd
GD_PORT?= graphics/gd
USES= perl5 shebangfix
CONFIGURE_ARGS= --with-gd-lib=${LOCALBASE}/lib \
--with-gd-inc=${LOCALBASE}/include
@ -24,7 +25,6 @@ CONFIGURE_ARGS= --with-gd-lib=${LOCALBASE}/lib \
USERS= mrtg
GROUPS= mrtg
USES= perl5 shebangfix
MAKE_ENV+= PERL=${PERL}
MRTG_RUNDIR?= /var/run/mrtg
SHEBANG_FILES= bin/mrtg-traffic-sum
@ -44,7 +44,8 @@ CONFIGURE_ENV= PERL=${PERL}
MANPAGE= cfgmaker.1 indexmaker.1 mrtg-contrib.1 mrtg-faq.1 mrtg-forum.1 \
mrtg-ipv6.1 mrtg-logfile.1 mrtg-mibhelp.1 mrtg-nt-guide.1 \
mrtg-nw-guide.1 mrtg-reference.1 mrtg-rrd.1 mrtg-squid.1 \
mrtg-unix-guide.1 mrtg-webserver.1 mrtg.1 mrtglib.1
mrtg-unix-guide.1 mrtg-webserver.1 mrtg.1
MANPAGE3= mrtglib.3
DOCS= CHANGES COPYRIGHT MANIFEST README
EXAMPLES= cfgmaker.pod indexmaker.pod mrtg-contrib.pod mrtg-faq.pod \
@ -56,13 +57,13 @@ EXAMPLES= cfgmaker.pod indexmaker.pod mrtg-contrib.pod mrtg-faq.pod \
mrtg-logfile.txt mrtg-mibhelp.txt mrtg-nt-guide.txt \
mrtg-nw-guide.txt mrtg-reference.txt mrtg-rrd.txt \
mrtg-squid.txt mrtg-unix-guide.txt mrtg-webserver.txt \
mrtg.txt mrtglib.txt mrtg-l.png mrtg-m.png mrtg-r.png \
mrtg-ti.png mrtg-l.gif mrtg-m.gif mrtg-r.gif
mrtg.txt mrtglib.txt
IMAGES= favicon.ico mrtg-l.gif mrtg-l.png mrtg-m.gif mrtg-m.png \
mrtg-r.gif mrtg-r.png mrtg-ti.gif mrtg-ti.png
SCRIPTS= cfgmaker indexmaker mrtg mrtg-traffic-sum
OPTIONS_DEFINE= DOCS EXAMPLES IPV6 SNMPV3
SNMPV3_DESC= Build with support for SNMPv3
IPV6_RUN_DEPENDS= p5-IO-Socket-INET6>=0:net/p5-IO-Socket-INET6
SNMPV3_RUN_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
@ -91,6 +92,8 @@ do-install:
${STAGEDIR}${ETCDIR}/mrtg.cfg.sample
${INSTALL_DATA} ${MANPAGE:S,^,${WRKSRC}/doc/,} \
${STAGEDIR}${PREFIX}/man/man1
${INSTALL_DATA} ${MANPAGE3:S,^,${WRKSRC}/doc/,} \
${STAGEDIR}${PREFIX}/man/man3
cd ${WRKSRC}/lib/mrtg2 && \
${COPYTREE_SHARE} "*.pm" ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}
${INSTALL_PROGRAM} ${WRKSRC}/bin/rateup ${STAGEDIR}${PREFIX}/bin

View File

@ -1,2 +1,3 @@
SHA256 (mrtg-2.17.4.tar.gz) = 5efa7fae8040159208472e5f889be5b41d8c8a2ea6b31616f0f75cc7f48d2365
SIZE (mrtg-2.17.4.tar.gz) = 1096879
TIMESTAMP = 1684010766
SHA256 (mrtg-2.17.10.tar.gz) = c7f11cb5e217a500d87ee3b5d26c58a8652edbc0d3291688bb792b010fae43ac
SIZE (mrtg-2.17.10.tar.gz) = 1084792

View File

@ -1,58 +0,0 @@
--- lib/mrtg2/SNMP_Session.pm.orig 2012-10-31 17:43:06.558051879 +0000
+++ lib/mrtg2/SNMP_Session.pm 2012-10-31 17:43:35.270071536 +0000
@@ -146,7 +146,7 @@
if (eval {local $SIG{__DIE__};require Socket6;} &&
eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ 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;
}
@@ -545,7 +545,7 @@
# complaining about AF_INET6 when Socket6 is not available
if( (defined $ipv6_addr_len) && (length $addr == $ipv6_addr_len)) {
- ($port,$addrunpack) = unpack_sockaddr_in6 ($addr);
+ ($port,$addrunpack) = Socket6::unpack_sockaddr_in6 ($addr);
$addrstr = inet_ntop (AF_INET6(), $addrunpack);
} else {
($port,$addrunpack) = unpack_sockaddr_in ($addr);
@@ -601,7 +601,7 @@
BEGIN {
if($SNMP_Session::ipv6available) {
import IO::Socket::INET6;
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
}
}
@@ -820,8 +820,8 @@
($p2,$a2) = unpack_sockaddr_in ($sa2);
} elsif($this->{'sockfamily'} == AF_INET6()) {
# IPv6 addresses
- ($p1,$a1) = unpack_sockaddr_in6 ($sa1);
- ($p2,$a2) = unpack_sockaddr_in6 ($sa2);
+ ($p1,$a1) = Socket6::unpack_sockaddr_in6 ($sa1);
+ ($p2,$a2) = Socket6::unpack_sockaddr_in6 ($sa2);
} else {
return 0;
}
@@ -894,7 +894,7 @@
return undef unless $remote_addr;
if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) {
- ($port,$iaddr) = unpack_sockaddr_in6($remote_addr);
+ ($port,$iaddr) = Socket6::unpack_sockaddr_in6($remote_addr);
} else {
($port,$iaddr) = unpack_sockaddr_in($remote_addr);
}
@@ -943,7 +943,7 @@
return undef unless $remote_addr;
if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) {
- ($port,$iaddr) = unpack_sockaddr_in6($remote_addr);
+ ($port,$iaddr) = Socket6::unpack_sockaddr_in6($remote_addr);
} else {
($port,$iaddr) = unpack_sockaddr_in($remote_addr);
}

View File

@ -1,36 +0,0 @@
--- src/rateup.c.orig 2012-05-10 05:40:49.259760823 -0300
+++ src/rateup.c 2012-05-10 05:44:32.297657818 -0300
@@ -1132,9 +1132,10 @@
gdImageDestroy (brush_outp);
free (lhist);
free (graph_label);
- if (kMG)
+ if (kMG) {
free(short_si);
-
+ short_si = short_si_def;
+ }
#ifdef WIN32
/* got to remove the target under win32
@@ -1563,8 +1564,10 @@
}
else
{
- strcpy (last.in, in);
- strcpy (last.out, out);
+ strncpy (last.in, in, MAXL);
+ last.in[MAXL-1]='\0';
+ strncpy (last.out, out,MAXL);
+ last.out[MAXL-1]='\0';
}
fprintf (fo, "%lu " LLD " " LLD " " LLD " " LLD "\n",
(unsigned long) now, inrate, outrate, inrate, outrate);
@@ -2114,6 +2117,7 @@
history[x].in = rand () % atoi (argv[argi + 1]);
history[x].out = rand () % atoi (argv[argi + 2]);
}
+ /* fallthrough */
case 'u': /* Update file */
if (argv[argi][1] == 'p')
{

View File

@ -23,4 +23,4 @@ man/man1/mrtg-squid.1.gz
man/man1/mrtg-unix-guide.1.gz
man/man1/mrtg-webserver.1.gz
man/man1/mrtg.1.gz
man/man1/mrtglib.1.gz
man/man3/mrtglib.3.gz