public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-metrics/chrony_exporter/files/, app-metrics/chrony_exporter/
@ 2024-07-04  1:23 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-07-04  1:23 UTC (permalink / raw
  To: gentoo-commits

commit:     0d5a31ce556742d39617ee80c79507e3e131468c
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Jun 27 13:05:42 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 01:21:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d5a31ce

app-metrics/chrony_exporter: new package, add 0.10.1

Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/37321
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-metrics/chrony_exporter/Manifest               |  2 ++
 .../chrony_exporter/chrony_exporter-0.10.1.ebuild  | 31 ++++++++++++++++++++++
 .../chrony_exporter/files/chrony_exporter.confd    |  2 ++
 .../chrony_exporter/files/chrony_exporter.initd    | 17 ++++++++++++
 app-metrics/chrony_exporter/metadata.xml           | 15 +++++++++++
 5 files changed, 67 insertions(+)

diff --git a/app-metrics/chrony_exporter/Manifest b/app-metrics/chrony_exporter/Manifest
new file mode 100644
index 000000000000..cc41592ed45d
--- /dev/null
+++ b/app-metrics/chrony_exporter/Manifest
@@ -0,0 +1,2 @@
+DIST chrony_exporter-0.10.1-deps.tar.xz 8939432 BLAKE2B 91fa640e67ab1b158992808d93093204a040e4487e75443f0c223a3b0d624e8c065785443eaaaa21fa2395df38a49285d209bd35bc95ab72013adc8559b5b99c SHA512 d027d4031ef8635ffbbc9a8d349b60ff1eb26ad17a2d27bd2d56f5a3422983b84891c367d70c43f7ee0ece3165428104611a51e0bc01e35ce1c2a4bd89c648b4
+DIST chrony_exporter-0.10.1.tar.gz 21438 BLAKE2B 9be912ab6569de2a5e6e39055ba54cc619d8a7c29d0043abda97af13ded6ee7766c97d97cc12cfc3404c4adbb1c779e444a9b3f18bf5ca615ba33f8cd62c70b9 SHA512 4e8f321b38605bad448d453e5754c6fe10518fe35ee063552a6dad6c01fbcc2156b1eb40873ba157a324fffc899acdaa8fb33b5464bdfe2c2b620c7849224c2a

diff --git a/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild b/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild
new file mode 100644
index 000000000000..b24bc02e2e57
--- /dev/null
+++ b/app-metrics/chrony_exporter/chrony_exporter-0.10.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="Chrony NTP exporter for Prometheus"
+HOMEPAGE="https://github.com/SuperQ/chrony_exporter"
+
+SRC_URI="https://github.com/SuperQ/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+	https://www.applied-asynchrony.com/distfiles/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="acct-group/chrony_exporter
+		acct-user/chrony_exporter"
+
+BDEPEND="dev-util/promu"
+
+src_compile() {
+	promu build -v --cgo --prefix bin || die
+}
+
+src_install() {
+	newbin bin/${P} ${PN}
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}

diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.confd b/app-metrics/chrony_exporter/files/chrony_exporter.confd
new file mode 100644
index 000000000000..0fa8c6ec9b45
--- /dev/null
+++ b/app-metrics/chrony_exporter/files/chrony_exporter.confd
@@ -0,0 +1,2 @@
+# arguments for chrony_exporter
+command_args="--collector.tracking --collector.sources"

diff --git a/app-metrics/chrony_exporter/files/chrony_exporter.initd b/app-metrics/chrony_exporter/files/chrony_exporter.initd
new file mode 100644
index 000000000000..7cddf925322e
--- /dev/null
+++ b/app-metrics/chrony_exporter/files/chrony_exporter.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2016-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus chrony metrics exporter"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/bin/chrony_exporter"
+command_args="${command_args}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+	after chronyd
+}

diff --git a/app-metrics/chrony_exporter/metadata.xml b/app-metrics/chrony_exporter/metadata.xml
new file mode 100644
index 000000000000..d5b482f753d9
--- /dev/null
+++ b/app-metrics/chrony_exporter/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>holger@applied-asynchrony.com</email>
+		<name>Holger Hoffstätte</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">SuperQ/chrony_exporter</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-04  1:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04  1:23 [gentoo-commits] repo/gentoo:master commit in: app-metrics/chrony_exporter/files/, app-metrics/chrony_exporter/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox