Bug 258006 - www/grafana8: Update to 8.1.2
Summary: www/grafana8: Update to 8.1.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/grafana/grafana/bl...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-23 13:42 UTC by Boris Korzun
Modified: 2021-08-23 20:30 UTC (History)
1 user (show)

See Also:
drtr0jan: maintainer-feedback+
drtr0jan: merge-quarterly?


Attachments
grafana8.diff (6.08 KB, patch)
2021-08-23 13:42 UTC, Boris Korzun
drtr0jan: maintainer-approval+
Details | Diff
grafana8.diff (6.38 KB, patch)
2021-08-23 17:40 UTC, Boris Korzun
drtr0jan: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Nuno Teixeira freebsd_committer 2021-08-23 15:32:57 UTC
Hello,

1. 'portclippy -C':
---
FATAL: Makefile: DISTVERSIONPREFIX appears out-of-order.
FATAL: Makefile: order must be PORTNAME/PORTVERSION/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX/PORTREVISION/PORTEPOCH/CATEGORIES/MASTER_SITES/MASTER_SITE_SUBDIR/PROJECTHOST/PKGNAMEPREFIX/PKGNAMESUFFIX/DISTNAME/EXTRACT_SUFX/DISTFILES(_\w+)?/DIST_SUBDIR/EXTRACT_ONLY.
---
it should be:
---
PORTNAME=       grafana
DISTVERSIONPREFIX=      v
DISTVERSION=    8.1.2
---

2. PORTREVISION must be set to zero since this port was updated (preference just remove "PORTREVISION=  1"

3. 'portclippy Makefile' sugests correction variables block:
---
# PORTNAME block
PORTNAME
+DISTVERSIONPREFIX
DISTVERSION
-DISTVERSIONPREFIX
PORTREVISION
CATEGORIES
MASTER_SITES
PKGNAMESUFFIX
DISTFILES

# Maintainer block
MAINTAINER
COMMENT

# License block
LICENSE
LICENSE_FILE

# BROKEN/IGNORE/DEPRECATED messages
ONLY_FOR_ARCHS

# Dependencies
RUN_DEPENDS

# USES block
USES
USE_GITHUB
USE_RC_SUBR

-TAG

# USES=go related variables
GO_TARGET
GO_BUILDFLAGS

# Standard bsd.port.mk variables
SUB_LIST

-GRAFANA_USER
-GRAFANA_GROUP

# Users and groups block
USERS
GROUPS

# Packaging list block
PLIST_SUB

# Unknown variables
# WARNING:
# Portclippy did not recognize the following variables.
# They could be local variables only, misspellings of
# framework variables, or Portclippy needs to be made aware
# of them.  Please double check them.
#
# Prefix them with an _ to tell Portclippy to ignore them.
# This is also an important signal for other contributors
# who are working on your port.  It removes any doubt of
# whether they are framework variables or not and whether
# they are safe to remove/rename or not.
GRAFANA_DATADIR
+GRAFANA_GROUP
GRAFANA_HOMEDIR
GRAFANA_LOGDIR
GRAFANA_PLUGINDIR
GRAFANA_PROVISIONINGDIR
+GRAFANA_USER
+TAG
---

4. 'portfmt -D Makefile' sugests some alphabetical order too:
---
--- Makefile
+++ Makefile
@@ -30,18 +30,17 @@
 USE_RC_SUBR=	grafana
 TAG=		103f8fa
 
-GO_TARGET=	./pkg/cmd/grafana-server \
-		./pkg/cmd/grafana-cli
+GO_TARGET=	./pkg/cmd/grafana-cli ./pkg/cmd/grafana-server
 GO_BUILDFLAGS=	-ldflags="-w -X main.version=${PORTVERSION} -X main.commit=${TAG}"
 
-SUB_LIST=	GRAFANA_USER=${GRAFANA_USER} \
-		GRAFANA_GROUP=${GRAFANA_GROUP} \
+SUB_LIST=	GRAFANA_BUILDHASH=8ea303538f79ee32b68a \
 		GRAFANA_DATADIR=${GRAFANA_DATADIR} \
+		GRAFANA_GROUP=${GRAFANA_GROUP} \
 		GRAFANA_HOMEDIR=${GRAFANA_HOMEDIR} \
 		GRAFANA_LOGDIR=${GRAFANA_LOGDIR} \
 		GRAFANA_PLUGINDIR=${GRAFANA_PLUGINDIR} \
 		GRAFANA_PROVISIONINGDIR=${GRAFANA_PROVISIONINGDIR} \
-		GRAFANA_BUILDHASH=8ea303538f79ee32b68a
+		GRAFANA_USER=${GRAFANA_USER}
 
 GRAFANA_USER?=	grafana
 GRAFANA_GROUP?=	grafana
---

Could you take a look at portlint/portclippy/portfmt tools?
what do you think?
Thanks
Comment 2 Nuno Teixeira freebsd_committer 2021-08-23 15:41:29 UTC
(In reply to Nuno Teixeira from comment #1)
5. grafana8/pkg-message: seems to have unnecessary blank lines at the last part.
Comment 3 Boris Korzun 2021-08-23 17:40:55 UTC
Created attachment 227383 [details]
grafana8.diff

(In reply to Nuno Teixeira from comment #1)
Thanks for pointing to PORTREVISION and pkg-message.
But other fmt issues are intended for better understanding and upgrading the port (discussed at bug #255931, comment #7).
Comment 4 Nuno Teixeira freebsd_committer 2021-08-23 19:15:15 UTC
(In reply to Boris Korzun from comment #3)
Hello,

Yes you are right organizing it like that. Next time I will take a closer view at this and not follow blindly portclippy and portfmt.

Thnaks.
Comment 5 commit-hook freebsd_committer 2021-08-23 20:29:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1c8a8dbe83b0a61dcfed8ef54c05ee1c38cceaaa

commit 1c8a8dbe83b0a61dcfed8ef54c05ee1c38cceaaa
Author:     Boris Korzun <drtr0jan@yandex.ru>
AuthorDate: 2021-08-23 20:23:45 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2021-08-23 20:23:45 +0000

    www/grafana8: Update to 8.1.2

    ChangeLog: https://github.com/grafana/grafana/blob/main/CHANGELOG.md

    PR:             258006

 www/grafana8/Makefile         |  7 +++----
 www/grafana8/Makefile.modules |  2 +-
 www/grafana8/distinfo         | 14 +++++++-------
 www/grafana8/pkg-message      |  1 -
 www/grafana8/pkg-plist        |  5 +++--
 5 files changed, 14 insertions(+), 15 deletions(-)
Comment 6 Nuno Teixeira freebsd_committer 2021-08-23 20:30:34 UTC
Committed thanks!