From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E251E15A7D9 for ; Mon, 20 Mar 2023 19:17:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17788E07B2; Mon, 20 Mar 2023 19:17:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F02F8E07B2 for ; Mon, 20 Mar 2023 19:17:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 113803411A8 for ; Mon, 20 Mar 2023 19:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C1B18D4 for ; Mon, 20 Mar 2023 19:17:32 +0000 (UTC) From: "罗百科" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "罗百科" Message-ID: <1679339848.7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8.patrick@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/grafana-bin/files/, www-apps/grafana-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-apps/grafana-bin/files/grafana.initd2 www-apps/grafana-bin/grafana-bin-9.3.8-r1.ebuild www-apps/grafana-bin/grafana-bin-9.3.8.ebuild www-apps/grafana-bin/grafana-bin-9.4.3-r1.ebuild www-apps/grafana-bin/grafana-bin-9.4.3.ebuild X-VCS-Directories: www-apps/grafana-bin/files/ www-apps/grafana-bin/ X-VCS-Committer: patrick X-VCS-Committer-Name: 罗百科 X-VCS-Revision: 7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8 X-VCS-Branch: master Date: Mon, 20 Mar 2023 19:17:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d436eebb-ea05-401c-941d-c5424bcd8ead X-Archives-Hash: 2a875f1c41ef3661dd7af8bef869153d commit: 7c62f15f877fec0ac7c11b5c3c8d3231792ef7f8 Author: Patrick Lauer gentoo org> AuthorDate: Mon Mar 20 19:15:58 2023 +0000 Commit: 罗百科 gentoo 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 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