View | Details | Raw Unified | Return to bug 239874 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/consul/Makefile (-4 / +17 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	consul
3
PORTNAME=	consul
4
PORTVERSION=	1.5.1
4
PORTVERSION=	1.5.3
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
7
7
Lines 17-28 Link Here
17
GH_ACCOUNT=	hashicorp
17
GH_ACCOUNT=	hashicorp
18
GH_SUBDIR=	src/github.com/${GH_ACCOUNT}/${PORTNAME}
18
GH_SUBDIR=	src/github.com/${GH_ACCOUNT}/${PORTNAME}
19
19
20
USE_RC_SUBR=	consul
20
USERS=		consul
21
GROUPS=		consul
22
ETCDIR=		${PREFIX}/etc/${PORTNAME}.d
23
CONSUL_DATADIR=	/var/db/${PORTNAME}
21
24
25
SUB_LIST=	ETCDIR=${ETCDIR} \
26
		USERS=${USERS} \
27
		GROUPS=${GROUPS} \
28
		CONSUL_DATADIR=${CONSUL_DATADIR}
29
22
PLIST_FILES=	bin/consul
30
PLIST_FILES=	bin/consul
23
31
24
USERS=		consul
32
USE_RC_SUBR=	consul
25
GROUPS=		consul
26
33
27
post-extract:
34
post-extract:
28
	@${MV} ${WRKSRC}/vendor/ ${WRKSRC}/src/
35
	@${MV} ${WRKSRC}/vendor/ ${WRKSRC}/src/
Lines 37-44 Link Here
37
		-o bin/consul
44
		-o bin/consul
38
45
39
do-install:
46
do-install:
47
	${MKDIR} ${STAGEDIR}${ETCDIR}
48
	${MKDIR} ${STAGEDIR}${CONSUL_DATADIR}
40
	${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/consul/bin/consul ${STAGEDIR}${PREFIX}/bin/consul
49
	${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/consul/bin/consul ${STAGEDIR}${PREFIX}/bin/consul
41
50
51
post-install:
52
	@${ECHO_CMD} "@dir(${USERS},${GROUPS},750) ${ETCDIR}" >> ${TMPPLIST}
53
	@${ECHO_CMD} "@dir(${USERS},${GROUPS},750) ${CONSUL_DATADIR}" >> ${TMPPLIST}
54
42
.include <bsd.port.pre.mk>
55
.include <bsd.port.pre.mk>
43
56
44
# golang assumes that if clang is in use, it is called "clang" and not "cc". If
57
# golang assumes that if clang is in use, it is called "clang" and not "cc". If
(-)sysutils/consul/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1558709843
1
TIMESTAMP = 1565859009
2
SHA256 (hashicorp-consul-v1.5.1_GH0.tar.gz) = b8376369b16987e87d3fcda20eb9463144737dbc7dfddd13cba6db9f8f427fd9
2
SHA256 (hashicorp-consul-v1.5.3_GH0.tar.gz) = f36f1e516346864a7a61b0917df0e82ef9a83eb792885f9f032cca99a594bc82
3
SIZE (hashicorp-consul-v1.5.1_GH0.tar.gz) = 21123963
3
SIZE (hashicorp-consul-v1.5.3_GH0.tar.gz) = 21743194
(-)sysutils/consul/files/consul.in (-26 / +29 lines)
Lines 6-52 Link Here
6
# REQUIRE: LOGIN
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
7
# KEYWORD: shutdown
8
#
8
#
9
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
9
# Add consul_enable="YES" to /etc/rc.conf to enable Consul
10
# to enable this service:
11
#
10
#
12
# consul_enable (bool):	Set to NO by default.
11
# Additional variables you can define are:
13
#				Set it to YES to enable consul.
12
#
14
# consul_user (user):        Set user to run consul.
13
# consul_user:		Username to run Consul
15
#                               Default is "consul".
14
#			Default: %%USERS%%
16
# consul_group (group):      Set group to run consul.
15
# consul_datadir:	Directory for the agent to store state
17
#                               Default is "consul".
16
#			Default: %%CONSUL_DATADIR%%
18
# consul_dir (dir):          Set dir to run consul in.
17
# consul_pidfile:	Full path of the Consul PID file
19
#                               Default is "/var/db/consul".
18
#			Default: /var/run/consul.pid
19
# consul_env:		Set environment variables used with Consul
20
#			Default: 
21
# consul_args:		Additional command-line options
22
#			Default: 
20
23
21
. /etc/rc.subr
24
. /etc/rc.subr
22
25
23
name=consul
26
name=consul
24
rcvar=consul_enable
27
rcvar=consul_enable
28
29
restart_precmd="consul_checkconfig"
30
reload_precmd="consul_checkconfig"
31
configtest_cmd="consul_checkconfig"
25
extra_commands="reload configtest"
32
extra_commands="reload configtest"
26
33
27
load_rc_config $name
34
load_rc_config $name
28
35
29
: ${consul_enable:="NO"}
36
: ${consul_enable:=NO}
30
: ${consul_user:="consul"}
37
: ${consul_user:=%%USERS%%}
31
: ${consul_group:="consul"}
38
: ${consul_datadir:=%%CONSUL_DATADIR%%}
32
: ${consul_dir:="/var/db/consul"}
39
: ${consul_pidfile:=/var/run/consul.pid}
33
40
34
pidfile=/var/run/consul.pid
41
pidfile=${consul_pidfile}
42
required_dirs="%%ETCDIR%% ${consul_datadir}"
43
35
procname="%%PREFIX%%/bin/consul"
44
procname="%%PREFIX%%/bin/consul"
36
command="/usr/sbin/daemon"
45
command="/usr/sbin/daemon"
37
command_args="-f -p ${pidfile} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_dir} -config-dir=%%PREFIX%%/etc/consul.d ${consul_args}"
46
command_args="-f -p ${pidfile} -u ${consul_user} -t ${name} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_datadir} -config-dir=%%ETCDIR%% ${consul_args}"
47
unset consul_user
38
48
39
start_precmd=consul_startprecmd
49
consul_checkconfig()
40
41
consul_startprecmd()
42
{
50
{
43
        if [ ! -e ${pidfile} ]; then
51
	echo "Performing sanity check on ${name} configuration:"
44
                install -o ${consul_user} -g ${consul_group} /dev/null ${pidfile};
52
	eval ${procname} validate %%ETCDIR%%
45
        fi
46
47
        if [ ! -d ${consul_dir} ]; then
48
                install -d -o ${consul_user} -g ${consul_group} ${consul_dir}
49
        fi
50
}
53
}
51
54
52
run_rc_command "$1"
55
run_rc_command "$1"
(-)UIDs (-1 / +1 lines)
Lines 414-420 Link Here
414
condor:*:466:466::0:0:& user:/home/condor:/usr/sbin/nologin
414
condor:*:466:466::0:0:& user:/home/condor:/usr/sbin/nologin
415
netmon:*:467:467::0:0:Network monitor account:/var/netmon:/usr/sbin/nologin
415
netmon:*:467:467::0:0:Network monitor account:/var/netmon:/usr/sbin/nologin
416
slurm:*:468:468::0:0:SLURM Daemon:/nonexistent:/usr/sbin/nologin
416
slurm:*:468:468::0:0:SLURM Daemon:/nonexistent:/usr/sbin/nologin
417
consul:*:469:469::0:0:Consul Daemon:/var/tmp/consul:/usr/sbin/nologin
417
consul:*:469:469::0:0:Consul Daemon:/nonexistent:/usr/sbin/nologin
418
serf:*:470:470::0:0:Serf Daemon:/nonexistent:/usr/sbin/nologin
418
serf:*:470:470::0:0:Serf Daemon:/nonexistent:/usr/sbin/nologin
419
vault:*:471:471:daemon:0:0:Vault Daemon:/nonexistent:/usr/sbin/nologin
419
vault:*:471:471:daemon:0:0:Vault Daemon:/nonexistent:/usr/sbin/nologin
420
nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin
420
nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin

Return to bug 239874