summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2017-04-11 10:55:31 +0200
committerPatrick Lauer <patrick@gentoo.org>2017-04-11 10:55:31 +0200
commit77e5da07ebf7376541167d97a0d5eb8f39ce7f08 (patch)
tree416e378eb621948d125cf9060eff399e8585a115 /www-apps
parentdev-perl/Time-Moment: Bump to version 0.420.0 (diff)
downloadgentoo-77e5da07ebf7376541167d97a0d5eb8f39ce7f08.tar.gz
gentoo-77e5da07ebf7376541167d97a0d5eb8f39ce7f08.tar.bz2
gentoo-77e5da07ebf7376541167d97a0d5eb8f39ce7f08.zip
www-apps/grafana-bin: Bump. Fix lots of bugs. Add ferki as maintainer
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/grafana-bin/Manifest2
-rw-r--r--www-apps/grafana-bin/files/grafana.initd.338
-rw-r--r--www-apps/grafana-bin/files/grafana.service24
-rw-r--r--www-apps/grafana-bin/grafana-bin-4.2.0.ebuild (renamed from www-apps/grafana-bin/grafana-bin-4.2.0_beta1.ebuild)22
-rw-r--r--www-apps/grafana-bin/metadata.xml4
5 files changed, 80 insertions, 10 deletions
diff --git a/www-apps/grafana-bin/Manifest b/www-apps/grafana-bin/Manifest
index 1e6feb1c9600..1c9562d30abb 100644
--- a/www-apps/grafana-bin/Manifest
+++ b/www-apps/grafana-bin/Manifest
@@ -1,4 +1,4 @@
DIST grafana-bin-4.0.1.tar.gz 42179027 SHA256 910327d0d7b7597cb471a697766baea170da9eb2ac59c94782c90744a16a218b SHA512 7aea39aa8dddf4123d7716b4561476beb50c4725c1ef59f5d8ab033134725445c9c3b47fda9538de58edf5c45c2145f2a9cf0bd33352764fd2840ba090967bd0 WHIRLPOOL 5d0ecc929b681ead4a17d544631b54cb0b76705f5a72470acc646b7d5888937a02b033a1d3aeab901f436fb6c0d8c21460bcf0422b0db99578dfc0378d13deb5
DIST grafana-bin-4.1.1.tar.gz 45019506 SHA256 51464c7569638bbfd7c6a7397c8f5f296c6839a113360ff5f908d454a9643aeb SHA512 74df71c1f4b8d84046ed94447d01a759197486232ff4818a10e5e4656c6fd025c9aa224df8c8f02770a77a7483398c881aebfd40a1da12e8d83d8ec97980d3db WHIRLPOOL b8f8d4c59d49303bdb9f53de9d67481083e41ff2d9be43dab2cacfc6bee742bf310cabba0766c58c80c7d42a7aad7e2633d3e57d4603ea23a1fd4a14faba7e16
DIST grafana-bin-4.1.2.tar.gz 45024995 SHA256 b8111cd014e9c202dd1b168b924731a140161e9e43e32f3ca7ae18db850af6c4 SHA512 4a0825c99eebb4185036cf5e1fd2ec26ff12913e474ac6014bb677329e1c92ee866be4ff53bd2560d91ebe38d7d7e3ae310e05b221e415046afbafd7a164e3cf WHIRLPOOL 6c4eda846cdd4ff4ef0ef34a0fd3b45da45cbc0aa0fa46d707616809c3fed322146b89678dcd11de2d31bf6ca94efa6afb7cd9f9423b5cac1847da209b7bae6c
-DIST grafana-bin-4.2.0_beta1.tar.gz 46386040 SHA256 522c6a9a956a988580cd0b284d991389ef229ad4d515584fa4df16de6fa95771 SHA512 da4f4c8255b27dfdcc75dc0e356b88e8d6869c07504af7923118c42acea0f6170e4af2fdd89827056a3cace1090ce90bed62544a795f8d5980b93c8bac05444f WHIRLPOOL ee24150ffa3d8d651d3378b1a77837917cb398610330c67dac29a0a17b49114918065f2462ff6d8ce1e13e2f17e455afe9d2195ad58ad5e064bccc18eecd80d2
+DIST grafana-bin-4.2.0.tar.gz 45741731 SHA256 e9927baaaf6cbcab64892dedd11ccf509e4edea54670db4250b9e7568466ec61 SHA512 8c100f5d61b8ebac2abb3894d3f37e926c6fd81eb3ab68fd966d2bc38d9ec2386fee15dd745f5efe7c0e52de06321f3e983fdab0185b3da3f28562b54c60994f WHIRLPOOL 08d00ab71ae8dba828c98661c4250b5e4a014f75d25b9eb80daee445570b972b2babd6da89f5aba76ca1d32b1d6e71376066c6387d6bb92c1f7299fbc7087d4b
diff --git a/www-apps/grafana-bin/files/grafana.initd.3 b/www-apps/grafana-bin/files/grafana.initd.3
new file mode 100644
index 000000000000..c454fb249753
--- /dev/null
+++ b/www-apps/grafana-bin/files/grafana.initd.3
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting grafana server"
+
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "/var/lib/grafana/dashboards"
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "/var/lib/grafana/plugins"
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "/var/lib/grafana/sessions"
+
+ start-stop-daemon --start -b \
+ --make-pidfile \
+ --pidfile /run/grafana.pid \
+ --chdir /usr/share/grafana \
+ --user ${GRAFANA_USER}:${GRAFANA_GROUP} \
+ --exec /usr/bin/grafana-server -- \
+ -config=/etc/grafana/grafana.ini \
+ cfg:default.paths.data=/var/lib/grafana \
+ cfg:default.paths.logs=/var/log/grafana
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping grafana server"
+
+ start-stop-daemon --stop \
+ --pidfile /run/grafana.pid \
+ --user "${GRAFANA_USER}" \
+ --retry=TERM/20/KILL/5
+
+ eend $?
+}
diff --git a/www-apps/grafana-bin/files/grafana.service b/www-apps/grafana-bin/files/grafana.service
new file mode 100644
index 000000000000..66fefe67e3ee
--- /dev/null
+++ b/www-apps/grafana-bin/files/grafana.service
@@ -0,0 +1,24 @@
+[Unit]
+Description=Grafana
+Documentation=http://docs.grafana.org
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+User=grafana
+Group=grafana
+Type=simple
+Restart=on-failure
+WorkingDirectory=/usr/share/grafana
+ExecStart=/usr/bin/grafana-server \
+ --config=/etc/grafana/grafana.ini \
+ --pidfile=/run/grafana.pid \
+ cfg:default.paths.logs=/var/log/grafana \
+ cfg:default.paths.data=/var/lib/grafana \
+ cfg:default.paths.plugins=/var/lib/grafana/plugins
+LimitNOFILE=10000
+TimeoutStopSec=20
+UMask=0027
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-apps/grafana-bin/grafana-bin-4.2.0_beta1.ebuild b/www-apps/grafana-bin/grafana-bin-4.2.0.ebuild
index a167febbea0b..51e04d5e97cd 100644
--- a/www-apps/grafana-bin/grafana-bin-4.2.0_beta1.ebuild
+++ b/www-apps/grafana-bin/grafana-bin-4.2.0.ebuild
@@ -3,14 +3,14 @@
EAPI=5
-inherit user
+inherit user systemd
+
MY_PN=${PN/-bin/}
-MY_PV="4.2.0-beta1"
-S=${WORKDIR}/${MY_PN}-${MY_PV}
+S=${WORKDIR}/${MY_PN}-${PV}
DESCRIPTION="Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB"
HOMEPAGE="http://grafana.org"
-SRC_URI="https://grafanarel.s3.amazonaws.com/builds/${MY_PN}-${MY_PV}.linux-x64.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://s3-us-west-2.amazonaws.com/grafana-releases/release/${MY_PN}-${PV}.linux-x64.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
@@ -18,10 +18,10 @@ KEYWORDS="~amd64"
IUSE=""
DEPEND=""
-RDEPEND="${DEPEND}
- >=dev-lang/go-1.5
- net-libs/nodejs
-"
+RDEPEND="${DEPEND}"
+
+QA_EXECSTACK="usr/share/grafana/vendor/phantomjs/phantomjs"
+QA_PRESTRIPPED=${QA_EXECSTACK}
pkg_setup() {
enewgroup grafana
@@ -42,9 +42,13 @@ src_install() {
dobin bin/grafana-server
newconfd "${FILESDIR}"/grafana.confd grafana
- newinitd "${FILESDIR}"/grafana.initd.2 grafana
+ newinitd "${FILESDIR}"/grafana.initd.3 grafana
+ systemd_newunit "${FILESDIR}"/grafana.service grafana.service
keepdir /var/{lib,log}/grafana
+ keepdir /var/lib/grafana/{dashboards,plugins}
fowners grafana:grafana /var/{lib,log}/grafana
+ fowners grafana:grafana /var/lib/grafana/{dashboards,plugins}
fperms 0750 /var/{lib,log}/grafana
+ fperms 0750 /var/lib/grafana/{dashboards,plugins}
}
diff --git a/www-apps/grafana-bin/metadata.xml b/www-apps/grafana-bin/metadata.xml
index 8c5a5301197b..6edc60113039 100644
--- a/www-apps/grafana-bin/metadata.xml
+++ b/www-apps/grafana-bin/metadata.xml
@@ -2,6 +2,10 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
+ <email>erkiferenc@gmail.com</email>
+ <description>Proxied maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer type="person">
<email>patrick@gentoo.org</email>
</maintainer>
</pkgmetadata>