Index: head/sysutils/consul/Makefile =================================================================== --- head/sysutils/consul/Makefile (revision 538443) +++ head/sysutils/consul/Makefile (revision 538444) @@ -1,47 +1,46 @@ # $FreeBSD$ PORTNAME= consul -PORTVERSION= 1.7.3 +PORTVERSION= 1.7.4 DISTVERSIONPREFIX= v CATEGORIES= sysutils MAINTAINER= swills@FreeBSD.org COMMENT= Service discovery and configuration made easy LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_GITHUB= yes GH_ACCOUNT= hashicorp GO_BUILDFLAGS= -ldflags=" \ -X github.com/hashicorp/consul/version.Version=${PORTVERSION} \ -X github.com/hashicorp/consul/version.VersionPrerelease= \ -X github.com/hashicorp/consul/version.GitDescribe=v${PORTVERSION} \ " USE_RC_SUBR= consul PLIST_FILES= bin/consul ETCDIR= ${PREFIX}/etc/${PORTNAME}.d CONSUL_USER?= consul CONSUL_GROUP?= consul -CONSUL_DATADIR?= /var/db/${PORTNAME} +CONSUL_DBDIR?= /var/db/${PORTNAME} USERS= ${CONSUL_USER} GROUPS= ${CONSUL_GROUP} -SUB_LIST= CONSUL_DATADIR=${CONSUL_DATADIR} \ - CONSUL_GROUP=${CONSUL_GROUP} \ - CONSUL_USER=${CONSUL_USER} \ - ETCDIR=${ETCDIR} +SUB_LIST= CONSUL_DBDIR=${CONSUL_DBDIR} \ + GROUP=${GROUP} \ + USER=${USER} post-extract: ${MKDIR} ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME} ${LN} -s ${WRKSRC}/api ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/api ${LN} -s ${WRKSRC}/sdk ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/sdk .include Index: head/sysutils/consul/distinfo =================================================================== --- head/sysutils/consul/distinfo (revision 538443) +++ head/sysutils/consul/distinfo (revision 538444) @@ -1,3 +1,3 @@ -TIMESTAMP = 1588751972 -SHA256 (hashicorp-consul-v1.7.3_GH0.tar.gz) = db1cfede52f73038f9f4d87f4698837cf6f7ff3957994dbdce0db78795a081bd -SIZE (hashicorp-consul-v1.7.3_GH0.tar.gz) = 22785232 +TIMESTAMP = 1591829205 +SHA256 (hashicorp-consul-v1.7.4_GH0.tar.gz) = 2b48f0f2cd38201aed032981626c64aab9cb2920385847f68251af049063b475 +SIZE (hashicorp-consul-v1.7.4_GH0.tar.gz) = 22787889 Index: head/sysutils/consul/files/consul.in =================================================================== --- head/sysutils/consul/files/consul.in (revision 538443) +++ head/sysutils/consul/files/consul.in (revision 538444) @@ -1,105 +1,90 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: consul # REQUIRE: LOGIN # KEYWORD: shutdown # # Add consul_enable="YES" to /etc/rc.conf to enable Consul # # Additional variables you can define are: # # consul_user (string): Set user to run consul. -# Default is "%%CONSUL_USER%%". +# Default is "%%USER%%". # consul_group (string): Set group to run consul. -# Default is "%%CONSUL_GROUP%%". +# Default is "%%GROUP%%". # consul_pidfile (string): Set full path to pid file # Default is "/var/run/consul.pid" -# consul_configtest (string): Set to yes to enable Consul config validation -# Set to NO by default # consul_datadir (dir): Set dir to run consul in. -# Default is "%%CONSUL_DATADIR%%" +# Default is "%%DBDIR%%" # consul_syslog_output_enable (bool): Set to YES to enable syslog output # Default is "NO". See daemon(8). # consul_syslog_output_tag (str): Set syslog tag if syslog enabled. # Default is "consul". See daemon(8). # consul_syslog_output_priority (str): Set syslog priority if syslog enabled. # Default is "info". See daemon(8). # consul_syslog_output_facility (str): Set to YES to enable syslog output # Default is "daemon". See daemon(8). # # see rc.subr(8) for additional variables and options # . /etc/rc.subr name=consul rcvar=consul_enable load_rc_config $name : ${consul_enable:="NO"} : ${consul_syslog_output_enable:="NO"} -: ${consul_user:="%%CONSUL_USER%%"} -: ${consul_group:="%%CONSUL_GROUP%%"} +: ${consul_user:="%%USER%%"} +: ${consul_group:="%%GROUP%%"} : ${consul_pidfile:="/var/run/${name}.pid"} -: ${consul_configtest:="NO"} -: ${consul_datadir:="%%CONSUL_DATADIR%%"} +: ${consul_datadir:="%%CONSUL_DBDIR%%"} start_precmd="consul_start_precmd" -extra_commands="reload configtest" -configtest_cmd="consul_checkconfig" +extra_commands="reload" # backwards compatibility if [ -n "${consul_dir}" ]; then consul_datadir=${consul_dir} fi if checkyesno consul_syslog_output_enable; then if [ -n "${consul_syslog_output_tag}" ]; then consul_syslog_output_flags="-T ${consul_syslog_output_tag}" else consul_syslog_output_flags="-T ${name}" fi if [ -n "${consul_syslog_output_priority}" ]; then consul_syslog_output_flags="${consul_syslog_output_flags} -s ${consul_syslog_output_priority}" fi if [ -n "${consul_syslog_output_facility}" ]; then consul_syslog_output_flags="${consul_syslog_output_flags} -l ${consul_syslog_output_facility}" fi fi -if checkyesno consul_configtest; then - restart_precmd="consul_checkconfig" - reload_precmd="consul_checkconfig" -fi - pidfile=${consul_pidfile} procname="%%PREFIX%%/bin/consul" command="/usr/sbin/daemon" command_args="-f -t ${name} ${consul_syslog_output_flags} -p ${pidfile} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_datadir} -config-dir=%%ETCDIR%% ${consul_args}" consul_start_precmd() { if [ ! -e ${pidfile} ]; then install -o ${consul_user} -g ${consul_group} /dev/null ${pidfile} fi if [ ! -d ${consul_datadir} ]; then install -d -m 0750 -o ${consul_user} -g ${consul_group} ${consul_datadir} fi if [ ! -d %%ETCDIR%% ]; then install -d -m 0750 -o ${consul_user} -g ${consul_group} %%ETCDIR%% fi -} - -consul_checkconfig() -{ - echo "Performing sanity check on ${name} configuration:" - eval ${procname} validate "%%ETCDIR%%" } run_rc_command "$1"