summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2019-08-12 12:45:25 (GMT)
committer Mario Fetka <[email protected]>2019-08-12 12:45:25 (GMT)
commit13f11f3e01b42e7d090d2e1f3153753a4709387c (patch)
tree42b97d3095035d71d5d4d1772b29870ef8b66375
parenta0d0a05c6b3d0250da9f37f4e6b44c9a58e55abe (diff)
Bump
-rw-r--r--debian/changelog5
-rw-r--r--debian/control10
-rw-r--r--debian/default1
-rwxr-xr-xdebian/postinst24
-rwxr-xr-xdebian/rules48
-rw-r--r--debian/service19
6 files changed, 107 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..8b88ca0
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+prometheus-prometheus-alertmanager (0.18.0) stable; urgency=medium
+
+ * Version bump to 0.18.0.
+
+ -- Jiri Tyr <[email protected]> Mon, 12 Aug 2019 14:44:25 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8cb65a6
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,10 @@
+Source: prometheus-alertmanager
+Section: net
+Priority: optional
+Maintainer: Jiri Tyr <[email protected]>
+Standards-Version: 4.1.1
+Homepage: https://prometheus.io/
+
+Package: prometheus-alertmanager
+Architecture: any
+Description: Alerts manager for the Prometheus server
diff --git a/debian/default b/debian/default
new file mode 100644
index 0000000..c2a734b
--- /dev/null
+++ b/debian/default
@@ -0,0 +1 @@
+ALERTMANAGER_OPTS=""
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..de2dce4
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure)
+ # Add prometheus user
+ if ! getent passwd prometheus > /dev/null; then
+ adduser --quiet --system --home /var/lib/prometheus \
+ --group --gecos "Prometheus services" prometheus || true
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ :
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..f6d3ee0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,48 @@
+#!/usr/bin/make -f
+
+define checkdir
+ @test -f debian/rules || \
+ (echo Not in correct source directory; exit 1)
+endef
+
+define checkroot
+ @test $$(id -u) = 0 || (echo need root priviledges; exit 1)
+endef
+
+PRODUCT = alertmanager
+TOP_DIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+SRC_DIR = $(TOP_DIR)
+DEB_DIR = $(TOP_DIR)/debian
+DEST_DIR = $(DEB_DIR)/$(PRODUCT)
+
+BIN_DIR = $(DEST_DIR)/usr/bin
+CONF_DIR = $(DEST_DIR)/etc/prometheus
+DEFAULT_DIR = $(DEST_DIR)/etc/default
+DOCS_DIR = $(DEST_DIR)/usr/share/doc/$(PRODUCT)
+SYSD_DIR = $(DEST_DIR)/usr/lib/systemd/system
+
+build:
+
+binary:
+ $(checkdir)
+ $(checkroot)
+ mkdir -p $(DEST_DIR)/DEBIAN $(BIN_DIR) $(CONF_DIR) $(DEFAULT_DIR) $(DOCS_DIR) $(SYSD_DIR)
+ install -Dm755 $(SRC_DIR)/$(PRODUCT) -t $(BIN_DIR)
+ install -Dm755 $(SRC_DIR)/amtool -t $(BIN_DIR)
+ install -Dm644 $(SRC_DIR)/LICENSE -t $(DOCS_DIR)
+ install -Dm644 $(SRC_DIR)/NOTICE -t $(DOCS_DIR)
+ install -Dm755 $(DEB_DIR)/postinst -t $(DEST_DIR)/DEBIAN
+ install -Dm644 $(SRC_DIR)/$(PRODUCT).yml $(CONF_DIR)/$(PRODUCT).yml
+ install -Dm644 $(DEB_DIR)/default $(DEFAULT_DIR)/$(PRODUCT)
+ install -Dm644 $(DEB_DIR)/service $(SYSD_DIR)/$(PRODUCT).service
+ dpkg-gencontrol -P$(DEST_DIR)
+ cd $(DEST_DIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
+ dpkg-deb -b $(DEST_DIR) ../
+
+clean:
+ $(checkdir)
+ -rm -rf debian/$(PRODUCT)
+ -rm -f debian/files
+ -rm -f debian/substvars
+
+.PHONY: binary clean
diff --git a/debian/service b/debian/service
new file mode 100644
index 0000000..97f1eb7
--- /dev/null
+++ b/debian/service
@@ -0,0 +1,19 @@
+# -*- mode: conf -*-
+
+[Unit]
+Description=Prometheus Alertmanager.
+Documentation=https://github.com/prometheus/alertmanager
+After=network.target
+
+[Service]
+EnvironmentFile=-/etc/default/alertmanager
+User=prometheus
+ExecStart=/usr/bin/alertmanager \
+ --config.file=/etc/prometheus/alertmanager.yml \
+ --storage.path=/var/lib/prometheus/alertmanager \
+ $ALERTMANAGER_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Powered by Domaintechnik.at | Hosting - Domain - Webspace