commit: 6f931e2e3720a52e23f6952f2cd4669c5181629b Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Thu Oct 2 11:44:50 2025 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Thu Oct 2 11:45:24 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f931e2e
app-metrics/uwsgi_exporter: add 1.3.0, EAPI=8 Closes: https://bugs.gentoo.org/893154 Closes: https://bugs.gentoo.org/771009 Closes: https://bugs.gentoo.org/679364 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> app-metrics/uwsgi_exporter/Manifest | 2 + .../uwsgi_exporter/files/uwsgi_exporter-1.initd | 18 ++++++++ .../uwsgi_exporter/uwsgi_exporter-1.3.0.ebuild | 52 ++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/app-metrics/uwsgi_exporter/Manifest b/app-metrics/uwsgi_exporter/Manifest index 2c11e8d76412..e97185cc531a 100644 --- a/app-metrics/uwsgi_exporter/Manifest +++ b/app-metrics/uwsgi_exporter/Manifest @@ -1,2 +1,4 @@ DIST uwsgi_exporter-1.1.0-deps.tar.xz 6393556 BLAKE2B ce75723b9de728560fc367c31b8f70498ffda083f1aa3ed138aaed37d540ed4b05681c022c63bd3f8aa6c1bf9d9e7fc7e6f947c556794b5d65724b1ff95ceb60 SHA512 e5140951a895981eb85be571035e017b3d3a344cb074a40b693f46e25d9355192debecb9710afb4952cbfe6beb62741ddca2c16ac5454df8643927400e3f2d6b DIST uwsgi_exporter-1.1.0.tar.gz 39335 BLAKE2B af7fc7ba6d2479467e4b0b90c469fd3a3de1d967b1f4130ce54b5db5bec4dcf910687cf375dcc98a6b68463831d49117e23f589d03d37579b2d83b33a74b519f SHA512 62db351903f6876efea60cc25bea1560b5061ecdf6ca1f113bfa51a745d1524b397350cc2bd0e720aab9357f4f9f6dbca0285eb41ed9cdabebeb4f4176d9c652 +DIST uwsgi_exporter-1.3.0-vendor.tar.xz 1323680 BLAKE2B f3c65f60f759a1d068bfc352d611e4d3f3c4db7c09fa431e503f9da535e051bd4f813c0139e369068c26221a672cc6159674de25f7bb6cf9a5608d94b10b513b SHA512 ea70e70e323165022af4a6965cea8d0d843a103e0ef9dcb67e63c09c439ef87b1be6b79cae4c3b06304ddc85d1e12c7bcaaf81bf3481adb4900f8b22d16ba8bf +DIST uwsgi_exporter-1.3.0.tar.gz 31841 BLAKE2B 9be016f7088060d169b0812987e2cf70b3fb60eea6f44b29d3af950770bc651e4662f5e4446e22162d1b4b30ee985ffc123ea374dcd758738f90dd0eb71dfb63 SHA512 f0dda6f61333fde601d056823f03e140e445377008e1475a0bc8a08fb5c0e4c25fe776ed2aa7b4084dee869aab232e4485b01c38bca43ebb38b2ba26e3f4914b diff --git a/app-metrics/uwsgi_exporter/files/uwsgi_exporter-1.initd b/app-metrics/uwsgi_exporter/files/uwsgi_exporter-1.initd new file mode 100644 index 000000000000..90bce14f09ae --- /dev/null +++ b/app-metrics/uwsgi_exporter/files/uwsgi_exporter-1.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 2016-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="uWSGI metrics exporter for prometheus.io" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} +output_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log +error_log=/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log + +command="/usr/bin/uwsgi_exporter" +command_args="${command_args:---web.listen-address=:9117 --stats.uri=http://localhost:1717}" +command_background="true" + +depend() { + after net +} diff --git a/app-metrics/uwsgi_exporter/uwsgi_exporter-1.3.0.ebuild b/app-metrics/uwsgi_exporter/uwsgi_exporter-1.3.0.ebuild new file mode 100644 index 000000000000..a56a14570cd1 --- /dev/null +++ b/app-metrics/uwsgi_exporter/uwsgi_exporter-1.3.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module systemd + +GIT_COMMIT="c72402e3" +DESCRIPTION="uWSGI metrics exporter for prometheus.io" +HOMEPAGE="https://github.com/timonwong/uwsgi_exporter" +SRC_URI=" + https://github.com/timonwong/uwsgi_exporter/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz +" + +LICENSE="Apache-2.0 BSD ISC MIT" +SLOT="0" +KEYWORDS="~amd64" +RESTRICT="test" # no tests + +RDEPEND=" + acct-group/uwsgi_exporter + acct-user/uwsgi_exporter +" +DEPEND="${RDEPEND}" + +src_compile() { + local -x GO111MODULE=on + 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 -tags 'netgo' -mod=vendor -ldflags "${go_ldflags[*]}" -o bin/${PN} ./cmd/${PN} +} + +src_install() { + dobin bin/${PN} + dodoc README.md + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + newinitd "${FILESDIR}"/${PN}-1.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" +}
