Bug 241695 - Update net/yggdrasil to 0.3.11
Summary: Update net/yggdrasil to 0.3.11
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: Dmitri Goutnik
URL: https://yggdrasil-network.github.io
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-03 22:17 UTC by Neil Alexander
Modified: 2019-11-04 13:13 UTC (History)
1 user (show)

See Also:


Attachments
Port patch (5.25 KB, application/mbox)
2019-11-03 22:17 UTC, Neil Alexander
no flags Details
Patch file (8.46 KB, patch)
2019-11-03 22:54 UTC, Neil Alexander
no flags Details | Diff
Patch file (9.08 KB, patch)
2019-11-03 23:05 UTC, Neil Alexander
no flags Details | Diff
Patch file (8.96 KB, patch)
2019-11-04 09:38 UTC, Neil Alexander
no flags Details | Diff
Patch file (8.92 KB, patch)
2019-11-04 12:32 UTC, Neil Alexander
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Alexander 2019-11-03 22:17:57 UTC
Created attachment 208831 [details]
Port patch

This is to update the net/yggdrasil port to the latest released version.
Comment 1 Neil Alexander 2019-11-03 22:54:11 UTC
Created attachment 208832 [details]
Patch file
Comment 2 Neil Alexander 2019-11-03 23:05:18 UTC
Created attachment 208833 [details]
Patch file
Comment 3 Dmitri Goutnik freebsd_committer 2019-11-04 01:13:05 UTC
(In reply to Neil Alexander from comment #2)
Hi,

Thanks for the update, there are a few issues that need fixing:

(1) It doesn't pass portlint checks:

$ portlint -AC
FATAL: Makefile: [3]: use a tab (not space) after a variable name
FATAL: Makefile: [4]: use a tab (not space) after a variable name
FATAL: Makefile: [5]: use a tab (not space) after a variable name
FATAL: Makefile: [6]: use a tab (not space) after a variable name
FATAL: Makefile: [7]: use a tab (not space) after a variable name
FATAL: Makefile: [9]: use a tab (not space) after a variable name
FATAL: Makefile: [10]: use a tab (not space) after a variable name
FATAL: Makefile: [12]: use a tab (not space) after a variable name
FATAL: Makefile: [13]: use a tab (not space) after a variable name
FATAL: Makefile: [15]: use a tab (not space) after a variable name
FATAL: Makefile: [17]: use a tab (not space) after a variable name
FATAL: Makefile: [18]: use a tab (not space) after a variable name
FATAL: Makefile: [19]: use a tab (not space) after a variable name
FATAL: Makefile: [20]: use a tab (not space) after a variable name
FATAL: Makefile: [21]: use a tab (not space) after a variable name
FATAL: Makefile: [37]: use a tab (not space) after a variable name
WARN: Makefile: [38]: use tab (not space) to make indentation
WARN: Makefile: [39]: use a tab (not space) after a variable name
FATAL: Makefile: [41]: use a tab (not space) after a variable name
17 fatal errors and 2 warnings found.

(2) Please remove MASTER_SITES/GH_TAGNAME and put back DISTVERSIONPREFIX=v.

(3) Remove BUILD_DEPENDS=go>=1.13:lang/go, Go ports should use USES=go (USES=go:modules in this case [1])

(4) Remove MAKE_ENV+=GOFLAGS=-mod=vendor, go.mk already takes care of that.

--
[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#using-go
Comment 4 Neil Alexander 2019-11-04 09:38:01 UTC
Created attachment 208841 [details]
Patch file

Updated the patch based on Dmitri's feedback.
Comment 5 Neil Alexander 2019-11-04 09:40:52 UTC
Hi Dmitri,

Thanks for the feedback - I am still quite new to creating ports.

I've addressed your points, although I have left in the BUILD_DEPENDS=go>=1.13:lang/go line as we do have a hard requirement on Go 1.13 - our build will fail on earlier Go versions as we are referring to new built-in packages that did not exist before this version. Please let me know if there's a more idiomatic way to express this in the Makefile.

I hope the new patch is acceptable.
Comment 6 Dmitri Goutnik freebsd_committer 2019-11-04 12:21:44 UTC
(In reply to Neil Alexander from comment #5)
Hi Neil,

Ports doesn't provide anything older than go1.13 so BUILD_DEPENDS=go>=1.13 is always satisfied. I think the most straightforward/idiomatic way to enforce go >= 1.13 requirement would be to use build tags in source ("// +build go1.13").

Another problem with explicit BUILD_DEPENDS=go is that it hardcodes dependency on lang/go and prevents testing ports with lang/go-devel.
Comment 7 Neil Alexander 2019-11-04 12:32:36 UTC
Created attachment 208854 [details]
Patch file
Comment 8 Neil Alexander 2019-11-04 12:33:19 UTC
Hi Dmitri,

Thanks for the explanation. I've updated the patch again to remove BUILD_DEPENDS - I'm happy if the ports tree contains only Go 1.13 or later.
Comment 9 commit-hook freebsd_committer 2019-11-04 13:13:00 UTC
A commit references this bug:

Author: dmgk
Date: Mon Nov  4 13:12:12 UTC 2019
New revision: 516640
URL: https://svnweb.freebsd.org/changeset/ports/516640

Log:
  net/yggdrasil: Update to 0.3.11

  - Remove custom build targets while here

  Changes:	https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.3.11

  PR:		241695
  Submitted by:	Neil Alexander <freebsd@neilalexander.dev> (maintainer)
  Approved by:	tz (mentor, implicit)

Changes:
  head/net/yggdrasil/Makefile
  head/net/yggdrasil/distinfo
Comment 10 Dmitri Goutnik freebsd_committer 2019-11-04 13:13:39 UTC
Committed with some changes, thanks!