public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2016-12-14 12:51 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2016-12-14 12:51 UTC (permalink / raw
  To: gentoo-commits

commit:     2f538c275cc9670a15d2c03070cfe9b5e491115b
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 19:33:08 2016 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Wed Dec 14 12:51:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f538c27

net-analyzer/prometheus: Initial version

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 net-analyzer/prometheus/Manifest                   |  1 +
 net-analyzer/prometheus/files/prometheus.confd     |  2 +
 net-analyzer/prometheus/files/prometheus.initd     | 25 ++++++++++
 net-analyzer/prometheus/metadata.xml               | 13 +++++
 .../prometheus/prometheus-1.4.1_p20161213.ebuild   | 56 ++++++++++++++++++++++
 5 files changed, 97 insertions(+)

diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
new file mode 100644
index 00000000..136c37f
--- /dev/null
+++ b/net-analyzer/prometheus/Manifest
@@ -0,0 +1 @@
+DIST prometheus-1.4.1_p20161213.tar.gz 5151828 SHA256 23dde2d12004f596fa6a7292ef12f111d00cd3164eb12296c5d43a242c692fc5 SHA512 a24405a31e0e312331e05ee91b797039141ca6d5e2a9adfb508592432f18a2ff8a2357e40de5d66c5d0e52ba81d71e325c8f90ba0c0674b32f2254212d3b3e9f WHIRLPOOL 0c1fa151c7d373ff63d6e374e1f67e9b71dc4f15053d5993a9a1231d31e751592029fd4d74077cbe4a7955dd19e71411fa25b09a4490e7925668303e40e6f291

diff --git a/net-analyzer/prometheus/files/prometheus.confd b/net-analyzer/prometheus/files/prometheus.confd
new file mode 100644
index 00000000..95de2ec
--- /dev/null
+++ b/net-analyzer/prometheus/files/prometheus.confd
@@ -0,0 +1,2 @@
+# arguments for docker-registry
+command_args="-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data"

diff --git a/net-analyzer/prometheus/files/prometheus.initd b/net-analyzer/prometheus/files/prometheus.initd
new file mode 100644
index 00000000..b024f3b
--- /dev/null
+++ b/net-analyzer/prometheus/files/prometheus.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Prometheus monitoring system and time series database"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/prometheus"
+command_args="${command_args:-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+	need net
+	after net
+}
+
+start_pre() {
+	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}

diff --git a/net-analyzer/prometheus/metadata.xml b/net-analyzer/prometheus/metadata.xml
new file mode 100644
index 00000000..2a1986a
--- /dev/null
+++ b/net-analyzer/prometheus/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<longdescription>
+	</longdescription>
+	<maintainer type="person">
+		<email>mrueg@gentoo.org</email>
+		<name>Manuel Rüger</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">prometheus/prometheus</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/net-analyzer/prometheus/prometheus-1.4.1_p20161213.ebuild b/net-analyzer/prometheus/prometheus-1.4.1_p20161213.ebuild
new file mode 100644
index 00000000..47edcf4
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-1.4.1_p20161213.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/prometheus/prometheus/..."
+EGIT_COMMIT="253be23c00eba5592e1673845a38f4fd08efff83"
+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"
+
+pkg_setup() {
+	enewgroup prometheus
+	enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
+}
+
+src_prepare() {
+	default
+	sed -i -e "s/{{.Revision}}/${EGIT_COMMIT:0:7}/" src/${EGO_PN%/*}/.promu.yml || die
+}
+
+src_compile() {
+	pushd src/${EGO_PN%/*} || die
+	GOPATH="${S}" promu build -v --prefix ${PWD} || 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.initd prometheus
+	newconfd "${FILESDIR}"/prometheus.confd prometheus
+	keepdir /var/log/prometheus /var/lib/prometheus
+	fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2017-08-12 10:19 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2017-08-12 10:19 UTC (permalink / raw
  To: gentoo-commits

commit:     d8fdcd98d43630a6a3f60b7dadfcb3c847456f20
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 12 10:18:06 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sat Aug 12 10:18:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8fdcd98

net-analyzer/prometheus: Version bump to 2.0.0_beta1

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 net-analyzer/prometheus/Manifest                   |  1 +
 net-analyzer/prometheus/files/prometheus-2.initd   | 24 ++++++++
 net-analyzer/prometheus/files/prometheus.confd     |  4 +-
 .../prometheus/prometheus-2.0.0_beta1.ebuild       | 67 ++++++++++++++++++++++
 4 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
index 3ce346c0e6b..2622b5e8141 100644
--- a/net-analyzer/prometheus/Manifest
+++ b/net-analyzer/prometheus/Manifest
@@ -1,2 +1,3 @@
 DIST prometheus-1.7.1.tar.gz 5122747 SHA256 209832310f5bef99faef3beaaa95263612a4d0126ca512c4a4c23a8543d3ccf5 SHA512 98a42e95978477530082d7549c29f17b133043d7c233ba3c90b183f06a3f24ee578f8fed75cba476d3c93a22abcccfdbccc94488beb8450a02f260d24165ba26 WHIRLPOOL 8ab473430752336e09b4a0c38fd1117abe21196478d7f2f7e813c27f07c950cc3525d9e9ba32309711c73a1032f3cff27ddc1582d0c4b6c66fe82d5b58675550
 DIST prometheus-2.0.0_beta0.tar.gz 5475399 SHA256 7463ff35335ff7fee05018234aa1d100ef78e10f8c549e23675a7552b0429f77 SHA512 f9da91cbe4e7d5510088e09c8457b08bcfe6a4e0ef781e33a848bbd78045f46042e9a55c4329b71dec4cb11143566de2d077fa34361da3eb66af19f8261baab8 WHIRLPOOL 854010b6d9c86688311c992f644cb51c3b0d50523702fc4d82814f92400a141e9557fe367e47aafd2ae2628a73b6533627fab49b1a7f69bbe36081e2c8193f0e
+DIST prometheus-2.0.0_beta1.tar.gz 5521455 SHA256 25eee3f884ddb577f308d174c8eaf31718602afcffc1aef4c574fa9fe54687e6 SHA512 12b2e0ea0279526fd87c915b8ca2bdc2f29bd6041a7c6ad66bc3a7832e914275ba9bfa9d48db54e86dde3c0c1d347a7051fa92fcf33cfebe5b03f200845ef0d1 WHIRLPOOL ba5ff82e8b578c4b94ca539075c834138d2f2af6bea50c45861ea9ff3e592e4cbb32bb3e1ef9c0a3e9ff4e27c4e3025c22b3feb5cc93c33cbd6b8a17803da465

diff --git a/net-analyzer/prometheus/files/prometheus-2.initd b/net-analyzer/prometheus/files/prometheus-2.initd
new file mode 100644
index 00000000000..04f22f10fda
--- /dev/null
+++ b/net-analyzer/prometheus/files/prometheus-2.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus monitoring system and time series database"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/prometheus"
+command_args="${command_args:---config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+	need net
+	after net
+}
+
+start_pre() {
+	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}

diff --git a/net-analyzer/prometheus/files/prometheus.confd b/net-analyzer/prometheus/files/prometheus.confd
index 95de2eccf09..93b41b31624 100644
--- a/net-analyzer/prometheus/files/prometheus.confd
+++ b/net-analyzer/prometheus/files/prometheus.confd
@@ -1,2 +1,2 @@
-# arguments for docker-registry
-command_args="-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data"
+# arguments for Prometheus
+command_args=""

diff --git a/net-analyzer/prometheus/prometheus-2.0.0_beta1.ebuild b/net-analyzer/prometheus/prometheus-2.0.0_beta1.ebuild
new file mode 100644
index 00000000000..24e83e245bc
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-2.0.0_beta1.ebuild
@@ -0,0 +1,67 @@
+# 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/_beta/-beta.}
+EGIT_COMMIT="v${MY_PV}"
+PROMETHEUS_COMMIT="4dcb465"
+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-2.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_beta1'; 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 "It's generally advised to start with a clean storage directory"
+	fi
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2017-09-18 11:01 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2017-09-18 11:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9f4a9914eae52b1738306aca68b5818c03a58ad2
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 18 11:00:47 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Sep 18 11:00:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f4a9914

net-analyzer/prometheus: Version bump to 2.0.0_beta4, fix initscripts

Gentoo-Bug: 631142
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 net-analyzer/prometheus/Manifest                   |  1 +
 net-analyzer/prometheus/files/prometheus-3.initd   | 19 ++++++
 .../prometheus/prometheus-2.0.0_beta4.ebuild       | 68 ++++++++++++++++++++++
 3 files changed, 88 insertions(+)

diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
index 5a0a972cfd5..6d9c2653072 100644
--- a/net-analyzer/prometheus/Manifest
+++ b/net-analyzer/prometheus/Manifest
@@ -1,2 +1,3 @@
 DIST prometheus-1.7.1.tar.gz 5122747 SHA256 209832310f5bef99faef3beaaa95263612a4d0126ca512c4a4c23a8543d3ccf5 SHA512 98a42e95978477530082d7549c29f17b133043d7c233ba3c90b183f06a3f24ee578f8fed75cba476d3c93a22abcccfdbccc94488beb8450a02f260d24165ba26 WHIRLPOOL 8ab473430752336e09b4a0c38fd1117abe21196478d7f2f7e813c27f07c950cc3525d9e9ba32309711c73a1032f3cff27ddc1582d0c4b6c66fe82d5b58675550
 DIST prometheus-2.0.0_beta2.tar.gz 5521490 SHA256 d8d54562209ff33f9a831e4de7ac0bc94dc743f9ed78d413437750c338d369a2 SHA512 27366ee07428a70cf142036dee4b7f9e24d135d017f6423ffb2fbea648d0601c2e14e927e1bccef5da7e2a2be9b47963e18d02d2759375a05a8b332a0733c1c5 WHIRLPOOL 860fa895ccfc60b08bb76510be4d15272e8b453a46f3af60c4c012e6319c9172762ae27b9bbf6192d73d81d402fd49f3b8b6869f5fc2a496c49345c204207c56
+DIST prometheus-2.0.0_beta4.tar.gz 5534359 SHA256 81196ea9d678c339ba592f29c0f0bdf6bd050862065c5b45351588dc47efbbce SHA512 2d2727e34cb6d71ba4ac431d3300a47482522c115f602358ce77c3ababb2defeec863d10d8cffc0325be0a9dde16e7c3beeed9a0f3c7b6b3b0db86e77e715b6c WHIRLPOOL 52abc94fa55d52e49d3da6a10e6504e07e5cafd635f7c337b941939ee5ff4a112dc7dfee0bfa96ae99086da9f2b14fb79eedb36158f4c0a746a77d3b158d386d

diff --git a/net-analyzer/prometheus/files/prometheus-3.initd b/net-analyzer/prometheus/files/prometheus-3.initd
new file mode 100644
index 00000000000..5f6d6fe1426
--- /dev/null
+++ b/net-analyzer/prometheus/files/prometheus-3.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Prometheus monitoring system and time series database"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/prometheus"
+command_args="${command_args:---config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+
+depend() {
+	after net
+}

diff --git a/net-analyzer/prometheus/prometheus-2.0.0_beta4.ebuild b/net-analyzer/prometheus/prometheus-2.0.0_beta4.ebuild
new file mode 100644
index 00000000000..919309ad811
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-2.0.0_beta4.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/_beta/-beta.}
+EGIT_COMMIT="v${MY_PV}"
+PROMETHEUS_COMMIT="1b80f63"
+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_beta4'; 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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2017-10-09 14:26 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2017-10-09 14:26 UTC (permalink / raw
  To: gentoo-commits

commit:     8c0469c9de85ebcff08964d2a36f56ea6f7499ab
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  9 14:25:45 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 14:25:45 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0469c9

net-analyzer/prometheus: Version bump to 1.8.0

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 net-analyzer/prometheus/Manifest                 |  1 +
 net-analyzer/prometheus/files/prometheus-2.initd | 24 ----------
 net-analyzer/prometheus/files/prometheus.initd   | 19 +++-----
 net-analyzer/prometheus/prometheus-1.8.0.ebuild  | 59 ++++++++++++++++++++++++
 4 files changed, 67 insertions(+), 36 deletions(-)

diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
index c853676459b..95e9429cd30 100644
--- a/net-analyzer/prometheus/Manifest
+++ b/net-analyzer/prometheus/Manifest
@@ -1,4 +1,5 @@
 DIST prometheus-1.7.1.tar.gz 5122747 SHA256 209832310f5bef99faef3beaaa95263612a4d0126ca512c4a4c23a8543d3ccf5 SHA512 98a42e95978477530082d7549c29f17b133043d7c233ba3c90b183f06a3f24ee578f8fed75cba476d3c93a22abcccfdbccc94488beb8450a02f260d24165ba26 WHIRLPOOL 8ab473430752336e09b4a0c38fd1117abe21196478d7f2f7e813c27f07c950cc3525d9e9ba32309711c73a1032f3cff27ddc1582d0c4b6c66fe82d5b58675550
+DIST prometheus-1.8.0.tar.gz 5194115 SHA256 556247d750b3618b74ccf59669f74a8c0c39e72cdf51cbcc0c0bcc392de195df SHA512 1ac00ddae4753f99f167db9b6efc5fa442918284f59468b8e1c7743e3f946eab895678c87e12a73bf158e3c0bf3df7345dd59855baaabb54fc86f1ae1014192d WHIRLPOOL 9ff6f0dc36f022b2be107ce59878f81b210b196858064655a74e098650abc77d5a0c2afb11dd5ebb242d1e2addbc3a182b1a6ce1f751eed723e3fff3434d319c
 DIST prometheus-2.0.0_beta4.tar.gz 5534359 SHA256 81196ea9d678c339ba592f29c0f0bdf6bd050862065c5b45351588dc47efbbce SHA512 2d2727e34cb6d71ba4ac431d3300a47482522c115f602358ce77c3ababb2defeec863d10d8cffc0325be0a9dde16e7c3beeed9a0f3c7b6b3b0db86e77e715b6c WHIRLPOOL 52abc94fa55d52e49d3da6a10e6504e07e5cafd635f7c337b941939ee5ff4a112dc7dfee0bfa96ae99086da9f2b14fb79eedb36158f4c0a746a77d3b158d386d
 DIST prometheus-2.0.0_beta5.tar.gz 5533740 SHA256 451d4c76fe583de1df3d6164aaec1ff2105ee449706acd1843f1a2119440914e SHA512 d84fddd5eb2f03b1edf95cd4fa83312f6e617be863ea77a05864345aa1685ad227e82002d9beb3efc1c18ea6a2539dbfdbcc20aa9d2c0ba510ac7293702b4bd9 WHIRLPOOL 7facfaba5727ffa519e633f49f1ef6b59b67a11ab978eacd6533c487df68a96d46fde6ed231f48c67684a214bbbc8a88e37901a5d835d7ffacb27e702d98d348
 DIST prometheus-2.0.0_rc0.tar.gz 5524499 SHA256 e1615defddf3e0a2d32e22ffba5bc3f0f37ff98fac7d4bba2b2c5bb8219f2a22 SHA512 fd382f559ea9a362e2493ea2d317afe600b0ed2299e3d6ef12678658cd62320ad39deec1b4639819b32c4ba34f124792d00dd101632b1c1e4f1123005e20e38d WHIRLPOOL 1d0ed8f35c9f9d5fca8310af21b93d35bad3397fbf88ea0cc2573412c8d58291e521212283abbe5ed4a461e2e1f62f704f96a6070509864972ff3dd1c0eacd67

diff --git a/net-analyzer/prometheus/files/prometheus-2.initd b/net-analyzer/prometheus/files/prometheus-2.initd
deleted file mode 100644
index 04f22f10fda..00000000000
--- a/net-analyzer/prometheus/files/prometheus-2.initd
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2016-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Prometheus monitoring system and time series database"
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
-user=${user:-${SVCNAME}}
-group=${group:-${SVCNAME}}
-
-command="/usr/bin/prometheus"
-command_args="${command_args:---config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data}"
-command_background="true"
-start_stop_daemon_args="--user ${user} --group ${group} \
-	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
-	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
-
-depend() {
-	need net
-	after net
-}
-
-start_pre() {
-	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
-}

diff --git a/net-analyzer/prometheus/files/prometheus.initd b/net-analyzer/prometheus/files/prometheus.initd
index 2c40710ff7f..245dcc85ae6 100644
--- a/net-analyzer/prometheus/files/prometheus.initd
+++ b/net-analyzer/prometheus/files/prometheus.initd
@@ -1,24 +1,19 @@
 #!/sbin/openrc-run
-# Copyright 2016 Gentoo Foundation
+# Copyright 2016-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 description="Prometheus monitoring system and time series database"
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
-user=${user:-${SVCNAME}}
-group=${group:-${SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
 
 command="/usr/bin/prometheus"
-command_args="${command_args:-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data}"
+command_args="${command_args:--config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data}"
 command_background="true"
 start_stop_daemon_args="--user ${user} --group ${group} \
-	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
-	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
 
 depend() {
-	need net
 	after net
 }
-
-start_pre() {
-	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
-}

diff --git a/net-analyzer/prometheus/prometheus-1.8.0.ebuild b/net-analyzer/prometheus/prometheus-1.8.0.ebuild
new file mode 100644
index 00000000000..de0cc31726d
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-1.8.0.ebuild
@@ -0,0 +1,59 @@
+# 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"
+EGIT_COMMIT="v${PV}"
+PROMETHEUS_COMMIT="3569eef"
+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.8
+	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.initd prometheus
+	newconfd "${FILESDIR}"/prometheus.confd prometheus
+	keepdir /var/log/prometheus /var/lib/prometheus
+	fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2018-01-12 12:38 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2018-01-12 12:38 UTC (permalink / raw
  To: gentoo-commits

commit:     706a1294d62fcb7171151723539d60590c05eda6
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 12 12:38:08 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Fri Jan 12 12:38:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=706a1294

net-analyzer/prometheus: Add reload functionality to init script

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-analyzer/prometheus/files/prometheus-3.initd   | 11 +++-
 net-analyzer/prometheus/prometheus-2.0.0-r1.ebuild | 68 ++++++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/prometheus/files/prometheus-3.initd b/net-analyzer/prometheus/files/prometheus-3.initd
index 5f6d6fe1426..ae151ef91fb 100644
--- a/net-analyzer/prometheus/files/prometheus-3.initd
+++ b/net-analyzer/prometheus/files/prometheus-3.initd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 2016-2017 Gentoo Foundation
+# Copyright 2016-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 description="Prometheus monitoring system and time series database"
@@ -14,6 +14,15 @@ start_stop_daemon_args="--user ${user} --group ${group} \
 	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
 	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
 
+extra_started_commands="reload"
+
 depend() {
 	after net
 }
+
+reload() {
+        ebegin "Reloading ${SVCNAME}"
+        start-stop-daemon --signal HUP --pidfile "${pidfile}"
+        eend $? "Failed to stop ${SVCNAME}"
+}
+

diff --git a/net-analyzer/prometheus/prometheus-2.0.0-r1.ebuild b/net-analyzer/prometheus/prometheus-2.0.0-r1.ebuild
new file mode 100644
index 00000000000..a51b71d9bb2
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-2.0.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 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="0a74f98"
+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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/
@ 2018-01-12 12:38 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2018-01-12 12:38 UTC (permalink / raw
  To: gentoo-commits

commit:     f2f00a0ac10fce5f14718fc59465d947631d3ba3
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 12 12:27:26 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Fri Jan 12 12:27:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2f00a0a

net-analyzer/prometheus: Remove old

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-analyzer/prometheus/Manifest                |  1 -
 net-analyzer/prometheus/files/prometheus.initd  | 19 --------
 net-analyzer/prometheus/prometheus-1.8.2.ebuild | 59 -------------------------
 3 files changed, 79 deletions(-)

diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
index 000a455acca..3c632f55e07 100644
--- a/net-analyzer/prometheus/Manifest
+++ b/net-analyzer/prometheus/Manifest
@@ -1,2 +1 @@
-DIST prometheus-1.8.2.tar.gz 5238057 BLAKE2B 33b53fab08df985ec459150166494d46552b7815d8b68d2f8a63023a12c1017197f7043327b4182935231c86b0fb492f3d05d477b97c7e7cd233fbdb0211f1b6 SHA512 ed52ab494ae565d4787b29cf1800605ac3bfdacee25e833704131d57bad9759a3e2585b96316ad754e6612324e68079d7f670004a86aa12c768a2e03542966d2
 DIST prometheus-2.0.0.tar.gz 5603884 BLAKE2B 0e2c7ee267f4f817fe84105b89fa2951c07212ca75bf540c67afe900c1df62641919f2ad9d2ce24932a946a0c3db8da6847184c56578ef9626db1f55c1ea3080 SHA512 9d23e10b3eb12755781b9edc5c32a0cb1e99055a8a905517619d992a174a8621ebc1e82999ce2412e7fc3e2e0af8a0dfe1eded8bcd2701a5aaaffce79c7fbcc5

diff --git a/net-analyzer/prometheus/files/prometheus.initd b/net-analyzer/prometheus/files/prometheus.initd
deleted file mode 100644
index 245dcc85ae6..00000000000
--- a/net-analyzer/prometheus/files/prometheus.initd
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2016-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Prometheus monitoring system and time series database"
-pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
-user=${user:-${RC_SVCNAME}}
-group=${group:-${RC_SVCNAME}}
-
-command="/usr/bin/prometheus"
-command_args="${command_args:--config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data}"
-command_background="true"
-start_stop_daemon_args="--user ${user} --group ${group} \
-	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
-	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
-
-depend() {
-	after net
-}

diff --git a/net-analyzer/prometheus/prometheus-1.8.2.ebuild b/net-analyzer/prometheus/prometheus-1.8.2.ebuild
deleted file mode 100644
index 1006108b099..00000000000
--- a/net-analyzer/prometheus/prometheus-1.8.2.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# 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"
-EGIT_COMMIT="v${PV}"
-PROMETHEUS_COMMIT="5211b96"
-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.8
-	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.initd prometheus
-	newconfd "${FILESDIR}"/prometheus.confd prometheus
-	keepdir /var/log/prometheus /var/lib/prometheus
-	fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-12 12:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 14:26 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus/files/, net-analyzer/prometheus/ Manuel Rüger
  -- strict thread matches above, loose matches on Subject: below --
2018-01-12 12:38 Manuel Rüger
2018-01-12 12:38 Manuel Rüger
2017-09-18 11:01 Manuel Rüger
2017-08-12 10:19 Manuel Rüger
2016-12-14 12:51 Manuel Rüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox