From owner-svn-ports-head@FreeBSD.ORG Mon Aug 4 09:18:31 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7C7768F for ; Mon, 4 Aug 2014 09:18:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86FDB2A91 for ; Mon, 4 Aug 2014 09:18:31 +0000 (UTC) Received: from pi (uid 1338) (envelope-from pi@FreeBSD.org) id 5864 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 09:18:28 +0000 From: Kurt Jaeger Date: Mon, 4 Aug 2014 09:18:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r363980 - in head/net-mgmt: . guifi-snpservices guifi-snpservices/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53df4fe4.5864.5f46e4d7@svn.freebsd.org> X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 09:18:31 -0000 Author: pi Date: Mon Aug 4 09:18:27 2014 New Revision: 363980 URL: http://svnweb.freebsd.org/changeset/ports/363980 QAT: https://qat.redports.org/buildarchive/r363980/ Log: New port: net-mgmt/guifi-snpservices This software provides graph services in the context of the Spontaneous Networklink Platform. WWW: http://es.wiki.guifi.net/wiki/SNPservices PR: 189904 Submitted by: tphilipp@potion-studios.com Added: head/net-mgmt/guifi-snpservices/ head/net-mgmt/guifi-snpservices/Makefile (contents, props changed) head/net-mgmt/guifi-snpservices/distinfo (contents, props changed) head/net-mgmt/guifi-snpservices/files/ head/net-mgmt/guifi-snpservices/files/patch-common-config.php.template (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-common-misc.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-common-ping.sh (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-common-qnodes.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-common-refresh_cnml.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-graphs-cnml2mrtgcsv.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/patch-index.php (contents, props changed) head/net-mgmt/guifi-snpservices/files/pkg-deinstall.in (contents, props changed) head/net-mgmt/guifi-snpservices/files/pkg-install.in (contents, props changed) head/net-mgmt/guifi-snpservices/files/pkg-message.in (contents, props changed) head/net-mgmt/guifi-snpservices/pkg-descr (contents, props changed) head/net-mgmt/guifi-snpservices/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Mon Aug 4 09:14:48 2014 (r363979) +++ head/net-mgmt/Makefile Mon Aug 4 09:18:27 2014 (r363980) @@ -78,6 +78,7 @@ SUBDIR += grepcidr SUBDIR += grepip SUBDIR += gsnmp + SUBDIR += guifi-snpservices SUBDIR += hastmon SUBDIR += hawk SUBDIR += horde3-nic Added: head/net-mgmt/guifi-snpservices/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/Makefile Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,33 @@ +# Created by: Tassilo Philipp +# $FreeBSD$ + +PORTNAME= snpservices +DISTVERSION= 0.2.2-5 +CATEGORIES= www +MASTER_SITES= http://serveis.guifi.net/debian/guifi/ \ + http://www.potion-studios.com/ +PKGNAMEPREFIX= guifi- +DISTNAME= ${PORTNAME}_${DISTVERSION} + +MAINTAINER= tphilipp@potion-studios.com +COMMENT= Graphics server for the guifi.net meshnet + +RUN_DEPENDS= mrtg:${PORTSDIR}/net-mgmt/mrtg \ + rrdtool:${PORTSDIR}/databases/rrdtool + +USE_PHP= gd simplexml dom + +SNPSERVICES_TMPDIR?= /var/tmp/${PORTNAME} +SUB_FILES= pkg-install pkg-deinstall pkg-message +SUB_LIST= SNPSERVICES_TMPDIR=${SNPSERVICES_TMPDIR} + +WRKSRC= ${WRKDIR}/${PORTNAME}-0.2.2 +NO_BUILD= yes + +do-install: + ${MKDIR} ${STAGEDIR}${WWWDIR} + (cd ${WRKSRC} \ + && ${COPYTREE_SHARE} \* ${STAGEDIR}${WWWDIR}) + ${FIND} ${STAGEDIR}${WWWDIR} -type f -exec ${CHMOD} 644 '{}' + + +.include Added: head/net-mgmt/guifi-snpservices/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/distinfo Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,2 @@ +SHA256 (snpservices_0.2.2-5.tar.gz) = b08d003221d9d5ad688602a973838a0f83b1c99022a11c1ed08a520de8debb51 +SIZE (snpservices_0.2.2-5.tar.gz) = 185825 Added: head/net-mgmt/guifi-snpservices/files/patch-common-config.php.template ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-config.php.template Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,64 @@ +--- common/config.php.template.orig 2014-02-21 15:53:13.000000000 +0000 ++++ common/config.php.template 2014-04-10 13:41:47.000000000 +0000 +@@ -1,10 +1,10 @@ + Description:ping + IP: %s + +-Target[%s_ping]: `/etc/mrtg/ping.sh %s` ++Target[%s_ping]: `sh '.$snp_path.'/common/ping.sh %s` + MaxBytes[%s_ping]: 2000 + Options[%s_ping]: growright,unknaszero,nopercent,gauge + LegendI[%s_ping]: Perduts % Added: head/net-mgmt/guifi-snpservices/files/patch-common-misc.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-misc.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,20 @@ +--- common/misc.php.orig 2014-04-10 14:05:20.000000000 +0000 ++++ common/misc.php 2014-04-10 14:05:45.000000000 +0000 +@@ -177,7 +177,7 @@ + foreach ($an as $nc) { + $try = 0; + $xml = false; +- $fn = $prefix.'tmp/'.$nc.'.cnml'; ++ $fn = $prefix.'/var/tmp/snpservices/tmp/'.$nc.'.cnml'; + do { + // print " Processing $nc try $try cache: $waitcache\n
"; + if (file_exists($fn)) { +@@ -232,7 +232,7 @@ + if ($xml) { + $xpnxml = $xml->xpath('//node'); + foreach ($xpnxml as $nxml) { +- $fn = $prefix.'tmp/'.$nxml->attributes()->id.'.cnml'; ++ $fn = $prefix.'/var/tmp/snpservices/tmp/'.$nxml->attributes()->id.'.cnml'; + $wcnml = @fopen($fn, "w+") or die("\n
Error caching XML, can't write $fn\n"); + fwrite($wcnml,''.$nxml->asXML().''); + fclose($wcnml); Added: head/net-mgmt/guifi-snpservices/files/patch-common-ping.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-ping.sh Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,22 @@ +--- ./common/ping.sh.orig 2014-02-21 15:53:13.000000000 +0000 ++++ ./common/ping.sh 2014-04-10 14:19:56.000000000 +0000 +@@ -1,15 +1,15 @@ + #!/bin/sh +- PING="/bin/ping" ++ PING="/sbin/ping" + ADDR=$1 +- DATA=`$PING -c5 -i 0.2 $ADDR -q -W 4` ++ DATA=`$PING -c 5 -i 0.2 -q -W 4 $ADDR` + LOSS=`echo $DATA | awk '{print $18 }' | tr -d %` + ERRORS=`echo $DATA | awk '{print $19 }' | tr -d %` +- if [ $ERRORS = "errors," ] ++ if [ "$ERRORS" = "errors," ] + then + LOSS=`echo $DATA | awk '{print $20 }' | tr -d %` + fi + echo $LOSS +- if [ $LOSS = 100 ]; ++ if [ "$LOSS" = 100 ]; + then + echo 0 + else Added: head/net-mgmt/guifi-snpservices/files/patch-common-qnodes.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-qnodes.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,11 @@ +--- common/qnodes.php.orig 2014-04-10 12:44:55.000000000 +0000 ++++ common/qnodes.php 2014-04-10 12:45:28.000000000 +0000 +@@ -19,7 +19,7 @@ + // Opening CNML source + $doc = new DOMDocument; + $doc->preserveWhiteSpace = false; +-$doc->Load('../data/guifi.cnml'); ++$doc->Load('/var/tmp/snpservices/data/guifi.cnml'); + + // building the xpath query for requested nodes + $xpath = new DOMXPath($doc); Added: head/net-mgmt/guifi-snpservices/files/patch-common-refresh_cnml.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-refresh_cnml.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,19 @@ +--- common/refresh_cnml.php.orig 2014-04-10 12:41:40.000000000 +0000 ++++ common/refresh_cnml.php 2014-04-10 12:43:16.000000000 +0000 +@@ -27,14 +27,14 @@ + echo "Getting CNML file\n"; + $hcnml = @fopen($SNPDataServer_url."/guifi/cnml/".$rootZone."/detail", "r") + or die ('Error redaing CNML source\n'); +- $wcnml = @fopen("../data/guifi.cnml.tmp", "w"); ++ $wcnml = @fopen("/var/tmp/snpservices/data/guifi.cnml.tmp", "w"); + while (!feof($hcnml)) { + $buffer = fgets($hcnml, 4096); + fwrite($wcnml,$buffer); + } + fclose($hcnml); + fclose($wcnml); +- exec ("/bin/cp ../data/guifi.cnml.tmp ../data/guifi.cnml"); ++ exec ("/bin/cp /var/tmp/snpservices/data/guifi.cnml.tmp /var/tmp/snpservices/data/guifi.cnml"); + + $hlast= @fopen("/tmp/last_update.cnml", "w") or die('Error!'); + fwrite($hlast,$last_now); Added: head/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,11 @@ +--- common/refresh_mrtg.php.orig 2014-04-10 12:44:08.000000000 +0000 ++++ common/refresh_mrtg.php 2014-04-10 12:44:27.000000000 +0000 +@@ -29,7 +29,7 @@ + + echo "Getting MRTG CSV file\n"; + $hcnml = @fopen($MRTGConfigSource, "r"); +- $wcnml = @fopen("../data/guifi_mrtg.csv", "w"); ++ $wcnml = @fopen("/var/tmp/snpservices/data/guifi_mrtg.csv", "w"); + while (!feof($hcnml)) { + $buffer = fgets($hcnml, 4096); + fwrite($wcnml,$buffer); Added: head/net-mgmt/guifi-snpservices/files/patch-graphs-cnml2mrtgcsv.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-graphs-cnml2mrtgcsv.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,11 @@ +--- graphs/cnml2mrtgcsv.php.orig 2014-04-10 12:35:09.000000000 +0000 ++++ graphs/cnml2mrtgcsv.php 2014-04-10 12:35:19.000000000 +0000 +@@ -267,7 +267,7 @@ + // Opening CNML source + $cnml = new DOMDocument; + $cnml->preserveWhiteSpace = false; +-$cnml->Load('../data/guifi.cnml'); ++$cnml->Load('/var/tmp/snpservices/data/guifi.cnml'); + $time_s = microtime(true); + //print "# file guifi.cnml loaded".($time_s - $time_start)."\n"; + Added: head/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,24 @@ +--- graphs/mrtgcsv2mrtgcfg.php.orig 2014-02-21 15:53:13.000000000 +0000 ++++ graphs/mrtgcsv2mrtgcfg.php 2014-04-10 12:35:33.000000000 +0000 +@@ -1,9 +1,9 @@ + > /var/log/snpservices_mrtgcfg.log 2>&1; fi +*/5 * * * * root if [ -x %%PREFIX%%/bin/mrtg ] && [ -r /var/tmp/snpservices/data/mrtg.cfg ]; then env LANG=C %%PREFIX%%/bin/mrtg /var/tmp/snpservices/data/mrtg.cfg --lock-file /var/tmp/mrtg/lockfile_guifi >> /var/log/snpservices_mrtg.log 2>&1; fi + +4) consider logrotating /var/log/snpservices_*.log + +For more information, see various guifi.net doc pages, and related: + + http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas + http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas_1 + http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas_2 + http://www3.uji.es/~vrubert/guifi_linux/graph.html#slide1 + http://es.wiki.guifi.net/wiki/Monitor + http://guifi.net/ca/node/9071 + +------------------------------------------------ + Added: head/net-mgmt/guifi-snpservices/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/pkg-descr Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,11 @@ +This is the guifi.net snpservices package. + +This software provides graph services in the context of the +Spontaneous Networklink Platform. + +Uses nodexchange/cnml as a input format, and provides traffic and +latency/availability graphs in image format by using mrtg/rrdtool +collected history by simple HTTP URLs, therefore is easily +plugable to any web application. + +WWW: http://es.wiki.guifi.net/wiki/SNPservices Added: head/net-mgmt/guifi-snpservices/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/guifi-snpservices/pkg-plist Mon Aug 4 09:18:27 2014 (r363980) @@ -0,0 +1,63 @@ +%%WWWDIR%%/README +%%WWWDIR%%/common/cnml2ov2.php +%%WWWDIR%%/common/config.php.template +%%WWWDIR%%/common/config.php.template.orig +%%WWWDIR%%/common/misc.php +%%WWWDIR%%/common/misc.php.orig +%%WWWDIR%%/common/mrtg.sh +%%WWWDIR%%/common/ping.sh +%%WWWDIR%%/common/ping.sh.orig +%%WWWDIR%%/common/qnodes.php +%%WWWDIR%%/common/qnodes.php.orig +%%WWWDIR%%/common/refresh.sh +%%WWWDIR%%/common/refresh_cnml.php +%%WWWDIR%%/common/refresh_cnml.php.orig +%%WWWDIR%%/common/refresh_mrtg.php +%%WWWDIR%%/common/refresh_mrtg.php.orig +%%WWWDIR%%/common/rrdtool.php +%%WWWDIR%%/debian/README.Debian +%%WWWDIR%%/debian/changelog +%%WWWDIR%%/debian/compat +%%WWWDIR%%/debian/control +%%WWWDIR%%/debian/copyright +%%WWWDIR%%/debian/cron.d +%%WWWDIR%%/debian/dirs +%%WWWDIR%%/debian/docs +%%WWWDIR%%/debian/rules +%%WWWDIR%%/debian/snpservices.1 +%%WWWDIR%%/debian/snpservices.config +%%WWWDIR%%/debian/snpservices.install +%%WWWDIR%%/debian/snpservices.logrotate +%%WWWDIR%%/debian/snpservices.manpages +%%WWWDIR%%/debian/snpservices.postinst +%%WWWDIR%%/debian/snpservices.postrm +%%WWWDIR%%/debian/snpservices.templates +%%WWWDIR%%/debian/watch.ex +%%WWWDIR%%/graphs/LICENSE.txt +%%WWWDIR%%/graphs/cnml2mrtgcsv.php +%%WWWDIR%%/graphs/cnml2mrtgcsv.php.orig +%%WWWDIR%%/graphs/config.php +%%WWWDIR%%/graphs/graphs.php +%%WWWDIR%%/graphs/mrtgcsv2mrtgcfg.php +%%WWWDIR%%/graphs/mrtgcsv2mrtgcfg.php.orig +%%WWWDIR%%/graphs/refresh.php +%%WWWDIR%%/index.php +%%WWWDIR%%/index.php.orig +%%WWWDIR%%/misc/xml2ov2.php +%%WWWDIR%%/services/availability.php +%%WWWDIR%%/services/example.php +%%WWWDIR%%/services/graph.php +%%WWWDIR%%/services/liveping.php +%%WWWDIR%%/services/livetraceroute.php +%%WWWDIR%%/services/stats.php +%%WWWDIR%%/tools/guinux/config.php.guinux +%%WWWDIR%%/tools/guinux/snpconfig.pl +%%WWWDIR%%/tools/guinux/snpservices.conf +@dirrmtry %%WWWDIR%%/tools/guinux +@dirrmtry %%WWWDIR%%/tools +@dirrmtry %%WWWDIR%%/services +@dirrmtry %%WWWDIR%%/misc +@dirrmtry %%WWWDIR%%/graphs +@dirrmtry %%WWWDIR%%/debian +@dirrmtry %%WWWDIR%%/common +@dirrmtry %%WWWDIR%%