From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-admin/consul-template/Manifest | 9 ++++ .../consul-template-0.18.5-r1.ebuild | 61 ++++++++++++++++++++++ .../consul-template/files/consul-template.confd | 7 +++ .../consul-template/files/consul-template.initd | 20 +++++++ .../files/consul-template.logrotated | 7 +++ .../consul-template/files/consul-template.service | 16 ++++++ app-admin/consul-template/metadata.xml | 10 ++++ 7 files changed, 130 insertions(+) create mode 100644 app-admin/consul-template/Manifest create mode 100644 app-admin/consul-template/consul-template-0.18.5-r1.ebuild create mode 100644 app-admin/consul-template/files/consul-template.confd create mode 100644 app-admin/consul-template/files/consul-template.initd create mode 100644 app-admin/consul-template/files/consul-template.logrotated create mode 100644 app-admin/consul-template/files/consul-template.service create mode 100644 app-admin/consul-template/metadata.xml (limited to 'app-admin/consul-template') diff --git a/app-admin/consul-template/Manifest b/app-admin/consul-template/Manifest new file mode 100644 index 000000000000..b91c87b2fcd8 --- /dev/null +++ b/app-admin/consul-template/Manifest @@ -0,0 +1,9 @@ +AUX consul-template.confd 293 SHA256 8e303d21f2c42d0372a374e2e93095f86c6caf7c86f79afd24483e0ee8ddbebe SHA512 ee07c0f95b3ac35599417524dc2b76931a541f60888d93bf403c535518693452ff01076f70f3e891bca962376e422fb6650496297b5ffad96544fb4c36df0295 WHIRLPOOL 3bf900604bc1817bb5a6e0df423cd1a2a352e8d0d77d06beaaffaadf08e735a687cf3122366fe6f01f2069380f267493d36c3e33e81a4c66737ceca435fac2ef +AUX consul-template.initd 592 SHA256 2c6f23de3ae5db567932039ec2cd2ed1da420a71884bb6fe9f7390049f3eb130 SHA512 bbaa059f1b339f7f8c70babe90917fc1bbff36ca446452f6e4a744dd986392227342b865aa47be02ccec2d35c43814b8faadd66f9e5af5dab3abec9805b7e676 WHIRLPOOL 226b2b3809d15858bdfc17a41e9ec38c0605da71d98e0a76848c7acae0a19f2ff8caf09affe5860aa9adad2cf33760036e486e5b8429e572a5880168d6d2d346 +AUX consul-template.logrotated 103 SHA256 44b553aa86ea3a1b017dbbe187b3d843831091fed81f71339ac34393f8f47513 SHA512 642b53e43fd7a4da00907600f26e3814893b61856a62083c804b0077043a4f8f6603f0ae4461e901105f8e1fe52c2f34f3e949e752441f5f510e9cc21890ca75 WHIRLPOOL 7a4e61e7649577b6b9caa4f11da84450d2910712ebc2cb4b82437f002a2b40c5120c05e08dd7d3a8c33fdbebd778e00529f3a8778ca73884511922f720b0eefd +AUX consul-template.service 398 SHA256 d95708aaebabdcb557825ffec93beb4c31d61b5f1f9ff4dec30d8793b0993997 SHA512 6f0621088475a392c142ff8cc7236850a61f2fdcb10d456a29a68dff1c12cd52f66cdb37ae2d7c84ba7513f430dc8cea6fd5f128a559b4de708c5b517aab75e1 WHIRLPOOL b1a60ef29ae93924f8b980dca88463a9d2661e895ec02cd2aec97cda95529259fb2a5e336b654fa27fe96c9f4bb5e8c07e940a252e204ff84d8fc116a7b05ba8 +DIST consul-template-0.18.5.tar.gz 5285939 SHA256 749bff38cefc1a2ced91a73f766550fb36ed793f402041bf31c624d1969e5b0b SHA512 1709c889cd414d2b3510400e8077aec49006c31958618a38f6bce78dad2ba4aac5405410b030bf968b5cf148f4cfbe963ccf95a015cd1e58f2f6d1f09edc13de WHIRLPOOL 9d9062043414d19d9038c962206d9868bef517a00e773a4205bf4c909fc0c9a8e0a2609b2cd92947159d91b7ae9adc3a96d7d3bf8865d11562d0a9e7c9940ee7 +EBUILD consul-template-0.18.5-r1.ebuild 1323 SHA256 5221370f59d367e84ed3c7c2a30ff7732acec2a8f2be1335e457a96763eaa5b2 SHA512 8ce0711af3cd5832468689370fa1e25f292302a0c6ea1045cf2e5fb77319be6cb2c1f0dd115fcc323ddcf95b25a169b7ce48b5ad62f0b9efdc53e94b1e9d0708 WHIRLPOOL 87f295dd5ec9dbf30c5f9134088941a5dd5767924e36000e66d4c365b7a52e0465974f2151a1dbd69d757870144b74e90e4b21b25a4b3968e13b1fded0b8f755 +MISC ChangeLog 4703 SHA256 f80b9a4ab43909f45b5456b7c4b209af7062f6d20c9c268ca56927e7b0de7333 SHA512 7a719a46a03ca327e224d1c3211cc65d074590983c5b5ae7d01d12bb0da3228bb01f83b58f2378068642f42974390823f6186960e75ef962265b0b27372b7222 WHIRLPOOL e6adbc582b4c5ee67e87e4d17b8e3583b7a1859066c5703749b66bdf5243109357768c05764083957bedcb32e62a53759437ef8f145d58be568ebc6414c96820 +MISC ChangeLog-2015 873 SHA256 309dab3b08de0570626ad0bd52979c35df9f8feb16763f31b23d922ac81d3f68 SHA512 c40929f84755aca698dc8c9787023b2d3c3afc435b89596a4d61b37f5f835ee40dd695c1b2f554e64fccde82ea12f14aeff9ce059d02a350621636ff19082c92 WHIRLPOOL dc36aedf24ff73c7373416e518299ad874e76adc3c887109710f95d3f66f99265e09424b0de28f34d790de7078b7db56160178943cf8c1a579d5b462ad282be6 +MISC metadata.xml 316 SHA256 d139fac458549f25769647609eb71c52527244c5577a7237cc4f2ec77663f7d0 SHA512 e66cfdeeab0bec39ed4149454fd1876ce963f7bd0012fc659abf92aefbad4e5fba90c9fe84019273d5f837f6bdf438146b433d9ea00cfe1cf4356e112522f1ad WHIRLPOOL 4aa14a0f2f2ab600005e375da4d4f9f9aa7b1eb857a38c1deacf84a0d3a5ef7833e46d5bf492fb97a1b12a9afacbecf3e54986f32ec32a812c7f8681d9c63866 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..b04c5a353362 --- /dev/null +++ b/app-admin/consul-template/consul-template-0.18.5-r1.ebuild @@ -0,0 +1,61 @@ +# 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" +DESCRIPTION="Generic template rendering and notifications with Consul" +EGO_PN="github.com/hashicorp/${PN}" +HOMEPAGE="http://${EGO_PN}" +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/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 @@ + + + + + zmedico@gentoo.org + + + hashicorp/consul-template + + -- cgit v1.2.3