mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
app-metrics/node_exporter: add 1.11.1
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
DIST node_exporter-1.10.2-vendor.tar.xz 1673036 BLAKE2B f64be0325b28d1ae4ea1381a238ab45f163de6ff340ef4367a3928f0102f7511bb581f28456e0ea3f179ee37e81b66b595655bb34c962758eadee8a85ad30126 SHA512 5c1954dac2e7828346b4489db5c4629f33fec694c301398db2cd29e5c310bdd57c80c39ca6befb2fa0be151e572e354dbcc26e6f42399a9fcc22a5288450e84b
|
||||
DIST node_exporter-1.10.2.tar.gz 380242 BLAKE2B 800fea05624e2740735e32271e868d983909e17247efc82028de24dbda1e0ff2058a5b714e16866239cf8a0b07ea876b30ba9d07494a0c1b00bbc3ca82f3f8c7 SHA512 0da5e711e7c314f6eca4064f48b035b46c99610df8ae14ab2522b0fbafbc4d3addae2ff8555191ec077af23aca0a672b3ed0c791ff6bf13bba614d0a42736be9
|
||||
DIST node_exporter-1.11.1-vendor.tar.xz 1695068 BLAKE2B 68bc8f70212ef8147bdf0afb91508e769853c3488335536725479cae9e25eafe566a56b2157700f4ea644ee66bcd65a26f2da4adde3c6c6578b77a35f9133752 SHA512 f48414691e376d99ecfedcee84281132d0d1eda8453092638f278058d2e8052f2809bc65e813d74bf2e51099f049d6533cfab8082adc5f008ccab1e9af47cbd9
|
||||
DIST node_exporter-1.11.1.tar.gz 402911 BLAKE2B 9f6a697436bb797065cdcb7b91df811cdf5b656737cfb6db967d810c776953e08daca7242fcd36196c9ce5bcfb89690309be3699a1882b5ecd2c849da6573101 SHA512 52422f030c71a26fdfd1e56b739a801c6bee7818e359685bf3aee834833a07509bb9830444a91a0aab2a6ca6965434b553655e0b5b3d1d73a51a2a674e6a2a0c
|
||||
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
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# Copyright 1999-2026 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/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz"
|
||||
|
||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
|
||||
fi
|
||||
|
||||
# main pkg
|
||||
LICENSE="Apache-2.0"
|
||||
# Dependent licenses
|
||||
LICENSE+=" Apache-2.0 BSD BSD-2 MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
IUSE="selinux"
|
||||
|
||||
DEPEND="
|
||||
acct-group/node_exporter
|
||||
acct-user/node_exporter
|
||||
selinux? ( sec-policy/selinux-node_exporter )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
git-r3_src_unpack
|
||||
go-module_live_vendor
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use x86; then
|
||||
#917577 pie breaks build on x86
|
||||
GOFLAGS=${GOFLAGS//-buildmode=pie}
|
||||
fi
|
||||
local go_ldflags=(
|
||||
-X github.com/prometheus/common/version.Version=${PV}
|
||||
-X github.com/prometheus/common/version.Revision=${GIT_COMMIT}
|
||||
-X github.com/prometheus/common/version.Branch=master
|
||||
-X github.com/prometheus/common/version.BuildUser=gentoo
|
||||
-X github.com/prometheus/common/version.BuildDate="$(date +%F-%T)"
|
||||
)
|
||||
ego build -mod=vendor -ldflags "${go_ldflags[*]}" -o ${PN} .
|
||||
./"${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}
|
||||
newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
|
||||
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
||||
|
||||
insinto /etc/sysconfig
|
||||
newins examples/systemd/sysconfig.node_exporter node_exporter
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/node_exporter-1.7.0.logrotate "${PN}"
|
||||
|
||||
keepdir /var/lib/node_exporter/textfile_collector /var/log/node_exporter
|
||||
fowners -R ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter
|
||||
}
|
||||
Reference in New Issue
Block a user