commit:     4b15dc1063a667eb4f4527b96c071812848b9bf8
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  2 11:25:35 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Oct  2 11:26:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b15dc10

app-metrics/pushgateway: add 1.11.1, EAPI=8

Closes: https://bugs.gentoo.org/679334
Closes: https://bugs.gentoo.org/893150
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-metrics/pushgateway/Manifest                  |  2 +
 app-metrics/pushgateway/files/pushgateway-2.initd | 18 ++++++++
 app-metrics/pushgateway/pushgateway-1.11.1.ebuild | 52 +++++++++++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/app-metrics/pushgateway/Manifest b/app-metrics/pushgateway/Manifest
index e7dfdee508a2..79a2d1668058 100644
--- a/app-metrics/pushgateway/Manifest
+++ b/app-metrics/pushgateway/Manifest
@@ -1,4 +1,6 @@
 DIST pushgateway-1.11.0-deps.tar.xz 1519980 BLAKE2B 
9d3c6a20911191da1330671cf055100e934db1d07c834ca8af8a0354fc0ded51132a677b9ff8978ac4b329c31cb4de74a1894b31ad64889a3cc34c865233ff9d
 SHA512 
c4156845d9ea5d591acce7e232b73263a7dd01850592c570efe806d5e9a373e6374b3ac665caa4a430a39f76a81d806c8b4d267b92d1f22713a2c7a28bec82df
 DIST pushgateway-1.11.0.tar.gz 4256647 BLAKE2B 
2861bed8705b40772fe41e70c7e21b3f30f7a70ef4a8d2eb2283c11202f65d0d38befb778f8be8a9c9117605fc2a8b9254c20f43f73c6de675fbb7e3402627f8
 SHA512 
d4bb1d77cf0fb03160f3d7e05d0b570464e77d09f952e0ea1eb220d89fe60cd8599375c1230c8cd85d378ce9f32b27826a1f6cb462da9962da77c62f398ec156
+DIST pushgateway-1.11.1-vendor.tar.xz 1400592 BLAKE2B 
2c2b8cdc3007b66f1ffe105dc3d12a16b0e642c6f8cb0576da7fa2d14064c7c72b4fc9d436c826b6eb65eae35849414b9fa8079309cf3e4d742e31685362fa1f
 SHA512 
de8468aa6ef4af3e37298c46b8da40c894a78b9a6d2aea984a323457830685b0fea49cf00faa1e14aea3f50691979e844a916a2091ea85a9a5c0c5d1d4e0059f
+DIST pushgateway-1.11.1.tar.gz 4256655 BLAKE2B 
1e92432bb09159e981c754d80294ed349a32f17ddd87b714d6d76e70aa3b126da3df696996cc58811e582ea62e4a0a30958c0a60f4ea63856b7ebe9bbae9ac23
 SHA512 
e26311bddf6b9d8419aa1ec2ee5204c4ee8c6b0ae95a1be6f3bd3bc5a8eb7302c59b21b12ea0f3824fef4513dc871e56b1573529275cb4eae531e6dad29946a7
 DIST pushgateway-1.5.1-deps.tar.xz 28913128 BLAKE2B 
dc7f352a4085ff365a3039501992e7678c1c8b59d3f56ecafa4fe7e50d5693c8399edede9f994c6fca8af739d33bc5cb627b1dbfe27bd0dd63539834290f816d
 SHA512 
82f586be350b1d5f3169adee7e88c9522e34e37de1c9741a32b824d3f9e5b3bdc914177f1a1cff722de89eebe9bd6221ad6b9c29684a348cc7ba93d8cc3c05fd
 DIST pushgateway-1.5.1.tar.gz 4272543 BLAKE2B 
01aeda87efdbbd6c7d0c1a8676fe0798c8d97f7638ca26eb8720412eb00d2abff5c7e73d21e1c2424bd375efa8878c85642a06196e933e44ea804e6e053adbf2
 SHA512 
01ebcdb85f059c330195f37f9466e2042311d8196948881f07d53f1ac4c7daedf343c14856f51db274df00b652b09eb52c735f04f774baf66559697864e1f93b

diff --git a/app-metrics/pushgateway/files/pushgateway-2.initd 
b/app-metrics/pushgateway/files/pushgateway-2.initd
new file mode 100644
index 000000000000..4fd1b6bce75b
--- /dev/null
+++ b/app-metrics/pushgateway/files/pushgateway-2.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 2018-2025 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus push acceptor for ephemeral and batch jobs"
+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/pushgateway"
+command_args="${command_args:---web.listen-address localhost:9091 
--persistence.file=/var/lib/${RC_SVCNAME}/persistence.gob}"
+command_background="true"
+
+depend() {
+       need net
+}

diff --git a/app-metrics/pushgateway/pushgateway-1.11.1.ebuild 
b/app-metrics/pushgateway/pushgateway-1.11.1.ebuild
new file mode 100644
index 000000000000..1a0bf9822a92
--- /dev/null
+++ b/app-metrics/pushgateway/pushgateway-1.11.1.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="aff0d83"
+DESCRIPTION="Prometheus push acceptor for ephemeral and batch jobs"
+HOMEPAGE="https://github.com/prometheus/pushgateway";
+SRC_URI="
+       https://github.com/prometheus/pushgateway/archive/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 BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+RESTRICT="test"
+
+RDEPEND="
+       acct-group/pushgateway
+       acct-user/pushgateway
+"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/go-1.24"
+
+src_compile() {
+       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 bin/${PN} .
+}
+
+src_install() {
+       dobin bin/${PN}
+       dodoc {README,CHANGELOG,CONTRIBUTING}.md
+
+       keepdir /var/log/${PN}
+       fowners ${PN}:${PN} /var/log/${PN}
+
+       newinitd "${FILESDIR}"/${PN}-2.initd ${PN}
+       newconfd "${FILESDIR}"/${PN}-1.confd ${PN}
+       systemd_newunit "${FILESDIR}/${PN}-1.service" "${PN}.service"
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+}

Reply via email to