FreeBSD Bugzilla – Attachment 209961 Details for
Bug 240882
sysutils/consul: Update to 1.6.2 and refactoring rc.script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
consul.diff
consul.diff (text/plain), 5.53 KB, created by
Dmitry Wagin
on 2019-12-15 03:20:13 UTC
(
hide
)
Description:
consul.diff
Filename:
MIME Type:
Creator:
Dmitry Wagin
Created:
2019-12-15 03:20:13 UTC
Size:
5.53 KB
patch
obsolete
>Index: sysutils/consul/Makefile >=================================================================== >--- sysutils/consul/Makefile (revision 520147) >+++ sysutils/consul/Makefile (working copy) >@@ -1,7 +1,7 @@ > # $FreeBSD$ > > PORTNAME= consul >-PORTVERSION= 1.6.1 >+PORTVERSION= 1.6.2 > DISTVERSIONPREFIX= v > CATEGORIES= sysutils > >@@ -16,7 +16,7 @@ > USE_GITHUB= yes > GH_ACCOUNT= hashicorp > >-GO_BUILDFLAGS= -ldflags="\ >+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} \ >@@ -26,9 +26,19 @@ > > PLIST_FILES= bin/consul > >-USERS= consul >-GROUPS= consul >+ETCDIR= ${PREFIX}/etc/${PORTNAME}.d >+CONSUL_USER?= consul >+CONSUL_GROUP?= consul >+CONSUL_DATADIR?= /var/db/${PORTNAME} > >+USERS= ${CONSUL_USER} >+GROUPS= ${CONSUL_GROUP} >+ >+SUB_LIST= ETCDIR=${ETCDIR} \ >+ CONSUL_USER=${CONSUL_USER} \ >+ CONSUL_GROUP=${CONSUL_GROUP} \ >+ CONSUL_DATADIR=${CONSUL_DATADIR} >+ > post-extract: > ${MKDIR} ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME} > ${LN} -s ${WRKSRC}/api ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/api >Index: sysutils/consul/distinfo >=================================================================== >--- sysutils/consul/distinfo (revision 520147) >+++ sysutils/consul/distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1572039537 >-SHA256 (hashicorp-consul-v1.6.1_GH0.tar.gz) = c02a8a9a8b775066cdc33765bbf928f3dd20e3cc0f61cf41f35ed5f0e12a8749 >-SIZE (hashicorp-consul-v1.6.1_GH0.tar.gz) = 22621651 >+TIMESTAMP = 1576365597 >+SHA256 (hashicorp-consul-v1.6.2_GH0.tar.gz) = 98ba4f3e271536954deb118fe88bfcbd3c6150defeee8a2b946a4dff98594a75 >+SIZE (hashicorp-consul-v1.6.2_GH0.tar.gz) = 22041280 >Index: sysutils/consul/files/consul.in >=================================================================== >--- sysutils/consul/files/consul.in (revision 520147) >+++ sysutils/consul/files/consul.in (working copy) >@@ -6,47 +6,90 @@ > # REQUIRE: LOGIN > # KEYWORD: shutdown > # >-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf >-# to enable this service: >+# Add consul_enable="YES" to /etc/rc.conf to enable Consul > # >-# consul_enable (bool): Set to NO by default. >-# Set it to YES to enable consul. >-# consul_user (user): Set user to run consul. >-# Default is "consul". >-# consul_group (group): Set group to run consul. >-# Default is "consul". >-# consul_dir (dir): Set dir to run consul in. >-# Default is "/var/db/consul". >+# Additional variables you can define are: >+# >+# consul_debug (bool) >+# Set it to YES to enable Consul debugging to syslog >+# Set to NO by default >+# consul_user (string) >+# Set user that Consul will run under >+# Default is "%%CONSUL_USER%%" >+# consul_group (string) >+# Set group that Consul will run under >+# Default is "%%CONSUL_GROUP%%" >+# consul_pidfile (string) >+# Set full path to pid file >+# Default is "/var/run/consul.pid" >+# consul_configtest (bool) >+# Set it to NO to disable Consul config validation >+# Set to YES by default >+# consul_data_dir (string) >+# Set dir to store Consul state >+# Default is "%%CONSUL_DATADIR%%" >+# consul_env (string) >+# Set environment variables used with Consul >+# Default is "" >+# consul_args (string) >+# Set additional command line arguments >+# Default is "" > > . /etc/rc.subr > > name=consul > rcvar=consul_enable >-extra_commands="reload configtest" > > load_rc_config $name > > : ${consul_enable:="NO"} >-: ${consul_user:="consul"} >-: ${consul_group:="consul"} >-: ${consul_dir:="/var/db/consul"} >+: ${consul_debug:="NO"} >+: ${consul_user:="%%CONSUL_USER%%"} >+: ${consul_group:="%%CONSUL_GROUP%%"} >+: ${consul_pidfile:="/var/run/consul.pid"} >+: ${consul_configtest:="YES"} >+: ${consul_datadir:="%%CONSUL_DATADIR%%"} > >-pidfile=/var/run/consul.pid >+start_precmd="consul_start_precmd" >+extra_commands="reload" >+ >+_consul_user=${consul_user} >+_consul_group=${consul_group} >+unset consul_user consul_group >+ >+# backwards compatibility >+if [ -n "${consul_dir}" ]; then >+ consul_datadir=${consul_dir} >+fi >+ >+if checkyesno consul_debug; then >+ consul_syslog_flags="-T ${name}-debug" >+fi >+ >+if checkyesno consul_configtest; then >+ restart_precmd="consul_checkconfig" >+ reload_precmd="consul_checkconfig" >+ configtest_cmd="consul_checkconfig" >+ extra_commands="${extra_commands} configtest" >+fi >+ >+pidfile=${consul_pidfile} >+ > procname="%%PREFIX%%/bin/consul" > command="/usr/sbin/daemon" >-command_args="-f -p ${pidfile} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_dir} -config-dir=%%PREFIX%%/etc/consul.d ${consul_args}" >+command_consul="/usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_datadir} -config-dir=%%ETCDIR%% ${consul_args}" >+command_args="-f ${consul_syslog_flags} -p ${pidfile} -u ${_consul_user} -t ${name} ${command_consul}" > >-start_precmd=consul_startprecmd >+consul_start_precmd() >+{ >+ install -d -m 0750 -o ${_consul_user} -g ${_consul_group} "%%ETCDIR%%" >+ install -d -m 0750 -o ${_consul_user} -g ${_consul_group} "${consul_datadir}" >+} > >-consul_startprecmd() >+consul_checkconfig() > { >- if [ ! -e ${pidfile} ]; then >- install -o ${consul_user} -g ${consul_group} /dev/null ${pidfile}; >- fi >- >- if [ ! -d ${consul_dir} ]; then >- install -d -o ${consul_user} -g ${consul_group} ${consul_dir} >- fi >+ echo "Performing sanity check on ${name} configuration:" >+ eval ${procname} validate "%%ETCDIR%%" > } > > run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240882
:
207901
| 209961