From patchwork Wed Nov 3 20:42:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Csepp X-Patchwork-Id: 34234 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 8F3F827BBE1; Wed, 3 Nov 2021 20:44:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 925A727BBE3 for ; Wed, 3 Nov 2021 20:44:21 +0000 (GMT) Received: from localhost ([::1]:49872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miN7M-0004EE-D3 for patchwork@mira.cbaines.net; Wed, 03 Nov 2021 16:44:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miN75-0004Dp-8X for guix-patches@gnu.org; Wed, 03 Nov 2021 16:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miN74-0005oB-Tl for guix-patches@gnu.org; Wed, 03 Nov 2021 16:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miN74-0007UD-AL for guix-patches@gnu.org; Wed, 03 Nov 2021 16:44:02 -0400 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: Wed, 03 Nov 2021 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51594 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51594@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.163597219528703 (code B ref -1); Wed, 03 Nov 2021 20:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Nov 2021 20:43:15 +0000 Received: from localhost ([127.0.0.1]:41369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miN6I-0007St-PS for submit@debbugs.gnu.org; Wed, 03 Nov 2021 16:43:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:51526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miN6G-0007Sk-Ub for submit@debbugs.gnu.org; Wed, 03 Nov 2021 16:43:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miN6E-0004Bu-Nn for guix-patches@gnu.org; Wed, 03 Nov 2021 16:43:10 -0400 Received: from mx1.riseup.net ([198.252.153.129]:55000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miN6C-0005jp-B4 for guix-patches@gnu.org; Wed, 03 Nov 2021 16:43:10 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (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 4HkzHY4X2DzF3Pn for ; Wed, 3 Nov 2021 13:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1635972185; bh=JRRQCgZLBA+jrnQF+ZVwR/OisVwhjuPPtme39P9OXsA=; h=Date:From:To:Subject:From; b=Jqj4a3fDXVqps7CAbLie8ncSbAoWxmhU8w54X2VyN8eddn2pM3Bl6tRfBASPqmkRY 6tn1cCe+sZIyt0V9p/sflXOHfxvZAYeW1UNCWZ+DiMcK9kQYGwbDQp/vzH4ei13BkV UcZVcey4ACs0KVY6eAQd59j6tFgsIXIw6dfuXtiE= X-Riseup-User-ID: C28407D8CD521203A23D413815B21F87DF7D0BED3BA16E74A26DC8781598110F Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4HkzHX6vtJz5w61 for ; Wed, 3 Nov 2021 13:43:04 -0700 (PDT) Date: Wed, 3 Nov 2021 21:42:45 +0100 From: raingloom Message-ID: <20211103214245.367ec719@riseup.net> MIME-Version: 1.0 Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 * 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(-) 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 + diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index d1a437e177..7759e3cb84 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -4086,7 +4086,7 @@ (define-public nbd (define-public yggdrasil (package (name "yggdrasil") - (version "0.4.0") + (version "0.4.1") (source (origin (method git-fetch) @@ -4097,7 +4097,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