[PATCH 0/7] Add some networking libraries for Golang

  • Done
  • quality assurance status badge
Details
2 participants
  • Artyom V. Poptsov
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 10 Aug 23:08 +0200
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
cover.1723324012.git.poptsov.artyom@gmail.com
This patchset adds some networking libraries for Golang, mostly indirectly
related to Kubo (IPFS.)

Artyom V. Poptsov (7):
gnu: Add go-github-com-ipfs-go-verifcid.
gnu: Add go-github-com-libp2p-go-buffer-pool.
gnu: Add go-github-com-libp2p-go-msgio.
gnu: Add go-github-com-huin-goupnp.
gnu: Add go-github-com-koron-go-ssdp.
gnu: Add go-github-com-libp2p-go-netroute.
gnu: Add go-github-com-libp2p-go-nat.

gnu/packages/golang-web.scm | 106 ++++++++++++++++++++++++++++++++++++
gnu/packages/golang.scm | 64 ++++++++++++++++++++++
gnu/packages/ipfs.scm | 27 +++++++++
3 files changed, 197 insertions(+)


base-commit: de714bcb46d61922e0efc10783ea23fb0202f583
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 1/7] gnu: Add go-github-com-ipfs-go-verifcid.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
3270370a5fcac41951678bdafeb5abbcd39e9dbe.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/ipfs.scm (go-github-com-ipfs-go-verifcid): New variable.

Change-Id: I30b800dc0575ed3d7b208a1860c305911e1944d2
---
gnu/packages/ipfs.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index ccf5728e4f..4ab3b3e7e5 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -547,6 +547,33 @@ (define-public go-github-com-ipfs-go-ipld-legacy
and @code{go-ipld-format} legacy interface.")
(license (list license:expat license:asl2.0))))
+(define-public go-github-com-ipfs-go-verifcid
+ (package
+ (name "go-github-com-ipfs-go-verifcid")
+ (version "0.0.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ipfs/go-verifcid")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "05i6wp2nln0mlr1pivmva7j6bwa09k7jl04acx1lw65h4d9nxsjm"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/ipfs/go-verifcid"))
+ (native-inputs (list go-github-com-stretchr-testify))
+ (propagated-inputs (list go-github-com-ipfs-go-cid
+ go-github-com-multiformats-go-multihash))
+ (home-page "https://github.com/ipfs/go-verifcid")
+ (synopsis "CID security code")
+ (description
+ "@code{go-verifcid} provides @url{https://github.com/ipld/cid, CID} security
+code prior to it getting merged into @code{go-cid}.")
+ (license (list license:expat license:asl2.0))))
+
(define-public go-github-com-ipld-go-codec-dagpb
(package
(name "go-github-com-ipld-go-codec-dagpb")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 2/7] gnu: Add go-github-com-libp2p-go-buffer-pool.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
910eaf513b148410231565bc6e443a28eeca4e87.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang.scm (go-github-com-libp2p-go-buffer-pool): New variable.

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

Toggle diff (49 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 50ac5328c6..4efd2d1a36 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4413,6 +4413,42 @@ (define-public go-github-com-gogo-protobuf
(home-page "https://github.com/gogo/protobuf")
(license license:bsd-3)))
+(define-public go-github-com-libp2p-go-buffer-pool
+ (package
+ (name "go-github-com-libp2p-go-buffer-pool")
+ (version "0.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libp2p/go-buffer-pool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0514rsnin6wjqifpg66dp5nrwh40smqlkgs3kxyz9cansi78c2n1"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/libp2p/go-buffer-pool"))
+ (home-page "https://github.com/libp2p/go-buffer-pool")
+ (synopsis "Variable size buffer pool for Golang")
+ (description
+ "A variable size buffer pool for Golang.
+
+@code{go-buffer-pool} provides:
+@itemize
+@item @code{BufferPool}: A pool for re-using byte slices of varied sizes.
+This pool will always return a slice with at least the size requested and a capacity
+up to the next power of two. Each size class is pooled independently which makes the
+@code{BufferPool} more space efficient than a plain @code{sync.Pool} when used in
+situations where data size may vary over an arbitrary range.
+@item @code{Buffer}: a buffer compatible with @code{bytes.Buffer} but backed by a
+@code{BufferPool}. Unlike @code{bytes.Buffer}, @code{Buffer} will automatically
+shrink on read, using the buffer pool to avoid causing too much work for the
+allocator. This is primarily useful for long lived buffers that usually sit empty.
+@end itemize")
+ (license license:expat)))
+
(define-public go-github-com-libp2p-go-flow-metrics
(let ((commit "7e5a55af485341567f98d6847a373eb5ddcdcd43")
(revision "0"))
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 3/7] gnu: Add go-github-com-libp2p-go-msgio.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
f01b15e5ef6c7d962f4a5a834f6e909159b58e9e.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang.scm (go-github-com-libp2p-go-msgio): New variable.

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

Toggle diff (41 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 4efd2d1a36..c019735a61 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4449,6 +4449,34 @@ (define-public go-github-com-libp2p-go-buffer-pool
@end itemize")
(license license:expat)))
+(define-public go-github-com-libp2p-go-msgio
+ (package
+ (name "go-github-com-libp2p-go-msgio")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libp2p/go-msgio")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "005cdmkcgsfqlf8478wxyzmy5iixqa8fhjrbig912n8ngnqx1029"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/libp2p/go-msgio"))
+ (propagated-inputs (list go-github-com-gogo-protobuf
+ go-github-com-libp2p-go-buffer-pool
+ go-github-com-multiformats-go-varint
+ go-google-golang-org-protobuf))
+ (home-page "https://github.com/libp2p/go-msgio")
+ (synopsis "Read and write length-delimited slices")
+ (description
+ "@code{go-msgio} is a simple package that helps read and write length-delimited
+slices. It's helpful for building wire protocols.")
+ (license license:expat)))
+
(define-public go-github-com-libp2p-go-flow-metrics
(let ((commit "7e5a55af485341567f98d6847a373eb5ddcdcd43")
(revision "0"))
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 4/7] gnu: Add go-github-com-huin-goupnp.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
d233e13c5afb29514feb5aa4520873e6ace0a613.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang-web.scm (go-github-com-huin-goupnp): New variable.

Change-Id: I490dfa3fd8e993124e2e57a907a7e40a213d8b0c
---
gnu/packages/golang-web.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 5c1ece7389..6911c76c5b 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -1747,6 +1747,30 @@ (define-public go-github-com-hjson-hjson-go-v4
the machine.")
(license license:expat)))
+(define-public go-github-com-huin-goupnp
+ (package
+ (name "go-github-com-huin-goupnp")
+ (version "1.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/huin/goupnp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "04j5rmrfawjxcimiqpyjm9gm5phdndjxrmydf9f1ylij6m360nwl"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/huin/goupnp"))
+ (home-page "https://github.com/huin/goupnp")
+ (propagated-inputs (list go-golang-org-x-sync))
+ (synopsis "UPnP client library for Go")
+ (description
+ "@code{goupnp} is a Universal Plug and Play (UPnP) client library for Go.")
+ (license license:bsd-2)))
+
(define-public go-github-com-jackpal-gateway
(package
(name "go-github-com-jackpal-gateway")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 5/7] gnu: Add go-github-com-koron-go-ssdp.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
3fe5e2547cc344bab9b75bf7bff026ff08d70514.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang-web.scm (go-github-com-koron-go-ssdp): New variable.

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

Toggle diff (39 lines)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 6911c76c5b..3fb58cdc55 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -2044,6 +2044,32 @@ (define-public go-github-com-julienschmidt-httprouter
router.")
(license license:bsd-3)))
+(define-public go-github-com-koron-go-ssdp
+ (package
+ (name "go-github-com-koron-go-ssdp")
+ (version "0.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/koron/go-ssdp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0agzxzlwvnhgwk6sxswjq7v1ghmf0l02gr7zpdih24i3g457af4f"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:tests? #f ;Tests require networking.
+ #:import-path "github.com/koron/go-ssdp"))
+ (propagated-inputs (list go-golang-org-x-net go-golang-org-x-sys))
+ (home-page "https://github.com/koron/go-ssdp")
+ (synopsis "SSDP library for Golang")
+ (description
+ "@code{go-ssdp} is a @url{https://tools.ietf.org/html/draft-cai-ssdp-v1-03,
+Simple Service Discovery Protocol} (SSDP) library for Golang.")
+ (license license:expat)))
+
(define-public go-github-com-makeworld-the-better-one-go-gemini
(package
(name "go-github-com-makeworld-the-better-one-go-gemini")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 6/7] gnu: Add go-github-com-libp2p-go-netroute.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
2607d3f8a071d5de433851c383cbadd94f3d6c61.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang-web.scm (go-github-com-libp2p-go-netroute): New variable.

Change-Id: I46ed313a1c96cf5b9d126fa48791351a13d66f32
---
gnu/packages/golang-web.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 3fb58cdc55..27a2a2d4ed 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -2070,6 +2070,36 @@ (define-public go-github-com-koron-go-ssdp
Simple Service Discovery Protocol} (SSDP) library for Golang.")
(license license:expat)))
+(define-public go-github-com-libp2p-go-netroute
+ (package
+ (name "go-github-com-libp2p-go-netroute")
+ (version "0.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libp2p/go-netroute")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06p68j63fd5nf2gf1fz2pnksmdmv735swpbpvnhb15vrgg3r528g"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:tests? #f ;Tests require networking.
+ #:import-path "github.com/libp2p/go-netroute"))
+ (propagated-inputs (list go-github-com-google-gopacket
+ go-golang-org-x-net
+ go-golang-org-x-sys))
+ (home-page "https://github.com/libp2p/go-netroute")
+ (synopsis "Routing table abstraction library for Golang")
+ (description
+ "@code{go-netroute} is a cross-platform implementation of the
+@url{https://godoc.org/github.com/google/gopacket/routing#Router,
+gopacket/routing.Router} interface for Golang. It is derived from @code{gopacket}
+for GNU/Linux, @code{x/net/route} for Mac, and @code{iphlpapi.dll} for Windows.")
+ (license license:bsd-3)))
+
(define-public go-github-com-makeworld-the-better-one-go-gemini
(package
(name "go-github-com-makeworld-the-better-one-go-gemini")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 10 Aug 23:09 +0200
[PATCH 7/7] gnu: Add go-github-com-libp2p-go-nat.
(address . 72565@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
16e2c1fb1c706104d93627b24c562e364f02bce0.1723324012.git.poptsov.artyom@gmail.com
* gnu/packages/golang-web.scm (go-github-com-libp2p-go-nat): New variable.

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

Toggle diff (39 lines)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 27a2a2d4ed..d09b70fc2d 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -2070,6 +2070,32 @@ (define-public go-github-com-koron-go-ssdp
Simple Service Discovery Protocol} (SSDP) library for Golang.")
(license license:expat)))
+(define-public go-github-com-libp2p-go-nat
+ (package
+ (name "go-github-com-libp2p-go-nat")
+ (version "0.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libp2p/go-nat")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1yyb3knxvfr7fi759nh7mhh88ap1jpkb7nky7niqrh75737phgh0"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/libp2p/go-nat"))
+ (propagated-inputs (list go-github-com-huin-goupnp
+ go-github-com-jackpal-go-nat-pmp
+ go-github-com-koron-go-ssdp
+ go-github-com-libp2p-go-netroute))
+ (home-page "https://github.com/libp2p/go-nat")
+ (synopsis "NAT port mapping library for Go")
+ (description "Package @code{go-nat} implements NAT handling facilities.")
+ (license license:asl2.0)))
+
(define-public go-github-com-libp2p-go-netroute
(package
(name "go-github-com-libp2p-go-netroute")
--
2.45.2
S
S
Sharlatan Hellseher wrote on 21 Aug 15:55 +0200
[PATCH 0/7] Add some networking libraries for Golang
(address . 72565-done@debbugs.gnu.org)
87a5h6c75w.fsf@gmail.com
Hi,

Thank you for the patches!

I see QA is green ^.^.

I've applied some modifications and pushed as 158ee2c76a..8076ca2042 to
master.

More inputs are unbundled for Kubo after, we are nearly there!

- patches [7/7]
- [X] [PATCH 1/7] gnu: Add go-github-com-ipfs-go-verifcid.
- [X] [PATCH 2/7] gnu: Add go-github-com-libp2p-go-buffer-pool.
- Place to golang-xyz
- [X] [PATCH 3/7] gnu: Add go-github-com-libp2p-go-msgio.
- Enable all tests
- Place to golang-xyz
- [X] [PATCH 4/7] gnu: Add go-github-com-huin-goupnp.
- Extend description
- Delete submodule github.com/huin/goupnp/v2alpha
- Enable all tests
- [X] [PATCH 5/7] gnu: Add go-github-com-koron-go-ssdp.
- Remove go-golang-org-x-sys - indirect
- Enable some tests
- [X] [PATCH 6/7] gnu: Add go-github-com-libp2p-go-netroute.
- Enable tests
- Remove mentioning about cross-platform as it's not relevant for Guix in description
- [X] [PATCH 7/7] gnu: Add go-github-com-libp2p-go-nat.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmbF8bsACgkQdtcnv/Ys
0rVCwxAAjh+zMqhzwueoyPMnKEopDU5abVv/6KrXOeZuyoZc+D+VER4e0wA3tY8B
2Ix1yMTv/l1NoTxbUCEqfrttN6ikuT5rMXGONCinMBggyHoiKAz2gYpcBlW5a8NU
GxwVOncbD2IgVaji2R8FCmaTW9MAANrl/S5Bt+2RSN8PY6wZj3axCLrNPIpBfxQn
j1zt4XAXb3bX/5HvBKa4VDzK8feeN8pPDBJrVuN+XRyvoYDVnt9o83+ScjQqK8wL
ejnu2QNWipPcVQiWL4Re/fqQrsdrFXhSuqEkLoFBjhEtmEXUrTQWrO/9sn9o1yl6
5jk4xPn6MX/HH1x1uzzB26EteZwxVRrN8BxOVIUkyGl7wodZ1cI3HVZl8WC3uUSk
Nh1OqsrOd01RsNM8yTlkCqN/Jk7N4+b3jJZNYNsOqVwVw58aM0Iaytr49nrZI/DB
13zGBGP2Iow7HEHq7GGbyw5Z5LZEvw+a1JQ+/fs+9Ce3yP7dHpYKNeSKRD7mGgA6
N9yLZDp5XdDxH6fLDbziQj5GGrzUCCEmf5EJcYXusjU+TxYdONFP7B2PHVerCHjU
PJ8rQUAyTmBDMJgTdyGVQF5F49hlVXLvw0ofDShq120F5Cy9Pa/jxy0s2Ats1+DQ
xlNtVekaGhnvB4WGKGBlOu/IJsJCLMZGO1bqPTmqbmie79f/YPU=
=kUbG
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72565@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72565
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch