From owner-svn-ports-all@freebsd.org Fri Mar 23 16:54:48 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4512DF5976B; Fri, 23 Mar 2018 16:54:48 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE4BD7F26D; Fri, 23 Mar 2018 16:54:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB22522978; Fri, 23 Mar 2018 16:54:47 +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 w2NGslK6014796; Fri, 23 Mar 2018 16:54:47 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NGsl8u014790; Fri, 23 Mar 2018 16:54:47 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201803231654.w2NGsl8u014790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Fri, 23 Mar 2018 16:54:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r465385 - in head/sysutils: . consul-replicate consul-replicate/files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/sysutils: . consul-replicate consul-replicate/files X-SVN-Commit-Revision: 465385 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.25 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: Fri, 23 Mar 2018 16:54:48 -0000 Author: swills Date: Fri Mar 23 16:54:47 2018 New Revision: 465385 URL: https://svnweb.freebsd.org/changeset/ports/465385 Log: sysutils/consul-replicate: create port The daemon consul-replicate integrates with Consul to perform cross-data-center K/V replication. WWW: https://github.com/hashicorp/consul-replicate PR: 223121 Submitted by: jhixson@gmail.com Added: head/sysutils/consul-replicate/ head/sysutils/consul-replicate/Makefile (contents, props changed) head/sysutils/consul-replicate/distinfo (contents, props changed) head/sysutils/consul-replicate/files/ head/sysutils/consul-replicate/files/consul-replicate.in (contents, props changed) head/sysutils/consul-replicate/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile (contents, props changed) Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Fri Mar 23 16:46:05 2018 (r465384) +++ head/sysutils/Makefile Fri Mar 23 16:54:47 2018 (r465385) @@ -192,6 +192,7 @@ SUBDIR += consolekit2 SUBDIR += consul SUBDIR += consul-alerts + SUBDIR += consul-replicate SUBDIR += consul_exporter SUBDIR += container-diff SUBDIR += contractor Added: head/sysutils/consul-replicate/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/consul-replicate/Makefile Fri Mar 23 16:54:47 2018 (r465385) @@ -0,0 +1,53 @@ +# $FreeBSD$ + +PORTNAME= consul-replicate +PORTVERSION= 0.4.0 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= jhixson@gmail.com +COMMENT= Consul cross-DC KV replication daemon + +LICENSE= MPL + +BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go + +USES= compiler + +USE_GITHUB= yes +GH_ACCOUNT= hashicorp +GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} + +USE_RC_SUBR= consul-replicate + +PLIST_FILES= bin/${PORTNAME} + +USERS= consul +GROUPS= consul + +post-extract: + @${MV} ${WRKSRC}/vendor/ ${WRKSRC}/src/ + +do-build: + @cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}; \ + ${SETENV} CGO_ENABLED=0 ${BUILD_ENV} GOCACHE=off GOPATH=${WRKSRC} \ + go build -v -x -ldflags "\ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.Version=${PORTVERSION} \ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitCommit=675a2c2 \ + -X github.com/${GH_ACCOUNT}/${PORTNAME}/version.GitDescribe=v${PORTVERSION} \ + " -o bin/${PORTNAME} + +do-install: + ${INSTALL_PROGRAM} \ + ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include + +# golang assumes that if clang is in use, it is called "clang" and not "cc". If +# it's called "cc", go fails. +.if ${COMPILER_TYPE} == clang +BUILD_ENV= CC=clang +.endif + +.include Added: head/sysutils/consul-replicate/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/consul-replicate/distinfo Fri Mar 23 16:54:47 2018 (r465385) @@ -0,0 +1,3 @@ +TIMESTAMP = 1508456952 +SHA256 (hashicorp-consul-replicate-v0.4.0_GH0.tar.gz) = cd2e0e8e9bcd80bd2b3063b2aac5169756aa48a0dc6c5736997fdf590894c49a +SIZE (hashicorp-consul-replicate-v0.4.0_GH0.tar.gz) = 1155743 Added: head/sysutils/consul-replicate/files/consul-replicate.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/consul-replicate/files/consul-replicate.in Fri Mar 23 16:54:47 2018 (r465385) @@ -0,0 +1,44 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: consul-replicate +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# consul_replicate_enable (bool): Set to NO by default. +# Set it to YES to enable consul. +# consul_replicate_user (user): Set user to run consul. +# Default is "consul". +# consul_replcate_group (group): Set group to run consul. +# Default is "consul". + +. /etc/rc.subr + +name=consul_replicate +rcvar=consul_replicate_enable + +load_rc_config $name + +: ${consul_replicate_enable:="NO"} +: ${consul_replicate_user:="consul"} +: ${consul_replicate_group:="consul"} + +pidfile=/var/run/consul-replicate.pid +procname="%%PREFIX%%/bin/consul-replicate" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} /usr/bin/env ${consul_replicate_env} ${procname} -config '%%PREFIX%%/etc/consul-replicate.d' ${consul_replicate_args}" + +start_precmd=consul_replicate_startprecmd + +consul_replicate_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${consul_replicate_user} -g ${consul_replicate_group} /dev/null ${pidfile}; + fi +} + +run_rc_command "$1" Added: head/sysutils/consul-replicate/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/consul-replicate/pkg-descr Fri Mar 23 16:54:47 2018 (r465385) @@ -0,0 +1,4 @@ +The daemon consul-replicate integrates with Consul to perform +cross-data-center K/V replication. + +WWW: https://github.com/hashicorp/consul-replicate