summaryrefslogtreecommitdiff
path: root/app-admin/consul
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/consul
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/consul')
-rw-r--r--app-admin/consul/Manifest14
-rw-r--r--app-admin/consul/consul-0.8.4-r1.ebuild67
-rw-r--r--app-admin/consul/consul-0.9.3.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
11 files changed, 232 insertions, 0 deletions
diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
new file mode 100644
index 000000000000..f2ca680ed4a5
--- /dev/null
+++ b/app-admin/consul/Manifest
@@ -0,0 +1,14 @@
+AUX bootstrap.json.example 46 SHA256 3c72ef9ab55addef92689816fe0e737c640190a8e5513af0b4b60a3176a30aa3 SHA512 eda1c8779b06ce6020e3f4e759201336b2bfa716986446882db4e6e95ff89a7da0c6101dd4dd603a59202b9c2db79d96f36cf53b63bc63375d94ba74ba4e2857 WHIRLPOOL 7c0c51dc01977b429db97b5928e90ecd6b294fdf354aaaf781b77cc661c7de5f755b93774c37a790777afff2cf8dec2459dea8e2687b7b71e99f79fd1ff3874e
+AUX consul.confd 301 SHA256 55151a3dbec4877bb5d02edb97686ebf28c216197672f31b93cb5ba3e38bc057 SHA512 d0587263753965b4614a24c3bd4aeed13e236a1dc6ed329b2ce542d394d1d5542e5db061af2151be54f5882c4bb0e254511645065f32c59d7fc338ac0bd4de7a WHIRLPOOL 3e96b307e34092204f81afdfe2ffed0fd08026163d7c5f93e20d08a3fa171b60b5950ad89bcea7cf75fa0d9ffa770cd135e92045c5d6d26585e67684b56c912d
+AUX consul.initd 726 SHA256 1a2fe5a47ab6d617a0c40310967b1ed8ae1dd1743c02e9e04a623ae1e8741c1b SHA512 a13fa8476d27288ee284b7460d77f7e67327b5a18b4635ab9c6f2f5ae05981f6876f1a2f4f27448a22a602a2ed30bd7873fe15776473d5aa6db9497765f1be6e WHIRLPOOL c6b7dfb92be4bcc3f4646ac607436be224b4a53aa5f69633fdddb7fa4dc8b27d3d950997394b9acf11e3c5b0f24f044d6fba1fadd33989aa07c129dff055c401
+AUX consul.logrotated 85 SHA256 9c69976b13ea56155e8cc9fc70327d8b7a24a0dd01f67c5f9389aa71d670df8d SHA512 e4943908e26d75ca8eb658b268479e47bc71b96957de8c35dddec52e7b8062aec3fada4e86fd97f986fbac912d29cad1f83f943ea4451b7469df0712799bb972 WHIRLPOOL ba8a6b793cbc8048136413869acbfbf44c7c8b4b6eace7d3d53677c4569974a5ed9dc1bbe92bba60c945d5db72ccfa806ce3e8a7e71cdfda8e8c343f33860dc5
+AUX consul.service 354 SHA256 e36670c1d1189403996ed74704c1751666d4bb2340d5c62f0bbedcfdd48ac539 SHA512 537d35e5a79d40dc62f6eb04f4631251d1e6dd62f2bd7d5483274903996052705db5fb4026000ef6e768e3dafb02f155c5bc1fd15a32813ecca8b1348a95e92d WHIRLPOOL 263352c1372f76f4676e69e7f66362eea69df71ef26d097928c6b02b7a464ce747a7f0d6acd2b01eaa2b62f88ba54bf96879ea3c1f9fb10c42dbf6eaf403ef8d
+AUX data-dir.json.example 36 SHA256 1f1f24ac4b37df816974fbe3e3ba3d7ed1c8d15cb2425ba29b196329473bf38c SHA512 cca94745ddfdcfedcc612da4a14965d4f51f0eaf519d8395e95b8b6cbe7bcb9987b8fdbffd66fb13edda7164a7b0f26e93e5aeab9e631cbf5e0a3a5c05b84b0b WHIRLPOOL a866a28ae0160a138b19c2f8bde315f175932d1bc5ac9b77823cf8e5553644520b5ab2f7206404522e25f3188d83a18001d3631a681e27ae0252c472d231c03f
+AUX ui.json.example 17 SHA256 a90eb6376a8d69443c5f72b434c84ba51280a64d9831adf3882fe548f65c391b SHA512 9aebf80a0dd2bc5345285b63c894af8c0d5864f352d97fc3ba7cd6bf22b905ace3bd221cf23092080e9f7d60832384632c2f069d580eef789eb3f81011e9869d WHIRLPOOL 40ec22ab7c14627f6fa2352b663a3f1545f259e813d14177e591dc52d50de2612d08f53976ddc581e2bef384a11caf22cad41feed521154245eef88537ee6e84
+DIST consul-0.8.4.tar.gz 6614287 SHA256 d5573d6e70d490c8b8109722c2019b5a2b35eff703b92d6276997846361cff1b SHA512 4bbb167a603f1d20940330bd9615ba0f50e0113e1d96ce47773f5d2813635f76dd1aec8f43dae4c8c547cec8a891eb0726eeeda7bd7c5b1d495029b359378e68 WHIRLPOOL e270367c69fe74f25c89ef9e8c7f71307d3b8e48b4210e43e48907f1f5a73f11f45aa2b212f70c24463e35d800b861ccd34e2c82de863fc6e7da9cd3eda5214c
+DIST consul-0.9.3.tar.gz 7278357 SHA256 69b76432203e046a8025ce13f7cc041b2308d72f07f240a57f2ba5d580fcff70 SHA512 a1c9cdd3e197afbf088bd1866af15c1864cb8d042dc65d2fcc0d9070b8bf2f9380cf2ceadaff6d5bba7ecd379d53f4b8191e1ae6832f1b2c82f21c62f07d8b0f WHIRLPOOL 9e5ac311761bc786c986d4b0cdb4ba541a46f57cffd8cac4de96292293518cd8e8f3743bcb0740b245ae5a30f9f157987078874503bd6b0685a9f3c88c92ffba
+EBUILD consul-0.8.4-r1.ebuild 1524 SHA256 54f280e236dda24eda7da07f1feed8790b6f493d289b2d3455465f969172454d SHA512 a262f9fcffdff04f28a6e5be42a0037ab15a774675ab32b0d6cdfb1a7c695b9f859e2c189736157c558bef98d21a2cefe48c4556c823667b64ef4578c9541b84 WHIRLPOOL f6fa7c0857d7a470f5ff6ede65ecae00e77a504581b8a04048b314f58e82f950ab84fe4ae0b011c43cbede96ef6e811c57c77f238d870d4c59906c65a0447787
+EBUILD consul-0.9.3.ebuild 1560 SHA256 abff01f71390db4c05ec895508e7f81b9ba4f59514f4e839dc8b5b13407a4a40 SHA512 0b04e487febd8e65b0a24df723fd20532a04506140217a0b4fa671038bcbebd9f7f3d6014b4937871cd05ca1a037ec2ab66a6c3cc045d8b02caed0f61ff90061 WHIRLPOOL dea3ba50f56ab4db18036f04c1bca501e2490aadf99e2de2a0812e4ae9340817b67617f7afec890a9821285162642c786c9500029bbdad7043d8b1e66b3d5dea
+MISC ChangeLog 6414 SHA256 b6c3345f18332d9c9965b335a0b7c4246d852886f0c089f166d2c255d6e0af4d SHA512 664491d4dcef4abda009070a482c80a681f39a564ba7d983b8cf7a680db972550233e808bbaadecfef895c9990bb263f95c6273bf6b24c2f5523b660bb68e7d3 WHIRLPOOL 215e15b6c6379fb4e02ca41848e610ebec31946d24cb8f92adc4ac9b7f7675ef6d12679cf509e50cad04ac01587e335063c19f353f2880748dd1cd13928cf04b
+MISC ChangeLog-2015 1260 SHA256 e346cb99b0d823a6e4052d51aed1e13684aa9c7feeeb8a4b3027b74073e172a7 SHA512 9bcc7db86198b81da562dc68a3ebaa3505be6febaba7c21779580493a226fe7ec37e13ce1a3503ab4b17dfe0fc4e6e8b057908c2855c2b897318460ddc67d068 WHIRLPOOL 684c125f9d249b808024e89ad593c7c4219bcf59e4842d850118b728ef28219169fa6ae05e426fdb25b2cbe94c04b41c02748adc971df47374f57b4f6950cf0e
+MISC metadata.xml 391 SHA256 6b88704531e2782296e0491cf2b57c8bef914045a088c8c68c42b6cf0a655eda SHA512 74541a7ccabd8ed4cebaec46f8d848d1930e8b50bc1fe5d84a5d37022d307e261d8e5537f942608c019992a2deccf0831a7624447d92dd68fe85128cfabf4ceb WHIRLPOOL 344059242683458d3619a02327cf7e2919c43b940346d351c3d30a4dc91d5089491305ddd2193aad97c593a94151dd263bb7e3482447b3d7f914fa6c20199f4a
diff --git a/app-admin/consul/consul-0.8.4-r1.ebuild b/app-admin/consul/consul-0.8.4-r1.ebuild
new file mode 100644
index 000000000000..e12beae0d6c9
--- /dev/null
+++ b/app-admin/consul/consul-0.8.4-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 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="http://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.7.5:=
+ >=dev-go/go-tools-0_pre20160121"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup consul
+ enewuser consul -1 -1 /var/lib/${PN} consul
+}
+
+src_prepare() {
+ eapply_user
+
+ sed -e 's:^\(GIT_DESCRIBE=\).*:\1v'${PV}':' \
+ -e 's:^\(GIT_COMMIT=\).*:\1:' \
+ -e 's:^\(GIT_DIRTY=\).*:\1:' \
+ -e 's:go get -u -v $(GOTOOLS)::' \
+ -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}" \
+ 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-0.9.3.ebuild b/app-admin/consul/consul-0.9.3.ebuild
new file mode 100644
index 000000000000..1eae049ea45d
--- /dev/null
+++ b/app-admin/consul/consul-0.9.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2017 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="http://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}" \
+ 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/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>