diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/consul-template | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/consul-template')
8 files changed, 193 insertions, 0 deletions
diff --git a/app-admin/consul-template/Manifest b/app-admin/consul-template/Manifest new file mode 100644 index 000000000000..f1a481717481 --- /dev/null +++ b/app-admin/consul-template/Manifest @@ -0,0 +1,9 @@ +AUX consul-template.confd 293 BLAKE2B 5c3ef27d72b4c98098b128f29c55f5e674c7d4427df9bc74519d84ad852c94c73d840a571cbf39bac4020558df57ea3f2d79b5e1dc60da8d8118fb6241586e60 SHA512 ee07c0f95b3ac35599417524dc2b76931a541f60888d93bf403c535518693452ff01076f70f3e891bca962376e422fb6650496297b5ffad96544fb4c36df0295 +AUX consul-template.initd 592 BLAKE2B 21d6ff6bee67a82c4305eba3765f8e9c49ee59357a553677fbf049a37dccad0d7645e681665db36e89263a5a73a1155e9b19446bdab7f58f04bb7173a727c711 SHA512 bbaa059f1b339f7f8c70babe90917fc1bbff36ca446452f6e4a744dd986392227342b865aa47be02ccec2d35c43814b8faadd66f9e5af5dab3abec9805b7e676 +AUX consul-template.logrotated 103 BLAKE2B 66f91c1a2cd0c926da67e99ccf0535c6ff5ed1e57c23fb3bb3df4066cfdc1ff70f2eae6a67c7816d8d38d41106f003fe2a98732a9180838c05d04a710d9bef09 SHA512 642b53e43fd7a4da00907600f26e3814893b61856a62083c804b0077043a4f8f6603f0ae4461e901105f8e1fe52c2f34f3e949e752441f5f510e9cc21890ca75 +AUX consul-template.service 398 BLAKE2B 94a30973f6e0ee114dc844bf9b83e423d72a2fc0a3bc0fb6a01668fdc268c7a4f7d550c67f2f6f5e5de3140d6f14aba99eb65702ee8e335e2c3750a8aba6d7ef SHA512 6f0621088475a392c142ff8cc7236850a61f2fdcb10d456a29a68dff1c12cd52f66cdb37ae2d7c84ba7513f430dc8cea6fd5f128a559b4de708c5b517aab75e1 +DIST consul-template-0.18.5.tar.gz 5285939 BLAKE2B 822df39f77d9aebc55e03d74b43ace9d453135c6270aedd3d41a674b5ae325a588af2a76c9236072d6f6dd274ab75c050df6607aa5bfc98b0caf2cd3065b1b04 SHA512 1709c889cd414d2b3510400e8077aec49006c31958618a38f6bce78dad2ba4aac5405410b030bf968b5cf148f4cfbe963ccf95a015cd1e58f2f6d1f09edc13de +DIST consul-template-0.19.5.tar.gz 6054881 BLAKE2B 48d691f9d09531248310ec50c6c59d3c74db4c8ca5f0236ac8336df92c75da89677e64cb593518032f48f53b9f5aa914a7b6ac0a2dc6bf6d32ae7c1f6d1dc60d SHA512 bdba4e821e353a71f9f6287b8ff352e85a916201314229b998bfbebb066fec17c5d7f12e224bf2920b018a4f5fec9000f122f6c04cb2e455a195b945e35235a5 +EBUILD consul-template-0.18.5-r1.ebuild 1351 BLAKE2B d48a01aabea1abe073bf834c3167d6c15d5ea169ccb164a7daec1643ed4b9f8d1ac34aadd1df655b73b56442a5761df2f1e8b4e72ef4788876d86c422cedd836 SHA512 0ad472d57b8c815ee88d051d18287b13c7839f147bcef5525a92c15cfe099c71dae7a5acb349239fa4158f2fed5fe6363eceb47b1b0861d8235f2a2510882e6e +EBUILD consul-template-0.19.5.ebuild 1328 BLAKE2B f19e2a8bc8129da1a7ec87b6e7b58cdba797e7ab52f6b401aac40b8e0126f76569166b054a80d343e05cc5df67c77140c1a46afa9e7502fe368ea0985bf69249 SHA512 500a8fdb1dcfa4456a252167bed358b8e14b04ac23c1889672e34eff22d12b88dd09fc40bf00c56252421ff82d213763f69a4327db12f913fef042e17747d944 +MISC metadata.xml 316 BLAKE2B 857b3a0a26e35ac2f52f797b85a42f91c74a10b4d8d6a1f5394465e68f6ad57bd732286650966f99cc516ec68d00f31f0f880931e2041cb596d50e521ac3a599 SHA512 e66cfdeeab0bec39ed4149454fd1876ce963f7bd0012fc659abf92aefbad4e5fba90c9fe84019273d5f837f6bdf438146b433d9ea00cfe1cf4356e112522f1ad diff --git a/app-admin/consul-template/consul-template-0.18.5-r1.ebuild b/app-admin/consul-template/consul-template-0.18.5-r1.ebuild new file mode 100644 index 000000000000..47439c5c68f5 --- /dev/null +++ b/app-admin/consul-template/consul-template-0.18.5-r1.ebuild @@ -0,0 +1,61 @@ +# 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" +DESCRIPTION="Generic template rendering and notifications with Consul" +EGO_PN="github.com/hashicorp/${PN}" +HOMEPAGE="https://github.com/hashicorp/consul-template" +LICENSE="MPL-2.0" +SLOT="0" +IUSE="" + +DEPEND=">=dev-lang/go-1.6:=" +RDEPEND="" + +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + eapply_user + # Avoid the need to have a git checkout + sed -e 's:^GIT.*::' \ + -i src/${EGO_PN}/scripts/compile.sh || die +} + +src_compile() { + export GOPATH=${S} + cd "${S}"/src/${EGO_PN} || die + PATH=${PATH}:${S}/bin \ + XC_ARCH=$(go env GOARCH) \ + XC_OS=$(go env GOOS) \ + emake bin-local +} + +src_test() { + cd "${S}"/src/${EGO_PN} || die + emake test || die +} + +src_install() { + dobin "${S}"/src/${EGO_PN}/pkg/$(go env GOOS)_$(go env GOARCH)/${PN} + dodoc "${S}"/src/${EGO_PN}/{CHANGELOG.md,README.md} + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /etc/${PN}.d +} diff --git a/app-admin/consul-template/consul-template-0.19.5.ebuild b/app-admin/consul-template/consul-template-0.19.5.ebuild new file mode 100644 index 000000000000..dfa6bf036b0b --- /dev/null +++ b/app-admin/consul-template/consul-template-0.19.5.ebuild @@ -0,0 +1,63 @@ +# 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" +DESCRIPTION="Generic template rendering and notifications with Consul" +GIT_COMMIT="f8c8205" +EGO_PN="github.com/hashicorp/${PN}" +HOMEPAGE="https://github.com/hashicorp/consul-template" +LICENSE="MPL-2.0" +SLOT="0" +IUSE="test" + +DEPEND="dev-lang/go + test? ( app-admin/consul )" +RDEPEND="" + +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + # Avoid the need to have a git checkout + sed -e "s:git rev-parse --short HEAD:echo ${GIT_COMMIT}:" \ + -e '/-s \\/d' \ + -i src/${EGO_PN}/Makefile || die +} + +src_compile() { + export GOPATH=${S} + cd src/${EGO_PN} || die + #XC_ARCH=$(go env GOARCH) \ + #XC_OS=$(go env GOOS) \ + emake dev +} + +src_test() { + cd src/${EGO_PN} || die + emake test +} + +src_install() { + dobin bin/${PN} + dodoc src/${EGO_PN}/{CHANGELOG.md,README.md} + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /etc/${PN}.d +} diff --git a/app-admin/consul-template/files/consul-template.confd b/app-admin/consul-template/files/consul-template.confd new file mode 100644 index 000000000000..9af7d023305e --- /dev/null +++ b/app-admin/consul-template/files/consul-template.confd @@ -0,0 +1,7 @@ +# you can change the init script behavior by setting those parameters +# - group (default: consul-template) +# - pidfile (default: /run/consul-template/consul-template.pid) +# - user (default: consul-template) + +# extra arguments for the consul agent +command_args="-config=/etc/consul-template.d" diff --git a/app-admin/consul-template/files/consul-template.initd b/app-admin/consul-template/files/consul-template.initd new file mode 100644 index 000000000000..f968d8d08612 --- /dev/null +++ b/app-admin/consul-template/files/consul-template.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 2015-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="consul-template agent" +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} + +command="/usr/bin/${RC_SVCNAME}" +command_args="-config=/etc/consul-template.d ${command_args}" +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 +} diff --git a/app-admin/consul-template/files/consul-template.logrotated b/app-admin/consul-template/files/consul-template.logrotated new file mode 100644 index 000000000000..51e2737fd491 --- /dev/null +++ b/app-admin/consul-template/files/consul-template.logrotated @@ -0,0 +1,7 @@ +/var/log/consul-template/consul-template.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff --git a/app-admin/consul-template/files/consul-template.service b/app-admin/consul-template/files/consul-template.service new file mode 100644 index 000000000000..69b1c86ddb46 --- /dev/null +++ b/app-admin/consul-template/files/consul-template.service @@ -0,0 +1,16 @@ +[Unit] +Description=consul-template daemon +Requires=network-online.target +After=network-online.target + +[Service] +User=consul-template +Environment=CONSUL_TEMPLATE_DAEMON_OPTS="-config=/etc/consul-template.d" +ExecStart=/usr/bin/consul-template $CONSUL_TEMPLATE_DAEMON_OPTS +Restart=on-failure +SuccessExitStatus=12 +KillSignal=SIGINT +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=default.target diff --git a/app-admin/consul-template/metadata.xml b/app-admin/consul-template/metadata.xml new file mode 100644 index 000000000000..7efeb6aef9c6 --- /dev/null +++ b/app-admin/consul-template/metadata.xml @@ -0,0 +1,10 @@ +<?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> + <upstream> + <remote-id type="github">hashicorp/consul-template</remote-id> + </upstream> +</pkgmetadata> |