From 0be0803b1f3636c73ea5c04500a2c8d1418923e7 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen <lauri@hacktheplanet.fi> Date: Thu, 16 Mar 2023 09:53:32 +0900 Subject: [PATCH 1/2] community/prometheus: allow adding args via conf.d eg. --web.listen-address cannot be provided in the config file, so a mechanism to modify the command line is necessary --- community/prometheus/APKBUILD | 4 ++-- community/prometheus/prometheus.confd | 1 + community/prometheus/prometheus.initd | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD index 026ec5185418..4c43ac5a5b91 100644 --- a/community/prometheus/APKBUILD +++ b/community/prometheus/APKBUILD @@ -86,6 +86,6 @@ package() { sha512sums=" 5af1c6489f82f977d2ebc8ed51dded4ac941d723765299723059936f64c07ba090130b9e2936a3170534957f8905093517625110527f060e498fcb37a48a3a4c prometheus-2.42.0.tar.gz -eb0cebe41782f90079f367832f7c9efa18b99df410506b65b2e0b11fa05f8f2956f68c0fca836664729d50b85fc969a96e99e1d32012fe3c655cddc0b16a7561 prometheus.initd -24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd +f4c222ba836f65d874fb30c62c7a55c27c4cedd6c473e39808a84bb7b4353c79c6ff3cefd3c4cf2ce966ce3a1234db3343cba397c83328ccc4e25072f683fcf5 prometheus.initd +2e47a19e313cbf64f7a57a15de4bea959f5b1c307ef0c2b7f6b254f4abc5504b6ae31b02a1e11487fd82bc975f1cd8e1f3733393823b007f375acbdaf17af8ea prometheus.confd " diff --git a/community/prometheus/prometheus.confd b/community/prometheus/prometheus.confd index 8cf02ffdc1ec..fe764f254b47 100644 --- a/community/prometheus/prometheus.confd +++ b/community/prometheus/prometheus.confd @@ -1,6 +1,7 @@ prometheus_config_file=/etc/prometheus/prometheus.yml prometheus_storage_path=/var/lib/prometheus/data prometheus_retention_time=15d +prometheus_args="" output_log=/var/log/prometheus.log error_log=/var/log/prometheus.log diff --git a/community/prometheus/prometheus.initd b/community/prometheus/prometheus.initd index 2cb1fd4f7d50..de83c4b04701 100644 --- a/community/prometheus/prometheus.initd +++ b/community/prometheus/prometheus.initd @@ -5,7 +5,8 @@ supervisor=supervise-daemon command=/usr/bin/prometheus command_args="--config.file=$prometheus_config_file \ --storage.tsdb.path=$prometheus_storage_path \ - --storage.tsdb.retention.time=$prometheus_retention_time" + --storage.tsdb.retention.time=$prometheus_retention_time + $prometheus_args" command_user="prometheus:prometheus" extra_started_commands="reload" -- GitLab From 954d4e1ab4ebac3f2b04584ea0f34e6664c440f0 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen <lauri@hacktheplanet.fi> Date: Sun, 16 Apr 2023 07:00:45 +0000 Subject: [PATCH 2/2] community/prometheus: fix lint --- community/prometheus/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD index 4c43ac5a5b91..bac3d8da0c43 100644 --- a/community/prometheus/APKBUILD +++ b/community/prometheus/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault <sir@cmpwn.com> pkgname=prometheus pkgver=2.42.0 -pkgrel=2 +pkgrel=3 pkgdesc="The Prometheus monitoring system and time series database" url="https://github.com/prometheus/prometheus" arch="all !riscv64" # npm @@ -29,7 +29,7 @@ build() { GOLDFLAGS="-X github.com/prometheus/common/version.Version=$pkgver -X github.com/prometheus/common/version.Revision=AlpineLinux -X github.com/prometheus/common/version.Branch=master - -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME + -X github.com/prometheus/common/version.BuildUser=$USER@$(hostname) -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH}) " if [ -n "$LDFLAGS" ]; then -- GitLab