Subject: [PATCH] gnu: Update yggdrasil to 0.5.2.
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Sun, 12 Nov 2023 00:24:58 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

this patch series updates Yggdrasil[1] to 0.5.2.
From 9d11912cb4bd31eac64928892a97268dbf0e67a6 Mon Sep 17 00:00:00 2001
Message-ID: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 29 Oct 2023 11:54:49 +0300
Subject: [PATCH 01/12] gnu: Deprecate the
 "go-github-com-lucas-clemente-quic-go" variable.

* gnu/packages/golang.scm (go-github-com-lucas-clemente-quic-go): Rename to
  "go-github-com-quic-go-quic-go".
  [arguments]: Patch source files to replace "lucas-clemente" with "quic-go".
  [home-page]: Update.
  (go-github-com-lucas-clemente-quic-go): Define as deprecated by
  "go-github-com-quic-go-quic-go".

Change-Id: I9a99d4d904fadcf0b6854e806042ce5ad190ac0c
---
 gnu/packages/golang.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9c707e5414..16da0ba6be 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7691,14 +7691,14 @@ (define-public go-github-com-cheekybits-genny
     (home-page "https://github.com/cheekybits/genny/")
     (license license:expat)))
 
-(define-public go-github-com-lucas-clemente-quic-go
+(define-public go-github-com-quic-go-quic-go
   (package
-    (name "go-github-com-lucas-clemente-quic-go")
+    (name "go-github-com-quic-go-quic-go")
     (version "0.14.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/lucas-clemente/quic-go")
+                     (url "https://github.com/quic-go/quic-go")
                      (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -7706,20 +7706,31 @@ (define-public go-github-com-lucas-clemente-quic-go
                 "04l3gqbc3gh079n8vgnrsf8ypgv8sl63xjf28jqfrb45v2l73vyz"))))
     (build-system go-build-system)
     (arguments
-     '(#:import-path "github.com/lucas-clemente/quic-go"
+     '(#:import-path "github.com/quic-go/quic-go"
        ;; XXX More packages required...
-       #:tests? #f))
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-repository-path
+           (lambda _
+             (substitute* (find-files "src/github.com/quic-go/quic-go/" ".*\\.go|.*\\.mod")
+               (("lucas-clemente")
+                "quic-go")))))))
     (propagated-inputs
-     (list go-golang-org-x-crypto go-github-com-cheekybits-genny
+     (list go-golang-org-x-crypto
+           go-github-com-cheekybits-genny
            go-github-com-marten-seemann-chacha20
            go-github-com-marten-seemann-qtls
            go-github-com-golang-protobuf-proto))
     (synopsis "QUIC in Go")
     (description "This package provides a Go language implementation of the QUIC
 network protocol.")
-    (home-page "https://github.com/lucas-clemente/quic-go")
+    (home-page "https://github.com/quic-go/quic-go")
     (license license:expat)))
 
+(define-public go-github-com-lucas-clemente-quic-go
+  (deprecated-package "go-github-com-lucas-clemente-quic-go" go-github-com-quic-go-quic-go))
+
 (define-public go-github-com-lunixbochs-vtclean
   (package
     (name "go-github-com-lunixbochs-vtclean")

base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94
-- 
2.41.0

From 49382ca77b76e023baaa7a18a270afb19530283f Mon Sep 17 00:00:00 2001
Message-ID: <49382c[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 1 Nov 2023 23:32:36 +0300
Subject: [PATCH 02/12] gnu: go-github-com-arceliar-ironwood: Update to
 v0.0.0-20231028101932-ceac99571f43.

* gnu/packages/golang.scm (go-github-com-arceliar-ironwood): Update to
  v0.0.0-20231028101932-ceac99571f43.

Change-Id: I313d67094ca6e99ccb8c8bf1c8cc001fc9dd537a
---
 gnu/packages/golang.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 16da0ba6be..93a375fd2f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2022 Christopher Howard <[email-masked]>
 ;;; Copyright © 2023 Hilton Chain <[email-masked]>
 ;;; Copyright © 2023 Timo Wilken <[email-masked]>
+;;; Copyright © 2023 Artyom V. Poptsov <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11970,7 +11971,7 @@ (define-public go-github-com-containerd-console
 (define-public go-github-com-arceliar-ironwood
   (package
     (name "go-github-com-arceliar-ironwood")
-    (version "0.0.0-20221115123222-ec61cea2f439")
+    (version "v0.0.0-20231028101932-ceac99571f43")
     (source
      (origin
        (method git-fetch)
@@ -11980,7 +11981,7 @@ (define-public go-github-com-arceliar-ironwood
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0jdfhsr1yci0a4fpf2pmh9n4d7iryjx12y3549gv9nfjf91rs225"))))
+         "1shxpmi847jf7rfa5mb0m4nflwmlg65hjgjm9v7ynjvcp0licsi4"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/Arceliar/ironwood"
-- 
2.41.0

From 4beb4db068bc580ce664be32501c81e437e7f6ec Mon Sep 17 00:00:00 2001
Message-ID: <4beb4d[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 4 Nov 2023 12:32:14 +0300
Subject: [PATCH 03/12] gnu: Deprecate the "go-github-com-willf-bitset"
 variable.

* gnu/packages/golang.scm (go-github-com-willf-bitset): Rename to
  "go-github-com-bits-and-blooms-bitset".
  [arguments]: Update.
  [home-page]: Update.
  (go-github-com-willf-bitset): Define as deprecated by
  "go-github-com-bits-and-blooms-bitset".

Change-Id: Iaa31f120d1c2b18a5c916ea5e68b89bd3e534ffd
---
 gnu/packages/golang.scm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 93a375fd2f..51d563dc6a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8647,29 +8647,32 @@ (define-public go-github-com-mattn-go-sqlite3
 @code{database/sql}.")
     (license license:expat)))
 
-(define-public go-github-com-willf-bitset
+(define-public go-github-com-bits-and-blooms-bitset
   (package
-    (name "go-github-com-willf-bitset")
+    (name "go-github-com-bits-and-blooms-bitset")
     (version "1.1.10")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/willf/bitset")
-                     (commit (string-append "v" version))))
+                    (url "https://github.com/bits-and-blooms/bitset")
+                    (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
                 "0wpaxg6va3qwd0hq0b8rpb1hswvzzbfm2h8sjmcsdpbkydjjx9zg"))))
     (build-system go-build-system)
     (arguments
-     '(#:import-path "github.com/willf/bitset"))
+     '(#:import-path "github.com/bits-and-blooms/bitset"))
     (synopsis "Bitsets in Go")
     (description "This package provides a Go implementation of bitsets, which
 are a mapping between non-negative integers and boolean values focused on
 efficient space usage.")
-    (home-page "https://github.com/willf/bitset")
+    (home-page "https://github.com/bits-and-blooms/bitset")
     (license license:bsd-3)))
 
+(define-public go-github-com-willf-bitset
+  (deprecated-package "go-github-com-willf-bitset" go-github-com-bits-and-blooms-bitset))
+
 (define-public go-github-com-willf-bloom
   (package
     (name "go-github-com-willf-bloom")
-- 
2.41.0

From f25689a3041d232e927a9b2f3e7f1d0407322623 Mon Sep 17 00:00:00 2001
Message-ID: <f25689[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 4 Nov 2023 12:34:17 +0300
Subject: [PATCH 04/12] gnu: go-github-com-bits-and-blooms-bitset: Update to
 1.11.0.

* gnu/packages/golang.scm (go-github-com-bits-and-blooms-bitset): Update to
  1.11.0.

Change-Id: I36dff5e8434f736d448c4dc8918f36020d25303a
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 51d563dc6a..e326d49ebc 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8650,7 +8650,7 @@ (define-public go-github-com-mattn-go-sqlite3
 (define-public go-github-com-bits-and-blooms-bitset
   (package
     (name "go-github-com-bits-and-blooms-bitset")
-    (version "1.1.10")
+    (version "1.11.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -8659,7 +8659,7 @@ (define-public go-github-com-bits-and-blooms-bitset
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0wpaxg6va3qwd0hq0b8rpb1hswvzzbfm2h8sjmcsdpbkydjjx9zg"))))
+                "1ialciixmr98p10rh61rnnkxpqi1j9hycbkv9rnjl0vnmsnpy0cy"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/bits-and-blooms/bitset"))
-- 
2.41.0

From 535476939920737509662305aab9279da3477baa Mon Sep 17 00:00:00 2001
Message-ID: <535476[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sat, 4 Nov 2023 18:03:02 +0300
Subject: [PATCH 05/12] gnu: Update "go-github-com-willf-bitset" to 3.6.0.

* gnu/packages/golang.scm (go-github-com-willf-bloom): Rename to
  "go-github-com-bits-and-blooms-bloom".  Update to 3.6.0.
  [arguments]: Replace "willf" with "bits-and-blooms".
  [home-page]: Likewise.
  (go-github-com-willf-bloom): Define as deprecated by
  "go-github-com-bits-and-blooms-bloom".

Change-Id: Ib9ecbff9c2694fae53bbc355fcb03079140183a0
---
 gnu/packages/golang.scm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e326d49ebc..b1f7be9629 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8673,22 +8673,22 @@ (define-public go-github-com-bits-and-blooms-bitset
 (define-public go-github-com-willf-bitset
   (deprecated-package "go-github-com-willf-bitset" go-github-com-bits-and-blooms-bitset))
 
-(define-public go-github-com-willf-bloom
+(define-public go-github-com-bits-and-blooms-bloom
   (package
-    (name "go-github-com-willf-bloom")
-    (version "2.0.3")
+    (name "go-github-com-bits-and-blooms-bloom")
+    (version "3.6.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/willf/bloom")
-                     (commit (string-append "v" version))))
+                    (url "https://github.com/bits-and-blooms/bloom")
+                    (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0ygan8pgcay7wx3cs3ja8rdqj7nly7v3and97ddcc66020jxchzg"))))
+                "02rpjlgl7k3755qnlsk519xazgqlk73b8wvkpqlvccywms5w77bq"))))
     (build-system go-build-system)
     (arguments
-     '(#:import-path "github.com/willf/bloom"
+     '(#:import-path "github.com/bits-and-blooms/bloom"
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-import-path
@@ -8696,17 +8696,20 @@ (define-public go-github-com-willf-bloom
              ;; See 'go.mod' in the source distribution of Syncthing 1.5.0 for
              ;; more information.
              ;; <https://github.com/spaolacci/murmur3/issues/29>
-             (substitute* "src/github.com/willf/bloom/bloom.go"
+             (substitute* "src/github.com/bits-and-blooms/bloom/bloom.go"
                (("spaolacci") "twmb"))
              #t)))))
     (propagated-inputs
-     (list go-github-com-twmb-murmur3 go-github-com-willf-bitset))
+     (list go-github-com-twmb-murmur3 go-github-com-bits-and-blooms-bitset))
     (synopsis "Bloom filters in Go")
     (description "This package provides a Go implementation of bloom filters,
 based on murmurhash.")
-    (home-page "https://github.com/willf/bloom")
+    (home-page "https://github.com/bits-and-blooms/bitset")
     (license license:bsd-2)))
 
+(define-public go-github-com-willf-bloom
+  (deprecated-package "go-github-com-willf-bloom" go-github-com-bits-and-blooms-bloom))
+
 (define-public go-golang-org-rainycape-unidecode
   (let ((commit "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c")
         (revision "1"))
-- 
2.41.0

From 7c3fe8c5bddedde4ba96b4576efc7f7a993e2e9b Mon Sep 17 00:00:00 2001
Message-ID: <7c3fe8[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 5 Nov 2023 09:04:32 +0300
Subject: [PATCH 06/12] gnu: Add go-github-com-quic-go-qtls-go1-20.

* gnu/packages/golang.scm (go-github-com-quic-go-qtls-go1-20): New variable.

Change-Id: Id7b4bfc88e446e974af31026c7717dc732cd09a6
---
 gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b1f7be9629..e8472c8b61 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7692,6 +7692,32 @@ (define-public go-github-com-cheekybits-genny
     (home-page "https://github.com/cheekybits/genny/")
     (license license:expat)))
 
+(define-public go-github-com-quic-go-qtls-go1-20
+  (package
+    (name "go-github-com-quic-go-qtls-go1-20")
+    (version "0.3.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/quic-go/qtls-go1-20")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0fl3yv1w8cygag3lav45vvzb4k9i72p92x13wcq0xn13wxirzirn"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/quic-go/qtls-go1-20"
+      #:go go-1.20))
+    (propagated-inputs (list go-golang-org-x-crypto go-golang-org-x-sys))
+    (synopsis "TLS 1.3 for QUIC")
+    (description
+     "Go standard library TLS 1.3 implementation, modified for QUIC.  For
+Go 1.20.")
+    (home-page "https://github.com/quic-go/qtls-go1-20")
+    (license license:expat)))
+
 (define-public go-github-com-quic-go-quic-go
   (package
     (name "go-github-com-quic-go-quic-go")
-- 
2.41.0

From e6b42a7fdf986dfa06cf2d34c900dfd21b933e17 Mon Sep 17 00:00:00 2001
Message-ID: <e6b42a[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 5 Nov 2023 09:17:10 +0300
Subject: [PATCH 07/12] gnu: Add go-github-com-quic-go-qpack.

* gnu/packages/golang.scm (go-github-com-quic-go-qpack): New variable.

Change-Id: I1ef8e677367a9a863897bfe884259782076e75fc
---
 gnu/packages/golang.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e8472c8b61..92664550d4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7718,6 +7718,39 @@ (define-public go-github-com-quic-go-qtls-go1-20
     (home-page "https://github.com/quic-go/qtls-go1-20")
     (license license:expat)))
 
+(define-public go-github-com-quic-go-qpack
+  (package
+    (name "go-github-com-quic-go-qpack")
+    (version "0.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/quic-go/qpack")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00mjz445hhx4yar5l8p21bpp4d06jyg2ajw0ax7bh64d37l4kx39"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/quic-go/qpack"
+      ;; Tests require ginkgo v2.
+      #:tests? #f
+      #:go go-1.20))
+    (propagated-inputs (list go-github-com-onsi-gomega
+                             go-github-com-onsi-ginkgo
+                             go-golang-org-x-net))
+    (synopsis "Minimal QPACK (RFC 9204) implementation for Go")
+    (description
+     "A minimal QPACK (RFC 9204) implementation in Go.  It is minimal in the sense
+that it doesn't use the dynamic table at all, but just the static table and (Huffman
+encoded) string literals.  Wherever possible, it reuses code from the
+@url{https://github.com/golang/net/tree/master/http2/hpack, HPACK implementation in
+the Go standard library}.")
+    (home-page "https://github.com/quic-go/qpack")
+    (license license:expat)))
+
 (define-public go-github-com-quic-go-quic-go
   (package
     (name "go-github-com-quic-go-quic-go")
-- 
2.41.0

From 49cb1558260c624b8d83718f63f45bfd08783165 Mon Sep 17 00:00:00 2001
Message-ID: <49cb15[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 5 Nov 2023 21:01:17 +0300
Subject: [PATCH 08/12] gnu: Add go-golang-org-x-sys-0.8

* gnu/packages/golang.scm (go-golang-org-x-sys-0.8): New variable.
  (go-github-com-quic-go-qtls-go1-20) [propagated-inputs]: Use
  "go-golang-org-x-sys-0.8".

Change-Id: I5e79b909e1f670a20e66bf2a9a06009737c45028
---
 gnu/packages/golang.scm | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 92664550d4..ca4b25ca2a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4092,6 +4092,24 @@ (define-public go-golang-org-x-sys
       (home-page "https://go.googlesource.com/sys")
       (license license:bsd-3))))
 
+;; XXX: This version is required for "go-github-com-quic-go-qtls-go1-20".
+(define-public go-golang-org-x-sys-0.8
+  (let ((commit "ca59edaa5a761e1d0ea91d6c07b063f85ef24f78")
+        (revision "0"))
+    (package
+      (inherit go-golang-org-x-sys)
+      (name "go-golang-org-x-sys")
+      (version (git-version "0.8.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://go.googlesource.com/sys")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1p81niiin8dwyrjl2xsc95136w3vdw4kmj0w3mlh0vh5v134s4xq")))))))
+
 (define-public go-golang-org-x-text
   (package
     (name "go-golang-org-x-text")
@@ -7710,7 +7728,8 @@ (define-public go-github-com-quic-go-qtls-go1-20
      (list
       #:import-path "github.com/quic-go/qtls-go1-20"
       #:go go-1.20))
-    (propagated-inputs (list go-golang-org-x-crypto go-golang-org-x-sys))
+    (propagated-inputs (list go-golang-org-x-crypto
+                             go-golang-org-x-sys-0.8))
     (synopsis "TLS 1.3 for QUIC")
     (description
      "Go standard library TLS 1.3 implementation, modified for QUIC.  For
-- 
2.41.0

From 443083bd7f2e257d9a2d78b62ce8c41f9a76ccfc Mon Sep 17 00:00:00 2001
Message-ID: <443083[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 5 Nov 2023 21:28:26 +0300
Subject: [PATCH 09/12] gnu: Add go-golang-org-x-net-0.17

* gnu/packages/golang.scm (go-golang-org-x-net-0.17): New variable.

Change-Id: Ie301f84c6ced9d96d6d9f685facedb4b88d30f78
---
 gnu/packages/golang.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ca4b25ca2a..0331f9531a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3989,6 +3989,23 @@ (define-public go-golang-org-x-net
       (home-page "https://go.googlesource.com/net")
       (license license:bsd-3))))
 
+(define-public go-golang-org-x-net-0.17
+  (let ((commit "b225e7ca6dde1ef5a5ae5ce922861bda011cfabd")
+        (revision "0"))
+    (package
+      (inherit go-golang-org-x-net)
+      (name "go-golang-org-x-net")
+      (version (git-version "0.17.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://go.googlesource.com/net")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "17zhim2m0r8nyy18g2lsawxm4rawix2qbjyn80x9vc6jc8fv05m9")))))))
+
 (define-public go-golang-org-x-net-html
   (package
     (inherit go-golang-org-x-net)
-- 
2.41.0

From 5e2331fb64078e94c93628f2e2da927633f647eb Mon Sep 17 00:00:00 2001
Message-ID: <5e2331[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Tue, 7 Nov 2023 23:36:26 +0300
Subject: [PATCH 10/12] gnu: go-github-com-quic-go-quic-go: Update to 0.39.3.

* gnu/packages/golang.scm (go-github-com-quic-go-quic-go): Update to 0.39.3.
  [propagated-inputs]: Rewrite input packages to replace old
  "go-golang-org-x-sys" with "go-golang-org-x-sys-0.8".  Add
  "go-golang-org-x-sys-0.8".

Change-Id: Ia8d9f79d582a8a5a5b0d10638a1a1c00a104b06e
---
 gnu/packages/golang.scm | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0331f9531a..dde8b6d736 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7790,7 +7790,7 @@ (define-public go-github-com-quic-go-qpack
 (define-public go-github-com-quic-go-quic-go
   (package
     (name "go-github-com-quic-go-quic-go")
-    (version "0.14.4")
+    (version "0.39.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -7799,25 +7799,29 @@ (define-public go-github-com-quic-go-quic-go
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "04l3gqbc3gh079n8vgnrsf8ypgv8sl63xjf28jqfrb45v2l73vyz"))))
+                "0acabl3cz48nxpggc5s7fwxpmr5amyi09jygn5m5xxkkbhqs2cxq"))))
     (build-system go-build-system)
     (arguments
-     '(#:import-path "github.com/quic-go/quic-go"
-       ;; XXX More packages required...
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-repository-path
-           (lambda _
-             (substitute* (find-files "src/github.com/quic-go/quic-go/" ".*\\.go|.*\\.mod")
-               (("lucas-clemente")
-                "quic-go")))))))
+     (list #:import-path "github.com/quic-go/quic-go"
+           ;; XXX More packages required...
+           #:tests? #f
+           #:go go-1.20))
     (propagated-inputs
-     (list go-golang-org-x-crypto
-           go-github-com-cheekybits-genny
-           go-github-com-marten-seemann-chacha20
-           go-github-com-marten-seemann-qtls
-           go-github-com-golang-protobuf-proto))
+     (let ((p (package-input-rewriting
+               `((,go-golang-org-x-sys . ,go-golang-org-x-sys-0.8))
+               #:deep? #true)))
+       (cons go-golang-org-x-sys-0.8
+             (map p
+                  (list go-github-com-quic-go-qtls-go1-20
+                        go-github-com-quic-go-qpack
+                        go-golang-org-x-crypto
+                        go-github-com-cheekybits-genny
+                        go-github-com-marten-seemann-chacha20
+                        go-github-com-golang-protobuf-proto
+                        go-golang-org-x-crypto
+                        go-golang-org-x-exp
+                        go-golang-org-x-net
+                        go-golang-org-x-sync)))))
     (synopsis "QUIC in Go")
     (description "This package provides a Go language implementation of the QUIC
 network protocol.")
-- 
2.41.0

From 9f67c8da4b4d35bea47870d367f5c0896391e5fb Mon Sep 17 00:00:00 2001
Message-ID: <9f67c8[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Tue, 7 Nov 2023 23:40:53 +0300
Subject: [PATCH 11/12] gnu: yggdrasil: Update to 0.5.2.

* gnu/packages/networking.scm (yggdrasil): Update to 0.5.2.
  [propagated-inputs]: Rewrite inputs to replace "go-golang-org-x-sys" with
  "go-golang-org-x-sys-0.8".  Use "go-golang-org-x-sys-0.8".  Add
  "go-github-com-bits-and-blooms-bitset",
  "go-github-com-bits-and-blooms-bloom", "go-github-com-quic-go-quic-go", and
  "go-github-com-hjson-hjson-go".
* gnu/packages/patches/yggdrasil-extra-config.patch: Update.

Change-Id: I3c411524e589f0af52eaa90230810148f6ad4e31
---
 gnu/packages/networking.scm                   |  62 ++++----
 .../patches/yggdrasil-extra-config.patch      | 134 ++++++------------
 2 files changed, 78 insertions(+), 118 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 1a8912ac87..524edbef56 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -60,6 +60,7 @@
 ;;; Copyright © 2023 Bruno Victal <[email-masked]>
 ;;; Copyright © 2023 Yovan Naumovski <[email-masked]>
 ;;; Copyright © 2023 Zheng Junjie <[email-masked]>
+;;; Copyright © 2023 Artyom V. Poptsov <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4401,7 +4402,7 @@ (define-public nbd
 (define-public yggdrasil
   (package
     (name "yggdrasil")
-    (version "0.4.7")
+    (version "0.5.2")
     (source
      (origin
        (method git-fetch)
@@ -4412,8 +4413,8 @@ (define-public yggdrasil
          (recursive? #t)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "01mllfrsr55lnfivxwa57cfrjas6w4shsvx9k81pw8jixc124myk"))
-       (patches (search-patches "yggdrasil-extra-config.patch"))))
+        (base32 "0ahgb94s30sq1wwyc8h53mjj3j43ifr0aanj8262rsm6rqk04kzq"))
+      (patches (search-patches "yggdrasil-extra-config.patch"))))
     (build-system go-build-system)
     (arguments
      (list #:import-path "github.com/yggdrasil-network/yggdrasil-go"
@@ -4439,32 +4440,37 @@ (define-public yggdrasil
                       (list "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil"
                             "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl"
                             "github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys"))))))))
-    ;; https://github.com/kardianos/minwinsvc is windows only
     (propagated-inputs
-     (list ;;("go-golang-zx2c4-com-wireguard-windows"
-           ;; ,go-golang-zx2c4-com-wireguard-windows)
-           go-golang-zx2c4-com-wireguard
-           go-golang-org-x-text
-           go-golang-org-x-sys
-           go-golang-org-x-net
-           go-golang-org-x-crypto
-           go-golang-org-x-tools
-           go-netns
-           go-netlink
-           go-github-com-olekukonko-tablewriter
-           go-github-com-mitchellh-mapstructure
-           go-github-com-mattn-go-runewidth
-           go-github-com-mattn-go-isatty
-           go-github-com-mattn-go-colorable
-           go-github-com-kardianos-minwinsvc
-           go-github-com-hjson-hjson-go
-           go-github-com-hashicorp-go-syslog
-           go-github-com-gologme-log
-           go-github-com-fatih-color
-           go-github-com-cheggaaa-pb-v3
-           go-github-com-vividcortex-ewma
-           go-github-com-arceliar-phony
-           go-github-com-arceliar-ironwood))
+     (let ((p (package-input-rewriting
+               `((,go-golang-org-x-sys . ,go-golang-org-x-sys-0.8))
+               #:deep? #true)))
+       (cons go-golang-org-x-sys-0.8
+             (map p
+                  (list go-golang-zx2c4-com-wireguard
+                        go-golang-org-x-text
+                        go-golang-org-x-net
+                        go-golang-org-x-crypto
+                        go-golang-org-x-tools
+                        go-netns
+                        go-netlink
+                        go-github-com-bits-and-blooms-bitset
+                        go-github-com-bits-and-blooms-bloom
+                        go-github-com-quic-go-quic-go
+                        go-github-com-hjson-hjson-go
+                        go-github-com-olekukonko-tablewriter
+                        go-github-com-mitchellh-mapstructure
+                        go-github-com-mattn-go-runewidth
+                        go-github-com-mattn-go-isatty
+                        go-github-com-mattn-go-colorable
+                        go-github-com-kardianos-minwinsvc
+                        go-github-com-hjson-hjson-go
+                        go-github-com-hashicorp-go-syslog
+                        go-github-com-gologme-log
+                        go-github-com-fatih-color
+                        go-github-com-cheggaaa-pb-v3
+                        go-github-com-vividcortex-ewma
+                        go-github-com-arceliar-phony
+                        go-github-com-arceliar-ironwood)))))
     (home-page "https://yggdrasil-network.github.io/blog.html")
     (synopsis
      "Experiment in scalable routing as an encrypted IPv6 overlay network")
diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch
index 7934e2b50f..44c58a8fbd 100644
--- a/gnu/packages/patches/yggdrasil-extra-config.patch
+++ b/gnu/packages/patches/yggdrasil-extra-config.patch
@@ -1,108 +1,62 @@
-From 779f980451d20079b34812f7006f2d7230738ad0 Mon Sep 17 00:00:00 2001
-From: csepp <[email-masked]>
-Date: Wed, 3 Nov 2021 21:14:54 +0100
+From 5aeabc1a8a8c5ecea3f5d0b7bcfa0aa0767ac92d Mon Sep 17 00:00:00 2001
+Message-ID: <5[email-masked]>
+From: Aleksandr Vityazev <[email-masked]>
+Date: Sat, 11 Nov 2023 19:50:46 +0300
 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(-)
+ cmd/yggdrasil/main.go | 12 ++++++++++++
+ src/config/config.go  |  2 +-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go
-index 58b8230..b9df98a 100644
+index a225755..3f53dda 100644
 --- a/cmd/yggdrasil/main.go
 +++ b/cmd/yggdrasil/main.go
-@@ -43,11 +43,12 @@ type node struct {
- 	admin     *admin.AdminSocket
- }
- 
--func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf bool) *config.NodeConfig {
-+func readConfig(log *log.Logger, useconf bool, useconffile string, extraconffile string, normaliseconf bool) *config.NodeConfig {
- 	// Use a configuration file. If -useconf, the configuration will be read
- 	// from stdin. If -useconffile, the configuration will be read from the
- 	// filesystem.
- 	var conf []byte
-+	var extraconf []byte
- 	var err error
- 	if useconffile != "" {
- 		// Read the file from the filesystem
-@@ -59,6 +60,21 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- 	if err != nil {
- 		panic(err)
- 	}
-+	if extraconffile != "" {
-+		extraconf, err = os.ReadFile(extraconffile);
-+	}
-+	if err != nil {
-+		panic(err)
-+	}
-+	// Generate a new configuration - this gives us a set of sane defaults -
-+	// then parse the configuration we loaded above on top of it. The effect
-+	// of this is that any configuration item that is missing from the provided
-+	// configuration will use a sane default.
-+	cfg := defaults.GenerateConfig()
-+	var confs [2][]byte
-+	confs[0]=conf
-+	confs[1]=extraconf
-+	for _, conf := range confs { if len(conf)>0 {
- 	// 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
-@@ -72,11 +88,6 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- 			panic(err)
- 		}
- 	}
--	// Generate a new configuration - this gives us a set of sane defaults -
--	// then parse the configuration we loaded above on top of it. The effect
--	// of this is that any configuration item that is missing from the provided
--	// configuration will use a sane default.
--	cfg := defaults.GenerateConfig()
- 	var dat map[string]interface{}
- 	if err := hjson.Unmarshal(conf, &dat); err != nil {
- 		panic(err)
-@@ -136,6 +147,7 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- 	if err = mapstructure.Decode(dat, &cfg); err != nil {
- 		panic(err)
- 	}
-+	}}
- 	return cfg
- }
- 
-@@ -192,6 +204,7 @@ type yggArgs struct {
- 	getaddr       bool
- 	getsnet       bool
- 	useconffile   string
-+        extraconffile string
- 	logto         string
- 	loglevel      string
- }
-@@ -200,6 +213,7 @@ func getArgs() yggArgs {
+@@ -42,6 +42,7 @@ func main() {
  	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")
 +	extraconffile := flag.String("extraconffile", "", "extra (usually private) HJSON/JSON config from specified file path")
  	normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised")
+ 	exportkey := flag.Bool("exportkey", false, "use in combination with either -useconf or -useconffile, outputs your private key in PEM format")
  	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)")
-@@ -213,6 +227,7 @@ func getArgs() yggArgs {
- 		genconf:       *genconf,
- 		useconf:       *useconf,
- 		useconffile:   *useconffile,
-+                extraconffile: *extraconffile,
- 		normaliseconf: *normaliseconf,
- 		confjson:      *confjson,
- 		autoconf:      *autoconf,
-@@ -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
--		cfg = readConfig(logger, args.useconf, args.useconffile, args.normaliseconf)
-+		cfg = readConfig(logger, args.useconf, args.useconffile, args.extraconffile, args.normaliseconf)
- 		// 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
+@@ -137,6 +138,17 @@ func main() {
+ 		return
+ 	}
+ 
++	if *extraconffile !="" {
++		f, err := os.Open(*extraconffile)
++		if err != nil {
++			panic(err)
++		}
++		if _, err := cfg.ReadFrom(f); err != nil {
++			panic(err)
++		}
++		_ = f.Close()
++	}
++
+ 	privateKey := ed25519.PrivateKey(cfg.PrivateKey)
+ 	publicKey := privateKey.Public().(ed25519.PublicKey)
+ 
+diff --git a/src/config/config.go b/src/config/config.go
+index e899a35..76b9ec8 100644
+--- a/src/config/config.go
++++ b/src/config/config.go
+@@ -112,7 +112,7 @@ func (cfg *NodeConfig) ReadFrom(r io.Reader) (int64, error) {
+ 	// then parse the configuration we loaded above on top of it. The effect
+ 	// of this is that any configuration item that is missing from the provided
+ 	// configuration will use a sane default.
+-	*cfg = *GenerateConfig()
++	// *cfg = *GenerateConfig()
+ 	if err := cfg.UnmarshalHJSON(conf); err != nil {
+ 		return n, err
+ 	}
+
+base-commit: b759683b76985665b5218346abab35f08d9f4d38
 -- 
-2.33.1
+2.41.0
 
-- 
2.41.0

From ae59656164c332bf11e0baa3527c8c1b0d5e2a86 Mon Sep 17 00:00:00 2001
Message-ID: <ae5965[email-masked]>
In-Reply-To: <9d1191[email-masked]>
References: <9d1191[email-masked]>
From: Aleksandr Vityazev <[email-masked]>
Date: Sat, 11 Nov 2023 22:52:52 +0300
Subject: [PATCH 12/12] doc: Update yggdrasil related documentation.

* doc/guix.texi (Networking Services): Update the sample yggdrasil-private.conf.
Remove obsolete options that may contain a file whose path is specified in the
config-file field of yggdrasil-configuration.
---
 doc/guix.texi | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 94903fb5e2..01ffa0c403 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22165,10 +22165,6 @@ Networking Services
 @example
 # sample content for /etc/yggdrasil-private.conf
 @{
-  # Your public key. Your peers may ask you for this to put
-  # into their AllowedPublicKeys configuration.
-  PublicKey: 64277...
-
   # Your private key. DO NOT share this with anyone!
   PrivateKey: 5c750...
 @}
@@ -22207,14 +22203,8 @@ Networking Services
 randomized address after each restart.  Use @code{#f} to disable.  Options
 defined in this file take precedence over @code{json-config}.  Use the output
 of @code{yggdrasil -genconf} as a starting point.  To configure a static
-address, delete everything except these options:
+address, delete everything except PrivateKey option.
 
-@itemize
-@item @code{EncryptionPublicKey}
-@item @code{EncryptionPrivateKey}
-@item @code{SigningPublicKey}
-@item @code{SigningPrivateKey}
-@end itemize
 @end table
 @end deftp
 
-- 
2.41.0

The work is done with the help of Aleksandr Vityazev
<[email-masked]>.

Thanks,
- avp

References:
1. https://github.com/yggdrasil-network/yggdrasil-go

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F