~dricottone/huttese-apk

fd060ac459ab4a2c8803b42e42a33312c2fcfc8b — Drew DeVault 4 years ago 6121cf2
prometheus: drop package

This is now in upstream Alpine
4 files changed, 0 insertions(+), 110 deletions(-)

D sr.ht/prometheus/APKBUILD
D sr.ht/prometheus/prometheus.confd
D sr.ht/prometheus/prometheus.initd
D sr.ht/prometheus/prometheus.pre-install
D sr.ht/prometheus/APKBUILD => sr.ht/prometheus/APKBUILD +0 -75
@@ 1,75 0,0 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=prometheus
pkgver=2.17.1
pkgrel=0
pkgdesc="The Prometheus monitoring system and time series database"
url="https://github.com/prometheus/prometheus"
arch="all"
license="Apache-2.0"
install="prometheus.pre-install"
makedepends="go yarn bash"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz
	prometheus.confd
	prometheus.initd
"
subpackages="$pkgname-openrc"
options="!check" # Broken by integrations we don't care about

build() {
	cd web/ui/react-app
	yarn --frozen-lockfile
	yarn lint
	cd ../../../
	./scripts/build_react_app.sh
	cd web/ui
	go generate -x -v
	cd ../../
	gofmt -w ./web/ui

	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		-tags netgo,builtinassets \
		./cmd/prometheus
	go build \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS" \
		./cmd/promtool
}

check() {
	go test ./...
}

package() {
	install -Dm755 prometheus "$pkgdir"/usr/bin/prometheus
	install -Dm755 promtool "$pkgdir"/usr/bin/promtool

	install -Dm644 "$srcdir"/prometheus.confd \
		"$pkgdir"/etc/conf.d/prometheus
	install -Dm755 "$srcdir"/prometheus.initd \
		"$pkgdir"/etc/init.d/prometheus
	install -dm644 "$pkgdir"/var/lib/prometheus/data

	install -Dm644 -t "$pkgdir"/etc/prometheus \
		documentation/examples/prometheus.yml

	mkdir -p "$pkgdir"/etc/prometheus/console_libraries
	for file in console_libraries/*
	do
		install -Dm644 -t "$pkgdir"/etc/prometheus/console_libraries/ "$file"
	done

	mkdir -p "$pkgdir"/etc/prometheus/consoles
	for file in consoles/*
	do
		install -Dm644 -t "$pkgdir"/etc/prometheus/consoles/ "$file"
	done
}

sha512sums="7e8a72ca9917ea9997b909cd25a4c4b730d0458fe525cb86df543e7b06a5c6cd242ffeb0c7ba72c50f84f819df4112228f6c56cfe583022a34513e2a7b77a8dd  prometheus-2.17.1.tar.gz
24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239  prometheus.confd
a263dbe28c9fa270a6977a3cf2e553f524414e2589e1ca3fd2cb92263c6e25b4dc64a7c1f86feccda4b21a152b9a67dd74a20bdfc9b79157e2a6cf956d20f70d  prometheus.initd"

D sr.ht/prometheus/prometheus.confd => sr.ht/prometheus/prometheus.confd +0 -6
@@ 1,6 0,0 @@
prometheus_config_file=/etc/prometheus/prometheus.yml
prometheus_storage_path=/var/lib/prometheus/data
prometheus_retention_time=15d

output_log=/var/log/prometheus.log
error_log=/var/log/prometheus.log

D sr.ht/prometheus/prometheus.initd => sr.ht/prometheus/prometheus.initd +0 -25
@@ 1,25 0,0 @@
#!/sbin/openrc-run
name="prometheus"
description="prometheus monitoring system & time series database"
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"
command_user="prometheus:prometheus"
pidfile="/run/${RC_SVCNAME}.pid"
extra_started_commands="reload"

start_pre() {
	[ -n "$output_log" ] && checkpath -f "$output_log" \
		-m 644 -o prometheus:prometheus
	[ -n "$error_log" ] && checkpath -f "$error_log" \
		-m 644 -o prometheus:prometheus
	checkpath -d "$prometheus_storage_path" -m 755 -o prometheus:prometheus
}

reload() {
	ebegin "Reloading $RC_SERVNAME"
	start-stop-daemon --signal HUP --exec "$command" --pidfile "$pidfile"
	eend $?
}

D sr.ht/prometheus/prometheus.pre-install => sr.ht/prometheus/prometheus.pre-install +0 -4
@@ 1,4 0,0 @@
#!/bin/sh
grep '^prometheus:' /etc/group >/dev/null || addgroup -S prometheus 2>/dev/null
grep '^prometheus:' /etc/passwd >/dev/null || adduser -SDh/var/lib/prometheus \
	-s/sbin/nologin -Gprometheus -gprometheus prometheus prometheus 2>/dev/null