From owner-svn-ports-all@FreeBSD.ORG Mon Jul 14 14:17:02 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E8B413C; Mon, 14 Jul 2014 14:17:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0A9432C6D; Mon, 14 Jul 2014 14:17:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EEH18b093558; Mon, 14 Jul 2014 14:17:01 GMT (envelope-from feld@svn.freebsd.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EEH1Ia093554; Mon, 14 Jul 2014 14:17:01 GMT (envelope-from feld@svn.freebsd.org) Message-Id: <201407141417.s6EEH1Ia093554@svn.freebsd.org> From: Mark Felder Date: Mon, 14 Jul 2014 14:17:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r361779 - in head/net-mgmt/smokeping: . 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.18 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: Mon, 14 Jul 2014 14:17:02 -0000 Author: feld Date: Mon Jul 14 14:17:01 2014 New Revision: 361779 URL: http://svnweb.freebsd.org/changeset/ports/361779 QAT: https://qat.redports.org/buildarchive/r361779/ Log: - Update to new LIB_DEPENDS format - Support STAGE - Clean up rc script - Move example configs to new .sample naming convention Sponsored by: SupraNet Communications, Inc Modified: head/net-mgmt/smokeping/Makefile head/net-mgmt/smokeping/files/smokeping.in head/net-mgmt/smokeping/pkg-plist Modified: head/net-mgmt/smokeping/Makefile ============================================================================== --- head/net-mgmt/smokeping/Makefile Mon Jul 14 14:09:08 2014 (r361778) +++ head/net-mgmt/smokeping/Makefile Mon Jul 14 14:17:01 2014 (r361779) @@ -3,6 +3,7 @@ PORTNAME= smokeping PORTVERSION= 2.6.9 +PORTREVISION= 1 CATEGORIES= net-mgmt www MASTER_SITES= http://oss.oetiker.ch/smokeping/pub/ \ http://smokeping.cs.pu.edu.tw/pub/ @@ -10,7 +11,9 @@ MASTER_SITES= http://oss.oetiker.ch/smok MAINTAINER= rodrigo@FreeBSD.org COMMENT= Latency logging and graphing system -LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool +LICENSE= GPLv2 + +LIB_DEPENDS= librrd.so:${PORTSDIR}/databases/rrdtool BUILD_DEPENDS= p5-CGI-Session>=0:${PORTSDIR}/www/p5-CGI-Session \ p5-Digest-HMAC>=0:${PORTSDIR}/security/p5-Digest-HMAC \ p5-SNMP_Session>=0:${PORTSDIR}/net-mgmt/p5-SNMP_Session \ @@ -32,69 +35,6 @@ HTDOCSDIR= ${PREFIX}/smokeping/htdocs USE_RC_SUBR= smokeping -MAN1= smokeping.1 \ - smokeping_cgi.1 \ - tSmoke.1 -MAN3= Smokeping_matchers_Avgratio.3 \ - Smokeping_matchers_CheckLatency.3 \ - Smokeping_matchers_CheckLoss.3 \ - Smokeping_matchers_ExpLoss.3 \ - Smokeping_matchers_Median.3 \ - Smokeping_matchers_Medratio.3 \ - Smokeping_matchers_base.3 \ - Smokeping_probes_AnotherDNS.3 \ - Smokeping_probes_AnotherSSH.3 \ - Smokeping_probes_CiscoRTTMonDNS.3 \ - Smokeping_probes_CiscoRTTMonEchoICMP.3 \ - Smokeping_probes_CiscoRTTMonTcpConnect.3 \ - Smokeping_probes_Curl.3 \ - Smokeping_probes_DNS.3 \ - Smokeping_probes_DismanPing.3 \ - Smokeping_probes_EchoPing.3 \ - Smokeping_probes_EchoPingChargen.3 \ - Smokeping_probes_EchoPingDNS.3 \ - Smokeping_probes_EchoPingDiscard.3 \ - Smokeping_probes_EchoPingHttp.3 \ - Smokeping_probes_EchoPingHttps.3 \ - Smokeping_probes_EchoPingIcp.3 \ - Smokeping_probes_EchoPingLDAP.3 \ - Smokeping_probes_EchoPingPlugin.3 \ - Smokeping_probes_EchoPingSmtp.3 \ - Smokeping_probes_EchoPingWhois.3 \ - Smokeping_probes_FPing.3 \ - Smokeping_probes_FPing6.3 \ - Smokeping_probes_FTPtransfer.3 \ - Smokeping_probes_IOSPing.3 \ - Smokeping_probes_LDAP.3 \ - Smokeping_probes_NFSping.3 \ - Smokeping_probes_OpenSSHJunOSPing.3 \ - Smokeping_probes_Radius.3 \ - Smokeping_probes_RemoteFPing.3 \ - Smokeping_probes_SendEmail.3 \ - Smokeping_probes_SSH.3 \ - Smokeping_probes_SipSak.3 \ - Smokeping_probes_TCPPing.3 \ - Smokeping_probes_TacacsPlus.3 \ - Smokeping_probes_TelnetIOSPing.3 \ - Smokeping_probes_TelnetJunOSPing.3 \ - Smokeping_probes_WebProxyFilter.3 \ - Smokeping_probes_base.3 \ - Smokeping_probes_basefork.3 \ - Smokeping_probes_basevars.3 \ - Smokeping_probes_passwordchecker.3 \ - Smokeping_probes_skel.3 \ - Smokeping_sorters_Loss.3 \ - Smokeping_sorters_Max.3 \ - Smokeping_sorters_Median.3 \ - Smokeping_sorters_StdDev.3 \ - Smokeping_sorters_base.3 -MAN5= smokeping_config.5 \ - smokeping_examples.5 -MAN7= smokeping_extend.7 \ - smokeping_install.7 \ - smokeping_master_slave.7 \ - smokeping_upgrade.7 - PKGDEINSTALL= ${WRKDIR}/pkg-deinstall USERS= smokeping @@ -116,7 +56,6 @@ DNS_DESC= Support for AnotherDNS probes OPTIONS_DEFINE= ECHOPING CURL RADIUS TELNET DNS FPING LDAP LDAPSSL OPTIONS_DEFAULT= FPING -NO_STAGE= yes .include .if ${PORT_OPTIONS:MFPING} @@ -165,14 +104,14 @@ post-patch: ${WRKSRC}/bin/tSmoke post-install: -.for FILE in basepage.html config smokemail tmail - [ -f ${ETCDIR}/${FILE} ] || ${CP} ${ETCDIR}/${FILE}.dist ${ETCDIR}/${FILE} +.for FILE in basepage.html config smokemail smokeping_secrets tmail + ${MV} ${STAGEDIR}/${ETCDIR}/${FILE}.dist ${STAGEDIR}/${ETCDIR}/${FILE}.sample .endfor - [ -f ${PREFIX}/smokeping/htdocs/smokeping.fcgi ] || ${CP} ${PREFIX}/smokeping/htdocs/smokeping.fcgi.dist ${PREFIX}/smokeping/htdocs/smokeping.fcgi - ${MKDIR} ${PREFIX}/smokeping/htdocs/img - ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/smokeping/htdocs - ${MKDIR} ${PREFIX}/var/smokeping - ${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/var/smokeping + ${MV} ${STAGEDIR}/${PREFIX}/smokeping/htdocs/smokeping.fcgi.dist ${STAGEDIR}/${PREFIX}/smokeping/htdocs/smokeping.fcgi.sample + + ${MKDIR} ${STAGEDIR}/${PREFIX}/smokeping/htdocs/img + ${MKDIR} ${STAGEDIR}/${PREFIX}/var/smokeping + .if !defined(BATCH) ${CAT} ${PKGMESSAGE} .endif Modified: head/net-mgmt/smokeping/files/smokeping.in ============================================================================== --- head/net-mgmt/smokeping/files/smokeping.in Mon Jul 14 14:09:08 2014 (r361778) +++ head/net-mgmt/smokeping/files/smokeping.in Mon Jul 14 14:17:01 2014 (r361779) @@ -1,4 +1,6 @@ #!/bin/sh +# Created by: Sean McAfee + # $FreeBSD$ # PROVIDE: smokeping @@ -14,66 +16,34 @@ # # smokeping_flags="" -smokeping_enable=${smokeping_enable-"NO"} -smokeping_pidfile=${smokeping_pidfile-"%%PREFIX%%/var/smokeping/smokeping.pid"} -smokeping_logfile=${smokeping_logfile-"/var/log/smokeping.log"} -smokeping_user=${smokeping_user-"%%USERS%%"} -smokeping_group=${smokeping_group-"%%GROUPS%%"} . /etc/rc.subr -name="smokeping" -rcvar="smokeping_enable" -load_rc_config $name -command="/usr/local/bin/smokeping" -command_args="--logfile=${smokeping_logfile}" -pidfile="${smokeping_pidfile}" +name=smokeping -extra_commands="reload" -reload_cmd="smokeping_reloadcmd" -start_precmd="smokeping_startprecmd" -stop_cmd="smokeping_stopcmd" -status_cmd="smokeping_statuscmd" +rcvar=smokeping_enable -smokeping_reloadcmd() -{ - $command --reload -} +load_rc_config $name -smokeping_statuscmd() -{ - if [ ! -e $pidfile ]; - then - echo "pidfile does not exist. $name is not running?"; - exit 1; - fi +: ${smokeping_enable:=NO} +: ${smokeping_pidfile="%%PREFIX%%/var/smokeping/smokeping.pid"} +: ${smokeping_logfile=/var/log/smokeping.log} +: ${smokeping_user="%%USERS%%"} +: ${smokeping_group="%%GROUPS%%"} - if pgrep -F $pidfile >/dev/null; - then - echo "$name is running."; - else - echo "$name is not running."; - exit 1; - fi -} +command=%%PREFIX%%/bin/smokeping +command_args="--logfile=${smokeping_logfile}" +pidfile="${smokeping_pidfile}" +command_interpreter=%%PREFIX%%/bin/perl -smokeping_stopcmd() -{ - if pgrep -F $pidfile >/dev/null; - then - kill $sig_stop `cat $pidfile`; - wait_for_pids `cat $pidfile`; - else - echo "$name is not running."; - exit 1; - fi -} +extra_commands=reload +reload_cmd="${command} --reload" smokeping_startprecmd() { - if [ ! -e $smokeping_logfile ]; + if [ ! -e ${smokeping_logfile} ]; then - install -o %%USERS%% -g %%GROUPS%% /dev/null $smokeping_logfile || echo "ERROR: Could not initialize logfile at $smokeping_logfile."; + install -o %%USERS%% -g %%GROUPS%% /dev/null ${smokeping_logfile} || echo "ERROR: Could not initialize logfile at ${smokeping_logfile}."; fi } Modified: head/net-mgmt/smokeping/pkg-plist ============================================================================== --- head/net-mgmt/smokeping/pkg-plist Mon Jul 14 14:09:08 2014 (r361778) +++ head/net-mgmt/smokeping/pkg-plist Mon Jul 14 14:17:01 2014 (r361779) @@ -2,24 +2,12 @@ bin/smokeinfo bin/smokeping bin/smokeping_cgi bin/tSmoke -@unexec if cmp -s %D/etc/smokeping/basepage.html %D/etc/smokeping/basepage.html.dist; then rm -f %D/etc/smokeping/basepage.html; fi -etc/smokeping/basepage.html.dist -@exec [ -f %B/basepage.html ] || cp %B/%f %B/basepage.html -@unexec if cmp -s %D/etc/smokeping/config %D/etc/smokeping/config.dist; then rm -f %D/etc/smokeping/config; fi -etc/smokeping/config.dist -@exec [ -f %B/config ] || cp %B/%f %B/config -@unexec if cmp -s %D/etc/smokeping/smokemail %D/etc/smokeping/smokemail.dist; then rm -f %D/etc/smokeping/smokemail; fi -etc/smokeping/smokemail.dist -@exec [ -f %B/smokemail ] || cp %B/%f %B/smokemail -@unexec if cmp -s %D/etc/smokeping/tmail %D/etc/smokeping/tmail.dist; then rm -f %D/etc/smokeping/tmail; fi -etc/smokeping/tmail.dist -@exec [ -f %B/tmail ] || cp %B/%f %B/tmail -@unexec if cmp -s %D/etc/smokeping/smokeping_secrets %D/etc/smokeping/smokeping_secrets.dist; then rm -f %D/etc/smokeping/smokeping_secrets; fi -etc/smokeping/smokeping_secrets.dist -@exec [ -f %B/smokeping_secrets ] || cp %B/%f %B/smokeping_secrets -@unexec if cmp -s %D/smokeping/htdocs/smokeping.fcgi %D/smokeping/htdocs/smokeping.fcgi.dist; then rm -f %D/smokeping/htdocs/smokeping.fcgi; fi -smokeping/htdocs/smokeping.fcgi.dist -@exec [ -f %B/smokeping.fcgi ] || cp %B/%f %B/smokeping.fcgi +@sample smokeping/htdocs/smokeping.fcgi.sample +@sample %%ETCDIR%%/basepage.html.sample +@sample %%ETCDIR%%/config.sample +@sample %%ETCDIR%%/smokemail.sample +@sample %%ETCDIR%%/tmail.sample +@sample %%ETCDIR%%/smokeping_secrets.sample %%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.echoping %%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.fping-instances %%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.multiple-probes @@ -107,20 +95,81 @@ smokeping/lib/Smokeping/sorters/Max.pm smokeping/lib/Smokeping/sorters/Median.pm smokeping/lib/Smokeping/sorters/StdDev.pm smokeping/lib/Smokeping/sorters/base.pm -@dirrmtry etc/smokeping -@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img -@unexec rm -rf %D/smokeping/htdocs/img 2>/dev/null || true -@exec mkdir -p %D/var/smokeping -@exec chown smokeping:smokeping %D/var/smokeping -@dirrmtry var/smokeping -@dirrmtry var +man/man1/smokeping.1.gz +man/man1/smokeping_cgi.1.gz +man/man1/tSmoke.1.gz +man/man3/Smokeping_matchers_Avgratio.3.gz +man/man3/Smokeping_matchers_CheckLatency.3.gz +man/man3/Smokeping_matchers_CheckLoss.3.gz +man/man3/Smokeping_matchers_ExpLoss.3.gz +man/man3/Smokeping_matchers_Median.3.gz +man/man3/Smokeping_matchers_Medratio.3.gz +man/man3/Smokeping_matchers_base.3.gz +man/man3/Smokeping_probes_AnotherDNS.3.gz +man/man3/Smokeping_probes_AnotherSSH.3.gz +man/man3/Smokeping_probes_CiscoRTTMonDNS.3.gz +man/man3/Smokeping_probes_CiscoRTTMonEchoICMP.3.gz +man/man3/Smokeping_probes_CiscoRTTMonTcpConnect.3.gz +man/man3/Smokeping_probes_Curl.3.gz +man/man3/Smokeping_probes_DNS.3.gz +man/man3/Smokeping_probes_DismanPing.3.gz +man/man3/Smokeping_probes_EchoPing.3.gz +man/man3/Smokeping_probes_EchoPingChargen.3.gz +man/man3/Smokeping_probes_EchoPingDNS.3.gz +man/man3/Smokeping_probes_EchoPingDiscard.3.gz +man/man3/Smokeping_probes_EchoPingHttp.3.gz +man/man3/Smokeping_probes_EchoPingHttps.3.gz +man/man3/Smokeping_probes_EchoPingIcp.3.gz +man/man3/Smokeping_probes_EchoPingLDAP.3.gz +man/man3/Smokeping_probes_EchoPingPlugin.3.gz +man/man3/Smokeping_probes_EchoPingSmtp.3.gz +man/man3/Smokeping_probes_EchoPingWhois.3.gz +man/man3/Smokeping_probes_FPing.3.gz +man/man3/Smokeping_probes_FPing6.3.gz +man/man3/Smokeping_probes_FTPtransfer.3.gz +man/man3/Smokeping_probes_IOSPing.3.gz +man/man3/Smokeping_probes_LDAP.3.gz +man/man3/Smokeping_probes_NFSping.3.gz +man/man3/Smokeping_probes_OpenSSHJunOSPing.3.gz +man/man3/Smokeping_probes_Radius.3.gz +man/man3/Smokeping_probes_RemoteFPing.3.gz +man/man3/Smokeping_probes_SSH.3.gz +man/man3/Smokeping_probes_SendEmail.3.gz +man/man3/Smokeping_probes_SipSak.3.gz +man/man3/Smokeping_probes_TCPPing.3.gz +man/man3/Smokeping_probes_TacacsPlus.3.gz +man/man3/Smokeping_probes_TelnetIOSPing.3.gz +man/man3/Smokeping_probes_TelnetJunOSPing.3.gz +man/man3/Smokeping_probes_WebProxyFilter.3.gz +man/man3/Smokeping_probes_base.3.gz +man/man3/Smokeping_probes_basefork.3.gz +man/man3/Smokeping_probes_basevars.3.gz +man/man3/Smokeping_probes_passwordchecker.3.gz +man/man3/Smokeping_probes_skel.3.gz +man/man3/Smokeping_sorters_Loss.3.gz +man/man3/Smokeping_sorters_Max.3.gz +man/man3/Smokeping_sorters_Median.3.gz +man/man3/Smokeping_sorters_StdDev.3.gz +man/man3/Smokeping_sorters_base.3.gz +man/man5/smokeping_config.5.gz +man/man5/smokeping_examples.5.gz +man/man7/smokeping_extend.7.gz +man/man7/smokeping_install.7.gz +man/man7/smokeping_master_slave.7.gz +man/man7/smokeping_upgrade.7.gz +@dirrm etc/smokeping +@dirrm var/smokeping +@dirrm var @dirrm smokeping/lib/Smokeping/sorters @dirrm smokeping/lib/Smokeping/probes @dirrm smokeping/lib/Smokeping/matchers @dirrm smokeping/lib/Smokeping @dirrm smokeping/lib +@dirrm smokeping/htdocs/img @dirrm smokeping/htdocs/cropper/lib @dirrm smokeping/htdocs/cropper @dirrm smokeping/htdocs +@dirrm smokeping %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% -@dirrmtry smokeping +@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img +@exec mkdir -p %D/var/smokeping; chown smokeping:smokeping %D/var/smokeping