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-misc/carbon-c-relay | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/carbon-c-relay')
-rw-r--r-- | app-misc/carbon-c-relay/Manifest | 11 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild | 33 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/carbon-c-relay-3.2.ebuild | 39 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/carbon-c-relay-3.3.ebuild | 56 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/files/carbon-c-relay.confd | 15 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 | 15 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/files/carbon-c-relay.initd | 70 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 | 74 | ||||
-rw-r--r-- | app-misc/carbon-c-relay/metadata.xml | 15 |
9 files changed, 328 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..552c754474c0 --- /dev/null +++ b/app-misc/carbon-c-relay/Manifest @@ -0,0 +1,11 @@ +AUX carbon-c-relay.confd 362 BLAKE2B 7d33b9087ab77f07606fef84c4ed3dcff41e56040027b5bdbdb2ab22b010fb78acc69a1532738d6e76d453eaefcef0e47d3a5cc6f123167ee6687ce8bc8dc923 SHA512 39c4838e39c494ac70573f1d7202d7bf359a01903877eabac60f5576c288372897c72393322a3d991ae6bfc75f8275c178ead912321836f570b6535b9c53fa8e +AUX carbon-c-relay.confd-r1 365 BLAKE2B 10a531055296877bb027f5dc6546b054da7e5b84950bbcf8de8d4af552e61fcd9bbebeea3bc432a25f14103c4f2f30db4885259f855182e6923b79649e63fb60 SHA512 a432cf28c86ec45c807eeb5a7b506e7dcc6155c138aea5dc60eb8bcf5036ac0efc3a81fbc044af34dab5f05f250635892c5e706dfd69cc1087f0c283c3aa9393 +AUX carbon-c-relay.initd 1678 BLAKE2B f97d7390e0d03ffaa9cca658ac206eff4ea22336f100e860aa81c72e593440c79596af6c0245a8f8759fff2c24084f1019581b44f21e984820a616f10543d09a SHA512 5a3415395affe6c4e315c650733d8e335d5fa8e490ffeba8dc7c944976f3b68ca14e801175a2136499b00fa6adf403428ae509cb9c3596b6a3188ef20d09c575 +AUX carbon-c-relay.initd-r1 1801 BLAKE2B 4627b6e0d9a44d5c544ccff0c33557c73dd971929fbb442be79f3913752f39b1d534d4e4e936ebe94ebd5883d56e3f04314b9033c0a5ef7a3cbe7e05e1aeeb42 SHA512 5cf3c424a8be6bb55a80b58ce590838fec8ed26f8f407e8561c1e3ea094e80ad4021d153b3d816ab6d4e6589494d9ce621fe14196e223ef3a092d0aa26a63399 +DIST carbon-c-relay-3.1.tar.gz 271011 BLAKE2B 62d97ba268f121db466a761001f0c5f49e2571edc26c90ee4f40d311cc3f9abb55178ea375c6663407d5fce78c5162a8460a260c9baa7faed3908fc2e4bb9870 SHA512 8c8062e4fa9ec22281b1848923dc73b39c4617b0c6297f57f69080a7aedf07ef8d5c6e0bebbd5ef0faf3a1255ab155475bc40aeee582838d604da1cc2e43ca4e +DIST carbon-c-relay-3.2.tar.gz 291396 BLAKE2B 6a7ba4f30498c217505098b3cafa69a481a0bb78776b207cb4120d686a896156a39a0c87795b2766d39c3b0e69d4ed17943bee43e3218bf079931ad2b8360116 SHA512 11065303e18e9e2660150a7ba2137abe48b514abcdba93632a5fa46c8412bfb3472bfebb93584c629e5978be210237fad77f975eb1abb1e07b9cdba119c7eef4 +DIST carbon-c-relay-3.3.tar.gz 293055 BLAKE2B 96d4d230e233f20ce02d519804f36787fc30238ba4fb173600e18a52af6a28bb954c476baffefcb229e42f3c2e6ff1d97196c188c527fc72fd5b98982f74451f SHA512 285f5d90c31644543a674b60e017c4d65f39762fe211b14a99583473e6d80313c3f907e4432750e6f25851e4a693457d1609a9bc176744b217f6cf0533ab4879 +EBUILD carbon-c-relay-3.1-r1.ebuild 765 BLAKE2B 6596ee93330fbe973d42479a8d8b1b1174464a5ffdc513cfb6235ed069873e59177fa1d9be862a579c2ed4c482b2a8df5b8cb3f9b8dc075ce4615133dbc5a381 SHA512 ab94696270aa31b1c4b48320aa211a4488f613a28497c6d08c502a9e14e642ea89d08233f6f128b7ddb5ef31e361bbe7053e91118d1fdbd4b40a9d1e12ce59fa +EBUILD carbon-c-relay-3.2.ebuild 941 BLAKE2B 08b97db03e44cc14b3b1d3d8f8a5acfb9c23d7dead00c2e1c3088b524e5f19865e8599e915d1b84c7ed7414c66cc1c75dba20ba467b8b4d8b34aa69f942f7e22 SHA512 41808fed0c890a1e335986e93ee3fb0ec764ba3e364f151080d477b8546707857f36a834b755d25caab9c393c5e12409b48a497aab292b49921697c8c5546a85 +EBUILD carbon-c-relay-3.3.ebuild 1468 BLAKE2B 682bd014531308e19c89b5ed966a04929c161d4ef338800e573d06dfa07173a121d490f5b02aeae90a2b76463adf9a03ecce325db8187d2abf04ed35e6568167 SHA512 2d5e58830ac28eefee38f254420d864d30512bd2ef6e60035e9cafe19d3bfa72de752cb672e1191b864d193d8823a4f856bb3f2b6f476dd175e33b2c56c8c967 +MISC metadata.xml 578 BLAKE2B 6b8f16ecb046eecf1315d39e62dacf5c79896b80375eed7696acf791b3e3324e008f122e8deec4098d2298200a655e497fdac1d059aac3d6b7d8df980b8a29cc SHA512 78615eb4a4d5812d45ede2a138ab70ad2c6152ef5e4f7873cb4e95f29ad643f9a9a7e8db5b52f61a7f464e2c875591bfe359970ed6dde1c7188c59c6ba87d211 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/carbon-c-relay-3.2.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.2.ebuild new file mode 100644 index 000000000000..b90690b8cff7 --- /dev/null +++ b/app-misc/carbon-c-relay/carbon-c-relay-3.2.ebuild @@ -0,0 +1,39 @@ +# 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 ~ppc64 ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="lz4 ssl zlib" + +RDEPEND="lz4? ( app-arch/lz4 ) + ssl? ( dev-libs/openssl:0 ) + zlib? ( app-arch/gzip )" +DEPEND="${RDEPEND}" + +pkg_preinst() { + enewgroup carbon + enewuser carbon -1 -1 -1 carbon +} + +src_configure() { + econf $(use_with lz4) $(use_with ssl) $(use_with zlib gzip) +} + +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/carbon-c-relay-3.3.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.3.ebuild new file mode 100644 index 000000000000..f5a67797fa22 --- /dev/null +++ b/app-misc/carbon-c-relay/carbon-c-relay-3.3.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 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 ~ppc64 ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="lz4 ssl zlib pcre pcre2 +oniguruma" + +# ensure only one of pcre, pcre2 and oniguruma is set, or none (libc) +# unforunately pcre is in global USE, so we have to exclude that here +REQUIRED_USE=" + pcre2? ( !oniguruma ) + oniguruma? ( !pcre2 ) +" +RDEPEND="lz4? ( app-arch/lz4 ) + ssl? ( dev-libs/openssl:0 ) + zlib? ( app-arch/gzip ) + !oniguruma? ( !pcre2? ( pcre? ( dev-libs/libpcre ) ) ) + pcre2? ( dev-libs/libpcre2 ) + oniguruma? ( dev-libs/oniguruma )" +DEPEND="${RDEPEND}" + +pkg_preinst() { + enewgroup carbon + enewuser carbon -1 -1 -1 carbon +} + +src_configure() { + local pcrecfg + if use !pcre2 && use !oniguruma ; then + pcrecfg=$(use_with pcre) + else + pcrecfg="--without-pcre" + fi + + econf $(use_with lz4) $(use_with ssl) $(use_with zlib gzip) \ + "${pcrecfg}" $(use_with pcre2) $(use_with oniguruma) +} + +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..c023cb5be2a9 --- /dev/null +++ b/app-misc/carbon-c-relay/metadata.xml @@ -0,0 +1,15 @@ +<?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> + <use> + <flag name="lz4">add support for LZ4 compressed transport</flag> + <flag name="pcre2">use <pkg>dev-libs/libpcre2</pkg> as regex implementation</flag> + <flag name="oniguruma">use <pkg>dev-libs/oniguruma</pkg> as regex implementation</flag> + </use> + <upstream> + <remote-id type="github">grobian/carbon-c-relay</remote-id> + </upstream> +</pkgmetadata> |