aboutsummaryrefslogtreecommitdiffstats
path: root/community/prometheus/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/prometheus/APKBUILD')
-rw-r--r--community/prometheus/APKBUILD57
1 files changed, 27 insertions, 30 deletions
diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD
index b3e9b226eef..83fd7c58e0c 100644
--- a/community/prometheus/APKBUILD
+++ b/community/prometheus/APKBUILD
@@ -1,15 +1,14 @@
-# Maintainer: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
pkgname=prometheus
-pkgver=2.30.0
-pkgrel=0
+pkgver=2.51.1
+pkgrel=1
pkgdesc="The Prometheus monitoring system and time series database"
url="https://github.com/prometheus/prometheus"
-# mips64 and riscv64 blocked by nodejs -> yarn
-arch="all !mips64 !riscv64"
+arch="all !riscv64" # npm
license="Apache-2.0"
-options="!check" # Broken by integrations we don't care about
install="prometheus.pre-install"
-makedepends="go npm yarn bash"
+makedepends="go npm bash"
+options="!check"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz
prometheus.initd
@@ -17,48 +16,46 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archiv
"
# secfixes:
+# 2.40.4-r1:
+# - CVE-2022-46146
# 2.27.1-r0:
# - CVE-2021-29622
-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
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
+build() {
GOLDFLAGS="-X github.com/prometheus/common/version.Version=$pkgver
- -X github.com/prometheus/common/version.Revision=AlpineLinux
- -X github.com/prometheus/common/version.Branch=master
- -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME
- -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
+ -X github.com/prometheus/common/version.Revision=AlpineLinux
+ -X github.com/prometheus/common/version.Branch=master
+ -X github.com/prometheus/common/version.BuildUser=$USER@$(hostname)
+ -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
"
-
if [ -n "$LDFLAGS" ]; then
# LDFLAGS (and only LDFLAGS) should be passed to -extldflags.
- GOLDFLAGS="$GOLDFLAGS -extldflags $LDFLAGS"
+ GOLDFLAGS="$GOLDFLAGS -extldflags '$LDFLAGS'"
fi
- go mod vendor
+ # set -j1 to run things in the correct order in makefile
+ # actual go building is still parallel
+ make -j1 assets-compress
+
go build \
-trimpath \
- -mod=vendor \
+ -mod=readonly \
-ldflags "$GOLDFLAGS" \
-tags netgo,builtinassets \
./cmd/prometheus
go build \
-trimpath \
- -mod=vendor \
+ -mod=readonly \
-ldflags "$GOLDFLAGS" \
./cmd/promtool
}
check() {
- go test ./...
+ make test
}
package() {
@@ -88,7 +85,7 @@ package() {
}
sha512sums="
-db9f0a1a04e62d2a24c7ef5c2fb84baf0ca8446062bb04d777c3d9b5d0cc76198e12f1d3c5c974b2688790db8b3a487fa6d94e9c91f2280fe06d1a3e741e51b3 prometheus-2.30.0.tar.gz
-eb0cebe41782f90079f367832f7c9efa18b99df410506b65b2e0b11fa05f8f2956f68c0fca836664729d50b85fc969a96e99e1d32012fe3c655cddc0b16a7561 prometheus.initd
-24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd
+cf64ce4e226c80a7b788f6a673e8c645581168446776d8ea296cae52ff4b15ac9dc98cdcae00f37f4d8ed290da5c87cea15e41818ee78af07b086fd9ad1b2895 prometheus-2.51.1.tar.gz
+f4c222ba836f65d874fb30c62c7a55c27c4cedd6c473e39808a84bb7b4353c79c6ff3cefd3c4cf2ce966ce3a1234db3343cba397c83328ccc4e25072f683fcf5 prometheus.initd
+2e47a19e313cbf64f7a57a15de4bea959f5b1c307ef0c2b7f6b254f4abc5504b6ae31b02a1e11487fd82bc975f1cd8e1f3733393823b007f375acbdaf17af8ea prometheus.confd
"