GNU bug report logs - #41803
[PATCH] Yggdrasil package and accompanying shepherd service (mesh network)

Previous Next

Package: guix-patches;

Reported by: raingloom <raingloom <at> riseup.net>

Date: Thu, 11 Jun 2020 13:58:01 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41803 in the body.
You can then email your comments to 41803 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Thu, 11 Jun 2020 13:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to raingloom <raingloom <at> riseup.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 11 Jun 2020 13:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: Guix Patches <guix-patches <at> gnu.org>
Subject: [PATCH] Yggdrasil package and accompanying shepherd service (mesh
 network)
Date: Thu, 11 Jun 2020 15:56:56 +0200
[Message part 1 (text/plain, inline)]
from: https://yggdrasil-network.github.io/
"Yggdrasil is an early-stage implementation of a fully end-to-end
encrypted IPv6 network."

I spent the last few days packaging it and now it's in a state where I
think it's usable.

The configuration can include private keys, so that part should NOT go
in the operating system config, because it would get stored in the
world-readable Guix store. Nix works around this by merging the
generated config with a JSON file and sending it to yggdrasil over its
stdin.

I chose not to do that because I couldn't figure out how to open a
service's stdin and because I think the way I did it is much more
elegant in the long run.

The package is lightly patched to take not one but two config files,
and it simply merges them internally. The patch is completely backwards
compatible and unobtrusive. It took me about an hour to write and debug
and most of that was just figuring out Go's syntax and type system.
I will try to get upstream to accept it, or implement similar
functionality.

Still TODO:
documenting the service as an info page.

The gist of using it is:
1. look at example operating system
2. see yggdrasil -genconf -json for config options
(3.) optional: save output as /etc/yggdrasil-secret.conf
(4.) chmod 600 /etc/yggdrasil-secret.conf
(5.) delete everything but the signing and encryption keys
6. add peers as needed, or set autoconf? to #t to connect through a
local peer

It seems to work fine. I could connect to open peers from one
machine and another one could auto-configure itself to connect through
the first one over the LAN. It's pretty nifty.
[0001-gnu-go-golang-org-x-sys-update-to-05986578812163b266.patch (text/x-patch, attachment)]
[0002-gnu-add-yggdrasil-dependencies.patch (text/x-patch, attachment)]
[0003-gnu-add-yggdrasil-package-at-version-0.3.14-plus-pat.patch (text/x-patch, attachment)]
[0004-gnu-services-Add-new-service-for-yggdrasil-network.patch (text/x-patch, attachment)]
[0005-gnu-system-add-example-with-yggdrasil.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Sun, 14 Jun 2020 01:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: [PATCH] Yggdrasil package and  accompanying shepherd service (mesh
 network)
Date: Sun, 14 Jun 2020 03:35:47 +0200
Bump.

Could someone look at this?




Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Sat, 11 Jul 2020 22:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: raingloom <raingloom <at> riseup.net>
Cc: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Sun, 12 Jul 2020 00:12:06 +0200
Le Thu, 11 Jun 2020 15:56:56 +0200,
raingloom <raingloom <at> riseup.net> a écrit :

> from: https://yggdrasil-network.github.io/
> "Yggdrasil is an early-stage implementation of a fully end-to-end
> encrypted IPv6 network."
> 
> I spent the last few days packaging it and now it's in a state where I
> think it's usable.
> 
> The configuration can include private keys, so that part should NOT go
> in the operating system config, because it would get stored in the
> world-readable Guix store. Nix works around this by merging the
> generated config with a JSON file and sending it to yggdrasil over its
> stdin.
> 
> I chose not to do that because I couldn't figure out how to open a
> service's stdin and because I think the way I did it is much more
> elegant in the long run.
> 
> The package is lightly patched to take not one but two config files,
> and it simply merges them internally. The patch is completely
> backwards compatible and unobtrusive. It took me about an hour to
> write and debug and most of that was just figuring out Go's syntax
> and type system. I will try to get upstream to accept it, or
> implement similar functionality.
> 
> Still TODO:
> documenting the service as an info page.
> 
> The gist of using it is:
> 1. look at example operating system
> 2. see yggdrasil -genconf -json for config options
> (3.) optional: save output as /etc/yggdrasil-secret.conf
> (4.) chmod 600 /etc/yggdrasil-secret.conf
> (5.) delete everything but the signing and encryption keys
> 6. add peers as needed, or set autoconf? to #t to connect through a
> local peer
> 
> It seems to work fine. I could connect to open peers from one
> machine and another one could auto-configure itself to connect through
> the first one over the LAN. It's pretty nifty.

Hi,

this is more of a quick review.

First patch LGTM.

You should split every package you add in the second patch in separate
patches. Also the commit message should say "new variable", no need to
say it's public.

You left a comment about the license for go-github-com-gologme-log.
Have you contacted upstream to tell them about that, what was their
reaction? I think the fact that the readme says bsd implies the
intention is that it is free software, but better safe than sorry.

Otherwise, these packages lgtm.

In the third patch again, the commit message should say "new variable".
You should not use the past tense either, so "Add it".

Is the licenes lgpl3, or lgpl3+?

Not a go programmer, so I'm not reading the patch, but I'm trusting you
that it works :)

For the fourth patch, I don't think you need to list new private
variables in the commit message, nor new dependencies. Only list public
variables, as "New variables".

As you noted, could you add something about it to the manual?

In the system example, should Yggdrasil really be installed in the
system profile? If so, I think you can add a profile-service-type
extension to the service so the package is automatically available. Then
you don't need to specify the package in the os configuration, and it
ensures you install the same package (declared in the service
configuration) for the service and in the system.

Thanks for working on this!




Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Mon, 13 Jul 2020 16:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Mon, 13 Jul 2020 16:23:30 +0200
[Message part 1 (text/plain, inline)]
On Sun, 12 Jul 2020 00:12:06 +0200
Julien Lepiller <julien <at> lepiller.eu> wrote:

> 
> Hi,
> 
> this is more of a quick review.
> 
> First patch LGTM.
> 
> You should split every package you add in the second patch in separate
> patches. Also the commit message should say "new variable", no need to
> say it's public.

Done!

> You left a comment about the license for go-github-com-gologme-log.
> Have you contacted upstream to tell them about that, what was their
> reaction? I think the fact that the readme says bsd implies the
> intention is that it is free software, but better safe than sorry.

Heck, I forgot to do that, but I have contacted them yesterday and they
fixed it.

> Otherwise, these packages lgtm.
> 
> In the third patch again, the commit message should say "new
> variable". You should not use the past tense either, so "Add it".
> 
> Is the licenes lgpl3, or lgpl3+?

Looks like (custom) lgpl3. The readme says so and I couldn't find
anything to indicate that a later version would also be acceptable.

> Not a go programmer, so I'm not reading the patch, but I'm trusting
> you that it works :)
> 
> For the fourth patch, I don't think you need to list new private
> variables in the commit message, nor new dependencies. Only list
> public variables, as "New variables".
> 
> As you noted, could you add something about it to the manual?

On it, but I've never used texinfo, so this might take a while. Gonna
send it in a later mail.

> In the system example, should Yggdrasil really be installed in the
> system profile? If so, I think you can add a profile-service-type
> extension to the service so the package is automatically available.
> Then you don't need to specify the package in the os configuration,
> and it ensures you install the same package (declared in the service
> configuration) for the service and in the system.

Technically it can be used without it, but yggdrasilctl is a useful
tool. I added it with the profile-service-type extension and removed
it from the packages field in the example.

> Thanks for working on this!

UwU
[0001-gnu-go-golang-org-x-sys-update-to-05986578812163b266.patch (text/x-patch, attachment)]
[0002-gnu-Add-go-github-com-arceliar-phony.patch (text/x-patch, attachment)]
[0003-gnu-Add-go-github-com-cheggaaa-pb-at-version-3.0.4.patch (text/x-patch, attachment)]
[0004-gnu-Add-go-github-com-gologme-log-at-version-1.2.0.patch (text/x-patch, attachment)]
[0005-gnu-Add-go-github-com-hashicorp-go-syslog-at-version.patch (text/x-patch, attachment)]
[0006-gnu-Add-go-golang-zx2c4-com-wireguard-at-version-0.0.patch (text/x-patch, attachment)]
[0007-gnu-Add-go-github-com-kardianos-minwinsvc.patch (text/x-patch, attachment)]
[0008-gnu-Add-yggdrasil-at-version-0.3.14-plus-patch.patch (text/x-patch, attachment)]
[0009-gnu-services-Add-new-service-for-yggdrasil-network.patch (text/x-patch, attachment)]
[0010-gnu-system-add-example-with-yggdrasil.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Thu, 03 Sep 2020 18:01:02 GMT) Full text and rfc822 format available.

Message #17 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Thu, 3 Sep 2020 19:59:47 +0200
[Message part 1 (text/plain, inline)]
On Mon, 13 Jul 2020 16:23:30 +0200
raingloom <raingloom <at> riseup.net> wrote:

> On Sun, 12 Jul 2020 00:12:06 +0200
> Julien Lepiller <julien <at> lepiller.eu> wrote:
> > As you noted, could you add something about it to the manual?  
> 
> On it, but I've never used texinfo, so this might take a while. Gonna
> send it in a later mail.
> 

Finally got around to documenting it.
Also exported all the accessors for the service.

Is it mergeable in this form?

ps.: i'm not sure if i should include all patches or only the ones i
changed. to be safe i rebased it again on the current main branch and
attached all patches.
[0001-gnu-go-golang-org-x-sys-update-to-05986578812163b266.patch (text/x-patch, attachment)]
[0002-gnu-Add-go-github-com-arceliar-phony.patch (text/x-patch, attachment)]
[0003-gnu-Add-go-github-com-cheggaaa-pb-at-version-3.0.4.patch (text/x-patch, attachment)]
[0004-gnu-Add-go-github-com-gologme-log-at-version-1.2.0.patch (text/x-patch, attachment)]
[0005-gnu-Add-go-github-com-hashicorp-go-syslog-at-version.patch (text/x-patch, attachment)]
[0006-gnu-Add-go-golang-zx2c4-com-wireguard-at-version-0.0.patch (text/x-patch, attachment)]
[0007-gnu-Add-go-github-com-kardianos-minwinsvc.patch (text/x-patch, attachment)]
[0008-gnu-Add-yggdrasil-at-version-0.3.14-plus-patch.patch (text/x-patch, attachment)]
[0009-gnu-services-Add-new-service-for-yggdrasil-network.patch (text/x-patch, attachment)]
[0010-gnu-system-add-example-with-yggdrasil.patch (text/x-patch, attachment)]
[0011-doc-document-Yggdrasil-service.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Wed, 07 Oct 2020 22:16:02 GMT) Full text and rfc822 format available.

Message #20 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Thu, 8 Oct 2020 00:15:52 +0200
On Mon, 13 Jul 2020 16:23:30 +0200
raingloom <raingloom <at> riseup.net> wrote:

> On Sun, 12 Jul 2020 00:12:06 +0200
> Julien Lepiller <julien <at> lepiller.eu> wrote:
> 
> > 
> > Hi,
> > 
> > this is more of a quick review.
> > 
> > First patch LGTM.
> > 
> > You should split every package you add in the second patch in
> > separate patches. Also the commit message should say "new
> > variable", no need to say it's public.
> 
> Done!
> 
> > You left a comment about the license for go-github-com-gologme-log.
> > Have you contacted upstream to tell them about that, what was their
> > reaction? I think the fact that the readme says bsd implies the
> > intention is that it is free software, but better safe than sorry.
> 
> Heck, I forgot to do that, but I have contacted them yesterday and
> they fixed it.
> 
> > Otherwise, these packages lgtm.
> > 
> > In the third patch again, the commit message should say "new
> > variable". You should not use the past tense either, so "Add it".
> > 
> > Is the licenes lgpl3, or lgpl3+?
> 
> Looks like (custom) lgpl3. The readme says so and I couldn't find
> anything to indicate that a later version would also be acceptable.
> 
> > Not a go programmer, so I'm not reading the patch, but I'm trusting
> > you that it works :)
> > 
> > For the fourth patch, I don't think you need to list new private
> > variables in the commit message, nor new dependencies. Only list
> > public variables, as "New variables".
> > 
> > As you noted, could you add something about it to the manual?
> 
> On it, but I've never used texinfo, so this might take a while. Gonna
> send it in a later mail.
> 
> > In the system example, should Yggdrasil really be installed in the
> > system profile? If so, I think you can add a profile-service-type
> > extension to the service so the package is automatically available.
> > Then you don't need to specify the package in the os configuration,
> > and it ensures you install the same package (declared in the service
> > configuration) for the service and in the system.
> 
> Technically it can be used without it, but yggdrasilctl is a useful
> tool. I added it with the profile-service-type extension and removed
> it from the packages field in the example.
> 
> > Thanks for working on this!
> 
> UwU

Bump.

Could someone please test this?

Others have expressed interest in usin Yggdrasil with Guix, so I really
think these patches would be useful.

New versions of the packages are already coming out though, so if
necessary I could send a new patch series with the updated versions.




Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Tue, 13 Oct 2020 23:11:02 GMT) Full text and rfc822 format available.

Message #23 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 41803 <at> debbugs.gnu.org
Subject: [PATCH] Yggdrasil package and accompanying shepherd service (mesh
 network)
Date: Wed, 14 Oct 2020 01:09:42 +0200
Hi,

I went ahead and pushed your first four patches with changes. I'll need
you to work a bit more before I can push the rest.

I've added a copyright line for you in golang.scm.

For the rest of the packages, could you split all your patches into
one patch per package?  For each package, please run "guix lint" and
fix any issue (except for archival, you can't do anything about it).
This includes: using (file-name (git-file-name name version)) inside
the origin record, making sure the synopsis doesn't start with "A", and
the description ends with a full stop.

I also changed you commit messages: don't include the version number
for added packages and add a full stop at the end of messages.

For yggdrasil, please grep for dist_PATCH_DATA in the git log, you'll
find examples of good commit messages :)

For the service, changes to the documentation are usually made in the
same patch, so could you please merge your last three patches? I don't
know if we can use guile-json directly in a service definition without
causing troubles for people who have different versions of guile-json
in their profile already. I'll have to ask people who are more
knowledgeable than me!

To chown the socket, you'll need an activation service type (if the
socket survives restarts of yggdrasil), or to change the start action
of the shepherd service type.

Your changes to the documentation look good, but incomplete.

Could you rebase and send updated patches for the rest of this series?

Thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Thu, 29 Oct 2020 00:22:02 GMT) Full text and rfc822 format available.

Message #26 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Thu, 29 Oct 2020 01:20:56 +0100
[Message part 1 (text/plain, inline)]
I didn't get the last reply for some reason, only saw it on the issue
tracker. Would be nice if i could import it somehow, but the issue
tracker GUI doesn't seem to have an option for that.
In any case, thanks for the feedback! ^u^

Attached is an improved patch list.

I'm pretty sure I incorporated all feedback, except for the guile-json
part. I have no idea how it'd pose any issue in practice and if it
does, that seems like a deeper design issue. Reimplementing JSON
encoding because Guix can't find its libraries doesn't seem like the
right solution in any scenario.

The docs were indeed lacking, I added a more information and fixed some
plain badly written parts.

The solution to the socket ownership issue turned out to be much
simpler: Shepherd has a #:group option.

One issue I encountered while guix lint-ing the packages is that it and
refresh could both identify what the new release is but refresh
--update seemingly never worked. Not sure what's up with that.
[0001-gnu-Added-go-github-com-hashicorp-go-syslog.patch (text/x-patch, attachment)]
[0002-gnu-Added-go-github-com-hjson-hjson-go.patch (text/x-patch, attachment)]
[0003-gnu-Added-go-golang-zx2c4-com-wireguard.patch (text/x-patch, attachment)]
[0004-gnu-Add-go-github-com-kardianos-minwinsvc.patch (text/x-patch, attachment)]
[0005-gnu-Added-yggdrasil.patch (text/x-patch, attachment)]
[0006-services-Added-yggdrasil-service-type.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41803; Package guix-patches. (Thu, 05 Nov 2020 14:45:02 GMT) Full text and rfc822 format available.

Message #29 received at 41803 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: 41803 <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Thu, 5 Nov 2020 15:43:41 +0100
[Message part 1 (text/plain, inline)]
Final version, hopefully.
Slight upgrade to system example to make testing easier. (added curl to
packages)
[0001-gnu-Added-go-github-com-hashicorp-go-syslog.patch (text/x-patch, attachment)]
[0002-gnu-Added-go-github-com-hjson-hjson-go.patch (text/x-patch, attachment)]
[0003-gnu-Added-go-golang-zx2c4-com-wireguard.patch (text/x-patch, attachment)]
[0004-gnu-Add-go-github-com-kardianos-minwinsvc.patch (text/x-patch, attachment)]
[0005-gnu-Added-yggdrasil.patch (text/x-patch, attachment)]
[0006-services-Added-yggdrasil-service-type.patch (text/x-patch, attachment)]

Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Thu, 05 Nov 2020 17:49:01 GMT) Full text and rfc822 format available.

Notification sent to raingloom <raingloom <at> riseup.net>:
bug acknowledged by developer. (Thu, 05 Nov 2020 17:49:01 GMT) Full text and rfc822 format available.

Message #34 received at 41803-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: raingloom <raingloom <at> riseup.net>
Cc: 41803-done <at> debbugs.gnu.org
Subject: Re: [bug#41803] [PATCH] Yggdrasil package and accompanying shepherd
 service (mesh network)
Date: Thu, 5 Nov 2020 18:48:08 +0100
Le Thu, 5 Nov 2020 15:43:41 +0100,
raingloom <raingloom <at> riseup.net> a écrit :

> Final version, hopefully.
> Slight upgrade to system example to make testing easier. (added curl
> to packages)

Thank you, finally pushed as 336c9f0a81c9bc0ed0a2d3e0d050a677806c07c0
to fe1cd098d2b83737e96f19438612291f5a9316e4.

I had to change a few things: the commit messages need to be written in
present tense (Added -> Add).  I added some line breaks in the manual
and double spacing before periods.  I changed the synopsis and
description of one or two packages to match our standards.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.