summaryrefslogtreecommitdiff
path: root/app-misc/carbon-c-relay
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-misc/carbon-c-relay
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/carbon-c-relay')
-rw-r--r--app-misc/carbon-c-relay/Manifest13
-rw-r--r--app-misc/carbon-c-relay/carbon-c-relay-2.5.ebuild36
-rw-r--r--app-misc/carbon-c-relay/carbon-c-relay-3.0.ebuild36
-rw-r--r--app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild33
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.confd15
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.confd-r115
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.initd70
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.initd-r174
-rw-r--r--app-misc/carbon-c-relay/metadata.xml10
9 files changed, 302 insertions, 0 deletions
diff --git a/app-misc/carbon-c-relay/Manifest b/app-misc/carbon-c-relay/Manifest
new file mode 100644
index 000000000000..f76a6b36ce96
--- /dev/null
+++ b/app-misc/carbon-c-relay/Manifest
@@ -0,0 +1,13 @@
+AUX carbon-c-relay.confd 362 SHA256 59585da9b3c72eb569bb5a736350e8fd7c397955682cf301fd3e261e658523f5 SHA512 39c4838e39c494ac70573f1d7202d7bf359a01903877eabac60f5576c288372897c72393322a3d991ae6bfc75f8275c178ead912321836f570b6535b9c53fa8e WHIRLPOOL 67edfb327a9d6d653ecc0e6319616be839cd5f8181aa88a93d486514620426c5ef8590f659501336a55754c1525fae4c92a61a9942ebc5a4746c0be29f20032b
+AUX carbon-c-relay.confd-r1 365 SHA256 9d75f37ce665f68eac89d8475b8063905a399707bea3867137a0c9578ea340f8 SHA512 a432cf28c86ec45c807eeb5a7b506e7dcc6155c138aea5dc60eb8bcf5036ac0efc3a81fbc044af34dab5f05f250635892c5e706dfd69cc1087f0c283c3aa9393 WHIRLPOOL fd5e5302f62dcabfe13134577fc21de304c22114e018e5ae798f00c1dbb80161915f2904f1be02171f08e52b08a22e2d262e1375bbbaeb4e0fc2073b3e9613af
+AUX carbon-c-relay.initd 1678 SHA256 c3296fc3944080e88059967646f4d88a1bbd8b3e2c4fa9a0b2e9224c73ec4613 SHA512 5a3415395affe6c4e315c650733d8e335d5fa8e490ffeba8dc7c944976f3b68ca14e801175a2136499b00fa6adf403428ae509cb9c3596b6a3188ef20d09c575 WHIRLPOOL dc413e1b2fb77919e688bf5ec91e4afa434ca6fdb466f432621bc7455f7dac7ad5b45753a11bcf5a64e06941569fce26c611d541bf91910b72d58c8b096e0bcc
+AUX carbon-c-relay.initd-r1 1801 SHA256 43e6fb5e6c83490c190db1cf6ef46423d7ad29f9d46cc3820927e21480ec8371 SHA512 5cf3c424a8be6bb55a80b58ce590838fec8ed26f8f407e8561c1e3ea094e80ad4021d153b3d816ab6d4e6589494d9ce621fe14196e223ef3a092d0aa26a63399 WHIRLPOOL 27aa131bf56d8dfef83fb6d4b0d7f8c87563ba40e5ab808d96edb8e921ede6da8f2a580990e5f024f7e2cd4af3faaee910dcd34f11d1521d97735bc852630a80
+DIST carbon-c-relay-2.5.tar.gz 102119 SHA256 6d3c538aacd08e9798e294d56b98854fdafe1b3a1d0d8118a406a2d8fe6aad5b SHA512 0b3b04003cda761816ea4bbe9d441366438c8507702f157504b21b66c9ef9b1e135239e6627d3dd3d371c023d71f2cd97ba45bc2ff6296a4998e06bdda219ea3 WHIRLPOOL dc73f9e001217ebbc84bc603fe94bdbf34a8039c65f3d1612c31a2e5de0fe8cb6a5c9db5bb7e79681daf567033b5ee2534a844f9e6d3315ca50f2ab0f1d5befa
+DIST carbon-c-relay-3.0.tar.gz 153479 SHA256 5ae673ed0091a814bc8d6081ff14cfbbda7582fa0c8ccf1a5cf438ba84c2b585 SHA512 046dd19be1791eaf2b50bd7029f0bbe8ad0805113faf9a80b37571c42d76c0f7661a9273876de8cd5bf1d13fdc8133a8eaf9def28dd8077bf667225726797fdc WHIRLPOOL f349475179f762a226c87c87fe12e5b43be4fbff36ed12292c5461e65cbf1a814108daa4e0bd6946b077c230656372e6190fc657136cf6e4fa541e4636dc9b8d
+DIST carbon-c-relay-3.1.tar.gz 271011 SHA256 d21203a63fefa7c226f8170da204832d8e519001004f0f6fb44546c5eb147389 SHA512 8c8062e4fa9ec22281b1848923dc73b39c4617b0c6297f57f69080a7aedf07ef8d5c6e0bebbd5ef0faf3a1255ab155475bc40aeee582838d604da1cc2e43ca4e WHIRLPOOL bdc4d238398ac6b981e432bef3c1f4c9d181d1540a0af1e573bb6e8bb0a42deb0e4b504b6b727019e4667aa8188d476e261e0bdbe5b469345f7b17a39b966b6c
+EBUILD carbon-c-relay-2.5.ebuild 763 SHA256 3b1788afdd5dab301b221b01cee8807a1f4e63742e0b0ad9b1680624ec58edaa SHA512 f8836f0b85480498ec316e1e356e2c06038f7cd98f80519d7734b3ec4d41113a6ba0f67a4740b2244ccbbf60a643c94dcd9be20d15efa44bfe60f362c9b8d770 WHIRLPOOL 40e0a34012176a16bab0a0f6c889e871ee2c42b8c5c3fa2b41e844a2d4f9dd58507878e5e6ae813b82fda8a3fffc8f0f6c26e575f23f6c002973b148665aeaac
+EBUILD carbon-c-relay-3.0.ebuild 763 SHA256 3b1788afdd5dab301b221b01cee8807a1f4e63742e0b0ad9b1680624ec58edaa SHA512 f8836f0b85480498ec316e1e356e2c06038f7cd98f80519d7734b3ec4d41113a6ba0f67a4740b2244ccbbf60a643c94dcd9be20d15efa44bfe60f362c9b8d770 WHIRLPOOL 40e0a34012176a16bab0a0f6c889e871ee2c42b8c5c3fa2b41e844a2d4f9dd58507878e5e6ae813b82fda8a3fffc8f0f6c26e575f23f6c002973b148665aeaac
+EBUILD carbon-c-relay-3.1-r1.ebuild 765 SHA256 1b639164a894f48e08f93f0bdd0cfad22b3e832fa452933d7cc75af1511206ce SHA512 ab94696270aa31b1c4b48320aa211a4488f613a28497c6d08c502a9e14e642ea89d08233f6f128b7ddb5ef31e361bbe7053e91118d1fdbd4b40a9d1e12ce59fa WHIRLPOOL bfbbce605c246811000140600e9e3a8a818b040dd00d286555ef4f4e96be49bf99b1757b5b8417e0255f94c6fba7fa7c283a943cbf3c4bc36334b30775d2eee5
+MISC ChangeLog 5651 SHA256 225cfa30da5b142e679f76ae622e5ebfe44d3c0e0f5c121e2e5f3770bcfa965d SHA512 4e64882411923e4f7e288988f590d4a3975413c2f1bb8baf16cc1146763eec60efc0cb28e05d8d9c9a23ec08f8a712aaefc537f66af3806106677e464281289b WHIRLPOOL 4324b314f2145d9177a844548bd8eb679d5ca9bba2d39e29cabb55a6b49217e633b41e2c899fc53386e1f41fe533b274d2f83e847c9081643a00200cc4e875fb
+MISC ChangeLog-2015 2171 SHA256 b82d3b5c6ce6bd8756f7d98dd2b905f5a341cdc744064db88cd72fff94f2f8f0 SHA512 4948557084548138e005af3a72428c07aec2dd7ee1535e834a3a30ac1ddf7c6f638181bc7074dd4544da22da4397f6ab434f50bf2aa0c494f3ab11b92dac3d76 WHIRLPOOL 5f7325c694d1fadc31d831f62c3413d289c7c092af61f5ca53944a759203badf7f2c9c5a35b36d47738dde31162508220c07304d2752b56ed7a07b2bb9002d28
+MISC metadata.xml 313 SHA256 24ccb0b4ebc32dcd26652eee575bd2834175813c338dbdb203b45e828676d0de SHA512 df24381507480f808a47e0b8477f9f407d85a113fd6a8f6a100fd96fc2011f3a6d7cfc7bcf520e3254f604878b5bdd1672d92fc4969da0becc5e96da520d2ad7 WHIRLPOOL a54cfdcec88940275365ae60407b6fdddc384755dc0cc5e000222f859bf14c33e7a7b59f9615ca75d68c6f91a43f1243ef529cdcda20c21a360a1dfb750e96b6
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-2.5.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-2.5.ebuild
new file mode 100644
index 000000000000..963456421ce6
--- /dev/null
+++ b/app-misc/carbon-c-relay/carbon-c-relay-2.5.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs user
+
+DESCRIPTION="Enhanced C version of Carbon relay, aggregator and rewriter"
+HOMEPAGE="https://github.com/grobian/carbon-c-relay"
+SRC_URI="https://github.com/grobian/carbon-c-relay/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+pkg_preinst() {
+ enewgroup carbon
+ enewuser carbon -1 -1 -1 carbon
+}
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ newbin relay ${PN}
+ dodoc ChangeLog.md
+ doman ${PN}.1
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-3.0.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.0.ebuild
new file mode 100644
index 000000000000..963456421ce6
--- /dev/null
+++ b/app-misc/carbon-c-relay/carbon-c-relay-3.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs user
+
+DESCRIPTION="Enhanced C version of Carbon relay, aggregator and rewriter"
+HOMEPAGE="https://github.com/grobian/carbon-c-relay"
+SRC_URI="https://github.com/grobian/carbon-c-relay/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+pkg_preinst() {
+ enewgroup carbon
+ enewuser carbon -1 -1 -1 carbon
+}
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ newbin relay ${PN}
+ dodoc ChangeLog.md
+ doman ${PN}.1
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild
new file mode 100644
index 000000000000..b8caef32bf9c
--- /dev/null
+++ b/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+
+DESCRIPTION="Enhanced C version of Carbon relay, aggregator and rewriter"
+HOMEPAGE="https://github.com/grobian/carbon-c-relay"
+SRC_URI="https://github.com/grobian/carbon-c-relay/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+pkg_preinst() {
+ enewgroup carbon
+ enewuser carbon -1 -1 -1 carbon
+}
+
+src_install() {
+ default
+ # rename too generic name
+ mv "${ED}"/usr/bin/{relay,${PN}} || die
+ dodoc ChangeLog.md
+
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN}
+}
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.confd b/app-misc/carbon-c-relay/files/carbon-c-relay.confd
new file mode 100644
index 000000000000..d2824644d3c0
--- /dev/null
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# routing file to read
+#ROUTES_FILE=/etc/carbon-c-relay.conf
+
+# where to store the PID-file
+#PIDFILE=/run/carbon-c-relay.pid
+
+# user and group to run carbon-c-relay as
+#USER=carbon
+#GROUP=carbon
+
+# any options to use when starting the relay
+#EXTRA_OPTS=
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1
new file mode 100644
index 000000000000..5233eec2d2a1
--- /dev/null
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1
@@ -0,0 +1,15 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# routing file to read
+#ROUTES_FILE=/etc/carbon-c-relay.conf
+
+# where to store the logfile
+#LOGFILE=/var/log/carbon-c-relay.log
+
+# user and group to run carbon-c-relay as
+#USER=carbon
+#GROUP=carbon
+
+# any options to use when starting the relay
+#EXTRA_OPTS=
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.initd b/app-misc/carbon-c-relay/files/carbon-c-relay.initd
new file mode 100644
index 000000000000..8d39afe05d49
--- /dev/null
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.initd
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+description="Lightweight graphite metrics router and aggregator."
+description_configtest="Run carbon-c-relay's internal config check."
+description_reload="Reload the carbon-c-relay configuration without losing connections."
+
+routes_config=${ROUTES_FILE:-/etc/${SVCNAME}.conf}
+
+command="/usr/bin/carbon-c-relay"
+command_args="-f ${routes_config} ${EXTRA_OPTS}"
+pidfile=${PIDFILE:-/run/${SVCNAME}.pid}
+user=${USER:-carbon}
+group=${GROUP:-carbon}
+
+depend() {
+ need net
+ use dns
+}
+
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ configtest || return 1
+ fi
+ touch /var/log/${SVCNAME}.log
+ chown ${user}:${group} /var/log/${SVCNAME}.log
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
+}
+
+stop_post() {
+ rm -f ${pidfile}
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --background --make-pidfile --pidfile ${pidfile} \
+ --stdout /var/log/${SVCNAME}.log \
+ --stderr /var/log/${SVCNAME}.log \
+ --user ${user} --group ${group} \
+ --exec ${command} -- ${command_args}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${command} --pidfile ${pidfile}
+ eend $?
+}
+
+reload() {
+ configtest || return 1
+ ebegin "Refreshing ${SVCNAME}'s configuration"
+ kill -HUP $(< ${pidfile}) &>/dev/null
+ eend $? "Failed to reload ${SVCNAME}"
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME}'s configuration"
+ ${command} -f "${routes_config}" -t < /dev/null > /dev/null
+ eend $? "failed, please correct errors above"
+}
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1
new file mode 100644
index 000000000000..1e2734941cc1
--- /dev/null
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1
@@ -0,0 +1,74 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+description="Lightweight graphite metrics router and aggregator."
+description_configtest="Run carbon-c-relay's internal config check."
+description_reload="Reload the carbon-c-relay configuration without losing connections."
+
+routes_config=${ROUTES_FILE:-/etc/${SVCNAME}.conf}
+
+command="/usr/bin/carbon-c-relay"
+command_args="-f ${routes_config} ${EXTRA_OPTS}"
+pidfile="/run/carbon-c-relay/${SVCNAME}.pid"
+logfile=${LOGFILE:-/var/log/${SVCNAME}.log}
+user=${USER:-carbon}
+group=${GROUP:-carbon}
+
+depend() {
+ need net
+ use dns
+}
+
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ configtest || return 1
+ fi
+ touch "${logfile}"
+ mkdir -p "${pidfile%/*}"
+ chown ${user}:${group} "${logfile}" "${pidfile%/*}"
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
+}
+
+stop_post() {
+ rm -f "${pidfile}"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile "${pidfile}" \
+ --user ${user} --group ${group} \
+ --exec ${command} -- -D -P "${pidfile}" -l "${logfile}" \
+ ${command_args}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ # migration path
+ local pfile=${pidfile}
+ [[ -e /run/carbon-c-relay.pid ]] && pfile="/run/carbon-c-relay.pid"
+ start-stop-daemon --stop --exec ${command} --pidfile "${pfile}"
+ eend $?
+}
+
+reload() {
+ configtest || return 1
+ ebegin "Refreshing ${SVCNAME}'s configuration"
+ kill -HUP $(< "${pidfile}") &>/dev/null
+ eend $? "Failed to reload ${SVCNAME}"
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME}'s configuration"
+ ${command} -f "${routes_config}" -t < /dev/null > /dev/null
+ eend $? "failed, please correct errors above"
+}
diff --git a/app-misc/carbon-c-relay/metadata.xml b/app-misc/carbon-c-relay/metadata.xml
new file mode 100644
index 000000000000..976dd3f22c14
--- /dev/null
+++ b/app-misc/carbon-c-relay/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>grobian@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">grobian/carbon-c-relay</remote-id>
+ </upstream>
+</pkgmetadata>