summaryrefslogtreecommitdiff
path: root/app-admin/consul
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/consul
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/consul')
-rw-r--r--app-admin/consul/Manifest14
-rw-r--r--app-admin/consul/consul-1.0.6.ebuild68
-rw-r--r--app-admin/consul/consul-1.2.0.ebuild68
-rw-r--r--app-admin/consul/consul-1.2.1.ebuild68
-rw-r--r--app-admin/consul/files/bootstrap.json.example4
-rw-r--r--app-admin/consul/files/consul.confd10
-rw-r--r--app-admin/consul/files/consul.initd27
-rw-r--r--app-admin/consul/files/consul.logrotated7
-rw-r--r--app-admin/consul/files/consul.service16
-rw-r--r--app-admin/consul/files/data-dir.json.example3
-rw-r--r--app-admin/consul/files/ui.json.example3
-rw-r--r--app-admin/consul/metadata.xml13
12 files changed, 301 insertions, 0 deletions
diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
new file mode 100644
index 000000000000..0dd45ae7b8e6
--- /dev/null
+++ b/app-admin/consul/Manifest
@@ -0,0 +1,14 @@
+AUX bootstrap.json.example 46 BLAKE2B 70821b3ebd2d39d67ec3b1fb06d7ffd20b89c13932e125682cc671d3914e860ee495e422d1d67fadf0762acfbcbdc9194fd54d851fc537966370287c13e1c779 SHA512 eda1c8779b06ce6020e3f4e759201336b2bfa716986446882db4e6e95ff89a7da0c6101dd4dd603a59202b9c2db79d96f36cf53b63bc63375d94ba74ba4e2857
+AUX consul.confd 301 BLAKE2B 0e3e2953a92c26f7cad295c5c11f8a1efe0c764266f9478a19cf64b182d561bc70485dc6aa18f10caf6d0ce056f40656cc7579033d3447150e3d2ef53c4b0c71 SHA512 d0587263753965b4614a24c3bd4aeed13e236a1dc6ed329b2ce542d394d1d5542e5db061af2151be54f5882c4bb0e254511645065f32c59d7fc338ac0bd4de7a
+AUX consul.initd 726 BLAKE2B b3bf7924a0eb0e3c499256a802b9d5f22bf362b59ba2d50b45049edb72192c9f67733d8042ed219835a997b4994a1d3966000cff79efb541f3d62c798836de80 SHA512 a13fa8476d27288ee284b7460d77f7e67327b5a18b4635ab9c6f2f5ae05981f6876f1a2f4f27448a22a602a2ed30bd7873fe15776473d5aa6db9497765f1be6e
+AUX consul.logrotated 85 BLAKE2B 8f3212c58295d57e9265dec26b9bfe562c47ca16844218002e51bdaf421adca082b9a955f1ebb71d83f1243b2e79c236f94f5f520d0606c15d20c3db9f5f7de6 SHA512 e4943908e26d75ca8eb658b268479e47bc71b96957de8c35dddec52e7b8062aec3fada4e86fd97f986fbac912d29cad1f83f943ea4451b7469df0712799bb972
+AUX consul.service 354 BLAKE2B 9996b9d6a1aab360a3b46518e2091e8f30794f3bd3d113a3e9cbff2f4ff8a4cd014475806bd75feb6948c12b60846a403e35630820b814032fadc9a664985b90 SHA512 537d35e5a79d40dc62f6eb04f4631251d1e6dd62f2bd7d5483274903996052705db5fb4026000ef6e768e3dafb02f155c5bc1fd15a32813ecca8b1348a95e92d
+AUX data-dir.json.example 36 BLAKE2B dadf9d7350346db73e4db0d98aaa569fe7caa5d695e25606fb97b252be16f2d3f50630092be39be378821f7e17e4914557a55c620156e7d07ced151d1f977689 SHA512 cca94745ddfdcfedcc612da4a14965d4f51f0eaf519d8395e95b8b6cbe7bcb9987b8fdbffd66fb13edda7164a7b0f26e93e5aeab9e631cbf5e0a3a5c05b84b0b
+AUX ui.json.example 17 BLAKE2B ecb48d228ee02df0a96b46cd87001742924ee907d7fe05b54c900b6e37e14b8bd7278e5adeaadd164b09129275a804f1014b7fdf64068ba9d9ad957325f9d5fd SHA512 9aebf80a0dd2bc5345285b63c894af8c0d5864f352d97fc3ba7cd6bf22b905ace3bd221cf23092080e9f7d60832384632c2f069d580eef789eb3f81011e9869d
+DIST consul-1.0.6.tar.gz 8211299 BLAKE2B 7ea5df497f4796e572a86127e0854935f97439504aff82fb697f33700e9d138048772f32f171dbbe4f1fb4d1ceefa7ca96cf3dce2a22cdffd4e1906f6befa55b SHA512 c55f09272859b828816ddf548952769172331c22be8a70a7f73ab9362744fb1f4bc5fdf81955a0dbc4101584cf3660f182620dcdc56bcf94b42dce644be232a8
+DIST consul-1.2.0.tar.gz 17187054 BLAKE2B 5e8d1151efe1e8ad5932886367d0012774713081aa2725f10d45af1e05751e328d76471ff3cbd85031c252c65cde0137f96c3ef86eca7e3e7f6b28e2d20ed0d5 SHA512 1c018a5f35164a899a086ccdae94cb5e6e2a490e4c788d65b0026dbf448950d0c1038b2d61cb10f5e8c9ad22a1affad64dd4a7086b59dffd115d40aa7b3d0cce
+DIST consul-1.2.1.tar.gz 14819500 BLAKE2B debb7ee5b8016527de0ebc680b228a9749435db4364e8d6e0160b1a20e2896dd4109edc5930dad961ce18f79182dda0c00a52a567ea6ff2d267b17448df2129d SHA512 5b5d8b62056c305f7388db50b54427ed21c41fef6d1b5f67da845a66bece35454e9f538bb0df59bc86788826b6cd20cd6179552060482908fc5cbc4a048c14a8
+EBUILD consul-1.0.6.ebuild 1578 BLAKE2B c32a67c19567b1b601bb6f272f6e435f9600accb4a41a03e774c197bb8f743d67c8fb4cc9e97c4829fb1bfd21eceed9318cc3f8e31217f89d57fe20c78f71054 SHA512 c2abbe3e57e2939832f443b2df5a5c3fad3fae197a5e96f6ed116f2c235a9df882848153f1928be71b5845c38256d99e1cceaf76c88efe30470495f0ef765572
+EBUILD consul-1.2.0.ebuild 1531 BLAKE2B 0d3891c096bd5a7b33a0f7b7969c7b27ea8536a1f1b608e1d119c1096734cf232dedf4ec38a011a39676ace9fa44de6ae8a58ad594f3d3fdd3093ee580e8509c SHA512 9ba4ed9ebb5c77b7ebc8daddf4346b8d14fca664eed894ee61c3aab06918d07a6a5156bf9717006009e65ff72c9954fd653630b0a16ab3ade5cbd9a36ef5005e
+EBUILD consul-1.2.1.ebuild 1529 BLAKE2B 5cfc78afbddfa423c8ffbe18e5ef532889de54bcb966dd51601297fc360dcf35e8ada41cfd3c725dbffb0ce52d95c79758a2b847cfe989ed48a4887c568c13ab SHA512 56c00a9377b39338c1735424b23b22b6b9cfcd6edf2d53d738ef57f951a9cce1307161f0a54e1be0b3afe9e792710f31a6dc540021d6684aee7837a8e4f9a032
+MISC metadata.xml 391 BLAKE2B c60fccfb61459803d5e9cff21d68525df118fc15b2390e805e3358b4e50e19a6eba6e06c057c5310797a9ba533f0d24746c95d8160a67e285732e7adab9b7fb2 SHA512 74541a7ccabd8ed4cebaec46f8d848d1930e8b50bc1fe5d84a5d37022d307e261d8e5537f942608c019992a2deccf0831a7624447d92dd68fe85128cfabf4ceb
diff --git a/app-admin/consul/consul-1.0.6.ebuild b/app-admin/consul/consul-1.0.6.ebuild
new file mode 100644
index 000000000000..05b4622df94f
--- /dev/null
+++ b/app-admin/consul/consul-1.0.6.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-vcs-snapshot systemd user
+
+KEYWORDS="~amd64"
+EGO_PN="github.com/hashicorp/consul"
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io"
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MPL-2.0"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="dev-go/gox
+ >=dev-lang/go-1.9:=
+ >=dev-go/go-tools-0_pre20160121"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup consul
+ enewuser consul -1 -1 /var/lib/${PN} consul
+}
+
+src_prepare() {
+ default
+
+ sed -e 's:^\(GIT_DESCRIBE=\).*:\1v'${PV}':' \
+ -e 's:^\(GIT_COMMIT=\).*:\1:' \
+ -e 's:^\(GIT_DIRTY=\).*:\1:' \
+ -e 's:go get -u -v $(GOTOOLS)::' \
+ -e 's:vendorfmt dev-build:dev-build:' \
+ -i "${S}/src/${EGO_PN}/GNUmakefile" || die
+}
+
+src_compile() {
+ # The dev target sets causes build.sh to set appropriate XC_OS
+ # and XC_ARCH, and skips generation of an unused zip file,
+ # avoiding a dependency on app-arch/zip.
+ GOPATH="${S}" GOBIN="${S}/bin" \
+ emake -C "${S}/src/${EGO_PN}" dev
+}
+
+src_install() {
+ local x
+
+ dobin "${S}/bin/${PN}"
+
+ keepdir /etc/consul.d
+ insinto /etc/consul.d
+ doins "${FILESDIR}/"*.json.example
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners consul:consul "${x}"
+ done
+
+ newinitd "${FILESDIR}/consul.initd" "${PN}"
+ newconfd "${FILESDIR}/consul.confd" "${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ systemd_dounit "${FILESDIR}/consul.service"
+}
diff --git a/app-admin/consul/consul-1.2.0.ebuild b/app-admin/consul/consul-1.2.0.ebuild
new file mode 100644
index 000000000000..1f9dd43d9356
--- /dev/null
+++ b/app-admin/consul/consul-1.2.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-vcs-snapshot systemd user
+GIT_COMMIT="2814197"
+KEYWORDS="~amd64"
+EGO_PN="github.com/hashicorp/consul"
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io"
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MPL-2.0"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="dev-go/gox
+ >=dev-lang/go-1.9:=
+ >=dev-go/go-tools-0_pre20160121"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup consul
+ enewuser consul -1 -1 /var/lib/${PN} consul
+}
+
+src_prepare() {
+ default
+
+ sed -e 's:go get -u -v $(GOTOOLS)::' \
+ -e 's:vendorfmt dev-build:dev-build:' \
+ -i "src/${EGO_PN}/GNUmakefile" || die
+}
+
+src_compile() {
+ # The dev target sets causes build.sh to set appropriate XC_OS
+ # and XC_ARCH, and skips generation of an unused zip file,
+ # avoiding a dependency on app-arch/zip.
+ GOPATH="${S}" \
+ GIT_DESCRIBE="v${PV}" \
+ GIT_DIRTY="" \
+ GIT_COMMIT="${GIT_COMMIT}" \
+ emake -C "src/${EGO_PN}" dev-build
+}
+
+src_install() {
+ local x
+
+ newbin bin consul
+
+ keepdir /etc/consul.d
+ insinto /etc/consul.d
+ doins "${FILESDIR}/"*.json.example
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners consul:consul "${x}"
+ done
+
+ newinitd "${FILESDIR}/consul.initd" "${PN}"
+ newconfd "${FILESDIR}/consul.confd" "${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ systemd_dounit "${FILESDIR}/consul.service"
+}
diff --git a/app-admin/consul/consul-1.2.1.ebuild b/app-admin/consul/consul-1.2.1.ebuild
new file mode 100644
index 000000000000..c23a7225e2cc
--- /dev/null
+++ b/app-admin/consul/consul-1.2.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-vcs-snapshot systemd user
+GIT_COMMIT="39f3f0"
+KEYWORDS="~amd64"
+EGO_PN="github.com/hashicorp/consul"
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io"
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MPL-2.0"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="dev-go/gox
+ >=dev-lang/go-1.9:=
+ >=dev-go/go-tools-0_pre20160121"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup consul
+ enewuser consul -1 -1 /var/lib/${PN} consul
+}
+
+src_prepare() {
+ default
+
+ sed -e 's:go get -u -v $(GOTOOLS)::' \
+ -e 's:vendorfmt dev-build:dev-build:' \
+ -i "src/${EGO_PN}/GNUmakefile" || die
+}
+
+src_compile() {
+ # The dev target sets causes build.sh to set appropriate XC_OS
+ # and XC_ARCH, and skips generation of an unused zip file,
+ # avoiding a dependency on app-arch/zip.
+ GOPATH="${S}" \
+ GIT_DESCRIBE="v${PV}" \
+ GIT_DIRTY="" \
+ GIT_COMMIT="${GIT_COMMIT}" \
+ emake -C "src/${EGO_PN}" dev-build
+}
+
+src_install() {
+ local x
+
+ dobin bin/consul
+
+ keepdir /etc/consul.d
+ insinto /etc/consul.d
+ doins "${FILESDIR}/"*.json.example
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners consul:consul "${x}"
+ done
+
+ newinitd "${FILESDIR}/consul.initd" "${PN}"
+ newconfd "${FILESDIR}/consul.confd" "${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ systemd_dounit "${FILESDIR}/consul.service"
+}
diff --git a/app-admin/consul/files/bootstrap.json.example b/app-admin/consul/files/bootstrap.json.example
new file mode 100644
index 000000000000..b7d573c0d2b3
--- /dev/null
+++ b/app-admin/consul/files/bootstrap.json.example
@@ -0,0 +1,4 @@
+{
+ "server": true,
+ "bootstrap_expect": 1
+}
diff --git a/app-admin/consul/files/consul.confd b/app-admin/consul/files/consul.confd
new file mode 100644
index 000000000000..b15e19c77013
--- /dev/null
+++ b/app-admin/consul/files/consul.confd
@@ -0,0 +1,10 @@
+# you can change the init script behavior by setting those parameters
+# - group (default: consul)
+# - pidfile (default: /run/consul/consul.pid)
+# - user (default: consul)
+
+# extra arguments for the consul agent
+command_args="-config-dir=/etc/consul.d"
+
+# upstream strongly recommends > 1
+GOMAXPROCS=2
diff --git a/app-admin/consul/files/consul.initd b/app-admin/consul/files/consul.initd
new file mode 100644
index 000000000000..b36db8aef13c
--- /dev/null
+++ b/app-admin/consul/files/consul.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 2015-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="consul agent"
+extra_started_commands="reload"
+export GOMAXPROCS=${GOMAXPROCS:-2}
+group=${group:-${RC_SVCNAME}}
+user=${user:-${RC_SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+command="/usr/bin/${RC_SVCNAME}"
+command_args="agent ${command_args:-config-dir=/etc/consul.d}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+stopsig="SIGINT"
+
+depend() {
+ need net
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ ${command} reload
+ eend $?
+}
diff --git a/app-admin/consul/files/consul.logrotated b/app-admin/consul/files/consul.logrotated
new file mode 100644
index 000000000000..ca958a5f5d05
--- /dev/null
+++ b/app-admin/consul/files/consul.logrotated
@@ -0,0 +1,7 @@
+/var/log/consul/consul.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-admin/consul/files/consul.service b/app-admin/consul/files/consul.service
new file mode 100644
index 000000000000..496fe4814789
--- /dev/null
+++ b/app-admin/consul/files/consul.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=consul agent
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=consul
+Environment=GOMAXPROCS=2
+Environment=CONSUL_AGENT_OPTS="-config-dir=/etc/consul.d"
+ExecStart=/usr/bin/consul agent $CONSUL_AGENT_OPTS
+Restart=on-failure
+KillSignal=SIGINT
+ExecReload=/usr/bin/consul reload
+
+[Install]
+WantedBy=default.target
diff --git a/app-admin/consul/files/data-dir.json.example b/app-admin/consul/files/data-dir.json.example
new file mode 100644
index 000000000000..af162113af62
--- /dev/null
+++ b/app-admin/consul/files/data-dir.json.example
@@ -0,0 +1,3 @@
+{
+ "data_dir": "/var/lib/consul"
+}
diff --git a/app-admin/consul/files/ui.json.example b/app-admin/consul/files/ui.json.example
new file mode 100644
index 000000000000..f8ce72f7753a
--- /dev/null
+++ b/app-admin/consul/files/ui.json.example
@@ -0,0 +1,3 @@
+{
+ "ui": true
+}
diff --git a/app-admin/consul/metadata.xml b/app-admin/consul/metadata.xml
new file mode 100644
index 000000000000..a028c353fe53
--- /dev/null
+++ b/app-admin/consul/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hashicorp/consul</remote-id>
+ </upstream>
+</pkgmetadata>