From patchwork Tue Nov 23 23:54:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Csepp X-Patchwork-Id: 34779 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3419B27BBE9; Tue, 23 Nov 2021 23:56:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4CF9027BBEA for ; Tue, 23 Nov 2021 23:56:20 +0000 (GMT) Received: from localhost ([::1]:52958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpfe7-0003sR-Fw for patchwork@mira.cbaines.net; Tue, 23 Nov 2021 18:56:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpfe0-0003s2-1b for guix-patches@gnu.org; Tue, 23 Nov 2021 18:56:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpfdq-0003Ee-Hs for guix-patches@gnu.org; Tue, 23 Nov 2021 18:56:11 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpfdq-0002Lm-Ed for guix-patches@gnu.org; Tue, 23 Nov 2021 18:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51594] [PATCH] gnu: yggdrasil: Update to 0.4.1. Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Nov 2021 23:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51594 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 51594@debbugs.gnu.org Received: via spool by 51594-submit@debbugs.gnu.org id=B51594.16377117218977 (code B ref 51594); Tue, 23 Nov 2021 23:56:02 +0000 Received: (at 51594) by debbugs.gnu.org; 23 Nov 2021 23:55:21 +0000 Received: from localhost ([127.0.0.1]:52491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpfd7-0002Kf-T0 for submit@debbugs.gnu.org; Tue, 23 Nov 2021 18:55:21 -0500 Received: from mx1.riseup.net ([198.252.153.129]:39786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpfd3-0002KK-Bg for 51594@debbugs.gnu.org; Tue, 23 Nov 2021 18:55:16 -0500 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4HzLbv3b6szF3LT; Tue, 23 Nov 2021 15:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1637711707; bh=jUSqppnP19cHuqCRVHmS8+lZ6qiBii7SpmoKG38UT4g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bckwPzCnSf46+Wf8D8Vxajz2eMkzOTvCb90ZqB9fHsJN4wgAOuAFwtW88ZLbgHEra 9MnfumMjtPEqcdyam6gtR6rhSyHJDnQQhpkbIKTy6tL94F50ELfgcm7YCZ7QwwaSOJ IYSlQTXrVogFDNp35cWms0tMvr8Km9WKOyPbHFHE= X-Riseup-User-ID: 8FD8FAD438A019EA72A293E25BBA64563F6E1DEA7561AA88E9F1B8C04CAA4A45 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4HzLbt3lrjz1yT1; Tue, 23 Nov 2021 15:55:06 -0800 (PST) Date: Wed, 24 Nov 2021 00:54:56 +0100 From: raingloom Message-ID: <20211124005456.2d35d502@riseup.net> In-Reply-To: <878rxmu281.fsf@gnu.org> References: <20211103214245.367ec719@riseup.net> <878rxmu281.fsf@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On Wed, 17 Nov 2021 18:22:06 +0100 Ludovic Courtès wrote: > Hi, > > raingloom skribis: > > > * gnu/packages/networking.scm (yggdrasil): Update to 0.4.1. > > * gnu/packages/patches/yggdrasil-extra-config.patch: Update for new > > version. --- > > gnu/packages/networking.scm | 4 +- > > .../patches/yggdrasil-extra-config.patch | 47 > > ++++++++++++------- 2 files changed, 33 insertions(+), 18 > > deletions(-) > > This patch got mangled on its way. Could you resend it as an > attachment? > > Thanks, > Ludo’. Heck, I'm pretty sure I sent it as an attachment? Maybe I forgot to re-add them to the email when I modified the patches? Well, here is attempt 3. From 776202eb2d0610e51f5168d108ce80a4096b10d4 Mon Sep 17 00:00:00 2001 From: raingloom Date: Wed, 3 Nov 2021 21:40:37 +0100 Subject: [PATCH 8/8] gnu: yggdrasil: Update to 0.4.1. * gnu/packages/networking.scm (yggdrasil): Update to 0.4.1. * gnu/packages/patches/yggdrasil-extra-config.patch: Update for new version. --- gnu/packages/networking.scm | 4 +- .../patches/yggdrasil-extra-config.patch | 47 ++++++++++++------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 62bb3ef07e..22d38fb4fd 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -4088,7 +4088,7 @@ (define-public nbd (define-public yggdrasil (package (name "yggdrasil") - (version "0.4.0") + (version "0.4.1") (source (origin (method git-fetch) @@ -4099,7 +4099,7 @@ (define-public yggdrasil (recursive? #t))) (file-name (git-file-name name version)) (sha256 - (base32 "0mmqw6w5a6ph49xd1yzb7i70xg466k9pi5sdvplhb66x68wipixh")) + (base32 "1ajhn0z58ap9jldip7mqj78drmgg4645zfsxsy004cfkm60fasnx")) (patches (search-patches "yggdrasil-extra-config.patch")))) (build-system go-build-system) (arguments diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch index 46fd3f15fc..bd4bea7b9f 100644 --- a/gnu/packages/patches/yggdrasil-extra-config.patch +++ b/gnu/packages/patches/yggdrasil-extra-config.patch @@ -1,8 +1,20 @@ +From 779f980451d20079b34812f7006f2d7230738ad0 Mon Sep 17 00:00:00 2001 +From: csepp +Date: Wed, 3 Nov 2021 21:14:54 +0100 +Subject: [PATCH] add extra config file option to yggdrasil command + +This is useful in Guix and Nix, because one config file can come +from the world-readable store and another can be placed directly +into /etc with much stricter permissions. +--- + cmd/yggdrasil/main.go | 29 ++++++++++++++++++++++------- + 1 file changed, 22 insertions(+), 7 deletions(-) + diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go -index 813e950..08d35cc 100644 +index 58b8230..b9df98a 100644 --- a/cmd/yggdrasil/main.go +++ b/cmd/yggdrasil/main.go -@@ -40,11 +40,12 @@ type node struct { +@@ -43,11 +43,12 @@ type node struct { admin *admin.AdminSocket } @@ -16,7 +28,7 @@ index 813e950..08d35cc 100644 var err error if useconffile != "" { // Read the file from the filesystem -@@ -56,6 +57,21 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config +@@ -59,6 +60,21 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf if err != nil { panic(err) } @@ -38,7 +50,7 @@ index 813e950..08d35cc 100644 // If there's a byte order mark - which Windows 10 is now incredibly fond of // throwing everywhere when it's converting things into UTF-16 for the hell // of it - remove it and decode back down into UTF-8. This is necessary -@@ -69,11 +85,6 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf bool) *config +@@ -72,11 +88,6 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf panic(err) } } @@ -50,7 +62,7 @@ index 813e950..08d35cc 100644 var dat map[string]interface{} if err := hjson.Unmarshal(conf, &dat); err != nil { panic(err) -@@ -112,6 +123,7 @@ func readConfig(log *log.Logger, useconf *bool, useconffile *string, normaliseconf *bool) *config +@@ -136,6 +147,7 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf if err = mapstructure.Decode(dat, &cfg); err != nil { panic(err) } @@ -58,15 +70,15 @@ index 813e950..08d35cc 100644 return cfg } -@@ -185,6 +197,7 @@ func main() { - genconf bool - useconf bool +@@ -192,6 +204,7 @@ type yggArgs struct { + getaddr bool + getsnet bool useconffile string -+ extraconffile string - normaliseconf bool - confjson bool - autoconf bool -@@ -164,6 +176,7 @@ func main() { ++ extraconffile string + logto string + loglevel string + } +@@ -200,6 +213,7 @@ func getArgs() yggArgs { genconf := flag.Bool("genconf", false, "print a new config to stdout") useconf := flag.Bool("useconf", false, "read HJSON/JSON config from stdin") useconffile := flag.String("useconffile", "", "read HJSON/JSON config from specified file path") @@ -74,15 +86,15 @@ index 813e950..08d35cc 100644 normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised") confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON") autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)") -@@ -212,6 +225,7 @@ func main() { +@@ -213,6 +227,7 @@ func getArgs() yggArgs { genconf: *genconf, useconf: *useconf, useconffile: *useconffile, -+ extraconffile: *extraconffile, ++ extraconffile: *extraconffile, normaliseconf: *normaliseconf, confjson: *confjson, autoconf: *autoconf, -@@ -187,7 +200,7 @@ func main() { +@@ -265,7 +280,7 @@ func run(args yggArgs, ctx context.Context, done chan struct{}) { cfg = defaults.GenerateConfig() case args.useconffile != "" || args.useconf: // Read the configuration from either stdin or from the filesystem @@ -91,3 +103,6 @@ index 813e950..08d35cc 100644 // If the -normaliseconf option was specified then remarshal the above // configuration and print it back to stdout. This lets the user update // their configuration file with newly mapped names (like above) or to +-- +2.33.1 + -- 2.33.1