From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1456126-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id DF749158020
	for <garchives@archives.gentoo.org>; Sun, 13 Nov 2022 00:26:01 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F159FE08DD;
	Sun, 13 Nov 2022 00:26:00 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D6C85E08DD
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Nov 2022 00:26:00 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B1AA33408A6
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Nov 2022 00:25:59 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id EF1A56FE
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Nov 2022 00:25:57 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1668299151.31eae7e388e74af9ee57d1a73af448ae7917d34a.williamh@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/prometheus/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-metrics/prometheus/Manifest app-metrics/prometheus/prometheus-2.40.1.ebuild
X-VCS-Directories: app-metrics/prometheus/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 31eae7e388e74af9ee57d1a73af448ae7917d34a
X-VCS-Branch: master
Date: Sun, 13 Nov 2022 00:25:57 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: f63194b2-c413-47e6-b468-f87ba7089f2d
X-Archives-Hash: 55c59f12fb77b4ffbcce9c91940f12ad

commit:     31eae7e388e74af9ee57d1a73af448ae7917d34a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 00:25:33 2022 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 00:25:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31eae7e3

app-metrics/prometheus: add 2.40.1

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 app-metrics/prometheus/Manifest                 |  3 ++
 app-metrics/prometheus/prometheus-2.40.1.ebuild | 72 +++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/app-metrics/prometheus/Manifest b/app-metrics/prometheus/Manifest
index 7537692fd4c2..49de25ef732d 100644
--- a/app-metrics/prometheus/Manifest
+++ b/app-metrics/prometheus/Manifest
@@ -10,3 +10,6 @@ DIST prometheus-2.38.0.tar.gz 6057055 BLAKE2B 5cf4090d6e9b1cf918e21e1f6ee79f0b44
 DIST prometheus-2.39.1-assets.tar.xz 45639572 BLAKE2B 291998ea03128042cf5fa1ac40c3bac2bea298e44b408bc4a4dcb15ab3e7899b12850f4ae9bda37fbbf1756e53043ae7c29e7b2d28b1e60e2ccaf8b83308443a SHA512 356abf7b08030c474c083d2eb3e4a0635c8f6b3b1ab6639c112c619efa5135535b1258fa3c4a1e2987ae032ab6662651abf4468b34385158eed3217459d3fb87
 DIST prometheus-2.39.1-deps.tar.xz 251770124 BLAKE2B 39d1ae2affbdc0dedfa16b3802b78987878e2d46a1af7ac5bf3416626f72f7a6963c92d2358940cda074ce7d5196b8b3b7a6b802592a29401586e7923e5e0ae5 SHA512 a93abc79f0d06bd86b802d3c8e868e65b9dc1653ce8c1b3af9ab7e40a3e43cc47b6fe600e7005f730716849ecf0d0cc8b60939e35883fdcc47f9922a732122ec
 DIST prometheus-2.39.1.tar.gz 6045708 BLAKE2B 306a93c74257bbd33994538d7679d730a0926ac55280e1198b0d528c4c20c44f9ad3e0b4ca3a820e45ace114ade9c60f12f80846900213e0da0850399856afdf SHA512 d3c61a366ee14fff9ebf554e94647ec27ea21f3d829396d6b132dfe268a9153e30f4ce63d762d79593e6876246cd110b52da1e196f55390c5c657d5a57df0055
+DIST prometheus-2.40.1-assets.tar.xz 45591668 BLAKE2B 76f1a6aa2eece8977b1573da51befc56dab7de95302b837d108a90b2e68640cbd7a37dc5ca09e385ba7f6ac5f4cac8fe902380e0c3c747909a27662e01e83c75 SHA512 38bb67689466bd864b7dff930d712f679fb2d56494641e99d5999a9df583c5cb9db24c5eccf951e944fb91cb564dfaf3905ea1159ff6975c672531fe7be34f8f
+DIST prometheus-2.40.1-deps.tar.xz 253177652 BLAKE2B a0120addebe8ef5229af8f24624584b25bf625be9072d66b037ca9802190ec3c4451b735c9e31fbc9fd8a08a17e1c0c7f9c7602d1ff2f4bff1619c98a5eb1a35 SHA512 856dcb15f54eec34ca9216fe626165e08096f4114be62721b0edb3d07583ff0ff22d962e2d9ed0094626e42c5131c38908f1ba96327f741ff349b2f5fc237cd7
+DIST prometheus-2.40.1.tar.gz 6156441 BLAKE2B 9b65733370e6f11ec559f7a4f2d80320d33d9cca29fb9609da3a255d90f06f14482976b5bbd58fc553b7d60a317cf8be0d1b6217128325f594ac9a4424cc3dbb SHA512 077c8aa2e4f6d51501b3281ab394afa26b0a9a8a7d5ed8f437b98e0bd83aceb3337bd877afc8942bf6b007dcfb53fbbafc746a5f305c9ba79bec55f0afbb0d58

diff --git a/app-metrics/prometheus/prometheus-2.40.1.ebuild b/app-metrics/prometheus/prometheus-2.40.1.ebuild
new file mode 100644
index 000000000000..cd72b96645f2
--- /dev/null
+++ b/app-metrics/prometheus/prometheus-2.40.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+GIT_COMMIT=965274259f993801d63f553639d248588287120b
+MY_PV=v${PV/_rc/-rc.}
+
+# To create the assets tarball run the following:
+# git checkout <tag>
+# make assets-compress
+# tar -acf <tarball> web/ui
+
+DESCRIPTION="Prometheus monitoring system and time series database"
+HOMEPAGE="https://github.com/prometheus/prometheus"
+SRC_URI="https://github.com/prometheus/prometheus/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
+	https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz
+	https://dev.gentoo.org/~williamh/dist/${P}-assets.tar.xz"
+
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~riscv"
+
+COMMON_DEPEND="acct-group/prometheus
+	acct-user/prometheus"
+DEPEND="!app-metrics/prometheus-bin
+	${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+BDEPEND=">=dev-util/promu-0.3.0"
+
+RESTRICT=" test"
+
+src_prepare() {
+	default
+	sed -i \
+		-e "s/{{.Branch}}/HEAD/" \
+		-e "s/{{.Revision}}/${GIT_COMMIT}/" \
+		-e "s/{{.Version}}/${PV}/" \
+		.promu.yml || die
+	cp -a -n "${WORKDIR}"/web/ui web || die
+}
+
+src_compile() {
+	emake PROMU="${EPREFIX}"/usr/bin/promu common-build plugins
+}
+
+src_install() {
+	dobin prometheus promtool
+	dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
+	insinto /usr/share/prometheus
+	doins -r console_libraries consoles
+	insinto /etc/prometheus
+	doins documentation/examples/prometheus.yml
+	dosym -r /usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
+	dosym -r /usr/share/prometheus/consoles /etc/prometheus/consoles
+
+	systemd_dounit "${FILESDIR}"/prometheus.service
+	newinitd "${FILESDIR}"/prometheus.initd prometheus
+	newconfd "${FILESDIR}"/prometheus.confd prometheus
+	keepdir /var/log/prometheus /var/lib/prometheus
+	fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
+}
+
+pkg_postinst() {
+	if has_version '<net-analyzer/prometheus-2.0.0_rc0'; then
+		ewarn "Old prometheus 1.x TSDB won't be converted to the new prometheus 2.0 format"
+		ewarn "Be aware that the old data currently cannot be accessed with prometheus 2.0"
+		ewarn "This release requires a clean storage directory and is not compatible with"
+		ewarn "files created by previous beta releases"
+	fi
+}