summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahil Bhimjiani <me@rahil.rocks>2024-06-15 13:38:39 +0530
committerArthur Zamarin <arthurzam@gentoo.org>2024-06-15 22:21:04 +0300
commit0bc0d3fc4cc586b5d59b5ebe3b397d6029b5cc83 (patch)
treec35ec799044ae9e27318648e208db04b7dbfdee3 /app-metrics/node_exporter
parentdev-util/promu: update to 0.17.0 (diff)
downloadgentoo-0bc0d3fc4cc586b5d59b5ebe3b397d6029b5cc83.tar.gz
gentoo-0bc0d3fc4cc586b5d59b5ebe3b397d6029b5cc83.tar.bz2
gentoo-0bc0d3fc4cc586b5d59b5ebe3b397d6029b5cc83.zip
app-metrics/node_exporter: update to 1.8.1
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks> Closes: https://github.com/gentoo/gentoo/pull/37173 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'app-metrics/node_exporter')
-rw-r--r--app-metrics/node_exporter/Manifest1
-rw-r--r--app-metrics/node_exporter/node_exporter-1.8.1.ebuild76
-rw-r--r--app-metrics/node_exporter/node_exporter-9999.ebuild8
3 files changed, 82 insertions, 3 deletions
diff --git a/app-metrics/node_exporter/Manifest b/app-metrics/node_exporter/Manifest
index 51ab0df8392f..5e9593484721 100644
--- a/app-metrics/node_exporter/Manifest
+++ b/app-metrics/node_exporter/Manifest
@@ -2,3 +2,4 @@ DIST node_exporter-1.7.0-deps.tar.xz 26490120 BLAKE2B 3177aa96a50eefaeafad73b293
DIST node_exporter-1.7.0.tar.gz 328830 BLAKE2B 5f6b8101637bc0df605ea84446f905fcf8abeb68d0f2eda1e172b12aae4cffcfef54996f8725ad458671947c72a48fbbd73d4d401d8fd001e9e9d75f248230fc SHA512 4cd38b81cb54ca620a57c642a88b89d6d1ae36a752fff5f065c8848ea02066a211c6feb955bea4e311f7baafffee30a74670efe1cf4dac113c9bf7d154a1067b
DIST node_exporter-1.8.0-deps.tar.xz 1684580 BLAKE2B 0c02ca1177444885556da08676e78a413952955bfa80d9d7a9026133059594eaddd6f43fe10783701c71d0ecf2be9ac9383d019daeb287d5d016bd1188e5b37c SHA512 7268139beec7bf088ae4819809221985d1920e38b60db75cc074e92ce4dbe573c362f5227f095b4e5d1de7005b8ec2fbf96d3dcdf565eb2c9524d71676e1752e
DIST node_exporter-1.8.0.tar.gz 335029 BLAKE2B 639edfec973e7412620da855c997e1e50ccb5fc4afc4070c44ab3fbb9b4925103719c87f813e092db3548cd55b779233fbf71bf3affc6b779ba0e45f4767ec32 SHA512 4774ff3e146665783044769235b9d4f538ba3ff1d7c9fdfb33e5546042846371c7d26efa8a6d672e6de3c5a10107c2e72e5bbf38ed2952a5c48eda81fdc1379a
+DIST node_exporter-1.8.1.tar.gz 335265 BLAKE2B a3b6262fd903373bb3690b0f051d9a4770741ba9702dca30e9de91214493026f3386b72c14d77c9254ab0c3549c3a4aa1075b3abd9516aa1c4a44bcd5c26f25f SHA512 9a715912899b7e27390f403182d8eba3a040fe0f0b6832967d131338b44d7a4f89860d1f2e4da19b8be6389fed38db1a96d803412c041b2b996cc543d1383c79
diff --git a/app-metrics/node_exporter/node_exporter-1.8.1.ebuild b/app-metrics/node_exporter/node_exporter-1.8.1.ebuild
new file mode 100644
index 000000000000..e3855837cbdc
--- /dev/null
+++ b/app-metrics/node_exporter/node_exporter-1.8.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/prometheus/node_exporter.git"
+else
+ SRC_URI="
+ https://github.com/prometheus/node_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/rahilarious/gentoo-distfiles/releases/download/${PN}-1.8.0/deps.tar.xz -> ${PN}-1.8.0-deps.tar.xz
+ "
+ KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
+fi
+
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 MIT"
+SLOT="0"
+IUSE="selinux"
+
+COMMON_DEPEND="
+ acct-group/node_exporter
+ acct-user/node_exporter
+ selinux? ( sec-policy/selinux-node_exporter )
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND=">=dev-util/promu-0.15.0"
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-r3_src_unpack
+ go-module_live_vendor
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ [[ ${PV} != 9999* ]] && { ln -sv ../vendor ./ || die ; }
+ default
+}
+
+src_compile() {
+ if use x86; then
+ #917577 pie breaks build on x86
+ GOFLAGS=${GOFLAGS//-buildmode=pie}
+ fi
+ promu build -v || die
+ ./"${PN}" --help-man > "${PN}".1 || die
+}
+
+src_test() {
+ emake test-flags= test
+}
+
+src_install() {
+ dosbin "${PN}"
+ dodoc example-rules.yml *.md
+ doman "${PN}".1
+ systemd_newunit "${FILESDIR}"/node_exporter-1.7.0.service node_exporter.service
+ newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/node_exporter-1.7.0.logrotate "${PN}"
+ keepdir /var/lib/node_exporter /var/log/node_exporter
+ fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
+}
diff --git a/app-metrics/node_exporter/node_exporter-9999.ebuild b/app-metrics/node_exporter/node_exporter-9999.ebuild
index 8f35f716feb4..feea79c298d5 100644
--- a/app-metrics/node_exporter/node_exporter-9999.ebuild
+++ b/app-metrics/node_exporter/node_exporter-9999.ebuild
@@ -12,8 +12,10 @@ if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/prometheus/node_exporter.git"
else
- SRC_URI="https://github.com/prometheus/node_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz"
+ SRC_URI="
+ https://github.com/prometheus/node_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz
+ "
KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
fi
@@ -31,7 +33,7 @@ COMMON_DEPEND="
"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
-BDEPEND=">=dev-util/promu-0.3.0"
+BDEPEND=">=dev-util/promu-0.15.0"
src_unpack() {
if [[ ${PV} == 9999* ]]; then