public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus-blackbox_exporter/files/, ...
@ 2017-10-12 18:30 Manuel Rüger
  0 siblings, 0 replies; only message in thread
From: Manuel Rüger @ 2017-10-12 18:30 UTC (permalink / raw
  To: gentoo-commits

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}
+}


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

only message in thread, other threads:[~2017-10-12 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 18:30 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus-blackbox_exporter/files/, Manuel Rüger

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