summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2021-04-09 11:10:12 +0300
committerMikle Kolyada <zlogene@gentoo.org>2021-04-09 11:21:33 +0300
commit59da910700e42a656aa2202cfc840d154a87493f (patch)
tree036ccc1cd81da5d0f5519dd2c6d1385528888716 /app-metrics
parentnet-im/pidgin: Bump to version 2.14.3 (diff)
downloadgentoo-59da910700e42a656aa2202cfc840d154a87493f.tar.gz
gentoo-59da910700e42a656aa2202cfc840d154a87493f.tar.bz2
gentoo-59da910700e42a656aa2202cfc840d154a87493f.zip
app-metrics/blackbox_exporter: Version bump (v0.18.0)
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/blackbox_exporter/Manifest1
-rw-r--r--app-metrics/blackbox_exporter/blackbox_exporter-0.18.0.ebuild54
-rw-r--r--app-metrics/blackbox_exporter/files/blackbox_exporter.service29
3 files changed, 84 insertions, 0 deletions
diff --git a/app-metrics/blackbox_exporter/Manifest b/app-metrics/blackbox_exporter/Manifest
index 774f4cb710b1..c8af355696f4 100644
--- a/app-metrics/blackbox_exporter/Manifest
+++ b/app-metrics/blackbox_exporter/Manifest
@@ -1,3 +1,4 @@
DIST blackbox_exporter-0.15.1.tar.gz 2120525 BLAKE2B c21a621dce663ccbc184c87b66e894ddc6a94bee9bbd2b9fb432a4d349afb35410f07ad150e946c5f8eb9ec8e6e7f2e6d4cbcafe118e8b2efe34902fbd0bf38a SHA512 2c7d0989bc70982a0fd528c7c6ed5ec6686f5e93db0a90db2b06e4e578503443da0750aaa2d6a01ae4fcd4c722eef522c0e06b019aa59a2eb837f233e317d4e2
DIST blackbox_exporter-0.16.0.tar.gz 2121367 BLAKE2B 92c55dbc3f47d7a2d8c37ad116857dd1d7314a6684d9f228039b09cc086edf72bdf5e0c2cc770ce45d687c45a38f6de72e612c0491ec66f836bed28b75b2e5a9 SHA512 85103b62e345ab5d59626e658047ac75649f9ef991c9bbaff32b95ea75ec2da2bf916573e664520766158805c6cf24163f2850c885a594d32b4f9c4c9dbed1a8
DIST blackbox_exporter-0.17.0.tar.gz 2615179 BLAKE2B 3746ceef8ffdfe017921a78873c09f196d82c3874aa24a0795b56d8858c355f2a4f9f557c65708037358fdbe8445a680c56a3725e7af4d634ef9396419bb4221 SHA512 9e79d083c5c8caebbc19b6feef04dd189bc91a72dcb3aa946a96543fbe28ae2c49cafeed3f42618747661421897adc17988ffc6cf0d7054cf0a385b85eeafc61
+DIST blackbox_exporter-0.18.0.tar.gz 2614990 BLAKE2B 8c6681f3b122b3d83980c74d888442bde4bbbbd02e34a33f1560494d724f4f596e87d2b87a0702d4c860e7bbc3720d70d49d8e08ae9e74b8a6e9abed907d74bd SHA512 6579d190c755515d4e5f05e2b6ed4d811010874dba1e16eaf6052e97c655f87aec33550f22ff173d2f3bbc77d091fb4fccad059f62ca6fbb33a372d48ae692f0
diff --git a/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0.ebuild b/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0.ebuild
new file mode 100644
index 000000000000..2b8fcf2bfe10
--- /dev/null
+++ b/app-metrics/blackbox_exporter/blackbox_exporter-0.18.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fcaps go-module systemd
+
+EGO_PN=github.com/prometheus/blackbox_exporter
+MY_PV="v${PV/_rc/-rc.}"
+GIT_COMMIT=1bc7680
+
+DESCRIPTION="Prometheus exporter for blackbox probing via HTTP, HTTPS, DNS, TCP and ICMP"
+HOMEPAGE="https://github.com/prometheus/blackbox_exporter"
+SRC_URI="https://github.com/prometheus/blackbox_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="
+ acct-group/blackbox_exporter
+ acct-user/blackbox_exporter
+"
+
+DEPEND="dev-util/promu"
+
+FILECAPS=(
+ cap_net_raw usr/bin/blackbox_exporter
+)
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die
+}
+
+src_compile() {
+ mkdir -p bin || die
+ promu build -v --prefix bin || die
+}
+
+src_install() {
+ dobin bin/*
+ dosym ../../usr/bin/blackbox_exporter-${PV} /usr/bin/blackbox_exporter
+ dodoc {README,CONFIGURATION}.md blackbox.yml
+ insinto /etc/blackbox_exporter
+ newins example.yml blackbox.yml
+ keepdir /var/lib/blackbox_exporter /var/log/blackbox_exporter
+ fowners ${PN}:${PN} /var/lib/blackbox_exporter /var/log/blackbox_exporter
+ systemd_dounit "${FILESDIR}"/blackbox_exporter.service
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+}
diff --git a/app-metrics/blackbox_exporter/files/blackbox_exporter.service b/app-metrics/blackbox_exporter/files/blackbox_exporter.service
new file mode 100644
index 000000000000..a29ee2b7c24a
--- /dev/null
+++ b/app-metrics/blackbox_exporter/files/blackbox_exporter.service
@@ -0,0 +1,29 @@
+[Unit]
+Description=Prometheus blackbox Exporter
+After=network.target
+
+[Service]
+User=blackbox_exporter
+Group=blackbox_exporter
+ExecStart=/usr/bin/blackbox_exporter --config.file="/etc/blackbox_exporter/blackbox.yml"
+ExecReload=/bin/kill -HUP $MAINPID
+DynamicUser=true
+
+NoNewPrivileges=true
+ProtectSystem=full
+ProtectKernelModules=true
+ProtectKernelTunables=true
+PrivateTmp=true
+LockPersonality=true
+ProtectHostname=true
+ProtectHome=true
+ProtectControlGroups=true
+ProtectKernelLogs=true
+PrivateDevices=true
+RestrictRealtime=true
+CapabilityBoundingSet=
+MemoryDenyWriteExecute=true
+CapabilityBoundingSet=CAP_NET_RAW
+AmbientCapabilities=CAP_NET_RAW
+
+[Install]