public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/node_exporter/files/, app-metrics/node_exporter/
Date: Sun, 15 Mar 2020 23:11:08 +0000 (UTC)	[thread overview]
Message-ID: <1584313861.22ae5af892bcbe16a39954537a55b5940f8dcd81.williamh@gentoo> (raw)

commit:     22ae5af892bcbe16a39954537a55b5940f8dcd81
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 15 23:07:27 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 23:11:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22ae5af8

app-metrics/node_exporter: revbump for install location and go migration

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 .../node_exporter/files/node_exporter.initd        | 23 +++++++++++
 .../node_exporter-1.0.0_rc0-r1.ebuild              | 45 ++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/app-metrics/node_exporter/files/node_exporter.initd b/app-metrics/node_exporter/files/node_exporter.initd
new file mode 100644
index 00000000000..3ccddf757a8
--- /dev/null
+++ b/app-metrics/node_exporter/files/node_exporter.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus machine metrics exporter"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/sbin/node_exporter"
+command_args="${command_args:---collector.textfile.directory=/var/lib/node_exporter/}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/node_exporter/${RC_SVCNAME}.log \
+	--stderr /var/log/node_exporter/${RC_SVCNAME}.log"
+
+depend() {
+	after net
+}
+
+start_pre() {
+	checkpath -q -d -m 0755 -o ${user}:${group} /var/log/node_exporter
+}

diff --git a/app-metrics/node_exporter/node_exporter-1.0.0_rc0-r1.ebuild b/app-metrics/node_exporter/node_exporter-1.0.0_rc0-r1.ebuild
new file mode 100644
index 00000000000..43ee1e033e0
--- /dev/null
+++ b/app-metrics/node_exporter/node_exporter-1.0.0_rc0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module systemd
+MY_PV="v${PV/_rc/-rc.}"
+NODE_EXPORTER_COMMIT=ef7c058
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+SRC_URI="https://github.com/prometheus/node_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+CDEPEND="acct-group/node_exporter
+	acct-user/node_exporter"
+DEPEND=">=dev-util/promu-0.3.0
+	${CDEPEND}"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
+
+src_prepare() {
+	default
+	sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu.yml || die
+}
+
+src_compile() {
+	mkdir -p bin || die
+	promu build -v --prefix node_exporter || die
+}
+
+src_install() {
+	dosbin node_exporter/node_exporter
+	dodoc {README,CHANGELOG,CONTRIBUTING}.md
+	systemd_dounit examples/systemd/node_exporter.service
+	insinto /etc/sysconfig
+	newins examples/systemd/sysconfig.node_exporter node_exporter
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	keepdir /var/lib/node_exporter /var/log/node_exporter
+	fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
+}


             reply	other threads:[~2020-03-15 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 23:11 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-23 12:39 [gentoo-commits] repo/gentoo:master commit in: app-metrics/node_exporter/files/, app-metrics/node_exporter/ Sam James
2021-04-07  8:59 Mikle Kolyada
2020-03-15 19:57 Matthew Thode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1584313861.22ae5af892bcbe16a39954537a55b5940f8dcd81.williamh@gentoo \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox