From 50c71de793c37c19d34a68b3af53ba5e7ca51d22 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 25 Mar 2024 07:01:01 +0000 Subject: gentoo auto-resync : 25:03:2024 - 07:01:01 --- app-metrics/Manifest.gz | Bin 7142 -> 7131 bytes app-metrics/bind_exporter/Manifest | 5 +- .../bind_exporter/bind_exporter-0.3.0.ebuild | 56 --------------- .../bind_exporter/bind_exporter-0.6.1-r1.ebuild | 59 ++++++++++++++++ .../bind_exporter/bind_exporter-0.6.1.ebuild | 59 ---------------- .../bind_exporter/files/bind_exporter.service | 11 +++ app-metrics/node_exporter/Manifest | 4 +- .../node_exporter/files/node_exporter.confd | 2 +- .../node_exporter/node_exporter-1.7.0-r1.ebuild | 75 --------------------- .../node_exporter/node_exporter-1.7.0-r2.ebuild | 75 +++++++++++++++++++++ 10 files changed, 150 insertions(+), 196 deletions(-) delete mode 100644 app-metrics/bind_exporter/bind_exporter-0.3.0.ebuild create mode 100644 app-metrics/bind_exporter/bind_exporter-0.6.1-r1.ebuild delete mode 100644 app-metrics/bind_exporter/bind_exporter-0.6.1.ebuild create mode 100644 app-metrics/bind_exporter/files/bind_exporter.service delete mode 100644 app-metrics/node_exporter/node_exporter-1.7.0-r1.ebuild create mode 100644 app-metrics/node_exporter/node_exporter-1.7.0-r2.ebuild (limited to 'app-metrics') diff --git a/app-metrics/Manifest.gz b/app-metrics/Manifest.gz index b292ffc52b71..b310eb142a80 100644 Binary files a/app-metrics/Manifest.gz and b/app-metrics/Manifest.gz differ diff --git a/app-metrics/bind_exporter/Manifest b/app-metrics/bind_exporter/Manifest index f138cc261261..b28455d153bf 100644 --- a/app-metrics/bind_exporter/Manifest +++ b/app-metrics/bind_exporter/Manifest @@ -1,8 +1,7 @@ AUX bind_exporter.confd 57 BLAKE2B dfffea2f2859b377d5132a2c56ace0260f2d272463c104144acea0a2489141d01e35f4899d53af1526fe0ca1ae760fef62c96a0b6849c8b8678b7693a53ac20f SHA512 54c5162993d488eecec2453b06b2cbedd5eb4599074cf43fda644e2faba4c35ad481840dbb8b05979bf1a0dcdff32edd9efa56bc779f264d81056793d1d00be0 AUX bind_exporter.initd 550 BLAKE2B fcb4eb3066023024b8605a2c9787ba7c8871d05d1b11a1ea97ebab91e403e21876c8b29136b114c6ceef29e9be79056accdde7061e13f615b1f55c25998b938e SHA512 1471a0644c1c2d5a242987638b6fa0576913b9dfbcf886ade42951b3cc71f632c210060a619637988c5239a3ff934c2073e2bd34b913abd9871eb028fd71e2e1 -DIST bind_exporter-0.3.0.tar.gz 1796507 BLAKE2B a79b9e0d159d3deb83f1a040325ad34bc0d4ae50b6af205dce4ebf8d7152ccbd4b7d46fda40bf76db953996ddf4237ca13058250478b08cca51b8bea08ccc31b SHA512 762901a63a9493f852e5514429f55b10400931f0a77d2e11c7565e93e1ff759eb30d3bbc9278451bb9df358a983aa099bd55cf57241cf36187d2789c89a3852d +AUX bind_exporter.service 259 BLAKE2B 3fe54bc933c0245c2a8d486462136099160b73342dcd99387072994f176c1a19c278984f2d57f18ebcfbfa82be92682bbf62d7a58b9b13e15533cb82acb9b94e SHA512 23b6f5a6192e1b07598b6ccdf55660e1535f5bd2e93e12c75ce8181a98dc48daa04fed0d132dd273c76b6f87591b2b50ab8c48607dca8b619e05e8a529947974 DIST bind_exporter-0.6.1-vendor.tar.xz 1300068 BLAKE2B 058f4f61ff9c403a5672390dd3944dec9a6b4b1dcf8ac7bcb6943494d43c116236e23f4b0437d5b2e91cb0d936377ba896740594d90b50ce99a61963713ab70c SHA512 9fd880655ac9657d49c0d250b22e46c53a63c0a2d4097763ca8856da36f75527d515a4e4cde7dd68c2c5cbf4ea784c07d9bd5e38a01eeb2d308a585c31d5c19b DIST bind_exporter-0.6.1.tar.gz 48904 BLAKE2B ad2def162e0fac5e857328bb142bc20655d0d1ea4a9d90a3bd8d305a3d86f9247671ca92f90d5ccdcb1a8bd147ed56858a9782feeac019b87666b4b18b7219c1 SHA512 d710b7228587e12a101a1d626ec5e0290b0740074f3976eee02463165030b361d3b6df556ab949d632488582ef6d4a3197270afc197d6d756a99c16e55c5448c -EBUILD bind_exporter-0.3.0.ebuild 1440 BLAKE2B 451ceb186a0b4b1d8c414d90a972e47f363d1ec8590101e6890f0768e704c4d0183751da9181a5d4a4fc4c3eae36d91febb048dabdfc3b7d28d984018c593d7d SHA512 b91c57241d0afdf5bbca27df9e8fa5f7b0eee3518315afcfa8ab524921aa742b37816205e021428669b21ee95f945d034c54058ef8c37d64ab0f9d60671ab597 -EBUILD bind_exporter-0.6.1.ebuild 1547 BLAKE2B 5fd351fe61f4530e373a34b106631af4d36e49320fbff6bc97366a5185549f388b35e497d03264650860a82b1ac310217f96755a63863ed9825cd87fc95a68c7 SHA512 83e287bdf93944883339687758388e5751511c22943457b2c73b737cbdeced6e6af8fc96029994f7472fd16170086ee11f89e6ae16318f48261894770dd68aa8 +EBUILD bind_exporter-0.6.1-r1.ebuild 1591 BLAKE2B da1219f5dd4f64e779f84ae2dd4e45dd3271697fb27ef3ee4d48802ed992e05b1031f47972b7fe0745a88c15750576d1d1c39e8e6f61f2cad353d8952c67a94e SHA512 1398a8eacf4bceaafea50de668998e10b2c303d0ac90201dfc0d426f451fe8375996a6b98efcf50b5d9de2408f086372981d72521bff7a298bef7e995201e04f MISC metadata.xml 340 BLAKE2B 6538097f3ef7715762179083b4ac60b9c4fd470efa4d0513cbf5f40a2e4bfbcba81fd7c3dccc67f174537cc06119bb74da41db6c37487148731a70189175a085 SHA512 59f4ca7175d231c295dd7fe8d268ecdb618bfdd81aabc6e54de9898610ddd436374d8de2ba673101c2512050d236c7b5bd601f2a23e4397505e656112146fb9b diff --git a/app-metrics/bind_exporter/bind_exporter-0.3.0.ebuild b/app-metrics/bind_exporter/bind_exporter-0.3.0.ebuild deleted file mode 100644 index 683d0803b1fa..000000000000 --- a/app-metrics/bind_exporter/bind_exporter-0.3.0.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit go-module -GIT_COMMIT=c34ff3d6b4817f42e74b2b05b3797cf99683b4a9 - -DESCRIPTION="Prometheus exporter for BIND" -HOMEPAGE="https://github.com/digitalocean/bind_exporter" -SRC_URI="https://github.com/digitalocean/bind_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -COMMON_DEPEND="acct-group/bind_exporter - acct-user/bind_exporter" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND}" -BDEPEND="dev-util/promu" - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die -} - -src_compile() { - mkdir -p bin || die - promu build -v --prefix bin || die -} - -src_test() { - emake test-flags= test -} - -src_install() { - dobin bin/${PN} - dodoc {README,CHANGELOG}.md - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - keepdir /var/log/${PN} - fowners ${PN}:${PN} /var/log/${PN} -} - -pkg_postinst() { - elog "Make sure BIND was built with libxml2 support. You can check with the" - elog "following command: named -V | grep libxml2." - elog "Configure BIND to open a statistics channel. It's recommended to run" - elog "the bind_exporter next to BIND, so it's only necessary to open a port" - elog "locally." - elog "" - elog "statistics-channels {" - elog "inet 127.0.0.1 port 8053 allow { 127.0.0.1; };" - elog "};" -} diff --git a/app-metrics/bind_exporter/bind_exporter-0.6.1-r1.ebuild b/app-metrics/bind_exporter/bind_exporter-0.6.1-r1.ebuild new file mode 100644 index 000000000000..5d586670b4e6 --- /dev/null +++ b/app-metrics/bind_exporter/bind_exporter-0.6.1-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module systemd +GIT_COMMIT=c34ff3d6b4817f42e74b2b05b3797cf99683b4a9 + +DESCRIPTION="Prometheus exporter for BIND" +HOMEPAGE="https://github.com/prometheus-community/bind_exporter" +SRC_URI=" + https://github.com/prometheus-community/bind_exporter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~robbat2/distfiles/bind_exporter-${PV}-vendor.tar.xz + " + +LICENSE="Apache-2.0 BSD MIT" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/bind_exporter + acct-user/bind_exporter" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="dev-util/promu" + +src_prepare() { + default + sed -i -e "/-s$/d" -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die +} + +src_compile() { + mkdir -p bin || die + promu build -v --prefix bin || die +} + +src_test() { + emake test-flags= test +} + +src_install() { + dobin bin/${PN} + dodoc {README,CHANGELOG}.md + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} +} + +pkg_postinst() { + elog "Make sure BIND was built with libxml2 support. You can check with the" + elog "following command: named -V | grep libxml2." + elog "Configure BIND to open a statistics channel. It's recommended to run" + elog "the bind_exporter next to BIND, so it's only necessary to open a port" + elog "locally." + elog "" + elog "statistics-channels {" + elog "inet 127.0.0.1 port 8053 allow { 127.0.0.1; };" + elog "};" +} diff --git a/app-metrics/bind_exporter/bind_exporter-0.6.1.ebuild b/app-metrics/bind_exporter/bind_exporter-0.6.1.ebuild deleted file mode 100644 index 6f9020afafd7..000000000000 --- a/app-metrics/bind_exporter/bind_exporter-0.6.1.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit go-module -GIT_COMMIT=c34ff3d6b4817f42e74b2b05b3797cf99683b4a9 - -DESCRIPTION="Prometheus exporter for BIND" -HOMEPAGE="https://github.com/prometheus-community/bind_exporter" -SRC_URI=" - https://github.com/prometheus-community/bind_exporter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz - https://dev.gentoo.org/~robbat2/distfiles/bind_exporter-${PV}-vendor.tar.xz - " - -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -COMMON_DEPEND="acct-group/bind_exporter - acct-user/bind_exporter" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND}" -BDEPEND="dev-util/promu" - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die -} - -src_compile() { - mkdir -p bin || die - promu build -v --prefix bin || die -} - -src_test() { - emake test-flags= test -} - -src_install() { - dobin bin/${PN} - dodoc {README,CHANGELOG}.md - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - keepdir /var/log/${PN} - fowners ${PN}:${PN} /var/log/${PN} -} - -pkg_postinst() { - elog "Make sure BIND was built with libxml2 support. You can check with the" - elog "following command: named -V | grep libxml2." - elog "Configure BIND to open a statistics channel. It's recommended to run" - elog "the bind_exporter next to BIND, so it's only necessary to open a port" - elog "locally." - elog "" - elog "statistics-channels {" - elog "inet 127.0.0.1 port 8053 allow { 127.0.0.1; };" - elog "};" -} diff --git a/app-metrics/bind_exporter/files/bind_exporter.service b/app-metrics/bind_exporter/files/bind_exporter.service new file mode 100644 index 000000000000..ad2a237a061a --- /dev/null +++ b/app-metrics/bind_exporter/files/bind_exporter.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bind Exporter +Documentation="https://github.com/prometheus-community/bind_exporter" + +[Service] +User=bind_exporter +EnvironmentFile=/etc/sysconfig/bind_exporter +ExecStart=/usr/sbin/bind_exporter $OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/app-metrics/node_exporter/Manifest b/app-metrics/node_exporter/Manifest index 99b7efcc6f87..350b7cdfdb01 100644 --- a/app-metrics/node_exporter/Manifest +++ b/app-metrics/node_exporter/Manifest @@ -1,11 +1,11 @@ AUX 01-default-settings-1.7.0.patch 7705 BLAKE2B 9de6d34f5b8bbf1edb193c794e844288c4560773691e9a7805c0068f1843b5b9fca675c52c0f2ff3bdbc21a0201a51f1f6bc88b420944f0c0d8ec995473abaf3 SHA512 ce5061a4e50662d37e7a09e0cbd80164f626e1384b10592e73f9d08cac87130174f860c38675b83067c9924def2f60371c7373cfc83757636be57956a9a43159 AUX node_exporter-1.7.0.logrotate 147 BLAKE2B 4153888cc2bf626217dc998943208498dec58200ef110288bf910857592fead4fa1a3fc4996608adfd7f05d635381f9c183bc109c4f4f7f666c8b12910f1e141 SHA512 b1a893c4939b819e69a4afc8d8c6c2e965eb88a83e708878c757c533741ecd0b65d2dc052f54484f39ed8e52c96107c43050c5b1e37f22d8d0053b21b9b47701 AUX node_exporter-1.7.0.service 518 BLAKE2B de602f92fe43955eca670e920b4a40b78e2bdfe08bccd78d7846c87eb10562fe9f53100f97e7d551fd00f021888feb92ce533f95f34dedd4f1d120594bf1d920 SHA512 6c6afe1cb7df07ff11b9b272dce5fe30f156ea71a03ccc24af07a7abd37688d642f0f435772d74c00ec14b23627a02ffac510e0338991b54754d664902d73516 -AUX node_exporter.confd 165 BLAKE2B b58f7d7e99b7cd29d89b310a28ca58c473315d7096759c579d1d2720259ecae382f9c4583bd69728af270a1190f07d821922b28c9c2313f50636245a790af801 SHA512 746e38c9bbb2d515009c484d721b8287e87e673f0bf62c27252119303e368ae9def81290a79df57bf1aa68cbeecb2f2e816c398e5b1cdf98216bca19e9e2d3cd +AUX node_exporter.confd 111 BLAKE2B bb40370633c41a4f1283677ed16ad9734c7f180683e4d9d82be36ea5e63d3b8fc2a861a61c62e2e899209f7293588e3e7532ffe52ecb9aab4773a3943168d5dd SHA512 cce5db8eccf2ecfe1198aa8252b04fd6a96006f707e7132c2d01c5400d175551c3b9890c4d57fec9ccbe17594dfb937e1f99ead0e1c3fd8cf22930dabd70418d AUX node_exporter.initd-1 674 BLAKE2B e33c8ba727f82ccdf166a836c31364a6f41f5445a05b518e92c5b4ecada75dccf97fdfc93ed4f65757f3b5d9716f650e9e5779cdb1c79d6a1a67f15f1edbced1 SHA512 6f51a4c4b1c7381fc92e47d1ca4434d1b3839ff15af1c16c47374cd2b96d615937bcd13470bff16d067b05b79bdfa94b018f5e986222dc0e5a932de765216bba DIST node_exporter-1.7.0-deps.tar.xz 26490120 BLAKE2B 3177aa96a50eefaeafad73b293144772443428b8c1b90210230e3e508a678f5515aebec1c51661d47a1e021cd03c8febe9aa948cc3d955eff2b2f272a539b6af SHA512 9fe19ad0fc375f4846fddb7618de5b34ddad583b5c6b09d896c099c3218976fd337c11765699a713c66bbaa834b6cfcaee960b1b1d4014be263b99b897fb1e1c DIST node_exporter-1.7.0.tar.gz 328830 BLAKE2B 5f6b8101637bc0df605ea84446f905fcf8abeb68d0f2eda1e172b12aae4cffcfef54996f8725ad458671947c72a48fbbd73d4d401d8fd001e9e9d75f248230fc SHA512 4cd38b81cb54ca620a57c642a88b89d6d1ae36a752fff5f065c8848ea02066a211c6feb955bea4e311f7baafffee30a74670efe1cf4dac113c9bf7d154a1067b -EBUILD node_exporter-1.7.0-r1.ebuild 1884 BLAKE2B b446559b3c28c9a9e1dd311b0fa93a6813d632965ddbe01577b015e335e718f15f1cf406a78c020fc889c916f8e3a23cd6309cd3e88de34c18cc61deee207c4b SHA512 7b72066b5fe96dc03359ccf4fd5b8a1536846fdacbf379e7f61e34a634093f42bd6264d2e17490ddadab6d2a16b084998dd9d4011ea23e72fe55b670d428a4cb +EBUILD node_exporter-1.7.0-r2.ebuild 1884 BLAKE2B b446559b3c28c9a9e1dd311b0fa93a6813d632965ddbe01577b015e335e718f15f1cf406a78c020fc889c916f8e3a23cd6309cd3e88de34c18cc61deee207c4b SHA512 7b72066b5fe96dc03359ccf4fd5b8a1536846fdacbf379e7f61e34a634093f42bd6264d2e17490ddadab6d2a16b084998dd9d4011ea23e72fe55b670d428a4cb EBUILD node_exporter-1.7.0.ebuild 1943 BLAKE2B f4f7dd6f5b6e6eba320357442c4909f93f334d21273ae29eccc611039d4ccd8c8de960a47e8eda5d47ca031733cc7114530c50bc1a8161f37d90742e22c420cc SHA512 4357f81b0b40a88b4fb19b04340d07c9d7225cf3ff247f0ee05807ec14a7496913445354d89ea91b82041205f9f0f7ee8ed21c9eac71537990e3a00fb2b17231 EBUILD node_exporter-9999.ebuild 1884 BLAKE2B b446559b3c28c9a9e1dd311b0fa93a6813d632965ddbe01577b015e335e718f15f1cf406a78c020fc889c916f8e3a23cd6309cd3e88de34c18cc61deee207c4b SHA512 7b72066b5fe96dc03359ccf4fd5b8a1536846fdacbf379e7f61e34a634093f42bd6264d2e17490ddadab6d2a16b084998dd9d4011ea23e72fe55b670d428a4cb MISC metadata.xml 831 BLAKE2B eba45344fe1d19be5656038d109827066f0aef5fa9f1338bca84217b98a880f232f5459bf017a661334cf8ec4221b749cd4feab8f166d027ceb77ab67a38a70c SHA512 3654c7f6cbe75997ad120d3470691125daa51d1d4be531e12026ddf1313c4cce07d05bba6d48b67ebd19931a47d5a2ec79d8f0c4c2ca8314928c32574e136747 diff --git a/app-metrics/node_exporter/files/node_exporter.confd b/app-metrics/node_exporter/files/node_exporter.confd index 2feccf6346e4..b65652001308 100644 --- a/app-metrics/node_exporter/files/node_exporter.confd +++ b/app-metrics/node_exporter/files/node_exporter.confd @@ -1,2 +1,2 @@ # arguments for prometheus node exporter -command_args="--collector.textfile.directory=/var/lib/node_exporter/ --collector.textfile.directory=/var/lib/node_exporter" +command_args="--collector.textfile.directory=/var/lib/node_exporter/" diff --git a/app-metrics/node_exporter/node_exporter-1.7.0-r1.ebuild b/app-metrics/node_exporter/node_exporter-1.7.0-r1.ebuild deleted file mode 100644 index 9e3f1d237576..000000000000 --- a/app-metrics/node_exporter/node_exporter-1.7.0-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# 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" - 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 systemd" - -COMMON_DEPEND=" - acct-group/node_exporter - acct-user/node_exporter - selinux? ( sec-policy/selinux-node_exporter ) - systemd? ( sys-apps/systemd ) -" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND}" -BDEPEND=">=dev-util/promu-0.3.0" - -src_unpack() { - if [[ ${PV} == 9999* ]]; then - git-r3_src_unpack - go-module_live_vendor - else - go-module_src_unpack - fi -} - -src_prepare() { - default - use systemd && { sed -i -e "s|defaultDisabled|defaultEnabled|g;" collector/systemd_linux.go || die; } -} - -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-1.7.0-r2.ebuild b/app-metrics/node_exporter/node_exporter-1.7.0-r2.ebuild new file mode 100644 index 000000000000..9e3f1d237576 --- /dev/null +++ b/app-metrics/node_exporter/node_exporter-1.7.0-r2.ebuild @@ -0,0 +1,75 @@ +# 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" + 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 systemd" + +COMMON_DEPEND=" + acct-group/node_exporter + acct-user/node_exporter + selinux? ( sec-policy/selinux-node_exporter ) + systemd? ( sys-apps/systemd ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND=">=dev-util/promu-0.3.0" + +src_unpack() { + if [[ ${PV} == 9999* ]]; then + git-r3_src_unpack + go-module_live_vendor + else + go-module_src_unpack + fi +} + +src_prepare() { + default + use systemd && { sed -i -e "s|defaultDisabled|defaultEnabled|g;" collector/systemd_linux.go || die; } +} + +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 +} -- cgit v1.2.3