Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/blackbox_exporter/
Date: Mon, 03 May 2021 22:38:01
Message-Id: 1620081470.13b2d4a97078e21b981c0c0ed1e9ad1952fc78ac.williamh@gentoo
1 commit: 13b2d4a97078e21b981c0c0ed1e9ad1952fc78ac
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 3 22:27:53 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon May 3 22:37:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13b2d4a9
7
8 app-metrics/blackbox_exporter: 0.18.2 rev bump
9
10 - clean up binary renaming
11 - disable tests (they require the network)
12
13 Closes: https://bugs.gentoo.org/701232
14 Closes: https://bugs.gentoo.org/731006
15 Closes: https://bugs.gentoo.org/781869
16 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
17
18 .../blackbox_exporter-0.18.0-r2.ebuild | 53 ++++++++++++++++++++++
19 1 file changed, 53 insertions(+)
20
21 diff --git a/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0-r2.ebuild b/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0-r2.ebuild
22 new file mode 100644
23 index 00000000000..f91c8f04e99
24 --- /dev/null
25 +++ b/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0-r2.ebuild
26 @@ -0,0 +1,53 @@
27 +# Copyright 1999-2021 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +inherit fcaps go-module systemd
32 +GIT_COMMIT=1bc7680
33 +MY_PV="v${PV/_rc/-rc.}"
34 +
35 +DESCRIPTION="Prometheus exporter for blackbox probing via HTTP, HTTPS, DNS, TCP and ICMP"
36 +HOMEPAGE="https://github.com/prometheus/blackbox_exporter"
37 +SRC_URI="https://github.com/prometheus/blackbox_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
38 +
39 +LICENSE="Apache-2.0 BSD BSD-2 MIT"
40 +SLOT="0"
41 +KEYWORDS="~amd64"
42 +
43 +BDEPEND="dev-util/promu"
44 +
45 +DEPEND="
46 + acct-group/blackbox_exporter
47 + acct-user/blackbox_exporter"
48 +
49 +FILECAPS=(
50 + cap_net_raw usr/bin/blackbox_exporter
51 +)
52 +
53 +# tests require the network
54 +restrict+=" test "
55 +src_prepare() {
56 + default
57 + sed -i \
58 + -e "s/{{.Branch}}/Head/" \
59 + -e "s/{{.Revision}}/${GIT_COMMIT}/" \
60 + -e "s/{{.Revision}}/${PV}/" .promu.yml || die
61 +}
62 +
63 +src_compile() {
64 + promu build -v --prefix bin || die
65 +}
66 +
67 +src_install() {
68 + dobin bin/*
69 + dodoc {README,CONFIGURATION}.md blackbox.yml
70 + insinto /etc/blackbox_exporter
71 + newins example.yml blackbox.yml
72 + keepdir /var/lib/blackbox_exporter /var/log/blackbox_exporter
73 + fowners ${PN}:${PN} /var/lib/blackbox_exporter /var/log/blackbox_exporter
74 + systemd_dounit "${FILESDIR}"/blackbox_exporter.service
75 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
76 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
77 + insinto /etc/logrotate.d
78 + newins "${FILESDIR}/${PN}.logrotated" "${PN}"
79 +}