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, 31 Jan 2019 16:26:04
Message-Id: 1548951908.5834db2c4c6e6c8f45beb2fc6d7668a01b3416bb.mrueg@gentoo
1 commit: 5834db2c4c6e6c8f45beb2fc6d7668a01b3416bb
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 31 16:25:08 2019 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 31 16:25:08 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5834db2c
7
8 app-metrics/prometheus: Version bump to 2.7.1
9
10 Package-Manager: Portage-2.3.59, Repoman-2.3.12
11 Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>
12
13 app-metrics/prometheus/Manifest | 1 +
14 app-metrics/prometheus/prometheus-2.7.1.ebuild | 70 ++++++++++++++++++++++++++
15 2 files changed, 71 insertions(+)
16
17 diff --git a/app-metrics/prometheus/Manifest b/app-metrics/prometheus/Manifest
18 index adf5fdb5e10..bbfa60cd215 100644
19 --- a/app-metrics/prometheus/Manifest
20 +++ b/app-metrics/prometheus/Manifest
21 @@ -3,3 +3,4 @@ DIST prometheus-2.5.0.tar.gz 6123272 BLAKE2B a84b31e24f4448330af63b64ed56b8c535e
22 DIST prometheus-2.6.0.tar.gz 6607363 BLAKE2B b9449403c840367b5332e27cf5d76b3becf1abcaaff6b2f2fd48441609b91d969ce078a2a3c4a38cc68b421b8e796561be87858adb77ac780f45650147469596 SHA512 75ae11a49de4277c7b4e49b83d7f34c9eb17b6bde988ab84e735109430361856ae0d33179a678b2cfc88342966a8e393a75062142c6f713f8a974aa8f332691e
23 DIST prometheus-2.6.1.tar.gz 6612143 BLAKE2B 33dc64406dd45f494720a1ff5f6d09ed4b45b3880b15626ab7455909258addc5d1549d3edbf8af9a374516930b297c5bdb6ef51a78cac3cb338357896c0d71ae SHA512 80bf6afa00b60aa4245a53e275a2b9579a7936609aba4ffacbbe478f34e530208e0498d8c5ea53dd3a940726e05bd6fac19fed3d6d9dd209af565d5368b2340f
24 DIST prometheus-2.7.0.tar.gz 7276755 BLAKE2B 39c5e73f87aa919537eba19c09a0268b1079ffc8527aef6d31637c6cd9339e0c49a60afc44515d18a86aca6056bf0a1707ba02fc441ff63f0f517d864747d5be SHA512 02df7701cc9c50c2792c1a9ddfb6e41345bbc2f12aef8dfb09b5b545499a09a88d13c6d70a090086d35694817d7a5b26312554ebc50b02492bfdbf206f611d03
25 +DIST prometheus-2.7.1.tar.gz 7276631 BLAKE2B 1066204eebd8e9589ce5972c78f1c56c74ae40739e850731beb7c39a6100aa0c252b444571cffb6cedabddd71f0b6f927e52ce4ebb35a7fd061ed5e4d50436f7 SHA512 d9a9a5cfca48b6a5ea5dda2b319f8c498b11e0e0a4ce0d18fc4d59fba9e5337048120ba12b29d18b957ac5c268f8c17996a9e88ff9ed1e3041d0ed00bc1454d0
26
27 diff --git a/app-metrics/prometheus/prometheus-2.7.1.ebuild b/app-metrics/prometheus/prometheus-2.7.1.ebuild
28 new file mode 100644
29 index 00000000000..0687f8f10df
30 --- /dev/null
31 +++ b/app-metrics/prometheus/prometheus-2.7.1.ebuild
32 @@ -0,0 +1,70 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +inherit user golang-build golang-vcs-snapshot
38 +
39 +EGO_PN="github.com/prometheus/prometheus"
40 +MY_PV=${PV/_rc/-rc.}
41 +EGIT_COMMIT="v${MY_PV}"
42 +PROMETHEUS_COMMIT="62e591f"
43 +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
44 +KEYWORDS="~amd64"
45 +
46 +DESCRIPTION="Prometheus monitoring system and time series database"
47 +HOMEPAGE="https://github.com/prometheus/prometheus"
48 +SRC_URI="${ARCHIVE_URI}"
49 +LICENSE="Apache-2.0"
50 +SLOT="0"
51 +IUSE=""
52 +
53 +DEPEND="
54 + >=dev-lang/go-1.10
55 + dev-util/promu"
56 +
57 +PROMETHEUS_HOME="/var/lib/prometheus"
58 +
59 +RESTRICT="test"
60 +
61 +pkg_setup() {
62 + enewgroup prometheus
63 + enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
64 +}
65 +
66 +src_prepare() {
67 + default
68 + sed -i -e "s/{{.Revision}}/${PROMETHEUS_COMMIT}/" src/${EGO_PN}/.promu.yml || die
69 +}
70 +
71 +src_compile() {
72 + pushd src/${EGO_PN} || die
73 + GO111MODULE=on GOPATH="${S}" GOCACHE="${T}/go-cache" promu build -v || die
74 + popd || die
75 +}
76 +
77 +src_install() {
78 + pushd src/${EGO_PN} || die
79 + dobin promtool prometheus
80 + dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
81 + insinto /etc/prometheus
82 + doins documentation/examples/prometheus.yml
83 + insinto /usr/share/prometheus
84 + doins -r console_libraries consoles
85 + dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
86 + dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
87 + popd || die
88 +
89 + newinitd "${FILESDIR}"/prometheus-3.initd prometheus
90 + newconfd "${FILESDIR}"/prometheus.confd prometheus
91 + keepdir /var/log/prometheus /var/lib/prometheus
92 + fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
93 +}
94 +
95 +pkg_postinst() {
96 + if has_version '<net-analyzer/prometheus-2.0.0_rc0'; then
97 + ewarn "Old prometheus 1.x TSDB won't be converted to the new prometheus 2.0 format"
98 + ewarn "Be aware that the old data currently cannot be accessed with prometheus 2.0"
99 + ewarn "This release requires a clean storage directory and is not compatible with"
100 + ewarn "files created by previous beta releases"
101 + fi
102 +}