This is an update for prometheus to 2.24.1. The react UI that needs to be built for prometheus is an extra distfile. Building the react UI is a nightmare and did not work on OpenBSD last time I tried.
The tsdb tool got merged into promtool so one less binary to install. I run this on my collector since this morning and it seems to work. -- :wq Claudio Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/prometheus/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile 20 Nov 2020 21:17:21 -0000 1.9 +++ Makefile 13 Feb 2021 10:35:38 -0000 @@ -2,10 +2,10 @@ COMMENT = systems monitoring and alerting toolkit +V = 2.24.1 GH_ACCOUNT = prometheus GH_PROJECT = prometheus -GH_TAGNAME = v2.13.1 -REVISION = 0 +GH_TAGNAME = v${V} CATEGORIES = sysutils @@ -13,9 +13,14 @@ HOMEPAGE = http://prometheus.io/ MAINTAINER = Claudio Jeker <clau...@openbsd.org> +DISTFILES += prometheus-${V}.tar.gz \ + prometheus-reactui-${V}.tar.gz:0 + # Apache 2.0 PERMIT_PACKAGE = Yes +MASTER_SITES0 = https://www.zyd.ch/distfiles/ + WANTLIB = c pthread BUILD_DEPENDS = devel/promu @@ -38,7 +43,6 @@ do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/prometheus/console_libraries ${INSTALL_PROGRAM} ${WRKSRC}/prometheus ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/promtool ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/tsdb/tsdb ${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/consoles/* \ ${PREFIX}/share/examples/prometheus/consoles/ ${INSTALL_DATA} ${WRKSRC}/console_libraries/{menu.lib,prom.lib} \ @@ -47,6 +51,7 @@ do-install: ${PREFIX}/share/examples/prometheus/prometheus.yml ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/prometheus/ ${INSTALL_DATA} ${WRKSRC}/NOTICE ${PREFIX}/share/doc/prometheus/ + ${INSTALL_DATA} ${WRKSRC}/npm_licenses.tar.bz2 ${PREFIX}/share/doc/prometheus/ do-test: cd ${WRKSRC} && ${MAKE_ENV} ${MAKE_PROGRAM} test Index: distinfo =================================================================== RCS file: /cvs/ports/sysutils/prometheus/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 29 Oct 2019 12:37:54 -0000 1.4 +++ distinfo 13 Feb 2021 10:38:39 -0000 @@ -1,2 +1,4 @@ -SHA256 (prometheus-2.13.1.tar.gz) = ViTBZyhnk2LPpGt27B0kcBgQaYnyJg01WDxCxJxRQrU= -SIZE (prometheus-2.13.1.tar.gz) = 15249891 +SHA256 (prometheus-2.24.1.tar.gz) = ngi6zehpxsS2ip40xwdLgSvhORsz0DPTBypeGtLevYc= +SHA256 (prometheus-reactui-2.24.1.tar.gz) = ex9rOmybKeT9/eyP67WxU44asPen5ZL/Yh4hKxUGX/o= +SIZE (prometheus-2.24.1.tar.gz) = 14633738 +SIZE (prometheus-reactui-2.24.1.tar.gz) = 1897337 Index: patches/patch-Makefile =================================================================== RCS file: patches/patch-Makefile diff -N patches/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-Makefile 13 Feb 2021 10:13:25 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +The react build is provided via extra distfile + +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -38,7 +38,7 @@ $(REACT_APP_OUTPUT_DIR): $(REACT_APP_NODE_MODULES_PATH + @$(REACT_APP_BUILD_SCRIPT) + + .PHONY: assets +-assets: $(REACT_APP_OUTPUT_DIR) ++assets: + @echo ">> writing assets" + # Un-setting GOOS and GOARCH here because the generated Go code is always the same, + # but the cached object code is incompatible between architectures and OSes (which Index: patches/patch-Makefile_common =================================================================== RCS file: /cvs/ports/sysutils/prometheus/patches/patch-Makefile_common,v retrieving revision 1.2 diff -u -p -r1.2 patch-Makefile_common --- patches/patch-Makefile_common 16 Oct 2019 06:47:12 -0000 1.2 +++ patches/patch-Makefile_common 20 Jan 2021 12:28:01 -0000 @@ -5,7 +5,7 @@ Don't fetch promu form internet. This is Index: Makefile.common --- Makefile.common.orig +++ Makefile.common -@@ -236,11 +236,7 @@ common-docker-manifest: +@@ -261,11 +261,7 @@ common-docker-manifest: promu: $(PROMU) $(PROMU): Index: patches/patch-_promu_yml =================================================================== RCS file: /cvs/ports/sysutils/prometheus/patches/patch-_promu_yml,v retrieving revision 1.1 diff -u -p -r1.1 patch-_promu_yml --- patches/patch-_promu_yml 16 Oct 2019 06:47:12 -0000 1.1 +++ patches/patch-_promu_yml 20 Jan 2021 12:03:58 -0000 @@ -5,7 +5,7 @@ Don't include user and hostname into bui Index: .promu.yml --- .promu.yml.orig +++ .promu.yml -@@ -17,7 +17,7 @@ build: +@@ -15,7 +15,7 @@ build: -X github.com/prometheus/common/version.Version={{.Version}} -X github.com/prometheus/common/version.Revision={{.Revision}} -X github.com/prometheus/common/version.Branch={{.Branch}} Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/sysutils/prometheus/pkg/PLIST,v retrieving revision 1.3 diff -u -p -r1.3 PLIST --- pkg/PLIST 16 Oct 2019 06:47:12 -0000 1.3 +++ pkg/PLIST 13 Feb 2021 10:42:24 -0000 @@ -5,10 +5,10 @@ @rcscript ${RCDIR}/prometheus @bin bin/prometheus @bin bin/promtool -@bin bin/tsdb share/doc/prometheus/ share/doc/prometheus/LICENSE share/doc/prometheus/NOTICE +share/doc/prometheus/npm_licenses.tar.bz2 share/examples/prometheus/ share/examples/prometheus/console_libraries/ share/examples/prometheus/console_libraries/menu.lib