From owner-svn-ports-all@freebsd.org Thu Aug 17 14:35:54 2017 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 8CD7ADE4CDF; Thu, 17 Aug 2017 14:35:54 +0000 (UTC) (envelope-from swills@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 634FB7472C; Thu, 17 Aug 2017 14:35:54 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7HEZr1h066244; Thu, 17 Aug 2017 14:35:53 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7HEZqtL066239; Thu, 17 Aug 2017 14:35:52 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201708171435.v7HEZqtL066239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Thu, 17 Aug 2017 14:35:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448105 - in head/sysutils/goss: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/sysutils/goss: . files X-SVN-Commit-Revision: 448105 X-SVN-Commit-Repository: ports 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: Thu, 17 Aug 2017 14:35:54 -0000 Author: swills Date: Thu Aug 17 14:35:52 2017 New Revision: 448105 URL: https://svnweb.freebsd.org/changeset/ports/448105 Log: sysutils/goss: Add rc script, sample configuration PR: 221579 Submitted by: Mike English (maintainer) Added: head/sysutils/goss/files/ head/sysutils/goss/files/goss.in (contents, props changed) head/sysutils/goss/files/patch-extras_goss.yaml.sample (contents, props changed) head/sysutils/goss/files/patch-extras_process__goss.yaml.sample (contents, props changed) head/sysutils/goss/pkg-plist (contents, props changed) Modified: head/sysutils/goss/Makefile Modified: head/sysutils/goss/Makefile ============================================================================== --- head/sysutils/goss/Makefile Thu Aug 17 14:26:39 2017 (r448104) +++ head/sysutils/goss/Makefile Thu Aug 17 14:35:52 2017 (r448105) @@ -3,6 +3,7 @@ PORTNAME= goss PORTVERSION= 0.3.4 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= englishm@llnw.com @@ -16,7 +17,7 @@ BUILD_DEPENDS= go:lang/go ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= go-ps only supports amd64 -PLIST_FILES= bin/goss +USE_RC_SUBR= goss USE_GITHUB= yes GH_ACCOUNT= aelsabbahy @@ -37,6 +38,10 @@ GH_TUPLE= achanda:go-sysctl:6be7678:achanda/src/githu opencontainers:runc:8779fa5:opencontainers/src/github.com/opencontainers/runc \ patrickmn:go-cache:1881a9b:patrickmn/src/github.com/patrickmn/go-cache \ urfave:cli:d86a009:urfave/src/github.com/urfave/cli + +post-patch: + ${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/extras/goss.yaml.sample + do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 GOPATH=${WRKSRC} \ go build -ldflags "-X main.version=${DISTVERSIONPREFIX}${PORTVERSION} -s -w" -o \ @@ -45,5 +50,9 @@ do-build: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME} \ ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/extras/goss.yaml.sample ${STAGEDIR}${PREFIX}/etc/goss.yaml.sample + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/goss.d + ${INSTALL_DATA} ${WRKSRC}/extras/process_goss.yaml.sample \ + ${STAGEDIR}${PREFIX}/etc/goss.d/process_goss.yaml.sample .include Added: head/sysutils/goss/files/goss.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/goss/files/goss.in Thu Aug 17 14:35:52 2017 (r448105) @@ -0,0 +1,36 @@ +#!/bin/sh + +# Goss startup script +# +# PROVIDE: goss +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Add the following to /etc/rc.conf[.local] to enable this service +# +# goss_enable (bool): Set to NO by default. +# Set it to YES to enable goss +# goss_conf (string): Set to %%PREFIX%%/etc/goss.yaml by default +# Set it to preferred config file +# goss_listen (string): Set to ":12345" by default +# Set it to preferred listen address +# + +. /etc/rc.subr + +name=goss +rcvar=goss_enable + +load_rc_config $name + +: ${goss_enable:="NO"} +: ${goss_listen="127.0.0.1:12345"} +: ${goss_conf="%%PREFIX%%/etc/goss.yaml"} + +required_files=${goss_conf} +pidfile=/var/run/${name}.pid +procname="%%PREFIX%%/bin/goss" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} /usr/bin/env ${goss_env} ${procname} -g ${goss_conf} serve -l ${goss_listen}" + +run_rc_command "$1" Added: head/sysutils/goss/files/patch-extras_goss.yaml.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/goss/files/patch-extras_goss.yaml.sample Thu Aug 17 14:35:52 2017 (r448105) @@ -0,0 +1,6 @@ +--- extras/goss.yaml.sample.orig 2017-08-14 20:07:43 UTC ++++ extras/goss.yaml.sample +@@ -0,0 +1,3 @@ ++gossfile: ++ %%PREFIX%%/etc/goss.d/*.yaml: {} ++ Added: head/sysutils/goss/files/patch-extras_process__goss.yaml.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/goss/files/patch-extras_process__goss.yaml.sample Thu Aug 17 14:35:52 2017 (r448105) @@ -0,0 +1,6 @@ +--- extras/process_goss.yaml.sample.orig 2017-08-15 06:16:52 UTC ++++ extras/process_goss.yaml.sample +@@ -0,0 +1,3 @@ ++process: ++ goss: ++ running: true Added: head/sysutils/goss/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/goss/pkg-plist Thu Aug 17 14:35:52 2017 (r448105) @@ -0,0 +1,4 @@ +@dir etc/goss.d +@sample etc/goss.d/process_goss.yaml.sample +@sample etc/goss.yaml.sample +bin/goss