From owner-svn-ports-all@freebsd.org Wed Nov 7 20:24:15 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07B5C112DECA; Wed, 7 Nov 2018 20:24:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53ACF777BA; Wed, 7 Nov 2018 20:24:14 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 287BF1A754; Wed, 7 Nov 2018 20:24:14 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA7KOEBL006041; Wed, 7 Nov 2018 20:24:14 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA7KOA4A006021; Wed, 7 Nov 2018 20:24:10 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201811072024.wA7KOA4A006021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 7 Nov 2018 20:24:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r484408 - in head/net/rtg: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in head/net/rtg: . files X-SVN-Commit-Revision: 484408 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 53ACF777BA X-Spamd-Result: default: False [-106.85 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-1.00)[-0.999,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; IP_SCORE(-3.74)[ip: (-9.91), ipnet: 2610:1c1:1::/48(-4.91), asn: 11403(-3.77), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 20:24:15 -0000 Author: mat Date: Wed Nov 7 20:24:10 2018 New Revision: 484408 URL: https://svnweb.freebsd.org/changeset/ports/484408 Log: Revert r484406, it was never approved. Pointy hat: mfechner With hat: portmgr Added: head/net/rtg/files/patch-cgilib-cgi.c - copied unchanged from r484405, head/net/rtg/files/patch-cgilib-cgi.c head/net/rtg/files/patch-config-config.h.in - copied unchanged from r484405, head/net/rtg/files/patch-config-config.h.in head/net/rtg/files/patch-etc-95.php - copied unchanged from r484405, head/net/rtg/files/patch-etc-95.php head/net/rtg/files/patch-etc-Makefile.in - copied unchanged from r484405, head/net/rtg/files/patch-etc-Makefile.in head/net/rtg/files/patch-etc-rtg.php - copied unchanged from r484405, head/net/rtg/files/patch-etc-rtg.php head/net/rtg/files/patch-etc-rtgtargmkr.pl.in - copied unchanged from r484405, head/net/rtg/files/patch-etc-rtgtargmkr.pl.in head/net/rtg/files/patch-etc-view.php - copied unchanged from r484405, head/net/rtg/files/patch-etc-view.php head/net/rtg/files/patch-man-rtgplot.1 - copied unchanged from r484405, head/net/rtg/files/patch-man-rtgplot.1 head/net/rtg/files/patch-man-rtgpoll.1 - copied unchanged from r484405, head/net/rtg/files/patch-man-rtgpoll.1 head/net/rtg/files/patch-src-rtg.h - copied unchanged from r484405, head/net/rtg/files/patch-src-rtg.h head/net/rtg/files/patch-src-rtgplot.c - copied unchanged from r484405, head/net/rtg/files/patch-src-rtgplot.c head/net/rtg/files/patch-src-rtgplot.h - copied unchanged from r484405, head/net/rtg/files/patch-src-rtgplot.h head/net/rtg/files/patch-src-rtgpoll.c - copied unchanged from r484405, head/net/rtg/files/patch-src-rtgpoll.c Deleted: head/net/rtg/files/patch-cgilib-0.4_cgi.c head/net/rtg/files/patch-config_config.h.in head/net/rtg/files/patch-etc_95.php head/net/rtg/files/patch-etc_Makefile.in head/net/rtg/files/patch-etc_SNMP__util.pm head/net/rtg/files/patch-etc_createdb.in head/net/rtg/files/patch-etc_rtg.conf head/net/rtg/files/patch-etc_rtg.php head/net/rtg/files/patch-etc_rtgtargmkr.pl.in head/net/rtg/files/patch-etc_view.php head/net/rtg/files/patch-man_rtgplot.1 head/net/rtg/files/patch-man_rtgpoll.1 head/net/rtg/files/patch-src_rtg.h head/net/rtg/files/patch-src_rtgplot.c head/net/rtg/files/patch-src_rtgplot.h head/net/rtg/files/patch-src_rtgpoll.c head/net/rtg/files/patch-src_rtgutil.c Modified: head/net/rtg/Makefile head/net/rtg/files/patch-etc_95.pl head/net/rtg/files/patch-etc_common.php.in head/net/rtg/files/patch-etc_report.pl Modified: head/net/rtg/Makefile ============================================================================== --- head/net/rtg/Makefile Wed Nov 7 20:15:21 2018 (r484407) +++ head/net/rtg/Makefile Wed Nov 7 20:24:10 2018 (r484408) @@ -3,7 +3,7 @@ PORTNAME= rtg PORTVERSION= 0.7.4 -PORTREVISION= 15 +PORTREVISION= 16 CATEGORIES= net MASTER_SITES= SF \ ftp://ftpmirror.uk/freebsd-ports/rtg/ @@ -17,13 +17,9 @@ LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI \ p5-DBD-mysql>=0:databases/p5-DBD-mysql -FLAVORS= web noweb -noweb_PKGNAMESUFFIX= poller -web_PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} - -USES= shebangfix perl5 mysql:client ssl USE_RC_SUBR= rtgpoll - +WANT_PERL= yes +USES= shebangfix mysql:client ssl SHEBANG_FILES= etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in SUB_FILES= pkg-message GNU_CONFIGURE= yes @@ -34,21 +30,18 @@ CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/${PORTNAME USERS= rtg GROUPS= rtg -.if ${FLAVOR:U} == web -USES+= php:web,flavors -USE_PHP= mysqli spl -.endif - -OPTIONS_DEFINE= MYSQL +OPTIONS_DEFINE= WEB MYSQL +OPTIONS_DEFAULT=WEB MYSQL_DESC= Pull MySQL server in as a dependancy for local setups +WEB_DESC= Include PHP-based web client interface pre-requisites MYSQL_USES= mysql:server +WEB_USES= php +USE_PHP= mysqli spl + CFLAGS+= -fstack-protector LDFLAGS+= -fstack-protector - -pre-configure: - ${REINPLACE_CMD} -e 's/my_thread_init/mysql_thread_init/' ${WRKSRC}/configure post-patch: @${MV} ${WRKSRC}/etc/rtg.conf ${WRKSRC}/etc/rtg.conf.sample Copied: head/net/rtg/files/patch-cgilib-cgi.c (from r484405, head/net/rtg/files/patch-cgilib-cgi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/rtg/files/patch-cgilib-cgi.c Wed Nov 7 20:24:10 2018 (r484408, copy of r484405, head/net/rtg/files/patch-cgilib-cgi.c) @@ -0,0 +1,15 @@ +--- cgilib-0.4/cgi.c.orig Thu Sep 25 08:21:06 2003 ++++ cgilib-0.4/cgi.c Sat May 14 01:28:33 2005 +@@ -33,9 +33,12 @@ + #ifdef HAVE_CTYPE_H + # include + #endif ++/* Unnecessary on FreeBSD; malloc.h included in stdlib.h */ ++/* + #ifdef HAVE_MALLOC_H + # include + #endif ++*/ + + #include + Copied: head/net/rtg/files/patch-config-config.h.in (from r484405, head/net/rtg/files/patch-config-config.h.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/rtg/files/patch-config-config.h.in Wed Nov 7 20:24:10 2018 (r484408, copy of r484405, head/net/rtg/files/patch-config-config.h.in) @@ -0,0 +1,27 @@ +--- config/config.h.in.orig 2003-09-25 15:21:14 UTC ++++ config/config.h.in +@@ -91,19 +91,19 @@ + #undef PACKAGE + + /* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT ++#undef RTG_PACKAGE_BUGREPORT + + /* Define to the full name of this package. */ +-#undef PACKAGE_NAME ++#undef RTG_PACKAGE_NAME + + /* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING ++#undef RTG_PACKAGE_STRING + + /* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME ++#undef RTG_PACKAGE_TARNAME + + /* Define to the version of this package. */ +-#undef PACKAGE_VERSION ++#undef RTG_PACKAGE_VERSION + + /* Define as the return type of signal handlers (`int' or `void'). */ + #undef RETSIGTYPE Copied: head/net/rtg/files/patch-etc-95.php (from r484405, head/net/rtg/files/patch-etc-95.php) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/rtg/files/patch-etc-95.php Wed Nov 7 20:24:10 2018 (r484408, copy of r484405, head/net/rtg/files/patch-etc-95.php) @@ -0,0 +1,72 @@ +--- etc/95.php.orig 2003-09-24 20:40:57 UTC ++++ etc/95.php +@@ -4,10 +4,8 @@ + print "\n\n\n"; + + /* Connect to RTG MySQL Database */ +- $dbc=@mysql_connect ($host, $user, $pass) or +- $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or ++ $dbc=@mysqli_connect ($host, $user, $pass, $db) or + die ("MySQL Connection Failed, Check Configuration."); +- mysql_select_db($db,$dbc); + + if ($PHP_SELF == "") { + $PHP_SELF = "95.php"; +@@ -50,8 +48,8 @@ function int_stats($statement, $dbc) { + $max = $avg = $nintyfifth = 0; + $rate = array(); + +- $selectResult=mysql_query($statement, $dbc); +- while ($selectRow=mysql_fetch_object($selectResult)){ ++ $selectResult=mysqli_query($dbc, $statement); ++ while ($selectRow=mysqli_fetch_object($selectResult)){ + $counter = $selectRow->counter; + $sample_secs = $selectRow->unixtime; + $total += $counter; +@@ -89,9 +87,8 @@ Report: 95th percentile
+ \n"; + if (($bt || $smonth)) { +- $dbc=@mysql_connect ($host, $user, $pass) or +- $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or die ("MySQL Connection Failed, Check Configuration."); +- mysql_select_db($db,$dbc); ++ $dbc=@mysqli_connect ($host, $user, $pass, $db) or ++ die ("MySQL Connection Failed, Check Configuration."); + /* Format into GNU date syntax */ + if ($bt == "") { + $bt = strtotime("$syear-$smonth-$sday $shour:$smin:00"); +@@ -104,11 +101,11 @@ Report: 95th percentile
+ $range="dtime>FROM_UNIXTIME($bt) AND dtime<=FROM_UNIXTIME($et)"; + + $selectQuery="SELECT id, name, description, rid FROM interface WHERE description LIKE \"%$customer%\""; +- $selectResult=mysql_query($selectQuery, $dbc); +- if (mysql_num_rows($selectResult) <= 0) ++ $selectResult=mysqli_query($dbc, $selectQuery); ++ if (mysqli_num_rows($selectResult) <= 0) + print "
No Such Customer Found.
\n"; + else { +- while ($selectRow=mysql_fetch_object($selectResult)){ ++ while ($selectRow=mysqli_fetch_object($selectResult)){ + $ids[$selectRow->id] = $selectRow->name; + $rids[$selectRow->id] = $selectRow->rid; + $desc[$selectRow->id] = $selectRow->description; +@@ -127,8 +124,8 @@ Report: 95th percentile
+ foreach($ids as $iid=>$name) { + + $selectQuery="SELECT name FROM router WHERE rid=$rids[$iid]"; +- $selectResult=mysql_query($selectQuery, $dbc); +- $selectRow=mysql_fetch_object($selectResult); ++ $selectResult=mysqli_query($dbc, $selectQuery); ++ $selectRow=mysqli_fetch_object($selectResult); + $router = $selectRow->name; + + if ($yellow) $yellow = 0; +@@ -201,7 +198,7 @@ Report: 95th percentile
+ echo "

"; + } + +- if ($dbc) mysql_close($dbc); ++ if ($dbc) mysqli_close($dbc); + echo "\n"; + ?> +
Copied: head/net/rtg/files/patch-etc-Makefile.in (from r484405, head/net/rtg/files/patch-etc-Makefile.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/rtg/files/patch-etc-Makefile.in Wed Nov 7 20:24:10 2018 (r484408, copy of r484405, head/net/rtg/files/patch-etc-Makefile.in) @@ -0,0 +1,49 @@ +--- etc/Makefile.in.orig 2003-10-02 15:59:32 UTC ++++ etc/Makefile.in +@@ -84,19 +84,19 @@ am__quote = @am__quote@ + install_sh = @install_sh@ + + top_builddir = .. +-etcdir = /etc +-webdir = /web +-reportsdir = /bin ++etcdir = @etcdir@ ++webdir = @webdir@ ++reportsdir = @bindir@ + +-ETC = rtg.conf rtgtargmkr.pl routers createdb BER.pm \ ++ETC = rtg.conf.sample rtgtargmkr.pl routers.sample createdb BER.pm \ + SNMP_Session.pm SNMP_util.pm + + WEB = rtg.php 95.php view.php common.php rtg.png rtgback.png + REPORTS = report.pl 95.pl + + EXTRA_DIST = rtgtargmkr.pl.in report.pl 95.pl createdb.in \ +- BER.pm SNMP_Session.pm SNMP_util.pm rtg.conf \ +- routers rtg.php 95.php view.php common.php.in rtg.png rtgback.png ++ BER.pm SNMP_Session.pm SNMP_util.pm rtg.conf.sample \ ++ routers.sample rtg.php 95.php view.php common.php.in rtg.png rtgback.png + + subdir = etc + mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +@@ -220,14 +220,14 @@ uninstall-am: uninstall-info-am + all: + + install: installdirs +- @for i in $(ETC) ; do $(INSTALL) $(srcdir)/$$i $(prefix)$(etcdir) ; echo "install: installed $$i in $(prefix)$(etcdir)" ; done +- @for i in $(WEB) ; do $(INSTALL) $(srcdir)/$$i $(prefix)$(webdir) ; echo "install: installed $$i in $(prefix)$(webdir)" ; done +- @for i in $(REPORTS) ; do $(INSTALL) $(srcdir)/$$i $(prefix)$(reportsdir) ; echo "install: installed $$i in $(prefix)$(reportsdir)" ; done ++ @for i in $(ETC) ; do $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(etcdir) ; echo "install: installed $$i in $(DESTDIR)$(etcdir)" ; done ++ @for i in $(WEB) ; do $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(webdir) ; echo "install: installed $$i in $(DESTDIR)$(webdir)" ; done ++ @for i in $(REPORTS) ; do $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(reportsdir) ; echo "install: installed $$i in $(DESTDIR)$(reportsdir)" ; done + + installdirs: +- $(mkinstalldirs) $(prefix)$(etcdir) +- $(mkinstalldirs) $(prefix)$(webdir) +- $(mkinstalldirs) $(prefix)$(reportsdir) ++ $(mkinstalldirs) $(DESTDIR)$(etcdir) ++ $(mkinstalldirs) $(DESTDIR)$(webdir) ++ $(mkinstalldirs) $(DESTDIR)$(reportsdir) + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: Copied: head/net/rtg/files/patch-etc-rtg.php (from r484405, head/net/rtg/files/patch-etc-rtg.php) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/rtg/files/patch-etc-rtg.php Wed Nov 7 20:24:10 2018 (r484408, copy of r484405, head/net/rtg/files/patch-etc-rtg.php) @@ -0,0 +1,122 @@ +--- etc/rtg.php.orig 2003-09-24 20:42:03 UTC ++++ etc/rtg.php +@@ -4,10 +4,8 @@ + print "\n\n\n"; + + /* Connect to RTG MySQL Database */ +- $dbc=@mysql_connect ($host, $user, $pass) or +- $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or ++ $dbc=@mysqli_connect ($host, $user, $pass, $db) or + die ("MySQL Connection Failed, Check Configuration."); +- mysql_select_db($db,$dbc); + + if ($PHP_SELF == "") { + $PHP_SELF = "rtg.php"; +@@ -37,17 +35,17 @@ + # Determine router, interface names as necessary + if ($rid && $iid) { + $selectQuery="SELECT a.name, a.description, a.speed, b.name AS router FROM interface a, router b WHERE a.rid=b.rid AND a.rid=$rid AND a.id=$iid[0]"; +- $selectResult=mysql_query($selectQuery, $dbc); +- $selectRow=mysql_fetch_object($selectResult); +- $interfaces = mysql_num_rows($selectResult); ++ $selectResult=mysqli_query($dbc, $selectQuery); ++ $selectRow=mysqli_fetch_object($selectResult); ++ $interfaces = mysqli_num_rows($selectResult); + $name = $selectRow->name; + $description = $selectRow->description; + $speed = ($selectRow->speed)/1000000; + $router = $selectRow->router; + } else if ($rid && !$iid) { + $selectQuery="SELECT name AS router from router where rid=$rid"; +- $selectResult=mysql_query($selectQuery, $dbc); +- $selectRow=mysql_fetch_object($selectResult); ++ $selectResult=mysqli_query($dbc, $selectQuery); ++ $selectRow=mysqli_fetch_object($selectResult); + $router = $selectRow->router; + } + +@@ -71,8 +69,8 @@ echo "

\n"; + $selectQuery="SELECT DISTINCT name, rid FROM router ORDER BY name"; +- $selectResult=mysql_query($selectQuery, $dbc); +- while ($selectRow=mysql_fetch_object($selectResult)){ ++ $selectResult=mysqli_query($dbc, $selectQuery); ++ while ($selectRow=mysqli_fetch_object($selectResult)){ + echo "