summaryrefslogtreecommitdiff
path: root/app-metrics/go-carbon
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-08 23:33:13 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-08 23:33:13 +0100
commit900dd293f8087dff1643b45d7b836702a9ea8fd9 (patch)
tree0829d8047ff5fda91e78e53de3bd01c094d837b8 /app-metrics/go-carbon
parent02f2b9c649c1687088b6ccb6d30b35f519f107cf (diff)
gentoo auto-resync : 08:04:2023 - 23:33:13
Diffstat (limited to 'app-metrics/go-carbon')
-rw-r--r--app-metrics/go-carbon/Manifest5
-rw-r--r--app-metrics/go-carbon/files/go-carbon.confd8
-rw-r--r--app-metrics/go-carbon/files/go-carbon.initd44
-rw-r--r--app-metrics/go-carbon/go-carbon-0.17.1.ebuild28
-rw-r--r--app-metrics/go-carbon/metadata.xml11
5 files changed, 96 insertions, 0 deletions
diff --git a/app-metrics/go-carbon/Manifest b/app-metrics/go-carbon/Manifest
new file mode 100644
index 000000000000..603f81a290f0
--- /dev/null
+++ b/app-metrics/go-carbon/Manifest
@@ -0,0 +1,5 @@
+AUX go-carbon.confd 213 BLAKE2B 75976af8c09afa4832f824199c8d2bd5efd27b1760dfe1160907761156c06fc7b4f51f32544b6c9b60121bdb88d61fdf100bb2a36c5ae767145728d09db88973 SHA512 ace9f07e58e9194c1723ab3c65cf90844f8cbc61b63b62354d13d134e016078f3fd987e055c91461b70f65c879ecabce9655070e9c77f31758ba1cb28f7abe4d
+AUX go-carbon.initd 952 BLAKE2B df48543888134efbc7153e6175953cb349128f8f820ed3d85b745755e3ee4f79ed94b74302f3d93f5e3ed3195372d544ef1fc4d9d03444c24de88d87fc9b23d1 SHA512 a935bdd026d41fd78963f31af251abf0dc86c0f8053f844ade0a234ed07c46794142a6fc80b7a65efbbcc63abd51fd1da1dbc3be5591092a62b2cf8783e0b41a
+DIST go-carbon-0.17.1.tar.gz 5074817 BLAKE2B 59b708ee2eeea486e3f4612efbe94e0592f920de3a194f7d89b4c92df88c65027373871a1503f9ce1027bc1695f19d86503de6da4789b7277780a08871f1c893 SHA512 d18e5768fa8942d3ad8039f2c8304797c488d892aae2d3bca64e2659d7bd432e9c8db14dae22eae86be9e6217b0ea567e2f40b4395c7123a7871f75afed82fc0
+EBUILD go-carbon-0.17.1.ebuild 638 BLAKE2B 2db80d66145c939d1300fdc04d0ff46de8d5662fa542e9a0ae5e6f501fd08d93843f717c1934b8be9ed9817a66d2de869e5f9627cf1511f48a81fa060ba9a4b2 SHA512 76774df15b712a6645b953dde98306705c2bd9cab596cb2b52aa03348f266b7d9d1ab5bea8d5f796b5c53d4d5ceec7ebc5e89dcfffeae9111cc3860f3ccc5913
+MISC metadata.xml 335 BLAKE2B defc9b32fd23cac009be14b7fcd637cdc55b156531ee2f1e1169ecc0bdd6f2259d67e3b19552e31a518f5ad8369c23184cf38aea06fd38e9737e5f9a2da361c1 SHA512 d9a6006c42886a891ccb76c9b7e7fc49444d761f8d63b73e9b4950a36a5b0da85649e066c5dff68998ad8ced47e2d9c38819fce4c810e2fbf9d217e4c0aa6c15
diff --git a/app-metrics/go-carbon/files/go-carbon.confd b/app-metrics/go-carbon/files/go-carbon.confd
new file mode 100644
index 000000000000..41e5838dd249
--- /dev/null
+++ b/app-metrics/go-carbon/files/go-carbon.confd
@@ -0,0 +1,8 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+#CONFIG_FILE=/etc/go-carbon/go-carbon.conf
+
+# user and group to run go-carbon as
+#USER=carbon
+#GROUP=carbon
diff --git a/app-metrics/go-carbon/files/go-carbon.initd b/app-metrics/go-carbon/files/go-carbon.initd
new file mode 100644
index 000000000000..b45a1a5a5d17
--- /dev/null
+++ b/app-metrics/go-carbon/files/go-carbon.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Graphite whisper metrics storage and retrieval server."
+
+carbonapi_config=${CONFIG_FILE:-/etc/go-carbon/${SVCNAME}.conf}
+
+command="/usr/bin/go-carbon"
+command_args="-config ${carbonapi_config}"
+pidfile="/run/go-carbon/${SVCNAME}.pid"
+user=${USER:-carbon}
+group=${GROUP:-carbon}
+
+depend() {
+ need net
+ use dns
+}
+
+start_pre() {
+ mkdir -p "${pidfile%/*}"
+ mkdir -p /var/log/go-carbon
+ chown ${user}:${group} "${pidfile%/*}" /var/log/go-carbon
+}
+
+stop_post() {
+ rm -f "${pidfile}"
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile "${pidfile}" \
+ --make-pidfile --background \
+ --user ${user} --group ${group} \
+ --exec ${command} -- \
+ ${command_args}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${command} --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-metrics/go-carbon/go-carbon-0.17.1.ebuild b/app-metrics/go-carbon/go-carbon-0.17.1.ebuild
new file mode 100644
index 000000000000..5b808efaa023
--- /dev/null
+++ b/app-metrics/go-carbon/go-carbon-0.17.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="Golang implementation of Graphite/Carbon server"
+HOMEPAGE="https://github.com/go-graphite/go-carbon"
+SRC_URI="https://github.com/go-graphite/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ acct-group/carbon
+ acct-user/carbon"
+BDEPEND=""
+
+src_install() {
+ insinto /etc/go-carbon
+ doins "${S}"/go-carbon.conf.example
+ dobin go-carbon
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/app-metrics/go-carbon/metadata.xml b/app-metrics/go-carbon/metadata.xml
new file mode 100644
index 000000000000..2a184bd0de98
--- /dev/null
+++ b/app-metrics/go-carbon/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">go-graphite/go-carbon</remote-id>
+ </upstream>
+</pkgmetadata>