From: "Manuel Rüger" <mrueg@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus-blackbox_exporter/files/, ...
Date: Thu, 12 Oct 2017 18:30:59 +0000 (UTC) [thread overview]
Message-ID: <1507833034.65f668d31b913a03fa772432ee5755cb9e9c245d.mrueg@gentoo> (raw)
commit: 65f668d31b913a03fa772432ee5755cb9e9c245d
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 12 18:30:34 2017 +0000
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Thu Oct 12 18:30:34 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65f668d3
net-analyzer/prometheus-blackbox_exporter: Initial version
Package-Manager: Portage-2.3.11, Repoman-2.3.3
net-analyzer/prometheus-blackbox_exporter/Manifest | 1 +
.../files/prometheus-blackbox_exporter.confd | 2 +
.../files/prometheus-blackbox_exporter.initd | 19 ++++++++
.../prometheus-blackbox_exporter/metadata.xml | 11 +++++
.../prometheus-blackbox_exporter-0.10.0.ebuild | 50 ++++++++++++++++++++++
5 files changed, 83 insertions(+)
diff --git a/net-analyzer/prometheus-blackbox_exporter/Manifest b/net-analyzer/prometheus-blackbox_exporter/Manifest
new file mode 100644
index 00000000000..a9cb8e33c56
--- /dev/null
+++ b/net-analyzer/prometheus-blackbox_exporter/Manifest
@@ -0,0 +1 @@
+DIST prometheus-blackbox_exporter-0.10.0.tar.gz 530109 SHA256 fcadd04112bfd405c56011954bf225a72831d9c4ca4ef3fb5bfdb4107a225907 SHA512 497246b440b03b964c90f9bcf8ec1bca45c213bc4652ddb92c339b42586746b75a5145e87899381718ba628891faae3dfae39b0196272f572c7213e94ea7295b WHIRLPOOL 73ae4c5d5b1ed14e1f33157b56085f739c3a4078f605caf8798b1783a37fde342a6874b8a9fa0a71854f92511890c7ebbdb39433a2d6b0c701e29c61bccb1299
diff --git a/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.confd b/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.confd
new file mode 100644
index 00000000000..39887477dff
--- /dev/null
+++ b/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.confd
@@ -0,0 +1,2 @@
+# arguments for prometheus blackbox exporter
+command_args="--config.file=/etc/blackbox_exporter/blackbox.yml"
diff --git a/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.initd b/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.initd
new file mode 100644
index 00000000000..45da799723d
--- /dev/null
+++ b/net-analyzer/prometheus-blackbox_exporter/files/prometheus-blackbox_exporter.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus blackbox exporter"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+
+command="/usr/bin/blackbox_exporter"
+command_args="${command_args:--config.file=/etc/blackbox_exporter/blackbox.yml}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/blackbox_exporter/${RC_SVCNAME}.log \
+ --stderr /var/log/blackbox_exporter/${RC_SVCNAME}.log"
+
+depend() {
+ after net
+}
diff --git a/net-analyzer/prometheus-blackbox_exporter/metadata.xml b/net-analyzer/prometheus-blackbox_exporter/metadata.xml
new file mode 100644
index 00000000000..5d0a20fee17
--- /dev/null
+++ b/net-analyzer/prometheus-blackbox_exporter/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">prometheus/blackbox_exporter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/prometheus-blackbox_exporter/prometheus-blackbox_exporter-0.10.0.ebuild b/net-analyzer/prometheus-blackbox_exporter/prometheus-blackbox_exporter-0.10.0.ebuild
new file mode 100644
index 00000000000..c5cf528c542
--- /dev/null
+++ b/net-analyzer/prometheus-blackbox_exporter/prometheus-blackbox_exporter-0.10.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/prometheus/blackbox_exporter"
+EGIT_COMMIT="v${PV/_rc/-rc.}"
+BLACKBOX_EXPORTER_COMMIT="75681e3"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus exporter for blackbox probing via HTTP, HTTPS, DNS, TCP and ICMP"
+HOMEPAGE="https://github.com/prometheus/blackbox_exporter"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-util/promu"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${BLACBOX_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ mkdir -p bin || die
+ GOPATH="${S}" promu build -v --prefix blackbox_exporter || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin blackbox_exporter/blackbox_exporter
+ dodoc {README,CONFIGURATION}.md blackbox.yml
+ insinto /etc/blackbox_exporter
+ newins example.yml blackbox.yml.example
+ popd || die
+ keepdir /var/lib/blackbox_exporter /var/log/blackbox_exporter
+ fowners ${PN}:${PN} /var/lib/blackbox_exporter /var/log/blackbox_exporter
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
reply other threads:[~2017-10-12 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1507833034.65f668d31b913a03fa772432ee5755cb9e9c245d.mrueg@gentoo \
--to=mrueg@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