Compare commits

...

5 Commits

Author SHA1 Message Date
Mario Fetka
7b8766057f Bump 2020-02-12 13:58:41 +01:00
Mario Fetka
407f811913 Bump 2020-02-12 13:55:23 +01:00
Mario Fetka
a1211e8fe8 Merge tag 'upstream/2.15.2'
Upstream version 2.15.2
2020-02-12 13:54:09 +01:00
Mario Fetka
6d3edb32fa Bump 2019-08-12 14:39:13 +02:00
Mario Fetka
be7816aeba Bump 2019-08-12 14:35:11 +02:00
6 changed files with 118 additions and 0 deletions

12
debian/changelog vendored Normal file
View File

@ -0,0 +1,12 @@
prometheus (2.15.2-1) UNRELEASED; urgency=medium
* Bump
* Bump
-- Mario Fetka <mario.fetka@gmail.com> Wed, 12 Feb 2020 13:54:47 +0100
prometheus (2.11.1) stable; urgency=medium
* Version bump to 2.11.1.
-- Jiri Tyr <jiri.tyr@gmail.com> Mon, 12 Aug 2019 14:25:56 +0200

10
debian/control vendored Normal file
View File

@ -0,0 +1,10 @@
Source: prometheus
Section: net
Priority: optional
Maintainer: Jiri Tyr <jiri.tyr@gmail.com>
Standards-Version: 4.1.1
Homepage: https://prometheus.io/
Package: prometheus
Architecture: amd64
Description: Monitoring system and time series database

1
debian/default vendored Normal file
View File

@ -0,0 +1 @@
PROMETHEUS_OPTS='--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data'

24
debian/postinst vendored Executable file
View File

@ -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

52
debian/rules vendored Executable file
View File

@ -0,0 +1,52 @@
#!/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 = prometheus
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/$(PRODUCT)
DEFAULT_DIR = $(DEST_DIR)/etc/default
DOCS_DIR = $(DEST_DIR)/usr/share/doc/$(PRODUCT)
SYSD_DIR = $(DEST_DIR)/usr/lib/systemd/system
SHARE_DIR = $(DEST_DIR)/usr/share/$(PRODUCT)
build:
binary:
$(checkdir)
$(checkroot)
mkdir -p $(DEST_DIR)/DEBIAN $(BIN_DIR) $(CONF_DIR) $(DEFAULT_DIR) $(DOCS_DIR) $(SYSD_DIR) $(SHARE_DIR)
install -Dm755 $(SRC_DIR)/$(PRODUCT) -t $(BIN_DIR)
install -Dm755 $(SRC_DIR)/promtool -t $(BIN_DIR)
install -Dm755 $(SRC_DIR)/tsdb -t $(BIN_DIR)
install -Dm644 $(SRC_DIR)/LICENSE -t $(DOCS_DIR)
install -Dm644 $(SRC_DIR)/NOTICE -t $(DOCS_DIR)
install -Dm644 $(SRC_DIR)/$(PRODUCT).yml -t $(CONF_DIR)
install -Dm755 $(DEB_DIR)/postinst -t $(DEST_DIR)/DEBIAN
install -Dm644 $(DEB_DIR)/default $(DEFAULT_DIR)/$(PRODUCT)
install -Dm644 $(DEB_DIR)/service $(SYSD_DIR)/$(PRODUCT).service
cp -r $(SRC_DIR)/console_libraries $(SHARE_DIR)
cp -r $(SRC_DIR)/consoles $(SHARE_DIR)
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

19
debian/service vendored Normal file
View File

@ -0,0 +1,19 @@
# -*- mode: conf -*-
[Unit]
Description=The Prometheus monitoring system and time series database.
Documentation=https://prometheus.io
After=network.target
[Service]
EnvironmentFile=-/etc/default/prometheus
User=prometheus
ExecStart=/usr/bin/prometheus \
--web.console.libraries=/usr/share/prometheus/console_libraries \
--web.console.templates=/usr/share/prometheus/consoles \
$PROMETHEUS_OPTS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target