From owner-svn-ports-head@freebsd.org Sun Mar 20 20:20:15 2016 Return-Path: Delivered-To: svn-ports-head@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 91FA1AD7738; Sun, 20 Mar 2016 20:20:15 +0000 (UTC) (envelope-from pi@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 603CB1163; Sun, 20 Mar 2016 20:20:15 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2KKKEkv058845; Sun, 20 Mar 2016 20:20:14 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2KKKDjQ058836; Sun, 20 Mar 2016 20:20:13 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201603202020.u2KKKDjQ058836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Sun, 20 Mar 2016 20:20:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r411516 - in head: . sysutils sysutils/hfm sysutils/hfm/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-head@freebsd.org X-Mailman-Version: 2.1.21 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: Sun, 20 Mar 2016 20:20:15 -0000 Author: pi Date: Sun Mar 20 20:20:13 2016 New Revision: 411516 URL: https://svnweb.freebsd.org/changeset/ports/411516 Log: New port: sysutils/hfm hfm is an application to run tests in parallel at a high frequency. If the outcome of the test results in a state change, other commands can be executed. It is designed to be a general purpose, loosely-coupled tool, by having both the tests and the state change commands be executed by the operating system. For example, one could write the test in shell or c, and have it called through the exec facility. In practice, the overhead of spawning a new process per test limits frequency that can be achieved by the tests, and their results. Anecdotally, 5ms intervals have been seen to be achievable. An example application is to poll other network services for health, and to take actions based on their health status changes. WWW: https://github.com/derekmarcotte/hfm PR: 207392 Submitted by: 554b8425@razorfever.net Added: head/sysutils/hfm/ head/sysutils/hfm/Makefile (contents, props changed) head/sysutils/hfm/distinfo (contents, props changed) head/sysutils/hfm/files/ head/sysutils/hfm/files/hfm.in (contents, props changed) head/sysutils/hfm/pkg-descr (contents, props changed) head/sysutils/hfm/pkg-message (contents, props changed) head/sysutils/hfm/pkg-plist (contents, props changed) Modified: head/GIDs head/UIDs head/sysutils/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Sun Mar 20 19:38:08 2016 (r411515) +++ head/GIDs Sun Mar 20 20:20:13 2016 (r411516) @@ -137,6 +137,7 @@ bs:*:220: rtpproxy:*:222: postgrey:*:225: sqlgrey:*:226: +_hfm:*:227: kismet:*:229: aprsd:*:240: tnc:*:241: Modified: head/UIDs ============================================================================== --- head/UIDs Sun Mar 20 19:38:08 2016 (r411515) +++ head/UIDs Sun Mar 20 20:20:13 2016 (r411516) @@ -142,6 +142,7 @@ bs:*:220:220::0:0:Big Sister:/usr/local/ rtpproxy:*:222:222::0:0:& user:/nonexistent:/sbin/nologin postgrey:*:225:225::0:0:Postgrey Owner:/nonexistent:/usr/sbin/nologin sqlgrey:*:226:226::0:0:SQLgrey Owner:/nonexistent:/usr/sbin/nologin +_hfm:*:227:227::0:0:hfm daemon:/nonexistent:/usr/sbin/nologin aprsd:*:240:240::0:0:aprsd:/nonexistent:/bin/sh tnc:*:241:241::0:0:aprsd:/nonexistent:/bin/sh prosody:*:242:242::0:0:Prosody Jabber Server:/nonexistent:/usr/sbin/nologin Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sun Mar 20 19:38:08 2016 (r411515) +++ head/sysutils/Makefile Sun Mar 20 20:20:13 2016 (r411516) @@ -405,6 +405,7 @@ SUBDIR += heartbeat SUBDIR += heirloom SUBDIR += hextools + SUBDIR += hfm SUBDIR += hfsexplorer SUBDIR += hfsutils SUBDIR += hidesvn Added: head/sysutils/hfm/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/Makefile Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +PORTNAME= hfm +PORTVERSION= 1.1.3 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= 554b8425@razorfever.net +COMMENT= Run tests in parallel at high frequency + +LICENSE= BSD2CLAUSE + +# gb 0.4 includes FreeBSD-specific fixes that this port requires +# https://github.com/constabulary/gb/issues/506 +BUILD_DEPENDS= go>=1.5:${PORTSDIR}/lang/go \ + gb>=0.4:${PORTSDIR}/devel/gb \ + ${LOCALBASE}/lib/libucl.a:${PORTSDIR}/textproc/libucl + +USES= compiler:c++11-lang +USE_GITHUB= yes + +GH_ACCOUNT= derekmarcotte mitchellh:gu op:gl +GH_PROJECT= hfm go-libucl:gu go-logging:gl +GH_TAGNAME= ${DISTVERSIONFULL} f9d0e55:gu dfaf3df:gl + +USERS= _hfm +GROUPS= _hfm + +USE_RC_SUBR= hfm + +MAKE_ARGS+= ETCDIR=${ETCDIR} TAG=${DISTVERSIONPREFIX}${PORTVERSION} + +NO_INSTALL= yes +ALL_TARGET= test build + +post-extract: + ${MKDIR} ${WRKSRC}/vendor/src/github.com/mitchellh/go-libucl + ${MV} ${WRKDIR}/go-libucl-f9d0e55/* ${WRKSRC}/vendor/src/github.com/mitchellh/go-libucl/ + ${MKDIR} ${WRKSRC}/vendor/src/github.com/op/go-logging + ${MV} ${WRKDIR}/go-logging-dfaf3df/* ${WRKSRC}/vendor/src/github.com/op/go-logging/ + +do-patch: + (cd ${WRKSRC}; ${PATCH} vendor/src/github.com/mitchellh/go-libucl/libucl.go < vendor/patches/github.com/mitchellh/go-libucl/libucl.go.patch ) + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/bin/hfm ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/hfm.conf.sample ${STAGEDIR}${ETCDIR} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR} + +.include Added: head/sysutils/hfm/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/distinfo Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,6 @@ +SHA256 (derekmarcotte-hfm-v1.1.3_GH0.tar.gz) = 8e00fbb4a640ac5cd6473f4705043af4067be731cdabc5aeb882121a0ccae743 +SIZE (derekmarcotte-hfm-v1.1.3_GH0.tar.gz) = 33915 +SHA256 (mitchellh-go-libucl-f9d0e55_GH0.tar.gz) = 955e56fa334e7131ca313098fcf0a91ce89270cf1294d2a07830aa1c17b58fc0 +SIZE (mitchellh-go-libucl-f9d0e55_GH0.tar.gz) = 9426 +SHA256 (op-go-logging-dfaf3df_GH0.tar.gz) = d34d3afbdb07ad92f51d2a0a9f2682a4c0fcece733618a4ad27013e5ab6c8b60 +SIZE (op-go-logging-dfaf3df_GH0.tar.gz) = 35747 Added: head/sysutils/hfm/files/hfm.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/files/hfm.in Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,47 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: hfm +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# hfm_enable (bool): Set to NO by default. +# Set it to YES to enable hfm. +# +# hfm_flags (bool): Check the sources of hfm for flags +# + +. /etc/rc.subr + +name=hfm +rcvar=hfm_enable + +command="%%PREFIX%%/bin/${name}" + +hfm_user=_hfm +hfm_flags=${hfm_flags:-"-config %%ETCDIR%%/${name}.conf -facility local0 -log syslog"} + +pidfile="/var/run/${name}.pid" + +required_files="%%ETCDIR%%/${name}.conf" + +start_cmd=hfm_start +stop_postcmd=hfm_postcmd + +hfm_start() { + echo "Staring ${name}." + + /usr/sbin/daemon -cf -u ${hfm_user} -p ${pidfile} ${command} ${hfm_flags} +} + +hfm_postcmd() { + [ -f ${pidfile} ] && rm ${pidfile} +} + +load_rc_config $name +run_rc_command "$1" + Added: head/sysutils/hfm/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/pkg-descr Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,17 @@ +hfm is an application to run tests in parallel at a high frequency. +If the outcome of the test results in a state change, other commands +can be executed. + +It is designed to be a general purpose, loosely-coupled tool, by +having both the tests and the state change commands be executed by +the operating system. For example, one could write the test in +shell or c, and have it called through the exec facility. + +In practice, the overhead of spawning a new process per test limits +frequency that can be achieved by the tests, and their results. +Anecdotally, 5ms intervals have been seen to be achievable. + +An example application is to poll other network services for health, +and to take actions based on their health status changes. + +WWW: https://github.com/derekmarcotte/hfm Added: head/sysutils/hfm/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/pkg-message Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,5 @@ +hfm includes an rc.d script to control a daemon mode. Use: + +sysrc hfh_enable=yes + +to enable. Added: head/sysutils/hfm/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/hfm/pkg-plist Sun Mar 20 20:20:13 2016 (r411516) @@ -0,0 +1,8 @@ +bin/hfm +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/architecture-90dpi.png +%%PORTDOCS%%%%DOCSDIR%%/architecture.svg +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hfm-test-fast.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hfm-test-start-delay.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hfm.conf.sample +@sample %%ETCDIR%%/hfm.conf.sample