From owner-svn-ports-all@freebsd.org Wed Oct 26 07:01:18 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16E98C22C4B; Wed, 26 Oct 2016 07:01:18 +0000 (UTC) (envelope-from matthew@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 mx1.freebsd.org (Postfix) with ESMTPS id B4876BB0; Wed, 26 Oct 2016 07:01:17 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9Q71HA6091384; Wed, 26 Oct 2016 07:01:17 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9Q71FUV091368; Wed, 26 Oct 2016 07:01:15 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201610260701.u9Q71FUV091368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Wed, 26 Oct 2016 07:01:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424678 - in head: . net/rtg net/rtg/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 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, 26 Oct 2016 07:01:18 -0000 Author: matthew Date: Wed Oct 26 07:01:15 2016 New Revision: 424678 URL: https://svnweb.freebsd.org/changeset/ports/424678 Log: Improve RTG port Summary: Add 'rtg' user and group in UIDs/GIDs. Use daemon(8) to daemonize rtgpoll. Add prestart commands to set correct permissions for RTG's files. Reviewers: swills, allanjude, xmj, andrew.fengler_scaleengine.com, #contributor_reviewers_ports, matthew Reviewed By: #contributor_reviewers_ports, matthew Subscribers: matthew, mat Differential Revision: https://reviews.freebsd.org/D7486 Modified: head/GIDs head/UIDs head/net/rtg/Makefile head/net/rtg/files/patch-config-config.h.in head/net/rtg/files/patch-configure head/net/rtg/files/patch-etc-95.php head/net/rtg/files/patch-etc-Makefile.in 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-rtgpoll.c head/net/rtg/files/rtgpoll.in Modified: head/GIDs ============================================================================== --- head/GIDs Wed Oct 26 05:51:06 2016 (r424677) +++ head/GIDs Wed Oct 26 07:01:15 2016 (r424678) @@ -219,7 +219,7 @@ meta1:*:264: haclient:*:275: frontbase:*:276: # free: 277 -# free: 278 +rtg:*:278: mrtg:*:279: xymon:*:280: prelude:*:281: Modified: head/UIDs ============================================================================== --- head/UIDs Wed Oct 26 05:51:06 2016 (r424677) +++ head/UIDs Wed Oct 26 07:01:15 2016 (r424678) @@ -224,7 +224,7 @@ meta1:*:264:264::0:0:MeTA1 other:/nonexi hacluster:*:275:275::0:0:Heartbeat cluster user:/nonexistent:/usr/sbin/nologin frontbase:*:276:276::0:0:FrontBase Daemon:/usr/local/FrontBase/Databases:/bin/sh # free: 277 -# free: 278 +rtg:*:278:278::0:0:RTG daemon:/nonexistent:/usr/sbin/nologin mrtg:*:279:279::0:0:MRTG daemon:/nonexistent:/usr/sbin/nologin xymon:*:280:280::0:0:Xymon Monitor:/nonexistent:/usr/sbin/nologin prelude:*:281:281::0:0:Prelude user:/nonexistent:/usr/sbin/nologin Modified: head/net/rtg/Makefile ============================================================================== --- head/net/rtg/Makefile Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/Makefile Wed Oct 26 07:01:15 2016 (r424678) @@ -3,7 +3,7 @@ PORTNAME= rtg PORTVERSION= 0.7.4 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= net MASTER_SITES= SF \ ftp://ftpmirror.uk/freebsd-ports/rtg/ @@ -18,30 +18,27 @@ RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI p5-DBD-mysql>=0:databases/p5-DBD-mysql USE_RC_SUBR= rtgpoll -USE_MYSQL= client WANT_PERL= yes -USES= shebangfix +USES= shebangfix mysql:client SHEBANG_FILES= etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in SUB_FILES= pkg-message GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/${PORTNAME} \ --with-mysql=${LOCALBASE} \ --with-snmp=${LOCALBASE} + +USERS= rtg +GROUPS= rtg + 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 -.include - -.if ${PORT_OPTIONS:MMYSQL} -USE_MYSQL= yes -.endif +MYSQL_USES= mysql:server -.if ${PORT_OPTIONS:MWEB} -WANT_PHP_WEB= yes +WEB_USES= php USE_PHP= mysqli spl -.endif CFLAGS+= -fstack-protector LDFLAGS+= -fstack-protector Modified: head/net/rtg/files/patch-config-config.h.in ============================================================================== --- head/net/rtg/files/patch-config-config.h.in Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/files/patch-config-config.h.in Wed Oct 26 07:01:15 2016 (r424678) @@ -1,5 +1,5 @@ ---- config/config.h.in.orig Thu Sep 25 08:21:14 2003 -+++ config/config.h.in Sat May 14 01:31:47 2005 +--- config/config.h.in.orig 2003-09-25 15:21:14 UTC ++++ config/config.h.in @@ -91,19 +91,19 @@ #undef PACKAGE Modified: head/net/rtg/files/patch-configure ============================================================================== --- head/net/rtg/files/patch-configure Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/files/patch-configure Wed Oct 26 07:01:15 2016 (r424678) @@ -1,6 +1,6 @@ ---- configure.ori Tue Jan 6 22:43:17 2004 -+++ configure Tue Jan 6 22:47:06 2004 -@@ -328,6 +328,8 @@ +--- configure.orig 2003-10-02 15:59:33 UTC ++++ configure +@@ -328,6 +328,8 @@ sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' @@ -9,7 +9,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' -@@ -558,6 +560,12 @@ +@@ -558,6 +560,12 @@ do | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; @@ -22,7 +22,7 @@ -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) -@@ -654,7 +662,8 @@ +@@ -654,7 +662,8 @@ done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ @@ -32,7 +32,7 @@ do eval ac_val=$`echo $ac_var` case $ac_val in -@@ -5310,6 +5319,8 @@ +@@ -5310,6 +5319,8 @@ s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t Modified: head/net/rtg/files/patch-etc-95.php ============================================================================== --- head/net/rtg/files/patch-etc-95.php Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/files/patch-etc-95.php Wed Oct 26 07:01:15 2016 (r424678) @@ -1,5 +1,5 @@ ---- etc/95.php.orig 2014-06-22 15:27:55.587467922 +0100 -+++ etc/95.php 2014-06-22 15:28:47.947474934 +0100 +--- etc/95.php.orig 2003-09-24 20:40:57 UTC ++++ etc/95.php @@ -4,10 +4,8 @@ print "\n\n\n"; @@ -12,7 +12,7 @@ if ($PHP_SELF == "") { $PHP_SELF = "95.php"; -@@ -50,8 +48,8 @@ +@@ -50,8 +48,8 @@ function int_stats($statement, $dbc) { $max = $avg = $nintyfifth = 0; $rate = array(); @@ -23,7 +23,7 @@ $counter = $selectRow->counter; $sample_secs = $selectRow->unixtime; $total += $counter; -@@ -89,9 +87,8 @@ +@@ -89,9 +87,8 @@ Report: 95th percentile
\n"; if (($bt || $smonth)) { @@ -35,7 +35,7 @@ /* Format into GNU date syntax */ if ($bt == "") { $bt = strtotime("$syear-$smonth-$sday $shour:$smin:00"); -@@ -104,11 +101,11 @@ +@@ -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%\""; @@ -50,7 +50,7 @@ $ids[$selectRow->id] = $selectRow->name; $rids[$selectRow->id] = $selectRow->rid; $desc[$selectRow->id] = $selectRow->description; -@@ -127,8 +124,8 @@ +@@ -127,8 +124,8 @@ Report: 95th percentile
foreach($ids as $iid=>$name) { $selectQuery="SELECT name FROM router WHERE rid=$rids[$iid]"; @@ -61,7 +61,7 @@ $router = $selectRow->name; if ($yellow) $yellow = 0; -@@ -201,7 +198,7 @@ +@@ -201,7 +198,7 @@ Report: 95th percentile
echo "

"; } Modified: head/net/rtg/files/patch-etc-Makefile.in ============================================================================== --- head/net/rtg/files/patch-etc-Makefile.in Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/files/patch-etc-Makefile.in Wed Oct 26 07:01:15 2016 (r424678) @@ -1,6 +1,6 @@ ---- etc/Makefile.in.orig 2003-10-02 16:59:32.000000000 +0100 -+++ etc/Makefile.in 2014-05-10 17:29:11.995407415 +0100 -@@ -84,19 +84,19 @@ +--- 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 = .. @@ -26,7 +26,7 @@ subdir = etc mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs -@@ -220,14 +220,14 @@ +@@ -220,14 +220,14 @@ uninstall-am: uninstall-info-am all: install: installdirs Modified: head/net/rtg/files/patch-etc-rtg.php ============================================================================== --- head/net/rtg/files/patch-etc-rtg.php Wed Oct 26 05:51:06 2016 (r424677) +++ head/net/rtg/files/patch-etc-rtg.php Wed Oct 26 07:01:15 2016 (r424678) @@ -1,5 +1,5 @@ ---- etc/rtg.php.orig 2003-09-24 21:42:03.000000000 +0100 -+++ etc/rtg.php 2014-06-22 15:25:22.471477252 +0100 +--- etc/rtg.php.orig 2003-09-24 20:42:03 UTC ++++ etc/rtg.php @@ -4,10 +4,8 @@ print "\n\n\n"; @@ -35,7 +35,7 @@ $router = $selectRow->router; } -@@ -71,8 +69,8 @@ +@@ -71,8 +69,8 @@ echo "

\n"; $selectQuery="SELECT DISTINCT name, rid FROM router ORDER BY name"; @@ -46,7 +46,7 @@ echo "