diff options
Diffstat (limited to 'app-metrics')
-rw-r--r-- | app-metrics/portage-exporter/Manifest | 1 | ||||
-rw-r--r-- | app-metrics/portage-exporter/files/portage-exporter.service | 18 | ||||
-rw-r--r-- | app-metrics/portage-exporter/portage-exporter-0.1.0.ebuild | 24 |
3 files changed, 43 insertions, 0 deletions
diff --git a/app-metrics/portage-exporter/Manifest b/app-metrics/portage-exporter/Manifest index b7ad12a11f0b..450f3f704399 100644 --- a/app-metrics/portage-exporter/Manifest +++ b/app-metrics/portage-exporter/Manifest @@ -1,3 +1,4 @@ DIST portage-exporter-0.0.1.tar.gz 1797981 BLAKE2B dcea6218de202c72b894dc6d8b31311879ce5b2284a078e77148dc9b62320a0118ff22040dc89807f8f7526618afc982cd555925dea97dbb9a0dcd7a41d98930 SHA512 f61ae7be333e79a4ca3dd483628d588c07f2fd7d1b0c77069969431d05217c7654cbfc4676e1ffa60e0cdcae3e0e59fad238a02edbd7f32a61ad2f7e3a5c440b +DIST portage-exporter-0.1.0.tar.gz 14931 BLAKE2B bfafe9ac71b3ca756ac621d424cf80f988c3564c3a7d28b1d87781674cca00b7e3ed0c045d3d82bf19e6ce2021135dd85001aef3fe33360760da00dc17573666 SHA512 16efcb1ae6417f0db48247468f369db76bafeace136e296724fbb517d38b0ec5cbaf7b1949b7c5fb87337eeb374535f53a4a432f8aa5b10a3bb5b418fead2a94 DIST portage-exporter-0_p20230307.tar.gz 32044 BLAKE2B 23e590aba88bf071568e9643b22ec51d6fcaff11b5eb5ea1e66d39cf49468238cbb80a44a865ba7bbccb631540e33ab5a417201ec995227e84d122601c868fad SHA512 1e3bd18cf44ad849b0ee0a2dc737f6d334ce9dd29d03f53a05298df2013be8c77a7ed66c3171cc6c765ad21ab7705fd747856d95ef3259cc83fac85544e81781 DIST portage-exporter-ae39c6be10364896683ab1af0512ee8453bc153e-vendor.tar.xz 784800 BLAKE2B 600f207b15e54ab0f4c27691ce41efcdd3706bfc82c9170da3ebf2eb6283b5595bca08d7eebd3c7b5a6b2c7bcef704e70946e3fab63a537cf03ffa7dbe4a57a0 SHA512 e6e91296e8220d9fb34e0837714108d8806801d6799e49dc27b7dcaf8ddf39a92bff232ec3d616019ef5ae5c437bc81eee719ca658c299a35e8f1b165e38d3eb diff --git a/app-metrics/portage-exporter/files/portage-exporter.service b/app-metrics/portage-exporter/files/portage-exporter.service new file mode 100644 index 000000000000..bec84b4c0413 --- /dev/null +++ b/app-metrics/portage-exporter/files/portage-exporter.service @@ -0,0 +1,18 @@ +[Unit] +Description=Gentoo Portage Exporter +Wants=network-online.target +After=network-online.target + +[Service] +User=portage-exporter +DynamicUser=yes +Type=simple +PassEnvironment=SERVE_ADDRESS SERVE_PATH VDB_UPDATE_INTERVAL +ExecStart=/usr/bin/portage-exporter + +# Environment=SERVE_ADDRESS=:2112 +# Environment=SERVE_PATH=/metrics +# Environment=VDB_UPDATE_INTERVAL=1800 + +[Install] +WantedBy=multi-user.target diff --git a/app-metrics/portage-exporter/portage-exporter-0.1.0.ebuild b/app-metrics/portage-exporter/portage-exporter-0.1.0.ebuild new file mode 100644 index 000000000000..a9b7cbd38c65 --- /dev/null +++ b/app-metrics/portage-exporter/portage-exporter-0.1.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd + +DESCRIPTION="Prometheus exporter for Gentoo Portage" +HOMEPAGE="https://github.com/projg2/portage-exporter" +SRC_URI="https://github.com/projg2/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="dev-cpp/prometheus-cpp" + +src_install() { + cmake_src_install + + systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} |