Bug 274739 - net/yggdrasil: Update to 0.5.1
Summary: net/yggdrasil: Update to 0.5.1
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: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-26 16:07 UTC by Neil Alexander
Modified: 2023-11-03 21:32 UTC (History)
1 user (show)

See Also:


Attachments
Patch file (8.90 KB, patch)
2023-10-26 16:07 UTC, Neil Alexander
no flags Details | Diff
Patch file 0.5.1 (7.35 KB, patch)
2023-10-28 16:20 UTC, Neil Alexander
no flags Details | Diff
Patch file 0.5.1 (7.41 KB, patch)
2023-10-28 16:21 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 2023-10-26 16:07:43 UTC
Created attachment 245892 [details]
Patch file

This updates net/yggdrasil to version 0.4.7.

This is mostly ensuring the last version of the 0.4.x branch is committed, as a backward-incompatible 0.5.0 release will come probably in the next few days.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-10-27 20:43:59 UTC
Thank you for the update.

If the new version is backwards-incompatible, it might make sense to create a new port for it.  But that's up to you and your judgement.

You should in any way check if you can use the GO_MODULE mechanism to get rid of the big GH_TUPLE list in the 0.5.0 release (not sure if we already discussed this).

Also, is there a changelog for this update?
Comment 2 Neil Alexander 2023-10-27 21:05:16 UTC
This is the first I've heard of removing GH_TUPLE, will take a look. Also we'll probably just update this port for the new version, as we will always want people to be preferring the most up-to-date code and routing protocol.

We do have a project changelog, I don't know that we've ever added it into the port. What is usual here?
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2023-10-27 21:11:05 UTC
The usual thing is to just list it, we'll go ahead and put it in the commit message.  This'll look like so:

    https://cgit.freebsd.org/ports/commit/?id=00875c7b06744b3fc558a89abdacf49d8a40be3f


Please also note that your update seems to have reverted my build fixes for riscv64:

    https://cgit.freebsd.org/ports/commit/?id=48996f859be1723b58a37393407d41651dd31b28


Please re-adjust the dependencies to versions new enough to build on riscv64.  The versions of the dependencies you chose are likely too outdated to support riscv64 on FreeBSD.

If you could bump the dependencies in your go.mod upstream, that would be even better.
Comment 4 Neil Alexander 2023-10-27 21:16:19 UTC
My mistake, I assume if I switch to the GO_MODULE approach, I will lose the ability to pin the specific versions of golang.org/x/{net,sys,text} as you did?

If so, I will stick to the GH_TUPLE method for this patch and bring back your changes and I will make sure that the go.mod upstream is fixed for v0.5.0 so that I can switch to GO_MODULE then.

Changelog for the commit message is https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.4.7 if the URL is sufficient.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-10-27 21:19:47 UTC
(In reply to Neil Alexander from comment #4)

> My mistake, I assume if I switch to the GO_MODULE approach, I will lose the 
> ability to pin the specific versions of golang.org/x/{net,sys,text} as you did?

You can still do it by manually using GH_TUPLE to override individual modules.  It's a bit more annoying but it can be done.

> If so, I will stick to the GH_TUPLE method for this patch and bring back your 
> changes and I will make sure that the go.mod upstream is fixed for v0.5.0 so 
> that I can switch to GO_MODULE then.

Sounds great!

> Changelog for the commit message is
> https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.4.7 if the 
> URL is sufficient.

URL is good enough, thanks for the link.

I'll be awaiting a new patch from you.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-10-27 21:28:54 UTC
Another problem is that the update you sent doesn't build:

# github.com/yggdrasil-network/yggdrasil-go/src/tun
src/tun/tun_bsd.go:122:12: tun.log.Traceln undefined (type core.Logger has no field or method Traceln)
src/tun/tun_bsd.go:151:12: tun.log.Traceln undefined (type core.Logger has no field or method Traceln)

Possibly a wrong dependency version?
Comment 7 Neil Alexander 2023-10-27 21:42:04 UTC
Oh boy. It turns out that build problem is genuine and, worse, tagged.

I think it may just make sense to abandon this patch and I'll make sure things are fixed upstream before we tag v0.5.0.

Appreciate all your help!
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-10-27 22:02:45 UTC
Sure, whatever you prefer.  You can update this bug report with a new patch for 0.5.0 once you are ready.
Comment 9 Neil Alexander 2023-10-28 16:20:24 UTC
Created attachment 245948 [details]
Patch file 0.5.1
Comment 10 Neil Alexander 2023-10-28 16:21:21 UTC
Created attachment 245949 [details]
Patch file 0.5.1
Comment 11 Neil Alexander 2023-10-28 16:22:00 UTC
OK, let's try this again. I've uploaded a patch for 0.5.1, which should hopefully also build on RISC-V and switches to GO_MODULE!
Comment 12 Robert Clausecker freebsd_committer freebsd_triage 2023-11-02 22:49:54 UTC
Looks good, will commit with my next batch.
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-11-03 21:19:04 UTC
A commit in branch main references this bug:

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

commit e7d1125ff7ad4eec6bb02442ebca7063a8adbd2a
Author:     Neil Alexander <freebsd@neilalexander.dev>
AuthorDate: 2023-11-02 22:50:11 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-11-03 21:16:23 +0000

    net/yggdrasil: update to 0.5.1

     - switch to GO_MODULE

    Changelog: https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.5.1

    PR:             274739

 net/yggdrasil/Makefile | 36 +++----------------------------
 net/yggdrasil/distinfo | 58 +++++---------------------------------------------
 2 files changed, 8 insertions(+), 86 deletions(-)