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 DCF29158041 for ; Sat, 24 Feb 2024 16:54:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1873CE29C0; Sat, 24 Feb 2024 16:54:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB325E29C0 for ; Sat, 24 Feb 2024 16:54:42 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0EC5134305D for ; Sat, 24 Feb 2024 16:54:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7449A955 for ; Sat, 24 Feb 2024 16:54:40 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1708793638.27d408eda1c027c48312e7b9ae96b01cae508474.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/influxdb/files/, dev-db/influxdb/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/influxdb/files/influxdb.confd-r1 dev-db/influxdb/files/influxdb.initd-r1 dev-db/influxdb/influxdb-2.7.3-r1.ebuild dev-db/influxdb/influxdb-2.7.3.ebuild X-VCS-Directories: dev-db/influxdb/files/ dev-db/influxdb/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 27d408eda1c027c48312e7b9ae96b01cae508474 X-VCS-Branch: master Date: Sat, 24 Feb 2024 16:54:40 +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: 7ed2ef32-3bf7-4587-8bf4-16e6da369d20 X-Archives-Hash: c06dbe5a2e89aaa84d45f1ff09c20311 commit: 27d408eda1c027c48312e7b9ae96b01cae508474 Author: Conrad Kostecki gentoo org> AuthorDate: Mon Feb 12 20:25:32 2024 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sat Feb 24 16:53:58 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27d408ed dev-db/influxdb: fix config handling The config handling changed in v2 completly. This means, the parameter "-config" is gone and does not exist anymore. Instead, INFLUXD_CONFIG_PATH needs to be defined with the path, where InfluxDB v2 needs to look for config files. For compatibility reason, we will use '/etc/influxdb'. This can be overriden by user. Closes: https://bugs.gentoo.org/908437 Signed-off-by: Conrad Kostecki gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35289 Signed-off-by: Conrad Kostecki gentoo.org> dev-db/influxdb/files/influxdb.confd-r1 | 18 +++++++++ dev-db/influxdb/files/influxdb.initd-r1 | 47 ++++++++++++++++++++++ ...luxdb-2.7.3.ebuild => influxdb-2.7.3-r1.ebuild} | 6 ++- 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/dev-db/influxdb/files/influxdb.confd-r1 b/dev-db/influxdb/files/influxdb.confd-r1 new file mode 100644 index 000000000000..7c225cfea51f --- /dev/null +++ b/dev-db/influxdb/files/influxdb.confd-r1 @@ -0,0 +1,18 @@ +#The convention in this file is to show the default setting commented +#out. +#To change the setting, uncomment it then change the value. + +#This is the influxd error log: +#error_log="/var/log/influxdb/influxd.log" + +#This is the influxd output log: +#output_log="/dev/null" + +#The influxd Config path location: +#config_path="/etc/influxdb/." + +# Extra options to pass to influxd: +#influxd_opts="" + +# Uncomment / edit to enable healthchecks +#INFLUXDB_HEALTHCHECK_URI="127.0.0.1:8086/ping" diff --git a/dev-db/influxdb/files/influxdb.initd-r1 b/dev-db/influxdb/files/influxdb.initd-r1 new file mode 100644 index 000000000000..ef7da61d271d --- /dev/null +++ b/dev-db/influxdb/files/influxdb.initd-r1 @@ -0,0 +1,47 @@ +#!/sbin/openrc-run + +# Logging +error_log="${error_log:-/var/log/influxdb/influxd.log}" +output_log="${output_log:-/dev/null}" + +config_path="${config_path:-/etc/influxdb/.}" +influxd_opts=${influxd_opts:-} + +command=/usr/bin/influxd +command_args="${influxd_opts}" +command_user="influxdb:influxdb" +extra_commands="version" + +retry=SIGTERM/30/SIGKILL/10 +supervisor="supervise-daemon" + +# Max open files +rc_ulimit="-n 65536" + +start_pre() { + # Check if config file exist + if [ -n "${config_path}" ] && [ ! -e "${config_path}" ]; then + checkpath -d -o "${command_user}" "$(dirname "${config_path}")" + fi + if [ -n "${error_log}" ] && [ ! -e "${error_log}" ]; then + checkpath -d -o "${command_user}" "$(dirname "${error_log}")" + fi + if [ -n "${output_log}" ] && [ ! -e "${output_log}" ]; then + checkpath -d -o "${command_user}" "$(dirname "${output_log}")" + fi + return 0 +} + +version() { + $command version +} + +if [ -n "${INFLUXDB_HEALTHCHECK_URI}" ]; then + healthcheck_delay=300 + healthcheck_timer=60 + + healthcheck() { + command -v wget || return 0 + wget -Oq- "${INFLUXDB_HEALTHCHECK_URI}" + } +fi diff --git a/dev-db/influxdb/influxdb-2.7.3.ebuild b/dev-db/influxdb/influxdb-2.7.3-r1.ebuild similarity index 98% rename from dev-db/influxdb/influxdb-2.7.3.ebuild rename to dev-db/influxdb/influxdb-2.7.3-r1.ebuild index 6e2b4f1de31e..f14c9edbd5c8 100644 --- a/dev-db/influxdb/influxdb-2.7.3.ebuild +++ b/dev-db/influxdb/influxdb-2.7.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -267,6 +267,10 @@ src_install() { newinitd "${FILESDIR}"/influxdb.initd influxdb keepdir /var/log/influxdb fowners influxdb:influxdb /var/log/influxdb + + newenvd - "99${PN}" <<-_EOF_ + INFLUXD_CONFIG_PATH="/etc/influxdb" + _EOF_ } pkg_postinst() {