Bug 258134 - www/grafana7 poudriere build failure "go: updates to go.mod needed"
Summary: www/grafana7 poudriere build failure "go: updates to go.mod needed"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-29 08:51 UTC by Fredrik Eriksson
Modified: 2021-09-25 17:19 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (robsonmantovani)


Attachments
poudriere build log (34.03 KB, text/plain)
2021-08-29 08:51 UTC, Fredrik Eriksson
no flags Details
patch (4.05 KB, patch)
2021-09-10 23:24 UTC, Craig Leres
leres: maintainer-approval? (robsonmantovani)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Eriksson 2021-08-29 08:51:04 UTC
Created attachment 227525 [details]
poudriere build log

grafana-7.5.6 does not build in my poudriere instance. See the attached log for details, but the important part is probably:

go: updates to go.mod needed, disabled by -mod=vendor; to update it:
        go mod tidy
*** Error code 1


I'm not familiar with the go build system, but could this be a version mismatch somewhere?
Comment 1 Johan Ström 2021-08-31 06:13:38 UTC
Same here. Actually, it built fine on my 11.4-RELEASE jail, but fails to build in 12.2-RELEASE jail. No idea what would cause a difference. All port options where copied from 11.4 to 12.2 -options dirs.
Comment 2 Craig Leres freebsd_committer 2021-09-08 23:32:11 UTC
(In reply to Fredrik Eriksson from comment #0)
If you go interactive with a poudriere jail and start the build, when it fails you can go to the /wrkdirs directory, cd into the place where it fails (pkg/cmd/grafana-server) and run "go mod tidy", it'll download a ton of files from github and then when you go back to the ports directory and try the build again it works. So the error message it gives is accurate (but downloads that aren't part of "make fetch" are a no-no, right?)

It looks like this is broken for a lot of build environments:

    https://portsfallout.com/fallout?port=www%2Fgrafana7&maintainer=&env=&category=&flavor=
Comment 3 Craig Leres freebsd_committer 2021-09-08 23:37:30 UTC
I should have mentioned I'm using 12.2-RELEASE. And given that www/grafana7 hasn't changed since May this feels like lang/go update fallout. (Perhaps grafana7 needs to be updated for the new go?) I'm grasping at straws...
Comment 4 Vikash Badal 2021-09-09 07:24:48 UTC
same issue on  13.0-RELEASE

=>> Building www/grafana7
build started at Wed Sep  8 17:18:08 SAST 2021
port directory: /usr/ports/www/grafana7
package name: grafana7-7.5.6
building for: FreeBSD poudriere.broadband.is 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 amd64
maintained by: robsonmantovani@gmail.com
Makefile ident: 
Poudriere version: 3.3.6
Host OSVERSION: 1300139
Jail OSVERSION: 1300139

===>  Building for grafana7-7.5.6
<snip>
===>  Building grafana-server from ./pkg/cmd/grafana-server
go: updates to go.mod needed, disabled by -mod=vendor; to update it:
	go mod tidy
Comment 5 Craig Leres freebsd_committer 2021-09-10 23:03:45 UTC
I checked and there have been several releases since 7.5.6; for example 7.5.10 builds for me without errors (but does not install because the pkg-plist needs adjustments).

Can we just upgrade to 7.5.10 and make this problem go away?
Comment 6 Craig Leres freebsd_committer 2021-09-10 23:24:01 UTC
Created attachment 227820 [details]
patch

Update to 7.5.10 (and minor portlint). I've tested build/install poudriere but have not installed it on a running system yet.
Comment 7 Sir l33tname 2021-09-19 15:55:48 UTC
same issue on latest (13.0-RELEASE-p4) another workaround is to upgrade to grafana8
Comment 8 Craig Leres freebsd_committer 2021-09-19 17:02:35 UTC
I think upgrading www/grafana7 to 7.5.10 will fix this and we're more than half way to the maintainer timeout that will allow that to happen.
Comment 9 commit-hook freebsd_committer 2021-09-25 17:14:47 UTC
A commit in branch main references this bug:

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

commit f515b12972b897bbaeb0dcba5fe8cbb39c8419cb
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2021-09-25 17:06:06 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2021-09-25 17:06:06 +0000

    www/grafana7: Update to 7.5.10 and unbreak build

    Changes since 7.5.6:

     - Dockerfile: Fixes missing -no-cache.

     - Annotations: Prevent orphaned annotation tags cleanup when no
       annotations were cleaned.

     - Quota: Do not count folders towards dashboard quota.

     - Datasource: Add support for max_conns_per_host in dataproxy
       settings.

     - Datasource: Add support for max_idle_connections_per_host in
       dataproxy settings.

     - Instrumentation: Add metrics for outbound HTTP connections.

     - Snapshots: Remove dashboard links from dashboard snapshots.

     - Fix Unauthorized message that is displayed on sign-in or snapshot
       page.

     - Transformations: add `prepare time series' transformer.

    PR:             258134
    Reported by:    Fredrik Eriksson
    Approved by:    robsonmantovani@gmail.com (maintainer timeout, 2 weeks)

 www/grafana7/Makefile  |  4 ++--
 www/grafana7/distinfo  | 10 +++++-----
 www/grafana7/pkg-plist |  9 ++++++---
 3 files changed, 13 insertions(+), 10 deletions(-)
Comment 10 Craig Leres freebsd_committer 2021-09-25 17:19:43 UTC
I believe my commit fixes this issue, please reopen if you find otherwise.

Thanks for the bug report!