git: 390dfbf1b63c - main - www/grafana: Update 10.4.5 → 11.4.0

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 22 Dec 2024 17:14:45 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=390dfbf1b63c6021fba42d866a2b8c7d8f872180

commit 390dfbf1b63c6021fba42d866a2b8c7d8f872180
Author:     Boris Korzun <drtr0jan@yandex.ru>
AuthorDate: 2024-12-22 17:12:25 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-12-22 17:12:25 +0000

    www/grafana: Update 10.4.5 → 11.4.0
    
    What's new:
    * https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v11-4/
    * https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v11-3/
    * https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v11-2/
    * https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v11-1/
    * https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v11-0/
    
    Changelogs:
    * https://github.com/grafana/grafana/releases/tag/v11.4.0
    * https://github.com/grafana/grafana/releases/tag/v11.3.0
    * https://github.com/grafana/grafana/releases/tag/v11.2.0
    * https://github.com/grafana/grafana/releases/tag/v11.1.0
    * https://github.com/grafana/grafana/releases/tag/v11.0.0
    
    While here split too long lines in Makefile.
    
    PR:     281851
---
 www/grafana/Makefile  | 59 +++++++++++++++++++++++++++++++++++----------------
 www/grafana/distinfo  | 40 ++++++++++++++++++++++++++--------
 www/grafana/pkg-plist |  6 ------
 3 files changed, 72 insertions(+), 33 deletions(-)

diff --git a/www/grafana/Makefile b/www/grafana/Makefile
index 878ccebd7678..dc835ffa1b26 100644
--- a/www/grafana/Makefile
+++ b/www/grafana/Makefile
@@ -1,13 +1,24 @@
 PORTNAME=	grafana
 DISTVERSIONPREFIX=	v
-DISTVERSION=	10.4.5
-PORTREVISION=	1
+DISTVERSION=	11.4.0
 CATEGORIES=	www
-MASTER_SITES=	https://dl.grafana.com/oss/release/:public \
+MASTER_SITES=	https://dl.grafana.com/oss/release/ \
 		https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod
-DISTFILES=	grafana-${DISTVERSION}.linux-amd64${EXTRACT_SUFX}:public \
+DISTFILES=	grafana-${DISTVERSION}.linux-amd64${EXTRACT_SUFX} \
 		go.mod:gomod \
+		go.work:gomod \
+		apps/playlist/go.mod:gomod \
+		pkg/aggregator/go.mod:gomod \
+		pkg/apimachinery/go.mod:gomod \
+		pkg/apiserver/go.mod:gomod \
+		pkg/build/go.mod:gomod \
+		pkg/build/wire/go.mod:gomod \
+		pkg/promlib/go.mod:gomod \
+		pkg/semconv/go.mod:gomod \
+		pkg/storage/unified/apistore/go.mod:gomod \
+		pkg/storage/unified/resource/go.mod:gomod \
 		pkg/util/xorm/go.mod:gomod
+EXTRACT_ONLY=	${DISTFILES:N*.mod\:*:N*.mod:C/:.*//:Ngo.work}
 
 MAINTAINER=	drtr0jan@yandex.ru
 COMMENT=	Dashboard and graph editor for multiple data stores
@@ -19,17 +30,17 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 ONLY_FOR_ARCHS=	aarch64 amd64 i386 riscv64
 
-BUILD_DEPENDS=	wire:devel/go-wire
 RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss
 
-USES=		cpe go:1.21,modules
+USES=		cpe go:1.23,modules
 
 USE_GITHUB=	yes
 
 USE_RC_SUBR=	grafana
-TAG=		17cbd42
+TAG=		b587018
 
 GO_MODULE=	github.com/grafana/grafana
+GO_MOD_DIST=	github
 GO_TARGET=	./pkg/cmd/grafana \
 		./pkg/cmd/grafana-server \
 		./pkg/cmd/grafana-cli
@@ -44,6 +55,8 @@ SUB_LIST=	GRAFANA_USER=${GRAFANA_USER} \
 		GRAFANA_LOGDIR=${GRAFANA_LOGDIR} \
 		GRAFANA_PLUGINDIR=${GRAFANA_PLUGINDIR} \
 		GRAFANA_PROVISIONINGDIR=${GRAFANA_PROVISIONINGDIR}
+# Disable some master port targets
+TARGET_ORDER_OVERRIDE=	-1:go-post-extract
 
 GRAFANA_USER?=	grafana
 GRAFANA_GROUP?=	grafana
@@ -59,6 +72,14 @@ GRAFANA_LOGDIR?=		/var/log/${PORTNAME}
 GRAFANA_PLUGINDIR?=		${GRAFANA_DATADIR}/plugins
 GRAFANA_PROVISIONINGDIR?=	${ETCDIR}/provisioning
 
+post-extract:
+	@${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies";
+	@(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} \
+		GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e)
+	@${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies";
+	@(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} \
+		GOPROXY=${GO_MODCACHE} ${GO_CMD} work vendor -e)
+
 post-patch:
 	@${REINPLACE_CMD} \
 		-e 's|;data = /var/lib/grafana|data = ${GRAFANA_DATADIR}|g' \
@@ -70,25 +91,27 @@ post-patch:
 pre-build:
 	@(cd ${GO_WRKSRC}; \
 	${ECHO_MSG} "===>  Generating wire_gen.go"; \
-	${SETENV} ${MAKE_ENV} ${GO_ENV} wire gen -tags "oss" ./pkg/server )
+	${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} run \
+		./pkg/build/wire/cmd/wire/main.go gen -tags "oss" ./pkg/server)
 
 post-install:
 	${MKDIR} ${STAGEDIR}${GRAFANA_HOMEDIR}
 	${MKDIR} ${STAGEDIR}${GRAFANA_HOMEDIR}/conf
 	${MKDIR} ${STAGEDIR}${GRAFANA_DATADIR}
 	${MKDIR} ${STAGEDIR}${GRAFANA_PLUGINDIR}
-.for dir in access-control alerting dashboards datasources notifiers plugins
+.for dir in access-control alerting dashboards datasources plugins
 	${MKDIR} ${STAGEDIR}${GRAFANA_PROVISIONINGDIR}/${dir}
 .endfor
 	${MKDIR} ${STAGEDIR}${GRAFANA_LOGDIR}
-	( cd ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} && ${COPYTREE_SHARE} public ${STAGEDIR}${GRAFANA_HOMEDIR} )
-.for dir in input-datasource
-	${MKDIR} ${STAGEDIR}${GRAFANA_HOMEDIR}/plugins-bundled/internal/${dir}
-	( cd ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}/plugins-bundled/internal/${dir}/dist && ${COPYTREE_SHARE} . ${STAGEDIR}${GRAFANA_HOMEDIR}/plugins-bundled/internal/${dir} )
-.endfor
-	${INSTALL_DATA} ${WRKSRC}/conf/defaults.ini ${STAGEDIR}${GRAFANA_HOMEDIR}/conf/defaults.ini
-	${INSTALL_DATA} ${WRKSRC}/conf/sample.ini ${STAGEDIR}${ETCDIR}/grafana.ini.sample
-	${INSTALL_DATA} ${WRKSRC}/conf/ldap.toml ${STAGEDIR}${ETCDIR}/ldap.toml.sample
-	${FIND} ${STAGEDIR}${DATADIR}/public -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
+	(cd ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} \
+		&& ${COPYTREE_SHARE} public ${STAGEDIR}${GRAFANA_HOMEDIR})
+	${INSTALL_DATA} ${WRKSRC}/conf/defaults.ini \
+		${STAGEDIR}${GRAFANA_HOMEDIR}/conf/defaults.ini
+	${INSTALL_DATA} ${WRKSRC}/conf/sample.ini \
+		${STAGEDIR}${ETCDIR}/grafana.ini.sample
+	${INSTALL_DATA} ${WRKSRC}/conf/ldap.toml \
+		${STAGEDIR}${ETCDIR}/ldap.toml.sample
+	${FIND} ${STAGEDIR}${DATADIR}/public -type f | \
+		${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
 
 .include <bsd.port.mk>
diff --git a/www/grafana/distinfo b/www/grafana/distinfo
index 3584fd154232..197fd525db30 100644
--- a/www/grafana/distinfo
+++ b/www/grafana/distinfo
@@ -1,9 +1,31 @@
-TIMESTAMP = 1720812688
-SHA256 (go/www_grafana/grafana-grafana-v10.4.5_GH0/grafana-10.4.5.linux-amd64.tar.gz) = 20089e2fb313df92249c6892d00577318e00defd43a31e5ddcefda9f02b4914e
-SIZE (go/www_grafana/grafana-grafana-v10.4.5_GH0/grafana-10.4.5.linux-amd64.tar.gz) = 119510444
-SHA256 (go/www_grafana/grafana-grafana-v10.4.5_GH0/go.mod) = 4f295efaef23d3e1d3e72fce4f826bf1f7cafca84d82778d05f99c179ae9714c
-SIZE (go/www_grafana/grafana-grafana-v10.4.5_GH0/go.mod) = 30926
-SHA256 (go/www_grafana/grafana-grafana-v10.4.5_GH0/pkg/util/xorm/go.mod) = 3d10f62daeec5bdd173ecade9841919787ff706fb8f286c90a423cd82a44ac5f
-SIZE (go/www_grafana/grafana-grafana-v10.4.5_GH0/pkg/util/xorm/go.mod) = 184
-SHA256 (go/www_grafana/grafana-grafana-v10.4.5_GH0/grafana-grafana-v10.4.5_GH0.tar.gz) = 864ca27ccf7c2fcd19a9cc5f6eafa32a44df9cf54b50046c4a1306884d4b9196
-SIZE (go/www_grafana/grafana-grafana-v10.4.5_GH0/grafana-grafana-v10.4.5_GH0.tar.gz) = 29162880
+TIMESTAMP = 1733432116
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/grafana-11.4.0.linux-amd64.tar.gz) = 3550c73f4455435642976e82cc89aa354f076a75b766a408781107f4f5d4744c
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/grafana-11.4.0.linux-amd64.tar.gz) = 132819399
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/go.mod) = 1e3af2adb03612b98d67b3ba45c64ab53603e73b1a62abab9124a8d00560cc42
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/go.mod) = 31518
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/go.work) = 2e3d410e51ed1eaa0d96f01ecc297b01ef88b2fcfde32bc7aac06bf657ea3366
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/go.work) = 986
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/apps/playlist/go.mod) = 6740589796c3cac1a765d7013aa9734357c2446900b77dfa4cca5e6b5da1bd36
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/apps/playlist/go.mod) = 1485
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/aggregator/go.mod) = 39574ebd7fbd1cbe05a98006a2d47598ec530c7a771ef451d77d27ce3b74bfc7
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/aggregator/go.mod) = 8188
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/apimachinery/go.mod) = 0d42d7150cd806d4e5d8af093deb932aa40048d23e042c77809850336cf4ea87
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/apimachinery/go.mod) = 2324
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/apiserver/go.mod) = 0303d70af8d9bc60ab2cd3b971676d8e14abd7430b4a148b4a360e7c82fce345
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/apiserver/go.mod) = 4692
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/build/go.mod) = 03478623b24fe0f074b35173798741851575eb5fa98447954f2e090e09348709
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/build/go.mod) = 7628
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/build/wire/go.mod) = 1fcb6b958df4f7522519deaeb38e94706b126ee9f2b68a4cf7c84ef34f56c8a2
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/build/wire/go.mod) = 329
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/promlib/go.mod) = 67006ed88d6fb7ff339b5d96b521773cba02925e713d0e79aae346cc997d88ad
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/promlib/go.mod) = 6919
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/semconv/go.mod) = 0b51a8e6324569216cf7b45e937f9bb8b6a27ebddf32fcf5ddf082ba682d6248
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/semconv/go.mod) = 269
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/storage/unified/apistore/go.mod) = 645a6bdafac17f30d4d84b2e9bec8dbf5ef6174e7b1b32cd789a4315b822d51b
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/storage/unified/apistore/go.mod) = 5393
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/storage/unified/resource/go.mod) = f95741501ff65a2d53f4e579e5410961d4db6589a882cdc4f2f80dafe64be937
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/storage/unified/resource/go.mod) = 4231
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/util/xorm/go.mod) = 4f68d456ac4893fd6111b282fbc59a677b22574df085a797dedb37b475f7aa92
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/pkg/util/xorm/go.mod) = 610
+SHA256 (go/www_grafana/grafana-grafana-v11.4.0_GH0/grafana-grafana-v11.4.0_GH0.tar.gz) = c3a63aade2a86aa360c9b46f4963e60673fc51bb6c54a088d44dfab5a8fb465e
+SIZE (go/www_grafana/grafana-grafana-v11.4.0_GH0/grafana-grafana-v11.4.0_GH0.tar.gz) = 34329942
diff --git a/www/grafana/pkg-plist b/www/grafana/pkg-plist
index 9f0792edc8fe..c204406800cc 100644
--- a/www/grafana/pkg-plist
+++ b/www/grafana/pkg-plist
@@ -4,11 +4,6 @@ bin/grafana-server
 @sample %%ETCDIR%%/grafana.ini.sample
 @sample %%ETCDIR%%/ldap.toml.sample
 %%DATADIR%%/conf/defaults.ini
-%%DATADIR%%/plugins-bundled/internal/input-datasource/README.md
-%%DATADIR%%/plugins-bundled/internal/input-datasource/img/input.svg
-%%DATADIR%%/plugins-bundled/internal/input-datasource/module.js
-%%DATADIR%%/plugins-bundled/internal/input-datasource/module.js.map
-%%DATADIR%%/plugins-bundled/internal/input-datasource/plugin.json
 @owner %%GRAFANA_USER%%
 @group %%GRAFANA_GROUP%%
 @mode 750
@@ -19,7 +14,6 @@ bin/grafana-server
 @dir %%GRAFANA_PROVISIONINGDIR%%/alerting
 @dir %%GRAFANA_PROVISIONINGDIR%%/dashboards
 @dir %%GRAFANA_PROVISIONINGDIR%%/datasources
-@dir %%GRAFANA_PROVISIONINGDIR%%/notifiers
 @dir %%GRAFANA_PROVISIONINGDIR%%/plugins
 @dir %%GRAFANA_LOGDIR%%
 @mode