From owner-svn-ports-head@freebsd.org Wed Aug 10 15:31:46 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 9115EBB578D; Wed, 10 Aug 2016 15:31:46 +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 55C5C16AA; Wed, 10 Aug 2016 15:31:46 +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 u7AFVjpO018922; Wed, 10 Aug 2016 15:31:45 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7AFVjeX018919; Wed, 10 Aug 2016 15:31:45 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201608101531.u7AFVjeX018919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Wed, 10 Aug 2016 15:31:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420033 - in head/textproc/consul-template: . 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.22 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: Wed, 10 Aug 2016 15:31:46 -0000 Author: swills Date: Wed Aug 10 15:31:45 2016 New Revision: 420033 URL: https://svnweb.freebsd.org/changeset/ports/420033 Log: textproc/consul-template: Update to 0.15.0 and add rc.d script PR: 211492 Submitted by: Douglas Thrift Added: head/textproc/consul-template/files/ head/textproc/consul-template/files/consul-template.in (contents, props changed) Modified: head/textproc/consul-template/Makefile head/textproc/consul-template/distinfo Modified: head/textproc/consul-template/Makefile ============================================================================== --- head/textproc/consul-template/Makefile Wed Aug 10 15:10:31 2016 (r420032) +++ head/textproc/consul-template/Makefile Wed Aug 10 15:31:45 2016 (r420033) @@ -2,13 +2,15 @@ # $FreeBSD$ PORTNAME= consul-template -PORTVERSION= 0.14.0 +PORTVERSION= 0.15.0 DISTVERSIONPREFIX= v CATEGORIES= textproc MAINTAINER= swills@FreeBSD.org COMMENT= Generic template rendering and notifications with Consul +LICENSE= MPL + BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go USE_GITHUB= yes @@ -16,18 +18,20 @@ GH_ACCOUNT= hashicorp PLIST_FILES= bin/consul-template +USE_RC_SUBR= consul-template + STRIP= # stripping can break go binaries post-extract: @${MV} ${WRKSRC}/vendor ${WRKSRC}/src @${MKDIR} ${WRKSRC}/src/github.com/hashicorp/consul-template @cd ${WRKSRC} ; \ - ${MV} .gitignore .travis.yml CHANGELOG.md Godeps LICENSE Makefile \ - README.md brain.go brain_test.go cli.go cli_test.go config.go \ - config_test.go dedup.go dedup_test.go dependency flags.go logging \ - main.go runner.go runner_test.go scripts template.go \ - template_functions.go template_functions_test.go template_test.go test \ - watch \ + ${MV} .gitignore .travis.yml CHANGELOG.md LICENSE Makefile README.md \ + brain.go brain_test.go cli.go cli_test.go config.go config_test.go \ + dedup.go dedup_test.go dependency flags.go logging main.go \ + mapstructure.go mapstructure_test.go runner.go runner_test.go scripts \ + template.go template_functions.go template_functions_test.go \ + template_test.go test watch \ ${WRKSRC}/src/github.com/hashicorp/consul-template do-build: Modified: head/textproc/consul-template/distinfo ============================================================================== --- head/textproc/consul-template/distinfo Wed Aug 10 15:10:31 2016 (r420032) +++ head/textproc/consul-template/distinfo Wed Aug 10 15:31:45 2016 (r420033) @@ -1,3 +1,3 @@ -TIMESTAMP = 1463835548 -SHA256 (hashicorp-consul-template-v0.14.0_GH0.tar.gz) = 8e4ee468f79c806db0bdea6432bd990f11089539910b751dac8b168b022a090b -SIZE (hashicorp-consul-template-v0.14.0_GH0.tar.gz) = 1567282 +TIMESTAMP = 1469936531 +SHA256 (hashicorp-consul-template-v0.15.0_GH0.tar.gz) = cbcce6b163c673a1743285781703ec02079081c2691d94c97b13572321ae5587 +SIZE (hashicorp-consul-template-v0.15.0_GH0.tar.gz) = 1715150 Added: head/textproc/consul-template/files/consul-template.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/consul-template/files/consul-template.in Wed Aug 10 15:31:45 2016 (r420033) @@ -0,0 +1,50 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: consul_template +# REQUIRE: LOGIN +# KEYWORD: shtudown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# consul_template_enable (bool): Set to NO by default. +# Set it to YES to enable consul-template. +# consul_template_user (user): Set user to run consul-template. +# Default is "root". +# consul_template_group (group): Set group to run consul-template. +# Default is "wheel". +# consul_template_env (string): Set environment variables used with consul-template. +# Default is "". +# consul_template_args (string): Set flags used with consul-template. +# Default is "". + +. /etc/rc.subr + +name=consul_template +rcvar=consul_template_enable + +load_rc_config $name + +: ${consul_template_enable:="NO"} +: ${consul_template_user:="root"} +: ${consul_template_group:="wheel"} +: ${consul_template_env:=""} +: ${consul_template_args:=""} + +pidfile=/var/run/consul-template.pid +procname="%%PREFIX%%/bin/consul-template" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} /usr/bin/env ${consul_template_env} ${procname} -config=%%PREFIX%%/etc/consul-template.d ${consul_template_args}" + +start_precmd=consul_template_startprecmd + +consul_template_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${consul_template_user} -g ${consul_template_group} /dev/null ${pidfile} + fi +} + +run_rc_command "$1"