summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2018-12-17 19:02:37 +0100
committerManuel Rüger <mrueg@gentoo.org>2018-12-17 19:03:22 +0100
commitc7faa8c6f70de3d3b61e5bd1fb134b033d57bac8 (patch)
treec0b931667b9e6dd4ecd4f6b2120212479db4db06 /app-metrics/prometheus
parentnet-im/coturn: bump to 4.5.0.8 (diff)
downloadgentoo-c7faa8c6f70de3d3b61e5bd1fb134b033d57bac8.tar.gz
gentoo-c7faa8c6f70de3d3b61e5bd1fb134b033d57bac8.tar.bz2
gentoo-c7faa8c6f70de3d3b61e5bd1fb134b033d57bac8.zip
app-metrics/prometheus: Version bump to 2.6.0
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Manuel Rüger <mrueg@gentoo.org>
Diffstat (limited to 'app-metrics/prometheus')
-rw-r--r--app-metrics/prometheus/Manifest1
-rw-r--r--app-metrics/prometheus/prometheus-2.6.0.ebuild70
2 files changed, 71 insertions, 0 deletions
diff --git a/app-metrics/prometheus/Manifest b/app-metrics/prometheus/Manifest
index 750e9f2c2538..c4444e0552f1 100644
--- a/app-metrics/prometheus/Manifest
+++ b/app-metrics/prometheus/Manifest
@@ -1,2 +1,3 @@
DIST prometheus-2.4.3.tar.gz 6095284 BLAKE2B 9b9d54cf8ed61453d63e4b93cd81cd1c08a732b2238830aa1b83b63076205569b8f947a94d0528b910c0958bc77f98605ab3eaf98a1e93d361ea6b431d5df48c SHA512 c86ce48416d32ca4310315dd7195a6ee471244b7a9323ddc49270c2b885bda38c2922047dc8fd7d9b19c9f62f8bc788d30387d38f956cbf04130d7041f9a479b
DIST prometheus-2.5.0.tar.gz 6123272 BLAKE2B a84b31e24f4448330af63b64ed56b8c535e790930738c0f00d7ec05ff5b49cd52bcae047cfe3a0470909397562f29662003e5b5ad0a747dc209109e360daa18d SHA512 181ef94b75717d116ae8b1307f7351eb889d153b27316e08e8cffe16cf885dbf43bd0bd4214f05e56bc33bbf53f7864721ab666f5ea4356b37a5987347c6a191
+DIST prometheus-2.6.0.tar.gz 6607363 BLAKE2B b9449403c840367b5332e27cf5d76b3becf1abcaaff6b2f2fd48441609b91d969ce078a2a3c4a38cc68b421b8e796561be87858adb77ac780f45650147469596 SHA512 75ae11a49de4277c7b4e49b83d7f34c9eb17b6bde988ab84e735109430361856ae0d33179a678b2cfc88342966a8e393a75062142c6f713f8a974aa8f332691e
diff --git a/app-metrics/prometheus/prometheus-2.6.0.ebuild b/app-metrics/prometheus/prometheus-2.6.0.ebuild
new file mode 100644
index 000000000000..3b3cc87749d5
--- /dev/null
+++ b/app-metrics/prometheus/prometheus-2.6.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/prometheus/prometheus"
+MY_PV=${PV/_rc/-rc.}
+EGIT_COMMIT="v${MY_PV}"
+PROMETHEUS_COMMIT="dbd1d58"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus monitoring system and time series database"
+HOMEPAGE="https://github.com/prometheus/prometheus"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ >=dev-lang/go-1.10
+ dev-util/promu"
+
+PROMETHEUS_HOME="/var/lib/prometheus"
+
+RESTRICT="test"
+
+pkg_setup() {
+ enewgroup prometheus
+ enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
+}
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${PROMETHEUS_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ GO111MODULE=on GOPATH="${S}" promu build -v || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin promtool prometheus
+ dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
+ insinto /etc/prometheus
+ doins documentation/examples/prometheus.yml
+ insinto /usr/share/prometheus
+ doins -r console_libraries consoles
+ dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
+ dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
+ popd || die
+
+ newinitd "${FILESDIR}"/prometheus-3.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
+}