Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2022 19:24:57 GMT
From:      Dmitri Goutnik <dmgk@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7cc08e77479c - main - net-mgmt/prometheus2: Update to 2.36.0
Message-ID:  <202205311924.24VJOvXX099132@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dmgk:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7cc08e77479cf5886a12ca7ecd7fce601b160773

commit 7cc08e77479cf5886a12ca7ecd7fce601b160773
Author:     David O'Rourke <dor.bsd@xm0.uk>
AuthorDate: 2022-05-31 19:02:20 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-31 19:06:46 +0000

    net-mgmt/prometheus2: Update to 2.36.0
    
    Changes:        https://github.com/prometheus/prometheus/releases
    
    PR:             264370
    
    There are a lot of changes since 2.33.5 which can be viewed at
    https://github.com/prometheus/prometheus/releases, but the main change
    is that TLS 1.0 and 1.1 are now disabled by default. They can be
    re-enabled via the tls_config section of the Prometheus configuration as
    documented at
    https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tls_config.
    
    Certificates using SHA-1 hash functions are also rejected, this support
    can be re-enabled (for now) via some Go debug environment variables:
    https://go.dev/doc/go1.18#sha1
---
 net-mgmt/prometheus2/Makefile    | 20 ++++++++++++--------
 net-mgmt/prometheus2/distinfo    | 14 +++++++-------
 net-mgmt/prometheus2/pkg-message |  9 +++++++++
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/net-mgmt/prometheus2/Makefile b/net-mgmt/prometheus2/Makefile
index a0eb2812bbe0..ad44a5a9f18c 100644
--- a/net-mgmt/prometheus2/Makefile
+++ b/net-mgmt/prometheus2/Makefile
@@ -1,9 +1,10 @@
 PORTNAME=	prometheus
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.33.5
+DISTVERSION=	2.36.0
 CATEGORIES=	net-mgmt
-MASTER_SITES=	https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod
-DISTFILES=	go.mod:gomod
+MASTER_SITES=	https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod \
+		https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${DISTVERSIONFULL}/:ui
+DISTFILES=	go.mod:gomod ${PORTNAME}-web-ui-${DISTVERSION}.tar.gz:ui
 
 MAINTAINER=	dor.bsd@xm0.uk
 COMMENT=	Systems monitoring and alerting toolkit
@@ -11,10 +12,11 @@ COMMENT=	Systems monitoring and alerting toolkit
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+PATCH_DEPENDS=	bash:shells/bash
+
 USES=		cpe gmake go:modules
 
 USE_GITHUB=	yes
-GH_TUPLE=	ports-assets:net-mgmt_prometheus2:${DISTVERSIONFULL}:assets
 USE_RC_SUBR=	prometheus
 
 GO_MODULE=	github.com/prometheus/prometheus
@@ -58,8 +60,10 @@ SOURCE_DATE_EPOCH_CMD=	date -ur $$(${GREP} TIMESTAMP ${DISTINFO_FILE} | ${SED} -
 			'+%Y%m%d-%T'
 
 post-patch:
-	@${LN} -s ${WRKSRC_assets}/web/ui/assets_vfsdata.go \
-		${WRKSRC}/web/ui/assets_vfadata.go
+	@${RM} -rf ${WRKSRC}/web/ui/static
+	# A symlink isn't good enough here, copy the entire static directory over
+	@${CP} -a ${WRKDIR}/static ${WRKSRC}/web/ui/static
+	@( cd ${WRKSRC} && ${WRKSRC}/scripts/compress_assets.sh )
 
 post-install:
 	${MKDIR} ${STAGEDIR}${DESTDIR}${PROMETHEUS_CONSOLES_DIR}
@@ -73,8 +77,8 @@ post-install:
 		&& ${COPYTREE_SHARE} . ${STAGEDIR}${PROMETHEUS_CONSOLES_DIR} )
 
 post-install-DOCS-on:
-	${MKDIR} ${STAGEDIR}${DOCSDIR}
-	( cd ${WRKSRC}/docs \
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@( cd ${WRKSRC}/docs \
 		&& ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} )
 
 .include <bsd.port.post.mk>
diff --git a/net-mgmt/prometheus2/distinfo b/net-mgmt/prometheus2/distinfo
index 642d88bd0068..1053cddcda8d 100644
--- a/net-mgmt/prometheus2/distinfo
+++ b/net-mgmt/prometheus2/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1653749506
-SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/go.mod) = 5ea7655ecbe5065b78619bac7277d2598e3301387a65cbf210a686b7955e0298
-SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/go.mod) = 4541
-SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/prometheus-prometheus-v2.33.5_GH0.tar.gz) = a385dab190fd4bf973a9950d6c53fa9d2b92c55ea2225a53305fe546749ddc0d
-SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/prometheus-prometheus-v2.33.5_GH0.tar.gz) = 5858953
-SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/ports-assets-net-mgmt_prometheus2-v2.33.5_GH0.tar.gz) = af7d729e4b69d7e90d70d9e64c31ee850616417318fc1168999ef0320988a550
-SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.33.5_GH0/ports-assets-net-mgmt_prometheus2-v2.33.5_GH0.tar.gz) = 6047050
+TIMESTAMP = 1653992116
+SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/go.mod) = 74e49f0f2cf67d6c9dbcb3626cb9fa12ee4b95a977f7c5763851ba5fb3f709bb
+SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/go.mod) = 9168
+SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/prometheus-web-ui-2.36.0.tar.gz) = 0be369da6a80610d5152a626aa5d1eb9d3c3fd2a569b174c40b7bce527a7200e
+SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/prometheus-web-ui-2.36.0.tar.gz) = 4387594
+SHA256 (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/prometheus-prometheus-v2.36.0_GH0.tar.gz) = c7b3b17edc22f93c4573b42c7c892123036b518f6058a0a97637b4190f74bc3f
+SIZE (go/net-mgmt_prometheus2/prometheus-prometheus-v2.36.0_GH0/prometheus-prometheus-v2.36.0_GH0.tar.gz) = 6019777
diff --git a/net-mgmt/prometheus2/pkg-message b/net-mgmt/prometheus2/pkg-message
index 10ae0129b88d..4fed5e509efa 100644
--- a/net-mgmt/prometheus2/pkg-message
+++ b/net-mgmt/prometheus2/pkg-message
@@ -1,4 +1,13 @@
 [
+{
+  message: <<EOF
+TLS 1.0 and 1.1 disabled by default client-side.
+Prometheus users can override this with the min_version parameter of tls_config.
+Certificates signed with the SHA-1 hash function are rejected. This doesn't apply to self-signed root certificates.
+EOF
+  maximum_version: "2.36.0"
+  type: upgrade
+}
 {
   message: <<EOF
 promtool: Changed rule numbering from 0-based to 1-based when reporting rule errors.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205311924.24VJOvXX099132>