Bug 253713 - net-mgmt/netdata-go: Update to v0.28.0
Summary: net-mgmt/netdata-go: Update to v0.28.0
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: Dmitri Goutnik
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2021-02-20 09:28 UTC by Dries Michiels
Modified: 2021-02-21 11:19 UTC (History)
1 user (show)

See Also:


Attachments
netdatago.diff (18.00 KB, patch)
2021-02-20 09:28 UTC, Dries Michiels
no flags Details | Diff
netdatagoMODULE.diff (13.42 KB, patch)
2021-02-20 09:32 UTC, Dries Michiels
driesm: maintainer-approval+
Details | Diff
failure with GO_MODULE= (142.16 KB, text/plain)
2021-02-20 09:33 UTC, Dries Michiels
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels freebsd_committer freebsd_triage 2021-02-20 09:28:45 UTC
Created attachment 222663 [details]
netdatago.diff

Poudriere testport looks good.

I have tried using the new framework with GO_MODULE= ... but it fails in my poudriere with symlinking v0.28.0.go.mod to go.mod "go.mod already exists". I"ll attach the patch I tried as well.
Comment 1 Dries Michiels freebsd_committer freebsd_triage 2021-02-20 09:32:41 UTC
Created attachment 222664 [details]
netdatagoMODULE.diff

patch with new GO_MODULE=
Comment 2 Dries Michiels freebsd_committer freebsd_triage 2021-02-20 09:33:54 UTC
Created attachment 222665 [details]
failure with GO_MODULE=
Comment 3 Automation User 2021-02-20 10:52:40 UTC
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/259129304
Comment 4 Dmitri Goutnik freebsd_committer freebsd_triage 2021-02-20 12:10:52 UTC
(In reply to Dries Michiels from comment #0)
Hi,

netdatagoMODULE.diff applies and the ports builds fine for me in poudriere. It seems that you may have some leftovers in ${DISTDIR}/${DIST_SUBDIR} from previous builds (DIST_SUBDIR location was tweaked several times during development).

`make distclean` or just manually removing ${DISTDIR}/go/net-mgmt_netdata-go/netdata-go-v0.28.0 should fix this.
Comment 5 Dries Michiels freebsd_committer freebsd_triage 2021-02-20 12:39:17 UTC
Weird, I cleaned my hole distdir folder but I still get the same error message's on different FreeBSD versions, 14-CURRENT and 122-RELEASE in poudriere.
Comment 6 Dmitri Goutnik freebsd_committer freebsd_triage 2021-02-20 13:36:14 UTC
(In reply to Dries Michiels from comment #5)
Can you post the contents of ${DISTDIR}/go/net-mgmt_netdata-go/netdata-go-v0.28.0 after build failure? Is go.mod a regular file or a symlink? Does it have the same contents as v0.28.0.mod?
Comment 7 Dries Michiels freebsd_committer freebsd_triage 2021-02-20 15:52:34 UTC
After a poudriere run:
[/usr/ports/distfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0]$ ll
aAtotal 1117
-rw-r--r--  1 root  wheel     1403 Feb 20 10:10 v0.28.0.mod
-rw-r--r--  1 root  wheel  1220815 Feb 20 10:10 v0.28.0.zip

After dropping into the poudriere jail after failure (-i flag):
[/usr/ports/distfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0]$ ll
total 1117
lrwxr-xr-x  1 root  wheel       11 Feb 20 16:39 go.mod@ -> v0.28.0.mod
-rw-r--r--  1 root  wheel    20378 Feb 20 16:30 go.sum
-rw-r--r--  1 root  wheel     1403 Feb 20 10:10 v0.28.0.mod
-rw-r--r--  1 root  wheel  1220815 Feb 20 10:10 v0.28.0.zip

When running manually by make install:
[/usr/ports/distfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0]$ ll
total 2259
lrwxr-xr-x  1 root  wheel       11 Feb 20 16:39 go.mod@ -> v0.28.0.mod
-rw-r--r--  1 root  wheel    20378 Feb 20 16:30 go.sum
-rw-r--r--  1 root  wheel     1403 Feb 20 10:10 v0.28.0.mod
-rw-r--r--  1 root  wheel  1220815 Feb 20 10:10 v0.28.0.zip

Very weird indeed. I use poudriere-devel, might try the normal version later.
If it works in your env and my manual make commands work it should just work, probably something very specific wrong in my env.
Comment 8 Dmitri Goutnik freebsd_committer freebsd_triage 2021-02-20 20:52:54 UTC
I'm not sure what's going either, sorry. The only way I can think of for `install -l rs` to fail like that, is if the target already exists and is on a read-only filesystem.

Can you check the contents on the DISTDIR from inside the poudriere (-i)? E.g.:

`ls -la /distfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0/` and 
`ls -la /portdistfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0/`

Here's what I see here after a successfull build:

root@122a-default:~ # ls -la /distfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0/
total 1294
drwxr-xr-x  2 root  wheel        4 Feb 20 20:30 .
drwxr-xr-x  3 root  wheel        3 Feb 20 20:30 ..
-rw-r--r--  1 root  wheel     1403 Feb 20 09:10 v0.28.0.mod
-rw-r--r--  1 root  wheel  1220815 Feb 20 09:10 v0.28.0.zip
root@122a-default:~ # ls -la /portdistfiles/go/net-mgmt_netdata-go/netdata-go-v0.28.0/
total 1327
drwxr-xr-x  2 root  wheel        6 Feb 20 20:36 .
drwxr-xr-x  4 root  wheel        4 Feb 20 20:35 ..
lrwxr-xr-x  1 root  wheel       11 Feb 20 20:36 go.mod -> v0.28.0.mod
-rw-r--r--  1 root  wheel    31770 Feb 20 20:36 go.sum
-rw-r--r--  1 root  wheel     1403 Feb 20 09:10 v0.28.0.mod
-rw-r--r--  1 root  wheel  1220815 Feb 20 09:10 v0.28.0.zip

Also, what does `mount -p -t nullfs | grep poudriere` show when the jail is still running?
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-02-20 23:31:19 UTC
A commit references this bug:

Author: dmgk
Date: Sat Feb 20 23:30:34 UTC 2021
New revision: 566197
URL: https://svnweb.freebsd.org/changeset/ports/566197

Log:
  Mk/Uses/go.mk: Work around symlink creation issue in Poudriere

  PR:		253713
  Reported by:	Dries Michiels <driesm.michiels@gmail.com>
  Reviewed by:	otis

Changes:
  head/Mk/Uses/go.mk
Comment 10 Dmitri Goutnik freebsd_committer freebsd_triage 2021-02-20 23:34:09 UTC
(In reply to Dries Michiels from comment #7)

Can you please re-test?
Comment 11 Dries Michiels freebsd_committer freebsd_triage 2021-02-21 08:15:52 UTC
Very nice, that commit fixed it. Thank you!
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-02-21 11:19:06 UTC
A commit references this bug:

Author: dmgk
Date: Sun Feb 21 11:18:19 UTC 2021
New revision: 566215
URL: https://svnweb.freebsd.org/changeset/ports/566215

Log:
  net-mgmt/netdata-go: Update to 0.28.0

  Changes:	https://github.com/netdata/go.d.plugin/releases/tag/v0.28.0
  PR:		253713
  Submitted by:	Dries Michiels <driesm.michiels@gmail.com> (maintainer)

Changes:
  head/net-mgmt/netdata-go/Makefile
  head/net-mgmt/netdata-go/distinfo
  head/net-mgmt/netdata-go/pkg-plist
Comment 13 Dmitri Goutnik freebsd_committer freebsd_triage 2021-02-21 11:19:51 UTC
Committed, thanks!