Import consul-0.6.4.

Consul is a tool for service discovery and configuration. Consul is distributed,
highly available, and extremely scalable

ok jasper@
This commit is contained in:
ajacoutot 2016-05-14 13:49:47 +00:00
parent 9ad722f25a
commit 38a40de120
8 changed files with 105 additions and 0 deletions

27
sysutils/consul/Makefile Normal file
View File

@ -0,0 +1,27 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/05/14 13:49:47 ajacoutot Exp $
COMMENT= service discovery and configuration tool
GH_TAGNAME= v0.6.4
GH_ACCOUNT= hashicorp
GH_PROJECT= consul
CATEGORIES= sysutils net
HOMEPAGE= https://www.consul.io/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# MPLv2.0
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += c pthread
MODULES= lang/go
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/consul
${SUBST_CMD} -c -m 0640 ${FILESDIR}/config.json.in \
${PREFIX}/share/examples/consul/config.json
.include <bsd.port.mk>

2
sysutils/consul/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (consul-0.6.4.tar.gz) = MnxyIRrx1mE0d4VsFb97z8PIDSNUL8/+U10w0JNH4Is=
SIZE (consul-0.6.4.tar.gz) = 3912207

View File

@ -0,0 +1,7 @@
{
"bootstrap": false,
"server": true,
"ui": false,
"enable_syslog": true,
"data_dir": "${LOCALSTATEDIR}/consul"
}

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-vendor_github_com_fsouza_go-dockerclient_external_github_com_docker_docker_pkg_system_stat_openbsd_go,v 1.1.1.1 2016/05/14 13:49:47 ajacoutot Exp $
https://github.com/docker/docker/pull/21325/commits/719a43ca3530c424c3875d8c066f7ab09195dfdc
--- vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go.orig Thu May 12 17:18:18 2016
+++ vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go Thu May 12 17:18:30 2016
@@ -0,0 +1,15 @@
+package system
+
+import (
+ "syscall"
+)
+
+// fromStatT creates a system.StatT type from a syscall.Stat_t type
+func fromStatT(s *syscall.Stat_t) (*StatT, error) {
+ return &StatT{size: s.Size,
+ mode: uint32(s.Mode),
+ uid: s.Uid,
+ gid: s.Gid,
+ rdev: uint64(s.Rdev),
+ mtim: s.Mtim}, nil
+}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-vendor_github_com_fsouza_go-dockerclient_external_github_com_docker_docker_pkg_system_stat_unsupported_go,v 1.1.1.1 2016/05/14 13:49:47 ajacoutot Exp $
https://github.com/docker/docker/pull/21325/commits/719a43ca3530c424c3875d8c066f7ab09195dfdc
--- vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go.orig Thu May 12 17:18:45 2016
+++ vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go Thu May 12 17:18:52 2016
@@ -1,4 +1,4 @@
-// +build !linux,!windows,!freebsd,!solaris
+// +build !linux,!windows,!freebsd,!solaris,!openbsd
package system

View File

@ -0,0 +1,2 @@
Consul is a tool for service discovery and configuration. Consul is distributed,
highly available, and extremely scalable.

16
sysutils/consul/pkg/PLIST Normal file
View File

@ -0,0 +1,16 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/05/14 13:49:47 ajacoutot Exp $
@newgroup _consul:773
@newuser _consul:773:_consul:daemon:Consul Agent:/nonexistent:/sbin/nologin
@bin bin/consul
share/examples/consul/
@sample ${SYSCONFDIR}/consul.d/
@mode 0640
@owner _consul
@group _consul
share/examples/consul/config.json
@sample ${SYSCONFDIR}/consul.d/config.json
@mode
@sample ${LOCALSTATEDIR}/consul/
@owner
@group
@rcscript ${RCDIR}/consul

View File

@ -0,0 +1,17 @@
#!/bin/sh
#
# $OpenBSD: consul.rc,v 1.1.1.1 2016/05/14 13:49:47 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/consul agent"
daemon_flags="-config-dir ${SYSCONFDIR}/consul.d"
daemon_user="_consul"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_stop() {
pkill -INT -T "${daemon_rtable}" -xf "${pexp}"
}
rc_cmd $1