diff options
-rw-r--r-- | net-analyzer/prometheus/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/prometheus/prometheus-2.0.0_rc2.ebuild | 68 |
2 files changed, 69 insertions, 0 deletions
diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest index ff7dc664ccf8..6754aa84ff85 100644 --- a/net-analyzer/prometheus/Manifest +++ b/net-analyzer/prometheus/Manifest @@ -1,3 +1,4 @@ DIST prometheus-1.8.0.tar.gz 5194115 SHA256 556247d750b3618b74ccf59669f74a8c0c39e72cdf51cbcc0c0bcc392de195df SHA512 1ac00ddae4753f99f167db9b6efc5fa442918284f59468b8e1c7743e3f946eab895678c87e12a73bf158e3c0bf3df7345dd59855baaabb54fc86f1ae1014192d WHIRLPOOL 9ff6f0dc36f022b2be107ce59878f81b210b196858064655a74e098650abc77d5a0c2afb11dd5ebb242d1e2addbc3a182b1a6ce1f751eed723e3fff3434d319c DIST prometheus-1.8.1.tar.gz 5194859 SHA256 dc2b7bb5b5f1273c131921d3e306fd198f2a5547abc58dcf511b700c62963595 SHA512 936728f51a12a080a0689c17b134f70f747bb2219f750ea5f7df7460169b3e484689d75df319cfae12fc939b556e4f59ed49682731e43405a4a91e4bbcd9cbb7 WHIRLPOOL 755ac91ecfe9234675bac2cee2c63a50c80a5e02267818b1ac7747c669df81e4e267dd884aa1da7463339f5344e8fdbb488c7521d0d7817360bad74ece256a86 DIST prometheus-2.0.0_rc1.tar.gz 5538094 SHA256 5d80280d4f8de0e5c79b02fa2ab9cbe4cf49a287ed268ed85a0f87abd257d226 SHA512 c89509693608a4f00713cb3b9f11b533236898af4a08580ecb4aa5f198d7f568719ddb78225f9d260128288aa7e037d0a0a820f8e42e2db4c7745e2f993fb4fe WHIRLPOOL 1765d9eb600da28e12d2c679a60f050d9557bbf974a53ff86363fb66fb82d64c4b55a85f9aac4c80039c317a88028c794e8387e0db3f0b925b86057d5ae17f7e +DIST prometheus-2.0.0_rc2.tar.gz 5539456 SHA256 99340e1708f9dd216048d0de8ce1a069c70879760d833dfee1ef480966d2d53c SHA512 c895e0a561e89a13cee4cba1f4899ffcb4a8094f72618b9c7c2e48a035ceef3b844c0c8b9603f0886fac3e0d1c43b1e235f784f18d289e47c0e858b5d53ed47b WHIRLPOOL 60070eddcaa06ada89e5612c893c97098c48c6d5953d17e1cfe6b16708c332aa9d855aaecf6aa00c28527b22ad77ce6ff26cbade01ea2e71d1bafc9ece59f655 diff --git a/net-analyzer/prometheus/prometheus-2.0.0_rc2.ebuild b/net-analyzer/prometheus/prometheus-2.0.0_rc2.ebuild new file mode 100644 index 000000000000..6aa654dad848 --- /dev/null +++ b/net-analyzer/prometheus/prometheus-2.0.0_rc2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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="ce63a5a" +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-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 + 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 +} |