blob: 7eca1ca2ec83be83269b6c3ab33ac5e3465d94a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
pkgname=mimir
pkgver=2.11.0
pkgrel=1
pkgdesc="Horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus"
options="net"
url="https://github.com/grafana/mimir"
license="AGPL-3.0-or-later"
# others: needs 64 bits
arch="x86_64 aarch64 ppc64le riscv64"
makedepends="go bash"
checkdepends="tzdata"
subpackages="$pkgname-openrc"
install="mimir.pre-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/grafana/mimir/archive/refs/tags/mimir-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
$pkgname.yaml
"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
prepare() {
default_prepare
mkdir build
}
build() {
go build -v \
-o build \
./cmd/...
}
check() {
# not stable test for fluent-bit
# tsdb/index fails on aarch64
# shell check suggests to break it
# shellcheck disable=SC2046
# TestHelp fails because we build on a different path
TZ=UTC GOGC=10 go test -p=2 -skip 'fluent-bit|stores/tsdb/index|TestAlertmanager_StateReplication|TestHelp|TestConfigDescriptorIsUpToDate|TestIngester_compactBlocksToReduceInMemorySeries_Concurrency' ./...
}
package() {
mkdir -p "$pkgdir"/etc/$pkgname
install -Dm0755 build/* -t "$pkgdir"/usr/bin
install -Dm644 "$srcdir"/$pkgname.yaml "$pkgdir"/etc/mimir/mimir.yaml
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}
sha512sums="
4bea41a1a915904a56a68d5dcb9a24ce9af2ba812f850f5c7b0de1e92a674f9cc2de9f1bd28c84dfbd98989422006b05dbec77f362a409c5411f28a30025c9ec mimir-2.11.0.tar.gz
7e0121d8d464d202ed8689d9831c2a86740ae4cf0da12f7e723bd90895ff7b3f33a1355dfe6a443e7e5d2a87b159a26b3eef937463a576205bd78dbdb8c01460 mimir.initd
246f0c875828b819bd8f11d49afecd63480626f4d96d95a1431c2d755e356ebe6109b7e0d34262f668c783609f7781cace26a73bfbe660b6626854f0d34fba72 mimir.confd
f4e1ef6f40faaeaa2a46112c023596c94b4d910274b257f5cb19198cfc6c068c3b6fe762b949354547948449a952a5ed1fb93b3cb090e69459cd5b780b4b3d44 mimir.yaml
"
|