Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/prometheus/
Date: Thu, 20 Sep 2018 22:34:45
Message-Id: 1537482808.7496166e944bd279599649e6c8e70050e5c3fdac.mrueg@gentoo
1 commit: 7496166e944bd279599649e6c8e70050e5c3fdac
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 20 22:33:28 2018 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 20 22:33:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7496166e
7
8 app-metrics/prometheus: Version bump to 2.4.1
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 app-metrics/prometheus/Manifest | 1 +
13 app-metrics/prometheus/prometheus-2.4.1.ebuild | 70 ++++++++++++++++++++++++++
14 2 files changed, 71 insertions(+)
15
16 diff --git a/app-metrics/prometheus/Manifest b/app-metrics/prometheus/Manifest
17 index ad1644be789..c7fa7c4e4b6 100644
18 --- a/app-metrics/prometheus/Manifest
19 +++ b/app-metrics/prometheus/Manifest
20 @@ -2,3 +2,4 @@ DIST prometheus-2.2.1.tar.gz 5629500 BLAKE2B 7645267a2c5ed1c4138a5dd3929a48cb9df
21 DIST prometheus-2.3.1.tar.gz 6175030 BLAKE2B 395808ce10eee18469a34caa7a358325830717cce7199f4cd3e6da346326573e65695cd444ad1c37586f9744db51808ef78f4a50fac971fa0fbc7fd7a4089994 SHA512 f0930a8de3885f9d870d41b41b602cd19addaa362d0473c95723b6cff32fd28870f8d47c89b9d39e13f43e189ad991d7569baa1a6ecd1ca59ba85cbb3d3cd6b1
22 DIST prometheus-2.3.2.tar.gz 6175804 BLAKE2B 98d7fe58043e5104b6eb181edd13a2aec3c347ae6d0325f08a267b02eef3bd8963603fb17c113244b47967a549ebe860f2a3f11e297ceca85b57495df7f19070 SHA512 35bd654f3326d36846654775e924821de9efc7b39c93d5ffc5e8f4db6feb456cf3b8833de3aa3df9d9f63481c487f2633b55b9610cef4e7a037f2a9b1ffbbd23
23 DIST prometheus-2.4.0.tar.gz 6090871 BLAKE2B 553d3292abfc58aba11e14786892b7dfc9ace00b29bba38a964e5b36113a4827759f5229d36693be225aca0962d7577751a8778201929b1f987a000fe31c2544 SHA512 a2fc7d67ac2fd8e17b5c69983daa385fe042e88c8c00ce71c51ae0e66d3cba201bcc7ef52ce34bef9724df002769c6fd9ee44115f397e253859f4c3f77427839
24 +DIST prometheus-2.4.1.tar.gz 6092025 BLAKE2B 4392c3329be255dcc1cd457e13defc6a462f094c47d8032b8389ffee8a384049d58eedf7a8a8724345d01e1d6645cd58d23d1bef078458bdf4fd54bac3c85ae1 SHA512 8d09e87c1af1bde08fc0d95fb51d8b25360d8bcb40c7a4b2f4bfaf79419183a4f90773ced6f53ae9a9bae10eb00af6248acf603cb13f9ce0afb815b2b7e0a8c1
25
26 diff --git a/app-metrics/prometheus/prometheus-2.4.1.ebuild b/app-metrics/prometheus/prometheus-2.4.1.ebuild
27 new file mode 100644
28 index 00000000000..bca8d525213
29 --- /dev/null
30 +++ b/app-metrics/prometheus/prometheus-2.4.1.ebuild
31 @@ -0,0 +1,70 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +inherit user golang-build golang-vcs-snapshot
37 +
38 +EGO_PN="github.com/prometheus/prometheus"
39 +MY_PV=${PV/_rc/-rc.}
40 +EGIT_COMMIT="v${MY_PV}"
41 +PROMETHEUS_COMMIT="ce6716f"
42 +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
43 +KEYWORDS="~amd64"
44 +
45 +DESCRIPTION="Prometheus monitoring system and time series database"
46 +HOMEPAGE="https://github.com/prometheus/prometheus"
47 +SRC_URI="${ARCHIVE_URI}"
48 +LICENSE="Apache-2.0"
49 +SLOT="0"
50 +IUSE=""
51 +
52 +DEPEND="
53 + >=dev-lang/go-1.10
54 + dev-util/promu"
55 +
56 +PROMETHEUS_HOME="/var/lib/prometheus"
57 +
58 +RESTRICT="test"
59 +
60 +pkg_setup() {
61 + enewgroup prometheus
62 + enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
63 +}
64 +
65 +src_prepare() {
66 + default
67 + sed -i -e "s/{{.Revision}}/${PROMETHEUS_COMMIT}/" src/${EGO_PN}/.promu.yml || die
68 +}
69 +
70 +src_compile() {
71 + pushd src/${EGO_PN} || die
72 + GOPATH="${S}" promu build -v || die
73 + popd || die
74 +}
75 +
76 +src_install() {
77 + pushd src/${EGO_PN} || die
78 + dobin promtool prometheus
79 + dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
80 + insinto /etc/prometheus
81 + doins documentation/examples/prometheus.yml
82 + insinto /usr/share/prometheus
83 + doins -r console_libraries consoles
84 + dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
85 + dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
86 + popd || die
87 +
88 + newinitd "${FILESDIR}"/prometheus-3.initd prometheus
89 + newconfd "${FILESDIR}"/prometheus.confd prometheus
90 + keepdir /var/log/prometheus /var/lib/prometheus
91 + fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
92 +}
93 +
94 +pkg_postinst() {
95 + if has_version '<net-analyzer/prometheus-2.0.0_rc0'; then
96 + ewarn "Old prometheus 1.x TSDB won't be converted to the new prometheus 2.0 format"
97 + ewarn "Be aware that the old data currently cannot be accessed with prometheus 2.0"
98 + ewarn "This release requires a clean storage directory and is not compatible with"
99 + ewarn "files created by previous beta releases"
100 + fi
101 +}