Bug 236607

Summary: [new port] net/yggdrasil: Experimental end-to-end encrypted self-arranging IPv6 network
Product: Ports & Packages Reporter: Neil Alexander <freebsd>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: dmgk, freebsd, yuri
Priority: --- Keywords: feature, needs-qa
Version: LatestFlags: koobs: maintainer-feedback+
Hardware: Any   
OS: Any   
URL: https://yggdrasil-network.github.io/
Attachments:
Description Flags
SHAR file
none
SHAR file
none
SHAR file none

Description Neil Alexander 2019-03-17 18:24:49 UTC
Created attachment 202939 [details]
SHAR file

This is a new FreeBSD port for the Yggdrasil Network version 0.3.5 - https://yggdrasil-network.github.io/ for more info on the project.

This is my first time creating a FreeBSD port but it seems to pass portlint so hopefully there are no major issues!
Comment 1 Neil Alexander 2019-03-17 18:31:25 UTC
Created attachment 202940 [details]
SHAR file

Has correct maintainer email address now.
Comment 2 Neil Alexander 2019-04-17 17:20:02 UTC
Is there an ETA on review for new packages?
Comment 3 Dmitri Goutnik freebsd_committer freebsd_triage 2019-04-17 20:09:20 UTC
Hi,

Thank you for your submission, there are a few issues with the port:

- It doesn't currently build in poudriere because neither $HOME nor $GOCACHE is set by default:

=======================<phase: build          >============================
===>  Building for yggdrasil-0.3.5
mkdir /wrkdirs/usr/ports/net/yggdrasil/work/.gocache
cd /wrkdirs/usr/ports/net/yggdrasil/work/yggdrasil-go-0.3.5 && PKGNAME=yggdrasil PKGVER=0.3.5 ./build
Building: yggdrasil
failed to initialize build cache at /nonexistent/.cache/go-build: mkdir /nonexistent: permission denied
Building: yggdrasilctl
failed to initialize build cache at /nonexistent/.cache/go-build: mkdir /nonexistent: permission denied

The easiest fix would be to update the build target to ${SETENV} ${MAKE_ENV} before calling build:

cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} PKGNAME=${PORTNAME} PKGVER=${PORTVERSION} ./build

- All dependencies will need to be vendored by the upstream or added to GH_TUPLE (same commit ids/tags as specified in go.mod, devel/modules2tuple can help with GH_TUPLE generation)

- ${INSTALL_PROGRAM} already does the stripping, no need to do this again in post-install

- Config files should go to ${PREFIX}/etc, not /etc
Comment 4 Neil Alexander 2019-04-17 22:22:56 UTC
Hi Dmitri

Thanks for the concise response. I'll make some changes and submit a new patch soon.

I am a little confused about GH_TUPLE and vendoring. I was under the impression that when module support is enabled in Go, vendoring directories are ignored.

Is GH_TUPLE a replacement for the other GH_ variables and, if so, should it really contain an entry for every other Go dependency? Is it not sufficient to let Go deal with the modules itself?
Comment 5 Dmitri Goutnik freebsd_committer freebsd_triage 2019-04-17 23:11:35 UTC
(In reply to Neil Alexander from comment #4)

Correct, building in module-aware more will require -mod=vendor (or GOFLAGS=-mod=vendor). There are a few examples of this in the ports tree e.g devel/go-git or net/syncthing.

GH_TUPLE is a shortcut for setting other GH_ vars in a compact way. Because network access is not allowed during the build, all dependencies must be downloaded beforehand (unless they were already vendored by the upstream). Currently there's no support for automatic dependencies download by the `go build` - it'll appear to work when building with make but will fail in poudriere.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-24 10:05:30 UTC
@Neil Beyond portlint, we strongly recommend QA'ing ports using poudriere, which helps to pick up many issues.

Details and instructions: https://www.freebsd.org/doc/en/books/porters-handbook/testing-poudriere.html
Comment 7 Neil Alexander 2019-04-24 21:59:10 UTC
Created attachment 203984 [details]
SHAR file
Comment 8 Neil Alexander 2019-04-24 22:00:07 UTC
Hi Dmitri, Kubilay,

Really appreciate both of your input and feedback.

I've attached a new SHAR file which is tested and working in Poudriere on my machine. I hope this is better!
Comment 9 Neil Alexander 2019-05-19 10:57:17 UTC
Hi all,

Is there an update on whether the newly updated package is suitable now?

Thanks in advance!
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2019-08-03 23:38:10 UTC
Committed with minor changes.
Thank you for your submission!
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-08-03 23:38:16 UTC
A commit references this bug:

Author: yuri
Date: Sat Aug  3 23:38:05 UTC 2019
New revision: 508037
URL: https://svnweb.freebsd.org/changeset/ports/508037

Log:
  New port: net/yggdrasil: Experimental end-to-end encrypted self-arranging IPv6 network

  PR:		236607
  Submitted by:	Neil Alexander <freebsd@neilalexander.dev>

Changes:
  head/net/Makefile
  head/net/yggdrasil/
  head/net/yggdrasil/Makefile
  head/net/yggdrasil/distinfo
  head/net/yggdrasil/files/
  head/net/yggdrasil/files/yggdrasil.in
  head/net/yggdrasil/pkg-descr