public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthew Thode" <prometheanfire@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 19:57:32 +0000 (UTC)	[thread overview]
Message-ID: <1584302248.3d4fcf4411a9e35f8bb2a9e6072c58ff1452eb0b.prometheanfire@gentoo> (raw)

commit:     3d4fcf4411a9e35f8bb2a9e6072c58ff1452eb0b
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 15 19:43:19 2020 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 19:57:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d4fcf44

app-metrics/node_exporter: update to 1.0.0-rc0

also migrate to acct packages

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 app-metrics/node_exporter/Manifest                 |  1 +
 .../node_exporter/files/node_exporter.service      | 10 ++++
 .../node_exporter/node_exporter-1.0.0_rc0.ebuild   | 53 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/app-metrics/node_exporter/Manifest b/app-metrics/node_exporter/Manifest
index be1e49b6836..f0bd23b02a7 100644
--- a/app-metrics/node_exporter/Manifest
+++ b/app-metrics/node_exporter/Manifest
@@ -1 +1,2 @@
 DIST node_exporter-0.18.1.tar.gz 2110072 BLAKE2B 48c73d00cba892e34e95d40bd29c9ca70bc5748590f00cb7f8adcd25d8a9504f669d887b1273cc65316ca55b06c36d97a3e19a66382f35d5768db7c315981a13 SHA512 cf2b854fbec1ba39b18432cdc11ab507ebc5b2828e6b34b4f49af9b949fcd365cb3e5eb1e265d0825783810c6b1572a8b3512ec27a46e5c83f89a505590159c0
+DIST node_exporter-1.0.0_rc0.tar.gz 2753717 BLAKE2B 2e1984d080ce2a16ca710a3da882b311510b2741836d615075281f5fce2641be35084090d9bcedcb8bf4f6a18333c5fcd53eb98817d1efed4c1a26261a02bffd SHA512 ec1d79367c69a7ccdacc9482a38625ffc9adab6d781b789cc226eed0bd893deca5cfc420a096f790ccd57834492551d36e2f307ad27a6c67585c8ef31887b50f

diff --git a/app-metrics/node_exporter/files/node_exporter.service b/app-metrics/node_exporter/files/node_exporter.service
new file mode 100644
index 00000000000..3235924f785
--- /dev/null
+++ b/app-metrics/node_exporter/files/node_exporter.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Node Exporter
+
+[Service]
+User=node_exporter
+EnvironmentFile=/etc/sysconfig/node_exporter
+ExecStart=/usr/bin/node_exporter $OPTIONS
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-metrics/node_exporter/node_exporter-1.0.0_rc0.ebuild b/app-metrics/node_exporter/node_exporter-1.0.0_rc0.ebuild
new file mode 100644
index 00000000000..9eae734e4ac
--- /dev/null
+++ b/app-metrics/node_exporter/node_exporter-1.0.0_rc0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit golang-build golang-vcs-snapshot systemd
+
+EGO_PN="github.com/prometheus/node_exporter"
+EGIT_COMMIT="v${PV/_rc/-rc.}"
+NODE_EXPORTER_COMMIT="ef7c058"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+IUSE=""
+
+CDEPEND="acct-group/node_exporter
+	acct-user/node_exporter"
+DEPEND=">=dev-lang/go-1.12
+	>=dev-util/promu-0.3.0
+	${CDEPEND}"
+RDEPEND="${CDEPEND}"
+
+src_prepare() {
+	default
+	sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+	pushd src/${EGO_PN} || die
+	mkdir -p bin || die
+	GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache promu build -v --prefix node_exporter || die
+	popd || die
+}
+
+src_install() {
+	# binary and docs
+	dobin src/"${EGO_PN}"/node_exporter/node_exporter
+	dodoc src/"${EGO_PN}"/{README,CHANGELOG,CONTRIBUTING}.md
+	# systemd
+	systemd_dounit "${FILESDIR}/${PN}.service"
+	insinto /etc/sysconfig
+	newins src/"${EGO_PN}"/examples/systemd/sysconfig.node_exporter node_exporter
+	# openrc
+	newinitd "${FILESDIR}"/${PN}-1.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	# maintence
+	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 19:58 UTC|newest]

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

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=1584302248.3d4fcf4411a9e35f8bb2a9e6072c58ff1452eb0b.prometheanfire@gentoo \
    --to=prometheanfire@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