Date: Monday, September 21, 2020 @ 14:02:30
  Author: jelle
Revision: 396386

Add option to add more command line arguments

Added:
  prometheus/trunk/prometheus.conf
Modified:
  prometheus/trunk/PKGBUILD
  prometheus/trunk/prometheus.service

--------------------+
 PKGBUILD           |   17 ++++++++++-------
 prometheus.conf    |    1 +
 prometheus.service |    3 ++-
 3 files changed, 13 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-09-21 11:55:50 UTC (rev 396385)
+++ PKGBUILD    2020-09-21 14:02:30 UTC (rev 396386)
@@ -2,7 +2,7 @@
 
 pkgname=prometheus
 pkgver=2.21.0
-pkgrel=1
+pkgrel=2
 
 pkgdesc='An open-source systems monitoring and alerting toolkit'
 url='https://prometheus.io'
@@ -12,15 +12,17 @@
 depends=('glibc')
 makedepends=('go' 'git' 'bzr' 'yarn')
 
-backup=('etc/prometheus/prometheus.yml')
+backup=('etc/prometheus/prometheus.yml' 'etc/conf.d/prometheus')
 
 
source=("prometheus-v$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz";
         prometheus.service
-        prometheus.sysusers)
+        prometheus.sysusers
+        prometheus.conf)
 
 sha256sums=('afafed1be631a53ada60e2b2f12cfdb51dcaee5e539fb65e9983f3276c99f5af'
-            '463647e91c8401d06c65b67df0288fa9bf14e3b0398014c7cfe725efa8db8812'
-            '2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f')
+            'f358986865bd3d06dc47a265aeb3b5ef64aa644e831f07731c2fc7af64d9e98f'
+            '2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f'
+            '6d32deb125381cbebac11b6953a7d9a65eb7e50f209dc1e22c63facf678a3070')
 
 build() {
   cd prometheus-$pkgver
@@ -38,7 +40,7 @@
     -buildmode=pie \
     -mod=readonly \
     -modcacherw \
-    -ldflags "$LDFLAGS" \
+    -ldflags "-linkmode external $LDFLAGS" \
     ./cmd/prometheus
   go build \
     -trimpath \
@@ -45,7 +47,7 @@
     -buildmode=pie \
     -mod=readonly \
     -modcacherw \
-    -ldflags "$LDFLAGS" \
+    -ldflags "-linkmode external $LDFLAGS" \
     ./cmd/promtool
 }
 
@@ -58,6 +60,7 @@
 package() {
   install -Dm644 prometheus.service 
"$pkgdir"/usr/lib/systemd/system/prometheus.service
   install -Dm644 prometheus.sysusers 
"$pkgdir"/usr/lib/sysusers.d/prometheus.conf
+  install -Dm644 prometheus.conf "${pkgdir}"/etc/conf.d/prometheus
 
   cd prometheus-$pkgver
 

Added: prometheus.conf
===================================================================
--- prometheus.conf                             (rev 0)
+++ prometheus.conf     2020-09-21 14:02:30 UTC (rev 396386)
@@ -0,0 +1 @@
+PROMETHEUS_ARGS=""

Modified: prometheus.service
===================================================================
--- prometheus.service  2020-09-21 11:55:50 UTC (rev 396385)
+++ prometheus.service  2020-09-21 14:02:30 UTC (rev 396386)
@@ -8,7 +8,8 @@
 Group=prometheus
 Restart=on-failure
 WorkingDirectory=/usr/share/prometheus
-ExecStart=/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml 
--storage.tsdb.path=/var/lib/prometheus/data
+EnvironmentFile=-/etc/conf.d/prometheus
+ExecStart=/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml 
--storage.tsdb.path=/var/lib/prometheus/data $PROMETHEUS_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
 LimitNOFILE=65535
 NoNewPrivileges=true

Reply via email to