From: "罗百科" <patrick@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/grafana-bin/files/, www-apps/grafana-bin/
Date: Mon, 20 Mar 2023 19:17:32 +0000 (UTC) [thread overview]
Message-ID: <1679339848.7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8.patrick@gentoo> (raw)
commit: 7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 20 19:15:58 2023 +0000
Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Mon Mar 20 19:17:28 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c62f15f
www-apps/grafana-bin: Fix installed files
Closes: https://bugs.gentoo.org/902459
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
www-apps/grafana-bin/files/grafana.initd2 | 36 ++++++++++++++++++++++
...in-9.3.8.ebuild => grafana-bin-9.3.8-r1.ebuild} | 3 +-
...in-9.4.3.ebuild => grafana-bin-9.4.3-r1.ebuild} | 3 +-
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/www-apps/grafana-bin/files/grafana.initd2 b/www-apps/grafana-bin/files/grafana.initd2
new file mode 100644
index 000000000000..1c8f6b2af56f
--- /dev/null
+++ b/www-apps/grafana-bin/files/grafana.initd2
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+GRAFANA_USER="${GRAFANA_USER:-"grafana"}"
+GRAFANA_GROUP="${GRAFANA_GROUP:-"grafana"}"
+GRAFANA_CONFIGFILE="${GRAFANA_CONFIGFILE:-"/etc/grafana/${RC_SVCNAME}.ini"}"
+GRAFANA_DATADIR="${GRAFANA_DATADIR:-"/var/lib/grafana"}"
+GRAFANA_LOGDIR="${GRAFANA_LOGDIR:-"/var/log/grafana"}"
+GRAFANA_PIDFILE="${GRAFANA_PIDFILE:-"/run/${RC_SVCNAME}.pid"}"
+GRAFANA_SSDARGS=${GRAFANA_SSDARGS:-"--wait 1000"}
+GRAFANA_TERMTIMEOUT=${GRFANA_TERMTIMEOUT:-"TERM/60/KILL/5"}
+
+command="/usr/bin/grafana"
+command_args="server -homepath=/usr/share/grafana"
+command_args="${command_args} -config=\"${GRAFANA_CONFIGFILE}\""
+command_args="${command_args} cfg:default.paths.data=\"${GRAFANA_DATADIR}\""
+command_args="${command_args} cfg:default.paths.logs=\"${GRAFANA_LOGDIR}\""
+command_background="yes"
+pidfile="${GRAFANA_PIDFILE}"
+retry="${GRAFANA_TERMTIMEOUT}"
+start_stop_daemon_args="--user ${GRAFANA_USER}:${GRAFANA_GROUP} ${GRAFANA_SSDARGS}"
+
+description="Grafana server, feature rich metrics dashboard and graph editor."
+
+required_files="${GRAFANA_CONFIGFILE}"
+
+depend() {
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "${GRAFANA_DATADIR}" || return 1
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "${GRAFANA_DATADIR}/dashboards" || return 1
+ checkpath -d -o "${GRAFANA_USER}:${GRAFANA_GROUP}" -m750 "${GRAFANA_DATADIR}/plugins" || return 1
+}
diff --git a/www-apps/grafana-bin/grafana-bin-9.3.8.ebuild b/www-apps/grafana-bin/grafana-bin-9.3.8-r1.ebuild
similarity index 96%
rename from www-apps/grafana-bin/grafana-bin-9.3.8.ebuild
rename to www-apps/grafana-bin/grafana-bin-9.3.8-r1.ebuild
index 0e8aae35965c..ed079e9887f5 100644
--- a/www-apps/grafana-bin/grafana-bin-9.3.8.ebuild
+++ b/www-apps/grafana-bin/grafana-bin-9.3.8-r1.ebuild
@@ -38,10 +38,11 @@ src_install() {
doins -r public conf
dobin bin/grafana-cli
+ dobin bin/grafana
dobin bin/grafana-server
newconfd "${FILESDIR}"/grafana-r1.confd grafana
- newinitd "${FILESDIR}"/grafana.initd grafana
+ newinitd "${FILESDIR}"/grafana.initd2 grafana
systemd_newunit "${FILESDIR}"/grafana.service grafana.service
keepdir /var/{lib,log}/grafana
diff --git a/www-apps/grafana-bin/grafana-bin-9.4.3.ebuild b/www-apps/grafana-bin/grafana-bin-9.4.3-r1.ebuild
similarity index 96%
rename from www-apps/grafana-bin/grafana-bin-9.4.3.ebuild
rename to www-apps/grafana-bin/grafana-bin-9.4.3-r1.ebuild
index 0e8aae35965c..ed079e9887f5 100644
--- a/www-apps/grafana-bin/grafana-bin-9.4.3.ebuild
+++ b/www-apps/grafana-bin/grafana-bin-9.4.3-r1.ebuild
@@ -38,10 +38,11 @@ src_install() {
doins -r public conf
dobin bin/grafana-cli
+ dobin bin/grafana
dobin bin/grafana-server
newconfd "${FILESDIR}"/grafana-r1.confd grafana
- newinitd "${FILESDIR}"/grafana.initd grafana
+ newinitd "${FILESDIR}"/grafana.initd2 grafana
systemd_newunit "${FILESDIR}"/grafana.service grafana.service
keepdir /var/{lib,log}/grafana
next reply other threads:[~2023-03-20 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 19:17 罗百科 [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-01 17:03 [gentoo-commits] repo/gentoo:master commit in: www-apps/grafana-bin/files/, www-apps/grafana-bin/ Tobias Klausmann
2016-08-24 10:38 Pacho Ramos
2016-06-22 10:36 Patrick Lauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1679339848.7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8.patrick@gentoo \
--to=patrick@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox