app-metrics/node_exporter: update to 1.9.0

* bring live ebuild up-to-date with 1.8.2 ebuild

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
Closes: https://github.com/gentoo/gentoo/pull/41078
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Rahil Bhimjiani
2025-03-14 23:02:37 +05:30
committed by Arthur Zamarin
parent e45c64c33f
commit 1cc67508a1
3 changed files with 87 additions and 7 deletions

View File

@@ -2,3 +2,5 @@ DIST node_exporter-1.8.0-deps.tar.xz 1684580 BLAKE2B 0c02ca1177444885556da08676e
DIST node_exporter-1.8.1.tar.gz 335265 BLAKE2B a3b6262fd903373bb3690b0f051d9a4770741ba9702dca30e9de91214493026f3386b72c14d77c9254ab0c3549c3a4aa1075b3abd9516aa1c4a44bcd5c26f25f SHA512 9a715912899b7e27390f403182d8eba3a040fe0f0b6832967d131338b44d7a4f89860d1f2e4da19b8be6389fed38db1a96d803412c041b2b996cc543d1383c79
DIST node_exporter-1.8.2-deps.tar.xz 9579024 BLAKE2B 7fb5abc6f5c0517350dce5fd9ee895ee599853804d97e1229dfcc1b2fa4a75fa900d7af6ae00558b509c798f852432515045986102a55ba4fcb43ec18af18874 SHA512 4acc939c63935191dd5b58860e1543f76ddc67abe16370d19f163c0c982fad53f05a6ffd049555c0c5475d640ca495df0696e77fa23c6dd79f314ce67d014b8f
DIST node_exporter-1.8.2.tar.gz 335292 BLAKE2B 7aad2ac3433ba58be887c86d1cfbf0cd53d6712d171d2a928145588ea68f2839d593758254ab8742b7c27f068a75391959ea78ae768ffc1a0a1f5b08069dcf52 SHA512 68112a85a9ffde88d75893c30ab992ae3c591d44fbefa10e45cf94d228c8f8c44bb3585707521e355817c4b4276cf77eeaf4ed9d0261de02620135ad12f5e711
DIST node_exporter-1.9.0-deps.tar.xz 1751656 BLAKE2B 99e81c1bc46bedbfec3366666333d17446a2693da396a8ce7c465608b69d2936d3291b6da736f24c14509633558aefa0bc53dadb74c4c24ad4afc1f76ad4ff43 SHA512 57163a1c35efd54efaff9088af6cfde5d54ec484eafab5961e94ce1cc14d71ff97480294dc18538fcd2329486d0737bc8ee17a6d31e18ae5b6738b91b23b30e8
DIST node_exporter-1.9.0.tar.gz 353621 BLAKE2B 337a7214d18eb2d972aaea0f92bb946490916779de40934c1b8aea5f8b140959ed08d8f260547cdb693792f40f6d9818e65f9c6f197cd2dbd6a3b716cc7174d9 SHA512 b9076ad2c92bf373728da6bd385ac1ac67a8867a6825c18a7c298a5ae4c2ef8abdea560b6de949276684584d2efccf34badd6b1443ba9c08c2f7d5ddcd2d3c78

View File

@@ -0,0 +1,77 @@
# Copyright 1999-2025 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"
SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-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.17.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_dounit examples/systemd/node_exporter.{service,socket}
insinto /etc/sysconfig
newins examples/systemd/sysconfig.node_exporter node_exporter
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
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,10 +12,9 @@ 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/${P}/deps.tar.xz -> ${P}-deps.tar.xz
"
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"
KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
fi
@@ -33,7 +32,7 @@ COMMON_DEPEND="
"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
BDEPEND=">=dev-util/promu-0.15.0"
BDEPEND=">=dev-util/promu-0.17.0"
src_unpack() {
if [[ ${PV} == 9999* ]]; then
@@ -66,7 +65,9 @@ src_install() {
dosbin "${PN}"
dodoc example-rules.yml *.md
doman "${PN}".1
systemd_newunit "${FILESDIR}"/node_exporter-1.7.0.service node_exporter.service
systemd_dounit examples/systemd/node_exporter.{service,socket}
insinto /etc/sysconfig
newins examples/systemd/sysconfig.node_exporter node_exporter
newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc/logrotate.d